export interface RequestIdentity { /** The bearer the caller presented. Never read from disk, never cached. */ apiKey: string; /** For log correlation. Not sent upstream. */ requestId?: string; /** * The calling platform (lovable, bolt, replit, base44, …), from Origin. * Sent upstream as x-mcp-client so retention can be split per platform — * detectIde() cannot do this in a container, where there is no editor env. */ platform?: string; } /** Run `fn` with this request's identity bound to the async context. */ export declare function withRequestIdentity(id: RequestIdentity, fn: () => Promise): Promise; /** * The identity of the in-flight request, or undefined outside one. * * `undefined` is the normal case for stdio and CI — it is how those keep their * existing behaviour rather than a failure. */ export declare function currentIdentity(): RequestIdentity | undefined; /** * True when this process is the hosted transport. * * Gates the device flow. `withSignIn` calls writeCredentials on success, and * on a shared server that write IS the leak — one user's browser sign-in * would become every user's credential. A hosted caller presents a key the * platform already holds; it never completes a browser flow on our box. */ export declare function isHosted(): boolean;