(session: McpSession, code: string)
| 35 | |
| 36 | /** Run `execute` and parse the sandbox's JSON return value. */ |
| 37 | const executeJson = (session: McpSession, code: string) => |
| 38 | Effect.gen(function* () { |
| 39 | const result = yield* session.call("execute", { code }); |
| 40 | expect(result.ok, `execute completed (got: ${result.text.slice(0, 400)})`).toBe(true); |
| 41 | return JSON.parse(result.text) as Record<string, unknown>; |
| 42 | }); |
| 43 | |
| 44 | /** The `main` connection from a `connections.list` sandbox return value. */ |
| 45 | const mainConnection = (listed: Record<string, unknown>): Record<string, unknown> | undefined => { |
no test coverage detected