feat(cli): allow decnet status in agent mode

Agents run deckies locally and need to inspect their own state. Removed
`status` from MASTER_ONLY_COMMANDS so it survives the agent-mode gate.
Useful for validating remote updater pushes from the master.
This commit is contained in:
2026-04-19 18:29:41 -04:00
parent 43b92c7bd6
commit f91ba9a16e
2 changed files with 25 additions and 2 deletions

View File

@@ -1761,11 +1761,12 @@ def db_reset(
# Forgetting to register a new command is a role-boundary bug. Grep for
# MASTER_ONLY when touching command registration.
#
# Worker-legitimate commands (NOT in these sets): agent, updater, forwarder.
# Worker-legitimate commands (NOT in these sets): agent, updater, forwarder,
# status (agents run deckies locally and should be able to inspect them).
# ───────────────────────────────────────────────────────────────────────────
MASTER_ONLY_COMMANDS: frozenset[str] = frozenset({
"api", "swarmctl", "deploy", "redeploy", "teardown",
"probe", "collect", "mutate", "listener", "status",
"probe", "collect", "mutate", "listener",
"services", "distros", "correlate", "archetypes", "web",
"profiler", "sniffer", "db-reset",
})