instrument: protocol adapters + M7 certification (M1.D + M7 port)#95
Closed
mmercuri wants to merge 2 commits into
Closed
instrument: protocol adapters + M7 certification (M1.D + M7 port)#95mmercuri wants to merge 2 commits into
mmercuri wants to merge 2 commits into
Conversation
Ports the six protocol adapters and the M7 protocol-certification
suite onto the new layerlens.instrument base layer:
A2A, AGUI, MCP, AP2, A2UI, UCP
Also lands the cross-protocol infrastructure:
- base.py: shared protocol adapter mixin
- certification.py: CertificationSuite (M7) — exercises every
protocol adapter against a canned trace catalog and emits a
machine-readable verdict
- connection_pool.py / health.py / exceptions.py / _commerce.py:
cross-protocol helpers
Scope
-----
- src/layerlens/instrument/adapters/protocols/{a2a,agui,mcp}/: full
per-protocol packages (adapter, events, transport)
- src/layerlens/instrument/adapters/protocols/{ap2,a2ui,ucp}.py:
single-file adapters
- src/layerlens/instrument/adapters/protocols/{base,certification,
connection_pool,exceptions,health,_commerce}.py: shared protocol
layer
- tests/instrument/adapters/protocols/: unit + smoke + certification
tests for all six protocols
- samples/instrument/{a2a,agui,mcp,ap2,a2ui,ucp}/: runnable per-
protocol samples
- docs/adapters/{protocols-*,certification}.md: per-protocol
integration guide + M7 certification doc
- pyproject.toml: six new optional extras
(protocols-a2a, protocols-agui, protocols-mcp, protocols-ap2,
protocols-a2ui, protocols-ucp) plus the protocols-all umbrella;
pyright/ruff exclusions for the dynamic monkey-patching protocol
code
Blast radius
------------
- Default `pip install layerlens` install set is unchanged. Only
protocols-mcp pulls in a non-stdlib dep (`mcp`); protocols-a2a
reuses the already-required `httpx`; the other four protocols are
self-contained.
- protocols-agui currently exposes an empty extra group: the upstream
AG-UI client SDK is not yet on PyPI. The adapter is self-contained;
the extra is reserved so that consumers can still install
`layerlens[protocols-agui]` for forward-compatibility.
- M7 certification suite is an additive read-only API.
- No changes to existing public API surface.
Test plan
---------
- uv run pytest tests/instrument/adapters/protocols/ -x ->
107 passed (a2a, agui, mcp, ap2, a2ui, ucp + certification + smoke)
Stacks on
---------
- feat/instrument-base-foundation (M1.A) — required for the
BaseAdapter surface this PR consumes.
LAY-3400 umbrella (M1.D + M7).
Auto-applied by 'ruff check --fix'. No behavior change.
Contributor
Author
|
Linear: https://linear.app/layerlens/issue/LAY-3400 (Protocol adapters + certification suite — M1.D + M7). Stacked on PR #93. Under Apollo M1 epic LAY-3423. |
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
Ports the six protocol adapters and the M7 protocol-certification
suite onto the new
layerlens.instrumentbase layer:A2A, AGUI, MCP, AP2, A2UI, UCP
Also lands the cross-protocol infrastructure:
base.py— shared protocol adapter mixincertification.py—CertificationSuite(M7) — exercises everyprotocol adapter against a canned trace catalog and emits a
machine-readable verdict
connection_pool.py/health.py/exceptions.py/_commerce.py— cross-protocol helpersScope
src/layerlens/instrument/adapters/protocols/{a2a,agui,mcp}/— full per-protocol packages (adapter, events, transport)
src/layerlens/instrument/adapters/protocols/{ap2,a2ui,ucp}.py— single-file adapters
src/layerlens/instrument/adapters/protocols/{base,certification,connection_pool,exceptions,health,_commerce}.py— shared protocol layer
tests/instrument/adapters/protocols/— unit + smoke +certification tests for all six protocols
samples/instrument/{a2a,agui,mcp,ap2,a2ui,ucp}/— runnableper-protocol samples
docs/adapters/{protocols-*,certification}.md— per-protocolintegration guide + M7 certification doc
pyproject.toml— six new optional extras (protocols-a2a,protocols-agui,protocols-mcp,protocols-ap2,protocols-a2ui,protocols-ucp) plus theprotocols-allumbrella; pyright/ruff exclusions for the dynamic monkey-patching
protocol code
Blast radius
pip install layerlensinstall set is unchanged. Onlyprotocols-mcppulls in a non-stdlib dep (mcp);protocols-a2areuses the already-required
httpx; the other four protocols areself-contained.
protocols-aguicurrently exposes an empty extra group: theupstream AG-UI client SDK is not yet on PyPI. The adapter is
self-contained; the extra is reserved so consumers can still
install
layerlens[protocols-agui]for forward-compatibility.Test plan
uv run pytest tests/instrument/adapters/protocols/ -x—107 passed (a2a, agui, mcp, ap2, a2ui, ucp + certification + smoke)
m-peko) verifies M7 certification harness coverageStacks on
feat/instrument-base-foundation(M1.A) — required for theBaseAdaptersurface this PR consumes.Linear
LAY-3400 umbrella (M1.D + M7).