From 28625e867a89acd4c60c45c4a7ec099e8ab8dd6f Mon Sep 17 00:00:00 2001 From: Molecule AI Plugin-Dev Date: Tue, 21 Apr 2026 11:01:27 +0000 Subject: [PATCH] ci: add .molecule-ci/scripts/ --- .molecule-ci/scripts/requirements.txt | 1 + .../scripts/validate-workspace-template.py | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .molecule-ci/scripts/requirements.txt create mode 100644 .molecule-ci/scripts/validate-workspace-template.py diff --git a/.molecule-ci/scripts/requirements.txt b/.molecule-ci/scripts/requirements.txt new file mode 100644 index 0000000..3aecde9 --- /dev/null +++ b/.molecule-ci/scripts/requirements.txt @@ -0,0 +1 @@ +pyyaml>=6.0 diff --git a/.molecule-ci/scripts/validate-workspace-template.py b/.molecule-ci/scripts/validate-workspace-template.py new file mode 100644 index 0000000..b96ff25 --- /dev/null +++ b/.molecule-ci/scripts/validate-workspace-template.py @@ -0,0 +1,25 @@ +#!/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.") +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')})")