Skip to content

feat: adopt agentrust-trace; produce GatewayClaim envelope - #113

Merged
imran-siddique merged 1 commit into
mainfrom
feat/trace-spec-dependency
Jun 5, 2026
Merged

feat: adopt agentrust-trace; produce GatewayClaim envelope#113
imran-siddique merged 1 commit into
mainfrom
feat/trace-spec-dependency

Conversation

@imran-siddique

Copy link
Copy Markdown
Contributor

Summary

  • Replaces cmcp's locally-defined TRACE schema with the canonical agentrust-trace package (GatewayTrace embeds the Phase 1 canonical fields; GatewayAddenda holds cmcp-specific addenda)
  • trace_claim.py fully rewritten: TraceClaim dataclass → GatewayClaim Pydantic model; provider→platform mapping (sev-snpamd-sev-snp, tdx/opaqueintel-tdx, tpmtpm2); enforcement mode "enforcing""enforce"; hex public key → OKP JWK in trace.cnf
  • verify.py updated: field paths now follow new envelope (trace.policy.bundle_hash, gateway.audit_chain, etc.); Pydantic validation replaces JSON Schema file; StrEnum
  • schemas/trace-claim.schema.json updated to the new envelope structure

Test plan

  • 29 unit tests pass (test_trace_claim.py + test_verify.py)
  • ruff check clean on changed source files
  • Signature round-trip verified: sign with SigningKey, verify via Ed25519PublicKey decoded from JWK x field
  • Enforcement mode mapping tested (enforcingenforce)
  • software-only provider maps to tpm2 + firmware_version=software-only-dev-mode

🤖 Generated with Claude Code

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>
@imran-siddique
imran-siddique merged commit a554483 into main Jun 5, 2026
0 of 2 checks passed
@imran-siddique
imran-siddique deleted the feat/trace-spec-dependency branch July 29, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant