diff --git a/ONBOARDING.md b/ONBOARDING.md index 3e729ea..21cb772 100644 --- a/ONBOARDING.md +++ b/ONBOARDING.md @@ -81,6 +81,12 @@ Canonical definitions → `SPEC.md`. ``` npm install npm run validate +``` + +Use the subcommands only when you need a narrower loop: + +``` +npm run validate:schemas npm run validate:examples ``` 5. Update `RESOLUTION.md`, provenance @@ -96,6 +102,16 @@ Once approved → tagged + pinned. - Fully traceable governance + checksums - Deterministic $id + HTTP resolution +## 5A. Fixture Rules + +When you touch `examples/`, keep the validation surface credible: + +- valid examples should be realistic, not cartoon placeholders +- invalid examples should usually test one clear failure, not five at once +- filenames should explain the scenario (`missing-input`, `invalid-version`, `extra-property`, etc.) +- request examples must stay verb-aligned; do not copy an invalid fixture from one verb directory into another +- valid receipts should use realistic `sha256:` digests and CID-shaped values + Default assumption: **new version** for any semantic change. ## 6. Support diff --git a/README.md b/README.md index 57154e4..6d1b2e3 100644 --- a/README.md +++ b/README.md @@ -77,9 +77,9 @@ If agents cannot agree on what actions mean, interoperability breaks. "status": "ok", "timestamp": "2026-03-18T12:00:00Z", "agent": "summarizeagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeisummarizereceiptokexample0001", + "request_hash": "sha256:4b87d90208e62430a5d8f577938fd26d02d646f092d137cee66216c0daac8243", + "result_hash": "sha256:8b5d2d4dfb4a8bb7d4d1ed436e78c5f4bcf6ca9714ec93a8db8e5ec6ed8b1b8d", + "result_cid": "bafybeif6h8j0l2n4p6r8t0v2x4z6b8d0f2h4j6l8n0p2r4t6v8x0z2bd", "summary": "Commons v1.1.0 makes requests smaller and receipts easier to verify while preserving stable verb semantics.", "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" } @@ -107,13 +107,15 @@ Install Commons and AJV: npm install @commandlayer/commons ajv ajv-formats ajv-errors ``` -**Validate all schemas and examples with the repo's working commands** +**Validate the full repo surface** ```bash npm install npm run validate ``` +`npm run validate` is the primary command: it compiles every schema and then checks that all shipped examples pass or fail exactly as intended. + **Validate a specific example against the published schema using AJV** ```bash @@ -384,7 +386,6 @@ Commons gives upper layers a stable meaning layer to build around. │ ├── .request.schema.json │ └── .receipt.schema.json └── scripts/ - ├── ajv-run.mjs ├── validate-all.mjs └── validate-examples.mjs ``` @@ -421,15 +422,30 @@ Published version directories must not be edited in place. Available commands: ```bash +npm run validate npm run validate:schemas npm run validate:examples -npm run validate ``` -These commands compile schemas in strict Ajv mode and validate the shipped examples for both `v1.0.0` and `v1.1.0`. +- `npm run validate` — the main contributor command. Compiles every schema, then validates every shipped example. +- `npm run validate:schemas` — schema compilation only. Useful when changing schema files or Ajv configuration. +- `npm run validate:examples` — fixture pass/fail verification only. Useful when editing examples or improving failure coverage. + +For `v1.1.0`, fixture discipline matters as much as schema compilation: valid examples must look operationally plausible, and invalid examples should usually fail for one clear reason that matches the filename. --- +## Fixture discipline + +For `examples/v1.1.0/commons/`, contributors should treat fixtures as protocol evidence, not filler: + +- valid examples should look realistic enough that an implementer could model against them +- invalid examples should usually exercise one clear failure mode +- filenames should describe the exact failure being tested +- request fixtures must stay aligned with the verb directory they live in; deliberate wrong-verb cases must be explicitly named +- valid receipts should use realistic digest and CID-shaped values instead of toy placeholders + + ## License MIT. diff --git a/examples/v1.1.0/commons/analyze/json/invalid/001-analyze.request.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/001-analyze.request.invalid.json deleted file mode 100644 index c96d24e..0000000 --- a/examples/v1.1.0/commons/analyze/json/invalid/001-analyze.request.invalid.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "verb": "summarize", - "version": "1.1.0", - "input": { - "text": "This should be a string." - }, - "mode": "bullet-points" -} diff --git a/examples/v1.1.0/commons/analyze/json/invalid/001-missing-verb.request.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/001-missing-verb.request.invalid.json new file mode 100644 index 0000000..4e9f7d5 --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/invalid/001-missing-verb.request.invalid.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "input": "Find the hidden assumptions in this release checklist.", + "mode": "extract" +} diff --git a/examples/v1.1.0/commons/analyze/json/invalid/002-missing-input.request.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/002-missing-input.request.invalid.json new file mode 100644 index 0000000..a84eb48 --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/invalid/002-missing-input.request.invalid.json @@ -0,0 +1,5 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "mode": "extract" +} diff --git a/examples/v1.1.0/commons/analyze/json/invalid/003-empty-input.request.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/003-empty-input.request.invalid.json new file mode 100644 index 0000000..3672107 --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/invalid/003-empty-input.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "input": "", + "mode": "extract" +} diff --git a/examples/v1.1.0/commons/analyze/json/invalid/004-invalid-version.request.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/004-invalid-version.request.invalid.json new file mode 100644 index 0000000..cf58acd --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/invalid/004-invalid-version.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "analyze", + "version": "1.1", + "input": "Review the incident summary.", + "mode": "extract" +} diff --git a/examples/v1.1.0/commons/analyze/json/invalid/005-extra-property.request.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/005-extra-property.request.invalid.json new file mode 100644 index 0000000..d6b8546 --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/invalid/005-extra-property.request.invalid.json @@ -0,0 +1,7 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "input": "Review the incident summary.", + "mode": "extract", + "trace_id": "req_01" +} diff --git a/examples/v1.1.0/commons/analyze/json/invalid/006-invalid-mode.request.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/006-invalid-mode.request.invalid.json new file mode 100644 index 0000000..941445b --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/invalid/006-invalid-mode.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "input": "Review the incident summary.", + "mode": "bullet-points" +} diff --git a/examples/v1.1.0/commons/summarize/json/invalid/001-summarize.request.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/007-wrong-input-type.request.invalid.json similarity index 83% rename from examples/v1.1.0/commons/summarize/json/invalid/001-summarize.request.invalid.json rename to examples/v1.1.0/commons/analyze/json/invalid/007-wrong-input-type.request.invalid.json index 25339f6..c4914f8 100644 --- a/examples/v1.1.0/commons/summarize/json/invalid/001-summarize.request.invalid.json +++ b/examples/v1.1.0/commons/analyze/json/invalid/007-wrong-input-type.request.invalid.json @@ -4,5 +4,5 @@ "input": { "text": "This should be a string." }, - "mode": "tweet" + "mode": "extract" } diff --git a/examples/v1.1.0/commons/analyze/json/invalid/008-wrong-verb-literal.request.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/008-wrong-verb-literal.request.invalid.json new file mode 100644 index 0000000..6c6e5a7 --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/invalid/008-wrong-verb-literal.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "summarize", + "version": "1.1.0", + "input": "Review the incident summary.", + "mode": "extract" +} diff --git a/examples/v1.1.0/commons/analyze/json/invalid/900-analyze.receipt.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/900-analyze.receipt.invalid.json deleted file mode 100644 index 15d1503..0000000 --- a/examples/v1.1.0/commons/analyze/json/invalid/900-analyze.receipt.invalid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verb": "analyze", - "version": "1.1.0", - "status": "ok", - "timestamp": "not-a-date", - "request_hash": "sha256:xyz", - "signature": "short", - "error": "ok receipts should not rely on error only" -} diff --git a/examples/v1.1.0/commons/analyze/json/invalid/900-invalid-request-hash.receipt.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/900-invalid-request-hash.receipt.invalid.json new file mode 100644 index 0000000..50466fb --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/invalid/900-invalid-request-hash.receipt.invalid.json @@ -0,0 +1,12 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:00:00Z", + "agent": "analyzeagent.eth", + "request_hash": "sha256:not-a-real-digest", + "result_hash": "sha256:ab6d7cf38df79241b5f67fbe2718d1d58d7b0f3e131d0f1d8d4f7b7b6c4a2e19", + "result_cid": "bafybeigdyrzt5sfp7udm7hu76g2n6z4r6x2zjz6xj5l5w2z4g5i6k7l4mu", + "summary": "Core risks center on manual signer rotation, unproven indexer headroom, and the lack of a documented rollback path.", + "signature": "MEUCIGdY9f8wq2dL4rN6sT7uV1xY3zA5bC7dE9fG1hJ2kL3mAiEAzQ7wX9yB2cD4eF6gH8iJ0kL2mN4pQ6rS8tU0vW2xY4" +} diff --git a/examples/v1.1.0/commons/analyze/json/invalid/901-missing-error-on-error.receipt.invalid.json b/examples/v1.1.0/commons/analyze/json/invalid/901-missing-error-on-error.receipt.invalid.json new file mode 100644 index 0000000..285ddb8 --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/invalid/901-missing-error-on-error.receipt.invalid.json @@ -0,0 +1,9 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:08:14Z", + "agent": "analyzeagent.eth", + "request_hash": "sha256:42fa6d1f884a8ef2ff4a6f43cf9d3d44ec9818d636eb54652a7ef7cb2b4f6a7c", + "signature": "MEQCIFf0nN8vR2sT4uV6wX8yZ1aB3cD5eF7gH9iJ1kL2mN4pAiAqS6uV8wY0zB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3e" +} diff --git a/examples/v1.1.0/commons/analyze/json/valid/001-analyze.request.valid.json b/examples/v1.1.0/commons/analyze/json/valid/001-analyze.request.valid.json deleted file mode 100644 index 762da0f..0000000 --- a/examples/v1.1.0/commons/analyze/json/valid/001-analyze.request.valid.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "verb": "analyze", - "version": "1.1.0", - "input": "Review this smart-contract audit summary and extract the core risk themes for launch readiness.", - "mode": "extract" -} diff --git a/examples/v1.1.0/commons/analyze/json/valid/001-minimal-extract.request.valid.json b/examples/v1.1.0/commons/analyze/json/valid/001-minimal-extract.request.valid.json new file mode 100644 index 0000000..46dd853 --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/valid/001-minimal-extract.request.valid.json @@ -0,0 +1,5 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "input": "Review the validator diff and extract the core security implications." +} diff --git a/examples/v1.1.0/commons/analyze/json/valid/002-risk-theme-extract.request.valid.json b/examples/v1.1.0/commons/analyze/json/valid/002-risk-theme-extract.request.valid.json new file mode 100644 index 0000000..df0a565 --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/valid/002-risk-theme-extract.request.valid.json @@ -0,0 +1,6 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "input": "Audit notes: signer rotation is manual, rollback is undocumented, and indexer capacity assumptions are untested before mainnet launch.", + "mode": "extract" +} diff --git a/examples/v1.1.0/commons/analyze/json/valid/900-analyze.receipt.valid.json b/examples/v1.1.0/commons/analyze/json/valid/900-analyze.receipt.valid.json deleted file mode 100644 index 5c491c9..0000000 --- a/examples/v1.1.0/commons/analyze/json/valid/900-analyze.receipt.valid.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verb": "analyze", - "version": "1.1.0", - "status": "ok", - "timestamp": "2026-03-18T12:00:00Z", - "agent": "analyzeagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeianalyzereceiptokexample0001", - "summary": "Core risks center on signer key rotation gaps, unresolved indexer scaling assumptions, and an unstated rollback plan.", - "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" -} diff --git a/examples/v1.1.0/commons/analyze/json/valid/900-ok.receipt.valid.json b/examples/v1.1.0/commons/analyze/json/valid/900-ok.receipt.valid.json new file mode 100644 index 0000000..c8c3a53 --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/valid/900-ok.receipt.valid.json @@ -0,0 +1,12 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:00:00Z", + "agent": "analyzeagent.eth", + "request_hash": "sha256:8d8b0c9f7cc2c94b5f5d2e8f9bb7d38a74646d8f1f6f0de44d4a1f8be0c5b9d1", + "result_hash": "sha256:ab6d7cf38df79241b5f67fbe2718d1d58d7b0f3e131d0f1d8d4f7b7b6c4a2e19", + "result_cid": "bafybeigdyrzt5sfp7udm7hu76g2n6z4r6x2zjz6xj5l5w2z4g5i6k7l4mu", + "summary": "Core risks center on manual signer rotation, unproven indexer headroom, and the lack of a documented rollback path.", + "signature": "MEUCIGdY9f8wq2dL4rN6sT7uV1xY3zA5bC7dE9fG1hJ2kL3mAiEAzQ7wX9yB2cD4eF6gH8iJ0kL2mN4pQ6rS8tU0vW2xY4" +} diff --git a/examples/v1.1.0/commons/analyze/json/valid/901-error.receipt.valid.json b/examples/v1.1.0/commons/analyze/json/valid/901-error.receipt.valid.json new file mode 100644 index 0000000..ede9343 --- /dev/null +++ b/examples/v1.1.0/commons/analyze/json/valid/901-error.receipt.valid.json @@ -0,0 +1,10 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:08:14Z", + "agent": "analyzeagent.eth", + "request_hash": "sha256:42fa6d1f884a8ef2ff4a6f43cf9d3d44ec9818d636eb54652a7ef7cb2b4f6a7c", + "signature": "MEQCIFf0nN8vR2sT4uV6wX8yZ1aB3cD5eF7gH9iJ1kL2mN4pAiAqS6uV8wY0zB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3e", + "error": "The input exceeded the analyzer context window before a stable extraction could be produced." +} diff --git a/examples/v1.1.0/commons/classify/json/invalid/001-classify.request.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/001-classify.request.invalid.json deleted file mode 100644 index 0b75ab4..0000000 --- a/examples/v1.1.0/commons/classify/json/invalid/001-classify.request.invalid.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "verb": "summarize", - "version": "1.1.0", - "input": { - "text": "This should be a string." - }, - "mode": "ordinal" -} diff --git a/examples/v1.1.0/commons/classify/json/invalid/001-missing-verb.request.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/001-missing-verb.request.invalid.json new file mode 100644 index 0000000..d0840ac --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/invalid/001-missing-verb.request.invalid.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "input": "Classify this incident report.", + "mode": "single" +} diff --git a/examples/v1.1.0/commons/classify/json/invalid/002-missing-input.request.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/002-missing-input.request.invalid.json new file mode 100644 index 0000000..b009b08 --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/invalid/002-missing-input.request.invalid.json @@ -0,0 +1,5 @@ +{ + "verb": "classify", + "version": "1.1.0", + "mode": "single" +} diff --git a/examples/v1.1.0/commons/classify/json/invalid/003-empty-input.request.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/003-empty-input.request.invalid.json new file mode 100644 index 0000000..14201d6 --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/invalid/003-empty-input.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "classify", + "version": "1.1.0", + "input": "", + "mode": "single" +} diff --git a/examples/v1.1.0/commons/classify/json/invalid/004-invalid-version.request.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/004-invalid-version.request.invalid.json new file mode 100644 index 0000000..bbb6574 --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/invalid/004-invalid-version.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "classify", + "version": "1.1.1", + "input": "Classify this incident report.", + "mode": "single" +} diff --git a/examples/v1.1.0/commons/classify/json/invalid/005-extra-property.request.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/005-extra-property.request.invalid.json new file mode 100644 index 0000000..c2c3e71 --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/invalid/005-extra-property.request.invalid.json @@ -0,0 +1,9 @@ +{ + "verb": "classify", + "version": "1.1.0", + "input": "Classify this incident report.", + "mode": "single", + "labels": [ + "billing_issue" + ] +} diff --git a/examples/v1.1.0/commons/classify/json/invalid/006-invalid-mode.request.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/006-invalid-mode.request.invalid.json new file mode 100644 index 0000000..9b5047e --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/invalid/006-invalid-mode.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "classify", + "version": "1.1.0", + "input": "Classify this incident report.", + "mode": "ordinal" +} diff --git a/examples/v1.1.0/commons/classify/json/invalid/007-wrong-input-type.request.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/007-wrong-input-type.request.invalid.json new file mode 100644 index 0000000..246b97c --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/invalid/007-wrong-input-type.request.invalid.json @@ -0,0 +1,8 @@ +{ + "verb": "classify", + "version": "1.1.0", + "input": [ + "billing_issue" + ], + "mode": "single" +} diff --git a/examples/v1.1.0/commons/classify/json/invalid/008-wrong-verb-literal.request.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/008-wrong-verb-literal.request.invalid.json new file mode 100644 index 0000000..9a80654 --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/invalid/008-wrong-verb-literal.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "input": "Classify this incident report.", + "mode": "single" +} diff --git a/examples/v1.1.0/commons/classify/json/invalid/900-classify.receipt.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/900-classify.receipt.invalid.json deleted file mode 100644 index 2d87b6e..0000000 --- a/examples/v1.1.0/commons/classify/json/invalid/900-classify.receipt.invalid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verb": "classify", - "version": "1.1.0", - "status": "ok", - "timestamp": "not-a-date", - "request_hash": "sha256:xyz", - "signature": "short", - "error": "ok receipts should not rely on error only" -} diff --git a/examples/v1.1.0/commons/classify/json/invalid/900-summary-wrong-type.receipt.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/900-summary-wrong-type.receipt.invalid.json new file mode 100644 index 0000000..2ac0f88 --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/invalid/900-summary-wrong-type.receipt.invalid.json @@ -0,0 +1,12 @@ +{ + "verb": "classify", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:10:00Z", + "agent": "classifyagent.eth", + "request_hash": "sha256:3d5224e3ebc7f6ab9e9a6a2114a5f7d01c6847c8df0e3fd53c0e5d117f6ab9dd", + "summary": [ + "billing_issue" + ], + "signature": "MEYCIQDf3h7kL9mN2pQ4rS6tU8vW0xY2zA4bC6dE8fG0hJ1kLwIhAO5pQ7rS9tU1vW3xY5zB7cD9eF1gH3iJ5kL7mN9pQ1" +} diff --git a/examples/v1.1.0/commons/classify/json/invalid/901-extra-property.receipt.invalid.json b/examples/v1.1.0/commons/classify/json/invalid/901-extra-property.receipt.invalid.json new file mode 100644 index 0000000..19e6a1b --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/invalid/901-extra-property.receipt.invalid.json @@ -0,0 +1,11 @@ +{ + "verb": "classify", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:10:21Z", + "agent": "classifyagent.eth", + "request_hash": "sha256:94c6c8e7224c96a1ad9438c5ce9f8a775ad9de5ec28d19e5f02b6f58f2ce87db", + "signature": "MEQCIC4dF6gH8iJ0kL2mN4pQ6rS8tU0vW2xY4zB6dD8fF0nAiB3cE5gH7iJ9kL1mN3pQ5rS7tU9vW1xY3zA5bC7dE9fG1", + "error": "The label taxonomy was unavailable, so no deterministic class assignment could be made.", + "debug": "extra" +} diff --git a/examples/v1.1.0/commons/classify/json/valid/001-classify.request.valid.json b/examples/v1.1.0/commons/classify/json/valid/001-minimal.request.valid.json similarity index 63% rename from examples/v1.1.0/commons/classify/json/valid/001-classify.request.valid.json rename to examples/v1.1.0/commons/classify/json/valid/001-minimal.request.valid.json index 95458ab..dcb4e76 100644 --- a/examples/v1.1.0/commons/classify/json/valid/001-classify.request.valid.json +++ b/examples/v1.1.0/commons/classify/json/valid/001-minimal.request.valid.json @@ -1,6 +1,5 @@ { "verb": "classify", "version": "1.1.0", - "input": "Payment failed after signature verification because the buyer wallet had insufficient balance.", - "mode": "single" + "input": "Payment failed after signature verification because the buyer wallet had insufficient balance." } diff --git a/examples/v1.1.0/commons/classify/json/valid/002-multi-label.request.valid.json b/examples/v1.1.0/commons/classify/json/valid/002-multi-label.request.valid.json new file mode 100644 index 0000000..3d9b999 --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/valid/002-multi-label.request.valid.json @@ -0,0 +1,6 @@ +{ + "verb": "classify", + "version": "1.1.0", + "input": "The RPC returned 429s during traffic spikes and the retry worker exhausted its queue budget.", + "mode": "multi" +} diff --git a/examples/v1.1.0/commons/classify/json/valid/900-classify.receipt.valid.json b/examples/v1.1.0/commons/classify/json/valid/900-classify.receipt.valid.json deleted file mode 100644 index bc0e4d5..0000000 --- a/examples/v1.1.0/commons/classify/json/valid/900-classify.receipt.valid.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verb": "classify", - "version": "1.1.0", - "status": "ok", - "timestamp": "2026-03-18T12:00:00Z", - "agent": "classifyagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeiclassifyreceiptokexample0001", - "summary": "billing_issue", - "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" -} diff --git a/examples/v1.1.0/commons/classify/json/valid/900-ok.receipt.valid.json b/examples/v1.1.0/commons/classify/json/valid/900-ok.receipt.valid.json new file mode 100644 index 0000000..ee097b1 --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/valid/900-ok.receipt.valid.json @@ -0,0 +1,12 @@ +{ + "verb": "classify", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:10:00Z", + "agent": "classifyagent.eth", + "request_hash": "sha256:3d5224e3ebc7f6ab9e9a6a2114a5f7d01c6847c8df0e3fd53c0e5d117f6ab9dd", + "result_hash": "sha256:8cb8de3bdca7cb09517e3a5a6aa3d34f429fba381a325f1ca2f94fdb7d59e831", + "result_cid": "bafybeibn6t7v5x3zk4m2w1q9p8r7s6u5t4v3w2x1y9z8a7b6c5d4e3f2ga", + "summary": "billing_issue", + "signature": "MEYCIQDf3h7kL9mN2pQ4rS6tU8vW0xY2zA4bC6dE8fG0hJ1kLwIhAO5pQ7rS9tU1vW3xY5zB7cD9eF1gH3iJ5kL7mN9pQ1" +} diff --git a/examples/v1.1.0/commons/classify/json/valid/901-error.receipt.valid.json b/examples/v1.1.0/commons/classify/json/valid/901-error.receipt.valid.json new file mode 100644 index 0000000..a886533 --- /dev/null +++ b/examples/v1.1.0/commons/classify/json/valid/901-error.receipt.valid.json @@ -0,0 +1,10 @@ +{ + "verb": "classify", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:10:21Z", + "agent": "classifyagent.eth", + "request_hash": "sha256:94c6c8e7224c96a1ad9438c5ce9f8a775ad9de5ec28d19e5f02b6f58f2ce87db", + "signature": "MEQCIC4dF6gH8iJ0kL2mN4pQ6rS8tU0vW2xY4zB6dD8fF0nAiB3cE5gH7iJ9kL1mN3pQ5rS7tU9vW1xY3zA5bC7dE9fG1", + "error": "The label taxonomy was unavailable, so no deterministic class assignment could be made." +} diff --git a/examples/v1.1.0/commons/clean/json/invalid/001-clean.request.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/001-clean.request.invalid.json deleted file mode 100644 index 3953a83..0000000 --- a/examples/v1.1.0/commons/clean/json/invalid/001-clean.request.invalid.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "verb": "summarize", - "version": "1.1.0", - "input": { - "text": "This should be a string." - }, - "mode": "compress" -} diff --git a/examples/v1.1.0/commons/clean/json/invalid/001-missing-verb.request.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/001-missing-verb.request.invalid.json new file mode 100644 index 0000000..6c75b26 --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/invalid/001-missing-verb.request.invalid.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "input": "Clean this payload.", + "mode": "normalize" +} diff --git a/examples/v1.1.0/commons/clean/json/valid/001-clean.request.valid.json b/examples/v1.1.0/commons/clean/json/invalid/002-missing-input.request.invalid.json similarity index 57% rename from examples/v1.1.0/commons/clean/json/valid/001-clean.request.valid.json rename to examples/v1.1.0/commons/clean/json/invalid/002-missing-input.request.invalid.json index 7b0637e..2badfad 100644 --- a/examples/v1.1.0/commons/clean/json/valid/001-clean.request.valid.json +++ b/examples/v1.1.0/commons/clean/json/invalid/002-missing-input.request.invalid.json @@ -1,6 +1,5 @@ { "verb": "clean", "version": "1.1.0", - "input": " CommandLayer\tCommons v1.1.0\n", "mode": "normalize" } diff --git a/examples/v1.1.0/commons/clean/json/invalid/003-empty-input.request.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/003-empty-input.request.invalid.json new file mode 100644 index 0000000..b0ca64f --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/invalid/003-empty-input.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "clean", + "version": "1.1.0", + "input": "", + "mode": "normalize" +} diff --git a/examples/v1.1.0/commons/clean/json/invalid/004-invalid-version.request.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/004-invalid-version.request.invalid.json new file mode 100644 index 0000000..21c4ca4 --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/invalid/004-invalid-version.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "clean", + "version": "latest", + "input": "Clean this payload.", + "mode": "normalize" +} diff --git a/examples/v1.1.0/commons/clean/json/invalid/005-extra-property.request.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/005-extra-property.request.invalid.json new file mode 100644 index 0000000..977c73d --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/invalid/005-extra-property.request.invalid.json @@ -0,0 +1,7 @@ +{ + "verb": "clean", + "version": "1.1.0", + "input": "Clean this payload.", + "mode": "normalize", + "preserve_newlines": true +} diff --git a/examples/v1.1.0/commons/clean/json/invalid/006-invalid-mode.request.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/006-invalid-mode.request.invalid.json new file mode 100644 index 0000000..1cbfedb --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/invalid/006-invalid-mode.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "clean", + "version": "1.1.0", + "input": "Clean this payload.", + "mode": "compress" +} diff --git a/examples/v1.1.0/commons/clean/json/invalid/007-wrong-input-type.request.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/007-wrong-input-type.request.invalid.json new file mode 100644 index 0000000..b60623b --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/invalid/007-wrong-input-type.request.invalid.json @@ -0,0 +1,8 @@ +{ + "verb": "clean", + "version": "1.1.0", + "input": { + "content": "messy" + }, + "mode": "normalize" +} diff --git a/examples/v1.1.0/commons/clean/json/invalid/008-wrong-verb-literal.request.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/008-wrong-verb-literal.request.invalid.json new file mode 100644 index 0000000..af3fc4e --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/invalid/008-wrong-verb-literal.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "format", + "version": "1.1.0", + "input": "Clean this payload.", + "mode": "normalize" +} diff --git a/examples/v1.1.0/commons/clean/json/invalid/900-clean.receipt.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/900-clean.receipt.invalid.json deleted file mode 100644 index c21ea3d..0000000 --- a/examples/v1.1.0/commons/clean/json/invalid/900-clean.receipt.invalid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verb": "clean", - "version": "1.1.0", - "status": "ok", - "timestamp": "not-a-date", - "request_hash": "sha256:xyz", - "signature": "short", - "error": "ok receipts should not rely on error only" -} diff --git a/examples/v1.1.0/commons/clean/json/invalid/900-invalid-timestamp.receipt.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/900-invalid-timestamp.receipt.invalid.json new file mode 100644 index 0000000..eb13e82 --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/invalid/900-invalid-timestamp.receipt.invalid.json @@ -0,0 +1,10 @@ +{ + "verb": "clean", + "version": "1.1.0", + "status": "ok", + "timestamp": "18-03-2026 12:20:00", + "agent": "cleanagent.eth", + "request_hash": "sha256:37f8c2f8ef1d3819a3d8f4a662637df84256d4d2d95f0f00fd770af409f4233f", + "summary": "Removed script tags, normalized non-breaking spaces, and collapsed repeated whitespace.", + "signature": "MEUCIB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3eE5gH7iJ9kLAiEAqS6uV8wY0zB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3" +} diff --git a/examples/v1.1.0/commons/clean/json/invalid/901-missing-summary-on-ok.receipt.invalid.json b/examples/v1.1.0/commons/clean/json/invalid/901-missing-summary-on-ok.receipt.invalid.json new file mode 100644 index 0000000..2ea1dee --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/invalid/901-missing-summary-on-ok.receipt.invalid.json @@ -0,0 +1,9 @@ +{ + "verb": "clean", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:20:00Z", + "agent": "cleanagent.eth", + "request_hash": "sha256:37f8c2f8ef1d3819a3d8f4a662637df84256d4d2d95f0f00fd770af409f4233f", + "signature": "MEUCIB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3eE5gH7iJ9kLAiEAqS6uV8wY0zB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3" +} diff --git a/examples/v1.1.0/commons/clean/json/valid/001-minimal.request.valid.json b/examples/v1.1.0/commons/clean/json/valid/001-minimal.request.valid.json new file mode 100644 index 0000000..5a6de30 --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/valid/001-minimal.request.valid.json @@ -0,0 +1,5 @@ +{ + "verb": "clean", + "version": "1.1.0", + "input": " CommandLayer\tCommons v1.1.0\n" +} diff --git a/examples/v1.1.0/commons/clean/json/valid/002-sanitize.request.valid.json b/examples/v1.1.0/commons/clean/json/valid/002-sanitize.request.valid.json new file mode 100644 index 0000000..9a11d24 --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/valid/002-sanitize.request.valid.json @@ -0,0 +1,6 @@ +{ + "verb": "clean", + "version": "1.1.0", + "input": " Release notes\u00a0with\u00a0mixed spacing.", + "mode": "sanitize" +} diff --git a/examples/v1.1.0/commons/clean/json/valid/900-clean.receipt.valid.json b/examples/v1.1.0/commons/clean/json/valid/900-clean.receipt.valid.json deleted file mode 100644 index ada973f..0000000 --- a/examples/v1.1.0/commons/clean/json/valid/900-clean.receipt.valid.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verb": "clean", - "version": "1.1.0", - "status": "ok", - "timestamp": "2026-03-18T12:00:00Z", - "agent": "cleanagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeicleanreceiptokexample0001", - "summary": "Normalized whitespace and casing artifacts to yield a canonical single-line string.", - "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" -} diff --git a/examples/v1.1.0/commons/clean/json/valid/900-ok.receipt.valid.json b/examples/v1.1.0/commons/clean/json/valid/900-ok.receipt.valid.json new file mode 100644 index 0000000..2e00699 --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/valid/900-ok.receipt.valid.json @@ -0,0 +1,12 @@ +{ + "verb": "clean", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:20:00Z", + "agent": "cleanagent.eth", + "request_hash": "sha256:37f8c2f8ef1d3819a3d8f4a662637df84256d4d2d95f0f00fd770af409f4233f", + "result_hash": "sha256:e6a6c7329341d6c870c7a46f7509dcf4f1df03de238f5f3c6b0aa43d0b2def7d", + "result_cid": "bafybeif3jzu2wq4m6n8p0r2t4v6x8z0b2d4f6h8j0l2n4p6r8t0v2x4z6a", + "summary": "Removed script tags, normalized non-breaking spaces, and collapsed repeated whitespace.", + "signature": "MEUCIB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3eE5gH7iJ9kLAiEAqS6uV8wY0zB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3" +} diff --git a/examples/v1.1.0/commons/clean/json/valid/901-error.receipt.valid.json b/examples/v1.1.0/commons/clean/json/valid/901-error.receipt.valid.json new file mode 100644 index 0000000..94e53ad --- /dev/null +++ b/examples/v1.1.0/commons/clean/json/valid/901-error.receipt.valid.json @@ -0,0 +1,10 @@ +{ + "verb": "clean", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:20:17Z", + "agent": "cleanagent.eth", + "request_hash": "sha256:517a0fa7d6d7eaa77c6f627e0a090c4b113fb9f2f6e6bd878f7b4eef87f24451", + "signature": "MEYCIQCH9iJ1kL3mN5pQ7rS9tU1vW3xY5zB7cD9eF1gH3iJ5kLIhAOmN8pQ0rS2tU4vW6xY8zA0bC2dE4fG6hJ8kL0mN2", + "error": "The cleaner refused to sanitize binary control characters embedded in the payload." +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/001-missing-verb.request.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/001-missing-verb.request.invalid.json new file mode 100644 index 0000000..5276c05 --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/invalid/001-missing-verb.request.invalid.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "input": "Convert this changelog.", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/002-missing-input.request.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/002-missing-input.request.invalid.json new file mode 100644 index 0000000..842f7d4 --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/invalid/002-missing-input.request.invalid.json @@ -0,0 +1,5 @@ +{ + "verb": "convert", + "version": "1.1.0", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/003-empty-input.request.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/003-empty-input.request.invalid.json new file mode 100644 index 0000000..09e47ce --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/invalid/003-empty-input.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "convert", + "version": "1.1.0", + "input": "", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/004-invalid-version.request.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/004-invalid-version.request.invalid.json new file mode 100644 index 0000000..9d91de6 --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/invalid/004-invalid-version.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "convert", + "version": "1.0.0", + "input": "Convert this changelog.", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/005-extra-property.request.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/005-extra-property.request.invalid.json new file mode 100644 index 0000000..a071132 --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/invalid/005-extra-property.request.invalid.json @@ -0,0 +1,7 @@ +{ + "verb": "convert", + "version": "1.1.0", + "input": "Convert this changelog.", + "mode": "markdown", + "target": "docs" +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/006-invalid-mode.request.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/006-invalid-mode.request.invalid.json new file mode 100644 index 0000000..7e73ced --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/invalid/006-invalid-mode.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "convert", + "version": "1.1.0", + "input": "Convert this changelog.", + "mode": "pdf" +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/007-wrong-input-type.request.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/007-wrong-input-type.request.invalid.json new file mode 100644 index 0000000..c5cceba --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/invalid/007-wrong-input-type.request.invalid.json @@ -0,0 +1,9 @@ +{ + "verb": "convert", + "version": "1.1.0", + "input": [ + "html", + "markdown" + ], + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/008-wrong-verb-literal.request.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/008-wrong-verb-literal.request.invalid.json new file mode 100644 index 0000000..eae0263 --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/invalid/008-wrong-verb-literal.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "parse", + "version": "1.1.0", + "input": "Convert this changelog.", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/900-convert.receipt.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/900-convert.receipt.invalid.json deleted file mode 100644 index ba60db0..0000000 --- a/examples/v1.1.0/commons/convert/json/invalid/900-convert.receipt.invalid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verb": "convert", - "version": "1.1.0", - "status": "ok", - "timestamp": "not-a-date", - "request_hash": "sha256:xyz", - "signature": "short", - "error": "ok receipts should not rely on error only" -} diff --git a/examples/v1.1.0/commons/convert/json/invalid/900-signature-too-short.receipt.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/900-signature-too-short.receipt.invalid.json new file mode 100644 index 0000000..9653c54 --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/invalid/900-signature-too-short.receipt.invalid.json @@ -0,0 +1,10 @@ +{ + "verb": "convert", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:30:00Z", + "agent": "convertagent.eth", + "request_hash": "sha256:fbab825a8f87dfdc5ff7e8770baad69c3ab381654677a1f2df45f1ad0dfbd2af", + "summary": "Converted the HTML release note fragment into markdown headings and paragraph text.", + "signature": "shortsig" +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/901-missing-error-on-error.receipt.invalid.json b/examples/v1.1.0/commons/convert/json/invalid/901-missing-error-on-error.receipt.invalid.json new file mode 100644 index 0000000..130cf95 --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/invalid/901-missing-error-on-error.receipt.invalid.json @@ -0,0 +1,9 @@ +{ + "verb": "convert", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:30:19Z", + "agent": "convertagent.eth", + "request_hash": "sha256:4e06710b5e74f66c4d36601f6e002ef77f420fbf193e8c6f8e50c0c3b5ab1bbf", + "signature": "MEYCIQC8dF0hJ2lN4pR6tV8xZ0bC2dE4fG6hJ8kL0mN2pQ4rSIhAM5nO7pQ9rS1tU3vW5xY7zA9bC1dE3fG5hJ7kL9mN1" +} diff --git a/examples/v1.1.0/commons/convert/json/valid/001-convert.request.valid.json b/examples/v1.1.0/commons/convert/json/valid/001-minimal.request.valid.json similarity index 72% rename from examples/v1.1.0/commons/convert/json/valid/001-convert.request.valid.json rename to examples/v1.1.0/commons/convert/json/valid/001-minimal.request.valid.json index 379bdbf..4ca2420 100644 --- a/examples/v1.1.0/commons/convert/json/valid/001-convert.request.valid.json +++ b/examples/v1.1.0/commons/convert/json/valid/001-minimal.request.valid.json @@ -1,6 +1,5 @@ { "verb": "convert", "version": "1.1.0", - "input": "Title: Commons v1.1.0\nPoint 1: Flat requests\nPoint 2: Signed receipts", - "mode": "markdown" + "input": "Title: Commons v1.1.0\nPoint 1: Flat requests\nPoint 2: Signed receipts" } diff --git a/examples/v1.1.0/commons/convert/json/valid/002-html.request.valid.json b/examples/v1.1.0/commons/convert/json/valid/002-html.request.valid.json new file mode 100644 index 0000000..2c0bee0 --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/valid/002-html.request.valid.json @@ -0,0 +1,6 @@ +{ + "verb": "convert", + "version": "1.1.0", + "input": "

