import { type SessionEvent } from "@opengeni/contracts"; import { type Database } from "./database.js"; type ListSessionEventPageOptions = import("./index.js").ListSessionEventPageOptions; type SessionEventPage = import("./index.js").SessionEventPage; export type SessionEventSliceOptions = ListSessionEventPageOptions & { /** Exact call filters applied before loading value slices. */ toolName?: string; callId?: string; sourceSequence?: number; sourceOffset?: number; view?: "conversation" | "results" | "tools"; includeArguments?: boolean; includeOutput?: boolean; legacyUtf16?: boolean; }; export type SessionEventSlice = { offset: number; total: number; unit: "codepoint" | "utf16"; text: string; omitted: boolean; }; export type SessionEventSlicePage = SessionEventPage & { slices?: Record; }; type SliceIdentity = Pick; /** Internal search projection, NOT authorization. The scanner has selected this * exact identity under its subject RLS/list filters and still holds that same * transaction and tenancy/membership fences. Reuse them rather than creating * two nested scopes and rediscovering the identity for every scalar window. * The scalar query still checks the exact workspace/session/event and RLS. * Keep the codec/window implementation shared with the conversation reader. */ export declare function readSessionMessageSliceInScope(db: Database, workspaceId: string, sessionId: string, identity: SliceIdentity, offset: number, windows?: number): Promise; /** Bounded transfer over retained scalar truth. JSONB extraction/detoasting still * costs PostgreSQL work proportional to the individual source value, not history. * This is a read projection, not authorization: the MCP caller must authorize the * target on every request. Both metadata and scalar reads retain workspace RLS. */ export declare function listSessionEventSlices(db: Database, workspaceId: string, sessionId: string, options: SessionEventSliceOptions, legacyRead?: (options: ListSessionEventPageOptions) => Promise): Promise; export {};