neco_atproto (Gleam SDK)
Erlang-target Gleam package providing Lexicon-generated types and codecs, pure DRISL, CAR, and firehose decoders, XRPC wire codecs, permission-set evaluation, and goal execution for AT Protocol. Depends on necoherence 0.3.0 and its HTTP adapter from Hex.
Usage
import lib
import necoherence/exact_json as json
pub fn encode_timeline_query() {
let assert Ok(context) = lib.initialize_context()
let assert Ok(op) = lib.wire_operation(context, "app.bsky.feed.getTimeline")
lib.encode_query(op, json.JsonValueObj([#("limit", json.JsonValueNum(20))]))
}
Modules
| Module | Role |
|---|---|
lib |
Top-level facade re-exporting adapter, wire, pure decoders, permission, and HTTP execution |
neco_atproto/lexicon |
Lexicon-derived types and value codecs |
neco_atproto/adapter |
Type descriptors, default-aware decoding, grapheme counts, and rkey validation |
neco_atproto/drisl |
Pure deterministic CBOR decoder |
neco_atproto/car |
Pure bounded CAR v1 archive decoder |
neco_atproto/stream |
Firehose frame decoding and schema validation |
neco_atproto/wire |
XRPC request encoding, response decoding, and error classification |
neco_atproto/permission |
Permission-set admission, interpretation, and authorization |
neco_atproto/goals |
Goal and recipe execution backed by priv/goals_catalog.json.gz |
network_binding |
Single-operation HTTP execution (http_executor) and retry policy |
See docs/languages.md for cross-language correspondence and docs/terminology.md for concept definitions.
Verification
cd packages/gleam
gleam test