Commit Graph

25 Commits

Author SHA1 Message Date
devops-engineer
2f044d53ce chore(ci): adopt .runtime-version push-mode cascade signal
All checks were successful
CI / validate (pull_request) Successful in 11m10s
CI / validate (push) Successful in 11m5s
Background: post-2026-05-06 SCM is Gitea, not GitHub. Gitea 1.22.6 has
no repository_dispatch / workflow_dispatch trigger API (empirically
verified across 6 candidate paths in molecule-core#20 issuecomment-913).
The molecule-core/publish-runtime.yml cascade therefore cannot fire
templates via curl-dispatch — pivots to push-mode instead.

This PR is the consumer side of that pivot:

- .runtime-version file at repo root — single line, plain version
  string. Currently 0.1.129 (latest published as of 2026-05-07).
  publish-runtime overwrites this on each cascade.

- publish-image.yml gains a resolve-version job that reads the file
  and forwards the value to the reusable build workflow as the
  third-priority source in the resolution chain.

Sequencing context: this PR (and 8 sibling PRs to the other template
repos) MUST land before molecule-core#20 v2 is merged.

Refs molecule-core#14, molecule-core#20.
2026-05-07 03:08:25 -07:00
bb0c2be99f Merge pull request 'docs(install): migrate git clone URL to git.moleculesai.app (#37)' (#1) from fix/install-path-gitea into main
All checks were successful
CI / validate (push) Successful in 10m57s
2026-05-07 09:24:03 +00:00
documentation-specialist
87032e11cb docs(install): migrate git clone URL to git.moleculesai.app (#37)
Some checks failed
CI / validate (pull_request) Failing after 0s
CI / validate (push) Failing after 0s
Two refs to migrate:
- CLAUDE.md:147 (Setup section)
- runbooks/local-dev-setup.md:19 (Step 1)

Note: this repo is PRIVATE on Gitea. The clone URL uses the canonical
Gitea path; the runbook reader handles auth via SSH key, git
credential helper, or a personal token. Same convention as the rest
of the workspace-template + plugin-* PRs in the #37 series.

Refs: molecule-ai/internal#37, molecule-ai/internal#38
2026-05-07 00:40:47 -07:00
Hongming Wang
a72fe353c7 fix: restore COPY/RUN lines in Dockerfile
Some checks failed
CI / validate (push) Failing after 0s
Previous commit's regex substitution dropped `COPY requirements.txt .`
and the initial `RUN pip install --no-cache-dir -r requirements.txt`
because of a bash-heredoc escape interaction (the \1 backref was
consumed before the python regex saw it, leaving a SOH char). This
restores both lines with the conditional version-pin upgrade after.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 07:50:17 -07:00
Hongming Wang
2ad8f7da00 feat: forward runtime_version + ARG RUNTIME_VERSION (cascade cache trap fix)
Closes the cache trap structurally for this template — same fix
already shipped in claude-code + hermes. publish-image.yml caller
forwards client_payload.runtime_version (set by cascade) to the
molecule-ci reusable workflow as runtime_version input. Reusable
workflow forwards it to docker build as a --build-arg. Dockerfile
declares ARG RUNTIME_VERSION before the pip install layer so cache
key is sensitive to the version. The pip install RUN does an extra
targeted upgrade to guarantee the exact version when ARG is set.

Pairs with molecule-ci PR #12 + molecule-core PR #2181.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 07:48:01 -07:00
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
fa2a589fe2
Merge pull request #9 from Molecule-AI/feat/import-cli-executor
feat(template): own cli_executor locally (universal-runtime refactor)
2026-04-27 00:59:23 -07:00
Hongming Wang
bf19d45434 feat(template): own cli_executor locally (universal-runtime refactor)
Mirrors molecule-ai-workspace-template-claude-code's PR #13: move the
adapter-specific executor file out of molecule-runtime into the template
that consumes it (molecule-core task #87 / #122).

Adds:
  - cli_executor.py (465 LOC) — copied verbatim from
    molecule-core/workspace/cli_executor.py @ commit 66b9c040.
  - Dockerfile: COPY cli_executor.py . alongside adapter.py.

The adapter at adapter.py:118 already does
`from cli_executor import CLIAgentExecutor` — once this file lands at
/app/, Python's import order picks the local copy over the same-named
module that older molecule-runtime versions ship under site-packages.

Pure additive at this stage — molecule-runtime still ships the file too,
so any image built from this template just has two copies on disk
(local /app shadows the site-packages one). No behavior change.

Note on the file's RUNTIME_PRESETS dict: it contains entries for
codex / ollama / gemini-cli, but neither codex nor ollama has a
template repo today (verified 2026-04-27 against the
Molecule-AI/molecule-ai-workspace-template-* repo list). They're
unreachable in production. The presets travel with the file here only
because trimming them would diverge from the molecule-core source —
when the molecule-core deletion lands they'll vanish naturally.

Sequencing (the molecule-core PR follows AFTER this image rebuilds):
  1. THIS PR — template gets local copy, image rebuilds with it
     (current PR; safe because no removal yet)
  2. molecule-core PR — drop workspace/cli_executor.py, bump runtime
     PyPI version. Templates that haven't pulled the new runtime
     version still work because their local copy is unchanged.

Reverse order (drop from runtime first) would break any template
image build pulling the latest runtime mid-sequence.

Source: molecule-core/workspace/cli_executor.py @ 66b9c040 (commit
hash pinned for traceability of any future divergence).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 00:57:52 -07:00
Hongming Wang
ae5ab16e20
ci(publish-image): accept repository_dispatch from monorepo runtime publish (#7)
Adds 'repository_dispatch' trigger (event-type: runtime-published) so
molecule-core's publish-runtime.yml cascade job can fire this template's
image rebuild after a new molecule-ai-workspace-runtime PyPI release.

Without this, every runtime release waited for the next push: main /
manual workflow_dispatch to propagate to the published image. With it,
runtime fixes flow monorepo → PyPI → all 8 template images
automatically.

Part of the runtime CD chain. See molecule-core docs/workspace-runtime-package.md.

Co-authored-by: Hongming Wang <hongmingwangalt@gmail.com>
2026-04-26 12:42:52 -07:00
Hongming Wang
41b27aede4
Merge pull request #6 from Molecule-AI/chore/add-gitattributes-lf
chore: enforce LF line endings on .sh/.py/.yaml
2026-04-24 01:03:58 -07:00
rabbitblood
e2457f66f1 chore: enforce LF line endings on .sh/.py/.yaml/Dockerfile
Pin LF on shell, Python, YAML, and Dockerfile so Windows Docker Desktop
checkouts don't introduce CRLF that breaks #!/bin/sh shebangs in the
container — that exact failure mode took down 14 workspaces during
#1933 fix v1 (exec /entrypoint.sh: no such file or directory cascade).

Same pattern as the .gitattributes already in
molecule-ai-workspace-template-claude-code, applied to the other 7
template repos.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 00:36:40 -07:00
Hongming Wang
9e94057c14
Merge pull request #5 from Molecule-AI/ci/add-publish-image-workflow
ci: publish image to GHCR via molecule-ci reusable workflow
2026-04-22 12:12:35 -07:00
Hongming Wang
fceeafcda4 ci: publish image to GHCR on main via molecule-ci reusable workflow
Adds a one-line caller for the publish-template-image.yml reusable
workflow in molecule-ci. On every push to main, this repo's
Dockerfile is now built and pushed to
ghcr.io/molecule-ai/workspace-template-gemini-cli:latest (plus a per-commit
sha tag). Closes the gap where template changes required a manual
tenant-side rebuild.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 12:11:31 -07:00
molecule-ai[bot]
62447fc1d8
fix(config): add models[] array for canvas model dropdown (#4)
Co-authored-by: Molecule AI Plugin-Dev <plugin-dev@agents.moleculesai.app>
2026-04-22 19:00:47 +00:00
molecule-ai[bot]
e0cddb140a
Merge pull request #2 from Molecule-AI/docs/sync-docs-to-main-gemini-cli
docs: add CLAUDE.md, known-issues.md, and runbooks/local-dev-setup.md to main
2026-04-21 11:17:48 +00:00
90bcb3dc64 chore: re-trigger CI 2026-04-21 11:13:40 +00:00
2dbb2c0663 chore: re-trigger CI with molecule-ci fix 2026-04-21 11:11:28 +00:00
a9a2df5bda chore: re-trigger CI after molecule-ci fix 2026-04-21 11:06:58 +00:00
28625e867a ci: add .molecule-ci/scripts/ 2026-04-21 11:01:27 +00:00
65c6a3ae05 docs: add CLAUDE.md, known-issues.md, and runbooks/local-dev-setup.md 2026-04-21 10:55:10 +00:00
Hongming Wang
1833d1c491
Merge pull request #1 from Molecule-AI/chore/credentials-gitignore
chore: gitignore credentials
2026-04-16 09:24:00 -07:00
rabbitblood
ee68cfa197 chore: gitignore credentials for molecule-ai-workspace-template-gemini-cli
Adds standard credential gitignore (.env / *.pem / .secrets/ / .auth_token).
Per-CEO directive 2026-04-16: every plugin and template repo should
gitignore credentials so self-hosters can't accidentally commit real
tokens to public repos.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 09:15:56 -07:00
Hongming Wang
fbb87bfd56 ci: add standard workspace template validation workflow 2026-04-16 04:43:22 -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
Hongming Wang
a06aaca4d3 feat: initial template content (extracted from molecule-monorepo) 2026-04-16 03:05:46 -07:00