import type { RuntimeRepairActionDecision } from "./repairActionGate.js";
import type { RuntimeRepairPlan, RuntimeRepairPlanStepKind } from "./repairPlanBuilder.js";
export type RuntimeRepairSandboxBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope" | "sandbox";
export type RuntimeRepairSandboxIsolation = "memory" | "process" | "container" | "mock";
export type RuntimeRepairSandboxStatus = "passed" | "blocked";
export type RuntimeRepairSandboxErrorCode = "MISSING_RUNTIME_ID" | "MISSING_REPAIR_PLAN" | "MISSING_REPAIR_STEP" | "REPAIR_STEP_NOT_FOUND" | "REPAIR_NOT_ALLOWED" | "SANDBOX_SCOPE_DENIED" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type RuntimeRepairSandboxGate = {
    accepted: boolean;
    reason?: string;
};
export type RuntimeRepairSandboxEnvelope = {
    sandboxId?: string;
    isolation?: RuntimeRepairSandboxIsolation;
    allowedStepKinds?: readonly RuntimeRepairPlanStepKind[];
    expectedSignals?: readonly string[];
    metadata?: Readonly<Record<string, unknown>>;
};
export type RuntimeRepairSandboxRequest = {
    runtimeId?: string;
    plan?: RuntimeRepairPlan;
    stepId?: string;
    gateDecision?: RuntimeRepairActionDecision;
    sandbox?: RuntimeRepairSandboxEnvelope;
    runtimeReady?: boolean;
    contract?: RuntimeRepairSandboxGate;
    governance?: RuntimeRepairSandboxGate;
};
export type RuntimeRepairSandboxRun = {
    runId: string;
    runtimeId: string;
    planId: string;
    stepId: string;
    stepKind: RuntimeRepairPlanStepKind;
    sandboxId: string;
    isolation: RuntimeRepairSandboxIsolation;
    status: RuntimeRepairSandboxStatus;
    expectedEvent: string;
    observedSignals: readonly string[];
    rollbackPoint: string;
    metadata: Readonly<Record<string, unknown>>;
    audit: {
        dryRun: true;
        unsafeSideEffects: false;
        runner: "runtime.selfRepair.repairSandboxRunner";
        isolated: true;
        executedRealAction: false;
        contractChecked: true;
        governanceChecked: true;
    };
};
export type RuntimeRepairSandboxError = {
    code: RuntimeRepairSandboxErrorCode;
    message: string;
    boundary: RuntimeRepairSandboxBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type RuntimeRepairSandboxResult = {
    ok: true;
    run: RuntimeRepairSandboxRun;
    events: readonly string[];
} | {
    ok: false;
    error: RuntimeRepairSandboxError;
    events: readonly string[];
};
export declare const runtimeRepairSandboxRunnerDescriptor: {
    readonly surface: "runtime.selfRepair";
    readonly capability: "repairSandboxRunner";
    readonly purpose: "simulate self-repair steps inside an injected dry-run sandbox envelope";
    readonly unsafeSideEffects: false;
};
export declare function runRepairSandbox(request?: RuntimeRepairSandboxRequest): RuntimeRepairSandboxResult;
