feat: adopt agentrust-trace; produce GatewayClaim envelope - #113
Merged
Conversation
Replace cmcp's local TRACE schema with the canonical agentrust-trace package. GatewayClaim wraps canonical GatewayTrace fields (eat_profile, iat, subject, runtime, policy, cnf) inside a cmcp-specific envelope that adds gateway addenda (session_id, audit_chain, call_summary, catalog, attestation freshness). - pyproject.toml: add agentrust-trace>=0.1 dep; drop jsonschema (pulled transitively by agentrust-trace) - trace_claim.py: full rewrite — TraceClaim dataclass → GatewayClaim Pydantic model; provider → canonical platform mapping; enforcement mode "enforcing" → "enforce"; hex public key → OKP JWK in trace.cnf - verify.py: update all field paths to new envelope structure; validate with GatewayClaim.model_validate instead of JSON Schema file; StrEnum - schemas/trace-claim.schema.json: updated to GatewayClaim envelope - tests: updated for new API and field paths; 29 tests, all passing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agentrust-tracepackage (GatewayTraceembeds the Phase 1 canonical fields;GatewayAddendaholds cmcp-specific addenda)trace_claim.pyfully rewritten:TraceClaimdataclass →GatewayClaimPydantic model; provider→platform mapping (sev-snp→amd-sev-snp,tdx/opaque→intel-tdx,tpm→tpm2); enforcement mode"enforcing"→"enforce"; hex public key → OKP JWK intrace.cnfverify.pyupdated: field paths now follow new envelope (trace.policy.bundle_hash,gateway.audit_chain, etc.); Pydantic validation replaces JSON Schema file;StrEnumschemas/trace-claim.schema.jsonupdated to the new envelope structureTest plan
test_trace_claim.py+test_verify.py)ruff checkclean on changed source filesSigningKey, verify viaEd25519PublicKeydecoded from JWKxfieldenforcing→enforce)tpm2+firmware_version=software-only-dev-mode🤖 Generated with Claude Code