Repository navigation
plugins: support installing single-plugin source repos - #314263
Merged
Connor Peet (connor4312) merged 1 commit intoMay 4, 2026
Merged
Conversation
Allow `installPluginFromSource` to install repositories that ship a single plugin manifest at the root (e.g. `.claude-plugin/plugin.json`) instead of requiring a `marketplace.json` index. When the marketplace scan returns no plugins, we now fall back to detecting a plugin manifest at the repo root, treating the cloned repo itself as one plugin. - Adds `readSinglePluginManifest` to `IPluginMarketplaceService`, mirroring the existing `MARKETPLACE_DEFINITIONS` table with `.plugin/plugin.json`, `.claude-plugin/plugin.json`, and root `plugin.json` candidates (order matches `detectPluginFormat`). - Wires the fallback into `_doInstallFromSource`: on a hit we install via the existing git-source path so the temp clone is reused. Single-plugin repos are not added to `chat.plugins.marketplaces` config since they are not marketplaces. - Honors `options.plugin` name matching for parity with the marketplace path. - Updates `_hydratePluginMetadata` to fall back to the same single-plugin lookup so installed entries survive a window reload. - Adds install-service tests covering the success, name-mismatch, and no-manifest-found paths. (Commit message generated by Copilot)
Contributor
Screenshot ChangesBase: Changed (8)Errored (18)Fixtures that failed to render — no screenshot was produced.
|
TylerLeonhardt
approved these changes
May 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the chat plugin install flow to support “single-plugin source repos” (repos that contain a single plugin manifest at the repo root) in addition to marketplace-indexed repos, and ensures installed entries can be re-hydrated after reload.
Changes:
- Add
readSinglePluginManifest(...)to the plugin marketplace service to detect a single plugin manifest when nomarketplace.jsonis present. - Wire the single-plugin fallback into
installPluginFromSourceand metadata hydration. - Add tests covering single-plugin install success and failure cases.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/plugins/pluginInstallService.test.ts | Adds coverage for the single-plugin fallback install paths. |
| src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts | Introduces single-plugin manifest detection and uses it during metadata hydration. |
| src/vs/workbench/contrib/chat/browser/pluginInstallService.ts | Uses the new fallback when marketplace scanning returns no plugins. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 1
Comment on lines
+829
to
+835
| const sourceDescriptor: IPluginSourceDescriptor = reference.kind === MarketplaceReferenceKind.GitHubShorthand | ||
| ? { kind: PluginSourceKind.GitHub, repo: reference.githubRepo! } | ||
| : { kind: PluginSourceKind.GitUrl, url: reference.cloneUrl }; | ||
|
|
||
| const manifestName = typeof manifest['name'] === 'string' && manifest['name'] ? manifest['name'] as string : reference.displayLabel; | ||
| const manifestDescription = typeof manifest['description'] === 'string' ? manifest['description'] as string : ''; | ||
| const manifestVersion = typeof manifest['version'] === 'string' ? manifest['version'] as string : ''; |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
plugins: support installing single-plugin source reposAllow
installPluginFromSourceto install repositories that ship a single plugin manifest at theroot (e.g..claude-plugin/plugin.json) instead of requiring amarketplace.jsonindex. When themarketplace scan returns no plugins, we now fall back to detecting a plugin manifest at the reporoot, treating the cloned repo itself as one plugin.- AddsreadSinglePluginManifesttoIPluginMarketplaceService, mirroring the existingMARKETPLACE_DEFINITIONStable with.plugin/plugin.json,.claude-plugin/plugin.json, and rootplugin.jsoncandidates (order matchesdetectPluginFormat).- Wires the fallback into_doInstallFromSource: on a hit we install via the existing git-source path so the temp clone is reused. Single-plugin repos are not added tochat.plugins.marketplacesconfig since they are not marketplaces.- Honorsoptions.pluginname matching for parity with the marketplace path.- Updates_hydratePluginMetadatato fall back to the same single-plugin lookup so installed entries survive a window reload.- Adds install-service tests covering the success, name-mismatch, and no-manifest-found paths.(Commit message generated by Copilot)