Skip to content

feat(claude): support marketplace source matrix - #314

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
feat/187-s3-source-matrix
Sep 2, 2026
Merged

feat(claude): support marketplace source matrix#314
ScriptedAlchemy merged 1 commit into
mainfrom
feat/187-s3-source-matrix

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Slice 3 (part 3/3) of the #187 Claude parity pass: full marketplace plugin source matrix support in the authored claude.marketplace overlay.

  • Adds every documented source form to ClaudeMarketplacePluginSource: relative path string, github, git url, git+path subdir, npm, archive, and command — each with plan-time validation and claude.marketplace.plugin.source.* dotted diagnostics.
  • Integrity pins validated: 40-hex commit sha for github/git sources, sha256: prefixed digest for npm/archive, HTTPS-only archive URLs, command mode restricted to documented values.
  • Lifts the slice-2 headers/headersHelper restriction for archive sources (still inapplicable diagnostics on all other source types).
  • marketplace.schema.json expanded to a closed union over all source forms, with allOf conditionals (bare-name source requires pluginRoot; headers/headersHelper require archive source). Re-pinned in PROVENANCE with updated bytes/sha256.
  • Capability table (claude-2.1.250.json): sourceMatrix rows marked supported with dated doc citations.
  • Native proofs: claude plugin validate --strict accepts a marketplace document exercising every source form; negative proofs confirm the CLI rejects short SHAs, HTTP archive URLs, and unknown command modes.

Revisions

Test plan

  • Scoped suites: host-adapters, host-adapters.native (AGENT_BUNDLE_NATIVE_HOST_CONTRACTS=1), adapter-metadata, adapter-capability-states, plugin-bundle, artifact-validator — 396 tests, 0 failed, 0 skipped
  • pnpm -w typecheck
  • pnpm -w lint

Part of #187.

Validate and emit every documented distributed plugin source while preserving the generated relative default and archive authentication rules.
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a19b571

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agent-bundle Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T20:51:07.752402Z a19b571 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ScriptedAlchemy
ScriptedAlchemy merged commit f6997c2 into main Sep 2, 2026
7 of 8 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a19b5710cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1146 to +1148
const internalRelative =
declared.startsWith('./') &&
!declared.split('/').includes('..');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject backslash traversal in relative sources

On Windows desktop, a source such as ./plugin\..\outside passes this check because only / delimits the searched segments, but Windows resolves it outside the marketplace directory. This contradicts the diagnostic's containment guarantee and can make the emitted marketplace load an adjacent directory; split on both slash forms, as the new git-subdir validation already does, and apply the same rule in the schema.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed on main in #354 (merge bb0754f).

"source": { "const": "archive" },
"url": {
"format": "uri",
"pattern": "^https://(?!(?:localhost|[^/]+\\.localhost|127(?:\\.[0-9]{1,3}){3}|169\\.254(?:\\.[0-9]{1,3}){2}|metadata(?:\\.google(?:\\.internal)?)?|metadata\\.azure\\.internal|instance-data\\.ec2\\.internal)(?::[0-9]+)?/)",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow origin-root archive URLs

When an archive is served directly from an origin and the author specifies an equivalent URL such as https://artifacts.example.test, isSafeArchiveUrl() accepts it, but this schema pattern requires a literal / after the authority. The subsequent validateMarketplace call therefore rejects the generated document and prevents the marketplace from being emitted; permit end-of-string after the authority or normalize the URL before validation.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed on main in #354 (merge bb0754f).

ScriptedAlchemy added a commit that referenced this pull request Sep 3, 2026
* fix(claude): validate numeric config bounds in artifacts (#287 r3911238592)

* fix(claude): reject marketplace backslash traversal (#314 r3918535243)

* fix(claude): validate authority-only archive hosts (#314 r3918535249)

* fix(replay): preserve invocation provenance in renderers (#322 r3919341927)

* fix(replay): derive workspace from cursor roots (#322 r3919341940)

* fix(dev): invalidate watcher on chmod changes (#329 r3919499846)

* chore: add framework review fixes changeset
@ScriptedAlchemy
ScriptedAlchemy deleted the feat/187-s3-source-matrix branch September 3, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant