/** * Category Router * * Routes messages to agents based on category pattern matching. * Categories are checked after explicit triggers but before keyword matching, * providing more precise routing than simple keywords. * * Supports regex patterns, priority ordering, and Korean/English patterns. */ import type { CategoryConfig, AgentPersonaConfig } from './types.js'; /** * Result of a category match */ export interface CategoryMatchResult { /** Matched category name */ categoryName: string; /** Agent IDs to route to */ agentIds: string[]; /** The pattern that matched */ matchedPattern: string; } /** * Category Router */ export declare class CategoryRouter { private categories; /** Compiled regex cache: Map */ private regexCache; constructor(categories?: CategoryConfig[]); /** * Route a message to agents based on category patterns. * Returns the first matching category's agents, or null if no match. */ route(content: string, availableAgents: AgentPersonaConfig[]): CategoryMatchResult | null; /** * Update categories (for hot reload) */ updateCategories(categories: CategoryConfig[]): void; /** * Get current categories (for debugging) */ getCategories(): CategoryConfig[]; /** * Sort categories by priority (higher first) */ private sortByPriority; /** * Precompile all regex patterns for performance */ private precompilePatterns; /** * Get or compile a regex pattern (case-insensitive) */ private getCompiledRegex; } //# sourceMappingURL=category-router.d.ts.map