import type { Command } from 'commander';
import type { SessionMeta } from '../lib/session/types.js';
/** Agents whose sessions cannot be faithfully --resume'd (buildResumeCommand → null). */
type MigrateMode = 'resume' | 'rehydrate';
export declare function registerSessionsMigrateCommand(sessionsCmd: Command): void;
/**
 * Harness-parity gate (pure, testable). `buildResumeCommand` returns null for the
 * non-resumable agents (gemini, antigravity, openclaw, rush, hermes, grok, kimi,
 * droid) — for those a faithful --resume is impossible, so a requested `resume`
 * transparently becomes `rehydrate`. A resumable agent honors the request.
 * Returns the effective mode plus whether it was downgraded, so the caller can
 * print the notice.
 */
export declare function effectiveMode(source: SessionMeta, requested: MigrateMode): {
    mode: MigrateMode;
    downgraded: boolean;
};
/**
 * Pure. The remote shell commands that create the target's tmux session on the
 * SAME socket its reaper queries, and that probe its liveness afterward.
 *
 * `homeRelSocketPath` is `getDefaultSocketPath()` expressed relative to the
 * LOCAL home dir (`path.relative(os.homedir(), getDefaultSocketPath())`) — a
 * portable suffix, not a resolved absolute path, because the local and remote
 * HOME can differ (different user, different OS). It is spliced in after a
 * literal, unquoted `$HOME/` so the REMOTE shell resolves it; `$HOME` MUST
 * NEVER be resolved locally (see AGENTS.md's remote-path guidance).
 *
 * Extracted as a pure function so the "does the migrated session land on the
 * agents socket, not tmux's bare default socket" invariant is unit-testable
 * without an SSH round-trip (RUSH-2521 review — a bare `tmux` here made the
 * migrated agent's helpers invisible to `readAllPaneOwners`, so the reaper's
 * next tick killed the still-live, just-migrated agent as `tmux-session-gone`).
 */
export declare function buildMigrateResumeCommands(opts: {
    sessionName: string;
    homeRelSocketPath: string;
    inner: string;
    cwd?: string;
}): {
    launchCmd: string;
    probeCmd: string;
    socketFlag: string;
};
/**
 * Rehydrate command: launch a fresh agent that reads the transcript. For a
 * non-resumable agent there is no faithful --resume, so we start the agent with
 * a prompt pointing it at the imported transcript path.
 */
export declare function rehydrateCommand(source: SessionMeta): string[];
/**
 * `agents sessions migrations` — the border tracker: the append-only ledger of
 * every session handed off to/from another machine (RUSH-1977).
 */
export declare function registerSessionsMigrationsCommand(sessionsCmd: Command): void;
export {};
