(cwd: string)
| 7 | import type { ToolContext } from '../src/tools/base.js'; |
| 8 | |
| 9 | function makeCtx(cwd: string): ToolContext { |
| 10 | return { |
| 11 | cwd, |
| 12 | sessionId: 'test', |
| 13 | transaction: {} as any, |
| 14 | permissions: { check: () => ({ ok: true }) } as any, |
| 15 | askUser: async () => 'allow', |
| 16 | signal: new AbortController().signal, |
| 17 | emit: () => {}, |
| 18 | } as ToolContext; |
| 19 | } |
| 20 | |
| 21 | describe('scaffoldMcpServer', () => { |
| 22 | let tmp: string; |