feat(muse): harden choice watcher concurrency, add rules dictionary, resume pool, and session bind

This commit is contained in:
operator
2026-10-07 01:50:18 +00:00
parent 90f4ef661a
commit 094bd7d691
10 changed files with 2166 additions and 40 deletions
+7 -2
View File
@@ -954,7 +954,7 @@ def cmd_runtime(args):
print()
return
headers = ["SOCKET", "SESSION", "NODE", "PANE", "CMD",
"STATE", "APPROVE", "WATCHER"]
"STATE", "APPROVE", "MODE", "WATCHER"]
table = []
for r in rows:
state = r["state"]
@@ -964,15 +964,20 @@ def cmd_runtime(args):
if r["is_muse"]:
approve = (badge_ok("YES") if r["auto_approve"]
else badge_err("NO"))
mode = r.get("permission_mode") or "default"
if r.get("permission_bypass") and mode != "yolo":
mode += "!"
mode = mode[:14]
else:
approve = badge_dim("-")
mode = badge_dim("-")
watcher = (badge_ok("ALIVE %s" % r["watcher_pid"])
if r["watcher_alive"] else badge_dim("-"))
table.append([os.path.basename(r["socket"]),
"%s:%s" % (r["session"], r["window"]),
r["node"] or badge_dim("-"),
r["pane"], (r["cmd"] or "")[:26], state,
approve, watcher])
approve, mode, watcher])
print_table(headers, table)
print()