Go to file
Molecule AI Infra-Runtime-BE d21f8c2064
Some checks failed
ci / mirror-guard (pull_request) Failing after 5s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 7s
fix(runtime): align PLATFORM_URL default to host.docker.internal across all modules
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:34:24 +00:00
.gitea/workflows fix(ci): allow mirror-guard bypass for CI infrastructure migration PRs 2026-05-11 03:09:49 +00:00
molecule_runtime fix(runtime): align PLATFORM_URL default to host.docker.internal across all modules 2026-05-11 03:34:24 +00:00
tests chore(precommit): add sk-cp- MiniMax pattern (F1088 retroactive fix); bump 0.1.16 → 0.1.17 2026-04-26 21:43:24 -07:00
.gitignore chore: gitignore credentials for molecule-ai-workspace-runtime 2026-04-16 09:18:48 -07:00
CONTRIBUTING.md fix(post-suspension): migrate github.com/Molecule-AI refs to git.moleculesai.app (Class G #168) 2026-05-07 13:02:35 -07:00
pyproject.toml fix(deps): enforce a2a-sdk>=1.0.0 to match code comment and KI-009 migration 2026-05-10 07:05:06 +00:00
README.md fix(post-suspension): migrate github.com/Molecule-AI refs to git.moleculesai.app (Class G #168) 2026-05-07 13:02:35 -07:00

molecule-ai-workspace-runtime

⚠️ This repo is a publish artifact, not the source of truth.

Runtime code lives in Molecule-AI/molecule-coreworkspace/. This repo is regenerated and republished from there by the publish-runtime workflow on every runtime-v* tag.

Don't edit files here directly. PRs against this repo will not be merged. Open them against molecule-core instead.


Shared Python runtime infrastructure for all Molecule AI agent adapters.

This package provides the core machinery every Molecule AI workspace container needs:

  • A2A server — registers with the platform, heartbeats, serves A2A JSON-RPC
  • Adapter interfaceBaseAdapter / AdapterConfig / SetupResult
  • Built-in tools — delegation, memory, approvals, sandbox, telemetry
  • Skill loader — loads and hot-reloads skill modules from /configs/skills/
  • Plugin system — per-workspace + shared plugin discovery and install
  • Config / preflight — YAML config loading with validation

Installation

pip install molecule-ai-workspace-runtime

Adapter discovery

The runtime discovers adapters in two ways:

  1. ADAPTER_MODULE env var (standalone adapter repos):

    ADAPTER_MODULE=adapter molecule-runtime
    

    The runtime imports adapter and calls adapter.Adapter.

  2. Subdirectory scan (monorepo local dev): falls back to scanning molecule_runtime/adapters/<runtime>/ and importing the matching subdir's Adapter class.

Contributing

Don't open PRs here. Send your change to Molecule-AI/molecule-core under the workspace/ directory. After your PR merges to main and a runtime-v* tag is pushed, the publish-runtime workflow rebuilds this mirror + uploads the new wheel to PyPI.

See docs/workspace-runtime-package.md for the full publishing flow.

Why this split

The runtime needs to ship as a PyPI artifact (so the 8 workspace template images can pip install it), but it also needs to evolve in lock-step with the platform's wire protocol (queue shape, A2A metadata, event payloads). A monorepo edit + auto-publish pipeline gives both: atomic cross-cutting changes, plus a clean PyPI release on every tag.

For the back-history of why this repo previously was the source of truth and the drift that caused: see issue Molecule-AI/molecule-core#2103.