The Canvas template palette was empty on a fresh clone because
`workspace-configs-templates/`, `org-templates/`, and `plugins/` are
gitignored and nothing populated them. The registry already exists —
`manifest.json` at repo root lists every curated
`workspace-template-*`, `org-template-*`, and `plugin-*` repo, and
`scripts/clone-manifest.sh` clones them — but the step was absent
from the README and setup.sh, so new users never ran it.
### What this commit does
**1. `setup.sh` runs `clone-manifest.sh` automatically** (once).
After starting the Docker network but before booting infra, iterate
`manifest.json` and clone any workspace_templates / org_templates /
plugins that aren't already populated. Idempotent — subsequent
runs skip dirs that have content. Requires `jq`; when jq is missing
the step prints a clear install hint and skips (doesn't fail).
**2. `clone-manifest.sh` is idempotent.** Before running `git clone`,
check whether the target directory already exists and is non-empty —
skip if so. Lets `setup.sh` rerun safely without forcing the operator
to delete already-cloned template repos.
**3. `ListTemplates` logs the reason it skips a template.** The
handler previously swallowed `resolveYAMLIncludes` errors with
`continue`, so a broken template showed up as an empty palette with
no log trail. Now the include-expansion and yaml.Unmarshal failure
paths both emit a descriptive `log.Printf` — the exact message that
made the stale `org-templates/molecule-dev/` snapshot debuggable:
ListTemplates: skipping molecule-dev — !include expansion failed:
!include "core-platform.yaml" at line 25: open .../teams/
core-platform.yaml: no such file or directory
**4. Remove the in-tree `org-templates/molecule-dev/` snapshot** (170
files). Matches the explicit intent of prior commit
`bfec9e53` — "remove org-templates/molecule-dev/ — standalone repo
is source of truth". A later "full staging snapshot" re-added a
partial copy that had `!include` references to 7 role files that
never existed in the snapshot (`core-platform.yaml`,
`controlplane.yaml`, `app-docs.yaml`, `infra.yaml`, `sdk.yaml`,
`release-manager/workspace.yaml`, `integration-tester/workspace.yaml`).
`clone-manifest.sh` repopulates it fresh from
`Molecule-AI/molecule-ai-org-template-molecule-dev`.
.gitignore exception for `molecule-dev/` is dropped accordingly
— the whole `/org-templates/*` tree is now gitignored, symmetric
with `/plugins/` and `/workspace-configs-templates/`.
**5. Doc updates** (README, README.zh-CN, CONTRIBUTING) mention `jq`
as a prerequisite and describe what setup.sh now does.
### Verification
On a fresh-nuked DB with the updated branch:
1. `bash infra/scripts/setup.sh` — cleanly clones 33/33 manifest
repos (20 plugins, 8 workspace_templates, 5 org_templates), then
boots infra. Second run skips all 33 (idempotent).
2. `go run ./cmd/server` — "Applied 41 migrations", :8080 healthy.
3. `curl http://localhost:8080/org/templates` returns 4 templates
(was `[]`):
- Free Beats All
- MeDo Smoke Test
- Molecule AI Worker Team (Gemini)
- Reno Stars Agent Team
4. `bash tests/e2e/test_api.sh` — 61/61 pass.
5. `npx vitest run` in canvas — 902/902 pass.
6. `shellcheck infra/scripts/setup.sh` — clean.
### SaaS parity
All changes are local-dev surface. `setup.sh`, `clone-manifest.sh`,
and the local `org-templates/` directory aren't part of the CP
provisioner path — SaaS tenant machines get their templates via
Dockerfile layers or CP-side provisioning, not `clone-manifest.sh`.
The `ListTemplates` log addition is harmless either way (replaces a
silent `continue` with a `log.Printf + continue`).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
133 lines
2.5 KiB
Plaintext
133 lines
2.5 KiB
Plaintext
# Binaries
|
|
workspace-server/server
|
|
workspace-server/molecli
|
|
*.exe
|
|
*.out
|
|
*.bin
|
|
|
|
# Go
|
|
*.test
|
|
|
|
# Dependencies
|
|
node_modules/
|
|
|
|
# Build output
|
|
dist/
|
|
**/.next/
|
|
canvas/tsconfig.tsbuildinfo
|
|
canvas/next-env.d.ts
|
|
mcp-server/dist/
|
|
|
|
# Environment & secrets
|
|
.env
|
|
.env.local
|
|
.env.*.local
|
|
.env.production
|
|
|
|
# OS
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# IDE
|
|
.vscode/
|
|
.idea/
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
|
|
# Python
|
|
__pycache__/
|
|
*.pyc
|
|
*.pyo
|
|
.venv/
|
|
venv/
|
|
*.egg-info/
|
|
.pytest_cache/
|
|
|
|
# Brand monitor runtime state (never commit)
|
|
brand-monitor/.surge_state.json
|
|
brand-monitor/.monitor_state.json
|
|
|
|
# Docker
|
|
*.log
|
|
|
|
# Local docker-compose overrides (per-developer port remaps, etc.)
|
|
docker-compose.override.yml
|
|
docker-compose.override.yaml
|
|
|
|
# Test / coverage
|
|
coverage/
|
|
.coverage
|
|
.coverage.*
|
|
.nyc_output/
|
|
test-results/
|
|
playwright-report/
|
|
|
|
# Databases (local dev)
|
|
*.db
|
|
*.sqlite
|
|
*.sqlite3
|
|
|
|
# Langfuse / ClickHouse / Docker volumes
|
|
langfuse_data/
|
|
clickhouse_data/
|
|
postgres_data/
|
|
redis_data/
|
|
|
|
# Auth tokens
|
|
.auth-token
|
|
|
|
# Awareness memory (local agent memory, not project code)
|
|
.awareness/
|
|
|
|
# Claude Code (local agent config — not shared)
|
|
.claude/
|
|
CLAUDE.md
|
|
.mcp.json
|
|
test-results/
|
|
|
|
# Workspace instance configs (auto-generated by provisioner, not templates)
|
|
workspace-configs-templates/ws-*
|
|
|
|
# Local dev cruft — provisioner writes here at runtime; templates live at repo root
|
|
workspace-server/workspace-configs-templates/
|
|
|
|
# Codex/Gemini agent skill cache (local only, not authoritative)
|
|
.agents/
|
|
|
|
# Workspace runtime markers (written by agent containers, not committed)
|
|
.initial_prompt_done
|
|
|
|
# Exported bundles (may contain env vars / secrets)
|
|
*.bundle.json
|
|
|
|
# Logs
|
|
logs/
|
|
|
|
# Backups
|
|
backups/
|
|
.claude-bridge/
|
|
|
|
# Migration additions
|
|
.initial_prompt_done
|
|
|
|
# GitHub App private key + other local-only secrets — never committed.
|
|
.secrets/
|
|
*.pem
|
|
|
|
# Cloned-via-manifest dirs — populated locally by scripts/clone-manifest.sh,
|
|
# tracked in their own standalone repos. Never commit to core.
|
|
# org-templates live in Molecule-AI/molecule-ai-org-template-* repos.
|
|
# plugins live in Molecule-AI/molecule-ai-plugin-* repos.
|
|
# All three directories are populated by scripts/clone-manifest.sh
|
|
# (now auto-run by infra/scripts/setup.sh). The in-tree exception for
|
|
# molecule-dev was removed because the checked-in copy drifted from
|
|
# the standalone repo and shipped with broken !include references to
|
|
# role files that never existed in the snapshot.
|
|
/org-templates/*
|
|
/plugins/
|
|
/workspace-configs-templates/
|
|
# Cloned by publish-workspace-server-image.yml so the Dockerfile's
|
|
# replace-directive path resolves. Lives in its own repo.
|
|
/molecule-ai-plugin-github-app-auth/
|