···11# Changelog
2233+## [0.9.0] - 2025-11-03
44+55+### Added
66+77+**Runtime schema validation** (`jacquard-lexicon`)
88+- `SchemaValidator` for validating `Data` values against lexicon schemas
99+- CID-based validation caching for efficient repeated validation
1010+- `ValidationResult` with structural and constraint error separation
1111+- Comprehensive error types: `StructuralError` (type mismatches, missing fields, union errors) and `ConstraintError` (length, grapheme, numeric bounds)
1212+- `ValidationPath` for precise error location reporting
1313+- Ref cycle detection with configurable max depth
1414+- Support for validating partial/malformed data without full deserialization
1515+1616+**Value query DSL** (`jacquard-common`)
1717+- Pattern-based querying of nested `Data` structures
1818+- `data.query(pattern)` with expressive syntax:
1919+ - `field.nested` - exact path navigation
2020+ - `[..]` - wildcard over collections (array elements or object values)
2121+ - `field..nested` - scoped recursion (find nested within field, expect one)
2222+ - `...field` - global recursion (find all occurrences anywhere)
2323+- `QueryResult` enum with `Single`, `Multiple`, and `None` variants
2424+- `QueryMatch` with path tracking for multiple results
2525+- Iterator support via `.values()`, `.first()`, `.single()`, `.multiple()`
2626+2727+**Data value enhancements** (`jacquard-common`)
2828+- `get_at_path()` for simple path-based field access on `Data` and `RawData`
2929+- Path syntax: `embed.images[0].alt` for navigating nested structures
3030+- `type_discriminator()` helper methods for AT Protocol union discrimination
3131+- Returns `$type` field value for objects with type discriminators
3232+- Added on `Data`, `Object`, and `RawData` types
3333+- Collection helper methods: `get()`, `contains_key()`, `len()`, `is_empty()`, `iter()`, `keys()`, `values()`
3434+- Index operator support: `obj["key"]` and `arr[0]`
3535+3636+**Lexicon resolution** (`jacquard-identity`)
3737+- `LexiconResolver` for fetching lexicon schemas from AT Protocol services
3838+- Resolves lexicons from PDS instances and lexicon hosts
3939+- `resolve_lexicon()` fetches and parses lexicon schemas
4040+- `resolve_lexicon_raw()` fetches raw schema JSON
4141+- New example: `resolve_lexicon.rs`
4242+4343+**Identity resolver caching** (`jacquard-identity`)
4444+- Optional `cache` feature with configurable in-memory caching
4545+- `JacquardResolver::with_cache()` constructor for cached resolver
4646+- Separate TTLs for handle→DID, DID→doc, and lexicon resolution
4747+4848+**XRPC client improvements** (`jacquard-common`, `jacquard`, `jacquard-oauth`)
4949+- `set_options()` and `set_endpoint()` methods on `XrpcClient` trait
5050+- Default no-op implementations for stateless clients
5151+- Enables runtime reconfiguration of stateful clients
5252+- Better support for custom endpoint and option overrides
5353+5454+**Lexicon schema generation from Rust types** (`jacquard-derive`, `jacquard-lexicon`)
5555+- New `#[derive(LexiconSchema)]` macro for generating lexicon schemas from Rust structs
5656+- New `#[lexicon_union]` attribute macro for lexicon union types (tagged enums)
5757+- Automatic schema generation for custom lexicons without writing JSON manually
5858+- Field-level attributes: `ref` for explicit type references, `union` for union fields
5959+- Fragment support for multi-def lexicons via `fragment = "..."` attribute
6060+- Generates `LexiconDoc` at compile time for runtime validation
6161+- Enables type-safe custom lexicon development
6262+6363+**Lexicon codegen improvements** (`jacquard-lexicon`, `jacquard-api`)
6464+- Vendored in an implementation of the typed builder pattern from `bon` to **substantially** improve compile times
6565+- Feature-gated heavy code generation features so `jacquard-api` and other consumers of the validation capabilities don't pay the `syn` tax as badly.
6666+- LexiconSchema trait generated implementations for runtime validation
6767+6868+**Session store improvements** (`jacquard`)
6969+- Improved trait bounds for `SessionStore` implementations
7070+- Better ergonomics for credential session types
7171+- Memory-based credential session helpers
7272+7373+**New crate: `jacquard-lexgen`**
7474+- Lexicon code generation tooling extracted from `jacquard-lexicon`
7575+- Separates binary/CLI tools from library code
7676+- Contains lexicon fetching and code generation binaries
7777+- `jacquard-lexicon` remains as pure library for lexicon parsing, code generation, and validation
7878+7979+**Examples**
8080+- `app_password_create_post.rs`: App password authentication example
8181+8282+### Changed
8383+8484+**Feature gating** (`jacquard-identity`)
8585+- Better conditional compilation for platform-specific features
8686+- Improved WASM target support
8787+8888+**Dependency updates**
8989+- Updated to latest lexicons from atproto/bluesky
9090+- Added workspace dependencies: sha2, multihash, dashmap, cid
9191+- Various minor dependency version updates
9292+9393+### Fixed
9494+9595+**File auth store** (`jacquard`)
9696+- Fixed serialization/deserialization bugs in `FileAuthStore` implementation
9797+9898+**Packaging** (`jacquard-lexgen`)
9999+- Added Nix flake apps for lexicon tools
100100+3101## [0.8.0] - 2025-10-23
41025103### Breaking Changes
···2222 - All the building blocks of the convenient abstractions are available
2323 - Use as much or as little from the crates as you need
24242525-## 0.8.0 Release Highlights:
2525+## 0.9.0 Release Highlights:
2626+2727+**`#[derive(LexiconSchema)]` + `#[lexicon_union]` macros**
2828+- Automatic schema generation for custom lexicons from Rust structs
2929+- Supports all lexicon constraints via attributes (max_length, max_graphemes, min/max, etc.)
3030+- Generates `LexiconDoc` at compile time for runtime validation
3131+3232+**Runtime lexicon data validation**
3333+- Validation of structural and/or value contraints of data against a lexicon
3434+- caching for value validations
3535+- LexiconSchema trait generated implementations for runtime validation
3636+- detailed validation error results
3737+3838+**Lexicon resolver**
3939+- Fetch lexicons at runtime for addition to schema registry
4040+4141+**Query and path DSLs for `Data` and `RawData` value types**
4242+- Pattern-based querying of nested `Data` structures
4343+- `data.query(pattern)` with expressive syntax:
4444+ - `field.nested` - exact path navigation
4545+ - `[..]` - wildcard over collections (array elements or object values)
4646+ - `field..nested` - scoped recursion (find nested within field, expect one)
4747+ - `...field` - global recursion (find all occurrences anywhere)
4848+- `get_at_path()` for simple path-based field access on `Data` and `RawData`
4949+- Path syntax: `embed.images[0].alt` for navigating nested structures
5050+- `type_discriminator()` helper methods for AT Protocol union discrimination
5151+- Collection helper methods: `get()`, `contains_key()`, `len()`, `is_empty()`, `iter()`, `keys()`, `values()`
5252+- Index trait implemented: `obj["key"]` and `arr[0]`
5353+5454+**Caching in identity/lexicon resolver**
5555+- Basic LRU in-memory cache implementation using `mini-moka`
5656+- Reduces number of network requests for certain operations
5757+- Works on both native and WebAssembly
5858+5959+**XRPC client improvements**
6060+- `set_options()` and `set_endpoint()` methods on `XrpcClient` trait
6161+- Default no-op implementations for stateless clients
6262+- Enables runtime reconfiguration of stateful clients
6363+- Better support for custom endpoint and option overrides
6464+- Fixed bug where setting a custom 'Content-Type' header wouldn't be respected
6565+6666+**Major generated API compilation time improvements**
6767+- Generated code output now includes a typestate builder implementation, similar to the `bon` crate
6868+- Moves the substantial `syn` tax of generating the builders to code generation time, not compile time.
26692727-**`jacquard-repo` crate**
2828- - Complete implementation of the atproto repository spec
2929- - [Sync v1.1](https://github.com/bluesky-social/proposals/blob/main/0006-sync-iteration/README.md#commit-validation-mst-operation-inversion) commit event support (both proof production and verification), well-validated in testing
3030- - repository CAR file read/write support
3131- - CAR file write order compatible with streaming mode from the [sync iteration proposal](https://github.com/bluesky-social/proposals/blob/main/0006-sync-iteration/README.md#streaming-car-processing)
3232- - Big rewrite of all the errors in the crate, improvements to context and overall structure
3333- - Made handle parsing a bit more permissive for a common case ('handle.invalid' when someone has a messed up handle), added a method to confirm syntactic validity (the correct way to confirm validity is resolve_handle() from the IdentityResolver trait, then fetching and comparing to the DID document).
7070+**New `jacquard-lexgen` crate**
7171+- Moves binaries out of jacquard-lexicon to reduce size further
7272+- Flake app for `lex-fetch`
34733574## Example
3675