The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(cli): /review shows its reviewer in the live-work dock
Tekniume609cbc58aa2
diff --git a/hermes_cli/gateway_setting_commands.py b/hermes_cli/gateway_setting_commands.pyindex 6e3d32fcf33..490fa277f5d 100644--- a/hermes_cli/gateway_setting_commands.py+++ b/hermes_cli/gateway_setting_commands.py@@ -19,8 +19,16 @@ def _mirror_busy(cli, arg):cli.busy_input_mode = arg.lower()+def _watch_reviewer(cli, _arg):+ """/review spawns its reviewer off-turn: have the live-work dock poll for it right away."""+ from hermes_cli.gateway_tools import process_view+ view = process_view()+ if view is not None:+ view.watch_subagents()++GATEWAY_SETTINGS = {"personality": None, "busy": _mirror_busy, "approvals": None, "footer": None, "fast": None,- "refine": None, "review": None}+ "refine": None, "review": _watch_reviewer}def run(cli, canonical, cmd):@@ -47,3 +55,4 @@ def run(cli, canonical, cmd):if mirror is not None:mirror(cli, arg)return True+diff --git a/hermes_cli/gateway_tools.py b/hermes_cli/gateway_tools.pyindex 8fc88b9ef6e..16d8002c36d 100644--- a/hermes_cli/gateway_tools.py+++ b/hermes_cli/gateway_tools.py@@ -56,6 +56,7 @@ class GatewayProcessView:self._subagents_seen = 0.0self._subagents_lock = threading.Lock()self._tail = None+ self._subagents_watch_until = 0.0@propertydef session_id(self):@@ -134,11 +135,19 @@ class GatewayProcessView:return value if isinstance(value, int) else 0# -- the subagent registry main's Ctrl+T monitor and dock read ---------------------------+ def watch_subagents(self, seconds=_RETAIN_SECONDS):+ """Poll ``subagent.list`` for a while even with no turn running: an off-turn spawn+ (``/review``) moves neither ``busy`` nor the usage count the gate below reads."""+ self._subagents_watch_until = time.time() + seconds+ self._subagents_polled = 0.0+def subagent_rows(self, *, busy):"""The session's live children (``subagent.list``). Asks at most once a second, and only- while a turn runs (``busy``), children were listed last time, or the gateway counts some."""+ while a turn runs (``busy``), children were listed last time, the gateway counts some, or+ an off-turn spawn asked to be watched."""now = time.time()- wanted = busy or self.subagents or self.active_delegations()+ wanted = (busy or self.subagents or now < self._subagents_watch_until+ or self.active_delegations())if wanted and now - self._subagents_polled >= _POLL_SECONDS and self._subagents_lock.acquire(blocking=False):try:self._subagents_polled = now