Commit Graph
68 Commits
Author SHA1 Message Date
attackerandClaude 92a2247390 feat: 新增 Agent CLI — Web 版 AI 运维 Agent(参考 opsxcli 移植)
后端引擎 backend/pkg/agentcli/(纯引擎库,零业务依赖,剥离 CLI/TUI 外壳):
- llm: OpenAI 兼容客户端,复用 model.LLMConfig
- tools: ssh_execute(复用 pkg/remoteexec)+ analyze_output + 风险评估黑名单
- safety: 三级安全模式 + 五级风险 + WebSocket 异步确认
- prompt: 五层 System Prompt
- core: ReAct 16 轮循环 + 自适应检查点 + 循环检测
- evolver: 四层记忆 + 进化循环,data/agentcli/ 文件存储

集成层:
- controller/agent_cli.go: WebSocket 控制器(事件流推流 + 高危确认 + 会话持久化)
- model/agent_cli.go: agent_cli_sessions/messages 表 + AutoMigrate
- 路由 /ws/agent-cli + /api/v1/aiops/agent-cli/sessions
- seed 权限 aiops:agent-cli / aiops:llm-config

前端:
- AgentCLI.tsx: 对话流 + 工具块 + 高危确认 + 四模块 tips 面板
- LLMConfig.tsx: 大模型设置独立页
- api/agentCli.ts + Sidebar/App 菜单路由

文档:
- docs/agent/ 11 篇(opsxcli 同名文档适配改写 + 00-README 映射总览)

其他:
- CLAUDE.md 补充 agent-cli 模块说明
- 修正 .gitignore 根级二进制规则(前导 /,避免误伤 frontend/src/components/aiops/)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-27 09:55:17 +08:00
Logan.Li 286decf0b0 docs: 同步 README 与 docs 至最新部署与版本方案
- 更新三种部署方式:embed 单容器、./aiops 根目录二进制
- 补充版本管理、release、lghost/aiops 镜像推送说明
- 修正过时的 docker 4 容器、backend/aiops、run.sh start 等描述
- 更新 project-structure、deployment、quick-start 等核心文档
2026-06-26 16:39:00 +08:00
attacker 65636b3f5a fix: favicon .ico 生成 + README 更新 + run.sh kubernetes 别名
- 新增 frontend/public/favicon.ico (4 size: 16/32/48/64)
- index.html .ico 引用调整到 .svg 前面(兼容旧浏览器)
- README.md 全量更新:Kubernetes 完整命令列表 + K8s 管理亮点
- run.sh 主入口添加 k8s 别名(向后兼容)
- aiops-development skill 更新部署命令和 favicon 文档
2026-06-25 00:53:57 +08:00
attacker 4e3f8cb306 docs: update README, API reference, dev-log, project structure with Agent monitoring + quick-alarm + latest fixes
- README.md: React 19, default pwd 123456, Docker Compose deploy, correct module list
- api-reference.md: add Agent monitoring section (report/latest/rules/quick-setup/alerts/tasks/kline)
- dev-log.md: new entry documenting hostname/IP fix, system collector, offline detection, quick alarm
- project-structure.md: add agent/ directory, dev-log.md link, React 19
2026-06-18 16:11:13 +00:00
attacker 94dbc89b9b refactor: rename EZOps → AIOps globally (brand unification) 2026-06-18 11:57:59 +00:00
attacker 2e175daf80 docs: update dev-log - llm.go handler 拆分 2026-06-18 08:04:53 +08:00
attacker 94e40ebd3f docs: update dev-log - AIOps停止生成按钮 2026-06-18 07:07:31 +08:00
attacker 5d19878b28 feat: AIOps智能助手流式输出(SSE代理,逐字渲染+思考中光标+断连安全持久化) 2026-06-18 05:07:28 +08:00
attacker 139bddc9d9 docs: update dev-log - AIOps快捷操作接入真实平台数据 2026-06-18 04:07:24 +08:00
attacker ae09faa780 docs: update dev-log - AIOps对话历史持久化 2026-06-18 03:06:14 +08:00
attacker 6321886b69 docs: update dev-log - AIOps智能助手接入真实LLM后端 2026-06-18 02:13:23 +08:00
attacker 2e174fe7eb docs: update dev-log - AIAlertAnalyzer 拆分(helper+子组件模式) 2026-06-18 00:12:53 +08:00
attacker 4797059be2 docs: update dev-log - 清理死代码 LogManager+logsApi+LogEntry 2026-06-17 08:05:12 +08:00
attacker a501229cb3 docs: update dev-log - SystemManager 拆分(useLdapManagement Hook) 2026-06-17 07:08:33 +08:00
attacker d234cb4b89 docs: update dev-log - AnsibleManager 拆分 2026-06-17 06:05:27 +08:00
attacker 7432431fc3 docs: update dev-log - AgentAlerts 拆分 2026-06-17 05:04:26 +08:00
attacker cbe34666c0 docs: update dev-log - ScriptManager 拆分 2026-06-17 04:04:56 +08:00
attacker aeb2611149 docs: update dev-log - SystemUserTab 拆分 2026-06-17 03:07:26 +08:00
attacker 367232f2b3 docs: update dev-log - ReleaseManager 拆分 2026-06-17 02:06:27 +08:00
attacker 76bcf3e135 docs: update dev-log - ServerManager 拆分 2026-06-17 01:07:08 +08:00
attacker dcc13d7068 docs: update dev-log - AppRelease 拆分 2026-06-17 00:06:19 +08:00
attacker 8a4ae0ac5c docs: update dev-log - CronJobManager 拆分 2026-06-16 22:08:47 +08:00
attacker a214efe078 docs: update dev-log - CloudBilling 拆分 2026-06-16 19:09:59 +08:00
attacker f865d41547 docs: update dev-log - ApprovalFlow 拆分 2026-06-16 07:06:32 +08:00
attacker 8da6ca15db docs: update dev-log - AIPredictiveAnalytics 拆分 2026-06-16 06:06:02 +08:00
attacker 67066041b3 docs: update dev-log - AgentMonitor 拆分 2026-06-16 05:04:37 +08:00
attacker 84a479caf8 docs: update dev-log - mocks/ 死代码目录清理 2026-06-16 04:03:21 +08:00
attacker 5b01cd2e39 docs: update dev-log - SQL审计死代码清理 2026-06-16 03:05:35 +08:00
attacker cd46964750 docs: update dev-log - ServerManager tag JSON object display fix 2026-06-16 02:04:38 +08:00
attacker 440d731b9b docs: update dev-log - ServerManager dead button cleanup + CSV export 2026-06-16 01:08:16 +08:00
attacker f5bda8b03b docs: update dev-log - server.go split 2026-06-15 21:05:30 +08:00
attacker bc5bd96aff docs: update dev-log - billing.go split 2026-06-15 17:04:26 +08:00
attacker c90d0e5c10 docs: update dev-log - navigation dead code cleanup 2026-06-15 16:07:05 +08:00
attacker 9af0890bc6 docs: update dev-log - pipeline.go split 2026-06-15 15:05:56 +08:00
attacker 487d542c8c refactor: backend alert.go split (586→133+274+206 lines, alerts/rules/channels) 2026-06-15 14:05:28 +08:00
attacker 46c50a13f4 docs: update dev-log - AlertCenter split 2026-06-15 13:07:22 +08:00
attacker 6a40956afa docs: update dev-log - ScriptManager split 2026-06-15 12:08:12 +08:00
attacker 23fe742cc2 docs: update dev-log - AnsibleManager split 2026-06-15 11:07:55 +08:00
attacker 16205fdb2b docs: update dev-log - PipelineManager split 2026-06-15 09:05:45 +08:00
attacker 419dd160b8 docs: 更新开发日志-资源申请模块重构 2026-06-15 08:07:28 +08:00
attacker 011f3d6b51 docs: 更新开发日志-服务器导入弹窗主题化+CRUD联调验证 2026-06-15 07:05:28 +08:00
attacker bc7323e687 docs: 更新开发日志-定时任务管理全栈完善 2026-06-15 06:04:41 +08:00
attacker 5e3c60d0da docs: 更新开发日志-流水线管理全栈完善 2026-06-15 05:04:51 +08:00
attacker fd1f30958a docs: 更新开发日志-发布管理全栈完善 2026-06-15 04:06:37 +08:00
attacker bf3d642b59 docs: 更新开发日志-仪表盘真实指标修复 2026-06-15 03:05:45 +08:00
attacker 77c33a6fee feat: 服务器批量导入全栈实现 + SQL审计模型修复 + 审批流程增强
服务器批量导入:
- 后端 BatchCreateServers handler: 逐条校验/查重/GB→MB转换/错误明细
- 前端 CSV 解析器 + IP校验 + 模板下载 + 真实API导入
- 删除孤立占位组件 BatchImport.tsx

