(sessionId: string | null, body: unknown)
| 197 | // follow-up back to the same isolate, so the tool list comes through. |
| 198 | const accept = "application/json, text/event-stream"; |
| 199 | const rpc = (sessionId: string | null, body: unknown) => |
| 200 | worker.fetch("/mcp", { |
| 201 | method: "POST", |
| 202 | headers: { |
| 203 | "content-type": "application/json", |
| 204 | accept, |
| 205 | ...(sessionId ? { "mcp-session-id": sessionId } : {}), |
| 206 | }, |
| 207 | body: JSON.stringify(body), |
| 208 | }); |
| 209 | |
| 210 | const init = await rpc(null, { |
| 211 | jsonrpc: "2.0", |
no test coverage detected