(name: string, props: Record<string, string> = {}, required: string[] = [])
| 22 | |
| 23 | const snap = (tools: SnapshotTool[]): ToolsSnapshot => ({ schemaVersion: '1', tools }); |
| 24 | const tool = (name: string, props: Record<string, string> = {}, required: string[] = []): SnapshotTool => ({ |
| 25 | name, |
| 26 | inputSchema: { |
| 27 | type: 'object', |
| 28 | properties: Object.fromEntries(Object.entries(props).map(([k, t]) => [k, { type: t }])), |
| 29 | required, |
| 30 | }, |
| 31 | }); |
| 32 | |
| 33 | test('identical snapshots => not breaking', () => { |
| 34 | const a = snap([tool('find_explores', { q: 'string' }), tool('run_query', { sql: 'string' })]); |
no outgoing calls
no test coverage detected