Releases: quantumpipes/capsule
Capsule v1.5.2
Sealed dict serialization. Consumers can now serialize and deserialize complete sealed records without manual attribute extraction.
Added
Capsule.to_sealed_dict()— Serialize a Capsule including the cryptographic seal envelope (hash,signature,signature_pq,signed_at,signed_by). Returns everything fromto_dict()plus the five seal fields. Use this when building API responses or exporting complete sealed records.to_dict()continues to return only the canonical content (the part that gets hashed).Capsule.from_sealed_dict(data)— Inverse ofto_sealed_dict(). Deserializes both canonical content and seal envelope from a single dict. Missing seal keys default to empty values, so it also accepts plainto_dict()output. Enables full roundtrip:seal → to_sealed_dict → from_sealed_dict → verify.- 21 new tests across 4 test files — unit, integration, FastAPI, and invariant tests.
Fixed
- FastAPI endpoints omitting seal envelope —
GET /capsules/andGET /capsules/{id}were usingto_dict(), which excludes seal fields by design. Responses now useto_sealed_dict()and includehash,signature,signature_pq,signed_at, andsigned_byalongside the capsule content.
Install
pip install qp-capsule==1.5.2py-v1.5.2
Capsule 1.5.2
See CHANGELOG.md for details.
Install
pip install qp-capsule==1.5.2What's Changed
- feat: add to_sealed_dict / from_sealed_dict, fix FastAPI seal omission by @bradleygauthier in #16
Full Changelog: py-v1.5.1...py-v1.5.2
py-v1.5.1
Capsule 1.5.1
See CHANGELOG.md for details.
Install
pip install qp-capsule==1.5.1What's Changed
- fix: widen signed_at/signed_by columns to prevent PostgreSQL overflow by @bradleygauthier in #15
Full Changelog: py-v1.5.0...py-v1.5.1
Capsule v1.5.0
Hash chain concurrency protection. Prevents race conditions where concurrent writes could fork the chain.
Added
- Optimistic retry in
seal_and_store()— if a concurrent writer claims the same sequence number, the UNIQUE constraint rejects the duplicate and the method retries with the updated chain head. Up to 3 retries before raisingChainConflictError. ChainConflictErrorexception — raised whenseal_and_store()exhausts all retries due to sustained concurrent writes for the same tenant chain.UNIQUEconstraint on sequence (SQLite) —CapsuleModelnow enforcesUNIQUE(sequence), preventing duplicate sequence numbers at the database level.UNIQUEconstraint on tenant + sequence (PostgreSQL) —CapsuleModelPGnow enforcesUNIQUE(tenant_id, sequence), scoped per tenant.- Global chain protection (PostgreSQL) — partial unique index for
tenant_id IS NULLprevents duplicate sequences in the global chain. - 36 new concurrency tests covering retry behavior, constraint enforcement, exception hierarchy, and integration.
Security
- TOCTOU race condition fixed — the
add()→seal()→store()sequence previously allowed concurrent writers to silently fork the hash chain. Now protected at two layers: database constraints + application retry.
Install
pip install qp-capsule==1.5.0Capsule v1.4.0
Ecosystem expansion: Go verifier, LiteLLM integration, and negative conformance vectors.
Added
- Go verifier library (
capsule-go) — canonical JSON serialization, SHA3-256 hashing, Ed25519 signature verification, and structural/full/signature chain verification in Go. Passes all 16 golden conformance vectors. Verification-only (no capsule creation). - LiteLLM integration (
capsule-litellm) —CapsuleLoggercallback that seals every LLM call into a Capsule. Sync and async. Captures prompt hash (SHA3-256), token metrics, latency, model identity, and error tracking. - Invalid capsule fixtures (
conformance/invalid-fixtures.json) — 15 negative test vectors across 5 error categories: missing fields, wrong types, invalid values, chain violations, and content tampering. - Python tests for invalid fixtures — 33 tests validating the invalid fixture suite.
- Ecosystem documentation — README restructured with Reference Implementations and Ecosystem Libraries. Architecture doc adds ecosystem diagram.
Full Changelog
https://github.com/quantumpipes/capsule/blob/main/CHANGELOG.md#140---2026-03-15
py-v1.5.0
Capsule 1.5.0
See CHANGELOG.md for details.
Install
pip install qp-capsule==1.5.0Full Changelog: py-v1.4.0...py-v1.5.0
py-v1.4.0
Capsule 1.4.0
See CHANGELOG.md for details.
Install
pip install qp-capsule==1.4.0What's Changed
- deps(typescript): Bump vitest from 4.0.18 to 4.1.0 in /reference/typescript by @dependabot[bot] in #14
- ci: Bump actions/setup-node from 4.2.0 to 6.3.0 by @dependabot[bot] in #12
- ci: Bump actions/download-artifact from 8.0.0 to 8.0.1 by @dependabot[bot] in #11
- deps(typescript): Bump @vitest/coverage-v8 from 4.0.18 to 4.1.0 in /reference/typescript by @dependabot[bot] in #13
Full Changelog: v1.3.0...py-v1.4.0
Capsule v1.3.0
Capsule Protocol v1.3.0: CLI verifier and epoch-based key rotation
Added
capsuleCLI — verify, inspect, and manage keys from the command linecapsule verify <source>— structural, full (SHA3-256), and signature (Ed25519) verificationcapsule inspect— display a capsule's full 6-section contentcapsule keys info | rotate | export-public— keyring managementcapsule hash <file>— SHA3-256 utility
- Epoch-based key rotation — NIST SP 800-57 aligned key lifecycle with backward-compatible verification across rotations
- Epoch-aware signature verification —
Seal(keyring=kr)resolves the correct epoch's public key via fingerprint lookup
Install
pip install qp-capsule==1.3.0See CHANGELOG.md for full details.
py-v1.3.0
Capsule 1.3.0
See CHANGELOG.md for details.
Install
pip install qp-capsule==1.3.0What's Changed
- Add NIST RFI submission artifacts (Docket NIST-2025-0035) by @bradleygauthier in #6
- Expand compliance into per-framework mappings by @bradleygauthier in #7
- Add Security Considerations to spec and cryptographic chain verification by @bradleygauthier in #8
- ci: Separate Python and TypeScript release tag triggers by @bradleygauthier in #9
- Add CLI verifier and epoch-based key rotation (v1.3.0) by @bradleygauthier in #10
New Contributors
- @bradleygauthier made their first contribution in #6
Full Changelog: v1.2.0...py-v1.3.0
v1.2.0
Capsule 1.2.0
See CHANGELOG.md for details.
Install
pip install qp-capsule==1.2.0Full Changelog: v1.1.0...v1.2.0