export type DebugStateDiffBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope" | "diff";
export type DebugStateDiffCallerKind = "application" | "official-module" | "runtime-surface" | "inspection" | "test";
export type DebugStateDiffCaller = {
    kind: DebugStateDiffCallerKind;
    id: string;
    moduleId?: string;
    sessionId?: string;
};
export type DebugStateDiffGate = {
    accepted: boolean;
    reason?: string;
};
export type DebugStateValueShape = "object" | "array" | "string" | "number" | "boolean" | "null" | "undefined" | "unknown";
export type DebugStateDiffChangeKind = "added" | "removed" | "changed" | "unchanged";
export type DebugStateDiffChange = {
    path: string;
    kind: DebugStateDiffChangeKind;
    beforeShape: DebugStateValueShape;
    afterShape: DebugStateValueShape;
    beforeKeys: readonly string[];
    afterKeys: readonly string[];
    valuePreviewExposed: false;
};
export type DebugStateDiffSummary = {
    added: number;
    removed: number;
    changed: number;
    unchanged: number;
};
export type DebugStateDiff = {
    runtimeId: string;
    diffId: string;
    caller: DebugStateDiffCaller;
    route: "runtime.debug.debugStateDiff";
    status: "changed" | "unchanged";
    comparedPaths: readonly string[];
    changes: readonly DebugStateDiffChange[];
    summary: DebugStateDiffSummary;
    audit: {
        dryRun: true;
        unsafeSideEffects: false;
        rawStateValuesExposed: false;
        shallowComparison: true;
        governanceRequired: true;
    };
};
export type DebugStateDiffRequest = {
    runtimeId?: string;
    diffId?: string;
    caller?: DebugStateDiffCaller;
    beforeState?: Readonly<Record<string, unknown>>;
    afterState?: Readonly<Record<string, unknown>>;
    paths?: readonly string[];
    exposeValues?: boolean;
    runtimeReady?: boolean;
    contract?: DebugStateDiffGate;
    governance?: DebugStateDiffGate;
};
export type DebugStateDiffErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_BEFORE_STATE" | "MISSING_AFTER_STATE" | "RAW_STATE_EXPOSURE_BLOCKED" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type DebugStateDiffError = {
    code: DebugStateDiffErrorCode;
    message: string;
    boundary: DebugStateDiffBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type DebugStateDiffResult = {
    ok: true;
    diff: DebugStateDiff;
    events: readonly string[];
} | {
    ok: false;
    error: DebugStateDiffError;
    events: readonly string[];
};
export declare const debugStateDiffDescriptor: {
    readonly surface: "runtime.debug";
    readonly capability: "debugStateDiff";
    readonly purpose: "compare public-safe runtime state shapes without exposing raw state values";
    readonly unsafeSideEffects: false;
};
export declare function diffDebugState(request?: DebugStateDiffRequest): DebugStateDiffResult;
