/** * 意图识别引擎 * 基于 SpecCore v4.0 的自然语言意图识别引擎 * 支持 31 种意图类型、200+ 关键词匹配、置信度计算、上下文感知增强 */ /** 意图类型 */ export type IntentType = 'change' | 'execute' | 'create' | 'iteration_create' | 'analyze' | 'split' | 'pr' | 'done' | 'review' | 'plan' | 'reference' | 'archive' | 'query_progress' | 'handover' | 'health' | 'config' | 'help' | 'demo' | 'welcome' | 'init' | 'bugfix' | 'research' | 'sync' | 'retro' | 'template_add' | 'import_to_global' | 'iteration_from_global' | 'sync_to_global' | 'global_status' | 'history' | 'impact' | 'baseline' | 'dashboard' | 'audit' | 'rename' | 'new_task' | 'platform_add' | 'index_update' | 'context' | 'doc2spec' | 'synthesize'; /** 意图匹配结果 */ export interface IntentResult { intent: IntentType; command: string; confidence: number; priority: number; matchedTriggers: string[]; extractedParams: Record; contextAware: boolean; } /** 命令映射条目 */ export interface CommandMapping { id: string; intent: IntentType; priority: number; triggers: string[]; patterns: string[]; description: string; args?: string; } /** * 从用户自然语言输入中识别意图 */ export declare function recognizeIntent(input: string): Promise; /** * 根据置信度分级获取行为建议 */ export declare function getConfidenceLevel(confidence: number): 'high' | 'medium' | 'low'; /** * 获取所有命令映射(用于 help 命令) */ export declare function getAllCommandMappings(): CommandMapping[]; /** * 根据命令 ID 获取映射 */ export declare function getCommandMapping(commandId: string): CommandMapping | undefined; /** * 根据意图类型获取相关命令 */ export declare function getCommandsByIntent(intent: IntentType): CommandMapping[]; /** 容易与"普通 AI 对话"混淆的意图 */ export declare const AMBIGUOUS_INTENTS: Set; /** * 判断用户输入是否明确与 speccore CLI 操作相关 * v6.97.0+ 新增:避免"分析代码""讨论需求"等普通聊天被误判为 speccore 操作 */ export declare function isSpeccoreOperation(input: string): boolean; //# sourceMappingURL=intent-recognition.d.ts.map