export type InterfaceAdapterRuntimeBoundary = "input" | "contract" | "governance" | "runtime-state" | "binding" | "scope";
export type InterfaceAdapterRuntimeCallerKind = "application" | "official-module" | "runtime-surface" | "inspection" | "debug" | "test";
export type InterfaceAdapterRuntimeCaller = {
    kind: InterfaceAdapterRuntimeCallerKind;
    id: string;
    moduleId?: string;
    sessionId?: string;
};
export type InterfaceAdapterRuntimeGate = {
    accepted: boolean;
    reason?: string;
};
export type InterfaceAdapterRuntimeSurface = "basicInterfaceLayer" | "customInterfaceLayer" | "customInterfaceRuntimeBridge" | "interfaceRuleRuntime" | "officialPoolRuntimeBridge" | (string & {});
export type InterfaceAdapterRuntimeBindingInput = {
    surface?: InterfaceAdapterRuntimeSurface;
    bindingId?: string;
    ready?: boolean;
    capabilities?: readonly string[];
    metadata?: Readonly<Record<string, unknown>>;
};
export type InterfaceAdapterRuntimeErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_BINDINGS" | "MISSING_BINDING_SURFACE" | "MISSING_BINDING_ID" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "BINDING_NOT_READY" | "SCOPE_DENIED";
export type InterfaceAdapterRuntimeError = {
    code: InterfaceAdapterRuntimeErrorCode;
    message: string;
    boundary: InterfaceAdapterRuntimeBoundary;
    publicSafe: true;
};
export type InterfaceAdapterRuntimeBinding = {
    surface: InterfaceAdapterRuntimeSurface;
    bindingId: string;
    ready: true;
    capabilities: readonly string[];
    metadata: Readonly<Record<string, unknown>>;
};
export type InterfaceAdapterRuntimeHandle = {
    runtimeId: string;
    caller: InterfaceAdapterRuntimeCaller;
    route: "runtime.interfaceAdapter";
    phase: "bound";
    bindings: readonly InterfaceAdapterRuntimeBinding[];
    bindingIds: readonly string[];
    surfaces: readonly InterfaceAdapterRuntimeSurface[];
    requestedScopes: readonly string[];
    grantedScopes: readonly string[];
    governanceChecked: true;
    contractChecked: true;
    dryRun: true;
    unsafeSideEffects: false;
};
export type InterfaceAdapterRuntimeRequest = {
    runtimeId?: string;
    caller?: InterfaceAdapterRuntimeCaller;
    bindings?: readonly InterfaceAdapterRuntimeBindingInput[];
    runtimeReady?: boolean;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: InterfaceAdapterRuntimeGate;
    governance?: InterfaceAdapterRuntimeGate;
};
export type InterfaceAdapterRuntimeResult = {
    ok: true;
    runtime: InterfaceAdapterRuntimeHandle;
    events: readonly string[];
} | {
    ok: false;
    error: InterfaceAdapterRuntimeError;
    events: readonly string[];
};
export declare function createInterfaceAdapterRuntime(request?: InterfaceAdapterRuntimeRequest): InterfaceAdapterRuntimeResult;
