Skip to content

align runtime-core to canonical CLAS proof envelope#19

Merged
GsCommand merged 1 commit into
mainfrom
codex/align-runtime-core-to-canonical-clas-proof-envelope
May 15, 2026
Merged

align runtime-core to canonical CLAS proof envelope#19
GsCommand merged 1 commit into
mainfrom
codex/align-runtime-core-to-canonical-clas-proof-envelope

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • Replace the legacy layered/protocol-commons proof model with the canonical CLAS metadata.proof envelope and provide a single clear API surface for building, signing, and verifying CommandLayer receipts.
  • Intentionally break pre-adoption compatibility to remove confusing legacy shapes and align the codebase to the canonical CLAS stack-contract proof envelope.

Description

  • Introduces a canonical CLAS envelope implementation in src/compat.ts with new types CommandLayerReceipt / CommandLayerProof and exported helpers buildCanonicalProof, signCommandLayerReceipt, verifyCommandLayerReceipt, and isSignedCommandLayerReceipt that emit/validate metadata.proof.canonicalization, metadata.proof.hash.{alg,value} and metadata.proof.signature.{alg,value,kid}.
  • Updates exports in src/index.ts to surface the new canonical APIs as the single source of truth and removes the confusing legacy compat exports surface.
  • Removes legacy acceptance of signature_b64 / hash_sha256 as canonical proof fields and updates verification to require the explicit CLAS proof shape and field-level validation.
  • Updates tests and README to assert the new canonical envelope exactly and to reject legacy/wrong proof shapes, tightens ENS options validation to require a provider in the options object, and updates the canonical SHA-256 audit vector constant to match the runtime-determined digest.

Testing

  • Ran the full verification flow: npm install, npm run build, npm test, and npm run typecheck.
  • Automated test suite: all tests passed (66 tests across suites, 0 failures) and the TypeScript typecheck succeeded.
  • npm run build and npm run typecheck completed successfully.

Codex Task

@GsCommand GsCommand merged commit e971e51 into main May 15, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant