feat(core): M5.2 — marketplace install (gh/npm) + ed25519 + revoked.json#29
Merged
Conversation
· packages/core/src/plugins/install.ts (NEW)
- installFromGithub('gh:owner/repo[@ref]') — git clone --depth 1 →
installLocal → cleanup staging. Optional @ref for version pin.
- installFromNpm('<pkg>@npm') — `npm pack` → extract tarball →
installLocal. Doesn't write to global npm registry.
- installFromSpec(spec) — polymorphic dispatch (gh: / @npm / local path).
- uninstallPlugin(name) — removes ~/.deepcode/plugins/<name>/ +
trust manifest entry. Idempotent.
· packages/core/src/plugins/marketplace.ts (NEW, ~190 lines)
- verifyEntrySignature(entry) — ed25519 verify of
`${name}|${version}|${sourceHash}` against publisherPubKey (DER SPKI).
- isRevoked(entry, list) — exact match on name+version+sourceHash.
- fetchIndex(url) / fetchRevoked(baseUrl) — HTTP GET + JSON parse;
404 on revoked.json silently → empty list.
- resolveEntry({ marketplaceUrl, name, version? }) — picks highest
matching version, verifies sig, refuses revoked.
- loadMarketplaceConfig / saveMarketplaceConfig / addMarketplace
operate on ~/.deepcode/marketplaces.json.
Tests: +15 marketplace + 0 install (install is integration-only — see
BEHAVIOR_PARITY note). core 401 → 416; cli 47 unchanged. Total 448 → 463.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
installFromGithub/installFromNpm/installFromSpec + uninstallPlugin + marketplace ed25519 verifier + revoked.json + addMarketplace. 15 new tests (sig tamper + revocation + index/revoked fetch + config roundtrip + addMarketplace). 448→463 passing.