(slug: string)
| 356 | // The agent-visible surface: catalog entry + schema view (the same |
| 357 | // data `tools.search()` / `tools.describe.tool()` serve the sandbox). |
| 358 | const snapshotFor = (slug: string) => |
| 359 | Effect.gen(function* () { |
| 360 | const tools = yield* apiClient.tools.list({ |
| 361 | query: { integration: IntegrationSlug.make(slug) }, |
| 362 | }); |
| 363 | return yield* Effect.forEach( |
| 364 | [...tools].sort((a, b) => a.name.localeCompare(b.name)), |
| 365 | (tool) => |
| 366 | Effect.gen(function* () { |
| 367 | const schema = yield* apiClient.tools.schema({ |
| 368 | query: { address: tool.address }, |
| 369 | }); |
| 370 | return { |
| 371 | name: tool.name, |
| 372 | address: String(tool.address), |
| 373 | listDescription: tool.description, |
| 374 | schemaDescription: schema.description, |
| 375 | inputTypeScript: schema.inputTypeScript, |
| 376 | outputTypeScript: schema.outputTypeScript, |
| 377 | typeScriptDefinitions: schema.typeScriptDefinitions, |
| 378 | inputSchema: schema.inputSchema, |
| 379 | } satisfies ToolSnapshot; |
| 380 | }), |
| 381 | ); |
| 382 | }); |
| 383 | |
| 384 | const openapiTools = yield* snapshotFor(openapiSlug); |
| 385 | const graphqlTools = yield* snapshotFor(graphqlSlug); |
no test coverage detected