(sandboxConfig *SandboxConfig)
| 219 | } |
| 220 | |
| 221 | func ensureDefaultAgentWritePath(sandboxConfig *SandboxConfig) { |
| 222 | if sandboxConfig == nil || sandboxConfig.Agent == nil { |
| 223 | return |
| 224 | } |
| 225 | if sandboxConfig.Agent.Config == nil { |
| 226 | sandboxConfig.Agent.Config = &SandboxRuntimeConfig{} |
| 227 | } |
| 228 | if sandboxConfig.Agent.Config.Filesystem == nil { |
| 229 | sandboxConfig.Agent.Config.Filesystem = &SRTFilesystemConfig{} |
| 230 | } |
| 231 | if slices.Contains(sandboxConfig.Agent.Config.Filesystem.AllowWrite, defaultAgentWorkspaceWritePath) { |
| 232 | return |
| 233 | } |
| 234 | sandboxConfig.Agent.Config.Filesystem.AllowWrite = append( |
| 235 | sandboxConfig.Agent.Config.Filesystem.AllowWrite, |
| 236 | defaultAgentWorkspaceWritePath, |
| 237 | ) |
| 238 | } |
| 239 | |
| 240 | // isSandboxEnabled checks if the sandbox is enabled (either explicitly or auto-enabled) |
| 241 | // Returns true when: |
no outgoing calls
no test coverage detected