3.3 kB · 63 lines
Markdown
at main

discovery: knowing which spaces you are in #

what a member can learn about their own memberships under the Spaces alpha, what lore does with it, and what an inbox for invitations would take.

what a host tells you #

  • listSpaces lists the spaces you have written to or are the authority of. the row is created by your first write into a space and stays after the record is deleted. a space you were added to and have only read is not listed anywhere.
  • the member list belongs to the authority. listMembers answers only the authority unless the authority publishes the list; a member cannot see the other members.
  • only the authority removes a member. there is no self-removal.

so a space becomes yours to find once you have written in it. an invitation you have not acted on is known only to the owner and to whoever they told.

what lore does with that #

  • /lore join <owner> <key> needs the key from the owner. the join writes your registry binding, not a record in the space, so the space stays out of listSpaces until your first breadcrumb there. writing a first breadcrumb on join would make every joined space discoverable from your own PDS, at the cost of a record whose only content is "joined".
  • the site lists your registry, which covers every space you use, joined or own, plus the spaces listSpaces reports with you as authority. it does not show which projects are bound to each space; the registry has that.
  • leave drops your binding. you stay on the owner's member list, and only they can change that, so lore says the project no longer uses the space.

an inbox #

the missing step is the one before the key: learning that you were added. the protocol provides none of these three shapes.

  1. crawl (habitat's sap). a service holds server-side OAuth sessions for its users, pages listSpaces per session, and syncs what it finds. sap's purpose is sync, not discovery: with member sessions it learns only what each member's own PDS already lists, and it never sees a bare invitation. an owner-session crawl could invert listMembers into "who was added where", but that means a service holding owners' sessions and knowing every membership.
  2. push (roomy's app server). the owner's client, on share, tells a lore service "space X, key K, added DID Y". the member asks the service "what lists me?" and proves their DID with a service-auth token from their own PDS (com.atproto.server.getServiceAuth, aud = the service). no held sessions, no crawling; the service knows the same triples an owner-crawl would learn, and nothing else. the owner opts in per share.
  3. out of band. the owner gives the key. this is what lore does.

the push shape is the cheapest inbox: one small service, one extra call from share, one query from the site or /lore. its cost is a place that knows who was added to what, which today nobody but the owner knows. whether an inbox is worth that is the decision to make before building one.

sources #

  • zds src/atproto/space.zig (listMembers requires the space owner) and src/storage/store.zig (listSpaces reads per-actor space state)
  • habitat api-docs/docs/space-proxy/endpoints.mdx (listSpaces semantics), pkg/sap/ARCHITECTURE.md (sessions, crawl)