feat: 完善堡垒机与 Agent 智能运维能力

- 支持 Windows Agent 构建、安装脚本和统一上报协议

- 增强 RDP 剪贴板、虚拟盘和文件传输能力

- 新增 AIOps 上下文工具、告警 RCA trace 落库和回放接口

- 重构 docs 模块文档并补充终端、堡垒机、监控、AI Agent 设计
This commit is contained in:
Logan.Li committed 2026-07-05 23:49:36 +08:00
1 parent a9513c2056
commit e0d652d211
169 files changed
+12192 -9116

No files matched your search

+2 -22
View File
@@ -1,3 +1,5 @@
//go:build !windows
// Package task 实现 AIOps Agent 的任务拉取与执行能力。
// Agent 通过轮询接口从后端获取待执行任务(命令/脚本),本地执行后回传结果。
//
@@ -13,28 +15,6 @@ import (
"time"
)
// 任务类型常量
const (
TypeCommand = "command" // 单条 shell 命令
TypeScript = "script" // 多行 bash 脚本
)
// Task 表示从后端拉取到的待执行任务。
type Task struct {
TaskID string `json:"task_id"` // 任务唯一标识,回传结果时使用
Type string `json:"type"` // 任务类型:command / script
Command string `json:"command"` // 命令内容(command 时为单条命令,script 时为脚本正文)
Timeout int `json:"timeout"` // 执行超时,单位:秒;<=0 表示不限制
}
// Result 表示任务执行结果,用于回传后端。
type Result struct {
TaskID string `json:"task_id"` // 对应的任务 ID
ExitCode int `json:"exit_code"` // 进程退出码;超时/启动失败时为 -1
Result string `json:"result"` // 合并后的 stdout+stderr 输出
Status string `json:"status"` // 执行状态:success / failed / timeout
}
// Executor 负责本地执行任务并产出结果。
type Executor struct {
logger *log.Logger