Repository navigation
agentHost: grant sandbox write access to Canvas data - #348961
Conversation
Co-authored-by: Copilot <[email protected]>
|
No demo for |
There was a problem hiding this comment.
🔵 Needs a closer look
Live Canvas validation is still needed to confirm first-write creation of an absent extension-data directory while preserving parent and source-directory isolation.
No open issues 🎉
What changed in this PR
Adds sandbox write access to Canvas’s shared <COPILOT_HOME>/extension-data directory for Copilot Agent Host sessions, without granting access to the parent directory.
Changes:
- Carries Canvas enablement and Copilot home through session creation, resume, and subsequent sandbox updates.
- Adds the writable default while preserving conflicting path restrictions and managed writable-path policies.
- Adds focused policy tests and documents the access boundary.
No actionable findings remain. The PR reports passing type-checks and targeted tests; a live sandboxed Canvas write remains unverified.
| File | Description |
|---|---|
src/vs/workbench/contrib/sessions/providers/agentHost/AGENT_HOST_SESSIONS_PROVIDER.md |
Documents Canvas data access and its limits. |
src/vs/platform/agentHost/test/node/sandboxConfigForSdk.test.ts |
Tests the writable default and restriction precedence. |
src/vs/platform/agentHost/node/copilot/sandboxConfigForSdk.ts |
Computes policy-aware Canvas data grants. |
src/vs/platform/agentHost/node/copilot/copilotSessionSandbox.ts |
Retains extension home for sandbox configuration and attachment checks. |
src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts |
Passes extension enablement into launch-time sandbox configuration. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Supplies Copilot home when extensions are requested. |
Review effort: Balanced
tommieboings50-source
left a comment
There was a problem hiding this comment.
I don't ever know what I can or can not close
fixes #348764
Sandboxed Copilot Agent Host sessions with Canvas enabled request write access to
<COPILOT_HOME>/extension-dataon create and resume without granting the parent directory. Conflicting path restrictions and managed writable-path lists take precedence.Validation before porting to main: client type-check passed and 290 sandbox configuration and session launcher tests passed. A first write from a live sandboxed canvas provider was not verified.