import type { SessionMeta } from '../lib/session/types.js';
export declare const RESUME_SOURCE_ENV = "AGENTS_RESUME_SOURCE_JSON";
/**
 * The source a dead-remote local fallback resumes from: the same session, but
 * with `machine` rewritten to THIS box so the delegated `agents run --resume`
 * resolves recovery locally (`sessionRecoveryPeer` returns undefined) instead of
 * bouncing back to the unreachable owner. Because no local version home owns the
 * peer's transcript, that local recovery lands on a labelled `/continue` replay
 * from the synced mirror — the only way to continue a session whose owning device
 * is gone. Owner-approved prefer-device, fall-back-local (PHNX-3626).
 *
 * Safe against the RUSH-2022 "silent local resume forks live state" hazard by
 * PRECONDITION: this is reached only after `runOnPeer` proved the owner
 * unreachable, so there is no live process on the peer to fork, and the fallback
 * is announced with a log line — never silent.
 */
export declare function resumeLocalFallbackSource(session: SessionMeta, self?: string): SessionMeta;
export interface StrictResumeOptions {
    mode?: string;
    interactive?: boolean;
    headless?: boolean;
    cwd?: string;
    quiet?: boolean;
    /** Run on THIS machine even when the session belongs to a peer (escape hatch). */
    here?: boolean;
}
/**
 * The argv to re-run this resume on the machine that owns the session.
 *
 * Deliberately carries no "don't route again" FLAG — that rides the
 * {@link RESUME_PINNED_ENV} export instead, so the hop also works against a peer
 * on an older CLI (see the constant's docs). Every argv token here exists in the
 * released surface.
 */
export declare function buildResumeRemoteArgs(sessionId: string, prompt: string | undefined, options: StrictResumeOptions): string[];
/** Translate `agents sessions resume <id>` to the canonical `agents run` surface after
 * resolving the source identity. The run command remains the only executor. */
export declare function buildResumeRunArgs(session: {
    id: string;
    agent: string;
    version?: string;
}, prompt: string | undefined, options: StrictResumeOptions): string[];
/** Recreate a remote Claude launch whose forced id never materialized a transcript. */
export declare function buildProvisionalRunArgs(session: {
    id: string;
    agent: string;
    version?: string;
    cwd?: string;
}, prompt: string | undefined, options: StrictResumeOptions): string[];
/** True when the caller asked for the strict resume path (prompt and/or flags). */
export declare function wantsStrictResume(prompt: string | undefined, options: StrictResumeOptions): boolean;
/**
 * Strict single-session resume: resolve id/label across the fleet, hop to the
 * owning device when needed, then delegate to `agents run --resume`.
 */
export declare function runStrictResume(sessionId: string, prompt: string | undefined, options: StrictResumeOptions): Promise<void>;
