/** * Intent Detection: classify an utterance into an {@link IntentKind} with a * confidence, capturing the raw spans (column names, values, directions) it * carries. The default detector is lexical: a table of scored patterns, a * productionized generalization of the old mock's regex list. It is a pure * function of the utterance (the context is available for future * schema-aware scoring but the default does not need it), so the highest-scoring * matching rule wins and anything unmatched is `unknown`. * * @see plans/ai-reasoning-layer-spec.md (section 4.4) */ import type { GridContext } from './context.js'; import type { Intent } from './types.js'; /** Classifies an utterance. */ export interface IntentDetector { detect(utterance: string, ctx: GridContext): Intent; } /** Create the default lexical {@link IntentDetector}. */ export declare function createIntentDetector(): IntentDetector;