| 44 | // add-account modal must render a paste-a-token flow derived from the spec's |
| 45 | // bare `http`/`bearer` security scheme. |
| 46 | const addSpecCode = (slug: string, specUrl: string) => ` |
| 47 | const added = await tools.executor.openapi.addSpec({ |
| 48 | spec: { kind: "url", url: ${JSON.stringify(specUrl)} }, |
| 49 | slug: ${JSON.stringify(slug)}, |
| 50 | }); |
| 51 | return added.ok ? { ok: true, slug: added.data.slug, toolCount: added.data.toolCount } : { ok: false, error: added.error }; |
| 52 | `; |
| 53 | |
| 54 | const createHandoffCode = (slug: string) => ` |
| 55 | const handoff = await tools.executor.coreTools.connections.createHandoff({ |