zat.dev/zds
atproto pds · mirror of https://tangled.org/zat.dev/zds
zds 0.25.1 Latest 2 packages, all images
spaces alpha upgrades
History: how ZDS followed each Spaces alpha from October 1 to November 12, 2026, with the interop evidence and measurements recorded at the time. Method names here are those of their alpha; the current contract is permissioned data, and each release is in the changelog.
client-visible contract across implementations (2026-08-21)
This historical comparison informed plyr.fm (#1897, #1898). The behaviours were checked
against the reference PDS (permissioned-data branch), rsky, and
atproto-crates so that nobody mistakes them for ZDS quirks and "cleans them
up".
| behaviour | reference | rsky | atproto-crates | ZDS |
|---|---|---|---|---|
scopes_supported lists space:* (or any granular scope) | no (atproto + transition:* only; "dynamic scopes can't be enumerated") | no | no | no (it did until 2026-08-21; the hints were a ZDS invention nobody consumed) |
authority=* in a space: grant matches any authority; self resolves to the granting user at token issuance | yes | yes | yes | yes |
getDelegationToken needs only a covering read grant, signs with the requester's own repo key, and never checks that the authority is local | yes | yes | yes | yes |
listMembers (then simplespace) is the authority's private state | owner-only (read_self scope + owner assert) | owner-only (manage=update) | any member with read_self | owner-only (manage=update) |
Clients must not infer capability from scopes_supported: the grant on the
issued token is the only portable signal. listMembers is the one row where
implementations differ; a client should treat it as owner-only.
The September policy update supersedes the ZDS listMembers scope cell above:
ZDS now requires the owner and a covering read grant. Other implementations
in this historical table have not been rechecked for the October alpha.
October 1 upgrade
Startup creates the revocation, sequence, and notification tables and backfills
existing writer rows with ordered space revisions. Existing records, blobs,
policies, and memberships retain their format. Old DID-based writer cursors
must be discarded; clients bootstrap again from listWriters without a cursor.
Clients must reacquire credentials and use HTTP signatures. The old Spaces
DPoP scheme and type request field are not compatibility paths.
The local consumers requiring follow-up are plyr.fm's Python client, Doodl's browser/live/preview services, and Lore's extension and website. Doodl and Lore also need the prior release's policy split and all three still have membership callers to update. These are the downstream migration requirements for v0.4.0; ZDS does not translate the previous wire contract for old clients.
October 1 release verification
The implementation follows the October 1 migration prompt and pinned reference
implementation described above. HTTP signature parsing remains local to ZDS;
DID-key decoding and JOSE verification use zat. The published October 1 SDK
passes bidirectional signature interoperability checks, including unpadded
base64, reusable proofs, high-S signatures, and repository audience isolation.
Five alternating local ReleaseFast storage runs against the preceding committed HEAD, with 1,000 seeded records, showed median throughput changes of +2.5% for writes, +0.6% for single-record reads, -2.9% for record listings, -1.5% for repo exports, and -4.7% for writer listings. These are synthetic storage measurements. A separate ReleaseSafe HTTP probe completed 4,000 credential reads without failure; at 16 concurrent callers it measured about 5,800 requests/second and 4.3 ms p95 latency. It is not a sustained production soak.
Cross-PDS performance comparison remains a follow-up: the existing official PDS and Tranquil benchmark probes cover public repos, not equivalent Spaces work. The SDK interop lane establishes wire compatibility, not performance parity. Downstream application migrations are separate work.
managing-app denial on 2026-10-05
One managing-app denial predates the failure logging ZDS now does and is not
explained. It happened under the
November 5 alpha's method names, before checkAccess: on 2026-10-05 a
managing-app space on pds.zat.dev (v0.4.1) refused a requester hosted on
another PDS, and the app's operator saw no checkUserAccess arrive. What was
established afterwards, without the operator:
- v0.4.1 and v0.5.0 builds both resolve that app's
did:weband delivercheckUserAccessto it, so resolution, request shape, and transport are not at fault in either version. - With the authority on one local zds, the requester on a second, and a managing app that verifies the token's signature against the authority's DID document, v0.5.0 issues the credential. The cross-PDS path and the token are valid.
- An
audcomparison against the bare DID on the app'scheckUserAccessroute would produce exactly the reported symptom. It is not confirmed: the same app accepted forwardednotifyWritecalls, whoseaudhas the same form.
The stored policy row for that space was not read.
October 21 upgrade
This is a hard cut with no compatibility path; Spaces is alpha. Clients must:
- send
getSpaceCredentialas a JSON body withcredentialKidanddelegationToken, and stop signing the credential request - present credentials as
Atproto-Space-Credentialand sign under theatproto-space-credentiallabel with the matchingtag - read
getRepoas STAR rather than CAR, and stop passingexcludeValues - name the authority as
#atproto_pdsin delegation and service-auth audiences
The local consumers that mint credentials are plyr.fm's Python client, Doodl's
browser and sync worker, and Lore's extension and website. Stash and recite
use only self-owned spaces through OAuth and are unaffected. Clients can now
check describeServer.spacesAlpha instead of probing with an authenticated
request.
The interop lane passed against branch source 232b2cdce: body-carried
credential requests, tagged signatures including high-S and unpadded forms,
cross-repo audiences, and STAR export verified by the upstream verifier.
Three alternating local ReleaseFast runs of zds-bench --scenario space --records 1000 against the preceding release commit 6a1baad gave median
getRepo throughput of 643 ops/s for STAR against 587 ops/s for CAR, with the
archive about 30% smaller because it carries no CIDs or index. Full
verification measured 240 against 247 ops/s, since STAR verification derives
each record CID instead of reading it from the index. These are synthetic
storage measurements; no official PDS or Tranquil probe covers Spaces exports.
October 22 upgrade
This is a hard cut with no compatibility path. Syncers holding a space credential must:
- resolve the author's
#atproto_kemkey and sendAtproto-Space-Want-MacongetLatestCommit,listRepoOps,getRepo, andgetRecord - verify
Atproto-Space-Macagainst the shared secret instead of a commit signature - read commits as
{ver, repo, space, rev, data};hash,mac,ikm, andsigare gone, in JSON and in the STAR metadata - treat
getLatestCommiton a repo with no writes asRepoNotFound; it previously answered{}
OAuth reads of the caller's own repo are unaffected unless they opt in to the header.
The interop lane passed against the published
0.0.0-spaces-alpha-20261022141228 snapshot: the SDK's encapsulate,
verifyCommit, verifyRecord, and verifyRepoStarFull accept ZDS responses
for all four reads. Unit tests pin the RFC 9180 §A.3.1 KEM vector, KEM, commit,
and record MAC vectors from that snapshot, and a STAR archive it serialized.
One known difference from the reference PDS at 3a0b8c6: ZDS answers
RepoNotFound with HTTP 404, as it does for every other not-found read, where
the reference throws InvalidRequestError (400). The error name is the same,
and clients key off the name.
October 29 upgrade
The October 29 alpha replaces com.atproto.simplespace.* with a single space
policy. ZDS cuts over without a compatibility path; the
upgrade guide covers the client changes, the startup
migration, the pre-flight query, and where ZDS differs from the reference.
The interop lane passed against 0.0.0-spaces-alpha-20261029171913. That
snapshot's @atproto/lex-cbor range also resolves 0.0.0, which still names
workspace:* dependencies, so pin the @atproto packages with pnpm overrides
(pnpm 11 reads them from pnpm-workspace.yaml):
packages: []
overrides:
"@atproto/car": "0.0.0-spaces-alpha-20261029171913"
"@atproto/crypto": "0.0.0-spaces-alpha-20261029171913"
"@atproto/lex-cbor": "0.0.0-spaces-alpha-20261029171913"
"@atproto/lex-data": "0.0.0-spaces-alpha-20261029171913"
"@atproto/space": "0.0.0-spaces-alpha-20261029171913"
"@atproto/syntax": "0.0.0-spaces-alpha-20261029171913"
then pnpm add @atproto/space@0.0.0-spaces-alpha-20261029171913 @atproto/crypto@0.0.0-spaces-alpha-20261029171913 in that project. Beyond the
October 22 checks, the lane reads the authority's published records back with
readRepoStar and verifies a cleared repo with verifyRepoStarFull.
November 5 upgrade
The November 5 alpha adopts the published STAR spec (dasl.ing, 2026-11-03):
a 0x01 control byte before every pair and a 0x00 byte ending the archive.
ZDS reads and writes it through zat 0.7.0-alpha, so getRepo,
exportSpaceMeta, and both imports use the new framing and reject STAR-lite
archives, including exports from hosts that have not upgraded.
The same alpha settles account status for spaces. A taken down, suspended, or
deactivated authority answers getSpaceCredential and listRepos with
RepoTakendown, RepoSuspended, or RepoDeactivated, while credentials it
already issued stay valid until they expire. Space writes and management need an
active account. A taken down account keeps a limited allowTakendown session
for listSpaces, exportSpaceMeta, and its own repo's getRepo, listBlobs,
and getBlob (see the takedown runbook). As in the reference, space reads
check the caller's token before the repo's status, so the limited session gets
InvalidToken outside its grant, and an admin token reads any repo that is not
deleted.
The interop lane passes against 0.0.0-spaces-alpha-20261105160032, now pinned
in tools/space-sdk. That snapshot's @atproto/space depends on
@atproto/star@0.0.0-stage, whose npm tarball fails to extract, so the pin
overrides it with the snapshot's own @atproto/star. The snapshot no longer
exports a repo serializer; the reference writer is @atproto/star's
writeStar, and it reproduces the repo fixture byte for byte (now in zat, see
space-reference-repo.md).
November 6 moderation
Proposal 0016's moderation section (bluesky-social/proposals#132) asks a repo
host for account takedown across all spaces, which the November 5 upgrade
covers, and for blob takedowns that reach space blobs. A space blob is the same
(did, cid) blob as a public one, so com.atproto.admin.updateSubjectStatus
with a repoBlobRef stops space.getBlob and sync.getBlob together (see the
takedown runbook).
Label records (com.atproto.label.record) are ordinary space records written by
the labeler or the space authority. ZDS stores any collection in a space, so it
needs nothing extra to host them; deciding which labels to honor is an app's job.
lexicon review (bluesky-social/atproto#5800)
The lexicon review settles the names and shapes of the space lexicons. It merged
into the permissioned-data branch on 2026-11-11, and ZDS follows that branch's
tip. The November 5 names and shapes are removed, not translated: Spaces is an
alpha, so clients on the old names update rather than ZDS keeping them working.
- Methods.
listWriters,notifyRepoUpdate,notifyCredentialsRevoked,notifySpaceStatus(statusdeleted),memberspace.putMembersandremoveMembers, andmanagedspace.checkAccess. A service token'slxmmust match the name it calls. - Fields.
createSpace,getSpace, andlistSpacescarryspace;listWritersentries carryrepo. Requests takecredentialKey,repo(removeWriter), andspaceDid(listSpaces).listSpacesentries add the caller'srepoRevanddata, and the authority's latestspaceRev.listBlobstakes nosinceandlistRecordsnoreverse. - Errors and encodings.
NotAuthorized,InvalidSpaceMac,AccountNotAuthorized,InvalidRepoFile,RepoMismatch,InvalidSpaceMeta,InvalidCursor, andapplication/vnd.dasl.starfor STAR bodies. A notification whose issuer, audience, or writer doesn't fit answers 403Forbidden; a service token whoselxmisn't the called method answers 401BadJwtLexiconMethod.getSpaceCredentialanswersSpaceDeletedwith or without a delegation token. - Service references.
managingAppand theregisterNotifyservice must bedid#serviceIdon a did:plc or a pathless did:web. Theservice-refs-v1migration rewrote stored bare DIDs todid#atproto_pds.unregisterNotifytakes service auth from the registered service, addressed to the space authority. - Scopes. A space scope names its type positionally (
space:<nsid>) or withspaceType(space?spaceType=<nsid>), not both. Both forms resolve to the same grant at token issuance. - Managed spaces without a delegation token ask the app about an anonymous
reader (
checkAccesswithoutrepo). - Archives. Space metadata archives name the writer field
repoRev.
The SDK lane installs the November 12 alpha from npm
(0.0.0-spaces-alpha-20261112204144). Its packages depend on each other with
caret ranges, which also match unrelated 0.0.0 releases, so
pnpm-workspace.yaml overrides every @atproto package in the tree to the
alpha. At this release verifyCommit and verifyRecord throw rather than
return a boolean, createSpaceSigHeaders takes {authorization, audience, keypair}, and the archive writer is writeSpaceMetaStar. MACs are requested
with formatMacRequest and checked from the response's headers ({keyShare, sharedSecret, headers}).
November 12 alpha
The November 12 alpha settles the Spaces API's names and shapes ahead of beta;
ZDS v0.10.0 follows it at d4def6e9f (bluesky-social/atproto#5864 and the
tidy after #5877), with no aliases for the earlier names:
getSpaceCredentialisauthorizeSpaceSync, which addsspaceRevto its output and takesnotify: {endpoint, token}to register a syncer.registerNotify,unregisterNotifyandnotifySpaceStatusare gone; ZDS callsconfirmRegistrationbefore a new registration and sendsnotifySpaceUpdate. See the access model.com.atproto.space.defs#repoWriteand#repoRemovedare whole entries,{repo, repoRev, data, spaceRev}and{repo, spaceRev}, shared bylistWritersandnotifySpaceUpdate(where they addprevSpaceRev).notifyRepoUpdateis only the repo host's call,{space, repo, repoRev, data}.- The commit MAC tag is
atproto-space-commit, through zatv0.7.0-alpha.7. - A managing app that fails to answer is
UpstreamFailure, not a denial. - Imports require
application/vnd.dasl.star; list cursors andallowedAppsare validated as the lexicons declare.
Not applicable to ZDS: space type declarations' title (ZDS reads only a
declaration's collections, so its consent screen shows the NSID either way),
the moderation and access-control guidance, and the reference PDS's own
migrations. Garbage collection of empty repos and removed writers after 72
hours is optional, and ZDS does not collect. ZDS never revokes credentials as
a space host, so no registration is dropped for a revoked credential; it
honours notifyCredentialsRevoked as a repo host.