chat: Auto-install repository-configured plugins - #338945
Draft
Paul (pwang347) wants to merge 10 commits into
Draft
Paul (pwang347) wants to merge 10 commits into
Paul (pwang347) wants to merge 10 commits into
Conversation
Honor trusted workspace enabledPlugins as workspace-scoped activation overlays and install missing configured plugins without enabling them globally. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Publish repository-scoped plugin decisions through activeClientSet so Copilot, Claude, and Codex agent-host sessions resolve the same workspace overlay as local chat. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Multi-root scoping, restart metadata preservation, and first-turn activation ordering remain incorrect.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Aligns trusted repository plugin configuration with Copilot CLI behavior.
Changes:
- Adds repository-scoped plugin enablement and Agent Host forwarding.
- Automatically installs configured plugins and supports repository auto-update settings.
- Replaces recommendation prompts with activation and adds coverage/documentation.
| File | Description |
|---|---|
src/vs/workbench/contrib/mcp/test/common/pluginMcpDiscovery.test.ts |
Updates plugin service mock. |
src/vs/workbench/contrib/chat/test/common/plugins/workspacePluginSettingsService.test.ts |
Tests trust gating and marketplace parsing. |
src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts |
Tests repository auto-update behavior. |
src/vs/workbench/contrib/chat/test/common/plugins/fileBackedInstalledPluginsStore.test.ts |
Tests inventory readiness. |
src/vs/workbench/contrib/chat/test/common/plugins/agentPluginEnablement.test.ts |
Tests workspace overlays and policy precedence. |
src/vs/workbench/contrib/chat/test/browser/plugins/workspaceAgentPluginActivation.test.ts |
Tests automatic installation behavior. |
src/vs/workbench/contrib/chat/test/browser/plugins/pluginInstallService.test.ts |
Tests trust-prompt bypass. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/resolveCustomizationRefs.test.ts |
Tests Agent Host workspace enablement. |
src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.ts |
Trust-gates repository plugin settings. |
src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts |
Exposes inventory readiness and update settings. |
src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.ts |
Adds trust-bypass install options. |
src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.ts |
Exposes initialization completion. |
src/vs/workbench/contrib/chat/common/plugins/AGENTS_PLUGINS.md |
Documents repository activation. |
src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.ts |
Applies configured enablement overlays. |
src/vs/workbench/contrib/chat/common/plugins/agentPluginService.ts |
Exposes workspace enablement decisions. |
src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.ts |
Combines policy and workspace states. |
src/vs/workbench/contrib/chat/browser/workspaceAgentPluginActivation.ts |
Implements automatic repository installation. |
src/vs/workbench/contrib/chat/browser/pluginInstallService.ts |
Supports trusted configuration installs. |
src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.ts |
Removes the recommendation prompt. |
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts |
Registers automatic activation. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.ts |
Publishes workspace-scoped decisions. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve automatic-update eligibility from the current trusted repository marketplace configuration rather than the value captured when the plugin was installed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Match Copilot CLI repository-settings precedence and apply workspace enablement only to the plugin from the current repository marketplace source. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep repository-scoped install and activation while requiring user or managed settings to authorize silent updates to the shared plugin cache. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.

Fixes #336858.
Summary
enabledPluginsandextraKnownMarketplacesfrom trusted.github/copilot/settings(.local).jsonand.claude/settings(.local).jsonfiles.enabledPlugins: trueentries automatically with a disabled profile baseline, then activate them only for the repository.plugin@marketplaceidentity.falseas a repository-scoped disablement and preserve global state for absent entries.autoUpdatecannot override global updates being off.Testing
npm run typecheck-client- passed../scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/plugins/workspaceAgentPluginActivation.test.ts --run src/vs/workbench/contrib/chat/test/common/plugins/workspacePluginSettingsService.test.ts --run src/vs/workbench/contrib/chat/test/browser/agentSessions/resolveCustomizationRefs.test.ts --run src/vs/workbench/contrib/chat/test/common/plugins/agentPluginEnablement.test.ts --run src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts --run src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostUntitledProvisionalSessionService.test.ts --run src/vs/workbench/contrib/mcp/test/common/pluginMcpDiscovery.test.ts- 236/236 tests passed after addressing review feedback../scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/agentSessions/resolveCustomizationRefs.test.ts --run src/vs/workbench/contrib/chat/test/browser/plugins/workspaceAgentPluginActivation.test.ts --run src/vs/workbench/contrib/chat/test/browser/plugins/pluginInstallService.test.ts --run src/vs/workbench/contrib/chat/test/browser/plugins/pluginAutoUpdate.test.ts --run src/vs/workbench/contrib/chat/test/common/plugins/agentPluginEnablement.test.ts --run src/vs/workbench/contrib/chat/test/common/plugins/fileBackedInstalledPluginsStore.test.ts --run src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts --run src/vs/workbench/contrib/chat/test/common/plugins/workspacePluginSettingsService.test.ts --run src/vs/workbench/contrib/mcp/test/common/pluginMcpDiscovery.test.ts- 260/260 tests passed../scripts/test.sh --run src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts- 99/99 tests passed, including repository update-authorization regressions.v1installed, marketplace changes tov2) - the automatic updater pulled and re-fetched only the targeted marketplace and reported it updated.FFMPEG_PATH=/opt/homebrew/opt/ffmpeg-full/bin/ffmpeg FFPROBE_PATH=/opt/homebrew/opt/ffmpeg-full/bin/ffprobe node test/scenario/out/runScenario.js .build/vscode-playwright-mcp/repository-plugin-activation.cjs --dev- 3/3 steps passed on Code OSS Dev 1.141.0, macOS arm64.FFMPEG_PATH=/opt/homebrew/opt/ffmpeg-full/bin/ffmpeg FFPROBE_PATH=/opt/homebrew/opt/ffmpeg-full/bin/ffprobe node test/scenario/out/runScenario.js .build/vscode-playwright-mcp/repository-plugin-auto-update-live.cjs --dev- 6/6 steps passed. The scenario installed v1 from an isolated Git remote, published v2, proved repositoryautoUpdate: truecould not override global updates being off, then enabled only the user-global setting and observedgit fetch-> behind check -> automaticgit pull --ff-onlyplus v2 content on disk.autoUpdate: true, the installed clone remained at v1 while globalextensions.autoUpdatewas"off". Changing only the global setting to"on"advanced the clone to v2 without opening Customizations, reloading, or invoking Refresh.Deferred follow-ups
Evidence
Auto-install without confirmation
annotated.mp4
Automatic update trust boundary
annotated.mp4