Package-level declarations
Core runtime primitives: value classes, AtField, open-union base types, XrpcClient, auth provider interface, pagination Flow builders, and record encode/decode helpers. Everything here is hand-written — this is the stable, non-generated surface the SDK builds on.
Types
Supplies authentication headers for XRPC requests. Attached at client construction or per-call via XrpcClient.query / XrpcClient.procedure overrides.
Fixed bearer token. Suitable for app-password sessions or service tokens.
No authentication — requests are sent without auth headers.
Sentinel "no query-string parameters" value for XRPC calls that take no URL parameters (e.g. procedures with a JSON input body and nothing else, or queries with no filters). Emitted by the generator's service classes wherever a params argument is required by the XrpcClient API but the underlying lexicon def declares no parameters.
Marker interface implemented by every member of a generated sealed-interface union. Gives the runtime a common upper bound to target and lets consumers write helpers generic over any union-typed value.
Base serializer for generator-emitted open unions.
Base serializer for a generator-emitted Unknown variant.
Sub-interface implemented by the generator-emitted Unknown variant of each sealed union. Carries the original $type string and the full raw JSON object so that re-serialization is lossless.
Base type for all errors surfaced by XrpcClient. Generated XRPC bindings extend this with typed subclasses for each declared error name; unknown error names fall through to Unknown.
Maps a decoded {error, message} body onto a typed XrpcError. Generated per-endpoint code supplies a mapper that pattern-matches on name; any unmapped name SHOULD be returned as XrpcError.Unknown.
Properties
Default mapper that always returns XrpcError.Unknown.
The $type key used throughout AT Protocol JSON payloads.
Stable KSerializer reference for procedures and queries whose output.schema is absent. The generator's service classes use this as the responseSerializer argument when a method's return type is Unit so callers don't have to construct one themselves.
Functions
Normalize a $type discriminator value for equality matching.
Wraps value as AtField.Defined. Reads like natural English at call sites:
Converts a nullable value into an AtField: non-null → AtField.Defined, null → AtField.Null (an explicit clear, not "leave unchanged").