(opts: { type?: 'main' | 'sub'; goal?: GoalMode } = {})
| 23 | } |
| 24 | |
| 25 | function 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 | |
| 38 | function ctx<Input>(args: Input) { |
| 39 | return { turnId: '0', toolCallId: 'call_1', args, signal }; |
no outgoing calls
no test coverage detected