import { archiveCodexDesktopThread } from "./archive-codex-desktop-thread.js"; import { codexDesktopRecovery } from "./codex-desktop-recovery.js"; import { importCodexDesktopThread } from "./import-codex-desktop-thread.js"; import { launchDesktopUrl } from "./launch-desktop-url.js"; import { provenanceContext } from "./provenance-context.js"; declare const removeCodexDesktopSource: (path: string) => Promise>; declare const writeCodexDesktopSession: (payload: { readonly takeoverId: string; readonly canonicalDigest: string; readonly destinationSessionId: string; readonly messages: readonly { role: "user" | "assistant"; content: string; }[]; readonly provenance: Parameters[0]; }, workspace: string, options?: { readonly binary?: string; readonly importThread?: typeof importCodexDesktopThread; readonly launchUrl?: typeof launchDesktopUrl; readonly recovery?: typeof codexDesktopRecovery; readonly archiveThread?: typeof archiveCodexDesktopThread; readonly removeSource?: typeof removeCodexDesktopSource; }) => { probe: () => Promise>; stage: () => Promise<{ readonly ok: false; readonly error: import("../../../_utils/cli-error.js").CliError; } | { readonly ok: true; readonly value: { recoveryCommand: string; path: string; }; }>; parse: (staged: { path: string; }) => Promise<{ readonly ok: false; readonly error: import("../../../_utils/cli-error.js").CliError; } | { readonly ok: true; readonly value: { role: "user" | "assistant"; content: string; }[]; }>; install: (staged: { path: string; }) => Promise<{ readonly ok: false; readonly error: import("../../../_utils/cli-error.js").CliError; } | { readonly ok: true; readonly value: { destinationSessionId: string; recoveryCommand: string; }; }>; recover: () => Promise<{ readonly ok: false; readonly error: import("../../../_utils/cli-error.js").CliError; } | { readonly ok: true; readonly value: null; } | { readonly ok: true; readonly value: { destinationSessionId: string; recoveryCommand: string; }; }>; settleRecovery: (destinationSessionId: string) => Promise<{ readonly ok: true; readonly value: undefined; } | { readonly ok: false; readonly error: import("../../../_utils/cli-error.js").CliError; }>; rollback: (installed: { destinationSessionId?: string; }) => Promise>; launch: (installed: { destinationSessionId?: string; }) => Promise>; cleanup: (staged: { path: string; }) => Promise; }; export { writeCodexDesktopSession };