You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sketching out what a more stable "golang atproto SDK" might look like.
atproto/syntax: syntax types for Handle, DID, NSID, AT-URI, TID
atproto/crypto: basically go-did pulled in to this monorepo, and DID-specific stuff removed. smaller API surface specifically for atproto, abstracting away most implementation details and config knobs
atproto/identity: combined handle and DID resolution. interface for caching/persistent services
atproto/data: runtime helpers for data model, possibly using go-ipld-prime. eg, for working with records and JSON when you don't know the schema. DAG-CBOR to JSON conversion.
atproto/lexicon: generic Lexicon helpers, and types for dealing with Lexicon schema JSON itself. likely runtime schema verification. the sort of utils which get referenced by codegen'd code
atproto/repo: MST and repository implementation, including CAR import/export, diff processing, verification, interfaces
atproto/client: generic HTTP client ("XRPC"), with ergonomic auth help. possibly generic stream (WebSocket) client helpers also. no codegen stuff for specific Lexicons.
Codegen tooling and codegen output (record types, client APIs, server handlers) would probably live elsewhere, at least for a while.
The text was updated successfully, but these errors were encountered:
This works around a current issue in prod where actions are failing to
persist because the session expires.
The real fix for the underlying issue (IMHO) is to re-implement
`xrpc.Client` to handle this in a more elegant and robust way. That is
sort-of tracked in #378
I was initially confused why this was only coming up when taking
actions, because the client is used for a number of reads (GET) as well.
Those GETs mostly use *admin* auth (a token in the HTTP Authorization
header), not login/session auth (which requires refresh), which explains
why it mostly works, then fails for actions.
Sketching out what a more stable "golang atproto SDK" might look like.
atproto/syntax
: syntax types for Handle, DID, NSID, AT-URI, TIDatproto/crypto
: basically go-did pulled in to this monorepo, and DID-specific stuff removed. smaller API surface specifically for atproto, abstracting away most implementation details and config knobsatproto/identity
: combined handle and DID resolution. interface for caching/persistent servicesatproto/data
: runtime helpers for data model, possibly usinggo-ipld-prime
. eg, for working with records and JSON when you don't know the schema. DAG-CBOR to JSON conversion.atproto/lexicon
: generic Lexicon helpers, and types for dealing with Lexicon schema JSON itself. likely runtime schema verification. the sort of utils which get referenced by codegen'd codeatproto/repo
: MST and repository implementation, including CAR import/export, diff processing, verification, interfacesatproto/client
: generic HTTP client ("XRPC"), with ergonomic auth help. possibly generic stream (WebSocket) client helpers also. no codegen stuff for specific Lexicons.Codegen tooling and codegen output (record types, client APIs, server handlers) would probably live elsewhere, at least for a while.
The text was updated successfully, but these errors were encountered: