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

Function call

e2e/selfhost/oauth-refresh-cross-session.test.ts:229–241  ·  view source on GitHub ↗
(session: (typeof sessions)[number])

Source from the content-addressed store, hash-verified

227
228 const sessions = Array.from({ length: SESSIONS }, () => mcp.session(identity));
229 const call = (session: (typeof sessions)[number]) =>
230 Effect.gen(function* () {
231 let result = yield* session.call("execute", { code: invokeByAddressCode(address) });
232 let approvals = 0;
233 while (result.text.includes("executionId:") && approvals < 10) {
234 result = yield* session.approvePaused(result.text);
235 approvals += 1;
236 }
237 // Without a shared gate the loser redeems a retired refresh token
238 // and the authorization server answers invalid_grant, so this is
239 // the assertion that carries the user-visible failure.
240 expect(result.ok, `MCP execute completed: ${result.text.slice(0, 400)}`).toBe(true);
241 });
242
243 yield* Effect.all(sessions.map(call), { concurrency: "unbounded" });
244

Callers

nothing calls this directly

Calls 2

callMethod · 0.80
invokeByAddressCodeFunction · 0.70

Tested by

no test coverage detected