feat(#1855): add Claude plugin marketplace manifest

Add .claude-plugin/marketplace.json so Claude-plugin-compatible runtimes
(ZCODE et al.) discover gsd-core from a custom marketplace source. The
canonical version lives at plugins[0].version and tracks package.json via
the release version-sync.

Refactor scripts/sync-manifest-versions.cjs so VERSIONED_MANIFESTS entries
are {path, versionKey} dot-path descriptors (default 'version'); register
marketplace.json with versionKey 'plugins.0.version'. getByPath/setByPath
reject __proto__/constructor/prototype (prototype-pollution guard).
plugin.json / gemini-extension.json behavior is unchanged.

- tests/issue-1855-marketplace-manifest.test.cjs: schema + version-sync guard
- tests/issue-844-manifest-version-sync.test.cjs: updated for descriptor shape
- VERSIONING.md + auto-backmerge VERSION_STAMP_MANIFESTS: include marketplace.json
- docs/how-to/install-on-your-runtime.md: marketplace discovery how-to
This commit is contained in:
Tom Boucher
2026-07-01 11:06:21 -04:00
parent 251cfa1f3c
commit 2391632973
8 changed files with 369 additions and 45 deletions

View File

@@ -107,14 +107,15 @@ describe('Require Issue Link back-merge automation carve-out', () => {
describe('Auto-backmerge needs_review version-manifest carve-out (#1404)', () => {
const workflow = readWorkflow('.github/workflows/auto-backmerge.yml');
test('all four version manifests are filtered via version-only detection', () => {
// package.json / package-lock.json / plugin.json / gemini-extension.json
// diverge every release; a drop that is ONLY "version" lines must not park
// (parking is what lets the back-merge go stale). A substantive change still
// parks. (#1404)
test('all version-bearing manifests are filtered via version-only detection', () => {
// package.json / package-lock.json / plugin.json / marketplace.json /
// gemini-extension.json diverge every release; a drop that is ONLY
// "version" lines must not park (parking is what lets the back-merge go
// stale). A substantive change still parks. The grep matches the indented
// "version": line for marketplace.json's plugins[0].version too. (#1404 / #1855)
assert.ok(
workflow.includes("VERSION_STAMP_MANIFESTS='package.json package-lock.json .claude-plugin/plugin.json gemini-extension.json'"),
'auto-backmerge.yml must version-only-filter all four version manifests'
workflow.includes("VERSION_STAMP_MANIFESTS='package.json package-lock.json .claude-plugin/plugin.json .claude-plugin/marketplace.json gemini-extension.json'"),
'auto-backmerge.yml must version-only-filter all version-bearing manifests (incl. marketplace.json #1855)'
);
assert.ok(
workflow.includes(`grep -vE '^[+-][[:space:]]*"version":'`),