diff --git a/workspace-server/internal/handlers/external_connection.go b/workspace-server/internal/handlers/external_connection.go index 847ebee6..b507e6b2 100644 --- a/workspace-server/internal/handlers/external_connection.go +++ b/workspace-server/internal/handlers/external_connection.go @@ -259,7 +259,6 @@ pip install 'git+https://github.com/Molecule-AI/hermes-channel-molecule.git' export MOLECULE_WORKSPACE_ID={{WORKSPACE_ID}} export MOLECULE_PLATFORM_URL={{PLATFORM_URL}} export MOLECULE_WORKSPACE_TOKEN="" -export MOLECULE_ORG_ID="" # 3. Edit ~/.hermes/config.yaml — under your existing top-level # gateway: block, add a plugin_platforms entry: @@ -338,7 +337,6 @@ mkdir -p ~/.codex # WORKSPACE_ID = "{{WORKSPACE_ID}}" # PLATFORM_URL = "{{PLATFORM_URL}}" # MOLECULE_WORKSPACE_TOKEN = "" -# MOLECULE_ORG_ID = "" # 3. Run codex — the molecule tools are now available to the agent: codex @@ -380,7 +378,6 @@ pip install molecule-ai-workspace-runtime # 3. Wire the molecule MCP server. {{WORKSPACE_ID}} + {{PLATFORM_URL}} # are stamped server-side; paste the auth token before running. WORKSPACE_TOKEN="" -MOLECULE_ORG_ID="" openclaw mcp set molecule "$(cat <" they can't fill, and external agents (codex CLI in +// particular) flag it as an unresolved setup blocker. +// +// The universal_mcp snippet is the reference: it calls into the same +// molecule_runtime and intentionally omits MOLECULE_ORG_ID. +func TestExternalTemplates_NoMoleculeOrgIDPlaceholder(t *testing.T) { + templates := map[string]string{ + "externalCurlTemplate": externalCurlTemplate, + "externalUniversalMcpTemplate": externalUniversalMcpTemplate, + "externalPythonTemplate": externalPythonTemplate, + "externalHermesChannelTemplate": externalHermesChannelTemplate, + "externalCodexTemplate": externalCodexTemplate, + "externalOpenClawTemplate": externalOpenClawTemplate, + } + for name, body := range templates { + if strings.Contains(body, "MOLECULE_ORG_ID") { + t.Errorf("%s contains MOLECULE_ORG_ID — operator-facing templates must not advertise this env var (TenantGuard reads it server-side from the tenant's own env, not the client)", name) + } + if strings.Contains(body, "") { + t.Errorf("%s contains \"\" placeholder — operators have no value to substitute, drop the line", name) + } + } +}