import type { RuntimeRepairPlan, RuntimeRepairPlanRisk, RuntimeRepairPlanStepKind } from "./repairPlanBuilder.js";
import type { RuntimeRepairSandboxRun } from "./repairSandboxRunner.js";
export type RuntimeRepairRollbackBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope" | "rollback";
export type RuntimeRepairRollbackStatus = "allow" | "deny" | "requires-approval";
export type RuntimeRepairRollbackTrigger = "sandbox-failed" | "repair-failed" | "operator-request" | "governance-request" | "test";
export type RuntimeRepairRollbackErrorCode = "MISSING_RUNTIME_ID" | "MISSING_REPAIR_PLAN" | "MISSING_ROLLBACK_POINT" | "ROLLBACK_POINT_NOT_FOUND" | "ROLLBACK_SCOPE_DENIED" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type RuntimeRepairRollbackGate = {
    accepted: boolean;
    reason?: string;
};
export type RuntimeRepairRollbackGuardRequest = {
    runtimeId?: string;
    plan?: RuntimeRepairPlan;
    rollbackPoint?: string;
    trigger?: RuntimeRepairRollbackTrigger;
    sandboxRun?: RuntimeRepairSandboxRun;
    allowedRollbackPoints?: readonly string[];
    approvedRollbackPoints?: readonly string[];
    runtimeReady?: boolean;
    contract?: RuntimeRepairRollbackGate;
    governance?: RuntimeRepairRollbackGate;
};
export type RuntimeRepairRollbackDecision = {
    status: RuntimeRepairRollbackStatus;
    runtimeId: string;
    planId: string;
    rollbackPoint: string;
    stepId?: string;
    stepKind?: RuntimeRepairPlanStepKind;
    risk: RuntimeRepairPlanRisk;
    trigger: RuntimeRepairRollbackTrigger;
    reason: string;
    rollbackPrepared: true;
    rollbackExecuted: false;
    audit: {
        dryRun: true;
        unsafeSideEffects: false;
        guard: "runtime.selfRepair.repairRollbackGuard";
        contractChecked: true;
        governanceChecked: true;
    };
};
export type RuntimeRepairRollbackError = {
    code: RuntimeRepairRollbackErrorCode;
    message: string;
    boundary: RuntimeRepairRollbackBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type RuntimeRepairRollbackGuardResult = {
    ok: true;
    decision: RuntimeRepairRollbackDecision;
    events: readonly string[];
} | {
    ok: false;
    error: RuntimeRepairRollbackError;
    events: readonly string[];
};
export declare const runtimeRepairRollbackGuardDescriptor: {
    readonly surface: "runtime.selfRepair";
    readonly capability: "repairRollbackGuard";
    readonly purpose: "guard rollback points and conditions without executing rollback operations";
    readonly unsafeSideEffects: false;
};
export declare function guardRepairRollback(request?: RuntimeRepairRollbackGuardRequest): RuntimeRepairRollbackGuardResult;
