feat(sdk): generate types from lexicons across all 9 SDKs
Add `tools/lexgen/` — a single Bun-driven generator that parses
`apps/api/lexicons/**/*.json` once and emits typed bindings for
TypeScript, Go, Python (dataclasses + Pydantic), Rust, Kotlin, Ruby,
Elixir, Clojure (malli), and Gleam. Wired into the root as
`bun run lexgen:types`.
Each SDK now imports its public model types from the generated module
under its historical names: TS namespaces use `src/generated/types`,
Go `rocksky/types.go` aliases to `rocksky/gen`, Python `models.py`
re-exports the Pydantic generated module, Rust `models.rs` does
`pub use crate::generated::… as …`, Kotlin uses `typealias`, Gleam
aliases plus regenerated decoder constructors. Ruby/Elixir/Clojure
expose the generated modules directly since they had no hand-written
model layer.
Lexicon corrections caught along the way (fixed in Pkl source so
`pkl:gen` preserves them): two `ref` typos using `.` instead of `#`
(`album/defs`, `player/defs`), and `scrobble/defs#scrobbleViewDetailed`
gaining `liked` / `likesCount` to match the wire shape.
Every SDK's existing test suite still passes (388+ tests). Versions
bumped to 0.2.0 (Gleam 1.1.0); CHANGELOGs updated where they existed;
each SDK README and `docs/sdks/*.mdx` got a "Types" section pointing
at the regen command.