Merge pull request #46 from Molecule-AI/fix/jsonrpc-mount-at-root
Some checks failed
Publish to PyPI / build-and-publish (push) Failing after 40s

fix: mount JSON-RPC at root — fixes silent fleet productivity loss
This commit is contained in:
Hongming Wang 2026-04-24 02:06:58 -07:00 committed by GitHub
commit d22c19ad31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -217,10 +217,17 @@ async def main(): # pragma: no cover
agent_card=agent_card,
)
# Build Starlette app from route factory functions (a2a-sdk 1.x API)
# Build Starlette app from route factory functions (a2a-sdk 1.x API).
# JSON-RPC mounts at root because the platform's ProxyA2A (the only
# caller in this deployment) POSTs to `http://ws-<id>:8000/` — no
# path suffix. See workspace-server/internal/provisioner.InternalURL
# which returns the Docker-DNS form without a path. Mounting
# anywhere else produces 404 on every inbound A2A and silent fleet-
# wide productivity loss (baseline restart 2026-04-24: 0 delegations
# for 2 cycles until this was traced to `/api/v1/jsonrpc/`).
routes = []
routes.extend(create_agent_card_routes(agent_card))
routes.extend(create_jsonrpc_routes(handler, "/api/v1/jsonrpc/"))
routes.extend(create_jsonrpc_routes(handler, "/"))
app = Starlette(routes=routes)
# 8. Register with platform

View File

@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "molecule-ai-workspace-runtime"
version = "0.1.11"
version = "0.1.12"
description = "Molecule AI workspace runtime — shared infrastructure for all agent adapters"
requires-python = ">=3.11"