Skip to content

Add ChatPluginMarketplaces enterprise policy#315352

Draft
Miaku wants to merge 1 commit intomicrosoft:mainfrom
Miaku:miaku/chat-plugin-marketplaces-policy
Draft

Add ChatPluginMarketplaces enterprise policy#315352
Miaku wants to merge 1 commit intomicrosoft:mainfrom
Miaku:miaku/chat-plugin-marketplaces-policy

Conversation

@Miaku
Copy link
Copy Markdown

@Miaku Miaku commented May 8, 2026

Add ChatPluginMarketplaces enterprise policy

Summary

Adds a policy block to the existing chat.plugins.marketplaces configuration so that the list of plugin marketplaces queried by chat (Agent Customizations) can be locked down by enterprise admins via Group Policy / Intune / .plist, per the enterprise policies docs.

Motivation

Today, chat.plugins.marketplaces (chat.contribution.ts#L873-L882) defaults to:

["github/copilot-plugins", "github/awesome-copilot"]

…and is freely overridable in user settings. Enterprises that want their developers to only consume plugins from an internal, vetted marketplace (e.g. a curated repo on GitHub Enterprise or a private org) currently have no way to enforce this. Any user can point chat at an arbitrary repo by editing settings.json.

Adding a policy block exposes the setting through the same managed-config channels as ChatApprovedAccountOrganizations, ChatAgentMode, ExtensionGalleryServiceUrl, etc. — making this safe to deploy in regulated/compliance-sensitive environments.

Change

Single change: extend the existing schema entry with a policy block (mirrors the pattern used by chat.approvedAccountOrganizations, which is also a type: 'array' policy):

[ChatConfiguration.PluginMarketplaces]: {
    type: 'array',
    items: { type: 'string' },
    markdownDescription: nls.localize('chat.plugins.marketplaces', "..."),
    default: ['github/copilot-plugins', 'github/awesome-copilot'],
    scope: ConfigurationScope.APPLICATION,
    tags: ['experimental'],
    policy: {
        name: 'ChatPluginMarketplaces',
        category: PolicyCategory.InteractiveSession,
        minimumVersion: '1.NNN',  // <-- to be set by VS Code maintainers
        localization: {
            description: { ... }
        }
    }
}

When the policy is set, the list is locked: accountPolicyService / multiplexPolicyService will override the user setting and only the policy-supplied marketplaces are queried.

Open questions for maintainers

  1. minimumVersion — placeholder 1.NNN needs to be replaced with the target Insiders/stable version.
  2. policyData.jsonc entry — once minimumVersion is fixed, a corresponding entry should be added to build/lib/policies/policyData.jsonc so the ADMX/.plist artifacts pick it up.
  3. Stability — the setting is currently tags: ['experimental']. Adding a policy implies some commitment to schema stability; happy to defer if the team would rather wait for GA.
  4. Workspace-level extraKnownMarketplaces (workspacePluginSettingsService.ts) — should the policy also override these, or is it acceptable for workspace JSON to add additional marketplaces on top of policy-pinned ones? My read: policy should be the floor (always present) but workspace extraKnownMarketplaces should still be additive. Open to either interpretation.

Testing

  • Schema change compiles (npm run compile).
  • Manual: set ChatPluginMarketplaces via registry / defaults write, confirm user setting is overridden.
  • policyData.jsonc regeneration once minimumVersion is finalized.

Notes

Filed as a draft to start the conversation. Happy to address the open questions above and follow up with the policyData.jsonc entry once version is settled.

Adds a policy block to the chat.plugins.marketplaces setting so admins can lock the list of plugin marketplaces queried by chat (e.g. to a curated internal marketplace) via Group Policy / Intune / .plist, matching the existing pattern used by ChatApprovedAccountOrganizations.
Copilot AI review requested due to automatic review settings May 8, 2026 19:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an enterprise policy hook to the existing chat.plugins.marketplaces setting so enterprise admins can manage/lock down the marketplaces queried by chat via managed policy channels.

Changes:

  • Adds a policy block to chat.plugins.marketplaces with name ChatPluginMarketplaces under PolicyCategory.InteractiveSession.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/chat.contribution.ts Adds an enterprise policy definition for the plugin marketplaces configuration setting.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/chat/browser/chat.contribution.ts:886

  • minimumVersion must match the PolicyDefinition.minimumVersion type (${number}.${number}), so '1.NNN' will fail TypeScript compilation. Please replace this placeholder with a concrete VS Code version like the other policies in this file (e.g. '1.116').
				name: 'ChatPluginMarketplaces',
				category: PolicyCategory.InteractiveSession,
				minimumVersion: '1.NNN',
				localization: {
  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines +882 to +885
policy: {
name: 'ChatPluginMarketplaces',
category: PolicyCategory.InteractiveSession,
minimumVersion: '1.NNN',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants