feat: adjust sandbox setting of agentConfig

This commit is contained in:
nullkey
2026-02-04 19:59:59 +08:00
committed by lyingbug
parent 43a2c647ea
commit 03446f35d3
6 changed files with 42 additions and 36 deletions
-3
View File
@@ -38,9 +38,6 @@ type AgentConfig struct {
SkillsEnabled bool `json:"skills_enabled"` // Whether skills are enabled (default: false)
SkillDirs []string `json:"skill_dirs"` // Directories to search for skills
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
-7
View File
@@ -99,13 +99,6 @@ type CustomAgentConfig struct {
SkillsSelectionMode string `yaml:"skills_selection_mode" json:"skills_selection_mode"`
// Selected skill names (only used when SkillsSelectionMode is "selected")
SelectedSkills []string `yaml:"selected_skills" json:"selected_skills"`
// Sandbox mode for skill script execution: "docker", "local", "disabled" (default: "docker" when skills enabled)
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
KBSelectionMode string `yaml:"kb_selection_mode" json:"kb_selection_mode"`