forked from
nonbinary.computer/jacquard
A better Rust ATProto crate
1# Changelog
2
3
4## `jacquard-api` [0.5.5], `jacquard-lexicon` [0.5.4] - 2025-10-16
5
6### Fixed
7
8- events.smokesignal.invokeWebhook lexicon now generates valid code
9- lexicon code generation now uses `Data` for blank objects, rather than naming and then failing to generate a struct
10
11## [0.5.4] - 2025-10-16
12
13### Added
14
15**Initial streaming client support** (`jacquard-common`)
16- First primitives for streamed requests and responses
17
18**`send_with_options()` method on XrpcClient** (`jacquard-common`, `jacquard-oauth`, `jacquard`)
19- allows setting custom options per request in stateful client
20- updated oauth and credential session clients to use it
21- implementations should generally override provided auth with own internal auth
22
23**Prelude providing common traits into scope**
24
25### Fixed
26
27**`AgentSessionExt::upload_blob()` failed to authenticate** (`jacquard`)
28- new `XrpcClient::send_with_options()` method now allows properly overriding the content-type header while still handling auth internally
29
30## [0.5.3] - 2025-10-15
31
32### Added
33
34**Experimental WASM Support** (`jacquard-common`, `jacquard-api`, `jacquard-identity`, `jacquard-oauth`)
35- Core crates now compile for `wasm32-unknown-unknown` target
36- Traits use `trait-variant` to conditionally exclude `Send` bounds on WASM
37- Platform-specific trait method implementations for methods with `Self: Sync` bounds
38- DNS-based handle resolution remains gated behind `dns` feature (unavailable on WASM)
39- HTTPS well-known and PDS resolution work on all platforms
40
41### Fixed
42
43**OAuth client** (`jacquard-oauth`)
44- Fixed tokio runtime detection for non-WASM targets
45- Conditional compilation for tokio-specific features
46
47
48---
49
50## [0.5.2] - 2025-10-14
51
52### Added
53
54**Value type deserialization** (`jacquard-common`)
55- `from_json_value()`: Deserialize typed data directly from `serde_json::Value` without borrowing
56- `from_data_owned()`, `from_raw_data_owned()`: Owned deserialization helpers
57- `Data::from_json_owned()`: Parse JSON into owned `Data<'static>`
58- `IntoStatic` implementation for `RawData` enabling owned conversions
59- Re-exported value types from crate root for easier imports
60- `Deserializer` trait implementations for `Data<'static>` and `RawData<'static>`
61- Owned deserializer helpers: `OwnedArrayDeserializer`, `OwnedObjectDeserializer`, `OwnedBlobDeserializer`
62
63**Service Auth** (`jacquard-axum`, `jacquard-common`)
64- Full service authentication implementation for inter-service JWT verification
65- `ExtractServiceAuth` Axum extractor for validating service auth tokens
66- Axum service auth middleware
67- JWT parsing and signature verification (ES256, ES256K)
68- Service auth claims validation (issuer, audience, expiration, method binding)
69- DID document resolution for signing key verification
70
71**XrpcRequest derive macro** (`jacquard-derive`)
72- `#[derive(XrpcRequest)]` for custom XRPC endpoints
73- Automatically generates response marker struct and trait implementations
74- Supports both client-side (`XrpcRequest`) and server-side (`XrpcEndpoint`) with `server` flag
75- Simplifies defining custom XRPC endpoints outside of generated API
76
77**Builder integration** (`jacquard-derive`)
78- `#[lexicon]` macro now detects `bon::Builder` derive
79- Automatically adds `#[builder(default)]` to `extra_data` field when Builder is present
80- Makes `extra_data` optional in generated builders
81
82### Fixed
83
84**String deserialization** (`jacquard-common`)
85- All string types (Did, Handle, Nsid, etc.) now properly handle URL-encoded values
86- `serde_html_form` correctly decodes percent-encoded characters during deserialization
87- Fixes issues with DIDs and other identifiers containing colons in query parameters
88
89**Axum extractor** (`jacquard-axum`)
90- Removed unnecessary URL-decoding workaround (now handled by improved string deserialization)
91- Added comprehensive tests for URL-encoded query parameters
92- Cleaner implementation with proper delegation to serde
93
94### Changed
95
96**Dependencies**
97- Moved `clap` to dev-dependencies in `jacquard` (only used in examples)
98- Moved `axum-macros` and `tracing-subscriber` to dev-dependencies in `jacquard-axum` (only used in examples)
99- Removed unused dependencies: `urlencoding` (jacquard, jacquard-axum), `uuid` (jacquard-oauth), `serde_with` (jacquard-common)
100- Removed `fancy` feature from `jacquard` (design smell for library crates)
101- Moved various proc-macro crate dependencies to dev-dependencies in `jacquard-derive`
102
103**Development tooling**
104- Improved justfile with dynamic example discovery
105- `just examples` now auto-discovers all examples
106- `just example <name>` auto-detects package without manual configuration
107- Better error messages when examples not found
108
109**Documentation** (`jacquard`, `jacquard-common`)
110- Improved lifetime pattern explanations
111- Better documentation of zero-copy deserialization approach
112- Links to docs.rs for generated documentation
113
114---
115
116## [0.5.1] - 2025-10-13
117
118### Fixed
119
120**Trait bounds** (`jacquard-common`)
121- Removed lifetime parameter from `XrpcRequest` trait, simplifying trait bounds
122- Lifetime now only appears on `XrpcEndpoint::Request<'de>` associated type
123- Fixes issues with using XRPC types in async contexts like Axum extractors
124
125### Changed
126
127- Updated all workspace crates to 0.5.1 for consistency
128- `jacquard-axum` remains at 0.5.1 (unchanged)
129
130---
131
132## `jacquard-axum` [0.5.1] - 2025-10-13
133
134### Fixed
135
136- Axum extractor now sets the correct Content-Type header during error path.
137
138---
139
140## [0.5.0] - 2025-10-13
141
142### Added
143
144**Agent convenience methods** (`jacquard`)
145- New `AgentSessionExt` trait automatically implemented for `AgentSession + IdentityResolver`
146- **Basic CRUD**: `create_record()`, `get_record()`, `put_record()`, `delete_record()`
147- **Update patterns**: `update_record()` (fetch-modify-put), `update_vec()`, `update_vec_item()`
148- **Blob operations**: `upload_blob()`
149- All methods auto-fill repo from session or URI parameter as relevant, and collection from type's `Collection::NSID`
150
151**VecUpdate trait** (`jacquard`)
152- `VecUpdate` trait for fetch-modify-put patterns on array-based endpoints
153- `PreferencesUpdate` implementation for updating Bluesky user preferences
154- Enables simpler updates to preferences and other 'array of union' types
155
156**Typed record retrieval** (`jacquard-api`, `jacquard-common`, `jacquard-lexicon`)
157- Each collection generates `{Type}Record` marker struct implementing `XrpcResp`
158- `Collection::Record` associated type points to the marker
159- `get_record::<R>()` returns `Response<R::Record>` with zero-copy `.parse()`
160- Response transmutation enables type-safe record operations
161
162**Examples**
163- `create_post.rs`: Creating posts with Agent convenience methods
164- `update_profile.rs`: Updating profile with fetch-modify-put
165- `post_with_image.rs`: Uploading images and creating posts with embeds
166- `update_preferences.rs`: Using VecUpdate for preferences
167- `create_whitewind_post.rs`, `read_whitewind_post.rs`: Third-party lexicons
168- `read_tangled_repo.rs`: Reading git repo metadata from tangled.org
169- `resolve_did.rs`: Identity resolution examples
170- `public_atproto_feed.rs`: Unauthenticated feed access
171- `axum_server.rs`: Server-side XRPC handler
172
173
174**Documentation** (`jacquard`)
175- A whole host of examples added, as well as a lengthy explainer of the trait patterns.
176
177## [0.4.1] - 2025-10-13
178
179### Added
180
181**Collection trait improvements** (`jacquard-api`)
182- Generated `{Type}Record` marker structs for all record types
183- Each implements `XrpcResp` with `Output<'de> = {Type}<'de>` and `Err<'de> = RecordError<'de>`
184- Enables typed `get_record` returning `Response<R::Record>`
185
186### Changed
187
188- Minor improvements to derive macros (`jacquard-derive`)
189- Identity resolution refinements (`jacquard-identity`)
190- OAuth client improvements (`jacquard-oauth`)
191
192---
193
194## [0.4.0] - 2025-10-11
195
196### Breaking Changes
197
198**Zero-copy deserialization** (`jacquard-common`, `jacquard-api`)
199- `XrpcRequest` now takes a `'de` lifetime parameter and requires `Deserialize<'de>`
200- For raw data, `Response::parse_data()` gives validated loosely-typed atproto data, while `Response::parse_raw()` gives the raw values, with minimal validation.
201
202**XRPC module moved** (`jacquard-common`)
203- `xrpc.rs` is now top-level instead of under `types`
204- Import from `jacquard_common::xrpc::*` not `jacquard_common::types::xrpc::*`
205
206**Response API changes** (`jacquard-common`)
207- `XrpcRequest::Output` and `XrpcRequest::Err` are associated types with lifetimes
208- Split response and request traits: `XrpcRequest<'de>` for client, `XrpcEndpoint` for server
209- Added `XrpcResp` marker trait
210
211**Various traits** (`jacquard`, `jacquard-common`, `jacquard-lexicon`, `jacquard-oauth`)
212- Removed #[async_trait] attribute macro usage in favour of `impl Future` return types with manual bounds.
213- Boxing imposed by asyc_trait negatively affected borrowing modes in async methods.
214- Currently no semver guarantees on API trait bounds, if they need to tighten, they will.
215
216### Added
217
218**New crate: `jacquard-axum`**
219- Server-side XRPC handlers for Axum
220- `ExtractXrpc<R>` deserializes incoming requests (query params for Query, body for Procedure)
221- Automatic error responses
222
223**Lexicon codegen fixes** (`jacquard-lexicon`)
224- Union variant collision detection: when multiple namespaces have similar type names, foreign ones get prefixed (e.g., `Images` vs `BskyImages`)
225- Token types generate unit structs with `Display` instead of being skipped
226- Namespace dependency tracking during union generation
227- `generate_cargo_features()` outputs Cargo.toml features with correct deps
228- `sanitize_name()` ensures valid Rust identifiers
229
230**Lexicons** (`jacquard-api`)
231
232Added 646 lexicon schemas. Highlights:
233
234Core ATProto:
235- `com.atproto.*`
236- `com.bad-example.*` for identity resolution
237
238Bluesky:
239- `app.bsky.*` bluesky app
240- `chat.bsky.*` chat client
241- `tools.ozone.*` moderation
242
243Third-party:
244- `sh.tangled.*` - git forge
245- `sh.weaver.*` - orual's WIP markdown blog platform
246- `pub.leaflet.*` - longform publishing
247- `net.anisota.*` - gamified and calming take on bluesky
248- `network.slices.*` - serverless atproto hosting
249- `tools.smokesignal.*` - automation
250- `com.whtwnd.*` - markdown blogging
251- `place.stream.*` - livestreaming
252- `blue.2048.*` - 2048 game
253- `community.lexicon.*` - community extensions (bookmarks, calendar, location, payments)
254- `my.skylights.*` - media tracking
255- `social.psky.*` - social extensions
256- `blue.linkat.*` - link boards
257
258Plus 30+ more experimental/community namespaces.
259
260**Value types** (`jacquard-common`)
261- `RawData` to `Data` conversion with type inference
262- `from_data`, `from_raw_data`, `to_data`, and `to_raw_data` to serialize to and deserialize from the loosely typed value data formats. Particularly useful for second-stage deserialization of type "unknown" fields in lexicons, such as `PostView.record`.
263
264### Changed
265
266- `generate_union()` takes current NSID for dependency tracking
267- Generated code uses `sanitize_name()` for identifiers more consistently
268- Added derive macro for IntoStatic trait implementation
269
270### Fixed
271
272- Methods to extract the output from an XRPC response now behave well with respect to lifetimes and borrowing.
273- Now possible to use jacquard types in places like axum extractors due to lifetime improvements
274- Union variants don't collide when multiple namespaces define similar types and another namespace includes them
275
276---