MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / loopToolNames

Function loopToolNames

packages/agent-core/test/tools/goal.test.ts:346–355  ·  view source on GitHub ↗
(type: 'main' | 'sub')

Source from the content-addressed store, hash-verified

344
345describe('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');

Callers 1

goal.test.tsFile · 0.85

Calls 3

testAgentFunction · 0.90
configureMethod · 0.65

Tested by

no test coverage detected