import type { LapDescribeResponse } from '../../protocol.js'; /** * Per-MCP-session binding. Populated by `connect_session` and read by * every forwarded tool handler. Keyed by the SDK-assigned MCP session ID * (`mcp-session-id` response header / request header). */ export type McpSession = { /** Token record ID resolved at connect_session time. */ tid: string; /** Bearer token — used to construct synthetic LAP requests. */ token: string; /** * Cached app `description`, populated on connect (from the `/observe` * bundle) and on every `describe_app` / `observe` call. Backs the * shared executor's `DescribeCache` so `describe_app` serves from cache * and a mid-session schemaHash change is detected — parity with the * bridge, which has always cached. */ describe?: LapDescribeResponse | null; }; export declare class McpSessionMap { private readonly onBind; private map; /** * @param onBind Called when a session BINDS a token (`connect_session`), * i.e. the moment an MCP session acquires an identity. The router * uses it to apply its per-identity session cap at exactly that * instant: the binding happens inside a tool handler, whose result * is written to the response stream after `handleRequest` has already * returned, so nothing on the request path can observe it in time. * Not fired by `setDescribe`, which refreshes a cache, not a binding. */ constructor(onBind?: ((mcpSessionId: string, session: McpSession) => void) | null); set(mcpSessionId: string, session: McpSession): void; get(mcpSessionId: string): McpSession | null; setDescribe(mcpSessionId: string, describe: LapDescribeResponse): void; delete(mcpSessionId: string): void; } //# sourceMappingURL=session-map.d.ts.map