fix(marketplace): switch source from '.' to url-form (#37 Phase 4 verify caught the §1 weakest spot) #2

Merged
claude-ceo-assistant merged 1 commits from fix/marketplace-source-url-form into main 2026-05-07 09:23:45 +00:00

What

Phase 4 E2E install verify of internal#37 caught a real failure: source: "." (relative-path form) is not supported in Claude Code 2.1.132. The url-form works.

This was molecule-mcp-claude-channel#1's §1 weakest-spot prediction made true — and the fix is the one-line change Phase 4 forecast.

Phase 4 verify transcript

Round 1 (current main with source: "."):

$ claude plugin marketplace add https://git.moleculesai.app/molecule-ai/molecule-mcp-claude-channel.git
✔ Successfully added marketplace: molecule-channel (declared in user settings)

$ claude plugin install molecule@molecule-channel
✘ Failed to install plugin "molecule@molecule-channel": This plugin uses a source type your Claude Code version does not support. Update Claude Code and try again.

$ claude plugin list
No plugins installed.

Round 2 (this PR's url-form):

$ claude plugin marketplace add /tmp/molecule-mcp-claude-channel  # local clone with edited marketplace.json
✔ Successfully added marketplace: molecule-channel (declared in user settings)

$ claude plugin install molecule@molecule-channel
✔ Successfully installed plugin: molecule@molecule-channel (scope: user)

$ claude plugin list
Installed plugins:
  ❯ molecule@molecule-channel
    Version: 0.4.0-gitea.1
    Scope: user
    Status: ✔ enabled

Verified on operator host 5.78.80.188 in clean node:20-bookworm container.

Change (1 file)

.claude-plugin/marketplace.json:

-      "source": ".",
+      "source": {
+        "source": "url",
+        "url": "https://git.moleculesai.app/molecule-ai/molecule-mcp-claude-channel.git"
+      },

Per Claude Code marketplace docs (plugin-marketplaces — "Plugin sources" section), source accepts three formats:

  1. Relative path string ("./<path>") — for plugins inside the marketplace's own repo. Apparently version-gated; not yet supported in 2.1.132 stable.
  2. GitHub object ({"source": "github", "repo": "owner/repo"}) — GitHub-only.
  3. URL object ({"source": "url", "url": "https://..."}) — works with arbitrary git host (Gitea, GitLab, self-hosted, etc.). Use this for portability.

URL form points back at the same repo — it's a self-reference but Claude Code resolves it correctly (clone happens once during marketplace add; install reads from the cached clone).

DoD

Pure-config PR. No tests / observation / migration / version bump. Same version (0.4.0-gitea.1) since the plugin code itself didn't change — only the install-mechanism.

Hostile self-review (3 weakest spots)

  1. The url-form embeds the canonical Gitea URL — moves with us if Gitea hostname changes. Self-referential; if we relocate to a different Gitea instance the marketplace.json needs editing. Mitigation: the marketplace.json's homepage field already references the same URL; both move together. Accepted: same constraint that always applied to a single-source-of-truth URL.
  2. Phase 4 verify ran against /tmp/molecule-mcp-claude-channel local clone, not against the Gitea remote, because I was testing the source-form fix before the PR landed. Once this PR merges, the url-form is in main, and a verify against the Gitea remote URL closes the loop. Mitigation: planning a re-verify after merge.
  3. Doesn't address whether source: "." will work in a future Claude Code version. The agent's research suggested "." IS the canonical form per docs but isn't yet supported in 2.1.132. If Claude Code 2.2+ adds support, a contributor might want to revert to "." for cleanliness. Mitigation: the url-form ALWAYS works; even if "." is later supported, no urgency to change. Accepted: working > clean.

Refs

## What **Phase 4 E2E install verify** of [internal#37](https://git.moleculesai.app/molecule-ai/internal/issues/37) caught a real failure: `source: "."` (relative-path form) is not supported in Claude Code 2.1.132. The url-form works. This was [molecule-mcp-claude-channel#1](https://git.moleculesai.app/molecule-ai/molecule-mcp-claude-channel/pulls/1)'s **§1 weakest-spot prediction made true** — and the fix is the one-line change Phase 4 forecast. ## Phase 4 verify transcript **Round 1** (current main with `source: "."`): ``` $ claude plugin marketplace add https://git.moleculesai.app/molecule-ai/molecule-mcp-claude-channel.git ✔ Successfully added marketplace: molecule-channel (declared in user settings) $ claude plugin install molecule@molecule-channel ✘ Failed to install plugin "molecule@molecule-channel": This plugin uses a source type your Claude Code version does not support. Update Claude Code and try again. $ claude plugin list No plugins installed. ``` **Round 2** (this PR's url-form): ``` $ claude plugin marketplace add /tmp/molecule-mcp-claude-channel # local clone with edited marketplace.json ✔ Successfully added marketplace: molecule-channel (declared in user settings) $ claude plugin install molecule@molecule-channel ✔ Successfully installed plugin: molecule@molecule-channel (scope: user) $ claude plugin list Installed plugins: ❯ molecule@molecule-channel Version: 0.4.0-gitea.1 Scope: user Status: ✔ enabled ``` Verified on operator host `5.78.80.188` in clean `node:20-bookworm` container. ## Change (1 file) `.claude-plugin/marketplace.json`: ```diff - "source": ".", + "source": { + "source": "url", + "url": "https://git.moleculesai.app/molecule-ai/molecule-mcp-claude-channel.git" + }, ``` Per Claude Code marketplace docs ([plugin-marketplaces](https://code.claude.com/docs/en/plugin-marketplaces.md) — "Plugin sources" section), source accepts three formats: 1. **Relative path string** (`"./<path>"`) — for plugins inside the marketplace's own repo. Apparently version-gated; not yet supported in 2.1.132 stable. 2. **GitHub object** (`{"source": "github", "repo": "owner/repo"}`) — GitHub-only. 3. **URL object** (`{"source": "url", "url": "https://..."}`) — works with arbitrary git host (Gitea, GitLab, self-hosted, etc.). **Use this for portability.** URL form points back at the same repo — it's a self-reference but Claude Code resolves it correctly (clone happens once during marketplace add; install reads from the cached clone). ## DoD Pure-config PR. No tests / observation / migration / version bump. Same `version` (0.4.0-gitea.1) since the plugin code itself didn't change — only the install-mechanism. ## Hostile self-review (3 weakest spots) 1. **The url-form embeds the canonical Gitea URL — moves with us if Gitea hostname changes.** Self-referential; if we relocate to a different Gitea instance the marketplace.json needs editing. *Mitigation*: the marketplace.json's `homepage` field already references the same URL; both move together. *Accepted*: same constraint that always applied to a single-source-of-truth URL. 2. **Phase 4 verify ran against /tmp/molecule-mcp-claude-channel local clone, not against the Gitea remote**, because I was testing the source-form fix before the PR landed. Once this PR merges, the url-form is in main, and a verify against the Gitea remote URL closes the loop. *Mitigation*: planning a re-verify after merge. 3. **Doesn't address whether `source: "."` will work in a future Claude Code version.** The agent's research suggested `"."` IS the canonical form per docs but isn't yet supported in 2.1.132. If Claude Code 2.2+ adds support, a contributor might want to revert to `"."` for cleanliness. *Mitigation*: the url-form ALWAYS works; even if `"."` is later supported, no urgency to change. *Accepted*: working > clean. ## Refs - Parent: [internal#37](https://git.moleculesai.app/molecule-ai/internal/issues/37) (Phase 4 verify) - Predecessor: [molecule-mcp-claude-channel#1](https://git.moleculesai.app/molecule-ai/molecule-mcp-claude-channel/pulls/1) (where the §1 weakest-spot was called out + the install path was first set up) - Phase 1 findings: [internal#38](https://git.moleculesai.app/molecule-ai/internal/issues/38)
claude-ceo-assistant added 1 commit 2026-05-07 09:22:19 +00:00
fix(marketplace): switch source from '.' to url-form (#37 Phase 4 verify)
Some checks failed
Test / bun test (pull_request) Failing after 17s
a6a61b78d0
Phase 4 E2E install verify of #37 (clean Docker container,
node:20-bookworm, Claude Code 2.1.132 latest stable):

Step 1: claude plugin marketplace add — SUCCEEDED (marketplace.json
recognized, validated, registered as 'molecule-channel').

Step 2: claude plugin install molecule@molecule-channel — FAILED with:
'This plugin uses a source type your Claude Code version does not
support. Update Claude Code and try again.'

Root cause: source: '.' (relative-path form) is not supported in
Claude Code 2.1.132. The url-form is supported and works
identically:

  source:
    source: url
    url: https://git.moleculesai.app/molecule-ai/molecule-mcp-claude-channel.git

Re-tested with the url-form: claude plugin install succeeded; plugin
appears in 'claude plugin list' as 'molecule@molecule-channel'
v0.4.0-gitea.1, status: enabled.

This is exactly the §1 weakest spot in molecule-mcp-claude-channel#1's
hostile self-review:
  '"source: "."" in marketplace.json is a guess at semantics. The
  Claude Code docs confirm source accepts a local path or git URL
  but don't give an example for "the plugin is at the marketplace
  root". "." is the conventional same-dir-as-marketplace.json
  semantic; if it's wrong, claude plugin install fails fast in
  Phase 4 with a clear error and the fix is one line.'

The fix IS one line. Phase 4 forecast was correct.

Refs: molecule-ai/internal#37 (Phase 4)
claude-ceo-assistant merged commit 9d43fb096a into main 2026-05-07 09:23:45 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: molecule-ai/molecule-mcp-claude-channel#2
No description provided.