Skip to content

feat(types): AgenticReceipt — the Control Record in @codespar/types + Python#112

Merged
fabianocruz merged 1 commit into
mainfrom
feat/agentic-receipt-rebased
Jul 4, 2026
Merged

feat(types): AgenticReceipt — the Control Record in @codespar/types + Python#112
fabianocruz merged 1 commit into
mainfrom
feat/agentic-receipt-rebased

Conversation

@fabianocruz

Copy link
Copy Markdown
Member

Rebase of the pre-reboot feat/agentic-receipt-type work onto current main (only this commit was new; the CLI 0.5.x commits below it already landed via #110).

Publishes the canonical agentic receipt type so SDK consumers can type what codespar_ledger action=receipt returns: mandate -> quote -> payment -> delivery, tamper-evident chain hash, settle-time exceptions. Rail-agnostic structure; only the delivery proof artifact differs (NF-e + Pix endToEndId vs the x402 resource response).

  • @codespar/types: AgenticReceipt, ReceiptException, LedgerReceiptResult, LedgerReceiptsResult; LedgerArgs gains receipt/receipts actions + receipt_id/consumer_id/limit. Bump 0.10.14 -> 0.10.15 (manifest in lockstep).
  • Python mirror: same dataclasses + extended LedgerAction, re-exported from codespar.__init__.

Verified against current main: tsc build, 101 vitest, mypy --strict clean, 77 pytest, ruff clean. NOT published to npm (OIDC publish ceremony runs separately).

🤖 Generated with Claude Code

… Python

Publish the canonical agentic receipt type so SDK consumers can type the
receipt they get back from codespar_ledger action=receipt: mandate -> quote ->
payment -> delivery, with the tamper-evident chain hash + settle-time
exceptions. The structure is rail-agnostic; only the delivery proof artifact
differs (NF-e + Pix endToEndId for fiscal, the x402 resource response for
crypto).

- @codespar/types (TS): AgenticReceipt + ReceiptException + LedgerReceiptResult
  + LedgerReceiptsResult; LedgerArgs gains receipt/receipts actions +
  receipt_id/consumer_id/limit. Bump 0.10.7 -> 0.10.8.
- Python mirror (no TS<->Python drift): same dataclasses + LedgerAction
  extended; re-exported from codespar.__init__.

Verified: @codespar/types tsc + build + 53 conformance tests; Python mypy
--strict clean + 75 pytest; ruff clean. NOT published (npm is OIDC/2FA — the
publish ceremony runs separately).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fabianocruz
fabianocruz merged commit 03f14d7 into main Jul 4, 2026
10 checks passed
@fabianocruz
fabianocruz deleted the feat/agentic-receipt-rebased branch July 4, 2026 22:26
fabianocruz added a commit that referenced this pull request Jul 4, 2026
The AgenticReceipt/LedgerReceiptResult dataclasses landed in #112
without a
version bump; PyPI is still 0.10.1. Bump so the publish-python dispatch
ships
the Control Record types on the Python side too (TS went out as
@codespar/types 0.10.15).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant