import type { CliId } from '../adapters/cli/types.js'; import { type ListedPane } from './zellij-session-discovery.js'; export { cliIdFromCommArgv } from './session-discovery.js'; export interface ZellijAdoptableSession { zellijSession: string; zellijPaneId: string; cliPid: number; cliId: CliId; sessionId?: string; cwd: string; startedAt?: number; paneCols: number; paneRows: number; } /** * The pane set used for the positional pane↔pid alignment: every terminal pane * that has a LIVE process behind it, sorted by pane id (= creation order). * * This must mirror exactly what `paneShellChildren` counts on the process side, * or the count guard refuses the whole session. Two states used to break that * invariant (both reproduced live — the "/adopt finds nothing" bug): * - FLOATING terminal panes have a pane shell like any tiled pane, so they * MUST be included (they were filtered out, leaving an extra child). * - EXITED held panes (`zellij run` command finished, pane kept for re-run) * have NO process left, so they must be excluded (they added a terminal * with no matching child). * Floating panes are also perfectly adoptable — every drive/dump action takes * an explicit --pane-id — so they stay in the results too. */ export declare function alignmentPanes(listed: ListedPane[]): ListedPane[]; /** * Scan all live zellij sessions for adoptable CLIs. Skips bmx-* (botmux's own). * @param filterCliId only return sessions matching this CLI type. * @param filterExecutable for a custom Codex runtime, require this executable's basename exactly. */ export declare function discoverAdoptableZellijSessions(filterCliId?: CliId, filterExecutable?: string): ZellijAdoptableSession[]; /** Re-confirm a zellij pane still runs the expected CLI pid (pre-adopt guard). * `filterCliId` MUST mirror discovery's filter: a generic-named `agent` (Cursor) * is only recognized as a CLI under the 'cursor' filter, so without it the * expected pid is never re-identified and a live session looks exited. */ export declare function validateZellijAdoptTarget(session: string, paneId: string, expectedPid: number, filterCliId?: CliId, filterExecutable?: string): boolean; //# sourceMappingURL=zellij-adopt-discovery.d.ts.map