(type: 'main' | 'sub')
| 344 | |
| 345 | describe('ToolManager goal tool registration', () => { |
| 346 | function loopToolNames(type: 'main' | 'sub'): readonly string[] { |
| 347 | const ctxAgent = testAgent({ |
| 348 | type, |
| 349 | }); |
| 350 | // configure() gives the agent a provider so builtin tools can initialize. |
| 351 | ctxAgent.configure({ tools: ['Read', 'CreateGoal', 'GetGoal', 'SetGoalBudget'] }); |
| 352 | // Re-run registration so the gate reads the scoped flag resolver state. |
| 353 | ctxAgent.agent.tools.initializeBuiltinTools(); |
| 354 | return ctxAgent.agent.tools.loopTools.map((tool) => tool.name); |
| 355 | } |
| 356 | |
| 357 | it('exposes goal tools to the main agent', () => { |
| 358 | const names = loopToolNames('main'); |
no test coverage detected