(session: McpSession, code: string)
| 129 | /** Run `execute`, auto-approving any policy-paused execution, and parse the |
| 130 | * sandbox's JSON return value. */ |
| 131 | const executeJson = (session: McpSession, code: string) => |
| 132 | Effect.gen(function* () { |
| 133 | let result = yield* session.call("execute", { code }); |
| 134 | let guard = 0; |
| 135 | while (result.text.includes("executionId:") && guard < 10) { |
| 136 | result = yield* session.approvePaused(result.text); |
| 137 | guard += 1; |
| 138 | } |
| 139 | expect(result.ok, `execute completed (got: ${result.text.slice(0, 400)})`).toBe(true); |
| 140 | return JSON.parse(result.text) as Record<string, unknown>; |
| 141 | }); |
| 142 | |
| 143 | scenario( |
| 144 | "Connections · an agent creates a no-auth connection over the core tool and the public API answers 200", |
no test coverage detected