import type { RuntimeFaultClassification } from "./faultClassifier.js";
import type { RuntimeRepairPlan } from "./repairPlanBuilder.js";
export type RuntimeRepairEscalationBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope" | "escalation";
export type RuntimeRepairEscalationLevel = "operator-review" | "module-owner" | "governance-board";
export type RuntimeRepairEscalationReason = "approval-required" | "high-risk" | "not-repairable" | "repeated-failure" | "governance-rejected";
export type RuntimeRepairEscalationErrorCode = "MISSING_RUNTIME_ID" | "MISSING_FAULT_CLASSIFICATION" | "MISSING_ESCALATION_REASON" | "ESCALATION_SCOPE_DENIED" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type RuntimeRepairEscalationGate = {
    accepted: boolean;
    reason?: string;
};
export type RuntimeRepairEscalationCaller = {
    kind: "application" | "official-module" | "runtime-surface" | "operator";
    id: string;
    moduleId?: string;
};
export type RuntimeRepairEscalationRequest = {
    runtimeId?: string;
    classification?: RuntimeFaultClassification;
    plan?: RuntimeRepairPlan;
    reason?: RuntimeRepairEscalationReason;
    caller?: RuntimeRepairEscalationCaller;
    targetLevel?: RuntimeRepairEscalationLevel;
    allowedLevels?: readonly RuntimeRepairEscalationLevel[];
    runtimeReady?: boolean;
    contract?: RuntimeRepairEscalationGate;
    governance?: RuntimeRepairEscalationGate;
};
export type RuntimeRepairEscalationEnvelope = {
    escalationId: string;
    runtimeId: string;
    faultId: string;
    planId?: string;
    reason: RuntimeRepairEscalationReason;
    targetLevel: RuntimeRepairEscalationLevel;
    caller?: RuntimeRepairEscalationCaller;
    summary: string;
    recommendedAction: "manual-review" | "approve-plan" | "reject-and-observe" | "open-governance-case";
    audit: {
        dryRun: true;
        unsafeSideEffects: false;
        port: "runtime.selfRepair.repairEscalationPort";
        notificationSent: false;
        contractChecked: true;
        governanceChecked: true;
    };
};
export type RuntimeRepairEscalationError = {
    code: RuntimeRepairEscalationErrorCode;
    message: string;
    boundary: RuntimeRepairEscalationBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type RuntimeRepairEscalationResult = {
    ok: true;
    escalation: RuntimeRepairEscalationEnvelope;
    events: readonly string[];
} | {
    ok: false;
    error: RuntimeRepairEscalationError;
    events: readonly string[];
};
export declare const runtimeRepairEscalationPortDescriptor: {
    readonly surface: "runtime.selfRepair";
    readonly capability: "repairEscalationPort";
    readonly purpose: "expose public-safe self-repair escalation envelopes without sending notifications";
    readonly unsafeSideEffects: false;
};
export declare function createRepairEscalation(request?: RuntimeRepairEscalationRequest): RuntimeRepairEscalationResult;
