(conn: string, marker: string)
| 370 | const session = mcp.session(identity); |
| 371 | |
| 372 | const invokeAndCapture = (conn: string, marker: string) => |
| 373 | Effect.gen(function* () { |
| 374 | const before = (yield* server.requests).length; |
| 375 | const result = yield* session.call("execute", { |
| 376 | // Return the whole result — the assertion only needs the echoed |
| 377 | // marker to prove the call reached the server. |
| 378 | code: `return JSON.stringify(await tools.${slug}.org.${conn}.whoami({ marker: ${JSON.stringify(marker)} }));`, |
| 379 | }); |
| 380 | expect(result.text, `the ${conn} invocation reached the server`).toContain( |
| 381 | `ok:${marker}`, |
| 382 | ); |
| 383 | return (yield* server.requests).slice(before); |
| 384 | }); |
| 385 | |
| 386 | const mixedRequests = yield* invokeAndCapture("mixed", "m1"); |
| 387 | expect( |
no test coverage detected