新增功能: - 在LLM趋势分析中集成历史告警上下文,提供最近3次已触发告警的记录 - LLM自动判断本次分析是否与历史告警相似,避免重复通知 - 新增shouldNotify和notifyReason字段,支持智能通知决策 技术改进: - 扩展TrendAnalysisResponse类型,增加通知决策字段 - 数据库服务新增getRecentTriggeredAnalyses()方法 - LLM客户端新增analyzeTrendWithHistory()和相关方法 - 趋势分析服务集成历史上下文获取和通知决策逻辑 测试验证: - 创建test-db-history-method.ts验证数据库方法 - 创建test-llm-history-context.ts测试历史上下文功能 - 通过TypeScript类型检查和构建验证 这个功能可以有效减少重复告警,提升告警质量,避免通知疲劳。 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
31 lines
690 B
JSON
31 lines
690 B
JSON
{
|
|
"name": "rongtongjin-monitor",
|
|
"version": "1.0.0",
|
|
"description": "贵金属价格监控项目 - 监控美白银和伦敦银价格变化",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"dev": "tsx watch src/index.ts",
|
|
"start": "node dist/index.js",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "eslint src --ext .ts"
|
|
},
|
|
"keywords": [
|
|
"贵金属",
|
|
"价格监控",
|
|
"playwright"
|
|
],
|
|
"dependencies": {
|
|
"dotenv": "^17.2.3",
|
|
"playwright": "^1.49.0",
|
|
"uuid": "^13.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^20.19.28",
|
|
"@types/uuid": "^10.0.0",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|