-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Parent Issue
Sub-issue of #344 (Leverage Additional SDK v0.2.25 Capabilities)
Follow-up to #350 (Configure sandbox settings for execution safety)
Feature Type
Configuration schema (config.yaml)
Problem or Need
The sandbox configuration added in #350 requires users to manually specify all SDK sandbox fields (enabled, autoAllowBashIfSandboxed, network settings, etc.). For common use cases, this is verbose and error-prone. Users need to understand the SDK's sandbox semantics to configure it correctly.
For example, a "lock down everything except network" configuration currently requires:
execution:
sandbox:
enabled: true
auto_allow_bash_if_sandboxed: true
allow_unsandboxed_commands: false
network:
allowed_domains: ["*"]Proposed Solution
Add named preset profiles that expand to preconfigured SandboxConfig values:
execution:
sandbox:
preset: "standard" # or "strict", "permissive"Suggested presets:
| Preset | enabled |
auto_allow_bash_if_sandboxed |
Network | Notes |
|---|---|---|---|---|
permissive |
true |
true |
unrestricted | Minimal sandbox, just enables the feature |
standard |
true |
true |
unrestricted | Default choice for most plugin evaluations |
strict |
true |
false |
restricted | For evaluating untrusted plugins |
Implementation approach:
- Add
SandboxPresetSchemaenum tosrc/config/schema.ts - Add
presetfield toSandboxConfigSchema(mutually exclusive with manual fields, or preset provides defaults that manual fields override) - Add preset expansion logic in
src/stages/3-execution/environment-options.tsbefore the snake→camelCase mapping - Add tests for each preset and preset + override combinations
Design decision needed: Should preset be a base that individual fields override, or should preset and manual fields be mutually exclusive?
Pipeline Stage Affected
Stage 3 - Execution
Component Type (if applicable)
Not component-specific
Alternatives Considered
- No presets (current state from [Feature]: Configure sandbox settings for execution safety #350): Works but verbose for common cases
- CLI flags only:
--sandbox-preset strict— simpler but less configurable - Preset + override hybrid: Preset sets baseline, individual fields override — most flexible but more complex validation
How important is this feature to you?
Low - Just a suggestion
Additional Context
This was explicitly deferred from #350 to keep the initial implementation simple. The base SandboxConfig schema and buildSandboxOptions() mapping are already in place, making preset expansion straightforward to add on top.
🤖 Created with Claude Code