feat(proof): add agent_identity_verified flag#20
Merged
Conversation
Add optional bool field `parties.agent_identity_verified` — set to true when agent_identity is a cryptographically verified DID (key has completed Ed25519 challenge-response binding). Absent otherwise, preserving backward compatibility for all existing proofs. - proofs.py: new param agent_identity_verified in generate_proof() and get_public_proof() - proxy.py: set agent_identity_verified=True when verified_did override is applied - tests: add test_proof_with_verified_did, assert flag absent on self-declared identity Aligns with proof-spec v2.1.2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
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
parties.agent_identity_verified—truewhenagent_identityis a cryptographically verified DID bound to the API key via Ed25519 challenge-response. Absent when self-declared.Motivation
The
parties.agent_identityfield could contain either a verified DID or a self-declared string — indistinguishable without internal knowledge. This flag lets downstream systems (e.g. entity verification modules) tell the two apart without parsing the value.Changes
trust_layer/proofs.py: newagent_identity_verifiedparam ingenerate_proof()and exposed inget_public_proof()trust_layer/proxy.py: setagent_identity_verified=Truewhenverified_didoverride is appliedtests/test_identity.py: newtest_proof_with_verified_did, asserts flag absent on self-declared identityTest plan
pytest tests/ --ignore=tests/test_email_pipeline_v3.py— 427 passed./scripts/deploy_trust_layer_prod.shagent_identity_verified: trueagent_identity_verifiedabsent🤖 Generated with Claude Code