atproto utils for zig zat.dev

Add checked XRPC results with retry metadata #26

Merged zzstoatzz.io
targeting main from codex/xrpc-errors-retry
Merged opened by and assigned to zzstoatzz.io
targeting main from codex/xrpc-errors-retry

Adds a checked XRPC call path that preserves structured failure information instead of collapsing unsuccessful HTTP responses into transport errors.

Changes:

  • add queryChecked / procedureChecked helpers returning XrpcClient.Result
  • add XrpcError with HTTP status, ATProto error name/message, raw body, and rate-limit headers
  • capture RateLimit-* and Retry-After headers in HttpTransport
  • add conservative retry policy for 429, 500, 502, 503, and 504
  • keep existing raw query / procedure response behavior intact

Verification:

  • zig build -Doptimize=ReleaseFast
  • zig build test -- --test-filter xrpc
  • zig test src/internal/xrpc/transport.zig
  • zig zen
  • git diff --check
Commits 1

add checked xrpc errors and retries