diff --git a/manifest.json b/manifest.json index 3e5725d1..ca828781 100644 --- a/manifest.json +++ b/manifest.json @@ -28,9 +28,7 @@ {"name": "claude-code-default", "repo": "molecule-ai/molecule-ai-workspace-template-claude-code", "ref": "main"}, {"name": "hermes", "repo": "molecule-ai/molecule-ai-workspace-template-hermes", "ref": "main"}, {"name": "openclaw", "repo": "molecule-ai/molecule-ai-workspace-template-openclaw", "ref": "main"}, - {"name": "codex", "repo": "molecule-ai/molecule-ai-workspace-template-codex", "ref": "main"}, - {"name": "langgraph", "repo": "molecule-ai/molecule-ai-workspace-template-langgraph", "ref": "main"}, - {"name": "autogen", "repo": "molecule-ai/molecule-ai-workspace-template-autogen", "ref": "main"} + {"name": "codex", "repo": "molecule-ai/molecule-ai-workspace-template-codex", "ref": "main"} ], "org_templates": [ {"name": "molecule-dev", "repo": "molecule-ai/molecule-ai-org-template-molecule-dev", "ref": "main"}, diff --git a/workspace-server/internal/handlers/admin_workspace_images.go b/workspace-server/internal/handlers/admin_workspace_images.go index 256bfbd8..c9598641 100644 --- a/workspace-server/internal/handlers/admin_workspace_images.go +++ b/workspace-server/internal/handlers/admin_workspace_images.go @@ -44,8 +44,7 @@ func NewWorkspaceImageService(docker *dockerclient.Client) *WorkspaceImageServic // AllRuntimes is the canonical list mirroring docs/workspace-runtime-package.md. // Update both when a new template is added. var AllRuntimes = []string{ - "claude-code", "langgraph", "autogen", - "hermes", "openclaw", + "claude-code", "codex", "hermes", "openclaw", } // RefreshResult is the per-call outcome surfaced to HTTP callers AND logged diff --git a/workspace-server/internal/handlers/runtime_registry_test.go b/workspace-server/internal/handlers/runtime_registry_test.go index 78c2c687..0573d8f3 100644 --- a/workspace-server/internal/handlers/runtime_registry_test.go +++ b/workspace-server/internal/handlers/runtime_registry_test.go @@ -22,7 +22,7 @@ func TestLoadRuntimesFromManifest_StripsDefaultSuffix(t *testing.T) { err := os.WriteFile(path, []byte(`{ "workspace_templates": [ {"name": "claude-code-default", "repo": "org/t-cc"}, - {"name": "langgraph", "repo": "org/t-lg"}, + {"name": "codex", "repo": "org/t-codex"}, {"name": "hermes", "repo": "org/t-hermes"} ] }`), 0600) @@ -33,7 +33,7 @@ func TestLoadRuntimesFromManifest_StripsDefaultSuffix(t *testing.T) { if err != nil { t.Fatalf("load: %v", err) } - want := []string{"claude-code", "langgraph", "hermes", "external", "kimi", "kimi-cli"} + want := []string{"claude-code", "codex", "hermes", "external", "kimi", "kimi-cli"} for _, w := range want { if _, ok := got[w]; !ok { t.Errorf("want runtime %q in set, missing. got=%v", w, keys(got)) @@ -53,7 +53,7 @@ func TestLoadRuntimesFromManifest_ExternalAlwaysInjected(t *testing.T) { // in the set, because it's the BYO-compute meta-runtime. dir := t.TempDir() path := filepath.Join(dir, "manifest.json") - _ = os.WriteFile(path, []byte(`{"workspace_templates":[{"name":"langgraph","repo":"org/t"}]}`), 0600) + _ = os.WriteFile(path, []byte(`{"workspace_templates":[{"name":"codex","repo":"org/t"}]}`), 0600) got, err := loadRuntimesFromManifest(path) if err != nil { @@ -97,11 +97,16 @@ func TestRealManifestParses(t *testing.T) { t.Fatalf("real manifest load: %v", err) } // Core runtimes we always expect to ship. - for _, must := range []string{"langgraph", "hermes", "claude-code", "external", "kimi", "kimi-cli"} { + for _, must := range []string{"codex", "hermes", "openclaw", "claude-code", "external", "kimi", "kimi-cli"} { if _, ok := got[must]; !ok { t.Errorf("real manifest missing runtime %q — got=%v", must, keys(got)) } } + for _, removed := range []string{"autogen", "langgraph"} { + if _, ok := got[removed]; ok { + t.Errorf("real manifest should not expose unsupported runtime %q — got=%v", removed, keys(got)) + } + } } func keys(m map[string]struct{}) []string { diff --git a/workspace-server/internal/handlers/templates.go b/workspace-server/internal/handlers/templates.go index c3fedc59..0cf0e225 100644 --- a/workspace-server/internal/handlers/templates.go +++ b/workspace-server/internal/handlers/templates.go @@ -203,6 +203,11 @@ func (h *TemplatesHandler) List(c *gin.Context) { log.Printf("templates list: skip %s: yaml.Unmarshal: %v", id, err) return } + runtime := strings.TrimSuffix(strings.TrimSpace(raw.Runtime), "-default") + if _, ok := knownRuntimes[runtime]; !ok { + log.Printf("templates list: skip %s: unsupported runtime %q", id, raw.Runtime) + return + } // Model comes from either top-level (legacy) or runtime_config.model (current). model := raw.Model