feat(plan-management): implement alert-remediation-plan system v1.3
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled

- 8 new store modules + matcher + initialResponse + aggregation + remediation + AlertStateMonitor + planGenerator

- alert chain auto-integrated after runInspection: freeze snapshot + generate response + real-time agg + auto-start monitor

- AlertAIPanel component + MonitoringDetailPanel expandable alert list

- PlanManagementPage: full page with list/edit/AI generate/templates/commands
This commit is contained in:
2026-10-30 16:55:55 +08:00
committed by trae-solo-agent
parent 1bb5390263
commit a5744e720b
18 changed files with 4109 additions and 21 deletions

View File

@@ -2182,6 +2182,43 @@ function createPreloadApi(ctx) {
ipcRenderer.on("inspection:ruleChanged", handler);
return () => ipcRenderer.removeListener("inspection:ruleChanged", handler);
},
// ========== 预案管理与告警联动(P0 新增)==========
// 预案模板
listPlanTemplates: () => ipcRenderer.invoke("inspection:listPlanTemplates"),
getPlanTemplate: (id) => ipcRenderer.invoke("inspection:getPlanTemplate", id),
createPlanTemplate: (data) => ipcRenderer.invoke("inspection:createPlanTemplate", data),
updatePlanTemplate: (id, updates) => ipcRenderer.invoke("inspection:updatePlanTemplate", id, updates),
deletePlanTemplate: (id) => ipcRenderer.invoke("inspection:deletePlanTemplate", id),
// 设备预案
listDevicePlans: (filters) => ipcRenderer.invoke("inspection:listDevicePlans", filters),
getDevicePlan: (id) => ipcRenderer.invoke("inspection:getDevicePlan", id),
createDevicePlan: (data) => ipcRenderer.invoke("inspection:createDevicePlan", data),
updateDevicePlan: (id, updates) => ipcRenderer.invoke("inspection:updateDevicePlan", id, updates),
deleteDevicePlan: (id) => ipcRenderer.invoke("inspection:deleteDevicePlan", id),
approveDevicePlan: (id, actor) => ipcRenderer.invoke("inspection:approveDevicePlan", id, actor),
rejectDevicePlan: (id, reason, actor) => ipcRenderer.invoke("inspection:rejectDevicePlan", id, reason, actor),
// 聚合规则
listAggregationRules: () => ipcRenderer.invoke("inspection:listAggregationRules"),
createAggregationRule: (data) => ipcRenderer.invoke("inspection:createAggregationRule", data),
updateAggregationRule: (id, updates) => ipcRenderer.invoke("inspection:updateAggregationRule", id, updates),
deleteAggregationRule: (id) => ipcRenderer.invoke("inspection:deleteAggregationRule", id),
// 命令目录
listCommandCatalog: (filters) => ipcRenderer.invoke("inspection:listCommandCatalog", filters),
getCommandCatalog: (id) => ipcRenderer.invoke("inspection:getCommandCatalog", id),
// AI 预案生成
generatePlan: (description) => ipcRenderer.invoke("inspection:generatePlan", description),
// 初始响应包(手动触发 / 重新生成)
regenerateInitialResponse: (alertId) => ipcRenderer.invoke("inspection:regenerateInitialResponse", alertId),
// 处置执行
startRemediation: (alertId) => ipcRenderer.invoke("inspection:startRemediation", alertId),
pauseRemediation: (alertId) => ipcRenderer.invoke("inspection:pauseRemediation", alertId),
resumeRemediation: (alertId) => ipcRenderer.invoke("inspection:resumeRemediation", alertId),
cancelRemediation: (alertId) => ipcRenderer.invoke("inspection:cancelRemediation", alertId),
getRemediationStatus: (alertId) => ipcRenderer.invoke("inspection:getRemediationStatus", alertId),
// AlertStateMonitor
getAlertStateMonitorStatus: () => ipcRenderer.invoke("inspection:getAlertStateMonitorStatus"),
// 匹配测试(前端调试用)
matchPlanForAlert: (alert, deviceProfile) => ipcRenderer.invoke("inspection:matchPlanForAlert", alert, deviceProfile),
},
// ─── 远程 HTTP Server(浏览器访问单机版) ───