Repository navigation
feat: publish versioned receipt JSON Schema - #38
Open
codekongdev wants to merge 1 commit into
Open
codekongdev wants to merge 1 commit into
codekongdev wants to merge 1 commit into
Conversation
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.
What changed
Closes #34.
Publish a draft 2020-12 JSON Schema for receipt format version 1 at
schemas/v1/receipt.schema.json, exported from the npm package asgrounded-json/receipt.schema.json. External tools can resolve and validate the receipt structure without depending on the SDK's internal Zod parser.Add deterministic product, job, and article receipts. Tests discover example receipts, validate them with Ajv, and regenerate and replay the three fixtures against their local sources. The package smoke test also reads the schema from a clean tarball installation.
The receipt wire format and runtime behavior remain unchanged. Documentation distinguishes structural validation from timestamp parsing, byte limits, cross-field consistency, extraction-schema safety, cryptographic checks, and evidence replay.
Evidence and security
Ajv is a development dependency used by the tests; it is not added to the runtime verification path.
Verification
npm run check: package build, tests, lint, formatting, and site build pass.npm run pack:smoke: packaged schema resolution, SDK import and replay, and CLI demo pass.Validated locally with Node.js 22.22.1 and npm 11.19.0 on Linux.