Skip to main content

Module public_repo

Module public_repo 

Source
Expand description

Durable public AT Protocol repository transactions.

This module is the storage boundary between native authorization and the public repository codec. It keeps public record bytes and public commit bytes in a separate RocksDB key namespace, and writes the record, signed head and publication intent in one batch. It deliberately does not mint identities, evaluate native policy itself, or expose native signing keys. A caller must supply the native authorization gate for every request.

Structs§

HostedAccountPublicRepoWriter
HostedAccountSelfAuthorizer
PublicCommitResult
Durable result of a successful public repository transaction.
PublicCreateRequest
A request to create one immutable public record under an owned repo.
PublicPendingCreate
PublicRepoSnapshot
PublicRepoStore
Durable public repository storage. It uses a distinct RocksDB directory and key namespace so native signed artifacts are never re-encoded as public bytes.
PublicRepoWriter
Public repository writer with an explicit native authorization gate.

Enums§

PublicCreatePreparation
PublicRepoWriteError
Write failures are classified at their origin. HTTP callers must use these variants and fixed public messages; sources are for local diagnostics only.

Constants§

MAX_PUBLIC_RECORD_BYTES
Deployment ceiling on complete canonical DAG-CBOR record bytes (64 KiB). A conservative storage policy, not a universal protocol maximum; large payloads belong in linked blobs. Includes CBOR map/type/length overhead. See https://atproto.com/specs/repository#security-considerations.
MAX_PUBLIC_SNAPSHOT_BYTES
MVP repository capacity: bounds raw records, decoded trees and MST work for every snapshot caller. Key bytes count too; tiny records also have a limit.
MAX_PUBLIC_SNAPSHOT_RECORDS

Traits§

PublicPublicationAuthorizer
Native policy gate required by PublicRepoWriter.

Functions§

json_to_dag_cbor
Convert AT JSON into the value type used by the public codec. Reserved single-key $link and $bytes objects become links and byte strings, never ordinary maps. Invalid wrappers, floats and integers outside signed 64-bit range are rejected before serialization.