From 62447fc1d898823d96fbb940d16cba8732a064b7 Mon Sep 17 00:00:00 2001 From: "molecule-ai[bot]" <276602405+molecule-ai[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:00:47 +0000 Subject: [PATCH] fix(config): add models[] array for canvas model dropdown (#4) Co-authored-by: Molecule AI Plugin-Dev --- .../scripts/validate-workspace-template.py | 22 +++++++++++++++++++ config.yaml | 13 ++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/.molecule-ci/scripts/validate-workspace-template.py b/.molecule-ci/scripts/validate-workspace-template.py index b96ff25..5d87063 100644 --- a/.molecule-ci/scripts/validate-workspace-template.py +++ b/.molecule-ci/scripts/validate-workspace-template.py @@ -1,25 +1,47 @@ #!/usr/bin/env python3 """Validate a Molecule AI workspace template repo.""" import os, sys, yaml + errors = [] + if not os.path.isfile("config.yaml"): print("::error::config.yaml not found at repo root") sys.exit(1) + with open("config.yaml") as f: config = yaml.safe_load(f) + if not config.get("name"): errors.append("Missing required field: name") if not config.get("runtime"): errors.append("Missing required field: runtime") + known = {"langgraph", "claude-code", "crewai", "autogen", "deepagents", "hermes", "gemini-cli", "openclaw"} runtime = config.get("runtime", "") if runtime and runtime not in known: print(f"::warning::Runtime '{runtime}' is not in the known set. OK for custom runtimes.") + +# Check for legacy imports +if os.path.isfile("adapter.py"): + with open("adapter.py") as f: + content = f.read() + if "molecule_runtime" in content: + print("::warning::adapter.py imports 'molecule_runtime' — legacy import, use 'molecule_ai' or platform SDK") + +# Check for missing molecule-ai-workspace-runtime dependency hint +if os.path.isfile("Dockerfile"): + with open("Dockerfile") as f: + content = f.read() + if "molecule-ai-workspace-runtime" not in content: + print("::warning::Dockerfile does not reference 'molecule-ai-workspace-runtime' — may need base runtime package") + sv = config.get("template_schema_version") if sv is None: errors.append("Missing template_schema_version (add: template_schema_version: 1)") + if errors: for e in errors: print(f"::error::{e}") sys.exit(1) + print(f"✓ config.yaml valid: {config['name']} (runtime: {config.get('runtime')})") diff --git a/config.yaml b/config.yaml index 09153c8..f1d20d0 100644 --- a/config.yaml +++ b/config.yaml @@ -2,12 +2,19 @@ name: Gemini CLI Agent description: General-purpose Gemini CLI workspace version: 1.0.0 tier: 2 - runtime: gemini-cli runtime_config: model: gemini-2.5-pro required_env: - - GEMINI_API_KEY + - GEMINI_API_KEY timeout: 0 - template_schema_version: 1 +models: +- id: google:gemini-2.5-pro + name: Gemini 2.5 Pro (Google AI) + required_env: + - GEMINI_API_KEY +- id: google:gemini-2.5-flash + name: Gemini 2.5 Flash (Google AI) + required_env: + - GEMINI_API_KEY