Skip to content

feat(cli): os plugin publish — upload a signed .osplugin (ADR-0025 §3.4)#1514

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/os-plugin-publish
Jun 2, 2026
Merged

feat(cli): os plugin publish — upload a signed .osplugin (ADR-0025 §3.4)#1514
xuyushun441-sys merged 1 commit into
mainfrom
feat/os-plugin-publish

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Completes the build → sign → publish CLI pipeline for marketplace plugins.

  • osplugin.ts: add the tar reader (readTar / readTarGz / readOspluginManifest) — inverse of createTar — so publish can extract the compiled objectstack.plugin.json from inside the artifact.
  • os plugin publish <artifact.osplugin>: reads the artifact + its detached .sig, extracts the manifest, then POSTs /cloud/packages then /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 marketplace review/approve flow.

Verified: 9 tests (tar round-trip + manifest extraction; an e2e publish against a mocked cloud asserting the exact request contract). tsc clean.

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

…§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>
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 2, 2026 4:00am

Request Review

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),
@xuyushun441-sys xuyushun441-sys merged commit f1a9411 into main Jun 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants