/** * router-intents.ts — LLM-based intent classification for the router. * * Flow (zero added latency): * 1. User sends prompt → router picks model with heuristics → turn starts IMMEDIATELY * 2. In background: haiku classifies the prompt intent ("debugging", "architecture"…) * 3. If user overrode the router, record: intent X → user prefers model Y * 4. After 3 consistent observations → intent X gets a "learned preference" * 5. Next time: classifyPromptForRouter checks learned preferences BEFORE heuristics * * Only runs when config.router.learn = true AND anthropic is authenticated. * Storage: ~/.squeezr-code/router-intents.json */ import type { AuthManager } from '../auth/manager.js'; export declare const INTENT_CATEGORIES: readonly ["debugging", "code-review", "architecture", "refactoring", "explanation", "translation", "creative", "factual", "testing", "documentation", "other"]; export type IntentCategory = typeof INTENT_CATEGORIES[number]; /** * Classifies the intent of a prompt using haiku. * Runs in background — does NOT block the main turn. */ export declare function classifyPromptIntentAsync(prompt: string, auth: AuthManager): Promise; /** * Record an observation after a turn completes (background, fire-and-forget). * Then re-compute preferences from all observations. */ export declare function recordIntentObservation(intent: IntentCategory, modelUsed: string, wasOverride: boolean): void; /** * Returns the learned model preference for the given prompt, or null. * Reads the intent store synchronously — called from classifyPromptForRouter. */ export declare function getLearnedIntentPreference(prompt: string): string | null; /** Human-readable summary of learned intent preferences. */ export declare function learnedIntentsSummary(): string; //# sourceMappingURL=router-intents.d.ts.map