feat(cli): os plugin publish — upload a signed .osplugin (ADR-0025 §3.4)#1514
Merged
Conversation
…§3.4)
Completes the build → sign → publish pipeline for plugin marketplace
artifacts.
- osplugin.ts: add the tar READER (readTar / readTarGz /
readOspluginManifest) — the inverse of createTar — so publish can
extract the compiled objectstack.plugin.json from inside the artifact.
- commands/plugin/publish.ts: `os plugin publish <artifact.osplugin>`:
reads the artifact + its detached `.sig`, extracts the manifest
(id/version/name/runtime/permissions), then POSTs /cloud/packages and
/cloud/packages/:id/versions with { artifact_kind:'plugin', osplugin
(base64), plugin_manifest, signature, artifact_checksum (sha256) }, plus
--submit / --auto-approve / --visibility / --org. Warns when publishing
unsigned (the server rejects a node-tier plugin from an unverified
publisher). The platform counter-signature is written by the review flow.
Verified: 9 tests — tar round-trip + manifest extraction, and an
end-to-end publish against a mocked cloud asserting the exact request
contract (package register, then plugin version with base64 artifact +
signature + checksum). tsc clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const controller = new AbortController(); | ||
| const timer = timeoutMs > 0 ? setTimeout(() => controller.abort(), timeoutMs) : undefined; | ||
| try { | ||
| const response = await fetch(url, { |
| try { | ||
| const response = await fetch(url, { | ||
| method: 'POST', | ||
| headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }, |
| const response = await fetch(url, { | ||
| method: 'POST', | ||
| headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }, | ||
| body: JSON.stringify(body), |
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.
Completes the build → sign → publish CLI pipeline for marketplace plugins.
osplugin.ts: add the tar reader (readTar/readTarGz/readOspluginManifest) — inverse ofcreateTar— so publish can extract the compiledobjectstack.plugin.jsonfrom inside the artifact.os plugin publish <artifact.osplugin>: reads the artifact + its detached.sig, extracts the manifest, then POSTs/cloud/packagesthen/cloud/packages/:id/versionswith{ artifact_kind:'plugin', osplugin (base64), plugin_manifest, signature, artifact_checksum (sha256) }, plus--submit/--auto-approve/--visibility/--org. Warns when publishing unsigned (the server rejects anode-tier plugin from an unverified publisher). The platform counter-signature is written by the marketplace review/approve flow.Verified: 9 tests (tar round-trip + manifest extraction; an e2e publish against a mocked cloud asserting the exact request contract).
tscclean.This is the CLI half. The cloud side needs
pluginArtifactStore(R2) +pluginSigning(platform key + publisher key registry) wired into apps/cloud for the endpoint to accept plugin publishes — separate cloud PR.🤖 Generated with Claude Code