/** * Skip flow mode: classify user input to determine if flow orchestration is needed. * * Two-tier classification: * 1. Regex fast path — catches clear-cut cases with zero latency * 2. LLM fallback — handles ambiguous cases for accurate classification * * Design principles: * - Pure functions where possible * - LLM call is async and isolated * - Testable with mocks * - Debug logging for auditability */ export interface SkipFlowConfig { enabled: boolean; debugMode?: boolean; } export type TaskClassification = "single-purpose" | "orchestrated" | "uncertain"; export interface ClassificationResult { classification: TaskClassification; source: "regex" | "llm"; matches: string[]; } export declare function clearClassificationCache(): void; /** * Try to classify using regex patterns. * Returns "uncertain" if no pattern matches definitively. */ export declare function classifyByRegex(message: string): { classification: TaskClassification; matches: string[]; }; /** * Classify using LLM for uncertain cases. */ export declare function classifyByLLM(message: string, model: any, apiKey: string, headers?: Record, debugMode?: boolean): Promise<{ classification: TaskClassification; matches: string[]; }>; export interface ClassifyDeps { model?: any; apiKey?: string; headers?: Record; } /** * Classify a user message as single-purpose or orchestrated. * Uses regex fast path first, falls back to LLM for uncertain cases. */ export declare function classifyTask(message: string, config: SkipFlowConfig, deps?: ClassifyDeps): Promise; /** * Get active tools based on skip flow analysis. * If skip flow is enabled and task is single-purpose, exclude flow tool. */ export declare function getSkipFlowTools(baseTools: string[], message: string, config: SkipFlowConfig, deps?: ClassifyDeps): Promise; /** * Check if flow is needed for a given message. * Convenience wrapper for boolean checks. */ export declare function needsFlow(message: string, config: SkipFlowConfig, deps?: ClassifyDeps): Promise; //# sourceMappingURL=skip-flow.d.ts.map