| 16 | import { ToolErrorType } from './tool-error.js'; |
| 17 | |
| 18 | class TestToolInvocation implements ToolInvocation<object, ToolResult> { |
| 19 | constructor( |
| 20 | readonly params: object, |
| 21 | private readonly executeFn: () => Promise<ToolResult>, |
| 22 | ) {} |
| 23 | |
| 24 | getDescription(): string { |
| 25 | return 'A test invocation'; |
| 26 | } |
| 27 | |
| 28 | toolLocations() { |
| 29 | return []; |
| 30 | } |
| 31 | |
| 32 | shouldConfirmExecute(): Promise<false> { |
| 33 | return Promise.resolve(false); |
| 34 | } |
| 35 | |
| 36 | execute(): Promise<ToolResult> { |
| 37 | return this.executeFn(); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | class TestTool extends DeclarativeTool<object, ToolResult> { |
| 42 | private readonly buildFn: (params: object) => TestToolInvocation; |
nothing calls this directly
no outgoing calls
no test coverage detected