/** * The last view of a conversation a person left, so reopening it draws at once * and then revalidates behind it. * * - It lives in the client-scoped shared-query store and inherits its privacy * model: nothing is kept unless the host retains reads for that client * (`OpenGeniProvider retainReadsAcrossMounts`, or `useRetainedReads(client)`), * which hosts do only when every signed-in person gets their own client. * Releasing the retention (sign-out, account switch) drops it. It is held in * memory only; nothing is written to the device. * - Each read hook writes its last authoritative value when it leaves a * conversation and shows the retained value only until its own first read * for that conversation lands. Every open still reads every resource once; * the retained view only removes the wait before the first paint. * - A read that says the person may no longer see the conversation (401, * 403, 404), or that the retained value no longer exists (a cleared goal), * drops what was kept at once. * - Retained event windows together stay within one open conversation's * window budget; the least recently left conversation goes first. */ export type SessionViewPart = "events" | "detail" | "queue" | "human-input" | "goal" | "lineage"; /** The value a hook left for this conversation, if the host retains reads. */ export declare function peekSessionView(client: object, workspaceId: string, sessionId: string, part: SessionViewPart): T | null; /** A read failure that means the retained view must not be shown again. */ export declare function deniesRetainedView(error: unknown): boolean; /** * Show what this hook left for the conversation until `current` (its own * authoritative value) exists, and leave `current` behind when the hook moves * to another conversation or unmounts. Returns the retained value, or null. * `discard` (a denied read, or an authoritative "there is none") drops the * retained value now and keeps nothing for this conversation. */ export declare function useRetainedSessionView(client: object, workspaceId: string, sessionId: string | null | undefined, part: SessionViewPart, current: T | null, options: { enabled: boolean; bytes?: ((value: T) => number) | undefined; budgetBytes?: number | undefined; discard?: boolean | undefined; }): T | null;