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

Function fakeAgent

packages/agent-core/test/tools/goal.test.ts:25–36  ·  view source on GitHub ↗
(opts: { type?: 'main' | 'sub'; goal?: GoalMode } = {})

Source from the content-addressed store, hash-verified

23}
24
25function fakeAgent(opts: { type?: 'main' | 'sub'; goal?: GoalMode } = {}): Agent {
26 const agent = {
27 type: opts.type ?? 'main',
28 records: { logRecord: () => {} },
29 emitEvent: () => {},
30 telemetry: { track: () => {} },
31 context: { appendSystemReminder: () => {} },
32 permission: { mode: 'manual' },
33 } as unknown as Agent;
34 (agent as { goal: GoalMode }).goal = opts.goal ?? new GoalMode(agent);
35 return agent;
36}
37
38function ctx<Input>(args: Input) {
39 return { turnId: '0', toolCallId: 'call_1', args, signal };

Callers 2

makeStoreFunction · 0.70
goal.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected