import type { SessionEvent, WorkspaceArtifactCurrentResponse, WorkspaceArtifactDetailResponse } from "@opengeni/sdk"; /** How often an open Site view checks for versions published elsewhere. */ export declare const SITE_VERSION_POLL_MS = 5000; type SiteDetailClient = { getWorkspaceArtifact: (workspaceId: string, artifactId: string, options?: { signal?: AbortSignal; }) => Promise; /** The cheap check; without it (or on a server without it) each check reads the history. */ getWorkspaceArtifactCurrent?: (workspaceId: string, artifactId: string, options?: { signal?: AbortSignal; }) => Promise; }; export type SiteLiveVersion = { /** The Site as last read; null until the first read succeeds. */ detail: WorkspaceArtifactDetailResponse | null; /** The first read failed; nothing is known about the Site yet. */ failed: boolean; /** Whether checks for new versions are working (`reconnecting` after one failed). */ watch: "live" | "reconnecting"; /** Check now, for example after a publish or a restore. Overlapping asks share one read. */ check: () => void; /** Read again from the start after the first read failed. */ retry: () => void; }; /** * The Site's current version, kept current while its Site view is open: * checked when asked (a publish or restore from beside it), every few seconds * while the page is visible (versions published from anywhere else), and * when the page comes back into view or the network returns. A check reads * only the Site and its current version; the history is read again only when * that changed. A Site that is gone (deleted, or no longer shared) stops the * timed checks; coming back to the page checks once more. */ export declare function useSiteLiveVersion(client: SiteDetailClient, workspaceId: string, siteId: string): SiteLiveVersion; /** * Whether an event in the Site's conversation may have changed the Site: a * tool call returning (publishing, restoring, or a shell command that did * either) or the turn ending. Cheaper to check than to parse tool output. */ export declare function siteMayHaveChanged(event: Pick): boolean; export {};