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,32 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// AIAnalysisTrace 记录每次 AI 分析看到的上下文、模型输出和审计追踪信息。 // Logan.Li
|
||||
type AIAnalysisTrace struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
TraceID string `gorm:"size:64;index;not null" json:"trace_id"`
|
||||
SpanID string `gorm:"size:64;index;not null" json:"span_id"`
|
||||
ParentSpanID string `gorm:"size:64;index" json:"parent_span_id"`
|
||||
UserID uint `gorm:"index" json:"user_id"`
|
||||
Feature string `gorm:"size:64;index;not null" json:"feature"`
|
||||
Target string `gorm:"size:255;index" json:"target"`
|
||||
AlertID uint `gorm:"index" json:"alert_id"`
|
||||
Provider string `gorm:"size:50" json:"provider"`
|
||||
Model string `gorm:"size:100" json:"model"`
|
||||
Source string `gorm:"size:64" json:"source"`
|
||||
Status string `gorm:"size:32;index" json:"status"`
|
||||
ContextPack string `gorm:"type:text" json:"context_pack"`
|
||||
Result string `gorm:"type:text" json:"result"`
|
||||
EvidenceCount int `json:"evidence_count"`
|
||||
PromptTokens int `json:"prompt_tokens"`
|
||||
CompletionTokens int `json:"completion_tokens"`
|
||||
TotalTokens int `json:"total_tokens"`
|
||||
Duration int64 `json:"duration"`
|
||||
Error string `gorm:"type:text" json:"error,omitempty"`
|
||||
CreatedAt time.Time `gorm:"index" json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
// TableName 表名 // Logan.Li
|
||||
func (AIAnalysisTrace) TableName() string { return "ai_analysis_traces" }
|
||||
@@ -4,13 +4,20 @@ import "time"
|
||||
|
||||
// AuditSettings 审计策略配置(单行) // Logan.Li
|
||||
type AuditSettings struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
RetentionDays int `gorm:"default:180;not null" json:"retention_days"`
|
||||
RecordAll bool `gorm:"default:true" json:"record_all"`
|
||||
LastCleanupAt *time.Time `json:"last_cleanup_at,omitempty"`
|
||||
LastCleanupSummary string `gorm:"size:500" json:"last_cleanup_summary,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
RetentionDays int `gorm:"default:180;not null" json:"retention_days"`
|
||||
RecordAll bool `gorm:"default:true" json:"record_all"`
|
||||
SessionWatermarkEnabled bool `gorm:"default:true;not null" json:"session_watermark_enabled"`
|
||||
SessionRecordEnabled bool `gorm:"default:true;not null" json:"session_record_enabled"`
|
||||
ClipboardEnabled bool `gorm:"default:true;not null" json:"clipboard_enabled"`
|
||||
FileUploadEnabled bool `gorm:"default:true;not null" json:"file_upload_enabled"`
|
||||
FileDownloadEnabled bool `gorm:"default:true;not null" json:"file_download_enabled"`
|
||||
CommandPolicyEnabled bool `gorm:"default:false;not null" json:"command_policy_enabled"`
|
||||
ApprovalRequired bool `gorm:"default:false;not null" json:"approval_required"`
|
||||
LastCleanupAt *time.Time `json:"last_cleanup_at,omitempty"`
|
||||
LastCleanupSummary string `gorm:"size:500" json:"last_cleanup_summary,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (AuditSettings) TableName() string { return "sys_audit_settings" }
|
||||
@@ -26,4 +33,4 @@ func IsValidRetentionDays(days int) bool {
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user