export type InterfaceEnvelopeKind = "event" | "approval" | "approvalResolution" | "state" | "management" | "debug" | "repair" | "toolObservation" | "modelObservation";
export type InterfaceEnvelopeSurface = "cli" | "tui" | "raxode" | "raxos" | "application" | "officialModule" | "custom";
export type InterfaceEnvelope = {
    envelopeId: string;
    kind: InterfaceEnvelopeKind;
    surface: InterfaceEnvelopeSurface;
    runtimeId: string;
    sessionId?: string;
    correlationId?: string;
    payload: unknown;
    publicSafe: true;
    createdAt: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type InterfaceEnvelopeValidationErrorCode = "MISSING_ENVELOPE_ID" | "MISSING_KIND" | "MISSING_SURFACE" | "MISSING_RUNTIME_ID" | "UNSAFE_PAYLOAD";
export type InterfaceEnvelopeValidationResult = {
    ok: true;
    envelope: InterfaceEnvelope;
    events: readonly string[];
} | {
    ok: false;
    error: {
        code: InterfaceEnvelopeValidationErrorCode;
        message: string;
        boundary: "input" | "safety";
        publicSafe: true;
    };
    events: readonly string[];
};
export declare function createInterfaceEnvelope(input: Omit<InterfaceEnvelope, "createdAt" | "metadata" | "publicSafe"> & {
    createdAt?: string;
    metadata?: Readonly<Record<string, unknown>>;
    publicSafe?: boolean;
}): InterfaceEnvelopeValidationResult;
export declare function approvalInterfaceEnvelope(input: {
    approvalId: string;
    runtimeId: string;
    sessionId?: string;
    surface?: InterfaceEnvelopeSurface;
    payload: unknown;
    createdAt?: string;
}): InterfaceEnvelopeValidationResult;
export declare function eventInterfaceEnvelope(input: {
    eventId: string;
    runtimeId: string;
    sessionId?: string;
    surface?: InterfaceEnvelopeSurface;
    payload: unknown;
    createdAt?: string;
    metadata?: Readonly<Record<string, unknown>>;
}): InterfaceEnvelopeValidationResult;
export declare function stateInterfaceEnvelope(input: {
    stateId: string;
    runtimeId: string;
    sessionId?: string;
    surface?: InterfaceEnvelopeSurface;
    payload: unknown;
    createdAt?: string;
    metadata?: Readonly<Record<string, unknown>>;
}): InterfaceEnvelopeValidationResult;
export declare function managementInterfaceEnvelope(input: {
    commandId: string;
    runtimeId: string;
    sessionId?: string;
    surface?: InterfaceEnvelopeSurface;
    payload: unknown;
    createdAt?: string;
    metadata?: Readonly<Record<string, unknown>>;
}): InterfaceEnvelopeValidationResult;
export declare function repairInterfaceEnvelope(input: {
    repairId: string;
    runtimeId: string;
    sessionId?: string;
    surface?: InterfaceEnvelopeSurface;
    payload: unknown;
    createdAt?: string;
    metadata?: Readonly<Record<string, unknown>>;
}): InterfaceEnvelopeValidationResult;
