softschema 0.2.2
softschema 0.2.2 clears the open bug and cleanup backlog: two CLI error-boundary fixes, the uv supply-chain config fix, canonical number rendering with full Python/TypeScript byte-parity, the new softschema prime command, and documentation. The Python (PyPI) and TypeScript (npm) packages ship together at the same version, and every change preserves the golden-corpus + cross-impl byte-parity invariant.
Breaking changes
None (patch release).
New features
softschema primeprints the full agent context — the skill operating rules plus the bundled docs index — so an agent can restore context without the source checkout. Byte-identical across both CLIs.
Fixes and hardening
- CLI error boundary no longer masks internal bugs. The user-error boundary excludes bug-indicator exceptions (Python
TypeError/KeyError; JavaScriptTypeError/RangeError/ReferenceError), so a programmer bug surfaces as a crash instead of a clean exit 2. In the TypeScript CLI every per-command handler routes through one shared boundary (reportUserError), so a bug thrown deep inside a command crashes too — not only one that reaches the top-level guard. Adds an explicitUsageErrorclass and documents the 0/1/2 exit-code contract. - Canonical number rendering (
ss-wbnm). A whole-valued number renders without a trailing fraction and without an exponent below 1e21 (2.0→2,1.0e16→10000000000000000) in error records, synthesized messages, and the echoedvaluesblock. The Python side normalizes its floats to match JavaScript's native form, so validation output is byte-identical for every number in the IEEE-754 safe-integer range; the spec scopes the guarantee accordingly. - Supply-chain cool-off config.
[tool.uv]now uses RFC3339 timestamps with a pinned global cutoff, so the exception applies to local resolution and the lockfile stays stable.
Cleanups
- Consolidated four near-duplicate object guards into one
isMappinghelper (TypeScript); thedocscommand reports the underlying failure; removed a redundant innertry/exceptin the Pythoncompile.
Testing and release safety
- Python lint/type/format,
pytest(146), TypeScriptbiome/tsc/publint,bun test(170), the shared golden corpus on Python + Node + Bun (47 / 45 / 47), and the cross-impl byte-parity diff all pass. New regression tests cover the per-command error boundary and canonical number rendering, plus anumber-large-wholegolden scenario that pins the large-whole-float edge.
Full changelog: https://github.com/jlevy/softschema/blob/v0.2.2/CHANGELOG.md