export declare const FLEET_SHARED_REPO_SYNC_DEADLINE_MS = 45000;
export declare const FLEET_SHARED_REPO_KILL_GRACE_MS = 250;
export interface BoundedProcessResult {
    code: number | null;
    stdout: string;
    stderr: string;
    timedOut: boolean;
}
export interface FleetSharedRepoSyncOptions {
    userAgentsDir?: string;
    device?: string;
    timeoutMs?: number;
    /** Test-only redirection for the untracked cross-process lock target. */
    lockPath?: string;
}
export interface FleetSharedRepoSyncResult {
    success: boolean;
    committed: boolean;
    pushed: boolean;
    commit: string | null;
    timedOut: boolean;
    skipped: string | null;
    error: string | null;
    /**
     * Untracked working-tree files that collided with origin and were dropped
     * (byte-identical to origin) before rebasing. See clearCollidingUntracked.
     */
    untrackedCleared?: number;
    /**
     * Untracked working-tree files that collided with origin, differed from it,
     * and were moved to untrackedBackupDir before rebasing.
     */
    untrackedBackedUp?: string[];
    /** Directory the differing untracked collisions were moved to, if any. */
    untrackedBackupDir?: string;
}
/** Run one real process asynchronously with a hard wall-clock/process-tree bound. */
export declare function runBoundedProcess(command: string, args: string[], options: {
    cwd: string;
    timeoutMs: number;
    env?: NodeJS.ProcessEnv;
}): Promise<BoundedProcessResult>;
/**
 * Commit/pull/push this device's shared state under one cross-process lock.
 * Callers publish their local fields first and consume peer fields only after
 * this resolves successfully.
 */
export declare function syncFleetSharedStateRepo(options?: FleetSharedRepoSyncOptions): Promise<FleetSharedRepoSyncResult>;
