feat(workspace): add HTTP/SSE transport to a2a_mcp_server #791

Closed
infra-runtime-be wants to merge 1 commits from fix/a2a-mcp-server-http-transport into main

1 Commits

Author SHA1 Message Date
b9b75b1bc6 feat(workspace): add HTTP/SSE transport to a2a_mcp_server
Some checks failed
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 50s
Harness Replays / detect-changes (pull_request) Successful in 17s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 15s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 53s
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 11s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 21s
gate-check-v3 / gate-check (pull_request) Successful in 8s
qa-review / approved (pull_request) Successful in 6s
publish-runtime-autobump / pr-validate (pull_request) Successful in 39s
security-review / approved (pull_request) Successful in 6s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m18s
sop-checklist-gate / gate (pull_request) Successful in 8s
sop-tier-check / tier-check (pull_request) Successful in 8s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m39s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m44s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m27s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 2m0s
audit-force-merge / audit (pull_request) Has been skipped
CI / Shellcheck (E2E scripts) (pull_request) Successful in 4s
CI / Canvas (Next.js) (pull_request) Successful in 6s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 6s
Harness Replays / Harness Replays (pull_request) Successful in 6s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m33s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3m12s
CI / Python Lint & Test (pull_request) Failing after 7m4s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 2m7s
CI / Platform (Go) (pull_request) Successful in 7m49s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Failing after 1s
Port HTTP/SSE transport (from workspace-runtime PR #16) to the
canonical monorepo source. This enables the Hermes MCP-native runtime
to communicate with the A2A platform tools via HTTP/SSE instead of
stdio.

Changes:
- Add _run_http_server(port) async function using starlette + uvicorn
- POST /mcp: receive JSON-RPC requests, return JSON or queue for SSE
- GET /mcp/stream: SSE stream for push-based responses
- GET /health: returns {"ok": true, "transport": "http+sse", "port": N}
- cli_main() now accepts (transport, port) params for dual-mode startup
- argparse added to __main__ guard for CLI: --transport stdio|http, --port N

uvicorn/starlette are lazy-imported inside _run_http_server() so the
stdio path (the common case) doesn't fail if they're not installed.

Closes #16 (workspace-runtime) — fix now goes through monorepo.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 04:30:47 +00:00