~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/pds.js

An atproto PDS in JavaScript, for Cloudflare Workers and Node

0
0
main
39 lines · 2.1 KB Raw History
---
'@pdsjs/spaces': patch
'@pdsjs/core': minor
'@pdsjs/storage-sqlite': patch
'@pdsjs/cloudflare': patch
---

Spaces follow the reference's `0.0.0-spaces-alpha-20261029171913`.
`com.atproto.simplespace.*` is gone, with every older spelling it accepted.

- **Policies.** A space holds one policy:
  `com.atproto.personalspace.policy`, `com.atproto.memberspace.policy`
  (`publicRead`, `publicWrite`, `allowedApps`, `publishPolicy`,
  `publishMembers`) or `com.atproto.managedspace.policy` (`managingApp`,
  `publishPolicy`). `com.atproto.space.createSpace`, `updateSpace`,
  `deleteSpace` and `getSpace` manage it; `updateSpace` replaces it whole and
  a change of type drops every member. The authority is no longer a member of
  its own space and is always admitted.
- **Members.** `com.atproto.memberspace.putMember` (`read` and `write`
  required), `removeMember` and `listMembers` answer `PolicyMismatch` outside a
  memberspace. Removing a member, or taking its `write`, drops it from the
  writer set, as `com.atproto.space.removeWriter` does for any writer.
- **Credentials.** `getSpaceCredential` checks the user before the app. A user
  the policy refuses gets `SpaceNotFound`; an app the space does not allow gets
  `AppNotAuthorized`. A managedspace asks its app through
  `com.atproto.managedspace.checkUserAccess`.
- **Published records.** `publishPolicy` writes `com.atproto.space.policy/self`
  and `publishMembers` writes one `com.atproto.memberspace.member` per member
  into the authority's repo in the space. Direct writes to either collection are
  refused.
- **clearRecords.** `com.atproto.space.clearRecords` deletes every record the
  caller holds in a space.
- **Storage.** `SpaceRow` carries `policy` in place of the six read, write and
  app fields, and `SpaceStoragePort` gains `removeAllMembers` and
  `removeSpaceWriter`. SQLite and Durable Object storage convert existing spaces
  on start: one with a managing app becomes a managedspace and loses its
  members, and any other becomes a memberspace that keeps them.
- Account migration of spaces (`importRepo`, `exportSpaceMeta`,
  `importSpaceMeta`) is not implemented.