Commit Graph

2 Commits

Author SHA1 Message Date
Hongming Wang
a8c8c62080 fix: export Adapter alias + qualify bare runtime imports
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>
2026-04-27 05:30:37 -07:00
Hongming Wang
1eb0cd0769 feat: add adapter code + Dockerfile for standalone deployment
Adapters extracted from molecule-monorepo/workspace-template.
Uses molecule-ai-workspace-runtime PyPI package for shared infrastructure.

- adapter.py — runtime-specific adapter class
- requirements.txt — runtime-specific deps + molecule-ai-workspace-runtime
- Dockerfile — FROM python:3.11-slim, pip install, COPY adapter, molecule-runtime entrypoint
- ADAPTER_MODULE=adapter tells the runtime to load this repo's Adapter class

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 04:27:22 -07:00