import type { RuntimeContractError, RuntimeContractGate } from "./runtimeErrorContract.js";
export type RuntimeEventVisibility = "public" | "application" | "official-module" | "internal";
export type RuntimeEventContractErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CONTRACT_ID" | "MISSING_EVENT_TYPE" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "EVENT_SCOPE_DENIED";
export type RuntimeEventContractRequest = {
    runtimeId: string;
    contractId: string;
    eventType: string;
    producerSurface?: "applicationSurface" | "officialModuleSurface" | "invocationMethod" | "inspection" | "debug";
    visibility?: RuntimeEventVisibility;
    payloadShape?: readonly string[];
    allowedSubscribers?: readonly string[];
    requestedSubscriber?: string;
    runtimeReady?: boolean;
    contract?: RuntimeContractGate;
    governance?: RuntimeContractGate;
};
export type RuntimeEventEnvelope = {
    type: string;
    runtimeId: string;
    contractId: string;
    producerSurface?: string;
    payload?: unknown;
};
export type RuntimeEventContract = {
    runtimeId: string;
    contractId: string;
    eventType: string;
    producerSurface?: string;
    visibility: RuntimeEventVisibility;
    payloadShape: readonly string[];
    allowedSubscribers: readonly string[];
    contractSurface: "runtime.contractSurface";
    unsafeSideEffects: false;
    accepts: (event: RuntimeEventEnvelope) => boolean;
};
export type RuntimeEventContractResult = {
    ok: true;
    eventContract: RuntimeEventContract;
    events: readonly string[];
} | {
    ok: false;
    error: RuntimeContractError;
    events: readonly string[];
};
export declare function defineRuntimeEventContract(request: RuntimeEventContractRequest): RuntimeEventContractResult;
