import { type CustomInterfaceError, type CustomInterfaceGate } from "./customInterfaceDefiner.js";
export type CustomInterfaceRuleErrorCode = CustomInterfaceError["code"] | "MISSING_RULE" | "OPERATION_DENIED";
export type CustomInterfaceRuleError = Omit<CustomInterfaceError, "code"> & {
    code: CustomInterfaceRuleErrorCode;
};
export type CustomInterfaceConstraintRule = {
    ruleId?: string;
    allowedOperations?: readonly string[];
    deniedOperations?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: CustomInterfaceGate;
    governance?: CustomInterfaceGate;
};
export type CustomInterfaceRuleConstraintRequest = {
    interfaceId?: string;
    operation?: string;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    rules?: readonly CustomInterfaceConstraintRule[];
    contract?: CustomInterfaceGate;
    governance?: CustomInterfaceGate;
};
export type CustomInterfaceRuleConstraintDecision = {
    interfaceId: string;
    operation?: string;
    allowed: true;
    appliedRuleIds: readonly string[];
    dispatch: "dry-run";
    runtimeGoverned: true;
};
export type CustomInterfaceRuleConstraintResult = {
    ok: true;
    decision: CustomInterfaceRuleConstraintDecision;
    events: readonly string[];
} | {
    ok: false;
    error: CustomInterfaceRuleError;
    events: readonly string[];
};
export declare function constrainCustomInterfaceRules(request?: CustomInterfaceRuleConstraintRequest): CustomInterfaceRuleConstraintResult;
