import type { DoctorMemoryRepairPreviewAction } from "./inventory.js";
import type { DoctorMemoryRepairExecutionResponse } from "./repair-execution-request-contract.js";
import type { DoctorMemoryRepairFsSafetyDecision } from "./repair-executor-fs-safety-contract.js";
import type { DoctorMemoryRepairExecutionLockRecord } from "./repair-executor-lock-contract.js";
export type DoctorMemoryRepairExecutionResultSchemaVersion = 1;
export type DoctorMemoryRepairExecutionResultStatus = "success" | "failure" | "partial-write";
export type DoctorMemoryRepairExecutionResultStage = "backup" | "write" | "audit" | "rollback";
export type DoctorMemoryRepairExecutionResultStepStatus = "succeeded" | "failed" | "skipped";
export type DoctorMemoryRepairExecutionRollbackStatus = "not-needed" | "completed" | "failed" | "manual-required" | "not-attempted";
export type DoctorMemoryRepairExecutionResultStep = {
    proposalId: string;
    action: DoctorMemoryRepairPreviewAction;
    stage: DoctorMemoryRepairExecutionResultStage;
    status: DoctorMemoryRepairExecutionResultStepStatus;
    targetPath?: string;
    snapshotPath?: string;
    message?: string;
    errorCode?: string;
};
export type DoctorMemoryRepairExecutionResultRecord = {
    schemaVersion: DoctorMemoryRepairExecutionResultSchemaVersion;
    kind: "doctor.memory.repair.execution.result";
    dryRun: true;
    noWritePerformed: true;
    contractOnly: true;
    executionId: string;
    agentId: string;
    workspaceKey: string;
    createdAt: string;
    finishedAt: string;
    status: DoctorMemoryRepairExecutionResultStatus;
    writeState: "none" | "complete" | "partial";
    previewFingerprint: string;
    auditPlanFingerprint: string;
    lockAcquiredAt: string;
    selectedProposalIds: string[];
    transcriptAccess: "none";
    bodyAccess: "none";
    summary: {
        selected: number;
        backupSucceeded: number;
        writeSucceeded: number;
        failed: number;
        skipped: number;
    };
    rollback: {
        required: boolean;
        status: DoctorMemoryRepairExecutionRollbackStatus;
        reasons: string[];
    };
    steps: DoctorMemoryRepairExecutionResultStep[];
    reasons: string[];
};
export type DoctorMemoryRepairExecutionResultInput = {
    response: DoctorMemoryRepairExecutionResponse;
    lock: DoctorMemoryRepairExecutionLockRecord;
    fsSafety: DoctorMemoryRepairFsSafetyDecision;
    finishedAt: string;
    steps: DoctorMemoryRepairExecutionResultStep[];
    rollback?: {
        status: DoctorMemoryRepairExecutionRollbackStatus;
        reasons?: string[];
    };
};
export type DoctorMemoryRepairExecutionResultDecision = {
    ok: boolean;
    record?: DoctorMemoryRepairExecutionResultRecord;
    fingerprint?: string;
    reasons: string[];
};
export declare function createMemoryRepairExecutionResultContract(input: DoctorMemoryRepairExecutionResultInput): DoctorMemoryRepairExecutionResultDecision;
export declare function createMemoryRepairExecutionResultFingerprint(record: DoctorMemoryRepairExecutionResultRecord): string;
