forked from molecule-ai/molecule-core
Renames: - platform/ → workspace-server/ (Go module path stays as "platform" for external dep compat — will update after plugin module republish) - workspace-template/ → workspace/ Removed (moved to separate repos or deleted): - PLAN.md — internal roadmap (move to private project board) - HANDOFF.md, AGENTS.md — one-time internal session docs - .claude/ — gitignored entirely (local agent config) - infra/cloudflare-worker/ → Molecule-AI/molecule-tenant-proxy - org-templates/molecule-dev/ → standalone template repo - .mcp-eval/ → molecule-mcp-server repo - test-results/ — ephemeral, gitignored Security scrubbing: - Cloudflare account/zone/KV IDs → placeholders - Real EC2 IPs → <EC2_IP> in all docs - CF token prefix, Neon project ID, Fly app names → redacted - Langfuse dev credentials → parameterized - Personal runner username/machine name → generic Community files: - CONTRIBUTING.md — build, test, branch conventions - CODE_OF_CONDUCT.md — Contributor Covenant 2.1 All Dockerfiles, CI workflows, docker-compose, railway.toml, render.yaml, README, CLAUDE.md updated for new directory names. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 lines
747 B
Python
23 lines
747 B
Python
"""Adapter registry shim.
|
|
|
|
Adapters extracted to standalone repos (molecule-ai-workspace-template-*).
|
|
ADAPTER_MODULE env var is the primary discovery mechanism in production.
|
|
This shim provides backward-compatible imports for local dev + tests.
|
|
"""
|
|
import importlib
|
|
import os
|
|
import logging
|
|
from adapter_base import BaseAdapter, AdapterConfig
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
def get_adapter(runtime: str) -> type[BaseAdapter]:
|
|
adapter_module = os.environ.get("ADAPTER_MODULE")
|
|
if adapter_module:
|
|
mod = importlib.import_module(adapter_module)
|
|
return getattr(mod, "Adapter")
|
|
raise KeyError(
|
|
f"No ADAPTER_MODULE set for runtime '{runtime}'. "
|
|
"Adapters now live in standalone template repos."
|
|
)
|