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:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user