MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / executeJson

Function executeJson

e2e/scenarios/no-auth-connection.test.ts:144–154  ·  view source on GitHub ↗
(session: McpSession, code: string)

Source from the content-addressed store, hash-verified

142/** Run `execute`, auto-approving any policy-paused execution, and parse the
143 * sandbox's JSON return value. */
144const 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
156scenario(
157 "Connections · an agent creates a no-auth connection over the core tool and the public API answers 200",

Callers 1

Calls 1

callMethod · 0.80

Tested by

no test coverage detected