Skip to content

Releases: quantumpipes/capsule

v1.1.0 — High-Level API

Choose a tag to compare

@bradleygauthier bradleygauthier released this 08 Mar 15:17
e896d9d

High-level API for zero-boilerplate integration. One class, one decorator, one context variable.

Added

  • Capsules class — single entry point that owns storage, chain, and seal. Zero-config default (Capsules() uses SQLite), PostgreSQL via URL string, or custom storage backend via storage= kwarg.
  • @capsules.audit() decorator — wraps any async or sync function with automatic Capsule creation, sealing, and storage. Supports type, tenant_from, tenant_id, trigger_from, source, domain, and swallow_errors parameters.
  • capsules.current() context variable — access and enrich the active Capsule during execution (set model, confidence, session, resources, summary).
  • mount_capsules() FastAPI integration — mount three read-only endpoints (GET /, GET /{id}, GET /verify) onto any FastAPI application. FastAPI is not a hard dependency.
  • 33 new tests (23 audit + 10 FastAPI)

Design Principles

  • Zero new dependencies — uses only stdlib (contextvars, logging, inspect, functools)
  • Additive only — no existing files modified. All 361 existing tests pass unchanged.
  • Never blocks user code — capsule errors are swallowed by default. Decorated function's return value, exceptions, and timing are preserved exactly.

Install

pip install qp-capsule==1.1.0

https://github.com/quantumpipes/capsule/blob/main/CHANGELOG.md#110---2026-03-07

Initial Release

Choose a tag to compare

@bradleygauthier bradleygauthier released this 07 Mar 07:16
v1.0.0

Initial: Capsule Protocol Specification v1.0.0