(
factory: (bearer: string, o?: { agentEmail?: string; scope?: string }) => McpClient,
)
| 363 | } |
| 364 | |
| 365 | async function startWithFactory( |
| 366 | factory: (bearer: string, o?: { agentEmail?: string; scope?: string }) => McpClient, |
| 367 | ) { |
| 368 | await close(); |
| 369 | const { close: c, port } = await startHttpServer(0, { |
| 370 | baseUrl: "http://e2a.local", |
| 371 | allowedHosts: ["127.0.0.1", "localhost"], |
| 372 | clientFactory: factory as never, |
| 373 | }); |
| 374 | close = c; |
| 375 | url = `http://127.0.0.1:${port}/mcp`; |
| 376 | } |
| 377 | |
| 378 | it("agent scope pins the credential-bound agent from whoami", async () => { |
| 379 | const probe = makeProbeClient({ scope: "agent", agentAddress: "solo@bot.example.com" }); |
no test coverage detected