Skip to content

feat(sandbox): per-server profiles and tole sandbox list|show|set (#810) - #821

Merged
ajianaz merged 3 commits into
developfrom
feat/sandbox-profiles-cli
Nov 15, 2026
Merged

ajianaz merged 3 commits into
developfrom
feat/sandbox-profiles-cli

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What

Named sandbox profiles and per-server bindings in the user config, with tole sandbox list, show and set. Second slice of #750.

Why

Grants should be declared once as a profile and referenced by server name. The owner needs a way to inspect and change a binding without hand-editing the file. A project config must still never loosen the sandbox.

Changes

Testing

  • Core unit tests for profile_for, per-server argv and the doctor lines.
  • Config tests for parsing, bad values naming the key, user-only layering and the effective source.
  • tole-cli integration tests (tests/sandbox_cli.rs) on the real binary, using TestDir.
  • cargo fmt, clippy --workspace --all-targets --all-features -D warnings, tests of tole-core and tole-cli, and the --no-default-features profiles.
  • Local Cora (scripts/review-local.sh): no findings. No LLM was configured here, so only the deterministic checks ran.

Closes #810

What
Named sandbox profiles and per-server bindings in the user config, with tole sandbox list, show and set.

Why
Second slice of #750: grants should be declared once as a profile and referenced by server name, and the owner needs a way to inspect and change a binding without hand-editing, while a project config can still never loosen the sandbox.

Changes
- [sandbox.profiles.<name>] (workspace, network, read, write) and [sandbox.servers.<name>] profile; [sandbox] profile may name a defined profile. server and strict stay built in.
- tole_core::sandbox: Policy.servers and Policy::profile_for; a launch uses the server's own profile (grants re-checked per launch as before).
- tole sandbox list|show <server>|set <server> --profile <p>: reads and writes the user config only, keeps the rest of the file, re-parses and refuses an edit that changes anything but the binding, owner-only (refuses under an agent session).
- tole config check prints the effective profile of the default and of each bound server with its source; project sandbox lines stay IGNORED.
- docs/sandbox-design.md section 6.1, epics, README, CHANGELOG.

Testing
Core unit tests for profile_for and per-server argv; config tests for parsing, bad values naming the key, user-only layering and effective source; tole-cli integration tests (tests/sandbox_cli.rs) on the real binary with TestDir; cargo fmt, clippy --workspace --all-targets --all-features -D warnings, tests of tole-core and tole-cli, and the --no-default-features profiles.

Closes #810
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 033c429 into develop Nov 15, 2026
22 checks passed
@ajianaz
ajianaz deleted the feat/sandbox-profiles-cli branch November 20, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(sandbox): per-server profiles and CLI flags to manage the sandbox (#750 part 2)

2 participants