import type { Region } from "../types.js"; import type { Clock } from "./abstractions.js"; export declare const CURSOR_CODEC_VERSION: 1; export declare const MAX_OPAQUE_CURSOR_LENGTH = 1000; export declare const DEFAULT_CURSOR_TTL_MS: number; export type CursorTool = "search" | "history"; export interface CursorEncodeInput { tool: CursorTool; region: Region; queryFingerprint: string; profileId?: string; offset: number; remoteCursor?: string; expiresAt?: Date | string | number; } export interface CursorDecodeContext { tool: CursorTool; region: Region; queryFingerprint: string; profileId?: string; } export interface DecodedCursor { version: typeof CURSOR_CODEC_VERSION; tool: CursorTool; region: Region; queryFingerprint: string; profileId?: string; offset: number; remoteCursor?: string; expiresAt: string; } export interface CursorCodec { encode(input: CursorEncodeInput): string; decode(cursor: string, expected: CursorDecodeContext): DecodedCursor; } export interface HmacCursorCodecOptions { key: string | Uint8Array; clock?: Clock; defaultTtlMs?: number; maxEncodedLength?: number; } export declare function canonicalCursorQueryFingerprint(value: unknown): string; export declare class HmacCursorCodec implements CursorCodec { #private; constructor(options: HmacCursorCodecOptions); encode(input: CursorEncodeInput): string; decode(cursor: string, expected: CursorDecodeContext): DecodedCursor; } export declare function createHmacCursorCodec(options: HmacCursorCodecOptions): CursorCodec; //# sourceMappingURL=cursor-codec.d.ts.map