()
| 522 | const sessionId = yield* Effect.promise(() => openSession(target.mcpUrl, bearer)); |
| 523 | |
| 524 | const openSse = () => |
| 525 | fetch(target.mcpUrl, { |
| 526 | method: "GET", |
| 527 | headers: { |
| 528 | accept: "text/event-stream", |
| 529 | authorization: `Bearer ${bearer}`, |
| 530 | "mcp-protocol-version": PROTOCOL_VERSION, |
| 531 | "mcp-session-id": sessionId, |
| 532 | }, |
| 533 | }); |
| 534 | |
| 535 | const first = yield* Effect.promise(openSse); |
| 536 | expect(first.status, "the standalone SSE stream opens").toBe(200); |