Files
aiops/.gitignore
T
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

94 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Dependencies
node_modules/
frontend/node_modules/
# 安装包(不入库)
*.deb
*.rpm
*.dmg
# Build output
frontend/dist/
frontend/dist-ssr/
backend/bin/
*.exe
*.exe~
*.dll
*.so
*.dylib
# Go
backend/vendor/
*.test
*.out
# Compiled binary(前导 / 只匹配仓库根目录的二进制产物,避免误伤子目录同名文件夹如 frontend/src/components/aiops/) // Logan.Li
/aiops
/aiops-*
/aiops.bak.*
# 前端构建产物(由 run.sh build 自动生成,非源码)
backend/static/assets/
backend/static/index.html
backend/static/vite.svg
# local 模式数据库(主文件 + SQLite WAL 附属文件,非独立库)
sqlite3.db
sqlite3.db-shm
sqlite3.db-wal
sqlite3.db-*
redka.db
redka.db-shm
redka.db-wal
redka.db-*
backend/aiops-server
backend/aiops
backend/aiops-*
backend/aiops.bak.*
backend/.aiops.args
backend/data/
# Config(根目录 config.yaml 由 run.sh 本地自动生成)
config.yaml
config.local.yaml
*.local
.env
# IDE
.idea/
.vscode/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Logs
*.log
logs/
# Database
*.db
*.sqlite
backend/data/
# Docker
docker-data/
# PID files
*.pid
agent/aiops-agent
agent/bin/
# embed 模式临时目录(前端构建产物,编译后清理)
backend/static/
backend/cmd/static/
# Hermes agent config (personal, not project)
.hermes/
# kubectl 二进制(预打包进镜像,避免 Docker build 时网络下载)
backend/kubectl
opsxsql/