SIGN IN SIGN UP

plugins: support installing single-plugin source repos (#314263)

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)
C
Connor Peet committed
f3dfc73ac7d6e295601a9f211ac406ab534e5fe1
Parent: e1a8956
Committed by GitHub <noreply@github.com> on 5/4/2026, 11:04:36 PM