agentd top needs a functional refresh. Current regressions:
1) It does not show running persistent agents (only scans oneshot run directories).
2) Startup is slow (scales with historical run count; currently performs one docker ps call per run directory).
3) On exit, terminal cursor can remain hidden.
Desired behavior:
Implementation should keep costs low (summary generation rate-limited and cached), and avoid polling patterns that scale with total historical runs.
Implemented refresh of agentd top in Omni/Agentd.hs.
What changed:
top --workspace from CLI surface (per request). agentd top now only supports --all./var/log/agentd/<run>/events.jsonl)Daemon.listPersistentAgents)docker ps -f name=<run> per run directorydocker ps --format {{.Names}} per refresh and intersects with run IDsOmni.Agents.Summarize (haiku model)finally cleanupVerification:
typecheck.sh Omni/Agentd.hslint Omni/Agentd.hsbild --test Omni/Agentd.hsagentd top --help now shows only [-a|--all].Adjusted top status footer to use fixed-width single-char refresh indicator to avoid horizontal jitter. Changed from 'refreshing/steady' to 'sync=R' (refreshing) and 'sync=.' (steady). Verified with typecheck.sh Omni/Agentd.hs.
Diagnosis from current code:
Proposed implementation plan: 1) Replace top data loading with a unified snapshot that merges oneshot + persistent running agents. 2) Fix top argument wiring so top --workspace is honored. 3) Eliminate per-run docker calls: query running containers once per refresh and intersect with run IDs. 4) Make refresh non-blocking (background worker + BChan updates); render immediately with loading state. 5) Add activity summary pipeline:
6) Add agent kind (oneshot/persistent) so Enter/l and k route correctly (logs and stop behavior). 7) Harden terminal teardown: explicit Vty lifecycle and finally block that always re-enables cursor. 8) Add tests for merge/filter logic + summary cache invalidation + mode-sensitive actions.