Release Notes

Pin the manifest and publish the checksum set.

", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/convert/json/valid/900-convert.receipt.valid.json b/examples/v1.1.0/commons/convert/json/valid/900-convert.receipt.valid.json deleted file mode 100644 index d543725..0000000 --- a/examples/v1.1.0/commons/convert/json/valid/900-convert.receipt.valid.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verb": "convert", - "version": "1.1.0", - "status": "ok", - "timestamp": "2026-03-18T12:00:00Z", - "agent": "convertagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeiconvertreceiptokexample0001", - "summary": "Converted plain release notes into markdown sections suitable for documentation.", - "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" -} diff --git a/examples/v1.1.0/commons/convert/json/valid/900-ok.receipt.valid.json b/examples/v1.1.0/commons/convert/json/valid/900-ok.receipt.valid.json new file mode 100644 index 0000000..57588cb --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/valid/900-ok.receipt.valid.json @@ -0,0 +1,12 @@ +{ + "verb": "convert", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:30:00Z", + "agent": "convertagent.eth", + "request_hash": "sha256:fbab825a8f87dfdc5ff7e8770baad69c3ab381654677a1f2df45f1ad0dfbd2af", + "result_hash": "sha256:0f6a8f2beefad7c74f890ea6bc59dd34a30de5c280f5ec9a57cbfbf1ff5cd4f0", + "result_cid": "bafybeih4s6u8w0y2a4c6e8g0i2k4m6o8q0s2u4w6y8a0c2e4g6i8k0m2oq", + "summary": "Converted the HTML release note fragment into markdown headings and paragraph text.", + "signature": "MEQCIF7gH9iJ1kL3mN5pQ7rS9tU1vW3xY5zB7cD9eF1gH3iJAiB6jK8lM0nP2rT4vX6zB8dF0hJ2lN4pR6tV8xZ0bC2d" +} diff --git a/examples/v1.1.0/commons/convert/json/valid/901-error.receipt.valid.json b/examples/v1.1.0/commons/convert/json/valid/901-error.receipt.valid.json new file mode 100644 index 0000000..2037275 --- /dev/null +++ b/examples/v1.1.0/commons/convert/json/valid/901-error.receipt.valid.json @@ -0,0 +1,10 @@ +{ + "verb": "convert", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:30:19Z", + "agent": "convertagent.eth", + "request_hash": "sha256:4e06710b5e74f66c4d36601f6e002ef77f420fbf193e8c6f8e50c0c3b5ab1bbf", + "signature": "MEYCIQC8dF0hJ2lN4pR6tV8xZ0bC2dE4fG6hJ8kL0mN2pQ4rSIhAM5nO7pQ9rS1tU3vW5xY7zA9bC1dE3fG5hJ7kL9mN1", + "error": "The converter could not infer a supported source format from the provided binary blob." +} diff --git a/examples/v1.1.0/commons/describe/json/invalid/001-describe.request.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/001-describe.request.invalid.json deleted file mode 100644 index 1825b6e..0000000 --- a/examples/v1.1.0/commons/describe/json/invalid/001-describe.request.invalid.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "verb": "summarize", - "version": "1.1.0", - "input": { - "text": "This should be a string." - }, - "mode": "poetic" -} diff --git a/examples/v1.1.0/commons/describe/json/invalid/001-missing-verb.request.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/001-missing-verb.request.invalid.json new file mode 100644 index 0000000..d515161 --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/invalid/001-missing-verb.request.invalid.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "input": "Describe this component.", + "mode": "plain" +} diff --git a/examples/v1.1.0/commons/describe/json/invalid/002-missing-input.request.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/002-missing-input.request.invalid.json new file mode 100644 index 0000000..c8634f1 --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/invalid/002-missing-input.request.invalid.json @@ -0,0 +1,5 @@ +{ + "verb": "describe", + "version": "1.1.0", + "mode": "plain" +} diff --git a/examples/v1.1.0/commons/describe/json/invalid/003-empty-input.request.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/003-empty-input.request.invalid.json new file mode 100644 index 0000000..6e58401 --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/invalid/003-empty-input.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "describe", + "version": "1.1.0", + "input": "", + "mode": "plain" +} diff --git a/examples/v1.1.0/commons/describe/json/invalid/004-invalid-version.request.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/004-invalid-version.request.invalid.json new file mode 100644 index 0000000..30f34ef --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/invalid/004-invalid-version.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "describe", + "version": "2026-03-18", + "input": "Describe this component.", + "mode": "plain" +} diff --git a/examples/v1.1.0/commons/describe/json/invalid/005-extra-property.request.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/005-extra-property.request.invalid.json new file mode 100644 index 0000000..fbde890 --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/invalid/005-extra-property.request.invalid.json @@ -0,0 +1,7 @@ +{ + "verb": "describe", + "version": "1.1.0", + "input": "Describe this component.", + "mode": "plain", + "audience": "engineers" +} diff --git a/examples/v1.1.0/commons/describe/json/invalid/006-invalid-mode.request.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/006-invalid-mode.request.invalid.json new file mode 100644 index 0000000..75f1781 --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/invalid/006-invalid-mode.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "describe", + "version": "1.1.0", + "input": "Describe this component.", + "mode": "poetic" +} diff --git a/examples/v1.1.0/commons/describe/json/invalid/007-wrong-input-type.request.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/007-wrong-input-type.request.invalid.json new file mode 100644 index 0000000..3c0e951 --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/invalid/007-wrong-input-type.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "describe", + "version": "1.1.0", + "input": 7, + "mode": "plain" +} diff --git a/examples/v1.1.0/commons/describe/json/invalid/008-wrong-verb-literal.request.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/008-wrong-verb-literal.request.invalid.json new file mode 100644 index 0000000..27c070f --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/invalid/008-wrong-verb-literal.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "explain", + "version": "1.1.0", + "input": "Describe this component.", + "mode": "plain" +} diff --git a/examples/v1.1.0/commons/describe/json/invalid/900-describe.receipt.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/900-describe.receipt.invalid.json deleted file mode 100644 index d16bf42..0000000 --- a/examples/v1.1.0/commons/describe/json/invalid/900-describe.receipt.invalid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verb": "describe", - "version": "1.1.0", - "status": "ok", - "timestamp": "not-a-date", - "request_hash": "sha256:xyz", - "signature": "short", - "error": "ok receipts should not rely on error only" -} diff --git a/examples/v1.1.0/commons/describe/json/invalid/900-invalid-status.receipt.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/900-invalid-status.receipt.invalid.json new file mode 100644 index 0000000..f653b33 --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/invalid/900-invalid-status.receipt.invalid.json @@ -0,0 +1,10 @@ +{ + "verb": "describe", + "version": "1.1.0", + "status": "pending", + "timestamp": "2026-03-18T12:40:00Z", + "agent": "describeagent.eth", + "request_hash": "sha256:7cd365e5f6dce2d9cf2c324ec129e6b802f231b48c99f2dc42c9f2d4e4b0f1ae", + "summary": "A compact UI card that exposes receipt outcome, signer identity, and the hashes needed for verification.", + "signature": "MEQCID2eF4gH6iJ8kL0mN2pQ4rS6tU8vW0xY2zA4bC6dE8fGAiAxY3zA5bC7dE9fG1hJ3kL5mN7pQ9rS1tU3vW5xY7zA9" +} diff --git a/examples/v1.1.0/commons/describe/json/invalid/901-extra-property.receipt.invalid.json b/examples/v1.1.0/commons/describe/json/invalid/901-extra-property.receipt.invalid.json new file mode 100644 index 0000000..6355061 --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/invalid/901-extra-property.receipt.invalid.json @@ -0,0 +1,13 @@ +{ + "verb": "describe", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:40:16Z", + "agent": "describeagent.eth", + "request_hash": "sha256:4545ee72a3da3d2cd61bd90d0b79d44f932172bf7012c5f86f3ea30ffdf34026", + "signature": "MEYCIQD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3eE5gH7iJ9kL1mNAIhAN6pQ8rS0tU2vW4xY6zB8dD0fF2hH4jJ6lL8nP0rT2", + "error": "The input referenced an image asset that was not retrievable at description time.", + "notes": [ + "debug" + ] +} diff --git a/examples/v1.1.0/commons/describe/json/valid/001-describe.request.valid.json b/examples/v1.1.0/commons/describe/json/valid/001-minimal.request.valid.json similarity index 68% rename from examples/v1.1.0/commons/describe/json/valid/001-describe.request.valid.json rename to examples/v1.1.0/commons/describe/json/valid/001-minimal.request.valid.json index af20734..cfae484 100644 --- a/examples/v1.1.0/commons/describe/json/valid/001-describe.request.valid.json +++ b/examples/v1.1.0/commons/describe/json/valid/001-minimal.request.valid.json @@ -1,6 +1,5 @@ { "verb": "describe", "version": "1.1.0", - "input": "A dashboard card showing receipt status, signer ENS, request hash, and result hash.", - "mode": "plain" + "input": "A dashboard card showing receipt status, signer ENS, request hash, and result hash." } diff --git a/examples/v1.1.0/commons/describe/json/valid/002-technical.request.valid.json b/examples/v1.1.0/commons/describe/json/valid/002-technical.request.valid.json new file mode 100644 index 0000000..a0a00a8 --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/valid/002-technical.request.valid.json @@ -0,0 +1,6 @@ +{ + "verb": "describe", + "version": "1.1.0", + "input": "A validator pipeline that loads schemas, compiles them under Ajv strict mode, and checks example fixtures for expected pass/fail behavior.", + "mode": "technical" +} diff --git a/examples/v1.1.0/commons/describe/json/valid/900-describe.receipt.valid.json b/examples/v1.1.0/commons/describe/json/valid/900-describe.receipt.valid.json deleted file mode 100644 index fee5014..0000000 --- a/examples/v1.1.0/commons/describe/json/valid/900-describe.receipt.valid.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verb": "describe", - "version": "1.1.0", - "status": "ok", - "timestamp": "2026-03-18T12:00:00Z", - "agent": "describeagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeidescribereceiptokexample0001", - "summary": "A compact interface card displaying whether a receipt succeeded and which agent signed it.", - "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" -} diff --git a/examples/v1.1.0/commons/describe/json/valid/900-ok.receipt.valid.json b/examples/v1.1.0/commons/describe/json/valid/900-ok.receipt.valid.json new file mode 100644 index 0000000..9390eba --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/valid/900-ok.receipt.valid.json @@ -0,0 +1,12 @@ +{ + "verb": "describe", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:40:00Z", + "agent": "describeagent.eth", + "request_hash": "sha256:7cd365e5f6dce2d9cf2c324ec129e6b802f231b48c99f2dc42c9f2d4e4b0f1ae", + "result_hash": "sha256:57c72a7b2c048763ced04c1ed53fbd742e98f0d4f7a530cb1fbf0b7dedf43e57", + "result_cid": "bafybeie4g6i8k0m2o4q6s8u0w2y4a6c8e0g2i4k6m8o0q2s4u6w8y0a2ce", + "summary": "A compact UI card that exposes receipt outcome, signer identity, and the hashes needed for verification.", + "signature": "MEQCID2eF4gH6iJ8kL0mN2pQ4rS6tU8vW0xY2zA4bC6dE8fGAiAxY3zA5bC7dE9fG1hJ3kL5mN7pQ9rS1tU3vW5xY7zA9" +} diff --git a/examples/v1.1.0/commons/describe/json/valid/901-error.receipt.valid.json b/examples/v1.1.0/commons/describe/json/valid/901-error.receipt.valid.json new file mode 100644 index 0000000..bcebc02 --- /dev/null +++ b/examples/v1.1.0/commons/describe/json/valid/901-error.receipt.valid.json @@ -0,0 +1,10 @@ +{ + "verb": "describe", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:40:16Z", + "agent": "describeagent.eth", + "request_hash": "sha256:4545ee72a3da3d2cd61bd90d0b79d44f932172bf7012c5f86f3ea30ffdf34026", + "signature": "MEYCIQD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3eE5gH7iJ9kL1mNAIhAN6pQ8rS0tU2vW4xY6zB8dD0fF2hH4jJ6lL8nP0rT2", + "error": "The input referenced an image asset that was not retrievable at description time." +} diff --git a/examples/v1.1.0/commons/explain/json/invalid/001-explain.request.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/001-explain.request.invalid.json deleted file mode 100644 index 9444c4a..0000000 --- a/examples/v1.1.0/commons/explain/json/invalid/001-explain.request.invalid.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "verb": "summarize", - "version": "1.1.0", - "input": { - "text": "This should be a string." - }, - "mode": "legalese" -} diff --git a/examples/v1.1.0/commons/explain/json/invalid/001-missing-verb.request.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/001-missing-verb.request.invalid.json new file mode 100644 index 0000000..c2d95f4 --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/invalid/001-missing-verb.request.invalid.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "input": "Explain this verifier flow.", + "mode": "technical" +} diff --git a/examples/v1.1.0/commons/explain/json/invalid/002-missing-input.request.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/002-missing-input.request.invalid.json new file mode 100644 index 0000000..f2d459a --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/invalid/002-missing-input.request.invalid.json @@ -0,0 +1,5 @@ +{ + "verb": "explain", + "version": "1.1.0", + "mode": "technical" +} diff --git a/examples/v1.1.0/commons/explain/json/invalid/003-empty-input.request.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/003-empty-input.request.invalid.json new file mode 100644 index 0000000..69ac099 --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/invalid/003-empty-input.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "explain", + "version": "1.1.0", + "input": "", + "mode": "technical" +} diff --git a/examples/v1.1.0/commons/explain/json/invalid/004-invalid-version.request.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/004-invalid-version.request.invalid.json new file mode 100644 index 0000000..d1e0c48 --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/invalid/004-invalid-version.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "explain", + "version": "v1.1.0", + "input": "Explain this verifier flow.", + "mode": "technical" +} diff --git a/examples/v1.1.0/commons/explain/json/invalid/005-extra-property.request.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/005-extra-property.request.invalid.json new file mode 100644 index 0000000..6ca4a04 --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/invalid/005-extra-property.request.invalid.json @@ -0,0 +1,7 @@ +{ + "verb": "explain", + "version": "1.1.0", + "input": "Explain this verifier flow.", + "mode": "technical", + "depth": 3 +} diff --git a/examples/v1.1.0/commons/explain/json/invalid/006-invalid-mode.request.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/006-invalid-mode.request.invalid.json new file mode 100644 index 0000000..34a549e --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/invalid/006-invalid-mode.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "explain", + "version": "1.1.0", + "input": "Explain this verifier flow.", + "mode": "legalese" +} diff --git a/examples/v1.1.0/commons/explain/json/invalid/007-wrong-input-type.request.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/007-wrong-input-type.request.invalid.json new file mode 100644 index 0000000..e341975 --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/invalid/007-wrong-input-type.request.invalid.json @@ -0,0 +1,8 @@ +{ + "verb": "explain", + "version": "1.1.0", + "input": { + "topic": "verifier flow" + }, + "mode": "technical" +} diff --git a/examples/v1.1.0/commons/explain/json/invalid/008-wrong-verb-literal.request.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/008-wrong-verb-literal.request.invalid.json new file mode 100644 index 0000000..fc27495 --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/invalid/008-wrong-verb-literal.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "describe", + "version": "1.1.0", + "input": "Explain this verifier flow.", + "mode": "technical" +} diff --git a/examples/v1.1.0/commons/explain/json/invalid/900-explain.receipt.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/900-explain.receipt.invalid.json deleted file mode 100644 index 193c040..0000000 --- a/examples/v1.1.0/commons/explain/json/invalid/900-explain.receipt.invalid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verb": "explain", - "version": "1.1.0", - "status": "ok", - "timestamp": "not-a-date", - "request_hash": "sha256:xyz", - "signature": "short", - "error": "ok receipts should not rely on error only" -} diff --git a/examples/v1.1.0/commons/explain/json/invalid/900-summary-wrong-type.receipt.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/900-summary-wrong-type.receipt.invalid.json new file mode 100644 index 0000000..0183ffe --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/invalid/900-summary-wrong-type.receipt.invalid.json @@ -0,0 +1,10 @@ +{ + "verb": "explain", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:50:00Z", + "agent": "explainagent.eth", + "request_hash": "sha256:ee53297ba8a485df4588504338133861776dba7c27f86d9f3f3e4968a397dfc0", + "summary": false, + "signature": "MEUCIG8iJ0kL2mN4pQ6rS8tU0vW2xY4zB6dD8fF0hJ2lN4pAiEAqR7tU9vW1xY3zA5bC7dE9fG1hJ3kL5mN7pQ9rS1tU3" +} diff --git a/examples/v1.1.0/commons/explain/json/invalid/901-invalid-request-hash.receipt.invalid.json b/examples/v1.1.0/commons/explain/json/invalid/901-invalid-request-hash.receipt.invalid.json new file mode 100644 index 0000000..d10c7be --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/invalid/901-invalid-request-hash.receipt.invalid.json @@ -0,0 +1,10 @@ +{ + "verb": "explain", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:50:23Z", + "agent": "explainagent.eth", + "request_hash": "sha256:XYZ", + "signature": "MEQCIC0lL2nP4rT6vX8zA1cC3eE5gH7iJ9kL1mN3pQ5rS7tUAiBQ6vW8xY0zB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3e", + "error": "The subject text referenced an unsupported external proof format, so no grounded explanation was produced." +} diff --git a/examples/v1.1.0/commons/explain/json/valid/001-explain.request.valid.json b/examples/v1.1.0/commons/explain/json/valid/001-minimal.request.valid.json similarity index 57% rename from examples/v1.1.0/commons/explain/json/valid/001-explain.request.valid.json rename to examples/v1.1.0/commons/explain/json/valid/001-minimal.request.valid.json index ca93c08..dd7e975 100644 --- a/examples/v1.1.0/commons/explain/json/valid/001-explain.request.valid.json +++ b/examples/v1.1.0/commons/explain/json/valid/001-minimal.request.valid.json @@ -1,6 +1,5 @@ { "verb": "explain", "version": "1.1.0", - "input": "Explain how a verifier should confirm that a receipt belongs to a request using request_hash and signature.", - "mode": "step-by-step" + "input": "Explain how a verifier should confirm that a receipt belongs to a request using request_hash and signature." } diff --git a/examples/v1.1.0/commons/explain/json/valid/002-step-by-step.request.valid.json b/examples/v1.1.0/commons/explain/json/valid/002-step-by-step.request.valid.json new file mode 100644 index 0000000..365be06 --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/valid/002-step-by-step.request.valid.json @@ -0,0 +1,6 @@ +{ + "verb": "explain", + "version": "1.1.0", + "input": "Walk through how a client should validate a receipt before paying for the result payload.", + "mode": "step-by-step" +} diff --git a/examples/v1.1.0/commons/explain/json/valid/900-explain.receipt.valid.json b/examples/v1.1.0/commons/explain/json/valid/900-explain.receipt.valid.json deleted file mode 100644 index 7949597..0000000 --- a/examples/v1.1.0/commons/explain/json/valid/900-explain.receipt.valid.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verb": "explain", - "version": "1.1.0", - "status": "ok", - "timestamp": "2026-03-18T12:00:00Z", - "agent": "explainagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeiexplainreceiptokexample0001", - "summary": "Hash the original request, compare it to request_hash, then verify the detached signature under the agent identity before trusting the summary.", - "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" -} diff --git a/examples/v1.1.0/commons/explain/json/valid/900-ok.receipt.valid.json b/examples/v1.1.0/commons/explain/json/valid/900-ok.receipt.valid.json new file mode 100644 index 0000000..1c9011e --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/valid/900-ok.receipt.valid.json @@ -0,0 +1,12 @@ +{ + "verb": "explain", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T12:50:00Z", + "agent": "explainagent.eth", + "request_hash": "sha256:ee53297ba8a485df4588504338133861776dba7c27f86d9f3f3e4968a397dfc0", + "result_hash": "sha256:56786ba2fd99b58d429cb24dc5f6a110d622ec279fd3c6c510d9e35e7fd6c7a4", + "result_cid": "bafybeif0h2j4l6n8p0r2t4v6x8z0b2d4f6h8j0l2n4p6r8t0v2x4z6b8da", + "summary": "Compute the request hash, compare it byte-for-byte, then verify the detached signature under the agent identity before trusting any summary.", + "signature": "MEUCIG8iJ0kL2mN4pQ6rS8tU0vW2xY4zB6dD8fF0hJ2lN4pAiEAqR7tU9vW1xY3zA5bC7dE9fG1hJ3kL5mN7pQ9rS1tU3" +} diff --git a/examples/v1.1.0/commons/explain/json/valid/901-error.receipt.valid.json b/examples/v1.1.0/commons/explain/json/valid/901-error.receipt.valid.json new file mode 100644 index 0000000..b62a0bc --- /dev/null +++ b/examples/v1.1.0/commons/explain/json/valid/901-error.receipt.valid.json @@ -0,0 +1,10 @@ +{ + "verb": "explain", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T12:50:23Z", + "agent": "explainagent.eth", + "request_hash": "sha256:3c8db89b5a2c8ee3f3d44d030087d9f993b652ec688b36b6cb4ef2932f8e2303", + "signature": "MEQCIC0lL2nP4rT6vX8zA1cC3eE5gH7iJ9kL1mN3pQ5rS7tUAiBQ6vW8xY0zB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3e", + "error": "The subject text referenced an unsupported external proof format, so no grounded explanation was produced." +} diff --git a/examples/v1.1.0/commons/fetch/json/valid/001-fetch.request.valid.json b/examples/v1.1.0/commons/fetch/json/invalid/001-missing-verb.request.invalid.json similarity index 83% rename from examples/v1.1.0/commons/fetch/json/valid/001-fetch.request.valid.json rename to examples/v1.1.0/commons/fetch/json/invalid/001-missing-verb.request.invalid.json index 168c47a..b2babbc 100644 --- a/examples/v1.1.0/commons/fetch/json/valid/001-fetch.request.valid.json +++ b/examples/v1.1.0/commons/fetch/json/invalid/001-missing-verb.request.invalid.json @@ -1,5 +1,4 @@ { - "verb": "fetch", "version": "1.1.0", "input": "https://api.commandlayer.org/v1/status", "mode": "json" diff --git a/examples/v1.1.0/commons/fetch/json/invalid/002-missing-input.request.invalid.json b/examples/v1.1.0/commons/fetch/json/invalid/002-missing-input.request.invalid.json new file mode 100644 index 0000000..496105f --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/invalid/002-missing-input.request.invalid.json @@ -0,0 +1,5 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/fetch/json/invalid/003-empty-input.request.invalid.json b/examples/v1.1.0/commons/fetch/json/invalid/003-empty-input.request.invalid.json new file mode 100644 index 0000000..f1422e1 --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/invalid/003-empty-input.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "input": "", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/fetch/json/invalid/004-invalid-version.request.invalid.json b/examples/v1.1.0/commons/fetch/json/invalid/004-invalid-version.request.invalid.json new file mode 100644 index 0000000..7c7186c --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/invalid/004-invalid-version.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "fetch", + "version": "1.2.0", + "input": "https://api.commandlayer.org/v1/status", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/fetch/json/invalid/005-extra-property.request.invalid.json b/examples/v1.1.0/commons/fetch/json/invalid/005-extra-property.request.invalid.json new file mode 100644 index 0000000..8327afd --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/invalid/005-extra-property.request.invalid.json @@ -0,0 +1,9 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "input": "https://api.commandlayer.org/v1/status", + "mode": "json", + "headers": { + "accept": "application/json" + } +} diff --git a/examples/v1.1.0/commons/fetch/json/invalid/006-invalid-mode.request.invalid.json b/examples/v1.1.0/commons/fetch/json/invalid/006-invalid-mode.request.invalid.json new file mode 100644 index 0000000..4b2673f --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/invalid/006-invalid-mode.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "input": "https://api.commandlayer.org/v1/status", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/fetch/json/invalid/007-wrong-input-type.request.invalid.json b/examples/v1.1.0/commons/fetch/json/invalid/007-wrong-input-type.request.invalid.json new file mode 100644 index 0000000..9c05c82 --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/invalid/007-wrong-input-type.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "input": 404, + "mode": "json" +} diff --git a/examples/v1.1.0/commons/fetch/json/invalid/008-wrong-verb-literal.request.invalid.json b/examples/v1.1.0/commons/fetch/json/invalid/008-wrong-verb-literal.request.invalid.json new file mode 100644 index 0000000..ce71a04 --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/invalid/008-wrong-verb-literal.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "convert", + "version": "1.1.0", + "input": "https://api.commandlayer.org/v1/status", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/fetch/json/invalid/900-fetch.receipt.invalid.json b/examples/v1.1.0/commons/fetch/json/invalid/900-fetch.receipt.invalid.json deleted file mode 100644 index 8904579..0000000 --- a/examples/v1.1.0/commons/fetch/json/invalid/900-fetch.receipt.invalid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verb": "fetch", - "version": "1.1.0", - "status": "ok", - "timestamp": "not-a-date", - "request_hash": "sha256:xyz", - "signature": "short", - "error": "ok receipts should not rely on error only" -} diff --git a/examples/v1.1.0/commons/fetch/json/invalid/900-invalid-result-hash.receipt.invalid.json b/examples/v1.1.0/commons/fetch/json/invalid/900-invalid-result-hash.receipt.invalid.json new file mode 100644 index 0000000..dd51654 --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/invalid/900-invalid-result-hash.receipt.invalid.json @@ -0,0 +1,11 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T13:00:00Z", + "agent": "fetchagent.eth", + "request_hash": "sha256:549ae105b20f8ba134fe5f4f3f5f849cfb154ea0ff742f32c611f2fab24f9f66", + "result_hash": "sha256:1234", + "summary": "Fetched a JSON status document describing service health, schema tag, and signer availability.", + "signature": "MEUCID9jK1lM3nO5pQ7rS9tU1vW3xY5zB7cD9eF1gH3iJ5kLAiEAoQ2rS4tU6vW8xY0zB2dD4fF6hH8jJ0lL2nP4rT6vX8" +} diff --git a/examples/v1.1.0/commons/fetch/json/invalid/901-missing-error-on-error.receipt.invalid.json b/examples/v1.1.0/commons/fetch/json/invalid/901-missing-error-on-error.receipt.invalid.json new file mode 100644 index 0000000..2545fad --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/invalid/901-missing-error-on-error.receipt.invalid.json @@ -0,0 +1,9 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T13:00:41Z", + "agent": "fetchagent.eth", + "request_hash": "sha256:4d8104b70df7b3efc585715f9a0beeaaf6559bd63fbbf2a345993ef8fcb734ec", + "signature": "MEQCIC5mN7pQ9rS1tU3vW5xY7zA9bC1dE3fG5hJ7kL9mN1pQAiA4rT6vX8zA1cC3eE5gH7iJ9kL1mN3pQ5rS7tU9vW1xY3" +} diff --git a/examples/v1.1.0/commons/fetch/json/valid/001-minimal.request.valid.json b/examples/v1.1.0/commons/fetch/json/valid/001-minimal.request.valid.json new file mode 100644 index 0000000..10001df --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/valid/001-minimal.request.valid.json @@ -0,0 +1,5 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "input": "https://api.commandlayer.org/v1/status" +} diff --git a/examples/v1.1.0/commons/fetch/json/valid/002-json.request.valid.json b/examples/v1.1.0/commons/fetch/json/valid/002-json.request.valid.json new file mode 100644 index 0000000..5510446 --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/valid/002-json.request.valid.json @@ -0,0 +1,6 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "input": "https://example.net/receipts/latest?network=base", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/fetch/json/valid/900-fetch.receipt.valid.json b/examples/v1.1.0/commons/fetch/json/valid/900-fetch.receipt.valid.json deleted file mode 100644 index c8d2e68..0000000 --- a/examples/v1.1.0/commons/fetch/json/valid/900-fetch.receipt.valid.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verb": "fetch", - "version": "1.1.0", - "status": "ok", - "timestamp": "2026-03-18T12:00:00Z", - "agent": "fetchagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeifetchreceiptokexample0001", - "summary": "Fetched a JSON status document describing service health, schema tag, and signer availability.", - "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" -} diff --git a/examples/v1.1.0/commons/fetch/json/valid/900-ok.receipt.valid.json b/examples/v1.1.0/commons/fetch/json/valid/900-ok.receipt.valid.json new file mode 100644 index 0000000..fd65c54 --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/valid/900-ok.receipt.valid.json @@ -0,0 +1,12 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T13:00:00Z", + "agent": "fetchagent.eth", + "request_hash": "sha256:549ae105b20f8ba134fe5f4f3f5f849cfb154ea0ff742f32c611f2fab24f9f66", + "result_hash": "sha256:8cdb52e345b9a13361a5b8d3f9f95d1db0f7efd974f0aeb6d40f65a1c4d5de6d", + "result_cid": "bafybeih7k9m1o3q5s7u9w1y3a5c7e9g1i3k5m7o9q1s3u5w7y9a1c3e5gq", + "summary": "Fetched a JSON status document describing service health, schema tag, and signer availability.", + "signature": "MEUCID9jK1lM3nO5pQ7rS9tU1vW3xY5zB7cD9eF1gH3iJ5kLAiEAoQ2rS4tU6vW8xY0zB2dD4fF6hH8jJ0lL2nP4rT6vX8" +} diff --git a/examples/v1.1.0/commons/fetch/json/valid/901-error.receipt.valid.json b/examples/v1.1.0/commons/fetch/json/valid/901-error.receipt.valid.json new file mode 100644 index 0000000..0ef84ef --- /dev/null +++ b/examples/v1.1.0/commons/fetch/json/valid/901-error.receipt.valid.json @@ -0,0 +1,10 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T13:00:41Z", + "agent": "fetchagent.eth", + "request_hash": "sha256:4d8104b70df7b3efc585715f9a0beeaaf6559bd63fbbf2a345993ef8fcb734ec", + "signature": "MEQCIC5mN7pQ9rS1tU3vW5xY7zA9bC1dE3fG5hJ7kL9mN1pQAiA4rT6vX8zA1cC3eE5gH7iJ9kL1mN3pQ5rS7tU9vW1xY3", + "error": "The remote endpoint returned HTTP 503 before the requested resource could be attested." +} diff --git a/examples/v1.1.0/commons/format/json/invalid/001-format.request.invalid.json b/examples/v1.1.0/commons/format/json/invalid/001-format.request.invalid.json deleted file mode 100644 index a5655ac..0000000 --- a/examples/v1.1.0/commons/format/json/invalid/001-format.request.invalid.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "verb": "summarize", - "version": "1.1.0", - "input": { - "text": "This should be a string." - }, - "mode": "yaml" -} diff --git a/examples/v1.1.0/commons/format/json/invalid/001-missing-verb.request.invalid.json b/examples/v1.1.0/commons/format/json/invalid/001-missing-verb.request.invalid.json new file mode 100644 index 0000000..149f2ab --- /dev/null +++ b/examples/v1.1.0/commons/format/json/invalid/001-missing-verb.request.invalid.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "input": "Format this checklist.", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/format/json/invalid/002-missing-input.request.invalid.json b/examples/v1.1.0/commons/format/json/invalid/002-missing-input.request.invalid.json new file mode 100644 index 0000000..1d846a9 --- /dev/null +++ b/examples/v1.1.0/commons/format/json/invalid/002-missing-input.request.invalid.json @@ -0,0 +1,5 @@ +{ + "verb": "format", + "version": "1.1.0", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/format/json/invalid/003-empty-input.request.invalid.json b/examples/v1.1.0/commons/format/json/invalid/003-empty-input.request.invalid.json new file mode 100644 index 0000000..e1585a4 --- /dev/null +++ b/examples/v1.1.0/commons/format/json/invalid/003-empty-input.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "format", + "version": "1.1.0", + "input": "", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/format/json/invalid/004-invalid-version.request.invalid.json b/examples/v1.1.0/commons/format/json/invalid/004-invalid-version.request.invalid.json new file mode 100644 index 0000000..8404085 --- /dev/null +++ b/examples/v1.1.0/commons/format/json/invalid/004-invalid-version.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "format", + "version": "1.1.x", + "input": "Format this checklist.", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/format/json/invalid/005-extra-property.request.invalid.json b/examples/v1.1.0/commons/format/json/invalid/005-extra-property.request.invalid.json new file mode 100644 index 0000000..4b2f9ab --- /dev/null +++ b/examples/v1.1.0/commons/format/json/invalid/005-extra-property.request.invalid.json @@ -0,0 +1,7 @@ +{ + "verb": "format", + "version": "1.1.0", + "input": "Format this checklist.", + "mode": "markdown", + "style": "release-notes" +} diff --git a/examples/v1.1.0/commons/format/json/invalid/006-invalid-mode.request.invalid.json b/examples/v1.1.0/commons/format/json/invalid/006-invalid-mode.request.invalid.json new file mode 100644 index 0000000..6d9015a --- /dev/null +++ b/examples/v1.1.0/commons/format/json/invalid/006-invalid-mode.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "format", + "version": "1.1.0", + "input": "Format this checklist.", + "mode": "yaml" +} diff --git a/examples/v1.1.0/commons/fetch/json/invalid/001-fetch.request.invalid.json b/examples/v1.1.0/commons/format/json/invalid/007-wrong-input-type.request.invalid.json similarity index 51% rename from examples/v1.1.0/commons/fetch/json/invalid/001-fetch.request.invalid.json rename to examples/v1.1.0/commons/format/json/invalid/007-wrong-input-type.request.invalid.json index b73dc92..7223440 100644 --- a/examples/v1.1.0/commons/fetch/json/invalid/001-fetch.request.invalid.json +++ b/examples/v1.1.0/commons/format/json/invalid/007-wrong-input-type.request.invalid.json @@ -1,8 +1,8 @@ { - "verb": "summarize", + "verb": "format", "version": "1.1.0", "input": { - "text": "This should be a string." + "content": "checklist" }, "mode": "markdown" } diff --git a/examples/v1.1.0/commons/format/json/invalid/008-wrong-verb-literal.request.invalid.json b/examples/v1.1.0/commons/format/json/invalid/008-wrong-verb-literal.request.invalid.json new file mode 100644 index 0000000..c7d1174 --- /dev/null +++ b/examples/v1.1.0/commons/format/json/invalid/008-wrong-verb-literal.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "clean", + "version": "1.1.0", + "input": "Format this checklist.", + "mode": "markdown" +} diff --git a/examples/v1.1.0/commons/format/json/invalid/900-extra-property.receipt.invalid.json b/examples/v1.1.0/commons/format/json/invalid/900-extra-property.receipt.invalid.json new file mode 100644 index 0000000..540862d --- /dev/null +++ b/examples/v1.1.0/commons/format/json/invalid/900-extra-property.receipt.invalid.json @@ -0,0 +1,11 @@ +{ + "verb": "format", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T13:10:00Z", + "agent": "formatagent.eth", + "request_hash": "sha256:9d1a96f18f53ac6105cf88c607bd0f8bfc33b11c0bb66f6f35a47ce0f80f358b", + "summary": "Reformatted the launch checklist into stable markdown bullets without changing the underlying meaning.", + "signature": "MEYCIQD5gH7iJ9kL1mN3pQ5rS7tU9vW1xY3zA5bC7dE9fG1hJAIhAN4jK6lM8nO0pQ2rS4tU6vW8xY0zB2dD4fF6hH8jJ0", + "applied_style": "markdown" +} diff --git a/examples/v1.1.0/commons/format/json/invalid/900-format.receipt.invalid.json b/examples/v1.1.0/commons/format/json/invalid/900-format.receipt.invalid.json deleted file mode 100644 index ac27dde..0000000 --- a/examples/v1.1.0/commons/format/json/invalid/900-format.receipt.invalid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verb": "format", - "version": "1.1.0", - "status": "ok", - "timestamp": "not-a-date", - "request_hash": "sha256:xyz", - "signature": "short", - "error": "ok receipts should not rely on error only" -} diff --git a/examples/v1.1.0/commons/format/json/invalid/901-missing-summary-on-ok.receipt.invalid.json b/examples/v1.1.0/commons/format/json/invalid/901-missing-summary-on-ok.receipt.invalid.json new file mode 100644 index 0000000..5b24e75 --- /dev/null +++ b/examples/v1.1.0/commons/format/json/invalid/901-missing-summary-on-ok.receipt.invalid.json @@ -0,0 +1,9 @@ +{ + "verb": "format", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T13:10:00Z", + "agent": "formatagent.eth", + "request_hash": "sha256:9d1a96f18f53ac6105cf88c607bd0f8bfc33b11c0bb66f6f35a47ce0f80f358b", + "signature": "MEYCIQD5gH7iJ9kL1mN3pQ5rS7tU9vW1xY3zA5bC7dE9fG1hJAIhAN4jK6lM8nO0pQ2rS4tU6vW8xY0zB2dD4fF6hH8jJ0" +} diff --git a/examples/v1.1.0/commons/format/json/valid/001-format.request.valid.json b/examples/v1.1.0/commons/format/json/valid/001-minimal.request.valid.json similarity index 67% rename from examples/v1.1.0/commons/format/json/valid/001-format.request.valid.json rename to examples/v1.1.0/commons/format/json/valid/001-minimal.request.valid.json index 611abd7..079680b 100644 --- a/examples/v1.1.0/commons/format/json/valid/001-format.request.valid.json +++ b/examples/v1.1.0/commons/format/json/valid/001-minimal.request.valid.json @@ -1,6 +1,5 @@ { "verb": "format", "version": "1.1.0", - "input": "Launch checklist: finalize schemas; pin CID; publish manifest; announce examples.", - "mode": "markdown" + "input": "Launch checklist: finalize schemas; pin CID; publish manifest; announce examples." } diff --git a/examples/v1.1.0/commons/format/json/valid/002-json.request.valid.json b/examples/v1.1.0/commons/format/json/valid/002-json.request.valid.json new file mode 100644 index 0000000..4cdcf62 --- /dev/null +++ b/examples/v1.1.0/commons/format/json/valid/002-json.request.valid.json @@ -0,0 +1,6 @@ +{ + "verb": "format", + "version": "1.1.0", + "input": "network=base status=green height=22790111", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/format/json/valid/900-format.receipt.valid.json b/examples/v1.1.0/commons/format/json/valid/900-format.receipt.valid.json deleted file mode 100644 index 9a1a22e..0000000 --- a/examples/v1.1.0/commons/format/json/valid/900-format.receipt.valid.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verb": "format", - "version": "1.1.0", - "status": "ok", - "timestamp": "2026-03-18T12:00:00Z", - "agent": "formatagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeiformatreceiptokexample0001", - "summary": "Formatted the checklist into readable markdown with stable bullet structure.", - "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" -} diff --git a/examples/v1.1.0/commons/format/json/valid/900-ok.receipt.valid.json b/examples/v1.1.0/commons/format/json/valid/900-ok.receipt.valid.json new file mode 100644 index 0000000..a903243 --- /dev/null +++ b/examples/v1.1.0/commons/format/json/valid/900-ok.receipt.valid.json @@ -0,0 +1,12 @@ +{ + "verb": "format", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T13:10:00Z", + "agent": "formatagent.eth", + "request_hash": "sha256:9d1a96f18f53ac6105cf88c607bd0f8bfc33b11c0bb66f6f35a47ce0f80f358b", + "result_hash": "sha256:5c9d53f6fc14ae2d0e30af82ef1a5c0910f76b246b2c0125055bf50d756b55ff", + "result_cid": "bafybeia2c4e6g8i0k2m4o6q8s0u2w4y6a8c0e2g4i6k8m0o2q4s6u8w0yb", + "summary": "Reformatted the launch checklist into stable markdown bullets without changing the underlying meaning.", + "signature": "MEYCIQD5gH7iJ9kL1mN3pQ5rS7tU9vW1xY3zA5bC7dE9fG1hJAIhAN4jK6lM8nO0pQ2rS4tU6vW8xY0zB2dD4fF6hH8jJ0" +} diff --git a/examples/v1.1.0/commons/format/json/valid/901-error.receipt.valid.json b/examples/v1.1.0/commons/format/json/valid/901-error.receipt.valid.json new file mode 100644 index 0000000..028383d --- /dev/null +++ b/examples/v1.1.0/commons/format/json/valid/901-error.receipt.valid.json @@ -0,0 +1,10 @@ +{ + "verb": "format", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T13:10:33Z", + "agent": "formatagent.eth", + "request_hash": "sha256:226d4c0cd4c9ecf106b85bca1b80a0cbbf7b2d84ac90f31472e3a8f14db76e20", + "signature": "MEQCIA7kL9mN1pQ3rS5tU7vW9xY1zA3bC5dE7fG9hJ1kL3mNAiAa0cC2eE4gH6iJ8kL0mN2pQ4rS6tU8vW0xY2zA4bC6", + "error": "The formatter rejected the requested representation because the payload was not plain text." +} diff --git a/examples/v1.1.0/commons/parse/json/invalid/001-missing-verb.request.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/001-missing-verb.request.invalid.json new file mode 100644 index 0000000..d6a70de --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/invalid/001-missing-verb.request.invalid.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "input": "network=base", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/parse/json/invalid/001-parse.request.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/001-parse.request.invalid.json deleted file mode 100644 index 5ad2a3a..0000000 --- a/examples/v1.1.0/commons/parse/json/invalid/001-parse.request.invalid.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "verb": "summarize", - "version": "1.1.0", - "input": { - "text": "This should be a string." - }, - "mode": "xml" -} diff --git a/examples/v1.1.0/commons/parse/json/invalid/002-missing-input.request.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/002-missing-input.request.invalid.json new file mode 100644 index 0000000..ba09a3b --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/invalid/002-missing-input.request.invalid.json @@ -0,0 +1,5 @@ +{ + "verb": "parse", + "version": "1.1.0", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/parse/json/invalid/003-empty-input.request.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/003-empty-input.request.invalid.json new file mode 100644 index 0000000..83c297c --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/invalid/003-empty-input.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "parse", + "version": "1.1.0", + "input": "", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/parse/json/invalid/004-invalid-version.request.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/004-invalid-version.request.invalid.json new file mode 100644 index 0000000..cef30ad --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/invalid/004-invalid-version.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "parse", + "version": "1.1", + "input": "network=base", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/parse/json/invalid/005-extra-property.request.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/005-extra-property.request.invalid.json new file mode 100644 index 0000000..177318c --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/invalid/005-extra-property.request.invalid.json @@ -0,0 +1,7 @@ +{ + "verb": "parse", + "version": "1.1.0", + "input": "network=base", + "mode": "json", + "schema": "status" +} diff --git a/examples/v1.1.0/commons/parse/json/invalid/006-invalid-mode.request.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/006-invalid-mode.request.invalid.json new file mode 100644 index 0000000..c79f7dc --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/invalid/006-invalid-mode.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "parse", + "version": "1.1.0", + "input": "network=base", + "mode": "xml" +} diff --git a/examples/v1.1.0/commons/parse/json/invalid/007-wrong-input-type.request.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/007-wrong-input-type.request.invalid.json new file mode 100644 index 0000000..67883ac --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/invalid/007-wrong-input-type.request.invalid.json @@ -0,0 +1,8 @@ +{ + "verb": "parse", + "version": "1.1.0", + "input": [ + "network=base" + ], + "mode": "json" +} diff --git a/examples/v1.1.0/commons/parse/json/invalid/008-wrong-verb-literal.request.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/008-wrong-verb-literal.request.invalid.json new file mode 100644 index 0000000..e053e1e --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/invalid/008-wrong-verb-literal.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "fetch", + "version": "1.1.0", + "input": "network=base", + "mode": "json" +} diff --git a/examples/v1.1.0/commons/parse/json/invalid/900-invalid-timestamp.receipt.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/900-invalid-timestamp.receipt.invalid.json new file mode 100644 index 0000000..be63cf2 --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/invalid/900-invalid-timestamp.receipt.invalid.json @@ -0,0 +1,10 @@ +{ + "verb": "parse", + "version": "1.1.0", + "status": "ok", + "timestamp": "yesterday", + "agent": "parseagent.eth", + "request_hash": "sha256:e44a9e5776657e5b5f1b1a36b351cf1035d56acda66a1f55f3f5f22af2478d2f", + "summary": "Extracted top-level fields network, status, and height from the JSON payload.", + "signature": "MEUCIB8jJ0lL2nP4rT6vX8zA1cC3eE5gH7iJ9kL1mN3pQ5rAiEAqT4vW6xY8zA0bC2dE4fG6hJ8kL0mN2pQ4rS6tU8vW0" +} diff --git a/examples/v1.1.0/commons/parse/json/invalid/900-parse.receipt.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/900-parse.receipt.invalid.json deleted file mode 100644 index 506d41f..0000000 --- a/examples/v1.1.0/commons/parse/json/invalid/900-parse.receipt.invalid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verb": "parse", - "version": "1.1.0", - "status": "ok", - "timestamp": "not-a-date", - "request_hash": "sha256:xyz", - "signature": "short", - "error": "ok receipts should not rely on error only" -} diff --git a/examples/v1.1.0/commons/parse/json/invalid/901-missing-error-on-error.receipt.invalid.json b/examples/v1.1.0/commons/parse/json/invalid/901-missing-error-on-error.receipt.invalid.json new file mode 100644 index 0000000..ff870ea --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/invalid/901-missing-error-on-error.receipt.invalid.json @@ -0,0 +1,9 @@ +{ + "verb": "parse", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T13:20:28Z", + "agent": "parseagent.eth", + "request_hash": "sha256:f07d77c95438cefe9184437de2272ec36d7fd0b7e57e3d3f630e7ec68b3b2f89", + "signature": "MEQCID1mN3pQ5rS7tU9vW1xY3zA5bC7dE9fG1hJ3kL5mN7pQAiAP0rT2vW4xY6zB8dD0fF2hH4jJ6lL8nP0rT2vW4xY6z" +} diff --git a/examples/v1.1.0/commons/parse/json/valid/001-parse.request.valid.json b/examples/v1.1.0/commons/parse/json/valid/001-minimal.request.valid.json similarity index 77% rename from examples/v1.1.0/commons/parse/json/valid/001-parse.request.valid.json rename to examples/v1.1.0/commons/parse/json/valid/001-minimal.request.valid.json index b53ae61..bd28d3f 100644 --- a/examples/v1.1.0/commons/parse/json/valid/001-parse.request.valid.json +++ b/examples/v1.1.0/commons/parse/json/valid/001-minimal.request.valid.json @@ -1,6 +1,5 @@ { "verb": "parse", "version": "1.1.0", - "input": "{\"network\":\"base\",\"status\":\"green\",\"height\":22790111}", - "mode": "json" + "input": "{\"network\":\"base\",\"status\":\"green\",\"height\":22790111}" } diff --git a/examples/v1.1.0/commons/parse/json/valid/002-key-value.request.valid.json b/examples/v1.1.0/commons/parse/json/valid/002-key-value.request.valid.json new file mode 100644 index 0000000..cb8814d --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/valid/002-key-value.request.valid.json @@ -0,0 +1,6 @@ +{ + "verb": "parse", + "version": "1.1.0", + "input": "network=base\nstatus=green\nheight=22790111", + "mode": "key-value" +} diff --git a/examples/v1.1.0/commons/parse/json/valid/900-ok.receipt.valid.json b/examples/v1.1.0/commons/parse/json/valid/900-ok.receipt.valid.json new file mode 100644 index 0000000..605d7fc --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/valid/900-ok.receipt.valid.json @@ -0,0 +1,12 @@ +{ + "verb": "parse", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T13:20:00Z", + "agent": "parseagent.eth", + "request_hash": "sha256:e44a9e5776657e5b5f1b1a36b351cf1035d56acda66a1f55f3f5f22af2478d2f", + "result_hash": "sha256:da6d12b514db65fed3ae338f14537fadab502f951f8a6b5bff1f8d5e41d30fd7", + "result_cid": "bafybeid4f6h8j0l2n4p6r8t0v2x4z6b8d0f2h4j6l8n0p2r4t6v8x0z2bf", + "summary": "Extracted top-level fields network, status, and height from the JSON payload.", + "signature": "MEUCIB8jJ0lL2nP4rT6vX8zA1cC3eE5gH7iJ9kL1mN3pQ5rAiEAqT4vW6xY8zA0bC2dE4fG6hJ8kL0mN2pQ4rS6tU8vW0" +} diff --git a/examples/v1.1.0/commons/parse/json/valid/900-parse.receipt.valid.json b/examples/v1.1.0/commons/parse/json/valid/900-parse.receipt.valid.json deleted file mode 100644 index 4c82647..0000000 --- a/examples/v1.1.0/commons/parse/json/valid/900-parse.receipt.valid.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verb": "parse", - "version": "1.1.0", - "status": "ok", - "timestamp": "2026-03-18T12:00:00Z", - "agent": "parseagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeiparsereceiptokexample0001", - "summary": "Extracted top-level fields network, status, and height from the JSON payload.", - "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" -} diff --git a/examples/v1.1.0/commons/parse/json/valid/901-error.receipt.valid.json b/examples/v1.1.0/commons/parse/json/valid/901-error.receipt.valid.json new file mode 100644 index 0000000..f6247b8 --- /dev/null +++ b/examples/v1.1.0/commons/parse/json/valid/901-error.receipt.valid.json @@ -0,0 +1,10 @@ +{ + "verb": "parse", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T13:20:28Z", + "agent": "parseagent.eth", + "request_hash": "sha256:f07d77c95438cefe9184437de2272ec36d7fd0b7e57e3d3f630e7ec68b3b2f89", + "signature": "MEQCID1mN3pQ5rS7tU9vW1xY3zA5bC7dE9fG1hJ3kL5mN7pQAiAP0rT2vW4xY6zB8dD0fF2hH4jJ6lL8nP0rT2vW4xY6z", + "error": "The parser detected mixed delimiters and could not build a stable key-value map." +} diff --git a/examples/v1.1.0/commons/summarize/json/invalid/001-missing-verb.request.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/001-missing-verb.request.invalid.json new file mode 100644 index 0000000..9b43b66 --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/invalid/001-missing-verb.request.invalid.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "input": "Summarize this release note.", + "mode": "brief" +} diff --git a/examples/v1.1.0/commons/summarize/json/invalid/002-missing-input.request.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/002-missing-input.request.invalid.json new file mode 100644 index 0000000..ca3bdd9 --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/invalid/002-missing-input.request.invalid.json @@ -0,0 +1,5 @@ +{ + "verb": "summarize", + "version": "1.1.0", + "mode": "brief" +} diff --git a/examples/v1.1.0/commons/summarize/json/invalid/003-empty-input.request.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/003-empty-input.request.invalid.json new file mode 100644 index 0000000..249986f --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/invalid/003-empty-input.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "summarize", + "version": "1.1.0", + "input": "", + "mode": "brief" +} diff --git a/examples/v1.1.0/commons/summarize/json/invalid/004-invalid-version.request.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/004-invalid-version.request.invalid.json new file mode 100644 index 0000000..3017e77 --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/invalid/004-invalid-version.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "summarize", + "version": "1.1.0-rc1", + "input": "Summarize this release note.", + "mode": "brief" +} diff --git a/examples/v1.1.0/commons/summarize/json/invalid/005-extra-property.request.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/005-extra-property.request.invalid.json new file mode 100644 index 0000000..9a9c9fe --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/invalid/005-extra-property.request.invalid.json @@ -0,0 +1,7 @@ +{ + "verb": "summarize", + "version": "1.1.0", + "input": "Summarize this release note.", + "mode": "brief", + "tone": "neutral" +} diff --git a/examples/v1.1.0/commons/summarize/json/invalid/006-invalid-mode.request.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/006-invalid-mode.request.invalid.json new file mode 100644 index 0000000..d32d079 --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/invalid/006-invalid-mode.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "summarize", + "version": "1.1.0", + "input": "Summarize this release note.", + "mode": "tweet" +} diff --git a/examples/v1.1.0/commons/convert/json/invalid/001-convert.request.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/007-wrong-input-type.request.invalid.json similarity index 54% rename from examples/v1.1.0/commons/convert/json/invalid/001-convert.request.invalid.json rename to examples/v1.1.0/commons/summarize/json/invalid/007-wrong-input-type.request.invalid.json index 8711499..0e3a1c1 100644 --- a/examples/v1.1.0/commons/convert/json/invalid/001-convert.request.invalid.json +++ b/examples/v1.1.0/commons/summarize/json/invalid/007-wrong-input-type.request.invalid.json @@ -2,7 +2,7 @@ "verb": "summarize", "version": "1.1.0", "input": { - "text": "This should be a string." + "text": "release note" }, - "mode": "pdf" + "mode": "brief" } diff --git a/examples/v1.1.0/commons/summarize/json/invalid/008-wrong-verb-literal.request.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/008-wrong-verb-literal.request.invalid.json new file mode 100644 index 0000000..6f2f037 --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/invalid/008-wrong-verb-literal.request.invalid.json @@ -0,0 +1,6 @@ +{ + "verb": "analyze", + "version": "1.1.0", + "input": "Summarize this release note.", + "mode": "brief" +} diff --git a/examples/v1.1.0/commons/summarize/json/invalid/900-invalid-request-hash.receipt.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/900-invalid-request-hash.receipt.invalid.json new file mode 100644 index 0000000..5d36c13 --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/invalid/900-invalid-request-hash.receipt.invalid.json @@ -0,0 +1,10 @@ +{ + "verb": "summarize", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T13:30:00Z", + "agent": "summarizeagent.eth", + "request_hash": "sha256:1111", + "summary": "Commons v1.1.0 makes requests smaller and receipts easier to verify while preserving stable verb semantics.", + "signature": "MEUCID4fG6hJ8kL0mN2pQ4rS6tU8vW0xY2zA4bC6dE8fG0hAiEAzB1dD3fF5hH7jJ9lL1nP3rT5vX7zA9cC1eE3gH5iJ7" +} diff --git a/examples/v1.1.0/commons/summarize/json/invalid/900-summarize.receipt.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/900-summarize.receipt.invalid.json deleted file mode 100644 index 5ba8bb9..0000000 --- a/examples/v1.1.0/commons/summarize/json/invalid/900-summarize.receipt.invalid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verb": "summarize", - "version": "1.1.0", - "status": "ok", - "timestamp": "not-a-date", - "request_hash": "sha256:xyz", - "signature": "short", - "error": "ok receipts should not rely on error only" -} diff --git a/examples/v1.1.0/commons/summarize/json/invalid/901-summary-wrong-type.receipt.invalid.json b/examples/v1.1.0/commons/summarize/json/invalid/901-summary-wrong-type.receipt.invalid.json new file mode 100644 index 0000000..5790629 --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/invalid/901-summary-wrong-type.receipt.invalid.json @@ -0,0 +1,12 @@ +{ + "verb": "summarize", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T13:30:00Z", + "agent": "summarizeagent.eth", + "request_hash": "sha256:4b87d90208e62430a5d8f577938fd26d02d646f092d137cee66216c0daac8243", + "summary": { + "text": "bad" + }, + "signature": "MEUCID4fG6hJ8kL0mN2pQ4rS6tU8vW0xY2zA4bC6dE8fG0hAiEAzB1dD3fF5hH7jJ9lL1nP3rT5vX7zA9cC1eE3gH5iJ7" +} diff --git a/examples/v1.1.0/commons/summarize/json/valid/001-summarize.request.valid.json b/examples/v1.1.0/commons/summarize/json/valid/001-minimal.request.valid.json similarity index 79% rename from examples/v1.1.0/commons/summarize/json/valid/001-summarize.request.valid.json rename to examples/v1.1.0/commons/summarize/json/valid/001-minimal.request.valid.json index 60415a2..427c733 100644 --- a/examples/v1.1.0/commons/summarize/json/valid/001-summarize.request.valid.json +++ b/examples/v1.1.0/commons/summarize/json/valid/001-minimal.request.valid.json @@ -1,6 +1,5 @@ { "verb": "summarize", "version": "1.1.0", - "input": "CommandLayer Commons v1.1.0 simplifies every request into a flat verb/version/input shape and narrows receipts to signed execution evidence.", - "mode": "brief" + "input": "CommandLayer Commons v1.1.0 simplifies every request into a flat verb/version/input shape and narrows receipts to signed execution evidence." } diff --git a/examples/v1.1.0/commons/summarize/json/valid/002-bullets.request.valid.json b/examples/v1.1.0/commons/summarize/json/valid/002-bullets.request.valid.json new file mode 100644 index 0000000..27f6a66 --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/valid/002-bullets.request.valid.json @@ -0,0 +1,6 @@ +{ + "verb": "summarize", + "version": "1.1.0", + "input": "Release goals: remove validation ambiguity, expand fixture coverage, and make receipt evidence easier for third-party verifiers to trust.", + "mode": "bullets" +} diff --git a/examples/v1.1.0/commons/summarize/json/valid/900-ok.receipt.valid.json b/examples/v1.1.0/commons/summarize/json/valid/900-ok.receipt.valid.json new file mode 100644 index 0000000..f72da98 --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/valid/900-ok.receipt.valid.json @@ -0,0 +1,12 @@ +{ + "verb": "summarize", + "version": "1.1.0", + "status": "ok", + "timestamp": "2026-03-18T13:30:00Z", + "agent": "summarizeagent.eth", + "request_hash": "sha256:4b87d90208e62430a5d8f577938fd26d02d646f092d137cee66216c0daac8243", + "result_hash": "sha256:8b5d2d4dfb4a8bb7d4d1ed436e78c5f4bcf6ca9714ec93a8db8e5ec6ed8b1b8d", + "result_cid": "bafybeif6h8j0l2n4p6r8t0v2x4z6b8d0f2h4j6l8n0p2r4t6v8x0z2bd", + "summary": "Commons v1.1.0 makes requests smaller and receipts easier to verify while preserving stable verb semantics.", + "signature": "MEUCID4fG6hJ8kL0mN2pQ4rS6tU8vW0xY2zA4bC6dE8fG0hAiEAzB1dD3fF5hH7jJ9lL1nP3rT5vX7zA9cC1eE3gH5iJ7" +} diff --git a/examples/v1.1.0/commons/summarize/json/valid/900-summarize.receipt.valid.json b/examples/v1.1.0/commons/summarize/json/valid/900-summarize.receipt.valid.json deleted file mode 100644 index aaf86b8..0000000 --- a/examples/v1.1.0/commons/summarize/json/valid/900-summarize.receipt.valid.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verb": "summarize", - "version": "1.1.0", - "status": "ok", - "timestamp": "2026-03-18T12:00:00Z", - "agent": "summarizeagent.eth", - "request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111", - "result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222", - "result_cid": "bafybeisummarizereceiptokexample0001", - "summary": "Commons v1.1.0 makes requests smaller and receipts easier to verify while preserving stable verb semantics.", - "signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" -} diff --git a/examples/v1.1.0/commons/summarize/json/valid/901-error.receipt.valid.json b/examples/v1.1.0/commons/summarize/json/valid/901-error.receipt.valid.json new file mode 100644 index 0000000..5ac025d --- /dev/null +++ b/examples/v1.1.0/commons/summarize/json/valid/901-error.receipt.valid.json @@ -0,0 +1,10 @@ +{ + "verb": "summarize", + "version": "1.1.0", + "status": "error", + "timestamp": "2026-03-18T13:30:24Z", + "agent": "summarizeagent.eth", + "request_hash": "sha256:e0e58e7252820c1cbeb4a585d07b854e44f4c4a236503d17b47779c4cbaf5f90", + "signature": "MEQCIA6hJ8kL0mN2pQ4rS6tU8vW0xY2zA4bC6dE8fG0hJ2lNAiBdF7hJ9kL1mN3pQ5rS7tU9vW1xY3zA5bC7dE9fG1hJ3", + "error": "The input was too fragmentary to produce a faithful summary without inventing missing context." +} diff --git a/package.json b/package.json index ef14cde..ac43189 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@commandlayer/commons", "version": "1.1.0", - "description": "Canonical Commons verbs and strict JSON Schemas for autonomous agents \u2014 active v1.1.0 schema family, historical pinned v1.0.0 release, and cross-runtime interoperability.", + "description": "Canonical Commons verbs and strict JSON Schemas for autonomous agents — active v1.1.0 schema family, historical pinned v1.0.0 release, and cross-runtime interoperability.", "private": false, "type": "module", "license": "MIT", @@ -49,11 +49,9 @@ "ajv-formats": "^3.0.1" }, "scripts": { - "validate:schema": "node scripts/ajv-run.mjs", + "validate": "npm run validate:schemas && npm run validate:examples", "validate:schemas": "node scripts/validate-all.mjs", "validate:examples": "node scripts/validate-examples.mjs", - "validate:all": "npm run validate:schemas && npm run validate:examples", - "validate": "npm run validate:all", "checksums:gen": "bash scripts/generate-checksums.sh schemas checksums.txt", "checksums:verify": "bash scripts/verify-checksums.sh", "checksums:dirty": "git diff --exit-code -- checksums.txt", diff --git a/scripts/ajv-run.mjs b/scripts/ajv-run.mjs deleted file mode 100644 index 462a1e6..0000000 --- a/scripts/ajv-run.mjs +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env node -/** - * ajv-run.mjs - * - * Convenience entrypoint for schema validation. - * Currently just delegates to validate-all.mjs so that: - * - * npm run validate:schema - * - * is equivalent to: - * - * npm run validate:schemas - */ - -import './validate-all.mjs'; diff --git a/scripts/validate-examples.mjs b/scripts/validate-examples.mjs index b838fc8..cd0eb0d 100644 --- a/scripts/validate-examples.mjs +++ b/scripts/validate-examples.mjs @@ -1,6 +1,6 @@ -import fs from "fs/promises"; -import path from "path"; -import { fileURLToPath } from "url"; +import fs from "node:fs/promises"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import Ajv2020 from "ajv/dist/2020.js"; import addFormats from "ajv-formats"; import ajvErrors from "ajv-errors"; @@ -26,7 +26,6 @@ const EXAMPLE_CONFIGS = [ { version: "v1.0.0", schemasRoot: path.join(ROOT, "schemas", "v1.0.0"), - examplesRoot: path.join(ROOT, "examples", "v1.0.0"), requestSchemaId: (verb) => `https://commandlayer.org/schemas/v1.0.0/commons/${verb}/requests/${verb}.request.schema.json`, receiptSchemaId: (verb) => `https://commandlayer.org/schemas/v1.0.0/commons/${verb}/receipts/${verb}.receipt.schema.json`, validDir: (verb) => path.join(ROOT, "examples", "v1.0.0", "commons", verb, "valid"), @@ -35,7 +34,6 @@ const EXAMPLE_CONFIGS = [ { version: "v1.1.0", schemasRoot: path.join(ROOT, "schemas", "v1.1.0"), - examplesRoot: path.join(ROOT, "examples", "v1.1.0"), requestSchemaId: (verb) => `https://commandlayer.org/schemas/v1.1.0/commons/${verb}/${verb}.request.schema.json`, receiptSchemaId: (verb) => `https://commandlayer.org/schemas/v1.1.0/commons/${verb}/${verb}.receipt.schema.json`, validDir: (verb) => path.join(ROOT, "examples", "v1.1.0", "commons", verb, "json", "valid"), @@ -59,14 +57,12 @@ function createAjv() { } async function loadJson(filePath) { - const raw = await fs.readFile(filePath, "utf8"); - return JSON.parse(raw); + return JSON.parse(await fs.readFile(filePath, "utf8")); } async function existsDir(dirPath) { try { - const stat = await fs.stat(dirPath); - return stat.isDirectory(); + return (await fs.stat(dirPath)).isDirectory(); } catch { return false; } @@ -75,19 +71,26 @@ async function existsDir(dirPath) { async function preloadAllSchemas(ajv, rootDir) { async function walk(dir) { const entries = await fs.readdir(dir, { withFileTypes: true }); + for (const entry of entries) { const fullPath = path.join(dir, entry.name); if (entry.isDirectory()) { await walk(fullPath); - } else if (entry.isFile() && entry.name.endsWith(".schema.json")) { - const schema = await loadJson(fullPath); - const key = schema.$id || fullPath; - try { - ajv.addSchema(schema, key); - } catch (err) { - if (!String(err.message || "").includes("already exists")) { - throw err; - } + continue; + } + + if (!entry.isFile() || !entry.name.endsWith(".schema.json")) { + continue; + } + + const schema = await loadJson(fullPath); + const key = schema.$id || fullPath; + + try { + ajv.addSchema(schema, key); + } catch (err) { + if (!String(err.message || "").includes("already exists")) { + throw err; } } } @@ -96,30 +99,48 @@ async function preloadAllSchemas(ajv, rootDir) { await walk(rootDir); } +function formatAjvErrors(validateFn) { + return validateFn.errors?.map((error) => { + const location = error.instancePath || "/"; + return `${location} ${error.message}`; + }).join("; ") ?? "unknown validation error"; +} + async function validateDir(dirPath, expectedValid, validateRequest, validateReceipt) { - if (!(await existsDir(dirPath))) return; + if (!(await existsDir(dirPath))) { + return { checked: 0, requests: 0, receipts: 0 }; + } - const files = await fs.readdir(dirPath); + const files = (await fs.readdir(dirPath)) + .filter((file) => file.endsWith(".json")) + .sort((left, right) => left.localeCompare(right)); - for (const file of files) { - if (!file.endsWith(".json")) continue; + const totals = { checked: 0, requests: 0, receipts: 0 }; + for (const file of files) { const fullPath = path.join(dirPath, file); const data = await loadJson(fullPath); - const isRequest = file.includes("request"); + const isRequest = file.includes(".request."); const validateFn = isRequest ? validateRequest : validateReceipt; const ok = validateFn(data); + totals.checked += 1; + if (isRequest) { + totals.requests += 1; + } else { + totals.receipts += 1; + } + if (expectedValid && !ok) { - console.error(`❌ Expected VALID but got errors for ${fullPath}:`, validateFn.errors); - throw new Error(`Example should be valid but failed: ${fullPath}`); + throw new Error(`Expected VALID but got ${formatAjvErrors(validateFn)} for ${fullPath}`); } if (!expectedValid && ok) { - console.error(`❌ Expected INVALID but schema accepted ${fullPath}`); - throw new Error(`Example should be invalid but passed: ${fullPath}`); + throw new Error(`Expected INVALID but schema accepted ${fullPath}`); } } + + return totals; } async function validateExamplesForVerb(config, verb, ajv) { @@ -130,25 +151,29 @@ async function validateExamplesForVerb(config, verb, ajv) { if (!hasValidDir && !hasInvalidDir) { console.log(`ℹ️ No ${config.version} examples found for verb: ${verb}, skipping.`); - return; + return { valid: { checked: 0, requests: 0, receipts: 0 }, invalid: { checked: 0, requests: 0, receipts: 0 } }; } - console.log(`\n🔍 Validating ${config.version} examples for verb: ${verb}`); - const validateRequest = ajv.getSchema(config.requestSchemaId(verb)); const validateReceipt = ajv.getSchema(config.receiptSchemaId(verb)); if (!validateRequest) { throw new Error(`No compiled schema found in Ajv for request id: ${config.requestSchemaId(verb)}`); } + if (!validateReceipt) { throw new Error(`No compiled schema found in Ajv for receipt id: ${config.receiptSchemaId(verb)}`); } - await validateDir(validDir, true, validateRequest, validateReceipt); - await validateDir(invalidDir, false, validateRequest, validateReceipt); + const valid = await validateDir(validDir, true, validateRequest, validateReceipt); + const invalid = await validateDir(invalidDir, false, validateRequest, validateReceipt); + + console.log( + `✅ ${config.version} ${verb}: ${valid.checked} valid (${valid.requests} requests, ${valid.receipts} receipts), ` + + `${invalid.checked} invalid (${invalid.requests} requests, ${invalid.receipts} receipts)` + ); - console.log(`✅ ${config.version} examples OK for verb: ${verb}`); + return { valid, invalid }; } async function main() { @@ -159,16 +184,38 @@ async function main() { await preloadAllSchemas(ajv, config.schemasRoot); } + const summary = new Map(); + for (const config of EXAMPLE_CONFIGS) { + summary.set(config.version, { + valid: { checked: 0, requests: 0, receipts: 0 }, + invalid: { checked: 0, requests: 0, receipts: 0 } + }); + for (const verb of VERBS) { - await validateExamplesForVerb(config, verb, ajv); + const result = await validateExamplesForVerb(config, verb, ajv); + const totals = summary.get(config.version); + + for (const bucket of ["valid", "invalid"]) { + totals[bucket].checked += result[bucket].checked; + totals[bucket].requests += result[bucket].requests; + totals[bucket].receipts += result[bucket].receipts; + } } } + console.log("\n📊 Example validation summary"); + for (const [version, totals] of summary.entries()) { + console.log( + ` ${version}: ${totals.valid.checked} valid (${totals.valid.requests} requests, ${totals.valid.receipts} receipts), ` + + `${totals.invalid.checked} invalid (${totals.invalid.requests} requests, ${totals.invalid.receipts} receipts)` + ); + } + console.log("\n✅ All example validations completed."); } catch (err) { - console.error("❌ Unexpected error in validate-examples.mjs:"); - console.error(err); + console.error("❌ validate-examples.mjs failed:"); + console.error(err instanceof Error ? err.message : err); process.exit(1); } }