import type { RuntimeFaultClassification, RuntimeFaultRepairability } from "./faultClassifier.js";
export type RuntimeRepairPlanBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope" | "repair-plan";
export type RuntimeRepairPlanRisk = "low" | "medium" | "high";
export type RuntimeRepairPlanStepKind = "observe" | "restart-surface" | "reattach-module" | "fallback-adapter" | "escalate";
export type RuntimeRepairPlanErrorCode = "MISSING_RUNTIME_ID" | "MISSING_FAULT_CLASSIFICATION" | "FAULT_NOT_REPAIRABLE" | "REPAIR_SCOPE_DENIED" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type RuntimeRepairPlanGate = {
    accepted: boolean;
    reason?: string;
};
export type RuntimeRepairStep = {
    stepId: string;
    kind: RuntimeRepairPlanStepKind;
    summary: string;
    dryRunOnly: true;
    requiresApproval: boolean;
    rollbackPoint: string;
    expectedEvent: string;
};
export type RuntimeRepairPlan = {
    planId: string;
    runtimeId: string;
    faultId: string;
    category: RuntimeFaultClassification["category"];
    repairability: RuntimeFaultRepairability;
    risk: RuntimeRepairPlanRisk;
    steps: readonly RuntimeRepairStep[];
    rollbackPoints: readonly string[];
    approvalRequired: boolean;
    escalationRequired: boolean;
    audit: {
        dryRun: true;
        unsafeSideEffects: false;
        generatedBy: "runtime.selfRepair.repairPlanBuilder";
        contractChecked: true;
        governanceChecked: true;
    };
};
export type RuntimeRepairPlanBuilderRequest = {
    runtimeId?: string;
    classification?: RuntimeFaultClassification;
    allowedStepKinds?: readonly RuntimeRepairPlanStepKind[];
    runtimeReady?: boolean;
    contract?: RuntimeRepairPlanGate;
    governance?: RuntimeRepairPlanGate;
    planId?: string;
};
export type RuntimeRepairPlanBuilderError = {
    code: RuntimeRepairPlanErrorCode;
    message: string;
    boundary: RuntimeRepairPlanBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type RuntimeRepairPlanBuilderResult = {
    ok: true;
    plan: RuntimeRepairPlan;
    events: readonly string[];
} | {
    ok: false;
    error: RuntimeRepairPlanBuilderError;
    events: readonly string[];
};
export declare const runtimeRepairPlanBuilderDescriptor: {
    readonly surface: "runtime.selfRepair";
    readonly capability: "repairPlanBuilder";
    readonly purpose: "build dry-run self-repair plans with risk and rollback points";
    readonly unsafeSideEffects: false;
};
export declare function buildRuntimeRepairPlan(request?: RuntimeRepairPlanBuilderRequest): RuntimeRepairPlanBuilderResult;
