From b2f90415891a2e2d33a8474122fa039b67db9b57 Mon Sep 17 00:00:00 2001 From: Sycun <165354365+Sycun@users.noreply.github.com> Date: Sat, 28 Nov 2026 21:16:53 +0800 Subject: [PATCH] chore(pluginhub): keep only ARTEX in curated built-in catalog --- internal/pluginhub/catalog/catalog.go | 14 -------------- internal/pluginhub/catalog/static-web.yaml | 19 ------------------- internal/pluginhub/catalog_store_test.go | 4 ++-- internal/pluginhub/manager_test.go | 6 +++--- 4 files changed, 5 insertions(+), 38 deletions(-) delete mode 100644 internal/pluginhub/catalog/static-web.yaml diff --git a/internal/pluginhub/catalog/catalog.go b/internal/pluginhub/catalog/catalog.go index 5bec114c..298b9cc7 100644 --- a/internal/pluginhub/catalog/catalog.go +++ b/internal/pluginhub/catalog/catalog.go @@ -3,9 +3,6 @@ package catalog import _ "embed" -//go:embed static-web.yaml -var staticWeb []byte - //go:embed artex.yaml var artex []byte @@ -29,15 +26,6 @@ func Entries() []Entry { Availability: "plan_available", Builtin: true, }, - {ID: "static-web", Title: "Static Web Runtime Check", Repository: "https://github.com/nginx/docker-nginx-unprivileged", - Summary: "Unprivileged static WebUI for lifecycle verification.", Availability: "plan_available", Builtin: true}, - { - ID: "librechat", Title: "LibreChat", Repository: "https://github.com/LibreChat-AI/LibreChat", - Revision: "566e20b613389600a7975fd8f7c1bffbe54f06c8", - Summary: "Self-hosted chat WebUI used for plugin platform interoperability verification.", - Availability: "inspection_only", - Builtin: true, - }, } } @@ -54,8 +42,6 @@ func Manifest(id string) ([]byte, bool) { switch id { case "artex": return append([]byte(nil), artex...), true - case "static-web": - return append([]byte(nil), staticWeb...), true default: return nil, false } diff --git a/internal/pluginhub/catalog/static-web.yaml b/internal/pluginhub/catalog/static-web.yaml deleted file mode 100644 index 9aafa0e8..00000000 --- a/internal/pluginhub/catalog/static-web.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: plugins.csai.io/v1 -kind: WebPlugin -metadata: - id: static-web - title: Static Web Runtime Check - version: "1.0.0" - repository: https://github.com/nginx/docker-nginx-unprivileged -distribution: - - type: container - mode: docker - services: - - name: web - role: web - image: nginxinc/nginx-unprivileged:stable-alpine - containerPort: 8080 - resources: {memoryMiB: 128, pids: 64} -web: {route: root, entryPath: "/", healthPath: "/"} -access: {mode: platform} -permissions: {persistentData: false, modelGateway: false, egress: []} diff --git a/internal/pluginhub/catalog_store_test.go b/internal/pluginhub/catalog_store_test.go index 24126563..15e76035 100644 --- a/internal/pluginhub/catalog_store_test.go +++ b/internal/pluginhub/catalog_store_test.go @@ -33,8 +33,8 @@ func TestCatalogStoreCRUDAndRestore(t *testing.T) { if err != nil { t.Fatal(err) } - if len(initial) < 3 || hidden != 0 { - t.Fatalf("expected >=3 built-ins and 0 hidden, got %d / %d", len(initial), hidden) + if len(initial) != 1 || initial[0].ID != "artex" || hidden != 0 { + t.Fatalf("expected 1 built-in (artex) and 0 hidden, got %+v / %d", initial, hidden) } // Add custom inspection-only entry diff --git a/internal/pluginhub/manager_test.go b/internal/pluginhub/manager_test.go index f8480017..fd309945 100644 --- a/internal/pluginhub/manager_test.go +++ b/internal/pluginhub/manager_test.go @@ -333,13 +333,13 @@ func TestPluginCatalogPlanUsesPlatformLock(t *testing.T) { } m.locker = testLocker{} m.drivers["container"] = &fixtureDriver{} - result, err := m.CreatePlan(context.Background(), PlanRequest{Actor: "tester", CatalogID: "static-web", Isolation: "strict"}) + result, err := m.CreatePlan(context.Background(), PlanRequest{Actor: "tester", CatalogID: "artex", Isolation: "strict"}) if err != nil { t.Fatal(err) } plan, err := manifest.DecodeInstallPlan([]byte(result.Record.PlanJSON)) if err != nil || plan.Platform.OS != "linux" || plan.Artifact.Driver != "container" || - len(plan.Artifact.Services) != 1 || result.HostApproved { + len(plan.Artifact.Services) != 2 || result.HostApproved { t.Fatalf("unexpected catalog execution plan: %+v %v", plan, err) } } @@ -359,7 +359,7 @@ func TestPluginHostConfigOnlyPreservesStaticApprovals(t *testing.T) { } m.locker = testLocker{} m.drivers["container"] = &fixtureDriver{} - result, err := m.CreatePlan(ctx, PlanRequest{Actor: "operator", CatalogID: "static-web", Isolation: "strict"}) + result, err := m.CreatePlan(ctx, PlanRequest{Actor: "operator", CatalogID: "artex", Isolation: "strict"}) if err != nil { t.Fatal(err) }