export type DebugTraceBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope" | "trace";
export type DebugTraceCallerKind = "application" | "official-module" | "runtime-surface" | "inspection" | "test";
export type DebugTraceCaller = {
    kind: DebugTraceCallerKind;
    id: string;
    moduleId?: string;
    sessionId?: string;
};
export type DebugTraceGate = {
    accepted: boolean;
    reason?: string;
};
export type DebugTraceSeverity = "info" | "warning" | "error";
export type DebugTraceEventInput = {
    eventId?: string;
    at?: string;
    kind?: string;
    source?: string;
    summary?: string;
    severity?: DebugTraceSeverity;
    payload?: Readonly<Record<string, unknown>>;
    tags?: readonly string[];
    metadata?: Readonly<Record<string, unknown>>;
};
export type DebugTraceRecord = {
    eventId: string;
    at: string;
    kind: string;
    source: string;
    summary?: string;
    severity: DebugTraceSeverity;
    payloadKeys: readonly string[];
    tags: readonly string[];
    metadataKeys: readonly string[];
};
export type DebugTraceSnapshot = {
    runtimeId: string;
    traceId: string;
    caller: DebugTraceCaller;
    route: "runtime.debug.debugTraceRecorder";
    records: readonly DebugTraceRecord[];
    eventKinds: readonly string[];
    eventSources: readonly string[];
    audit: {
        dryRun: true;
        unsafeSideEffects: false;
        rawPayloadStored: false;
        governanceRequired: true;
    };
};
export type DebugTraceRecorderRequest = {
    runtimeId?: string;
    traceId?: string;
    caller?: DebugTraceCaller;
    events?: readonly DebugTraceEventInput[];
    allowedEventKinds?: readonly string[];
    maxEvents?: number;
    runtimeReady?: boolean;
    contract?: DebugTraceGate;
    governance?: DebugTraceGate;
};
export type DebugTraceErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_EVENTS" | "MISSING_EVENT_KIND" | "MISSING_EVENT_SOURCE" | "EVENT_SCOPE_DENIED" | "TRACE_EVENT_LIMIT_EXCEEDED" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type DebugTraceError = {
    code: DebugTraceErrorCode;
    message: string;
    boundary: DebugTraceBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type DebugTraceRecorderResult = {
    ok: true;
    trace: DebugTraceSnapshot;
    events: readonly string[];
} | {
    ok: false;
    error: DebugTraceError;
    events: readonly string[];
};
export declare const debugTraceRecorderDescriptor: {
    readonly surface: "runtime.debug";
    readonly capability: "debugTraceRecorder";
    readonly purpose: "record public-safe runtime debug trace envelopes without executing adjacent modules";
    readonly unsafeSideEffects: false;
};
export declare function recordDebugTrace(request?: DebugTraceRecorderRequest): DebugTraceRecorderResult;
