chore(pluginhub): keep only ARTEX in curated built-in catalog
This commit is contained in:
parent
8e0694b594
commit
b2f9041589
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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: []}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue