import type { Database } from "bun:sqlite";
export interface EnvironmentSnapshotFile {
    path: string;
    sha256: string;
    size_bytes: number;
}
export interface EnvironmentSnapshotManifest extends EnvironmentSnapshotFile {
    redacted: Record<string, unknown>;
}
export interface EnvironmentSnapshot {
    schema_version: 1;
    id: string;
    captured_at: string;
    root: string;
    machine: {
        hostname: string;
        platform: string;
        arch: string;
    };
    target: {
        task_id: string | null;
        run_id: string | null;
        agent_id: string | null;
    };
    runtime: {
        bun: string | null;
        node: string;
        executable: string;
    };
    package_manager: {
        manager: "bun" | "npm" | "unknown";
        user_agent: string | null;
        manifests: EnvironmentSnapshotManifest[];
        lockfiles: EnvironmentSnapshotFile[];
    };
    git: {
        present: boolean;
        branch: string | null;
        commit: string | null;
        is_dirty: boolean;
        status_porcelain: string[];
        status_summary: {
            added: number;
            modified: number;
            deleted: number;
            renamed: number;
            untracked: number;
        };
    };
    config_hashes: EnvironmentSnapshotFile[];
    command_env: {
        command: string | null;
        env_keys: string[];
        env: Record<string, string> | null;
        redacted_keys: string[];
    };
    warnings: string[];
}
export interface CaptureEnvironmentSnapshotInput {
    root?: string;
    task_id?: string;
    run_id?: string;
    agent_id?: string;
    command?: string;
    env?: NodeJS.ProcessEnv;
    include_env_values?: boolean;
    now?: string | Date;
}
export interface RecordEnvironmentSnapshotInput extends CaptureEnvironmentSnapshotInput {
    output_path?: string;
    store_content?: boolean;
}
export interface RecordedEnvironmentSnapshot {
    snapshot: EnvironmentSnapshot;
    output_path: string;
    task_verification_id: string | null;
    run_artifact_id: string | null;
}
export interface EnvironmentSnapshotComparison {
    schema_version: 1;
    left_id: string;
    right_id: string;
    same_root: boolean;
    same_machine: boolean;
    same_runtime: boolean;
    same_git_commit: boolean;
    dirty_state_changed: boolean;
    changed_config_hashes: Array<{
        path: string;
        left_sha256: string | null;
        right_sha256: string | null;
    }>;
    changed_lockfiles: Array<{
        path: string;
        left_sha256: string | null;
        right_sha256: string | null;
    }>;
    changed_manifests: Array<{
        path: string;
        left_sha256: string | null;
        right_sha256: string | null;
    }>;
    warnings: string[];
}
export declare function captureEnvironmentSnapshot(input?: CaptureEnvironmentSnapshotInput): EnvironmentSnapshot;
export declare function writeEnvironmentSnapshot(snapshot: EnvironmentSnapshot, outputPath?: string): string;
export declare function readEnvironmentSnapshot(path: string): EnvironmentSnapshot;
export declare function recordEnvironmentSnapshot(input?: RecordEnvironmentSnapshotInput, db?: Database): RecordedEnvironmentSnapshot;
export declare function compareEnvironmentSnapshots(left: EnvironmentSnapshot, right: EnvironmentSnapshot): EnvironmentSnapshotComparison;
export declare function compareEnvironmentSnapshotFiles(leftPath: string, rightPath: string): EnvironmentSnapshotComparison;
//# sourceMappingURL=environment-snapshots.d.ts.map