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

Function executeJson

e2e/scenarios/connect-handoff-session.test.ts:66–74  ·  view source on GitHub ↗
(session: McpSession, code: string)

Source from the content-addressed store, hash-verified

64/** Run `execute`, auto-approving a paused execution (policy elicitation)
65 * once, and parse the sandbox's JSON return value. */
66const executeJson = (session: McpSession, code: string) =>
67 Effect.gen(function* () {
68 let result = yield* session.call("execute", { code });
69 if (result.text.includes("executionId:")) {
70 result = yield* session.approvePaused(result.text);
71 }
72 expect(result.ok, `execute completed (got: ${result.text.slice(0, 400)})`).toBe(true);
73 return JSON.parse(result.text) as Record<string, unknown>;
74 });
75
76const mintEmulatorApiKey = (emulatorBase: string) =>
77 Effect.promise(async () => {

Callers 1

Calls 1

callMethod · 0.80

Tested by

no test coverage detected