Expand description
com.atproto.* XRPC server surface — MVP public-read slice (#1112).
HTTP XRPC endpoints served from the same Axum surface that hosts OAuth and
/.well-known/atproto-did (see super::did_document). hyprstream-pds
remains deliberately no-networking: this module is the serving layer that
calls its data functions (Commit/MST/car::build_record_proof_car).
§Endpoints
| Method | Path (under /xrpc/) | Notes |
|---|---|---|
| GET | com.atproto.identity.resolveHandle | handle→DID |
| GET | com.atproto.repo.describeRepo | DID/handle + commit head + didDoc |
| GET | com.atproto.repo.getRecord | record JSON (optional cid pinning) |
| GET | com.atproto.sync.getRepo | full-repo CARv1 export (lazy stream) |
| GET | com.atproto.server.describeServer | server DID and account-domain policy |
| GET | com.atproto.server.getServiceAuth | protected hosted-account service JWT |
createSession remains out of scope. Password / app-password
verification and credential minting require the account authority contract.
getSession is available only when an explicit native session resolver is
installed and is protected by the existing bearer/DPoP middleware.
§Feature gate
Routes are mounted only when OAuthConfig::xrpc_read_slice is true
(defaults to false). The in-process XrpcRepoStore starts empty; the
write path (#910) populates it with RepoSnapshots whose [public]
flag is true. Only public snapshots are served by these endpoints.
§Out of scope
com.atproto.sync.subscribeRepos(firehose) — issue #1112 defers it.- Write path (
repo.createRecordetc.) — sequenced with #910. createSession— sequenced with the account credential contract (#1113/#948).
Modules§
Structs§
- Atproto
Session Info - Native account authority’s answer for an authenticated
getSessionquery. The resolver owns handle, DID-document and account lifecycle truth; this adapter never derives a handle from an unverified DID string. - Repo
Snapshot - An in-memory snapshot of one repo’s signed state — enough to answer the
public read slice (
describeRepo/getRecord/sync.getRepo). - Xrpc
Repo Store - In-process registry of hosted repos, keyed by DID.
Constants§
- GET_
REPO_ CONCURRENCY - Maximum number of concurrent
sync.getRepo(full-CAR export) requests. Each request streams the entire repo; bounding concurrency prevents memory/CPU exhaustion from parallel full-repo exports. - GET_
SERVICE_ AUTH_ PATH - Protected hosted-PDS service-auth endpoint from the ATProto server lexicon.
- HOSTED_
COLLECTION ai.hyprstream.modelis the only collection this PDS hosts today.
Traits§
- Atproto
Session Resolver - Explicit native authority seam for standard
getSession.
Functions§
- create_
record com.atproto.repo.createRecordfor the first native-authorized public posting slice. The route is deliberately opt-in: OAuthState must carry a PublicRepoWriter, and the normal bearer/DPoP middleware must have inserted AuthenticatedUser before this handler runs.- describe_
repo - describe_
server - Return the standard server capability and account-domain description.
- get_
record - get_
repo - get_
service_ auth - Mint a short-lived, method-bound ATProto service JWT using the hosted
account’s persisted
#atprotokey. - get_
session - Return the current authenticated ATProto session from the native account authority. The bearer/DPoP middleware authenticates the request; this handler revalidates the token and scope before consulting the resolver.
- public_
canary_ get_ record - public_
canary_ routes - The one-record public read when the broader hosted-account XRPC slice is disabled. No other XRPC route or hosted-account record becomes reachable.
- resolve_
handle - xrpc_
error - xrpc_
error_ body - xrpc_
routes - The five XRPC read-slice route declarations, as a sub-
Routerparameterised overArc<OAuthState>. This is the single source of truth for the XRPC route table —oauth::create_appmerges it conditionally onxrpc_read_slice, and tests mount it directly. Changing the URI or handler here changes both. - xrpc_
session_ routes - Protected standard session read route. It is mounted only when an
authority-provided
AtprotoSessionResolveris installed. - xrpc_
write_ routes - Protected standard repository write routes. These are mounted only when a public writer is explicitly installed in OAuthState; the default remains read-only until account/session authorization is configured.