import { type SpawnSyncReturns } from "node:child_process"; import type { Log } from "@intentic/local-agent"; import { type Pairing } from "./config.js"; export declare const sessionName: (sandboxId: string) => string; export declare const backupSessionName: (sandboxId: string) => string; export declare const syncSessionNames: (sandboxId: string) => readonly string[]; export declare const forwardSessionName: (sandboxId: string, port: number) => string; export declare const parseForwardNames: (listed: string, sandboxId?: string) => string[]; export declare const parseOrphanForwardNames: (listed: string, keptSandboxIds: readonly string[]) => string[]; export declare const parseOrphanSyncNames: (listed: string, keep: readonly string[]) => string[]; export declare const ourForwardSessions: (mutagen: string, sandboxId?: string) => string[]; export declare const mutagenForwardArgs: (args: { readonly name: string; readonly port: number; readonly alias: string; readonly host: string; }) => string[]; export interface SyncSessionSpec { readonly name: string; readonly localDir: string; readonly alias: string; readonly remoteDir: string; readonly mode: "two-way-safe" | "one-way-replica"; readonly ignores: readonly string[]; readonly from: "local" | "sandbox"; } export declare const mutagenCreateArgs: (spec: SyncSessionSpec, paused: boolean) => string[]; interface LiveSession { readonly alpha: { readonly host?: string; readonly path?: string; }; readonly beta: { readonly host?: string; readonly path?: string; }; readonly ignore: { readonly paths?: readonly string[]; readonly vcs?: boolean; }; readonly paused?: boolean; readonly status?: string; readonly conflicts?: readonly unknown[]; } export declare const readSessionState: (mutagen: string, name: string) => { exists: boolean; status?: string | undefined; paused?: boolean | undefined; conflicts?: number | undefined; }; export declare const existingSyncSessions: (mutagen: string, names: readonly string[]) => string[]; export declare const pauseUnreachableSync: (mutagen: string, pairing: Pairing) => boolean; export declare const resumeAutoPausedSync: (mutagen: string, pairing: Pairing) => boolean; export declare const sessionMatchesSpec: (session: LiveSession, spec: SyncSessionSpec) => boolean; export declare const ensureSyncSession: (mutagen: string, pairing: Pairing, log: Log) => Promise; export declare const retireOrphanSessions: (mutagen: string, pairings: readonly Pairing[], log: Log) => void; export declare const osToken: () => "linux" | "darwin" | "windows"; export declare const exe: string; export declare const archToken: () => "amd64" | "arm64"; export declare const download: (url: string, dest: string) => Promise; export declare const ensureMutagen: () => Promise; export declare const runMutagenAsync: (mutagen: string, args: readonly string[], log: Log) => Promise; export declare const runMutagen: (mutagen: string, args: string[]) => SpawnSyncReturns; export {}; //# sourceMappingURL=mutagen.d.ts.map