HQ Direct Link — Operator Interface
HQ Direct Link — Operator Interface
Concept
HQ = Operator’s direct interface to the Kapnet mesh. Not a separate system — it’s the operator.json poll model + TUI presentation layer.
OPERATOR (GELI)
│
├── Writes: shared-rw/messaging/inbox/operator.json
│ ├── Commands to specific agents (by npub)
│ ├── Broadcast commands (all agents)
│ └── Configuration changes
│
├── Reads: shared-rw/messaging/outbox/<qube>.json
│ ├── Status responses from agents
│ ├── Heartbeat confirmations
│ └── Error reports
│
└── Reads: Nostr relay (via any client)
├── TXXM envelopes from all agents
├── Block announcements
├── Mining pool status
└── Research findings
Operator Command Format
{
"version": "1.0",
"last_modified": "2026-06-08T21:00:00Z",
"commands": [
{
"id": "cmd-unique-id",
"timestamp": 1717500000,
"target": "broadcast | <npub> | <qube-name>",
"type": "command type",
"params": { "key": "value" },
"executed_by": [],
"responses": {}
}
]
}
Command Types
| Type | Target | Purpose | Params |
|---|---|---|---|
| status_report | broadcast | Request status from all agents | — |
| message | Send message to specific agent | content | |
| spawn | Trigger a soul run | soul_name | |
| pause | Pause a soul’s cron | soul_name | |
| resume | Resume a soul’s cron | soul_name | |
| build | forger | Trigger a build | target, mode |
| audit | warden | Run security audit | scope |
| publish | herald | Publish content to Nostr | content_type, data |
| research | querant | Research a topic | topic, depth |
| sweep | cold_stub | Sweep hot → cold | amount, to_address |
| emergency_stop | broadcast | Halt all soul loops | — |
Response Format
{
"signal": "operator_response",
"from": "courier",
"to": "operator",
"timestamp": 1717500000,
"data": {
"command_id": "cmd-unique-id",
"status": "acknowledged | executed | failed",
"qube": "herm-qubes-alpha",
"result": { ... },
"error": null
},
"session_id": "session-qubes-alpha"
}
TUI Integration
The existing kapnet-tui (Rust, ratatui) can be extended:
F1 Config — edit kapnetd config
F2 Nostr — relay status, peer list
F3 Braid — knot height, TXXM count, state root
F4 Bitcoin — block height, hodlwave summary
F5 Help — key bindings, command reference
F6 Errors — error log
F7 Boundary — KOR scope, auth levels
F8 Agents — soul status, heartbeats
─────────────────────────────────────────────
F9 Messages — chat-like message view (NEW)
F10 Sheet — message log as sheet rows (NEW)
F11 Sessions — active sessions, who's online (NEW)
F12 Operator — command composition, response view (NEW)
Input line:
/msg <target> <text> — send message
/cmd <target> <type> — send command
/sheet <sheet_id> — view sheet
/sessions — list active sessions
/status — system status
/help — command reference
HQ Launch Requirements
- kapnetd running — local braid processing
- Courier Bridge v2 running — messaging + relay
- Operator inbox file —
shared-rw/messaging/inbox/operator.json - TUI binary — extended kapnet-tui with messaging views
- Nostr client — any web client for reading relay (snort.social, iris.to)
HQ Verification
- [ ] operator.json writable by operator
- [ ] Courier Bridge polls operator.json (15s)
- [ ] Commands processed and marked executed
- [ ] Responses written to outbox
- [ ] TUI displays messages from all agents
- [ ] TUI displays sheet rows (message log)
- [ ] TUI displays active sessions
- [ ] Operator can send command to specific npub
- [ ] Operator can broadcast to all agents
- [ ] MKCTP agents receive operator commands
- [ ] MKCTP responses visible in operator outbox
Write a comment