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