/** * BehaviorDetector - 行为检测器 * 基于 SPEC-SRV-005: Detector 架构重构 * * 职责:检测消极的用户交互行为 */ import type { Summary } from '../types'; export type IssueSeverity = 'critical' | 'warning' | 'info'; export declare class BehaviorDetector { private alertDir; private behaviorPath; private lastAlertTime; /** * @param projectRoot 用户项目根目录,告警将写入 /.agent-aware/alert/ * 默认从环境变量 USER_PROJECT_ROOT 读取,如果未设置则使用 process.cwd() */ constructor(projectRoot?: string); /** * 计算严重级别 */ calculateSeverity(summary: Summary): IssueSeverity; /** * 检测并写入问题 */ checkAndAlert(summary: Summary): Promise; /** * 读取现有的告警数据 */ private readAlerts; /** * 写入 behavior.json(保留历史记录,最多 100 条) */ private writeAlert; /** * 生成问题描述 */ private generateDescription; } //# sourceMappingURL=behaviorDetector.d.ts.map