()
| 25 | } |
| 26 | |
| 27 | function createTool(): Tool { |
| 28 | return { |
| 29 | name: 'FakeTool', |
| 30 | inputSchema: z.object({}), |
| 31 | outputSchema: z.unknown(), |
| 32 | description: async () => 'fake', |
| 33 | isEnabled: () => true, |
| 34 | isConcurrencySafe: () => false, |
| 35 | isReadOnly: () => false, |
| 36 | isDestructive: () => false, |
| 37 | userFacingName: () => 'FakeTool', |
| 38 | checkPermissions: async input => ({ |
| 39 | behavior: 'allow', |
| 40 | updatedInput: input, |
| 41 | }), |
| 42 | toAutoClassifierInput: () => '', |
| 43 | call: async () => ({ |
| 44 | data: 'ok', |
| 45 | }), |
| 46 | mapToolResultToToolResultBlockParam: (data, toolUseId) => ({ |
| 47 | type: 'tool_result', |
| 48 | tool_use_id: toolUseId, |
| 49 | content: String(data), |
| 50 | }), |
| 51 | } as unknown as Tool |
| 52 | } |
| 53 | |
| 54 | function createToolUseContext( |
| 55 | tool: Tool, |
no outgoing calls
no test coverage detected