feat(types): AgenticReceipt — the Control Record in @codespar/types + Python#112
Merged
Conversation
… 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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebase of the pre-reboot
feat/agentic-receipt-typework 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=receiptreturns: 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).AgenticReceipt,ReceiptException,LedgerReceiptResult,LedgerReceiptsResult;LedgerArgsgainsreceipt/receiptsactions +receipt_id/consumer_id/limit. Bump 0.10.14 -> 0.10.15 (manifest in lockstep).LedgerAction, re-exported fromcodespar.__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