fix(call-omo-agent): address cubic review findings and add requirement-based tests

- Fix agent-resolver.ts: add defensive validation on agent name (typeof, trim, filter)
- Fix tools.test.ts: correct mock to return {data: agents} matching SDK contract
- Fix agent-config-handler.ts: include opencode global/project agents in customAgentSummaries
- Add agent-resolver.test.ts: 14 requirement-based tests covering R1-R7 behavioral specs
- Add tools-edge-cases.test.ts: 5 integration tests for rollback, whitespace, dedup, session_id
This commit is contained in:
Brandon Webb
2026-03-26 10:31:57 -04:00
committed by YeonGyu-Kim
parent 76c5356a80
commit da91c53536
5 changed files with 465 additions and 6 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ function createMockCtx(agents: Array<{ name: string; mode?: string }> = []): Plu
return {
client: {
app: {
agents: mock(() => Promise.resolve(agents)),
agents: mock(() => Promise.resolve({ data: agents })),
},
},
directory: "/test",