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

Function executeJson

e2e/cloud/connections-list-scope.test.ts:37–42  ·  view source on GitHub ↗
(session: McpSession, code: string)

Source from the content-addressed store, hash-verified

35
36/** Run `execute` and parse the sandbox's JSON return value. */
37const 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. */
45const mainConnection = (listed: Record<string, unknown>): Record<string, unknown> | undefined => {

Callers 1

Calls 1

callMethod · 0.80

Tested by

no test coverage detected