Per the molecule-core a2a-sdk v0→v1 migration cheat-sheet
(reference_a2a_sdk_v0_to_v1_migration), v1 renamed
new_agent_text_message → new_text_message. The import path was
already updated to a2a.helpers (line 38's "v1 renames a2a.utils →
a2a.helpers" comment proves the migration was started), but the
symbol rename was missed, so:
from a2a.helpers import new_agent_text_message
ImportError: cannot import name 'new_agent_text_message' from 'a2a.helpers'
Effect: gemini-cli template image rebuild has been failing the
boot-smoke gate on every cascade fire since 03:23 UTC today (3 in a
row, same SHA = persistent regression, not flake). The smoke test
correctly blocked the broken publish — current GHCR latest is from
before this regression so existing workspaces still work, but no new
gemini-cli builds can land until this fix.
Surfaced via wheel-state audit while verifying that
molecule-ai-workspace-runtime v0.1.36 contains the platform-tool-
registry fixes (it does). Cascade health check found 7/8 templates
rebuilt cleanly post-v0.1.36; gemini-cli was the outlier.
Test: rename in 7 sites (1 import + 6 call sites), `python3 -m
py_compile cli_executor.py` clean. CI's boot-smoke gate is the
end-to-end check.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two compounding bugs from the post-#87 extraction:
1. adapter.py never aliased GeminiCLIAdapter to the contract name
`Adapter`, which `molecule_runtime.adapters.get_adapter()` reads
via `getattr(mod, "Adapter")`. Without it, every gemini-cli
workspace startup fails preflight with "no `Adapter` class is
exported".
2. Four bare imports of runtime modules
(`from config`, `from executor_helpers` in adapter.py + cli_executor.py)
never got qualified to `from molecule_runtime.X import Y`. They
worked when the runtime was bundled into workspace/ where bare
imports resolved against sibling files; in the standalone template
repo they explode with ModuleNotFoundError.
Same migration debt as fixed in claude-code template
(commits 280e89c and e7dea39). The pattern across templates was
sniffed out by tonight's wire-real E2E sweep; the OTHER 5 templates
(langgraph, crewai, autogen, deepagents, openclaw) also need the
Adapter alias added — file separately. langgraph + deepagents also
have bare `from a2a_executor import LangGraphA2AExecutor` — same fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors molecule-ai-workspace-template-claude-code's PR #13: move the
adapter-specific executor file out of molecule-runtime into the template
that consumes it (molecule-core task #87 / #122).
Adds:
- cli_executor.py (465 LOC) — copied verbatim from
molecule-core/workspace/cli_executor.py @ commit 66b9c040.
- Dockerfile: COPY cli_executor.py . alongside adapter.py.
The adapter at adapter.py:118 already does
`from cli_executor import CLIAgentExecutor` — once this file lands at
/app/, Python's import order picks the local copy over the same-named
module that older molecule-runtime versions ship under site-packages.
Pure additive at this stage — molecule-runtime still ships the file too,
so any image built from this template just has two copies on disk
(local /app shadows the site-packages one). No behavior change.
Note on the file's RUNTIME_PRESETS dict: it contains entries for
codex / ollama / gemini-cli, but neither codex nor ollama has a
template repo today (verified 2026-04-27 against the
Molecule-AI/molecule-ai-workspace-template-* repo list). They're
unreachable in production. The presets travel with the file here only
because trimming them would diverge from the molecule-core source —
when the molecule-core deletion lands they'll vanish naturally.
Sequencing (the molecule-core PR follows AFTER this image rebuilds):
1. THIS PR — template gets local copy, image rebuilds with it
(current PR; safe because no removal yet)
2. molecule-core PR — drop workspace/cli_executor.py, bump runtime
PyPI version. Templates that haven't pulled the new runtime
version still work because their local copy is unchanged.
Reverse order (drop from runtime first) would break any template
image build pulling the latest runtime mid-sequence.
Source: molecule-core/workspace/cli_executor.py @ 66b9c040 (commit
hash pinned for traceability of any future divergence).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>