| 91 | const { cookieHeader } = yield* Effect.promise(() => signInSession(baseUrl, SELFHOST_ADMIN)); |
| 92 | |
| 93 | const initialize = async (): Promise<Response> => |
| 94 | fetch(mcpUrl, { |
| 95 | method: "POST", |
| 96 | headers: { |
| 97 | cookie: cookieHeader, |
| 98 | "content-type": "application/json", |
| 99 | accept: "application/json, text/event-stream", |
| 100 | }, |
| 101 | body: JSON.stringify({ |
| 102 | jsonrpc: "2.0", |
| 103 | id: 1, |
| 104 | method: "initialize", |
| 105 | params: { |
| 106 | protocolVersion: "2025-06-18", |
| 107 | capabilities: {}, |
| 108 | clientInfo: { name: "idle-ttl-e2e", version: "1" }, |
| 109 | }, |
| 110 | }), |
| 111 | }); |
| 112 | |
| 113 | const listTools = async (sessionId: string, id: number): Promise<Response> => |
| 114 | fetch(mcpUrl, { |