import type { DoctorMemoryRepairExecutionScope, DoctorMemoryRepairExecutionSurface } from "./repair-execution-policy.js";
import type { DoctorMemoryRepairExecutionResponse } from "./repair-execution-request-contract.js";
export type DoctorMemoryRepairExecutionLockSchemaVersion = 1;
export type DoctorMemoryRepairExecutionLockStatus = "active" | "completed" | "failed" | "abandoned";
export type DoctorMemoryRepairExecutionLockRecord = {
    schemaVersion: DoctorMemoryRepairExecutionLockSchemaVersion;
    kind: "doctor.memory.repair.execution.lock";
    dryRun: true;
    noWritePerformed: true;
    agentId: string;
    workspaceKey: string;
    executionId: string;
    previewFingerprint: string;
    auditPlanFingerprint: string;
    selectedProposalIds: string[];
    surface: DoctorMemoryRepairExecutionSurface;
    operatorScope: DoctorMemoryRepairExecutionScope;
    status: DoctorMemoryRepairExecutionLockStatus;
    acquiredAt: string;
    expiresAt: string;
    finishedAt?: string;
};
export type DoctorMemoryRepairExecutionLockAdmissionInput = {
    response: DoctorMemoryRepairExecutionResponse;
    now: string;
    ttlMs: number;
    existingLocks?: DoctorMemoryRepairExecutionLockRecord[];
    workspaceKey?: string;
};
export type DoctorMemoryRepairExecutionLockAdmissionDecision = {
    ok: boolean;
    canAcquire: boolean;
    idempotent: boolean;
    status: "admitted" | "idempotent-active" | "idempotent-completed" | "denied";
    workspaceKey?: string;
    record?: DoctorMemoryRepairExecutionLockRecord;
    reasons: string[];
};
export declare function evaluateMemoryRepairExecutionLockAdmission(input: DoctorMemoryRepairExecutionLockAdmissionInput): DoctorMemoryRepairExecutionLockAdmissionDecision;
export declare function createMemoryRepairWorkspaceKey(response: DoctorMemoryRepairExecutionResponse): string;
