feat: 完善堡垒机与 Agent 智能运维能力
- 支持 Windows Agent 构建、安装脚本和统一上报协议 - 增强 RDP 剪贴板、虚拟盘和文件传输能力 - 新增 AIOps 上下文工具、告警 RCA trace 落库和回放接口 - 重构 docs 模块文档并补充终端、堡垒机、监控、AI Agent 设计
This commit is contained in:
1 parent
a9513c2056
commit
e0d652d211
169 files changed
+12192
-9116
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package aiopscontext
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"ezops/pkg/agentcli/tools"
|
||||
)
|
||||
|
||||
// AgentProvider 适配 Agent CLI tools.AIOpsContextProvider。 // Logan.Li
|
||||
type AgentProvider struct {
|
||||
service *Service
|
||||
}
|
||||
|
||||
// NewAgentTools 返回可注册到 Agent CLI 的 AIOps 平台只读工具。 // Logan.Li
|
||||
func NewAgentTools(service *Service) []tools.Tool {
|
||||
provider := &AgentProvider{service: service}
|
||||
return []tools.Tool{
|
||||
tools.NewAIOpsAssetSearchTool(provider),
|
||||
tools.NewAIOpsAlertListTool(provider),
|
||||
tools.NewAIOpsMetricSummaryTool(provider),
|
||||
}
|
||||
}
|
||||
|
||||
// SearchAssets 查询资产。 // Logan.Li
|
||||
func (p *AgentProvider) SearchAssets(ctx context.Context, keyword string, limit int) (interface{}, error) {
|
||||
return p.service.SearchAssets(ctx, keyword, limit)
|
||||
}
|
||||
|
||||
// ListAlerts 查询告警。 // Logan.Li
|
||||
func (p *AgentProvider) ListAlerts(ctx context.Context, target, severity, status, timeRange string, limit int) (interface{}, error) {
|
||||
return p.service.ListAlerts(ctx, AlertQuery{
|
||||
Target: target, Severity: severity, Status: status, TimeRange: timeRange, Limit: limit,
|
||||
})
|
||||
}
|
||||
|
||||
// MetricSummary 查询指标摘要。 // Logan.Li
|
||||
func (p *AgentProvider) MetricSummary(ctx context.Context, target, metric, timeRange string, limit int) (interface{}, error) {
|
||||
return p.service.MetricSummary(ctx, target, metric, timeRange, limit)
|
||||
}
|
||||
Reference in new issue
Block a user