Rendered from specs/S21-distribution.md — edit it there, not here.
S21 — Distribution
Overview
The extension is built once per release and published from .github/workflows/publish.yml. Until this spec it went to one registry, the Visual Studio Marketplace, whose terms limit it to Microsoft's own products. Editors built on VS Code that cannot use it — VSCodium, Cursor, Windsurf, Gitpod, Eclipse Theia — install from Open VSX, where the extension did not exist, so their users had to download the .vsix from a GitHub release and install it by hand, with no updates (#254).
Publishing to a second registry must not weaken the supply-chain posture the first one has: the .vsix carries SLSA build provenance, and actions are SHA-pinned. So the rule is one build, two registries — Open VSX receives the identical, attested file, never a second build.
User Stories
- As a VSCodium or Cursor user, I want to install the extension from my editor's extension view and receive updates, like any other extension.
- As a maintainer, I want an Open VSX problem never to block a Marketplace release, and a missing Open VSX token to be visible rather than silent.
- As a security-minded user, I want the Open VSX file to be byte-identical to the one whose provenance is attested.
Functional Requirements
S21-SR-01 Each extension release published to the Visual Studio Marketplace MUST also be published to Open VSX under the same
publisher.name(samdidos.json-schema-preview), by the release workflow (.github/workflows/publish.yml), with no manual step beyond approving the release.S21-SR-02 The file published to Open VSX MUST be the
.vsixattached to the GitHub release — the one the Marketplace received — and the workflow MUST verify it against the SLSA build provenance recorded for the release (gh attestation verify) before publishing it. It MUST NOT be rebuilt. The publishing tool (ovsx) MUST be run at an exact version.S21-SR-03 Open VSX publishing MUST run as its own job after the Marketplace job, so its failure cannot stop the Marketplace publish, the release asset upload, or the draft-to-published flip. When the
OVSX_PATsecret is absent the job MUST skip publishing and emit a workflow warning naming the tag, rather than fail; a failure with the token present MUST fail that job visibly (nocontinue-on-error, S09-SR-08).S21-SR-04 The README's install instructions MUST link the Open VSX listing alongside the Marketplace one.
S21-SR-05 A manual run of the release workflow MUST be able to publish an existing release to Open VSX alone (
open_vsx_only), skipping the Marketplace job entirely, so a release that is already on the Marketplace — one published before S21, or whose Open VSX job never ran because a later step of the Marketplace job failed — can still reach Open VSX. It MUST use the same job, and so the same release asset and attestation check, as an ordinary release (S21-SR-02). Without that input the Open VSX job MUST still run only after a successful Marketplace publish.S21-SR-06 The standalone CLI (F27) MUST be released to npm by
.github/workflows/publish-cli.ymlthrough staged publishing only: the workflow authenticates with npm trusted publishing (OIDC — no stored npm token, noNODE_AUTH_TOKEN), runsnpm stage publish --provenance, and nevernpm publish, so a version goes live only after a maintainer approves it with 2FA. A compromised or mistaken workflow run can therefore at most queue a version, never ship one tonpxusers (including the extension's pinned MCP server, F33-FR-17). The npm CLI that stages it MUST be installed at an exact version (≥ 11.15.0, the first withnpm stage).S21-SR-07 The CLI workflow MUST run in the
npmGitHub environment (the trusted publisher is bound to it), MUST refuse to stage a version that differs fromcli/package.json's (a release whose CLI was not bumped, or a hand-pushedcli-v*tag that does not match), and MUST offer a manual dry run that builds and validates the package without staging it.S21-SR-08 The CLI MUST share the extension's version and MUST be released by release-please with it: every release PR MUST set
cli/package.json'sversion, both versions incli/server.jsonandMCP_PACKAGE_VERSION(F33-FR-17) to the release version, throughextra-filesin.github/release-please/config.json, so no version is bumped by hand and the extension never pins a CLI version that was not released with it. When a release is cut, the CLI workflow MUST stage the CLI from the release tag without manual action, detecting the release from the release tag pointing at the commit release-please ran on (a tag pushed withGITHUB_TOKENfires nopushworkflow), and once staged MUST tag that commitcli-v<version>from a job that does not hold the npm OIDC permission.S21-SR-09 The README's header and the documentation site's home page MUST each link every place the project is distributed: the VS Code Marketplace and Open VSX listings of the extension, the CLI's npm package (
json-schema-toolkit), and its MCP Registry listing (io.github.samdidos/json-schema-toolkit, F33-FR-18). The MCP Registry link MUST open the registry's own search page filtered to the server (?q=json-schema-toolkit), not its JSON API, so it is readable in a browser.
Non-Functional Requirements
- S21-NFR-01 The Open VSX job MUST hold only the permissions it uses (
contents: read,attestations: read) and reach Open VSX with a token scoped to thesamdidosnamespace, stored as a secret, never in the repository.
Out of Scope
- Approving a staged CLI version: a maintainer's 2FA step on npm, outside CI.
- Other registries (e.g. JetBrains Marketplace) — the extension targets the VS Code extension API only.
- Claiming the Open VSX namespace and creating the token: a one-time maintainer step outside the repository.
Acceptance Criteria
- With
OVSX_PATset, a release appears on Open VSX with the same version as on the Marketplace, and the job log shows the attestation check passing. - With
OVSX_PATunset, the release still publishes to the Marketplace and GitHub, and the run shows a warning that Open VSX was skipped. - A failed Open VSX publish leaves the Marketplace release and the published GitHub release intact, and shows as a failed job.
- The README links both registries.
History
2026-11-23 — Created for #254: publish the same attested
.vsixto Open VSX in a job of its own, skipping with a warning until the namespace token exists.2026-11-24 — Added S21-SR-05: an "Open VSX only" manual run, to publish v0.21.0 (released before S21) and any release whose Open VSX job was skipped. A re-run of the whole workflow cannot do it, because the Marketplace step fails on a version that is already published.
2026-11-24 — Added S21-SR-06/07: the CLI moves into this spec's scope and is released through npm staged publishing with trusted publishing, so CI can only queue a version for a maintainer's 2FA approval.
2026-11-25 — Added S21-SR-08 and amended S21-SR-07: the CLI follows the extension's version and is released by release-please, instead of a separate hand-bumped version and hand-pushed
cli-v*tag.2026-11-26 — Added S21-SR-09: link all four distribution channels from the README header and the docs home page, now that the CLI is on npm and its MCP server is in the MCP Registry.
Requirement traceability
Status of each requirement in specs/traceability.json. Test coverage is auto-discovered from [ID] tags in test titles and is not listed here.
| Requirement | Status | Implementation | Note |
|---|---|---|---|
S21-NFR-01 | implemented | .github/workflows/publish.yml | publish-open-vsx job in publish.yml; asserted by distribution.test.ts |
S21-SR-01 | implemented | .github/workflows/publish.yml | publish-open-vsx job in publish.yml; asserted by distribution.test.ts |
S21-SR-02 | implemented | .github/workflows/publish.yml | publish-open-vsx job in publish.yml; asserted by distribution.test.ts |
S21-SR-03 | implemented | .github/workflows/publish.yml | publish-open-vsx job in publish.yml; asserted by distribution.test.ts |
S21-SR-04 | implemented | README.md | publish-open-vsx job in publish.yml; asserted by distribution.test.ts |
S21-SR-05 | implemented | .github/workflows/publish.yml | workflow_dispatch input open_vsx_only skips the publish job; publish-open-vsx runs on a skipped publish only in that mode |
S21-SR-06 | implemented | .github/workflows/publish-cli.yml | publish-cli.yml stages with npm stage publish --provenance via trusted publishing (no token), npm pinned to 11.21.2; asserted by distribution.test.ts |
S21-SR-07 | implemented | .github/workflows/publish-cli.yml | npm environment, cli-v tag/version check, dry-run input |
S21-SR-08 | implemented | .github/release-please/config.json, .github/workflows/publish-cli.yml, src/McpServerDefinition.ts | release-please extra-files bump cli/package.json, cli/server.json and the MCP pin; publish-cli.yml stages on Release Please workflow_run when the release tag names the run's commit, then tag-cli pushes cli-v<version> |
S21-SR-09 | implemented | README.md, docs/index.md | distribution links (Marketplace, Open VSX, npm, MCP Registry search page) in the README header and docs home; asserted by distribution.test.ts |
Documented in
Documentation sections tagged spec:S21 (or one of its requirement ids) — 153 of ~612 expected words (25%). The expectation comes from this spec's evaluated complexity of 15.3 (10 documentable requirements — 9 SR, 1 NFR — weighted by kind and by each definition's length).
Changes over time
23627282026-11-26docs: link npm, the MCP Registry and Open VSX from the README and docs home (#302)70346432026-11-24ci(release): release the CLI with release-please, on the extension's version (#299)f4868c12026-11-24ci(cli): release the CLI through npm staged publishing (#294)c2aca992026-11-24feat(release): allow an Open VSX-only run for an existing release (#293)bd409742026-11-23feat(release): publish each release to Open VSX (#288)