feat: emit canonical runtime-core receipts in agent-sdk#47
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
@commandlayer/runtime-coreso emitted receipts follow the CommandLayer canonical proof envelope.canonical,alg,signature,signer_id,kid,signature_b64,hash_sha256) and unify on the canonical envelope (proof.canonicalization,proof.hash.*,proof.signature.*).CommandLayer.wrap()surface and config compatibility (privateKeyPem, deprecatedprivateKeyalias,keyIdmapped to runtime-corekid, andsigner/agent) to minimize breaking changes.Description
@commandlayer/runtime-coredependency inpackage.jsonand updatedcreateReceiptto callsignCommandLayerReceipt(...)from runtime-core instead of performing local Ed25519 signing.src/receipt.tsto useCommandLayerReceipt<ReceiptInput>as theReceipttype and accept runtime-coreCommandLayerCanonicalizationfor canonicalization.src/schemas.trust-receipt-v1.jsonto require the canonical proof envelope fieldsproof.canonicalization,proof.hash.alg/value, andproof.signature.alg/value/kid, and removed legacy proof keys from the schema.test/receipt.test.tsandtest/trust.test.tsto assert the canonical proof envelope, to useverifyCommandLayerReceipt(...)for local verification/tamper checks, and to stop depending on legacy proof fields.examples/full-demo.tsand README wording to reference the canonical proof envelope instead of legacy proof fields.package.json,src/receipt.ts,src/schemas.trust-receipt-v1.json,test/receipt.test.ts,test/trust.test.ts,examples/full-demo.ts, andREADME.md.Testing
npm installbut it failed in the current environment with403 Forbiddenwhen fetching registry packages, so new dependency installation could not complete.npm run buildandnpm testbut both failed in this environment due to missing dependencies/type declarations stemming from the blockednpm install, so tests could not be executed end-to-end here.verifyCommandLayerReceipt(...)for validity and tamper checks, but those updated tests were not run successfully in this environment due to the install/build failures.npm install && npm run build && npm testin CI or a development environment with registry access to validate the runtime-core integration and confirm all tests pass.Codex Task