/**
 * Binding rules
 *
 * Priority-ordered rules with optional glob patterns on peer id and related fields.
 */
/**
 * Single binding match clause.
 */
export interface BindingMatch {
    /** Channel id (required) */
    channel: string;
    /** Account id pattern (`*` allowed) */
    accountId?: string;
    /** Peer kind (dm, group, channel, …) */
    peerKind?: string;
    /** Peer id glob */
    peerId?: string;
    /** Guild / server id (channel-specific, optional) */
    guildId?: string;
    /** Workspace / team id (channel-specific, optional) */
    teamId?: string;
    /** Role ids (any match wins) */
    memberRoleIds?: string[];
}
/**
 * One routing rule with priority.
 */
export interface BindingRule {
    /** Stable rule id */
    id: string;
    /** Target agent id */
    agentId: string;
    /** Lower number = higher priority */
    priority: number;
    /** Match clause */
    match: BindingMatch;
    /** Disabled rules are skipped */
    enabled?: boolean;
}
/**
 * Incoming message context for binding resolution.
 */
export interface RouteInput {
    channel: string;
    accountId?: string | null;
    peerKind?: string | null;
    peerId?: string | null;
    guildId?: string | null;
    teamId?: string | null;
    memberRoleIds?: string[];
}
/**
 * Result of binding resolution.
 */
export interface RouteResult {
    agentId: string;
    accountId: string;
    matchedRule?: BindingRule;
    matchedBy: 'binding' | 'default';
}
/**
 * Simple glob match (`*` only).
 */
export declare function globMatch(pattern: string, value: string): boolean;
/**
 * Whether `input` satisfies `match`.
 */
export declare function matchesBinding(input: RouteInput, match: BindingMatch): boolean;
/**
 * Parse binding rules from config JSON.
 */
export declare function parseBindingRules(config: any): BindingRule[];
/**
 * Parse one raw binding object or return null.
 */
export declare function parseBindingRule(raw: any, index: number): BindingRule | null;
/**
 * Pick the first matching rule or fall back to `defaultAgentId`.
 */
export declare function resolveRoute(input: RouteInput, rules: BindingRule[], defaultAgentId?: string): RouteResult;
