/** * A bounded lineage browser over one session's known ancestry and descendants. * @module dshline/sessions/lineage-overlay */ import type { SessionId } from '@deepseek-ai/dsh-session'; import type { TuiOverlay } from '../slots.ts'; import type { LineageState, SessionTarget } from './model.ts'; /** What the lineage browser needs from its owner. */ export interface LineageOverlaySpec { /** The selected session whose lineage this browser shows. */ readonly target: SessionId | undefined; /** The selected session's lineage read state. */ readonly lineage: (sessionId: SessionId) => LineageState; /** Ask the catalog for the lineage trace of the session this browser opens on. */ readonly requestLineage: (sessionId: SessionId) => void; /** User home for workspace shortening. */ readonly home: string | undefined; /** Current time, injected so ages and notices are assertable. */ readonly now: () => number; /** Ask the parent to select the session in its visible list. */ readonly focus: (sessionId: SessionId) => boolean; /** * Ask the Sessions browser to reopen a related session. * * OPTIONAL, and a surface that cannot reopen a session simply does not offer * it. The current-session hub opens this same panel to describe the session * the window is already driving, and it owns no way to switch agents — giving * it one here would hand a presentation panel a lifecycle authority. An absent * callback removes the key AND its footer promise together. * * When present, this panel NEVER resumes anything itself. It proposes the * identity the trace returned and hands it to the browser, which owns the one * resume policy — so a relationship row is answered by exactly the decision an * ordinary list row is, including every refusal. That is also why the panel * closes before calling this: a refusal is reported on the list the reader * returns to, with a notice they can read, exactly as a refused list selection * is. */ readonly reopen?: (target: SessionTarget) => void; /** Dismiss this overlay. */ readonly close: () => void; /** Redraw after a move or a landed read. */ readonly invalidate: () => void; } /** * Create a lineage browser for one session selected in the Sessions list. * @param spec - target lineage state, focus authority, and overlay controls. * @returns a temporary live-region overlay that never writes scrollback. */ export declare function createLineageOverlay(spec: LineageOverlaySpec): TuiOverlay; //# sourceMappingURL=lineage-overlay.d.ts.map