refactor(HAI-093): extract AgentLogger abstraction and rewire agents

- Add AgentLogger class encapsulating log file management and structured logging
- Add comprehensive unit tests for AgentLogger
- Rewire executor, triage, and merger to use AgentLogger instead of inline logging
- Reduce duplication across agent modules
- Export AgentLogger from engine package index
This commit is contained in:
Dustin Byrne
2026-03-26 19:29:17 -04:00
parent eac1eda49a
commit 121b509686
8 changed files with 395 additions and 155 deletions

View File

@@ -242,7 +242,7 @@ describe("aiMergeTask — agent log persistence", () => {
await aiMergeTask(store, "/tmp/root", "HAI-050");
expect(store.appendAgentLog).toHaveBeenCalledWith("HAI-050", "Bash", "tool");
expect(store.appendAgentLog).toHaveBeenCalledWith("HAI-050", "Bash", "tool", "git status");
});
it("still fires onAgentText callback alongside logging", async () => {