import type { InterfaceAdapterRuntimeCaller, InterfaceAdapterRuntimeGate } from "./interfaceAdapterRuntime.js";
export type CustomInterfaceRuntimeBridgeBoundary = "input" | "contract" | "governance" | "runtime-state" | "bridge";
export type CustomInterfaceRuntimeBridgeChannel = "definition" | "rule" | "invocation" | "inspection" | (string & {});
export type CustomInterfaceRuntimeBridgeErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_BRIDGE_ID" | "MISSING_CUSTOM_INTERFACE_ID" | "EMPTY_BRIDGE_CHANNELS" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "CHANNEL_UNAVAILABLE";
export type CustomInterfaceRuntimeBridgeError = {
    code: CustomInterfaceRuntimeBridgeErrorCode;
    message: string;
    boundary: CustomInterfaceRuntimeBridgeBoundary;
    publicSafe: true;
};
export type CustomInterfaceBridgeChannelRef = {
    channel: CustomInterfaceRuntimeBridgeChannel;
    target: string;
};
export type CustomInterfaceRuntimeBridgeRequest = {
    runtimeId?: string;
    caller?: InterfaceAdapterRuntimeCaller;
    bridgeId?: string;
    customInterfaceId?: string;
    channels?: readonly CustomInterfaceBridgeChannelRef[];
    channelAvailability?: Partial<Record<CustomInterfaceRuntimeBridgeChannel, boolean>>;
    runtimeReady?: boolean;
    contract?: InterfaceAdapterRuntimeGate;
    governance?: InterfaceAdapterRuntimeGate;
    traceId?: string;
};
export type CustomInterfaceRuntimeBridgePlan = {
    bridgeId: string;
    runtimeId: string;
    customInterfaceId: string;
    caller: InterfaceAdapterRuntimeCaller;
    route: "runtime.interfaceAdapter.customInterfaceRuntimeBridge";
    channels: readonly CustomInterfaceBridgeChannelRef[];
    channelNames: readonly CustomInterfaceRuntimeBridgeChannel[];
    traceId?: string;
    dispatch: "dry-run";
    mockableEnvelope: true;
    contractChecked: true;
    governanceChecked: true;
    unsafeSideEffects: false;
};
export type CustomInterfaceRuntimeBridgeResult = {
    ok: true;
    plan: CustomInterfaceRuntimeBridgePlan;
    events: readonly string[];
} | {
    ok: false;
    error: CustomInterfaceRuntimeBridgeError;
    events: readonly string[];
};
export declare function createCustomInterfaceRuntimeBridge(request?: CustomInterfaceRuntimeBridgeRequest): CustomInterfaceRuntimeBridgeResult;
