Skip to content

Commit 92f4d96

Browse files
kaisozaojea
authored andcommitted
feat(agentmesh-cop): watch the mesh as a member through the Python SDK
agentmesh-cop joins the mesh with the Python SDK, holds every listed router and alerts on: - control-plane sync failing and recovering - control-plane signing keys added and retired - routers listed, delisted, unreachable and reachable again - peers banned and unbanned - the mesh unreachable, told apart from the cop's own isolation - services appearing and disappearing, named as <type>://<name> for mcp, inference, a2a and egress Alerts go to stdout and, when configured, Telegram and Slack. The tests run under make sdk-python and the SDK workflow.
1 parent c443522 commit 92f4d96

5 files changed

Lines changed: 919 additions & 1 deletion

File tree

‎.github/workflows/sdk.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
branches: [main]
2525
paths:
2626
- 'sdk/**'
27+
- 'development/tools/agentmesh-cop/**'
2728
- 'api/agentmesh.proto'
2829
- 'hack/gen-sdk-proto.sh'
2930
- 'hack/gen-sdk-docs/**'
@@ -36,6 +37,7 @@ on:
3637
branches: [main]
3738
paths:
3839
- 'sdk/**'
40+
- 'development/tools/agentmesh-cop/**'
3941
- 'api/agentmesh.proto'
4042
- 'hack/gen-sdk-proto.sh'
4143
- 'hack/gen-sdk-docs/**'

‎Makefile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ e2e-test: build docker-build
166166
# tests and leave it installed, which is what TestNativeSDKs needs to run
167167
# both against a real control plane instead of skipping. sdk-js also
168168
# compiles the example programs the docs embed; TestNativeSDKExamples runs
169-
# them.
169+
# them. sdk-python also runs agentmesh-cop's tests, since the cop runs on
170+
# the Python SDK.
170171
.PHONY: sdk-js sdk-python sdk-proto sdk-docs sdk-test
171172
sdk-js:
172173
cd sdk/js && npm ci --no-fund --no-audit && npm test && npm run build && npm run examples
@@ -175,6 +176,7 @@ sdk-python:
175176
python3 -m venv sdk/python/.venv
176177
./sdk/python/.venv/bin/pip install -q -e './sdk/python[test,examples]'
177178
./sdk/python/.venv/bin/python -m pytest -q sdk/python/tests
179+
./sdk/python/.venv/bin/python -m pytest -q development/tools/agentmesh-cop
178180

179181
sdk-proto:
180182
./hack/gen-sdk-proto.sh

0 commit comments

Comments
 (0)