import type { SessionEvent } from "@opengeni/sdk"; /** The optional attention mutation a host client may expose (the SDK client does). */ export type SessionAttentionClientLike = { updateSessionAttention?(workspaceId: string, sessionId: string, request: { unread?: boolean; acknowledgedThroughSequence?: number; }): Promise; }; export type UseSessionReadAcknowledgementInput = { client: SessionAttentionClientLike; workspaceId: string; /** `null` while the host is still creating the session: nothing to acknowledge. */ sessionId: string | null; /** The session row as last read. A row for another session is ignored. */ session: { id?: string | undefined; unread?: boolean | undefined; lastSequence?: number | undefined; } | null | undefined; /** The conversation's delivered events (the shared feed). */ events: readonly SessionEvent[]; /** * True only while the person can actually see the conversation: on the web * its timeline is on screen, the page is visible and the window focused; on * a phone the screen is focused and the app in the foreground. */ active: boolean; }; /** Delay before the single retry of a transient failure. */ export declare const SESSION_READ_ACKNOWLEDGEMENT_RETRY_MS = 1000; /** * Mark an open conversation read while the person is looking at it. Reading a * session never acknowledges it on the server; without this every reply stays * unread, and attention signals built on it (unread dots, pushes, webhooks a * host turns into notifications) fire even while the person watches the reply. * * It acknowledges through the latest delivered attention boundary (a completed * reply, question, approval or failure), never per streaming flush, and sends * `acknowledgedThroughSequence`, so a request that arrives late can never * consume a newer reply. One transient failure is retried once; after that the * frontier is released and the next foreground change retries it, so a failing * server never becomes a request loop. A permanent rejection (4xx) stops * acknowledgement for that session until the component remounts. */ export declare function useSessionReadAcknowledgement(input: UseSessionReadAcknowledgementInput): void;