feat: optimize security and deployment of agent skills

This commit is contained in:
nullkey
2026-02-04 17:11:58 +08:00
committed by lyingbug
parent 3f21345546
commit 43a2c647ea
19 changed files with 1335 additions and 154 deletions
+1
View File
@@ -40,6 +40,7 @@ type AgentConfig struct {
AllowedSkills []string `json:"allowed_skills"` // Skill names whitelist (empty = allow all)
SandboxMode string `json:"sandbox_mode"` // Sandbox mode: "docker", "local", "disabled" (default: "disabled")
SandboxTimeout int `json:"sandbox_timeout"` // Script execution timeout in seconds (default: 60)
DockerImage string `json:"docker_image"` // Custom sandbox Docker image (default: wechatopenai/weknora-sandbox:latest)
}
// SessionAgentConfig represents session-level agent configuration
+2
View File
@@ -103,6 +103,8 @@ type CustomAgentConfig struct {
SandboxMode string `yaml:"sandbox_mode" json:"sandbox_mode"`
// Script execution timeout in seconds (default: 60)
SandboxTimeout int `yaml:"sandbox_timeout" json:"sandbox_timeout"`
// Custom sandbox Docker image (default: wechatopenai/weknora-sandbox:latest)
DockerImage string `yaml:"docker_image" json:"docker_image"`
// ===== Knowledge Base Settings =====
// Knowledge base selection mode: "all" = all KBs, "selected" = specific KBs, "none" = no KB