Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions addons/midnight-addon/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Mauricio Prieto Davila (notsoblack)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
61 changes: 61 additions & 0 deletions addons/midnight-addon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 🌙 Midnight City — a Mosaic Companion add-on

A renderer-only add-on for [Mosaic Companion](https://github.com/hypercycle-development/mosaic-companion) that puts your **Midnight City agents** and the **midnight-wallet** toolbox in one panel: live agent status, vitals, skills, inventory, wallet snapshot, and a grouped MCP tool explorer.

Bring your own Midnight City API token (Settings) and the add-on lists the agents on your account. Nothing is hard-coded to one user — each person's token and agent selection live in their own add-on settings.

## What it does

| Feature | How |
|---|---|
| Agent list | Add agents by ID, or paste an API token and **Sync from account**. The first agent is auto-selected on boot. |
| Agent detail | Status, location, control channel, health / hunger bars, skills with progress, inventory chips, load stats. |
| Wallet strip | Address, balance, network, and the connected midnight-wallet MCP server. |
| Toolbox | Every tool on every connected MCP server, grouped by functional prefix (Wallet, Localnet, Contracts, Grants, Swaps, Dust, Config, Transactions, Utilities). One-click run for zero-arg tools; JSON args for the rest. |
| Live status | A status pill (ok / warn) on every action, refresh pill with last-updated time, observer polling. |

## Layout

```
midnight-addon/
├── manifest.json # id "midnight-addon", tab mount "Midnight", permissions
├── renderer/ # no build step — served directly by the add-on loader
│ ├── index.html
│ ├── app.js # vanilla JS, drives addonAPI.mcp + observer REST
│ └── style.css # muted palette, Inter/system-ui, 6–10px radii
├── src/index.ts # inert scaffolding (not loaded)
├── package.json # inert — the loader reads manifest.json, not package.json
└── tsconfig.json
```

## Permissions

`wallet:read`, `mcp:read`, `mcp:call` — the add-on only reads wallet state and calls tools on servers the user has already connected in Mosaic. No `wallet:sign`.

## Install as a dev add-on

Register it in `~/.config/mosaic-companion/addon-state.json`:

```json
"midnight-addon": {
"version": "0.2.0",
"activated": true,
"grantedPermissions": ["wallet:read", "mcp:read", "mcp:call"],
"linkVisibilityToActivation": true,
"source": { "type": "dev", "path": "/path/to/midnight-addon" }
}
```

Then open the **Midnight** tab in Mosaic Companion.

## Submitting to the catalogue

The catalogue submission lives in `hypercycle-development/mosaic-open-platform` under `addons/midnight-addon/` (manifest, `renderer/`, `LICENSE`). Both adjudication gates (`scripts/adjudicate/adjudicate.mjs` and `checks.mjs`) must pass before the PR.

## Licence

MIT — see `LICENSE`.

---

Built for the Midnight City ops team: @hermes, @nighter, @debugger
27 changes: 27 additions & 0 deletions addons/midnight-addon/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"manifestVersion": 1,
"id": "midnight-addon",
"version": "0.2.0",
"minAppVersion": "0.1.13",
"name": "Midnight City",
"description": "Your Midnight City agents at a glance: live status, vitals, skills and inventory, plus the Mosaic wallet and the midnight-wallet toolbox. Bring your own API token to manage your agents.",
"author": "notsoblack",
"ipcNamespace": "midnight",
"mountPoint": "tab",
"tab": {
"label": "Midnight",
"icon": "Star",
"order": 200
},
"renderer": {
"entry": "renderer/index.html"
},
"permissions": [
"wallet:read",
"mcp:read",
"mcp:call"
],
"updates": {
"checkMode": "manual"
}
}
Loading
Loading