import { FlowBase, httpInputSchema, httpOutputSchema, type FlowRunOptions, type ScopeEntry, type ServerRequest } from '../../common'; declare const plan: { readonly pre: ["traceRequest", "acquireQuota", "acquireSemaphore", "checkAuthorization", "router"]; readonly execute: ["handleWebFetch", "handleLegacySse", "handleSse", "handleStreamableHttp", "handleStatefulHttp", "handleStatelessHttp", "handleDeleteSession"]; readonly finalize: ["audit", "metrics", "releaseSemaphore", "releaseQuota", "finalize"]; readonly error: []; }; export declare const httpRequestStateSchema: import("@frontmcp/lazy-zod").ZodObject<{ decision: import("@frontmcp/lazy-zod").ZodObject<{ intent: import("@frontmcp/lazy-zod").ZodUnion, import("@frontmcp/lazy-zod").ZodLiteral<"sse">, import("@frontmcp/lazy-zod").ZodLiteral<"streamable-http">, import("@frontmcp/lazy-zod").ZodLiteral<"stateful-http">, import("@frontmcp/lazy-zod").ZodLiteral<"stateless-http">, import("@frontmcp/lazy-zod").ZodLiteral<"delete-session">, import("@frontmcp/lazy-zod").ZodLiteral<"unknown">]>; reasons: import("@frontmcp/lazy-zod").ZodArray; recommendation: import("@frontmcp/lazy-zod").ZodOptional>; debug: import("@frontmcp/lazy-zod").ZodOptional>; }, import("zod/v4/core").$strip>; intent: import("@frontmcp/lazy-zod").ZodUnion, import("@frontmcp/lazy-zod").ZodLiteral<"sse">, import("@frontmcp/lazy-zod").ZodLiteral<"streamable-http">, import("@frontmcp/lazy-zod").ZodLiteral<"stateful-http">, import("@frontmcp/lazy-zod").ZodLiteral<"stateless-http">, import("@frontmcp/lazy-zod").ZodLiteral<"delete-session">, import("@frontmcp/lazy-zod").ZodLiteral<"unknown">]>; verifyResult: import("@frontmcp/lazy-zod").ZodUnion; prmMetadataHeader: import("@frontmcp/lazy-zod").ZodString; }, import("zod/v4/core").$strip>, import("@frontmcp/lazy-zod").ZodObject<{ kind: import("@frontmcp/lazy-zod").ZodLiteral<"authorized">; authorization: import("@frontmcp/lazy-zod").ZodObject<{ token: import("@frontmcp/lazy-zod").ZodString; session: import("@frontmcp/lazy-zod").ZodOptional>; isPublic: import("@frontmcp/lazy-zod").ZodOptional; platformType: import("@frontmcp/lazy-zod").ZodOptional>; clientName: import("@frontmcp/lazy-zod").ZodOptional; clientVersion: import("@frontmcp/lazy-zod").ZodOptional; supportsElicitation: import("@frontmcp/lazy-zod").ZodOptional; skillsOnlyMode: import("@frontmcp/lazy-zod").ZodOptional; }, import("zod/v4/core").$strip>>; }, import("zod/v4/core").$strip>>; user: import("@frontmcp/lazy-zod").ZodObject<{ iss: import("@frontmcp/lazy-zod").ZodString; sid: import("@frontmcp/lazy-zod").ZodOptional; sub: import("@frontmcp/lazy-zod").ZodString; exp: import("@frontmcp/lazy-zod").ZodOptional; iat: import("@frontmcp/lazy-zod").ZodOptional; aud: import("@frontmcp/lazy-zod").ZodOptional]>>; email: import("@frontmcp/lazy-zod").ZodOptional; username: import("@frontmcp/lazy-zod").ZodOptional; preferred_username: import("@frontmcp/lazy-zod").ZodOptional; name: import("@frontmcp/lazy-zod").ZodOptional; picture: import("@frontmcp/lazy-zod").ZodOptional; }, import("zod/v4/core").$loose>; }, import("zod/v4/core").$strip>; }, import("zod/v4/core").$strip>, import("@frontmcp/lazy-zod").ZodObject<{ kind: import("@frontmcp/lazy-zod").ZodLiteral<"forbidden">; prmMetadataHeader: import("@frontmcp/lazy-zod").ZodString; }, import("zod/v4/core").$strip>]>; }, import("zod/v4/core").$strip>; declare const name: "http:request"; declare global { interface ExtendFlows { 'http:request': FlowRunOptions; } } export default class HttpRequestFlow extends FlowBase { logger: import("../../common").FrontMcpLogger; private requestStartTime; private requestId; static canActivate(request: ServerRequest, scope: ScopeEntry): boolean; traceRequest(): Promise; acquireQuota(): Promise; checkAuthorization(): Promise; /** * Build a live {@link OrchestratedAuthAccessorAdapter} for the verified request * and register it under {@link ORCHESTRATED_AUTH_ACCESSOR} so tools can read * upstream provider tokens via `this.orchestration.getToken(id)`. * * `session:verify` returns a lightweight authorization (`{ token, user, … }`) * rather than a full OrchestratedAuthorization, so we reconstruct one here from * the verified JWT + the primary auth's encrypted token store (the same store * the federated provider-callback flow wrote upstream tokens into, keyed by * `deriveAuthorizationId(token)`). No-op unless the scope is in orchestrated * mode with a token store and a non-empty bearer token — so public/transparent * and anonymous requests are unaffected. * * Security: tokens stay server-side and AES-GCM-encrypted at rest; only the * non-PII provider ids are read here to project the authorization. */ private bindOrchestrationAccessor; router(): Promise; /** * Web-fetch (V8-isolate) MCP execute stage. The worker carries its native Web * `Request` on the normalized `ServerRequest` under {@link * ServerRequestTokens.webRequest}; its presence is the web-mode signal. When * present, this stage runs the MCP request through the SDK's * `WebStandardStreamableHTTPServerTransport` (via {@link runWebStandardMcp}) * and responds with the resulting Web `Response` — so the worker runs the SAME * `http:request` flow (auth, quota, router, audit, metrics + hooks all apply) * and only the transport rendering differs per runtime. * * On the Node/Express path there is no `webRequest`, so this is a no-op and the * request falls through to the Node-`ServerResponse`-coupled handle stages. * Auth has already been enforced by `router` (a 401/403 short-circuits before * execute), and the verified authorization is read from the request token. */ handleWebFetch(): Promise; handleLegacySse(): Promise; handleSse(): Promise; handleStreamableHttp(): Promise; handleStatefulHttp(): Promise; handleStatelessHttp(): Promise; handleDeleteSession(): Promise; finalize(): Promise; /** * Log an error that occurred during request processing. * Called from stage handlers that catch errors. */ private logError; } export {}; //# sourceMappingURL=http.request.flow.d.ts.map