import type { Session } from '../types';
type AnyRecord = Record<string, unknown>;
/**
 * Extract a session id from the `X-Buttress-Sess-Id` request header.
 * Query-param fallback is intentionally not supported: session ids would
 * otherwise show up in proxy access logs and browser history, and there is
 * no transport in our supported clients that can't set custom headers.
 */
export declare const extractSessionIdFromRequest: (headers: Record<string, string | undefined> | undefined) => string | null;
/**
 * Elysia `beforeHandle` guard for HTTP routes that operate on a buttress
 * session (file upload/download). Verifies:
 *
 *   1. A session id is supplied via the `X-Buttress-Sess-Id` header.
 *   2. The session exists in the in-memory map (i.e. `init` has been issued
 *      over WS for this client).
 *   3. When the server is bound to a workspace, the request's access token
 *      identity matches the identity recorded on the session — preventing
 *      one device in a workspace from acting on another device's session.
 *
 * Handlers can re-extract the resolved session via `resolveGuardedSession`.
 */
export declare const buttressSessionGuard: any;
/**
 * Re-resolve the session that `buttressSessionGuard` validated. Returns null
 * only if called outside the guard's protection (programming error). Handlers
 * should treat null as 500 / unreachable.
 */
export declare const resolveGuardedSession: (store: AnyRecord, headers: Record<string, string | undefined>) => {
    sessionId: string;
    session: Session;
} | null;
export {};
