(session: McpSession, code: string)
| 142 | /** Run `execute`, auto-approving any policy-paused execution, and parse the |
| 143 | * sandbox's JSON return value. */ |
| 144 | const executeJson = (session: McpSession, code: string) => |
| 145 | Effect.gen(function* () { |
| 146 | let result = yield* session.call("execute", { code }); |
| 147 | let guard = 0; |
| 148 | while (result.text.includes("executionId:") && guard < 10) { |
| 149 | result = yield* session.approvePaused(result.text); |
| 150 | guard += 1; |
| 151 | } |
| 152 | expect(result.ok, `execute completed (got: ${result.text.slice(0, 400)})`).toBe(true); |
| 153 | return JSON.parse(result.text) as Record<string, unknown>; |
| 154 | }); |
| 155 | |
| 156 | scenario( |
| 157 | "Connections · an agent creates a no-auth connection over the core tool and the public API answers 200", |
no test coverage detected