feat(peer): transport-agnostic inbound peer request handler#26
Merged
Conversation
Add ca2a_runtime.peer.handle_peer_request with PeerRequest / PeerResult. It composes the full inbound pipeline off a parsed request: verify the delegation chain, intersect the delegated scope with the local policy and enforce the requested capability, open any sealed payload with the enclave-bound key, and emit a linked provenance record. Fails closed on any verification or authorization failure, and never returns a payload it could not open. A transport (an A2A server) parses its wire format into a PeerRequest and calls this. cA2A does not define the transport itself, only what the peer does with a parsed request (profile, not protocol), so raw A2A wire parsing is left to implementers. Suite: 104 passed, 99% coverage. Closes #8 Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What
ca2a_runtime.peer.handle_peer_request(withPeerRequest/PeerResult) composes the full inbound pipeline off a parsed request: verify chain, intersect scope and enforce, open any sealed payload with the enclave key, emit a linked provenance record. Fails closed throughout; never returns a payload it could not open.This is the binding point a transport calls. cA2A does not define the transport (profile, not protocol), so parsing raw A2A wire messages into a
PeerRequestis left to implementers.Suite: 104 passed, 99% coverage.
Closes #8
🤖 Generated with Claude Code