(sessionId: string | null, body: unknown)
| 253 | // follow-up back to the same isolate, so the tool list comes through. |
| 254 | const accept = "application/json, text/event-stream"; |
| 255 | const rpc = (sessionId: string | null, body: unknown) => |
| 256 | worker.fetch("/mcp", { |
| 257 | method: "POST", |
| 258 | headers: { |
| 259 | "content-type": "application/json", |
| 260 | accept, |
| 261 | ...(sessionId ? { "mcp-session-id": sessionId } : {}), |
| 262 | }, |
| 263 | body: JSON.stringify(body), |
| 264 | }); |
| 265 | |
| 266 | const init = await rpc(null, { |
| 267 | jsonrpc: "2.0", |
no test coverage detected