feat(permissions): map copilot.sandbox to VS Code Agent Host sandbox settings - #3514
Merged
Merged
Conversation
…settings Add a `copilot.sandbox` permissions override that writes the `chat.agent.sandbox.*` settings VS Code 1.141 settled on for the Agent Host sandbox (enabled, network, unsandboxed commands, MCP/LSP servers, credentials, file system) to `.vscode/settings.json`. Only stated leaves are written, `userConfiguredPaths` merges per list, values that loosen the sandbox are reported in one warning, and import reads the keys back. The deprecated 1.138 shapes are not modeled. Refs #2401 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012y9fNo2AAJdGocxvsHtDhv
…pilot-upstream # Conflicts: # src/generated/docs-content.ts
…pilot-upstream # Conflicts: # src/generated/docs-content.ts
…pilot-upstream # Conflicts: # src/generated/docs-content.ts
…pilot-upstream # Conflicts: # src/generated/docs-content.ts
…ngs.json owned-keys comment Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012y9fNo2AAJdGocxvsHtDhv
…pilot-upstream # Conflicts: # src/generated/docs-content.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the sandbox item still open in #2401, against the key shapes VS Code 1.141 settled on for the Agent Host sandbox.
copilot.sandboxpermissions override. Each leaf maps to the flat settingchat.agent.sandbox.<path>in.vscode/settings.json:enabled(off/on)network.allowNetwork,network.allowLocalNetworkallowUnsandboxedCommands,mcpServers,lspServerscredentials.authenticategit,credentials.authenticateghfileSystem.allowDevToolAccessfileSystem.userConfiguredPaths(readwritePaths/readonlyPaths/deniedPaths)chat.agent.sandbox.allowNetwork,.fileSystem.linux|mac|windows) are not modeled, since the Agent Host ignores them.userConfiguredPathsmerges per list, so authoringreadwritePathskeeps a hand-writtendeniedPaths.enabled: "off",allowLocalNetwork: true,mcpServers: false, a non-emptyreadwritePaths, and so on) are written but reported in one warning. This uses the sharedsandbox-trusthelpers.copilot.sandbox..vscode/settings.jsonownedKeysdeclaration.docs/reference/file-formats.mdand the embedded docs are updated.Key names, types and enum values were checked against:
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts. None of the keys setsscope, so workspace values apply, and all arerestricted, so they apply only in trusted workspaces.The
network.allowedDomains/deniedDomainsexample on the sandboxing page is not mapped, because VS Code does not register those settings.Refs #2401
Still open in #2401 (not in this PR)
chat.tools.eligibleForAutoApproval(experimental) /chat.tools.global.autoApprove~/.copilot/mcp-config.json,.mcp.json), which still has a collision design question withcopilotcli/claudecodecopilot-pluginpackaging,REVIEW.md, dictation filescommandWindows↔windowsmapping questionreadpremise commentTest plan
pnpm cicheck🤖 Generated with Claude Code
https://claude.ai/code/session_012y9fNo2AAJdGocxvsHtDhv