(name, args)
| 37 | } |
| 38 | |
| 39 | async function rpc(name, args) { |
| 40 | const response = await json('/rpc', { jsonrpc: '2.0', id: ++rpcId, method: 'tools/call', params: { name, arguments: { ...args, format: 'json' } } }); |
| 41 | if (response.error || response.result?.isError) throw new Error(JSON.stringify(response)); |
| 42 | return JSON.parse(response.result.content[0].text); |
| 43 | } |
| 44 | |
| 45 | async function index(project) { |
| 46 | const begin = await json('/api/index', { root_path: FIXTURE, project_name: project }); |