fix(runtime): align PLATFORM_URL default to host.docker.internal across all modules #9

Closed
infra-runtime-be wants to merge 2 commits from runtime/platform-url-host-docker-internal into main

2 Commits

Author SHA1 Message Date
62719490e8 fix(runtime): align PLATFORM_URL default to host.docker.internal across all modules
Some checks failed
ci / mirror-guard (pull_request) Failing after 2s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 2s
Unified the fallback default for PLATFORM_URL from `http://platform:8080`
(Docker Compose service name) to `http://host.docker.internal:8080`
across all 13 modules that declare it. This matches:
- The provisioner's default (buildContainerEnv injects PLATFORM_URL
  from cfg.PlatformURL, which defaults to host.docker.internal on the
  platform side — main.go:platformURL)
- The molecule-git-token-helper.sh script (already uses host.docker.internal)
- The MCP client (MOLECULE_URL injected by provisioner)

The provisioner always sets PLATFORM_URL in production containers, so
this is a development/Docker-only improvement: without this change,
a workspace started outside the Docker Compose network (e.g. via
`docker run` with `--network host`) would fail platform API calls
with "Connection refused" because `platform:8080` resolves nowhere.

13 modules updated: a2a_cli, a2a_client, a2a_mcp_server, adapters/base,
builtin_tools/a2a_tools, builtin_tools/approval, builtin_tools/delegation,
builtin_tools/hitl, builtin_tools/memory, consolidation, coordinator,
main, molecule_ai_status. All docstrings updated to match.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 03:12:37 +00:00
67f71936fd fix(mcp): apply review fixes to HTTP/SSE transport
Cherry-pick PR #6 review fixes from closed molecule-ai-workspace-runtime PR:
- serverInfo.name: "a2a-delegation" → "molecule" (matches registration name)
- conn_id: full UUID instead of [:8] slice to avoid collision across connections
- heartbeat: emit "data: null" instead of "data: {}" (correct SSE null value)
- Remove dead _sse_broadcaster (unused, superseded by queue.put in _run_http_server)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:42:06 +00:00