import { type ServerRequest } from '../interfaces'; import { type LegacyProtocolFlags } from '../types'; export declare const intentSchema: 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">]>; export declare const decisionSchema: 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>; export type HttpRequestIntent = 'legacy-sse' | 'sse' | 'streamable-http' | 'stateful-http' | 'stateless-http' | 'delete-session'; export type Intent = HttpRequestIntent | 'unknown'; export type Decision = { intent: Intent; reasons: string[]; recommendation?: { httpStatus: number; message: string; }; debug?: { key: number; channel: number; flags: number; }; }; /** * Configuration for request intent decision. * Extends LegacyProtocolFlags with additional runtime option. */ export interface Config extends LegacyProtocolFlags { tolerateMissingAccept: boolean; } export declare function decideIntent(req: ServerRequest, cfg: Config): Decision; /** * Authorization decision for an HTTP `DELETE` session-termination request. * * SECURITY: session termination must be authenticated AND scoped to the * caller's OWN session. An unauthenticated caller — or an authenticated caller * naming a session id that `session:verify` did not bind to their token — must * be refused, otherwise anyone who learns a session id can terminate it * (cross-session DoS). Kept pure so it is unit-testable without booting a scope. */ export type SessionTerminationDecision = { kind: 'unauthorized'; } | { kind: 'forbidden'; } | { kind: 'ok'; sessionId: string; }; export declare function authorizeSessionTermination(verifyResult: { kind?: string; authorization?: { session?: { id?: string; }; }; } | undefined, requestedSessionId: string | undefined): SessionTerminationDecision; //# sourceMappingURL=decide-request-intent.utils.d.ts.map