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

Function requestFor

apps/cloud/src/mcp/agent-handler.test.ts:32–45  ·  view source on GitHub ↗
(method: "GET" | "POST", sessionId: string, authenticated = true)

Source from the content-addressed store, hash-verified

30});
31
32const requestFor = (method: "GET" | "POST", sessionId: string, authenticated = true): Request =>
33 new Request("https://executor.test/mcp", {
34 method,
35 headers: {
36 ...(authenticated ? { authorization: "Bearer test" } : {}),
37 "mcp-session-id": sessionId,
38 ...(method === "POST" ? { "content-type": "application/json" } : {}),
39 },
40 ...(method === "POST"
41 ? {
42 body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list", params: {} }),
43 }
44 : {}),
45 });
46
47const makeHarness = (owner: "not_found" | "terminated" = "not_found") => {
48 const ownerChecks = { count: 0 };

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected