(cwd: string)
| 9 | import { ToolRegistry } from '../src/tools/registry.js'; |
| 10 | |
| 11 | function makeCtx(cwd: string): ToolContext { |
| 12 | return { |
| 13 | cwd, |
| 14 | sessionId: 'test', |
| 15 | transaction: {} as any, |
| 16 | permissions: { evaluate: () => 'allow' } as any, |
| 17 | askUser: async () => 'allow', |
| 18 | signal: new AbortController().signal, |
| 19 | emit: () => {}, |
| 20 | } as ToolContext; |
| 21 | } |
| 22 | |
| 23 | describe('runProcess helper', () => { |
| 24 | it('runs a present binary and captures stdout', async () => { |