SQL审计:
- 修复 TableName 字段与 GORM 接口冲突 → TargetTable
- 补全路由注册 + AutoMigrate + 种子数据

审批流程增强 + 告警/菜单微调

// Logan.Li
2026-06-15 02:12:05 +08:00
attacker 73b5a48df9 refactor: 全局代码模块化重构 — 所有文件<700行
后端 handler 拆分:
- automation.go(1067→4文件), server.go(1011→5文件), ldap.go(815→3文件), user.go(704→2文件)

前端组件拆分:
- SystemManager(1782→569), AlertManager(1133→220), K8sClusters(1062→4文件)
- Dashboard(941→4文件), ServerManager(905→640), ApprovalFlow(830→548)
- AlertCenter(775→693), AIPredictiveAnalytics(760→670)
- CloudBilling(728→663), GrafanaDashboard(717→643), sidebar(726→689)

Mock 数据模块化:
- mocks/data.ts(2552行→barrel+11个domain模块)

新增 CLAUDE.md 项目全局开发规范

修复: AlertCenter/LogManager ListResponse.data→.list 类型不匹配
验证: go build ✅ + tsc --noEmit ✅ + npm run build ✅
2026-06-15 01:32:15 +08:00
attacker e8dbe65955 docs: 更新开发日志 — 记录定时任务编辑入口+ApprovalFlow编译修复+大文件拆分 2026-06-15 01:10:33 +08:00
attacker 8be63ac168 docs: 更新开发日志 — 记录脚本库 ScriptManager 全栈CRUD 2026-06-15 00:10:15 +08:00
attacker b7c4d90b6b docs: 更新开发日志 — 记录 Ansible Playbook 全栈 CRUD+真实执行 2026-06-14 23:14:54 +08:00