An engine with a project open whose tool handler lists the static surface.
()
| 69 | |
| 70 | /** An engine with a project open whose tool handler lists the static surface. */ |
| 71 | function fakeEngine(): MCPEngine { |
| 72 | const handler = { |
| 73 | getTools: () => getStaticTools(), |
| 74 | execute: async () => ({ content: [{ type: 'text' as const, text: 'ok' }] }), |
| 75 | }; |
| 76 | return { |
| 77 | ensureInitialized: async () => { /* already open */ }, |
| 78 | hasDefaultCodeGraph: () => true, |
| 79 | getProjectPath: () => indexedDir, |
| 80 | retryInitializeSync: () => { /* nothing to retry */ }, |
| 81 | getToolHandler: () => handler, |
| 82 | } as unknown as MCPEngine; |
| 83 | } |
| 84 | |
| 85 | /** A session on `engine`, driven the way a transport drives it. */ |
| 86 | function connect(engine: MCPEngine) { |
no test coverage detected