feat: unified fleet CLI, Main Chat preservation policy, sidechat routing, and file transfers
- Added CHAT_POLICY.md and README.md banner enforcing sidechat-first and file-transfer-first rules. - Added strict Main Chat block to super dm send and super dm wo with --allow-main-chat override. - Implemented file transfer staging and metadata registry in super dm send-file and super dm files (with clean subcommand). - Added full job lifecycle management (show, create, enable, disable, delete, run --follow) to super-cli.py and box-ctl.py. - Audited all jobs in jobs/*.json and redirected automated dispatches away from Main Chat. - Hardened chromebox-watchdog.sh with systemd user session environment exports and stale singleton cleanup. - Added compose_check command choice to muse-chat-api.py.
This commit is contained in:
+57
-10
@@ -853,6 +853,7 @@ def act_loop_remediate(dry_run=False):
|
||||
from gravity import remediate_breaks
|
||||
res = remediate_breaks(dry_run=dry_run)
|
||||
audit("loop-remediate", f"dry_run={dry_run}")
|
||||
res.pop("ok", None)
|
||||
out(True, **res)
|
||||
except Exception as e:
|
||||
fail("LOOP_ERROR", str(e))
|
||||
@@ -886,18 +887,21 @@ variable actions:
|
||||
vars-get <name>
|
||||
vars-set <name> <value>
|
||||
vars-reset <name>
|
||||
vars-history [name] [limit]
|
||||
vars-rollback <name> [revision]
|
||||
|
||||
strategy actions:
|
||||
strat-list
|
||||
strat-get <type> [subtype]
|
||||
strat-get <type> [subtype] [--agent AGENT]
|
||||
strat-set <type> (JSON on stdin or as arg)
|
||||
strat-reset <type> [subtype]
|
||||
strat-reset <type> [subtype] [--agent AGENT]
|
||||
|
||||
loop actions:
|
||||
loop-status [--agent AGENT] [--limit N] [--status STATUS]
|
||||
loop-health [--threshold T]
|
||||
loop-breaks
|
||||
loop-resolve <dm_id> [note]
|
||||
loop-remediate [--dry-run]
|
||||
|
||||
notify:
|
||||
notify <agent> <message>"""
|
||||
@@ -962,23 +966,63 @@ def main(argv):
|
||||
if len(rest) != 1:
|
||||
fail("BAD_NAME", "usage: vars-reset <name>")
|
||||
act_vars_reset(rest[0])
|
||||
elif action == "vars-history":
|
||||
name = None
|
||||
limit = 20
|
||||
if rest:
|
||||
name = rest[0]
|
||||
if len(rest) > 1:
|
||||
try:
|
||||
limit = int(rest[1])
|
||||
except ValueError:
|
||||
limit = 20
|
||||
act_vars_history(name=name, limit=limit)
|
||||
elif action == "vars-rollback":
|
||||
if len(rest) < 1 or len(rest) > 2:
|
||||
fail("BAD_NAME", "usage: vars-rollback <name> [revision]")
|
||||
rev = rest[1] if len(rest) > 1 else None
|
||||
act_vars_rollback(rest[0], revision=rev)
|
||||
elif action == "strat-list":
|
||||
act_strat_list()
|
||||
elif action == "strat-get":
|
||||
if len(rest) < 1 or len(rest) > 2:
|
||||
fail("BAD_NAME", "usage: strat-get <type> [subtype]")
|
||||
sub = rest[1] if len(rest) > 1 else None
|
||||
act_strat_get(rest[0], sub)
|
||||
if not rest:
|
||||
fail("BAD_NAME", "usage: strat-get <type> [subtype] [--agent AGENT]")
|
||||
itype = rest[0]
|
||||
subtype = None
|
||||
agent = None
|
||||
idx = 1
|
||||
while idx < len(rest):
|
||||
if rest[idx] == "--agent" and idx + 1 < len(rest):
|
||||
agent = rest[idx + 1]
|
||||
idx += 2
|
||||
elif subtype is None and not rest[idx].startswith("--"):
|
||||
subtype = rest[idx]
|
||||
idx += 1
|
||||
else:
|
||||
idx += 1
|
||||
act_strat_get(itype, subtype=subtype, agent=agent)
|
||||
elif action == "strat-set":
|
||||
if len(rest) < 1:
|
||||
fail("BAD_NAME", "usage: strat-set <type> [JSON]")
|
||||
payload = rest[1] if len(rest) > 1 else None
|
||||
act_strat_set(rest[0], payload)
|
||||
elif action == "strat-reset":
|
||||
if len(rest) < 1 or len(rest) > 2:
|
||||
fail("BAD_NAME", "usage: strat-reset <type> [subtype]")
|
||||
sub = rest[1] if len(rest) > 1 else None
|
||||
act_strat_reset(rest[0], sub)
|
||||
if not rest:
|
||||
fail("BAD_NAME", "usage: strat-reset <type> [subtype] [--agent AGENT]")
|
||||
itype = rest[0]
|
||||
subtype = None
|
||||
agent = None
|
||||
idx = 1
|
||||
while idx < len(rest):
|
||||
if rest[idx] == "--agent" and idx + 1 < len(rest):
|
||||
agent = rest[idx + 1]
|
||||
idx += 2
|
||||
elif subtype is None and not rest[idx].startswith("--"):
|
||||
subtype = rest[idx]
|
||||
idx += 1
|
||||
else:
|
||||
idx += 1
|
||||
act_strat_reset(itype, subtype=subtype, agent=agent)
|
||||
elif action == "loop-status":
|
||||
agent = None
|
||||
limit = 20
|
||||
@@ -1007,6 +1051,9 @@ def main(argv):
|
||||
fail("BAD_NAME", "usage: loop-resolve <dm_id> [note]")
|
||||
note = rest[1] if len(rest) > 1 else None
|
||||
act_loop_resolve(rest[0], note=note)
|
||||
elif action == "loop-remediate":
|
||||
dry = "--dry-run" in rest
|
||||
act_loop_remediate(dry_run=dry)
|
||||
elif action == "notify":
|
||||
if len(rest) != 2:
|
||||
fail("BAD_NAME", "usage: notify <agent> <message>")
|
||||
|
||||
Reference in New Issue
Block a user