agentd: split oversized modules by concern

t-805·WorkTask·
·
·
Created3 days ago·Updated3 days ago·pipeline runs →

Dependencies

Description

Edit

Refactor oversized agentd modules.

Problem: Omni/Agentd.hs and Omni/Agentd/Daemon.hs are both very large, increasing maintenance risk and merge conflicts.

Scope:

  • Split by concern (CLI parsing/commands, persistent lifecycle, logs/watch, top UI, shared parsing/utils).
  • Keep behavior unchanged.

Acceptance:

  • Main modules are substantially smaller and delegate to focused submodules.
  • Existing tests pass unchanged.

Git Commits

20a2dd4drefactor(agentd): split view and log/session helpers
Coder Agent3 days ago5 files

Timeline (4)

🔄[human]Open → InProgress3 days ago
💬[human]3 days ago

Split oversized agentd modules by concern. Extracted persistent watch/activity event parsing + rendering from Omni/Agentd.hs into Omni/Agentd/PersistentView.hs, and extracted shared session JSON parsing and log filtering from Omni/Agentd/Daemon.hs into Omni/Agentd/SessionJson.hs and Omni/Agentd/LogFilter.hs. Kept Daemon/CLI APIs stable by re-exporting/bridging existing LogFilterOptions/defaultLogFilterOptions/streamAgentLogs behavior through the new modules. Line counts now: Omni/Agentd.hs 3771 -> 3442, Omni/Agentd/Daemon.hs 2917 (post-t804 baseline) -> 2775. Verified with typecheck.sh on all touched modules, lint on touched modules, bild --test Omni/Agentd/Daemon.hs, and bild --test Omni/Agentd.hs. Commit: 20a2dd4d

🔄[human]InProgress → Review3 days ago