Repository navigation
Midnight City — Midnight City agents + midnight-wallet toolbox (bring your own API token) - #28
notsoblack wants to merge 1 commit into
Conversation
Renderer-only add-on that shows a user's Midnight City agents (bring-your-own API token, stored in add-on settings) — live status, vitals, skills, inventory — alongside the wallet snapshot and a grouped toolbox over every connected MCP server. Permissions: wallet:read, mcp:read, mcp:call. No build step; renderer/ is hand-written source and force-added past the renderer/ ignore rule. Signed-off-by: Mauricio Fabian Prieto Davila <mauricio240887@gmail.com>
|
CI note — the
Running both gates locally against
Happy to adjust anything on the add-on side; this one looks like it needs a tooling fix on |
What
Midnight City (
midnight-addon): a renderer-only tab that puts a user's Midnight City agents and the midnight-wallet toolbox in one panel.addonAPI.settings, sent only as a bearer header to the observer they configure) and Sync from account lists their agents. Agents can also be added by hand by ID, so the panel works with no token at all. The first agent is auto-selected on boot.midnight-walletMCP server.listServers → listTools → callTool, so it adapts to whatever the servers expose rather than hard-coding tool names.Permissions
Minimum set for the above: read the wallet snapshot, discover tools on servers the user has already connected, and call them. No
wallet:sign— the add-on never signs or broadcasts on its own; every transaction is an explicit click on a wallet tool the user chose to connect.Source, build, licence
renderer/(index.html,app.js,style.css— vanilla JS, ~1,100 lines) is hand-written source, not output. It is force-added past the repo'saddons/*/renderer/ignore rule, as CONTRIBUTING.md asks;git status --ignoredconfirms all three files are in the patch. Nopackage.json, no dependencies, no lockfile.addons/midnight-addon/LICENSE, Copyright © 2026 Mauricio Prieto Davila (notsoblack)), same asgraph-addonandloops-addon.Network egress (for the judgment queue)
One
fetchinapp.js: the Midnight City observer REST API (www.midnight.city, user-overridable in Settings) for agent status and the account agent list. Reads need no token; the bearer token is only attached when the user has saved one. No other hosts. Wallet and toolbox data come through the Mosaic bridge, not the network.Gates
Both run locally against
mainat401ed68:tab.iconisStar(in the app's icon set),minAppVersionis0.1.13, the app version the add-on was exercised against.What I exercised, and what I did not
Exercised in Mosaic Companion 0.1.13 (dev-source add-on, tab mount): agent sync with a token and by-hand add, selection persistence across reloads, toolbox listing across all connected servers (midnight-wallet 44 tools grouped as above), zero-arg tool calls, wallet strip, and the layout at the sidebar's default width and at ~650px. Not exercised: an account with zero agents behind a valid token, and a revoked token (both render the existing "add a token" state, not an error path I have seen live).
One logical commit,
Signed-off-bypresent./cc @zephyrnova — same submission path as Stargate Graph (#3) and Stargate Loops (#4).