feat(registry): add create-only delegated publishing#1993
Conversation
🦋 Changeset detectedLatest commit: 136edea The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 136edea | Jul 12 2026, 07:56 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | 136edea | Jul 12 2026, 07:56 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 136edea | Jul 12 2026, 07:55 PM |
There was a problem hiding this comment.
This is a well-scoped, additive change for the delegated-release RFC. The approach is the right one: instead of reusing the broad PublishingClient, it exposes a narrow, single-purpose createDelegatedRelease() API that only performs one immutable record create, validates inputs client-side, snapshots them to avoid TOCTOU, and verifies both the returned AT URI and the recomputed DAG-CBOR CID. The permission helper getDelegatedReleasePermission() keeps the active collection and exact OAuth scope in one typed, frozen contract so clients don't hard-code experimental NSIDs.
I reviewed the diff statically (no tooling run). The new code is consistent with the existing registry-client architecture: it uses the same Client/ok pattern as PublishingClient, imports semver/functions/valid.js the same way env/index.ts already does, and lists the atcute externals in tsdown.config.ts. Test coverage is solid for the happy path, pre-request validation, snapshot isolation, identity/CID mismatch, and the frozen permission shape.
I didn't find any blocking issues, AGENTS.md violations, or security gaps. No line comments needed.
What does this PR do?
Implements delegated release work items W1.6 and W1.7:
createDelegatedRelease()API that performs exactly one immutable release create and exposes no broader write operations.Part of #1908.
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runAI-generated code disclosure
Screenshots / test output
pnpm buildpnpm typecheckpnpm lint:quickpnpm lint:jsonpnpm --filter @emdash-cms/registry-client test(112 passed)pnpm --filter @emdash-cms/registry-lexicons test(19 passed)publintpasses for both changed packages.attw --packcrashes internally withCannot read properties of undefined (reading filename)after packing either package.Try this PR
Open a fresh playground →
A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.
Tracks
feat/delegated-release-service-18-create-only-publishing. Updated automatically when the playground redeploys.