import type { ExtensionUIContext, HostSessionPickerHandle, HostSessionPickerRequest, HostSessionPickerRow } from "../../../core/extensions/ui-types.js"; import type { SessionInfo } from "../../../core/session-manager.ts"; /** The subset of the host UI surface the picker mount needs. */ export type HostSessionPickerUi = Pick; /** Deserialize a JSON-safe picker row back into a selector `SessionInfo`. */ export declare function sessionInfoFromPickerRow(row: HostSessionPickerRow): SessionInfo; /** * Owner callbacks for a mounted host session picker. `onSelect`/`onCancel` * settle the mount (at most one of them fires, exactly once); `onDelete` may * fire many times and never mutates rows — the owner replies through * `setRows`/`showError`. */ export interface HostSessionPickerMountDelegate { onSelect(path: string): void; onCancel(): void; onDelete(path: string): void; } /** Owner-side control surface for a mounted host session picker. */ export interface HostSessionPickerMount { /** Replace the rows; selection/search state is preserved by the selector. */ setRows(rows: SessionInfo[]): void; /** Surface a transient error in the picker header. */ showError(message: string): void; /** Unmount without emitting `onCancel` (the owner already settled). */ close(): void; } /** * Mount a REAL `SessionSelectorComponent` on the host UI (inline, replacing * the editor like the built-in `/resume` picker). Navigation, search, and * repaints are entirely host-local; the owner only observes semantic events * through the delegate. Deletion is owner-owned: a confirmed Ctrl+D forwards * `onDelete` and the row stays until the owner calls `setRows`/`showError`. * * Shared by the interactive-engine host controller (owner = engine child over * the picker protocol) and the in-process `ctx.ui.hostSessionPicker` * capability (owner = the extension itself, zero IPC). */ export declare function mountHostSessionPicker(ui: HostSessionPickerUi, initialRows: SessionInfo[], showRenameHint: boolean, delegate: HostSessionPickerMountDelegate): HostSessionPickerMount; /** * In-process implementation of `ctx.ui.hostSessionPicker` for hosts where * extensions already run in the terminal process (non-isolated interactive * mode): the selector mounts directly with no IPC, exposing the exact same * capability API the isolated engine child sees, so callers never branch. */ export declare function openLocalHostSessionPicker(ui: HostSessionPickerUi, request: HostSessionPickerRequest): HostSessionPickerHandle; //# sourceMappingURL=host-session-picker.d.ts.map