The plugin CLI signs and publishes releases. The registry reviews them; only approved, non-yanked releases can be installed.
CLI commands
Run the CLI with Node’s type stripping:
node --experimental-strip-types packages/plugin-cli/bin/edgecart-plugin.mjs \
<command>| Command | Purpose |
|---|---|
keygen [--out key.json] |
Generate an Ed25519 keypair. The private key is written with 0600 permissions. |
validate <manifest.json> |
Parse the manifest and print the plugin id, version, and trust hash. |
publish <manifest.json> <bundle.js> --endpoint <url> --api-key <key> --private-key <base64> |
Sign the bundle and POST it to /v1/releases. |
The bundle must be one self-contained JavaScript module, at most 10 MiB.
Publishers
- In Admin → Plugin registry, create a publisher.
- Paste the base64 SPKI public key from
keygen. - Create a publisher API key. It is shown once; the registry stores only its SHA-256 hash.
- Keep the private key local.
Registry operations require the operator’s email in PLATFORM_ADMIN_EMAILS.
An unset allow-list fails closed.
Signing and trust
Releases are signed over:
pluginId@version + trustHash + bundleHashThe trust hash is computed over the canonical manifest contract: capabilities, allowed hosts, storage, hooks, routes, admin/storefront declarations, and limits. The install consent shows the hash so a merchant can confirm what they are granting.
Publishing verifies the R2 object’s size and SHA-256 before the release becomes installable.
Review and lifecycle
- New releases start as
pending. - An operator can approve or reject a release.
- Yank is the kill switch: new installs and upgrades are rejected, active installations stop receiving hooks, and host calls with tokens signed before the yank are rejected.
- Reinstate re-checks the per-hook fan-out under the store’s control-plane lock.
- Upgrades and rollbacks are consented full-release transitions.
- Uninstalling hard-deletes the installation and frees the store/plugin slot.