import type { LineageNode, SessionEvent } from "@opengeni/sdk"; import type { EmbeddedSessionEventClientLike } from "../../client.js"; /** The lineage poll: the default, and while sub-sessions are active without live hints. */ export declare const LINEAGE_POLL_MS = 30000; export declare const LINEAGE_POLL_ACTIVE_WITHOUT_HINTS_MS = 15000; /** Whether a tree has a sub-session that is running or waiting on the person. */ export declare function treeNeedsWatching(nodes: readonly LineageNode[]): boolean; /** * How often to re-read the lineage. Live hints make a fast poll unnecessary; * without them (an embed authorized per session gets none) the poll speeds up * only while a sub-session is running or waiting. The tree comes from the * read this interval drives, so the page reports it through `observeTree`. */ export declare function useLineagePollInterval(workspaceId: string): { pollIntervalMs: number; observeTree: (nodes: readonly LineageNode[]) => void; }; /** * Re-read the lineage when a hint names a descendant (or, while one runs, a * session the read has not seen yet, which it may have just spawned), and * when this session's agent has answered or steered a sub-session. Waiting * items re-read their requests when the re-read tree shows their sub-session * moved on; the returned signal increments after an agent answer, so every * open item re-reads even if the tree read raced the answer. */ export declare function useDescendantRequestsRefresh(options: { client: EmbeddedSessionEventClientLike; workspaceId: string; sessionId: string; events: SessionEvent[]; /** The session's descendants (its lineage children), never the session itself. */ nodes: readonly LineageNode[]; refreshLineage: () => Promise; }): number;