export type InterfaceRuleRuntimeBoundary = "input" | "contract" | "governance" | "runtime-state" | "rule" | "scope";
export type InterfaceRuleRuntimeCallerKind = "application" | "official-module" | "runtime-surface" | "inspection" | "debug" | "test";
export type InterfaceRuleRuntimeCaller = {
    kind: InterfaceRuleRuntimeCallerKind;
    id: string;
    moduleId?: string;
    sessionId?: string;
};
export type InterfaceRuleRuntimeGate = {
    accepted: boolean;
    reason?: string;
};
export type InterfaceRuleRuntimePhase = "definition" | "binding" | "invocation" | "inspection" | (string & {});
export type InterfaceRuleRuntimeRule = {
    ruleId?: string;
    interfaceId?: string;
    phase?: InterfaceRuleRuntimePhase;
    allowedOperations?: readonly string[];
    deniedOperations?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: InterfaceRuleRuntimeGate;
    governance?: InterfaceRuleRuntimeGate;
};
export type InterfaceRuleRuntimeRequest = {
    runtimeId?: string;
    caller?: InterfaceRuleRuntimeCaller;
    interfaceId?: string;
    operation?: string;
    phase?: InterfaceRuleRuntimePhase;
    rules?: readonly InterfaceRuleRuntimeRule[];
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    runtimeReady?: boolean;
    contract?: InterfaceRuleRuntimeGate;
    governance?: InterfaceRuleRuntimeGate;
    traceId?: string;
};
export type InterfaceRuleRuntimeErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_INTERFACE_ID" | "EMPTY_RULES" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "RULE_INTERFACE_MISMATCH" | "OPERATION_DENIED";
export type InterfaceRuleRuntimeError = {
    code: InterfaceRuleRuntimeErrorCode;
    message: string;
    boundary: InterfaceRuleRuntimeBoundary;
    publicSafe: true;
    internalDetailExposed: false;
};
export type InterfaceRuleRuntimeDecision = {
    runtimeId: string;
    interfaceId: string;
    caller: InterfaceRuleRuntimeCaller;
    route: "runtime.interfaceAdapter.interfaceRuleRuntime";
    phase: InterfaceRuleRuntimePhase;
    operation?: string;
    appliedRuleIds: readonly string[];
    acceptedScopes: readonly string[];
    traceId?: string;
    dispatch: "dry-run";
    ruleRuntimeReady: true;
    contractChecked: true;
    governanceChecked: true;
    unsafeSideEffects: false;
};
export type InterfaceRuleRuntimeResult = {
    ok: true;
    decision: InterfaceRuleRuntimeDecision;
    events: readonly string[];
} | {
    ok: false;
    error: InterfaceRuleRuntimeError;
    events: readonly string[];
};
export declare const interfaceRuleRuntimeDescriptor: {
    readonly route: "runtime.interfaceAdapter.interfaceRuleRuntime";
    readonly purpose: "evaluate interface rules before runtime-mediated interface binding or invocation";
    readonly dispatch: "dry-run";
    readonly unsafeSideEffects: false;
};
export declare function evaluateInterfaceRuleRuntime(request?: InterfaceRuleRuntimeRequest): InterfaceRuleRuntimeResult;
