import { readAllState, readHudConfig } from './state.js'; import { readHudLeaderOwnerIdentity, type TmuxPaneSnapshot } from './tmux.js'; import { resolveOmxCliEntryPath } from '../utils/paths.js'; export declare const OMX_TMUX_HUD_OWNER_ENV = "OMX_TMUX_HUD_OWNER"; export type HudLayoutAssessment = { status: 'healthy'; reason: 'verified'; } | { status: 'repair_needed'; reason: 'missing_hud' | 'duplicate_hud' | 'stale_hud' | 'orphaned_hud' | 'misplaced_hud' | 'height_mismatch'; } | { status: 'unknown'; reason: 'invalid_identity' | 'incomplete_snapshot' | 'incomplete_geometry'; }; /** 只使用经过 tmux 快照校验的 pane 数据判断 HUD 布局。 */ export declare function assessOwnedHudLayout(panes: TmuxPaneSnapshot[], leaderPaneId: string, hudPaneId: string, sessionId: string, desiredHeight: number): HudLayoutAssessment; export interface ReconcileHudForPromptSubmitResult { status: 'skipped_not_tmux' | 'skipped_no_entry' | 'skipped_not_omx_owned_tmux' | 'skipped_no_session_id' | 'skipped_window_too_cramped' | 'skipped_stale_leader_pane' | 'unchanged' | 'resized' | 'recreated' | 'replaced_duplicates' | 'skipped_concurrent' | 'failed'; paneId: string | null; desiredHeight: number | null; duplicateCount: number; } export interface ReconcileHudForPromptSubmitDeps { env?: NodeJS.ProcessEnv; sessionId?: string; sessionIds?: string[]; listCurrentWindowPanes?: (currentPaneId?: string) => TmuxPaneSnapshot[]; createHudWatchPane?: (cwd: string, hudCmd: string, options?: { heightLines?: number; fullWidth?: boolean; targetPaneId?: string; }) => string | null; killTmuxPane?: (paneId: string) => boolean; resizeTmuxPane?: (paneId: string, heightLines: number) => boolean; readHudConfig?: typeof readHudConfig; readAllState?: typeof readAllState; resolveOmxCliEntryPath?: typeof resolveOmxCliEntryPath; registerHudResizeHook?: (hudPaneId: string, leaderPaneId: string | undefined, heightLines: number, options?: { cwd?: string; env?: NodeJS.ProcessEnv; }) => boolean; unregisterHudResizeHook?: (leaderPaneId: string | undefined) => boolean; readCurrentWindowSize?: (currentPaneId?: string) => { width: number | null; height: number | null; }; nowMs?: () => number; isProcessLive?: (pid: number) => boolean | null; readHudLeaderOwnerIdentity?: typeof readHudLeaderOwnerIdentity; } export declare function needsHudTopologyRecreate(pane: TmuxPaneSnapshot, leaderPane?: TmuxPaneSnapshot): boolean; export declare function reconcileHudForPromptSubmit(cwd: string, deps?: ReconcileHudForPromptSubmitDeps): Promise; //# sourceMappingURL=reconcile.d.ts.map