/** * IntentManagementService — FR-W10 意图库管理数据层 * * AC1: 意图列表(名称、描述、正例数、负例数、关联知识条目数) * AC2: 批量粘贴 + 逐条添加正例/负例 * AC3: 删除确认(展示关联知识条目数量) * AC4: 保存后触发意图理解模型增量更新 * AC5: 最近 30 天匹配命中次数 + 典型命中对话片段 */ import type { IntentListItem, IntentDetail, IntentMatchStats, UpsertIntentRequest } from './workbench-types.js'; export interface IntentRecord { id: string; name: string; description: string; positives: string[]; negatives: string[]; linkedEntryIds: string[]; } export interface IntentStore { list(): Promise; get(id: string): Promise; upsert(record: IntentRecord): Promise; delete(id: string): Promise; } export interface IntentModelUpdater { triggerIncrementalUpdate(intentId: string): Promise<'updating' | 'completed' | 'failed'>; getUpdateStatus(intentId: string): Promise<'idle' | 'updating' | 'completed' | 'failed'>; } export interface IntentMatchStatsProvider { getStats(intentId: string, days: number): Promise; } export interface IntentManagementServiceDeps { store: IntentStore; modelUpdater?: IntentModelUpdater; matchStats?: IntentMatchStatsProvider; } export declare class IntentManagementService { private store; private modelUpdater?; private matchStats?; constructor(deps: IntentManagementServiceDeps); /** AC1: 意图列表 */ list(): Promise; /** AC5: 意图详情(含匹配统计) */ getDetail(intentId: string): Promise; /** AC2 + AC4: 新增/编辑意图 */ upsert(id: string, request: UpsertIntentRequest): Promise; /** AC3: 删除意图(返回关联数量供确认) */ getDeleteConfirmation(intentId: string): Promise<{ linkedEntryCount: number; } | null>; deleteIntent(intentId: string): Promise; } //# sourceMappingURL=intent-management-service.d.ts.map