Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
Update k8s.go (#6753)
r33drichardsc43f10243856
diff --git a/libs/fleet/backend/auth/auth.go b/libs/fleet/backend/auth/auth.goindex 1e0ad0502d..666591779c 100644--- a/libs/fleet/backend/auth/auth.go+++ b/libs/fleet/backend/auth/auth.go@@ -21,7 +21,7 @@//// Two conjuncts read something beyond the token. pool_admission.rego reads the// request body; authz_ownership.rego — the namespace-tenancy boundary on-// /api/svc, /api/orch and GET /api/namespaces/{name} — reads a Kubernetes RBAC+// /api/svc and GET /api/namespaces/{name} — reads a Kubernetes RBAC// probe, delivered as input.facts by a FactProvider that handlers registers and// main.go binds. Both are separate leaves rather than rules folded into a// surface, so the expensive read only happens on the requests a cheap siblingdiff --git a/libs/fleet/backend/auth/authz_orch.rego b/libs/fleet/backend/auth/authz_orch.regodeleted file mode 100644index 9928e6ebb2..0000000000--- a/libs/fleet/backend/auth/authz_orch.rego+++ /dev/null@@ -1,31 +0,0 @@-# /api/orch/{namespace}/{service}/{path...} — per-namespace orchestrator-# catalog read.-#-# Like /api/svc, this proxy dials Service DNS directly rather than traversing the-# K8s API, so Capsule cannot scope it. This module authenticates the family and-# shape-checks the parameters; namespace ownership is the third conjunct of-# OrchRoutePolicy, authz_ownership.rego, which reads the impersonated RoleBinding-# probe as input.facts.namespace_rbac.-#-# Per-key clients match neither rule below, so they never reach that conjunct:-# their sub is a service account that owns nothing, and their namespace claim is-# not what this surface is scoped by.-package authz_orch--import data.authz--default allow = false--allow {- input.route == "/api/orch/{namespace}/{service}/{path...}"- authz.is_interactive_client- authz.valid_dns_label(input.params.namespace)- authz.valid_dns_label(input.params.service)-}--allow {- input.route == "/api/orch/{namespace}/{service}/{path...}"- authz.is_user_key_client- authz.valid_dns_label(input.params.namespace)- authz.valid_dns_label(input.params.service)-}diff --git a/libs/fleet/backend/auth/authz_orch_test.rego b/libs/fleet/backend/auth/authz_orch_test.regodeleted file mode 100644index 7a5b3d6df6..0000000000--- a/libs/fleet/backend/auth/authz_orch_test.rego+++ /dev/null@@ -1,46 +0,0 @@-# What /api/orch/{namespace}/{service}/{path...} runs: All(authz_base.allow, authz_orch.allow).-#-# route_allow below is that composition, so every case asserts the verdict the-# route produces rather than one module's half of it. Splitting the policy must-# not turn a test of the whole check into a test of a fragment.-package authz_orch_test--import rego.v1--import data.authz_base-import data.authz_orch--route_allow if {- authz_base.allow- authz_orch.allow-}--test_orch_spa_allowed if {- route_allow with input as {- "route": "/api/orch/{namespace}/{service}/{path...}",- "method": "GET",- "path": "/api/orch/mypool/mypool-orchestrator/status",- "params": {"namespace": "mypool", "service": "mypool-orchestrator", "path": "status"},- "user": {"sub": "user-123", "azp": "cyclops-cs-spa", "namespace": "", "email": "[email protected]"},- }-}--test_orch_cua_cli_allowed if {- route_allow with input as {- "route": "/api/orch/{namespace}/{service}/{path...}",- "method": "GET",- "path": "/api/orch/mypool/mypool-orchestrator/status",- "params": {"namespace": "mypool", "service": "mypool-orchestrator", "path": "status"},- "user": {"sub": "user-123", "azp": "cua-cli", "namespace": "", "email": "[email protected]"},- }-}--test_user_api_key_orch_allowed if {- route_allow with input as {- "route": "/api/orch/{namespace}/{service}/{path...}",- "method": "GET",- "path": "/api/orch/mypool/mypool-orchestrator/status",- "params": {"namespace": "mypool", "service": "mypool-orchestrator", "path": "status"},- "user": {"sub": "user-123", "azp": "ukey-test123abc", "namespace": "", "email": ""},- }-}diff --git a/libs/fleet/backend/auth/authz_ownership.rego b/libs/fleet/backend/auth/authz_ownership.regoindex 0f69846cda..a7c7c7904d 100644--- a/libs/fleet/backend/auth/authz_ownership.rego+++ b/libs/fleet/backend/auth/authz_ownership.rego@@ -43,9 +43,9 @@ default rbac_allow = false# ── Where the boundary applies ──────────────────────────────────────────────#-# These are exactly the call sites requireNamespaceAccess had. The /api/svc and-# /api/orch proxies dial {service}.{namespace}.svc.cluster.local directly, so-# Capsule cannot scope them; /api/namespaces/{name} GET reads one namespace+# These are exactly the remaining call sites requireNamespaceAccess had. The+# /api/svc proxy dials {service}.{namespace}.svc.cluster.local directly, so+# Capsule cannot scope it; /api/namespaces/{name} GET reads one namespace# through the K8s API and wants the same answer without trusting the read.## DELETE on /api/namespaces/{name} is deliberately absent: it never ran this@@ -59,17 +59,13 @@ applies {input.route == "/api/svc/{namespace}/{service}/{path...}"}-applies {- input.route == "/api/orch/{namespace}/{service}/{path...}"-}-applies {input.route == "/api/namespaces/{name}"input.method == "GET"}-# target_namespace is the namespace this request is about: /api/svc and-# /api/orch name it {namespace}, /api/namespaces/{name} names it {name}. Keyed+# target_namespace is the namespace this request is about: /api/svc names it+# {namespace}, /api/namespaces/{name} names it {name}. Keyed# off which parameter the route bound rather than off the route itself, so the# two lists cannot disagree — and mirrored in Go by auth.OwnedNamespace, which# is what the fact provider probes and what TestOwnedNamespaceMatchesRego pinsdiff --git a/libs/fleet/backend/auth/authz_ownership_test.rego b/libs/fleet/backend/auth/authz_ownership_test.regoindex 92f72c9677..2dc6524a7a 100644--- a/libs/fleet/backend/auth/authz_ownership_test.rego+++ b/libs/fleet/backend/auth/authz_ownership_test.rego@@ -114,15 +114,6 @@ test_empty_namespace_is_not_probe_eligible {# ── Where the boundary applies ─────────────────────────────────────────────-test_orch_applies {- probe_eligible with input as {- "route": "/api/orch/{namespace}/{service}/{path...}",- "method": "GET",- "params": {"namespace": "ns-a", "service": "catalog", "path": "items"},- "user": spa_user,- }-}-test_namespace_get_applies_and_reads_the_name_param {probe_eligible with input as {"route": "/api/namespaces/{name}",diff --git a/libs/fleet/backend/auth/middlewares.go b/libs/fleet/backend/auth/middlewares.goindex 6670596aaa..700cd0c6e8 100644--- a/libs/fleet/backend/auth/middlewares.go+++ b/libs/fleet/backend/auth/middlewares.go@@ -69,7 +69,6 @@ var surfacePolicySources = map[string]struct {"authz-github-trust": {"authz_github_trust.rego", authzGitHubTrustPolicy},"authz-user-keys": {"authz_user_keys.rego", authzUserKeysPolicy},"authz-k8s": {"authz_k8s.rego", authzK8sPolicy},- "authz-orch": {"authz_orch.rego", authzOrchPolicy},"authz-svc": {"authz_svc.rego", authzSvcPolicy},"authz-state-query": {"authz_state_query.rego", authzStateQueryPolicy},}@@ -101,9 +100,6 @@ var authzUserKeysPolicy string//go:embed authz_k8s.regovar authzK8sPolicy string-//go:embed authz_orch.rego-var authzOrchPolicy string-//go:embed authz_svc.regovar authzSvcPolicy stringdiff --git a/libs/fleet/backend/auth/policy_characterization_test.go b/libs/fleet/backend/auth/policy_characterization_test.goindex e866a14bd2..ababa10122 100644--- a/libs/fleet/backend/auth/policy_characterization_test.go+++ b/libs/fleet/backend/auth/policy_characterization_test.go@@ -43,7 +43,7 @@ import (// error, the three values the plan can produce.// - Anything downstream of the policy. An "allow" in this table means "the// policy stage let it through", never "the request succeeds". It used to-// mean considerably less than that on /api/svc, /api/orch and GET+// mean considerably less than that on /api/svc and GET// /api/namespaces/{name}, where the namespace-ownership boundary was a Go// check in the handler and invisible here; those routes now carry it as a// policy conjunct, and this table records it.@@ -207,7 +207,7 @@ func characterizationCases() map[string][]routeCase {},}- // /api/svc and /api/orch gate on the DNS-label shape of their parameters,+ // /api/svc gates on the DNS-label shape of its parameters,// on the namespace claim matching the path for per-key and GitHub tokens,// and on the RBAC fact for everyone else. owned-ns / other-ns / unreachable-ns// are the three answers the fact provider gives.@@ -235,20 +235,6 @@ func characterizationCases() map[string][]routeCase {cases["/api/svc/{namespace}/{service}"] = proxyCases(false)cases["/api/svc/{namespace}/{service}/{path...}"] = proxyCases(true)- orchCase := func(name, namespace string) routeCase {- return routeCase{- name: name,- params: map[string]string{"namespace": namespace, "service": "svc-a", "path": "catalog"},- path: "/api/orch/" + namespace + "/svc-a/catalog",- }- }- cases["/api/orch/{namespace}/{service}/{path...}"] = []routeCase{- orchCase("owned-ns", characterizationOwnedNamespace),- orchCase("other-ns", characterizationUnownedNamespace),- orchCase("unreachable-ns", characterizationUnreachableNamespace),- orchCase("invalid-ns", "Not_A_Label"),- }-// /api/k8s carries the richest parameter logic in the policy: the infra-path// list, the admin escape hatch over it, the GitHub namespace grant, and the// pool-admission leaf reading the body.diff --git a/libs/fleet/backend/auth/policy_golden_test.go b/libs/fleet/backend/auth/policy_golden_test.goindex fc41946f2a..29520a87e9 100644--- a/libs/fleet/backend/auth/policy_golden_test.go+++ b/libs/fleet/backend/auth/policy_golden_test.go@@ -47,7 +47,7 @@ import (// whatsoever. Run it with an empty pipeline and it still passes.//// That survived the arrival of the first fact loader, which is worth stating-// rather than assuming. svc, orch and namespaces now carry a leaf that calls a+// rather than assuming. svc and namespaces carry a leaf that calls a// FactProvider — precisely what sinkFactLoaders exists to move — and it moves// nothing, because NamespaceOwnershipPolicy already declares its cheap children// first and the sort is stable. The pass is load-bearing in the sense thatdiff --git a/libs/fleet/backend/auth/policy_routes.go b/libs/fleet/backend/auth/policy_routes.goindex 3155042c1a..d1dc865daf 100644--- a/libs/fleet/backend/auth/policy_routes.go+++ b/libs/fleet/backend/auth/policy_routes.go@@ -147,19 +147,8 @@ func UserKeysRoutePolicy() Node {return All(BasePolicy(), surfaceLeaf("authz-user-keys", "data.authz_user_keys.allow"))}-// OrchRoutePolicy guards the per-namespace orchestrator catalog proxy. This-// proxy dials Service DNS directly, so Capsule cannot scope it — the ownership-// conjunct is the whole tenancy boundary.-func OrchRoutePolicy() Node {- return All(- BasePolicy(),- surfaceLeaf("authz-orch", "data.authz_orch.allow"),- NamespaceOwnershipPolicy(),- )-}-// SvcRoutePolicy guards the generic service proxy, both with and without a-// trailing path. Same direct-dial tenancy boundary as OrchRoutePolicy.+// trailing path. The ownership conjunct is its direct-dial tenancy boundary.func SvcRoutePolicy() Node {return All(BasePolicy(),@@ -258,7 +247,6 @@ var surfacePolicies = map[string]surfacePolicy{"namespaces": {tree: NamespacesRoutePolicy},"github-trust": {tree: GitHubTrustRoutePolicy},"user-keys": {tree: UserKeysRoutePolicy},- "orch": {tree: OrchRoutePolicy},"svc": {tree: SvcRoutePolicy},"state-query": {tree: StateQueryRoutePolicy},"k8s": {@@ -301,8 +289,7 @@ var routeSurfaces = map[string]string{"/api/svc/{namespace}/{service}": "svc","/api/svc/{namespace}/{service}/{path...}": "svc",- "/api/orch/{namespace}/{service}/{path...}": "orch",- "/api/k8s/{path...}": "k8s",+ "/api/k8s/{path...}": "k8s",}// AuthenticatedRoutes returns every route the policy layer covers, sorted.diff --git a/libs/fleet/backend/auth/testdata/orch-route-plan.txt b/libs/fleet/backend/auth/testdata/orch-route-plan.txtdeleted file mode 100644index 3edb95044f..0000000000--- a/libs/fleet/backend/auth/testdata/orch-route-plan.txt+++ /dev/null@@ -1,8 +0,0 @@-All- Leaf query=data.authz_base.allow source=registered:authz-base- Leaf query=data.authz_orch.allow source=multi["registered:authz","registered:authz-orch"]- Any- Leaf query=data.authz_ownership.claim_allow source=multi["registered:authz","registered:authz-ownership"]- All- Leaf query=data.authz_ownership.probe_eligible source=multi["registered:authz","registered:authz-ownership"]- Leaf query=data.authz_ownership.rbac_allow source=multi["registered:authz","registered:authz-ownership"] facts=namespace_rbac@registered-facts:namespace-rbacdiff --git a/libs/fleet/backend/auth/testdata/route-authorization-table.txt b/libs/fleet/backend/auth/testdata/route-authorization-table.txtindex 2970a96e2f..4805c10aa4 100644--- a/libs/fleet/backend/auth/testdata/route-authorization-table.txt+++ b/libs/fleet/backend/auth/testdata/route-authorization-table.txt@@ -2198,226 +2198,6 @@/api/namespaces/{name} | unreachable-name | QUERY | spa = allow/api/namespaces/{name} | unreachable-name | QUERY | user-key = allow/api/namespaces/{name} | unreachable-name | QUERY | user-key-verified = allow-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | admin-spa = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | cua-cli = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | spa = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | user-key = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | DELETE | user-key-verified = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | admin-spa = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | cua-cli = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | spa = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | user-key = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | GET | user-key-verified = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | admin-spa = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | cua-cli = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | spa = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | user-key = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | PATCH | user-key-verified = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | admin-spa = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | cua-cli = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | spa = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | user-key = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | POST | user-key-verified = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | admin-spa = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | cua-cli = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | spa = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | user-key = deny-/api/orch/{namespace}/{service}/{path...} | invalid-ns | QUERY | user-key-verified = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | admin-spa = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | cua-cli = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | spa = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | user-key = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | DELETE | user-key-verified = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | admin-spa = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | cua-cli = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | spa = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | user-key = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | GET | user-key-verified = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | admin-spa = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | cua-cli = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | spa = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | user-key = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | PATCH | user-key-verified = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | admin-spa = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | cua-cli = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | spa = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | user-key = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | POST | user-key-verified = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | admin-spa = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | cua-cli = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | spa = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | user-key = deny-/api/orch/{namespace}/{service}/{path...} | other-ns | QUERY | user-key-verified = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | admin-spa = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | cua-cli = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | spa = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | user-key = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | DELETE | user-key-verified = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | admin-spa = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | cua-cli = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | spa = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | user-key = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | GET | user-key-verified = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | admin-spa = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | cua-cli = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | spa = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | user-key = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | PATCH | user-key-verified = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | admin-spa = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | cua-cli = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | spa = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | user-key = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | POST | user-key-verified = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | admin-spa = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | cua-cli = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | spa = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | user-key = allow-/api/orch/{namespace}/{service}/{path...} | owned-ns | QUERY | user-key-verified = allow-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | admin-spa = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | cua-cli = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | spa = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | user-key = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | DELETE | user-key-verified = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | admin-spa = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | cua-cli = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | spa = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | user-key = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | GET | user-key-verified = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | admin-spa = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | cua-cli = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | spa = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | user-key = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | PATCH | user-key-verified = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | admin-spa = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | cua-cli = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | spa = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | user-key = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | POST | user-key-verified = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | admin-spa = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | cua-cli = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | dcr-client = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | empty-sub = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | github-oidc = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | oauth2-proxy = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | per-key-other-ns = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | per-key-owned-ns = deny-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | spa = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | user-key = error-/api/orch/{namespace}/{service}/{path...} | unreachable-ns | QUERY | user-key-verified = error/api/state/query | plain | DELETE | admin-spa = deny/api/state/query | plain | DELETE | cua-cli = deny/api/state/query | plain | DELETE | dcr-client = denydiff --git a/libs/fleet/backend/docs/docs.go b/libs/fleet/backend/docs/docs.goindex 233d8aea58..f7f7f6c431 100644--- a/libs/fleet/backend/docs/docs.go+++ b/libs/fleet/backend/docs/docs.go@@ -890,75 +890,6 @@ const docTemplate = `{}}},- "/api/orch/{namespace}/{service}/{path}": {- "get": {- "security": [- {- "BearerAuth": []- }- ],- "description": "Resolves \u003cservice\u003e.\u003cnamespace\u003e.svc.cluster.local at request time (in-cluster DNS). The caller must hold RBAC in {namespace} (verified via an impersonated RoleBinding probe); OPA additionally validates that namespace and service look like DNS-1123 labels.",- "tags": [- "passthrough"- ],- "summary": "SPA-authenticated proxy to a per-namespace orchestrator service",- "parameters": [- {- "type": "string",- "description": "Namespace (DNS-1123 label)",- "name": "namespace",- "in": "path",- "required": true- },- {- "type": "string",- "description": "Service name (DNS-1123 label)",- "name": "service",- "in": "path",- "required": true- },- {- "type": "string",- "description": "Upstream path",- "name": "path",- "in": "path",- "required": true- }- ],- "responses": {- "200": {- "description": "Upstream response",- "schema": {- "type": "string"- }- },- "400": {- "description": "Bad Request",- "schema": {- "$ref": "#/definitions/handlers.ErrorResponse"- }- },- "401": {- "description": "Unauthorized",- "schema": {- "$ref": "#/definitions/handlers.ErrorResponse"- }- },- "403": {- "description": "Forbidden",- "schema": {- "$ref": "#/definitions/handlers.ErrorResponse"- }- },- "502": {- "description": "Bad Gateway",- "schema": {- "$ref": "#/definitions/handlers.ErrorResponse"- }- }- }- }- },"/api/svc/{namespace}/{service}/{path}": {"get": {"security": [@@ -1543,7 +1474,7 @@ const docTemplate = `{},"securityDefinitions": {"BearerAuth": {- "description": "Keycloak access token. For /api/keys and /api/{k8s,orch} the token is an interactive user JWT (azp=cyclops-cs-spa or azp=cua-cli).",+ "description": "Keycloak access token. For /api/keys and /api/k8s the token is an interactive user JWT (azp=cyclops-cs-spa or azp=cua-cli).","type": "apiKey","name": "Authorization","in": "header"@@ -1558,7 +1489,7 @@ var SwaggerInfo = &swag.Spec{BasePath: "/",Schemes: []string{},Title: "Cyclops CS Backend API",- Description: "Backend sidecar for the cyclops-cs SPA — Keycloak-authenticated key management, service proxies (k8s / orch / svc), and namespace management. All pool operations use OSGymSandboxClaim CRs (Path B).",+ Description: "Backend sidecar for the cyclops-cs SPA — Keycloak-authenticated key management, service proxies (k8s / svc), and namespace management. All pool operations use OSGymSandboxClaim CRs (Path B).",InfoInstanceName: "swagger",SwaggerTemplate: docTemplate,LeftDelim: "{{",diff --git a/libs/fleet/backend/docs/swagger.json b/libs/fleet/backend/docs/swagger.jsonindex 2a10998170..897286cfd5 100644--- a/libs/fleet/backend/docs/swagger.json+++ b/libs/fleet/backend/docs/swagger.json@@ -1,7 +1,7 @@{"swagger": "2.0","info": {- "description": "Backend sidecar for the cyclops-cs SPA — Keycloak-authenticated key management, service proxies (k8s / orch / svc), and namespace management. All pool operations use OSGymSandboxClaim CRs (Path B).",+ "description": "Backend sidecar for the cyclops-cs SPA — Keycloak-authenticated key management, service proxies (k8s / svc), and namespace management. All pool operations use OSGymSandboxClaim CRs (Path B).","title": "Cyclops CS Backend API","contact": {},"version": "0.1"@@ -883,75 +883,6 @@}}},- "/api/orch/{namespace}/{service}/{path}": {- "get": {- "security": [- {- "BearerAuth": []- }- ],- "description": "Resolves \u003cservice\u003e.\u003cnamespace\u003e.svc.cluster.local at request time (in-cluster DNS). The caller must hold RBAC in {namespace} (verified via an impersonated RoleBinding probe); OPA additionally validates that namespace and service look like DNS-1123 labels.",- "tags": [- "passthrough"- ],- "summary": "SPA-authenticated proxy to a per-namespace orchestrator service",- "parameters": [- {- "type": "string",- "description": "Namespace (DNS-1123 label)",- "name": "namespace",- "in": "path",- "required": true- },- {- "type": "string",- "description": "Service name (DNS-1123 label)",- "name": "service",- "in": "path",- "required": true- },- {- "type": "string",- "description": "Upstream path",- "name": "path",- "in": "path",- "required": true- }- ],- "responses": {- "200": {- "description": "Upstream response",- "schema": {- "type": "string"- }- },- "400": {- "description": "Bad Request",- "schema": {- "$ref": "#/definitions/handlers.ErrorResponse"- }- },- "401": {- "description": "Unauthorized",- "schema": {- "$ref": "#/definitions/handlers.ErrorResponse"- }- },- "403": {- "description": "Forbidden",- "schema": {- "$ref": "#/definitions/handlers.ErrorResponse"- }- },- "502": {- "description": "Bad Gateway",- "schema": {- "$ref": "#/definitions/handlers.ErrorResponse"- }- }- }- }- },"/api/svc/{namespace}/{service}/{path}": {"get": {"security": [@@ -1536,7 +1467,7 @@},"securityDefinitions": {"BearerAuth": {- "description": "Keycloak access token. For /api/keys and /api/{k8s,orch} the token is an interactive user JWT (azp=cyclops-cs-spa or azp=cua-cli).",+ "description": "Keycloak access token. For /api/keys and /api/k8s the token is an interactive user JWT (azp=cyclops-cs-spa or azp=cua-cli).","type": "apiKey","name": "Authorization","in": "header"diff --git a/libs/fleet/backend/docs/swagger.yaml b/libs/fleet/backend/docs/swagger.yamlindex b9420f6e5d..eb9176a538 100644--- a/libs/fleet/backend/docs/swagger.yaml+++ b/libs/fleet/backend/docs/swagger.yaml@@ -249,8 +249,8 @@ definitions:info:contact: {}description: Backend sidecar for the cyclops-cs SPA — Keycloak-authenticated key- management, service proxies (k8s / orch / svc), and namespace management. All- pool operations use OSGymSandboxClaim CRs (Path B).+ management, service proxies (k8s / svc), and namespace management. All pool operations+ use OSGymSandboxClaim CRs (Path B).title: Cyclops CS Backend APIversion: "0.1"paths:@@ -827,54 +827,6 @@ paths:summary: Get a namespace owned by the calling usertags:- namespaces- /api/orch/{namespace}/{service}/{path}:- get:- description: Resolves <service>.<namespace>.svc.cluster.local at request time- (in-cluster DNS). The caller must hold RBAC in {namespace} (verified via an- impersonated RoleBinding probe); OPA additionally validates that namespace- and service look like DNS-1123 labels.- parameters:- - description: Namespace (DNS-1123 label)- in: path- name: namespace- required: true- type: string- - description: Service name (DNS-1123 label)- in: path- name: service- required: true- type: string- - description: Upstream path- in: path- name: path- required: true- type: string- responses:- "200":- description: Upstream response- schema:- type: string- "400":- description: Bad Request- schema:- $ref: '#/definitions/handlers.ErrorResponse'- "401":- description: Unauthorized- schema:- $ref: '#/definitions/handlers.ErrorResponse'- "403":- description: Forbidden- schema:- $ref: '#/definitions/handlers.ErrorResponse'- "502":- description: Bad Gateway- schema:- $ref: '#/definitions/handlers.ErrorResponse'- security:- - BearerAuth: []- summary: SPA-authenticated proxy to a per-namespace orchestrator service- tags:- - passthrough/api/svc/{namespace}/{service}/{path}:get:description: Proxies to {service}.{namespace}.svc.cluster.local:80. Per-key@@ -1015,8 +967,8 @@ paths:- healthsecurityDefinitions:BearerAuth:- description: Keycloak access token. For /api/keys and /api/{k8s,orch} the token- is an interactive user JWT (azp=cyclops-cs-spa or azp=cua-cli).+ description: Keycloak access token. For /api/keys and /api/k8s the token is an+ interactive user JWT (azp=cyclops-cs-spa or azp=cua-cli).in: headername: Authorizationtype: apiKeydiff --git a/libs/fleet/backend/handlers/k8s.go b/libs/fleet/backend/handlers/k8s.goindex cacd00123d..ff646087b2 100644--- a/libs/fleet/backend/handlers/k8s.go+++ b/libs/fleet/backend/handlers/k8s.go@@ -95,69 +95,3 @@ func (h Handlers) K8s(w http.ResponseWriter, r *http.Request) {span.SetAttributes(attribute.Int("http.status_code", rw.statusCode))metrics.RecordUpstreamProxy("k8s", rw.statusCode, time.Since(start))}--// Orch godoc-//-// @Summary SPA-authenticated proxy to a per-namespace orchestrator service-// @Description Resolves <service>.<namespace>.svc.cluster.local at request time (in-cluster DNS). The caller must hold RBAC in {namespace} (verified via an impersonated RoleBinding probe); OPA additionally validates that namespace and service look like DNS-1123 labels.-// @Tags passthrough-// @Param namespace path string true "Namespace (DNS-1123 label)"-// @Param service path string true "Service name (DNS-1123 label)"-// @Param path path string true "Upstream path"-// @Success 200 {string} string "Upstream response"-// @Failure 400 {object} ErrorResponse-// @Failure 401 {object} ErrorResponse-// @Failure 403 {object} ErrorResponse-// @Failure 502 {object} ErrorResponse-// @Security BearerAuth-// @Router /api/orch/{namespace}/{service}/{path} [get]-func (h Handlers) Orch(w http.ResponseWriter, r *http.Request) {- user := currentUser(r)- if user == nil {- writeErr(w, http.StatusUnauthorized, "missing user")- return- }- ns := r.PathValue("namespace")- svc := r.PathValue("service")- if !dnsLabel.MatchString(ns) || !dnsLabel.MatchString(svc) {- writeErr(w, http.StatusBadRequest, "invalid namespace or service")- return- }- // Tenancy boundary: this proxy dials Service DNS directly (never the K8s- // API), so Capsule can't scope it. The boundary is the ownership conjunct- // of OrchRoutePolicy, which has already run by the time this handler is- // reached — see auth/authz_ownership.rego.- upstreamPath := "/" + strings.TrimPrefix(r.PathValue("path"), "/")- host := svc + "." + ns + "." + h.GatewayCfg.ClusterDomain- target := &url.URL{Scheme: h.GatewayCfg.Scheme, Host: host + ":" + h.GatewayCfg.Port}- ctx, span := handlerTracer().Start(r.Context(), "orch.proxy", trace.WithAttributes(- attribute.String("proxy.target", "orch"),- attribute.String("http.route", "/api/orch/{namespace}/{service}/{path...}"),- attribute.String("k8s.namespace", ns),- attribute.String("k8s.service", svc),- attribute.String("http.target_path", upstreamPath),- ))- defer span.End()-- rp := httputil.NewSingleHostReverseProxy(target)- origDirector := rp.Director- rp.Director = func(req *http.Request) {- origDirector(req)- req.URL.Path = upstreamPath- req.URL.RawPath = ""- req.URL.RawQuery = r.URL.RawQuery- req.Host = target.Host- req.Header.Del("Authorization")- }- rw := &statusCapture{ResponseWriter: w}- rp.ErrorHandler = func(rw http.ResponseWriter, _ *http.Request, err error) {- span.RecordError(err)- span.SetStatus(codes.Error, "upstream unavailable")- slog.Warn("orch proxy error", "host", host, "path", upstreamPath, "err", err)- http.Error(rw, "upstream unavailable", http.StatusBadGateway)- }- start := time.Now()- rp.ServeHTTP(rw, r.WithContext(ctx))- span.SetAttributes(attribute.Int("http.status_code", rw.statusCode))- metrics.RecordUpstreamProxy("orch", rw.statusCode, time.Since(start))-}diff --git a/libs/fleet/backend/handlers/ownership_test.go b/libs/fleet/backend/handlers/ownership_test.goindex 0893d5e0de..550b75d849 100644--- a/libs/fleet/backend/handlers/ownership_test.go+++ b/libs/fleet/backend/handlers/ownership_test.go@@ -29,7 +29,7 @@ import (// the same system on a route that serves every noVNC asset.//// The stage is put in front of a stub rather than the real handler on purpose.-// h.Svc and h.Orch dial {service}.{namespace}.svc.cluster.local, which in a test+// h.Svc dials {service}.{namespace}.svc.cluster.local, which in a test// is a DNS timeout; what is under test here is which requests get that far.func testHandlers() Handlers {@@ -62,7 +62,6 @@ func authorizationStage(t *testing.T, route string) (http.Handler, *bool) {const (svcRoute = "/api/svc/{namespace}/{service}/{path...}"- orchRoute = "/api/orch/{namespace}/{service}/{path...}"namespacesRoute = "/api/namespaces/{name}"namespaceList = "/api/namespaces")@@ -468,27 +467,6 @@ func TestSvcRoute_K8sUnavailable_FailsClosedWith502(t *testing.T) {}}-func TestOrchRoute_NonOwnedNamespace_Forbidden(t *testing.T) {- resetOwnershipCache()- fk := newFakeK8s(http.StatusForbidden, `{"kind":"Status"}`)- defer fk.server.Close()- overrideK8sClient(fk.server.Client(), fk.server.URL, "fake-sa-token")-- stage, reached := authorizationStage(t, orchRoute)- r := httptest.NewRequest(http.MethodGet, "/api/orch/other-ns/catalog/items", nil)- r.SetPathValue("namespace", "other-ns")- r.SetPathValue("service", "catalog")- r.SetPathValue("path", "items")- r = withUser(r, spaUser("intruder-uuid"))- w := httptest.NewRecorder()- stage.ServeHTTP(w, r)-- if w.Code != http.StatusForbidden || *reached {- t.Fatalf("status = %d, reached = %v; want 403 and no handler; body = %s",- w.Code, *reached, w.Body.String())- }-}-func TestNamespacesRoute_GetOtherTenant_Forbidden(t *testing.T) {resetOwnershipCache()fk := newFakeK8s(http.StatusForbidden, `{"kind":"Status"}`)diff --git a/libs/fleet/backend/main.go b/libs/fleet/backend/main.goindex e960785e18..b1f4091889 100644--- a/libs/fleet/backend/main.go+++ b/libs/fleet/backend/main.go@@ -11,12 +11,12 @@//// @title Cyclops CS Backend API// @version 0.1-// @description Backend sidecar for the cyclops-cs SPA — Keycloak-authenticated key management, service proxies (k8s / orch / svc), and namespace management. All pool operations use OSGymSandboxClaim CRs (Path B).+// @description Backend sidecar for the cyclops-cs SPA — Keycloak-authenticated key management, service proxies (k8s / svc), and namespace management. All pool operations use OSGymSandboxClaim CRs (Path B).// @BasePath /// @securityDefinitions.apikey BearerAuth// @in header// @name Authorization-// @description Keycloak access token. For /api/keys and /api/{k8s,orch} the token is an interactive user JWT (azp=cyclops-cs-spa or azp=cua-cli).+// @description Keycloak access token. For /api/keys and /api/k8s the token is an interactive user JWT (azp=cyclops-cs-spa or azp=cua-cli).package mainimport (@@ -116,7 +116,7 @@ func onlyLog(route string, h http.HandlerFunc) http.Handler {}func setupRouter(c handlers.Handlers) http.Handler {- // The namespace-ownership conjunct on /api/svc, /api/orch and+ // The namespace-ownership conjunct on /api/svc and// /api/namespaces/{name} asks Kubernetes a question, through a probe that// is a handlers method. auth cannot import handlers, so the policy names// the provider and this is where the name is bound to it. It must happen@@ -159,9 +159,8 @@ func setupRouter(c handlers.Handlers) http.Handler {r.Handle("POST /api/billing/webhook",onlyLog("/api/billing/webhook", c.HandleBillingWebhook))- // Swagger UI + JSON. The SPA points its codegen at /api/swagger/doc.json- // (see cyclops-cs/scripts/codegen.sh). We don't put the doc behind auth- // — the schema is public and the actual endpoints are still gated.+ // Swagger UI + JSON. The schema is public API documentation, while the+ // actual endpoints remain behind their normal authentication boundaries.r.Handle("GET /api/swagger/", onlyLog("/api/swagger/", func(w http.ResponseWriter, r *http.Request) {httpSwagger.Handler(httpSwagger.URL("/api/swagger/doc.json")).ServeHTTP(w, r)}))@@ -211,12 +210,9 @@ func setupRouter(c handlers.Handlers) http.Handler {r.Handle("/api/svc/{namespace}/{service}/{path...}",withAuthenticatedMiddlewares("/api/svc/{namespace}/{service}/{path...}", c.Svc))- // K8s API + per-namespace orchestrator catalog access — replace the- // unauthenticated /k8s-api and /orch-api nginx locations from before.+ // K8s API access replaces the unauthenticated /k8s-api nginx location.r.Handle("/api/k8s/{path...}",withAuthenticatedMiddlewares("/api/k8s/{path...}", c.K8s))- r.Handle("/api/orch/{namespace}/{service}/{path...}",- withAuthenticatedMiddlewares("/api/orch/{namespace}/{service}/{path...}", c.Orch))// Wrap the entire mux in the metrics middleware so every request// (including /healthz and unmatched routes) is recorded. This must bediff --git a/libs/fleet/backend/main_test.go b/libs/fleet/backend/main_test.goindex 3a3563b670..2fb4d424c9 100644--- a/libs/fleet/backend/main_test.go+++ b/libs/fleet/backend/main_test.go@@ -50,6 +50,15 @@ func TestGatewayRoutesAreRemoved(t *testing.T) {}}+func TestOrchRouteIsRemoved(t *testing.T) {+ router := setupRouter(handlers.Handlers{})+ response := httptest.NewRecorder()+ router.ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/api/orch/ns-a/catalog/items", nil))+ if response.Code != http.StatusNotFound {+ t.Fatalf("status = %d, want 404; body = %s", response.Code, response.Body.String())+ }+}+func TestHealthAndReadinessRoutes(t *testing.T) {router := setupRouter(handlers.Handlers{})@@ -81,6 +90,16 @@ func TestSwaggerOmitsGatewayRoute(t *testing.T) {}}+func TestSwaggerOmitsOrchRoute(t *testing.T) {+ data, err := os.ReadFile("docs/swagger.json")+ if err != nil {+ t.Fatal(err)+ }+ if strings.Contains(string(data), `"/api/orch/`) {+ t.Fatal("swagger.json still exposes the removed orch route")+ }+}+func TestSwaggerUsesBillingSetupSessionRoute(t *testing.T) {data, err := os.ReadFile("docs/swagger.json")if err != nil {diff --git a/libs/fleet/backend/metrics/metrics.go b/libs/fleet/backend/metrics/metrics.goindex f081f24d3c..5ef24f9248 100644--- a/libs/fleet/backend/metrics/metrics.go+++ b/libs/fleet/backend/metrics/metrics.go@@ -58,10 +58,10 @@ var (Buckets: []float64{0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5},}, []string{"operation", "status"})- // Upstream proxy SLIs (/api/svc + /api/orch + /api/k8s)+ // Upstream proxy SLIs (/api/svc + /api/k8s)UpstreamProxyRequestsTotal = promauto.NewCounterVec(prometheus.CounterOpts{Name: "cyclops_cs_upstream_proxy_requests_total",- Help: "Total requests proxied to upstream services (svc/orch/k8s).",+ Help: "Total requests proxied to upstream services (svc/k8s).",}, []string{"target", "status_code"})BillingWebhookEventsTotal = promauto.NewCounterVec(prometheus.CounterOpts{@@ -209,7 +209,6 @@ func Middleware(next http.Handler) http.Handler {//// /api/keys/3f2a... → /api/keys/:id// /api/gateway/mypool/reset → /api/gateway/:name/:path-// /api/orch/ns/svc/api/vms → /api/orch/:namespace/:service/:path// /api/k8s/api/v1/pods → /api/k8s/:pathfunc normalizePath(p string) string {switch {@@ -223,8 +222,6 @@ func normalizePath(p string) string {return "/api/gateway/:name/:path"case len(p) > 9 && p[:9] == "/api/svc/":return "/api/svc/:namespace/:service/:path"- case len(p) > 10 && p[:10] == "/api/orch/":- return "/api/orch/:namespace/:service/:path"case len(p) > 9 && p[:9] == "/api/k8s/":return "/api/k8s/:path"default:@@ -245,7 +242,7 @@ func RecordKeycloakRequest(operation string, duration time.Duration, err error)}// RecordUpstreamProxy records a reverse-proxy request to an upstream target.-// target: "gateway", "orch", or "k8s"+// target: "svc" or "k8s"// statusCode: HTTP status code returned from upstream (0 if dial failed)func RecordUpstreamProxy(target string, statusCode int, duration time.Duration) {statusStr := strconv.Itoa(statusCode)diff --git a/libs/fleet/backend/metrics/metrics_test.go b/libs/fleet/backend/metrics/metrics_test.goindex 31b3327e78..9ba75951f3 100644--- a/libs/fleet/backend/metrics/metrics_test.go+++ b/libs/fleet/backend/metrics/metrics_test.go@@ -78,7 +78,6 @@ func TestNormalizePath(t *testing.T) {{"/api/gateway/mypool/vms/list", "/api/gateway/:name/:path"},{"/api/svc/pool-mypool/my-svc/health", "/api/svc/:namespace/:service/:path"},{"/api/svc/pool-mypool/my-svc", "/api/svc/:namespace/:service/:path"},- {"/api/orch/myns/svc/api/vms", "/api/orch/:namespace/:service/:path"},{"/api/k8s/api/v1/pods", "/api/k8s/:path"},{"/api/k8s/apis/apps/v1/deployments", "/api/k8s/:path"},{"/api/swagger/doc.json", "/api/swagger/doc.json"},diff --git a/libs/fleet/backend/route_param_derivation_test.go b/libs/fleet/backend/route_param_derivation_test.goindex a030aa235a..d768725abb 100644--- a/libs/fleet/backend/route_param_derivation_test.go+++ b/libs/fleet/backend/route_param_derivation_test.go@@ -1,11 +1,13 @@package mainimport (+ "context""encoding/json""net/http""net/http/httptest""testing"+ "cyclops-cs-backend/auth""cyclops-cs-backend/handlers")@@ -24,6 +26,14 @@ import (// for the same route, params and principal — a spa token here is the table's// "spa" row.+type allowedNamespaceFacts struct{}++func (allowedNamespaceFacts) CacheKey() string { return auth.NamespaceRBACFactProvider }++func (allowedNamespaceFacts) LoadFacts(context.Context, *http.Request) (auth.FactSet, error) {+ return auth.FactSet{"allowed": true}, nil+}+// isPolicyDenial reports whether a response is the authorization stage's own// 403 rather than a handler's. The two are told apart by message: the policy// stage writes the surface's denied message, and every handler past it writes@@ -103,6 +113,10 @@ func TestSvcRouteVerdictFollowsTheNamespaceParam(t *testing.T) {const svcDeniedMessage = "forbidden"router := setupRouter(handlers.Handlers{})+ auth.RegisterFactProvider(auth.NamespaceRBACFactProvider, allowedNamespaceFacts{})+ t.Cleanup(func() {+ auth.RegisterFactProvider(auth.NamespaceRBACFactProvider, handlers.NamespaceRBACFacts(handlers.Handlers{}))+ })allowed := httptest.NewRecorder()router.ServeHTTP(allowed, authorizedRequest(t, http.MethodGet, "/api/svc/ns-a/svc-a", nil))diff --git a/libs/fleet/js-sdk/LICENSE b/libs/fleet/js-sdk/LICENSEdeleted file mode 100644index 5ca2270404..0000000000--- a/libs/fleet/js-sdk/LICENSE+++ /dev/null@@ -1,21 +0,0 @@-MIT License--Copyright (c) 2026 Cua--Permission is hereby granted, free of charge, to any person obtaining a copy-of this software and associated documentation files (the "Software"), to deal-in the Software without restriction, including without limitation the rights-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell-copies of the Software, and to permit persons to whom the Software is-furnished to do so, subject to the following conditions:--The above copyright notice and this permission notice shall be included in all-copies or substantial portions of the Software.--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE-SOFTWARE.diff --git a/libs/fleet/js-sdk/README.md b/libs/fleet/js-sdk/README.mddeleted file mode 100644index 799291b830..0000000000--- a/libs/fleet/js-sdk/README.md+++ /dev/null@@ -1,93 +0,0 @@-# Cyclops JavaScript client--`@trycua/cyclops` is the OpenAPI-generated JavaScript and TypeScript client for-Cyclops. It supports ESM applications on Node.js 18 and newer, where the Fetch-API is available as `globalThis.fetch`.--```sh-npm install @trycua/cyclops-```--```ts-import { CyclopsClient } from "@trycua/cyclops"--const client = new CyclopsClient({- clientId: process.env.CUA_CLIENT_ID!,- clientSecret: process.env.CUA_CLIENT_SECRET!,-})--const response = await client.keys.keysList()-console.log(response.data.keys)-```--Keep `clientSecret` in server-side environment variables or a secret manager.-Never expose client credentials in browser bundles or client-side code.--This README lives under `cyclops-cs/`, which means documentation-only changes-here still exercise the preview image build workflow for pull requests.--## Node.js and Fetch API support--The generated client uses the standard Fetch API. Node.js 18+ supplies it-through `globalThis.fetch`, so the SDK has no runtime fetch dependency. A clear-error is thrown before a request when fetch is unavailable.--Use the `fetch` option to inject a compatible implementation for older runtimes,-polyfills, test doubles, proxies, tracing, or other custom networking behavior.-The same function handles both OAuth token exchange and generated API requests.--```ts-const client = new CyclopsClient({- clientId: process.env.CUA_CLIENT_ID!,- clientSecret: process.env.CUA_CLIENT_SECRET!,- fetch: customFetch,-})-```--`securityWorker` is not a browser API. It is a callback generated by-`swagger-typescript-api` that adds authentication parameters before secure API-requests. `CyclopsClient` configures that callback to obtain an OAuth2 token and-add the bearer authorization header.--## Agent examples--- [`examples/pi-agent.mjs`](examples/pi-agent.mjs) claims a sandbox and- exposes its computer-server and cua-driver MCP tools to a Pi agent.-- [`examples/claude-agent-sdk.mjs`](examples/claude-agent-sdk.mjs) runs the- same authenticated sandbox and MCP lifecycle with the official Claude Agent- SDK. After building the client and installing the dependencies documented at- the top of the file, run it with `CUA_CLIENT_ID`, `CUA_CLIENT_SECRET`,- `CUA_POOL`, and `ANTHROPIC_API_KEY` set.--## Generate the client--Run these commands from `cyclops-cs/js-sdk`:--```sh-npm ci-npm run generate-npm run generate:check-```--`npm run generate` reads `../backend/docs/swagger.json`, writes-`src/generated/cyclops-cs-backend.ts`, and applies the deterministic runtime-fetch guard. `npm run generate:check` regenerates the file and fails if the-checked-in output differs.--## Generated and handwritten boundary--- `src/generated/cyclops-cs-backend.ts` contains all endpoint methods and DTOs- represented by the checked-in OpenAPI specification.-- `src/token.ts` contains only the OAuth2 client-credentials token provider.-- `src/index.ts` exports the generated API and configures its generated- `securityWorker` callback with the token provider. It does not implement- endpoint methods or DTOs.--The Python examples also perform typed `OSGymSandboxClaim` lifecycle operations-and build service-proxy workflows. Those typed claim resources are not modeled-by the current OpenAPI specification. This package therefore does not expose-handwritten claim, wait, release, service URL, or MCP helpers. The generated-spec currently includes generic `/api/k8s/{path}` and-`/api/svc/{namespace}/{service}/{path}` GET operations only; callers needing a-richer claim/service API must wait for those operations and schemas to be added-to the authoritative specification.diff --git a/libs/fleet/js-sdk/examples/claude-agent-sdk.mjs b/libs/fleet/js-sdk/examples/claude-agent-sdk.mjsdeleted file mode 100644index 54f9063b65..0000000000--- a/libs/fleet/js-sdk/examples/claude-agent-sdk.mjs+++ /dev/null@@ -1,441 +0,0 @@-/**- * Provision a CUA sandbox and operate it with the official Claude Agent SDK.- *- * This example claims a sandbox from an existing pool configured with the- * computer-server and cua-driver services described by CUA_SERVICES. It- * preflights both Streamable HTTP MCP endpoints, discovers their tools, then- * gives only those remote MCP tools to Claude.- *- * From cyclops-cs/js-sdk:- * npm run build- * npm install --no-save --package-lock=false \- * @anthropic-ai/claude-agent-sdk @modelcontextprotocol/sdk- * CUA_CLIENT_ID=ukey-... CUA_CLIENT_SECRET=... CUA_POOL=my-pool \- * ANTHROPIC_API_KEY=... node examples/claude-agent-sdk.mjs- *- * Optional: CUA_BASE_URL, CUA_TOKEN_URL, CUA_CLAIM_NAME, CLAUDE_MODEL,- * CLAUDE_MAX_TURNS, CLAUDE_MAX_BUDGET_USD, CUA_BIND_TIMEOUT_MS, and- * CUA_READY_TIMEOUT_MS.- *- * Use a per-user Cyclops key because Kubernetes claim operations require the- * user's Kubernetes identity. The Claude Agent SDK requires Node.js 18+.- */--import { randomUUID } from "node:crypto"--import { query } from "@anthropic-ai/claude-agent-sdk"-// The MCP SDK calls this class Client; aliasing it makes the session role clear.-import { Client as ClientSession } from "@modelcontextprotocol/sdk/client"-import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"--import { ContentType, CyclopsClient, DEFAULT_BASE_URL } from "../dist/index.js"--const CUA_SERVICES = [- {- name: "computer-server",- service_suffix: "server",- guest_port: 8000,- mcp_path: "/mcp",- health_path: "/status",- },- {- name: "cua-driver",- service_suffix: "mcp",- guest_port: 3000,- mcp_path: "/mcp",- health_path: "/healthz",- },-]--const CLAIM_GROUP = "osgym.cua.ai"-const CLAIM_VERSION = "v1alpha1"-const CLAIM_PLURAL = "osgymsandboxclaims"-const POLL_INTERVAL_MS = 2_000-const DEFAULT_BIND_TIMEOUT_MS = 10 * 60_000-const DEFAULT_READY_TIMEOUT_MS = 5 * 60_000-const DEFAULT_MAX_TURNS = 20-const DEFAULT_MAX_BUDGET_USD = 5-const DEFAULT_TASK =- "Open Firefox and navigate to https://example.com. Take a screenshot and " +- "report the page title. Do not click links, enter data, download files, or " +- "change browser or system settings."--function section(title) {- console.log(`\n=== ${title} ===`)-}--function info(message) {- console.log(` ${message}`)-}--function requiredEnv(name) {- const value = process.env[name]- if (!value) {- throw new Error(`Missing required environment variable: ${name}`)- }- return value-}--function envNumber(name, fallback) {- const raw = process.env[name]- if (!raw) return fallback- const value = Number(raw)- if (!Number.isFinite(value) || value <= 0) {- throw new Error(`${name} must be a positive number`)- }- return value-}--function sleep(milliseconds) {- return new Promise((resolve) => setTimeout(resolve, milliseconds))-}--function trimSlashes(path) {- return path.replace(/^\/+|\/+$/g, "")-}--function claimsPath(pool, claimName) {- const collection = `apis/${CLAIM_GROUP}/${CLAIM_VERSION}/namespaces/${pool}/${CLAIM_PLURAL}`- return claimName ? `${collection}/${claimName}` : collection-}--function serviceName(sandbox, service) {- return `${sandbox}-${service.service_suffix}`-}--function serviceUrl(baseUrl, pool, sandbox, service, path) {- const proxyPath = `/api/svc/${pool}/${serviceName(sandbox, service)}/${trimSlashes(path)}`- return new URL(proxyPath, `${baseUrl.replace(/\/$/, "")}/`).toString()-}--async function describeError(error) {- if (error instanceof Response) {- let body = ""- try {- const parsedError = "error" in error ? error.error : undefined- body = parsedError- ? JSON.stringify(parsedError)- : await error.clone().text()- } catch {- // Status information remains useful when the response body is unavailable.- }- return `${error.status} ${error.statusText}${body ? `: ${body}` : ""}`- }- return error instanceof Error ? error.message : String(error)-}--async function createClaim(client, pool, claimName) {- // The generated GET helper does not model claim creation, but the generated- // client's public request method supports the same authenticated proxy route.- await client.request({- path: `/api/k8s/${claimsPath(pool)}`,- method: "POST",- secure: true,- type: ContentType.Json,- format: "json",- body: {- apiVersion: `${CLAIM_GROUP}/${CLAIM_VERSION}`,- kind: "OSGymSandboxClaim",- metadata: { name: claimName },- spec: {- sandboxTemplateRef: { name: `${pool}-template` },- bindDeadline: 600,- },- },- })-}--async function waitForBoundSandbox(client, pool, claimName, timeoutMs) {- const deadline = Date.now() + timeoutMs- let previousPhase-- while (Date.now() < deadline) {- const response = await client.k8S.getK8S(claimsPath(pool, claimName), {- format: "json",- })- const status = response.data.status ?? {}- const phase = status.phase ?? "Pending"- const sandbox = status.sandbox?.name-- if (phase !== previousPhase) {- info(`claim ${claimName}: ${phase}`)- previousPhase = phase- }- if (phase === "Bound" && sandbox) return sandbox- if (phase === "Failed") {- throw new Error(`Claim ${claimName} failed: ${JSON.stringify(status)}`)- }- await sleep(POLL_INTERVAL_MS)- }-- throw new Error(`Timed out waiting for claim ${claimName} to bind`)-}--async function waitForService(client, pool, sandbox, service, timeoutMs) {- const deadline = Date.now() + timeoutMs- const name = serviceName(sandbox, service)- const path = trimSlashes(service.health_path)- let lastError = "not ready"-- while (Date.now() < deadline) {- try {- await client.svc.getSvc(pool, name, path, { format: "text" })- info(- `${service.name} ready at ${name} ` +- `(guest port ${service.guest_port})`,- )- return- } catch (error) {- lastError = await describeError(error)- await sleep(POLL_INTERVAL_MS)- }- }-- throw new Error(`${service.name} did not become ready: ${lastError}`)-}--async function releaseClaim(client, pool, claimName) {- await client.request({- path: `/api/k8s/${claimsPath(pool, claimName)}`,- method: "DELETE",- secure: true,- })-}--async function connectMcpServer({- baseUrl,- pool,- sandbox,- service,- authHeaders,-}) {- const url = serviceUrl(baseUrl, pool, sandbox, service, service.mcp_path)- const transport = new StreamableHTTPClientTransport(new URL(url), {- requestInit: { headers: authHeaders },- })- const session = new ClientSession({- name: `cyclops-claude-${service.name}`,- version: "1.0.0",- })-- await session.connect(transport)- const { tools } = await session.listTools()- info(`${service.name}: connected to ${url} (${tools.length} tools)`)-- return { service, session, tools, url }-}--function normalizedServerName(name) {- return name.replace(/[^a-zA-Z0-9_-]/g, "_")-}--function claudeToolName(serverName, toolName) {- return `mcp__${normalizedServerName(serverName)}__${toolName}`-}--function buildClaudeMcpConfig(connections, authHeaders) {- return Object.fromEntries(- connections.map(({ service, tools, url }) => [- service.name,- {- type: "http",- url,- headers: authHeaders,- tools: tools.map((tool) => ({- name: tool.name,- permission_policy: "always_allow",- })),- timeout: 120_000,- alwaysLoad: true,- },- ]),- )-}--function discoveredClaudeTools(connections) {- return connections.flatMap(({ service, tools }) =>- tools.map((tool) => claudeToolName(service.name, tool.name)),- )-}--function logAssistantMessage(message) {- for (const block of message.message.content) {- if (block.type === "text") {- for (const line of block.text.trim().split("\n")) info(`Claude: ${line}`)- } else if (block.type === "tool_use") {- info(`Claude calling ${block.name}`)- }- }-}--async function main() {- const pool = requiredEnv("CUA_POOL")- const baseUrl = process.env.CUA_BASE_URL ?? DEFAULT_BASE_URL- const claimName =- process.env.CUA_CLAIM_NAME ?? `claude-agent-${randomUUID().slice(0, 8)}`- const bindTimeoutMs = envNumber(- "CUA_BIND_TIMEOUT_MS",- DEFAULT_BIND_TIMEOUT_MS,- )- const readyTimeoutMs = envNumber(- "CUA_READY_TIMEOUT_MS",- DEFAULT_READY_TIMEOUT_MS,- )- const maxTurns = envNumber("CLAUDE_MAX_TURNS", DEFAULT_MAX_TURNS)- const maxBudgetUsd = envNumber(- "CLAUDE_MAX_BUDGET_USD",- DEFAULT_MAX_BUDGET_USD,- )- const task = process.argv.slice(2).join(" ") || DEFAULT_TASK-- requiredEnv("ANTHROPIC_API_KEY")-- let client- let claimCreated = false- let claudeQuery- const mcpConnections = []-- try {- section("1. CUA Authentication")- client = await CyclopsClient.fromKey({- clientId: requiredEnv("CUA_CLIENT_ID"),- clientSecret: requiredEnv("CUA_CLIENT_SECRET"),- baseUrl,- tokenUrl: process.env.CUA_TOKEN_URL,- })- info("authenticated with Cyclops client credentials")-- section("2. Provision a CUA Sandbox")- info(`pool: ${pool}`)- for (const service of CUA_SERVICES) {- info(- `${service.name}: ${service.service_suffix} -> guest port ` +- `${service.guest_port}, MCP ${service.mcp_path}`,- )- }- await createClaim(client, pool, claimName)- claimCreated = true- info(`claim created: ${claimName}`)- const sandbox = await waitForBoundSandbox(- client,- pool,- claimName,- bindTimeoutMs,- )- info(`sandbox bound: ${sandbox}`)-- for (const service of CUA_SERVICES) {- await waitForService(client, pool, sandbox, service, readyTimeoutMs)- }-- const authHeaders = {- Authorization: `Bearer ${await client.tokenProvider.getToken()}`,- }-- section("3. Connect and Discover MCP Tools")- for (const service of CUA_SERVICES) {- mcpConnections.push(- await connectMcpServer({- baseUrl,- pool,- sandbox,- service,- authHeaders,- }),- )- }-- const mcpServers = buildClaudeMcpConfig(mcpConnections, authHeaders)- const allowedTools = discoveredClaudeTools(mcpConnections)- info(`discovered ${allowedTools.length} Claude MCP tools`)- for (const tool of allowedTools) info(tool)-- section("4. Run the Claude Agent Task")- info(`task: ${task}`)-- claudeQuery = query({- prompt: task,- options: {- allowedTools,- tools: [],- mcpServers,- strictMcpConfig: true,- settingSources: [],- persistSession: false,- maxTurns,- maxBudgetUsd,- model: process.env.CLAUDE_MODEL,- systemPrompt:- "You operate one CUA desktop through two remote MCP servers: " +- "computer-server and cua-driver. Use only the provided MCP tools. " +- "Inspect the desktop before acting, take one action at a time, and " +- "verify each result. Do not enter credentials, submit forms, make " +- "purchases, download files, or change system settings unless the " +- "user explicitly asks.",- stderr: (data) => console.error(`[claude-agent-sdk] ${data.trimEnd()}`),- },- })-- let finalResult- for await (const message of claudeQuery) {- if (message.type === "assistant") {- logAssistantMessage(message)- } else if (message.type === "result") {- if (message.subtype === "success") {- finalResult = message.result- info(- `completed in ${message.num_turns} turns ` +- `($${message.total_cost_usd.toFixed(4)})`,- )- } else {- throw new Error(- `Claude Agent SDK stopped with ${message.subtype}: ` +- `${message.errors.join("; ")}`,- )- }- }- }-- if (!finalResult) {- throw new Error("Claude Agent SDK completed without a result message")- }- console.log(`\nAgent result:\n${finalResult}`)- } finally {- section("5. Cleanup")-- if (claudeQuery) {- claudeQuery.close()- info("Claude Agent SDK query closed")- }-- for (const connection of mcpConnections.reverse()) {- try {- await connection.session.close()- info(`${connection.service.name} MCP preflight session closed`)- } catch (error) {- info(- `${connection.service.name} MCP cleanup failed: ` +- `${await describeError(error)}`,- )- }- }-- if (client && claimCreated) {- try {- await releaseClaim(client, pool, claimName)- info(`claim released: ${claimName}`)- } catch (error) {- info(`claim cleanup failed: ${await describeError(error)}`)- }- }- }-}--try {- await main()-} catch (error) {- console.error(- `\nclaude-agent-sdk example failed: ${await describeError(error)}`,- )- process.exitCode = 1-}diff --git a/libs/fleet/js-sdk/examples/pi-agent.mjs b/libs/fleet/js-sdk/examples/pi-agent.mjsdeleted file mode 100644index 25457340b4..0000000000--- a/libs/fleet/js-sdk/examples/pi-agent.mjs+++ /dev/null@@ -1,470 +0,0 @@-/**- * Provision a CUA sandbox and let a Pi agent operate it through both MCP servers.- *- * This example claims a sandbox from an existing pool configured with the- * computer-server and cua-driver services described by CUA_SERVICES.- *- * From cyclops-cs/js-sdk:- * npm run build- * npm install --no-save --package-lock=false \- * @earendil-works/pi-coding-agent @modelcontextprotocol/sdk typebox- * CUA_CLIENT_ID=ukey-... CUA_CLIENT_SECRET=... CUA_POOL=my-pool \- * node examples/pi-agent.mjs- *- * Pi requires Node.js 22.19 or newer and a configured model/API key. Use a- * per-user Cyclops key because Kubernetes pool and claim operations require the- * user's Kubernetes identity.- */--import { randomUUID } from "node:crypto"--import {- createAgentSession,- defineTool,- SessionManager,-} from "@earendil-works/pi-coding-agent"-// The MCP SDK calls this class Client; aliasing it makes the session role clear.-import { Client as ClientSession } from "@modelcontextprotocol/sdk/client"-import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"-import { Type } from "typebox"--import { ContentType, CyclopsClient, DEFAULT_BASE_URL } from "../dist/index.js"--const CUA_SERVICES = [- {- name: "computer-server",- service_suffix: "server",- guest_port: 8000,- mcp_path: "/mcp",- health_path: "/status",- },- {- name: "cua-driver",- service_suffix: "mcp",- guest_port: 3000,- mcp_path: "/mcp",- health_path: "/healthz",- },-]--const CLAIM_GROUP = "osgym.cua.ai"-const CLAIM_VERSION = "v1alpha1"-const CLAIM_PLURAL = "osgymsandboxclaims"-const POLL_INTERVAL_MS = 2_000-const DEFAULT_BIND_TIMEOUT_MS = 10 * 60_000-const DEFAULT_READY_TIMEOUT_MS = 5 * 60_000-const DEFAULT_TASK =- "Open Firefox and navigate to https://news.ycombinator.com. " +- "Take a screenshot, then click on the top story."--function section(title) {- console.log(`\n=== ${title} ===`)-}--function info(message) {- console.log(` ${message}`)-}--function requiredEnv(name) {- const value = process.env[name]- if (!value) {- throw new Error(`Missing required environment variable: ${name}`)- }- return value-}--function envNumber(name, fallback) {- const raw = process.env[name]- if (!raw) return fallback- const value = Number(raw)- if (!Number.isFinite(value) || value <= 0) {- throw new Error(`${name} must be a positive number`)- }- return value-}--function sleep(milliseconds) {- return new Promise((resolve) => setTimeout(resolve, milliseconds))-}--function trimSlashes(path) {- return path.replace(/^\/+|\/+$/g, "")-}--function claimsPath(pool, claimName) {- const collection = `apis/${CLAIM_GROUP}/${CLAIM_VERSION}/namespaces/${pool}/${CLAIM_PLURAL}`- return claimName ? `${collection}/${claimName}` : collection-}--function serviceName(sandbox, service) {- return `${sandbox}-${service.service_suffix}`-}--function serviceUrl(baseUrl, pool, sandbox, service, path) {- const proxyPath = `/api/svc/${pool}/${serviceName(sandbox, service)}/${trimSlashes(path)}`- return new URL(proxyPath, `${baseUrl.replace(/\/$/, "")}/`).toString()-}--async function describeError(error) {- if (error instanceof Response) {- let body = ""- try {- body = error.error- ? JSON.stringify(error.error)- : await error.clone().text()- } catch {- // Status information remains useful when the response body is unavailable.- }- return `${error.status} ${error.statusText}${body ? `: ${body}` : ""}`- }- return error instanceof Error ? error.message : String(error)-}--async function createClaim(client, pool, claimName) {- await client.request({- path: `/api/k8s/${claimsPath(pool)}`,- method: "POST",- secure: true,- type: ContentType.Json,- format: "json",- body: {- apiVersion: `${CLAIM_GROUP}/${CLAIM_VERSION}`,- kind: "OSGymSandboxClaim",- metadata: { name: claimName },- spec: {- sandboxTemplateRef: { name: `${pool}-template` },- bindDeadline: 600,- },- },- })-}--async function waitForBoundSandbox(client, pool, claimName, timeoutMs) {- const deadline = Date.now() + timeoutMs- let previousPhase-- while (Date.now() < deadline) {- const response = await client.k8S.getK8S(claimsPath(pool, claimName), {- format: "json",- })- const status = response.data.status ?? {}- const phase = status.phase ?? "Pending"- const sandbox = status.sandbox?.name-- if (phase !== previousPhase) {- info(`claim ${claimName}: ${phase}`)- previousPhase = phase- }- if (phase === "Bound" && sandbox) return sandbox- if (phase === "Failed") {- throw new Error(`Claim ${claimName} failed: ${JSON.stringify(status)}`)- }- await sleep(POLL_INTERVAL_MS)- }-- throw new Error(`Timed out waiting for claim ${claimName} to bind`)-}--async function waitForService(client, pool, sandbox, service, timeoutMs) {- const deadline = Date.now() + timeoutMs- const name = serviceName(sandbox, service)- const path = trimSlashes(service.health_path)- let lastError = "not ready"-- while (Date.now() < deadline) {- try {- await client.svc.getSvc(pool, name, path, { format: "text" })- info(- `${service.name} ready at ${name} ` +- `(guest port ${service.guest_port})`,- )- return- } catch (error) {- lastError = await describeError(error)- await sleep(POLL_INTERVAL_MS)- }- }-- throw new Error(`${service.name} did not become ready: ${lastError}`)-}--async function releaseClaim(client, pool, claimName) {- await client.request({- path: `/api/k8s/${claimsPath(pool, claimName)}`,- method: "DELETE",- secure: true,- })-}--async function connectMcpServer({- baseUrl,- pool,- sandbox,- service,- authHeaders,-}) {- const url = serviceUrl(baseUrl, pool, sandbox, service, service.mcp_path)- const transport = new StreamableHTTPClientTransport(new URL(url), {- requestInit: { headers: authHeaders },- })- const session = new ClientSession({- name: `cyclops-pi-${service.name}`,- version: "1.0.0",- })-- await session.connect(transport)- const { tools } = await session.listTools()- info(`${service.name}: connected to ${url} (${tools.length} tools)`)-- return { service, session, tools }-}--function safeToolName(name) {- return name.replace(/[^a-zA-Z0-9_-]/g, "_")-}--function toPiContent(content = []) {- return content.map((item) => {- if (item.type === "text") {- return { type: "text", text: item.text }- }- if (item.type === "image") {- return { type: "image", data: item.data, mimeType: item.mimeType }- }- return { type: "text", text: JSON.stringify(item) }- })-}--function registerPiTools(connections) {- const names = new Set()-- return connections.flatMap(({ service, session, tools }) =>- tools.map((tool) => {- const name = `${safeToolName(service.name)}__${safeToolName(tool.name)}`- if (names.has(name)) throw new Error(`Duplicate Pi tool name: ${name}`)- names.add(name)-- return defineTool({- name,- label: `${service.name}: ${tool.name}`,- description:- tool.description ??- `${tool.name} from the ${service.name} MCP server`,- parameters: Type.Unsafe(- tool.inputSchema ?? { type: "object", properties: {} },- ),- execute: async (_toolCallId, parameters, signal) => {- try {- const result = await session.callTool(- { name: tool.name, arguments: parameters },- undefined,- signal ? { signal } : undefined,- )- return {- content: toPiContent(result.content),- details: {- server: service.name,- tool: tool.name,- structuredContent: result.structuredContent,- },- isError: result.isError === true,- }- } catch (error) {- return {- content: [- {- type: "text",- text:- `${service.name}/${tool.name} failed: ` +- `${await describeError(error)}`,- },- ],- details: { server: service.name, tool: tool.name },- isError: true,- }- }- },- })- }),- )-}--async function takeInitialScreenshot(connections) {- const computerServer = connections.find(- ({ service }) => service.name === "computer-server",- )- const screenshotTool = computerServer?.tools.find(- (tool) => tool.name === "screenshot",- )- if (!computerServer || !screenshotTool) {- throw new Error("computer-server did not advertise a screenshot tool")- }-- const result = await computerServer.session.callTool({- name: screenshotTool.name,- arguments: {},- })- if (result.isError) {- throw new Error(- `Initial screenshot failed: ${JSON.stringify(result.content)}`,- )- }-- const images = toPiContent(result.content).filter(- (item) => item.type === "image",- )- info(`initial screenshot captured (${images.length} image attachment)`)- return images-}--function finalAssistantText(session) {- const message = session.state.messages.findLast(- (candidate) => candidate.role === "assistant",- )- return (- message?.content- .filter((part) => part.type === "text")- .map((part) => part.text)- .join("") ?? ""- )-}--async function main() {- const pool = requiredEnv("CUA_POOL")- const baseUrl = process.env.CUA_BASE_URL ?? DEFAULT_BASE_URL- const claimName =- process.env.CUA_CLAIM_NAME ?? `pi-agent-${randomUUID().slice(0, 8)}`- const bindTimeoutMs = envNumber(- "CUA_BIND_TIMEOUT_MS",- DEFAULT_BIND_TIMEOUT_MS,- )- const readyTimeoutMs = envNumber(- "CUA_READY_TIMEOUT_MS",- DEFAULT_READY_TIMEOUT_MS,- )- const task = process.argv.slice(2).join(" ") || DEFAULT_TASK-- let client- let claimCreated = false- let piSession- const mcpConnections = []-- try {- section("1. CUA Authentication")- client = await CyclopsClient.fromKey({- clientId: requiredEnv("CUA_CLIENT_ID"),- clientSecret: requiredEnv("CUA_CLIENT_SECRET"),- baseUrl,- tokenUrl: process.env.CUA_TOKEN_URL,- })- info("authenticated with Cyclops client credentials")-- section("2. Provision a CUA Sandbox")- info(`pool: ${pool}`)- for (const service of CUA_SERVICES) {- info(- `${service.name}: ${service.service_suffix} -> guest port ` +- `${service.guest_port}, MCP ${service.mcp_path}`,- )- }- await createClaim(client, pool, claimName)- claimCreated = true- info(`claim created: ${claimName}`)- const sandbox = await waitForBoundSandbox(- client,- pool,- claimName,- bindTimeoutMs,- )- info(`sandbox bound: ${sandbox}`)-- for (const service of CUA_SERVICES) {- await waitForService(client, pool, sandbox, service, readyTimeoutMs)- }-- const authHeaders = {- Authorization: `Bearer ${await client.tokenProvider.getToken()}`,- }-- section("3. Connect to MCP Servers")- for (const service of CUA_SERVICES) {- mcpConnections.push(- await connectMcpServer({- baseUrl,- pool,- sandbox,- service,- authHeaders,- }),- )- }-- section("4. Register Tools with Pi")- const customTools = registerPiTools(mcpConnections)- info(`registered ${customTools.length} namespaced MCP tools`)- for (const tool of customTools) info(tool.name)-- section("5. Run the Agent Task")- const initialImages = await takeInitialScreenshot(mcpConnections)- info(`task: ${task}`)-- const createdSession = await createAgentSession({- tools: customTools.map((tool) => tool.name),- customTools,- sessionManager: SessionManager.inMemory(),- })- piSession = createdSession.session- piSession.subscribe((event) => {- if (event.type === "tool_execution_start") {- info(`Pi calling ${event.toolName}`)- }- })-- await piSession.prompt(- "You operate one CUA desktop through two MCP servers. Tool names are " +- "namespaced by server (for example computer-server__screenshot and " +- "cua-driver__click). Inspect the screenshot, take one action at a " +- `time, and verify the result after each action.\n\nTask: ${task}`,- { images: initialImages },- )-- const result = finalAssistantText(piSession)- if (!result) throw new Error("Pi completed without a text result")- console.log(`\nAgent result:\n${result}`)- } finally {- section("6. Cleanup")-- if (piSession) {- piSession.dispose()- info("Pi session disposed")- }-- for (const connection of mcpConnections.reverse()) {- try {- await connection.session.close()- info(`${connection.service.name} MCP session closed`)- } catch (error) {- info(- `${connection.service.name} MCP cleanup failed: ` +- `${await describeError(error)}`,- )- }- }-- if (client && claimCreated) {- try {- await releaseClaim(client, pool, claimName)- info(`claim released: ${claimName}`)- } catch (error) {- info(`claim cleanup failed: ${await describeError(error)}`)- }- }- }-}--try {- await main()-} catch (error) {- console.error(`\npi-agent failed: ${await describeError(error)}`)- process.exitCode = 1-}diff --git a/libs/fleet/js-sdk/package-lock.json b/libs/fleet/js-sdk/package-lock.jsondeleted file mode 100644index 0dfd9f58fc..0000000000--- a/libs/fleet/js-sdk/package-lock.json+++ /dev/null@@ -1,854 +0,0 @@-{- "name": "@trycua/cyclops",- "version": "0.1.0",- "lockfileVersion": 3,- "requires": true,- "packages": {- "": {- "name": "@trycua/cyclops",- "version": "0.1.0",- "license": "MIT",- "devDependencies": {- "swagger-typescript-api": "13.2.7",- "typescript": "5.7.2"- },- "engines": {- "node": ">=18.0.0"- }- },- "node_modules/@biomejs/js-api": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/@biomejs/js-api/-/js-api-1.0.0.tgz",- "integrity": "sha512-69OfQ7+09AtiCIg+k+aU3rEsGit5o/SJWCS3BeBH/2nJYdJGi0cIx+ybka8i1EK69aNcZxYO1y1iAAEmYMq1HA==",- "dev": true,- "license": "MIT OR Apache-2.0",- "peerDependencies": {- "@biomejs/wasm-bundler": "^2.0.0",- "@biomejs/wasm-nodejs": "^2.0.0",- "@biomejs/wasm-web": "^2.0.0"- },- "peerDependenciesMeta": {- "@biomejs/wasm-bundler": {- "optional": true- },- "@biomejs/wasm-nodejs": {- "optional": true- },- "@biomejs/wasm-web": {- "optional": true- }- }- },- "node_modules/@biomejs/wasm-nodejs": {- "version": "2.0.5",- "resolved": "https://registry.npmjs.org/@biomejs/wasm-nodejs/-/wasm-nodejs-2.0.5.tgz",- "integrity": "sha512-pihpBMylewgDdGFZHRkgmc3OajuGIJPXhvfYuKCNK/CWyJMrYEFmPKs8Iq1kY0sYMmGlTbD4K2udV03KYa+r0Q==",- "dev": true,- "license": "MIT OR Apache-2.0"- },- "node_modules/@exodus/schemasafe": {- "version": "1.3.0",- "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz",- "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==",- "dev": true,- "license": "MIT"- },- "node_modules/@types/swagger-schema-official": {- "version": "2.0.25",- "resolved": "https://registry.npmjs.org/@types/swagger-schema-official/-/swagger-schema-official-2.0.25.tgz",- "integrity": "sha512-T92Xav+Gf/Ik1uPW581nA+JftmjWPgskw/WBf4TJzxRG/SJ+DfNnNE+WuZ4mrXuzflQMqMkm1LSYjzYW7MB1Cg==",- "dev": true,- "license": "MIT"- },- "node_modules/ansi-regex": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=8"- }- },- "node_modules/ansi-styles": {- "version": "4.3.0",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",- "dev": true,- "license": "MIT",- "dependencies": {- "color-convert": "^2.0.1"- },- "engines": {- "node": ">=8"- },- "funding": {- "url": "https://github.com/chalk/ansi-styles?sponsor=1"- }- },- "node_modules/argparse": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",- "dev": true,- "license": "Python-2.0"- },- "node_modules/c12": {- "version": "3.3.4",- "resolved": "https://registry.npmjs.org/c12/-/c12-3.3.4.tgz",- "integrity": "sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==",- "dev": true,- "license": "MIT",- "dependencies": {- "chokidar": "^5.0.0",- "confbox": "^0.2.4",- "defu": "^6.1.6",- "dotenv": "^17.3.1",- "exsolve": "^1.0.8",- "giget": "^3.2.0",- "jiti": "^2.6.1",- "ohash": "^2.0.11",- "pathe": "^2.0.3",- "perfect-debounce": "^2.1.0",- "pkg-types": "^2.3.0",- "rc9": "^3.0.1"- },- "peerDependencies": {- "magicast": "*"- },- "peerDependenciesMeta": {- "magicast": {- "optional": true- }- }- },- "node_modules/call-me-maybe": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz",- "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==",- "dev": true,- "license": "MIT"- },- "node_modules/chokidar": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz",- "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==",- "dev": true,- "license": "MIT",- "dependencies": {- "readdirp": "^5.0.0"- },- "engines": {- "node": ">= 20.19.0"- },- "funding": {- "url": "https://paulmillr.com/funding/"- }- },- "node_modules/citty": {- "version": "0.1.6",- "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz",- "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "consola": "^3.2.3"- }- },- "node_modules/cliui": {- "version": "8.0.1",- "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",- "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",- "dev": true,- "license": "ISC",- "dependencies": {- "string-width": "^4.2.0",- "strip-ansi": "^6.0.1",- "wrap-ansi": "^7.0.0"- },- "engines": {- "node": ">=12"- }- },- "node_modules/color-convert": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "color-name": "~1.1.4"- },- "engines": {- "node": ">=7.0.0"- }- },- "node_modules/color-name": {- "version": "1.1.4",- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",- "dev": true,- "license": "MIT"- },- "node_modules/confbox": {- "version": "0.2.4",- "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.4.tgz",- "integrity": "sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==",- "dev": true,- "license": "MIT"- },- "node_modules/consola": {- "version": "3.4.2",- "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz",- "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==",- "dev": true,- "license": "MIT",- "engines": {- "node": "^14.18.0 || >=16.10.0"- }- },- "node_modules/defu": {- "version": "6.1.7",- "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz",- "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==",- "dev": true,- "license": "MIT"- },- "node_modules/destr": {- "version": "2.0.5",- "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz",- "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==",- "dev": true,- "license": "MIT"- },- "node_modules/dotenv": {- "version": "17.4.2",- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",- "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==",- "dev": true,- "license": "BSD-2-Clause",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://dotenvx.com"- }- },- "node_modules/emoji-regex": {- "version": "8.0.0",- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",- "dev": true,- "license": "MIT"- },- "node_modules/es6-promise": {- "version": "3.3.1",- "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",- "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==",- "dev": true,- "license": "MIT"- },- "node_modules/escalade": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",- "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=6"- }- },- "node_modules/eta": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/eta/-/eta-2.2.0.tgz",- "integrity": "sha512-UVQ72Rqjy/ZKQalzV5dCCJP80GrmPrMxh6NlNf+erV6ObL0ZFkhCstWRawS85z3smdr3d2wXPsZEY7rDPfGd2g==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=6.0.0"- },- "funding": {- "url": "https://github.com/eta-dev/eta?sponsor=1"- }- },- "node_modules/exsolve": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.1.0.tgz",- "integrity": "sha512-D+42+T12DdIlJM3uepa55qGiL3sYdLBOxIl2ifQCzCHz4c7eiolaHsi3BIqEr7JxBzxv2pYZQX9kw16ziMcEmw==",- "dev": true,- "license": "MIT"- },- "node_modules/fast-safe-stringify": {- "version": "2.1.1",- "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz",- "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==",- "dev": true,- "license": "MIT"- },- "node_modules/get-caller-file": {- "version": "2.0.5",- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",- "dev": true,- "license": "ISC",- "engines": {- "node": "6.* || 8.* || >= 10.*"- }- },- "node_modules/giget": {- "version": "3.3.0",- "resolved": "https://registry.npmjs.org/giget/-/giget-3.3.0.tgz",- "integrity": "sha512-gzi2D96p+AMfDcmJHGDj3KJ9NRiwvlFAU5yfa3ROwWZmFUjX4P43x3BcyRaOMMLto1vUo7C+86+MFhYTl6Ryiw==",- "dev": true,- "license": "MIT",- "bin": {- "giget": "dist/cli.mjs"- }- },- "node_modules/http2-client": {- "version": "1.3.5",- "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz",- "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==",- "dev": true,- "license": "MIT"- },- "node_modules/is-fullwidth-code-point": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=8"- }- },- "node_modules/jiti": {- "version": "2.7.0",- "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz",- "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",- "dev": true,- "license": "MIT",- "bin": {- "jiti": "lib/jiti-cli.mjs"- }- },- "node_modules/js-yaml": {- "version": "4.3.0",- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",- "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",- "dev": true,- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/puzrin"- },- {- "type": "github",- "url": "https://github.com/sponsors/nodeca"- }- ],- "license": "MIT",- "dependencies": {- "argparse": "^2.0.1"- },- "bin": {- "js-yaml": "bin/js-yaml.js"- }- },- "node_modules/lodash": {- "version": "4.18.1",- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",- "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",- "dev": true,- "license": "MIT"- },- "node_modules/nanoid": {- "version": "5.1.16",- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.16.tgz",- "integrity": "sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==",- "dev": true,- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "MIT",- "bin": {- "nanoid": "bin/nanoid.js"- },- "engines": {- "node": "^18 || >=20"- }- },- "node_modules/node-fetch": {- "version": "2.7.0",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",- "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",- "dev": true,- "license": "MIT",- "dependencies": {- "whatwg-url": "^5.0.0"- },- "engines": {- "node": "4.x || >=6.0.0"- },- "peerDependencies": {- "encoding": "^0.1.0"- },- "peerDependenciesMeta": {- "encoding": {- "optional": true- }- }- },- "node_modules/node-fetch-h2": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz",- "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==",- "dev": true,- "license": "MIT",- "dependencies": {- "http2-client": "^1.2.5"- },- "engines": {- "node": "4.x || >=6.0.0"- }- },- "node_modules/node-readfiles": {- "version": "0.2.0",- "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz",- "integrity": "sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==",- "dev": true,- "license": "MIT",- "dependencies": {- "es6-promise": "^3.2.1"- }- },- "node_modules/oas-kit-common": {- "version": "1.0.8",- "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz",- "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==",- "dev": true,- "license": "BSD-3-Clause",- "dependencies": {- "fast-safe-stringify": "^2.0.7"- }- },- "node_modules/oas-linter": {- "version": "3.2.2",- "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.2.tgz",- "integrity": "sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==",- "dev": true,- "license": "BSD-3-Clause",- "dependencies": {- "@exodus/schemasafe": "^1.0.0-rc.2",- "should": "^13.2.1",- "yaml": "^1.10.0"- },- "funding": {- "url": "https://github.com/Mermade/oas-kit?sponsor=1"- }- },- "node_modules/oas-resolver": {- "version": "2.5.6",- "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.6.tgz",- "integrity": "sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==",- "dev": true,- "license": "BSD-3-Clause",- "dependencies": {- "node-fetch-h2": "^2.3.0",- "oas-kit-common": "^1.0.8",- "reftools": "^1.1.9",- "yaml": "^1.10.0",- "yargs": "^17.0.1"- },- "bin": {- "resolve": "resolve.js"- },- "funding": {- "url": "https://github.com/Mermade/oas-kit?sponsor=1"- }- },- "node_modules/oas-schema-walker": {- "version": "1.1.5",- "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz",- "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==",- "dev": true,- "license": "BSD-3-Clause",- "funding": {- "url": "https://github.com/Mermade/oas-kit?sponsor=1"- }- },- "node_modules/oas-validator": {- "version": "5.0.8",- "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-5.0.8.tgz",- "integrity": "sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==",- "dev": true,- "license": "BSD-3-Clause",- "dependencies": {- "call-me-maybe": "^1.0.1",- "oas-kit-common": "^1.0.8",- "oas-linter": "^3.2.2",- "oas-resolver": "^2.5.6",- "oas-schema-walker": "^1.1.5",- "reftools": "^1.1.9",- "should": "^13.2.1",- "yaml": "^1.10.0"- },- "funding": {- "url": "https://github.com/Mermade/oas-kit?sponsor=1"- }- },- "node_modules/ohash": {- "version": "2.0.11",- "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz",- "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==",- "dev": true,- "license": "MIT"- },- "node_modules/pathe": {- "version": "2.0.3",- "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",- "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",- "dev": true,- "license": "MIT"- },- "node_modules/perfect-debounce": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz",- "integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==",- "dev": true,- "license": "MIT"- },- "node_modules/pkg-types": {- "version": "2.3.1",- "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.1.tgz",- "integrity": "sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg==",- "dev": true,- "license": "MIT",- "dependencies": {- "confbox": "^0.2.4",- "exsolve": "^1.0.8",- "pathe": "^2.0.3"- }- },- "node_modules/rc9": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/rc9/-/rc9-3.0.1.tgz",- "integrity": "sha512-gMDyleLWVE+i6Sgtc0QbbY6pEKqYs97NGi6isHQPqYlLemPoO8dxQ3uGi0f4NiP98c+jMW6cG1Kx9dDwfvqARQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "defu": "^6.1.6",- "destr": "^2.0.5"- }- },- "node_modules/readdirp": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz",- "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 20.19.0"- },- "funding": {- "type": "individual",- "url": "https://paulmillr.com/funding/"- }- },- "node_modules/reftools": {- "version": "1.1.9",- "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz",- "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==",- "dev": true,- "license": "BSD-3-Clause",- "funding": {- "url": "https://github.com/Mermade/oas-kit?sponsor=1"- }- },- "node_modules/require-directory": {- "version": "2.1.1",- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",- "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/should": {- "version": "13.2.3",- "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz",- "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "should-equal": "^2.0.0",- "should-format": "^3.0.3",- "should-type": "^1.4.0",- "should-type-adaptors": "^1.0.1",- "should-util": "^1.0.0"- }- },- "node_modules/should-equal": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz",- "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==",- "dev": true,- "license": "MIT",- "dependencies": {- "should-type": "^1.4.0"- }- },- "node_modules/should-format": {- "version": "3.0.3",- "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz",- "integrity": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==",- "dev": true,- "license": "MIT",- "dependencies": {- "should-type": "^1.3.0",- "should-type-adaptors": "^1.0.1"- }- },- "node_modules/should-type": {- "version": "1.4.0",- "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz",- "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==",- "dev": true,- "license": "MIT"- },- "node_modules/should-type-adaptors": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz",- "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==",- "dev": true,- "license": "MIT",- "dependencies": {- "should-type": "^1.3.0",- "should-util": "^1.0.0"- }- },- "node_modules/should-util": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz",- "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==",- "dev": true,- "license": "MIT"- },- "node_modules/string-width": {- "version": "4.2.3",- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",- "dev": true,- "license": "MIT",- "dependencies": {- "emoji-regex": "^8.0.0",- "is-fullwidth-code-point": "^3.0.0",- "strip-ansi": "^6.0.1"- },- "engines": {- "node": ">=8"- }- },- "node_modules/strip-ansi": {- "version": "6.0.1",- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",- "dev": true,- "license": "MIT",- "dependencies": {- "ansi-regex": "^5.0.1"- },- "engines": {- "node": ">=8"- }- },- "node_modules/swagger-schema-official": {- "version": "2.0.0-bab6bed",- "resolved": "https://registry.npmjs.org/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz",- "integrity": "sha512-rCC0NWGKr/IJhtRuPq/t37qvZHI/mH4I4sxflVM+qgVe5Z2uOCivzWaVbuioJaB61kvm5UvB7b49E+oBY0M8jA==",- "dev": true,- "license": "ISC"- },- "node_modules/swagger-typescript-api": {- "version": "13.2.7",- "resolved": "https://registry.npmjs.org/swagger-typescript-api/-/swagger-typescript-api-13.2.7.tgz",- "integrity": "sha512-rfqqoRFpZJPl477M/snMJPM90EvI8WqhuUHSF5ecC2r/w376T29+QXNJFVPsJmbFu5rBc/8m3vhArtMctjONdw==",- "dev": true,- "license": "MIT",- "dependencies": {- "@biomejs/js-api": "1.0.0",- "@biomejs/wasm-nodejs": "2.0.5",- "@types/swagger-schema-official": "^2.0.25",- "c12": "^3.0.4",- "citty": "^0.1.6",- "consola": "^3.4.2",- "eta": "^2.2.0",- "js-yaml": "^4.1.0",- "lodash": "^4.17.21",- "nanoid": "^5.1.5",- "swagger-schema-official": "2.0.0-bab6bed",- "swagger2openapi": "^7.0.8",- "typescript": "~5.8.3"- },- "bin": {- "sta": "dist/cli.js",- "swagger-typescript-api": "dist/cli.js"- },- "engines": {- "node": ">=20"- }- },- "node_modules/swagger-typescript-api/node_modules/typescript": {- "version": "5.8.3",- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",- "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",- "dev": true,- "license": "Apache-2.0",- "bin": {- "tsc": "bin/tsc",- "tsserver": "bin/tsserver"- },- "engines": {- "node": ">=14.17"- }- },- "node_modules/swagger2openapi": {- "version": "7.0.8",- "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz",- "integrity": "sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==",- "dev": true,- "license": "BSD-3-Clause",- "dependencies": {- "call-me-maybe": "^1.0.1",- "node-fetch": "^2.6.1",- "node-fetch-h2": "^2.3.0",- "node-readfiles": "^0.2.0",- "oas-kit-common": "^1.0.8",- "oas-resolver": "^2.5.6",- "oas-schema-walker": "^1.1.5",- "oas-validator": "^5.0.8",- "reftools": "^1.1.9",- "yaml": "^1.10.0",- "yargs": "^17.0.1"- },- "bin": {- "boast": "boast.js",- "oas-validate": "oas-validate.js",- "swagger2openapi": "swagger2openapi.js"- },- "funding": {- "url": "https://github.com/Mermade/oas-kit?sponsor=1"- }- },- "node_modules/tr46": {- "version": "0.0.3",- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",- "dev": true,- "license": "MIT"- },- "node_modules/typescript": {- "version": "5.7.2",- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",- "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",- "dev": true,- "license": "Apache-2.0",- "bin": {- "tsc": "bin/tsc",- "tsserver": "bin/tsserver"- },- "engines": {- "node": ">=14.17"- }- },- "node_modules/webidl-conversions": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",- "dev": true,- "license": "BSD-2-Clause"- },- "node_modules/whatwg-url": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",- "dev": true,- "license": "MIT",- "dependencies": {- "tr46": "~0.0.3",- "webidl-conversions": "^3.0.0"- }- },- "node_modules/wrap-ansi": {- "version": "7.0.0",- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",- "dev": true,- "license": "MIT",- "dependencies": {- "ansi-styles": "^4.0.0",- "string-width": "^4.1.0",- "strip-ansi": "^6.0.0"- },- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"- }- },- "node_modules/y18n": {- "version": "5.0.8",- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",- "dev": true,- "license": "ISC",- "engines": {- "node": ">=10"- }- },- "node_modules/yaml": {- "version": "1.10.3",- "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz",- "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==",- "dev": true,- "license": "ISC",- "engines": {- "node": ">= 6"- }- },- "node_modules/yargs": {- "version": "17.7.3",- "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz",- "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==",- "dev": true,- "license": "MIT",- "dependencies": {- "cliui": "^8.0.1",- "escalade": "^3.1.1",- "get-caller-file": "^2.0.5",- "require-directory": "^2.1.1",- "string-width": "^4.2.3",- "y18n": "^5.0.5",- "yargs-parser": "^21.1.1"- },- "engines": {- "node": ">=12"- }- },- "node_modules/yargs-parser": {- "version": "21.1.1",- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",- "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",- "dev": true,- "license": "ISC",- "engines": {- "node": ">=12"- }- }- }-}diff --git a/libs/fleet/js-sdk/package.json b/libs/fleet/js-sdk/package.jsondeleted file mode 100644index 83728f1f17..0000000000--- a/libs/fleet/js-sdk/package.json+++ /dev/null@@ -1,54 +0,0 @@-{- "name": "@trycua/cyclops",- "version": "0.1.0",- "description": "OpenAPI-generated JavaScript and TypeScript client for Cua Cyclops",- "type": "module",- "main": "./dist/index.js",- "types": "./dist/index.d.ts",- "exports": {- ".": {- "types": "./dist/index.d.ts",- "import": "./dist/index.js"- }- },- "files": [- "dist",- "README.md",- "LICENSE"- ],- "engines": {- "node": ">=18.0.0"- },- "publishConfig": {- "access": "public"- },- "scripts": {- "clean": "rm -rf dist",- "generate": "swagger-typescript-api generate -p ../backend/docs/swagger.json -o ./src/generated -n cyclops-cs-backend.ts --module-name-index 1 --extract-request-body --extract-request-params --extract-response-body --extract-response-error && node ./scripts/patch-generated-client.mjs",- "generate:check": "node ./scripts/check-generated-client.mjs",- "build": "npm run clean && tsc -p tsconfig.json",- "typecheck": "tsc -p tsconfig.json --noEmit",- "test": "npm run build && node --test test/*.test.js test/*.test.mjs",- "prepublishOnly": "npm run generate:check && npm run typecheck && npm test && npm run build"- },- "keywords": [- "cua",- "cyclops",- "openapi",- "sdk"- ],- "license": "MIT",- "repository": {- "type": "git",- "url": "git+https://github.com/trycua/cloud.git",- "directory": "cyclops-cs/js-sdk"- },- "bugs": {- "url": "https://github.com/trycua/cloud/issues"- },- "homepage": "https://github.com/trycua/cloud/tree/main/cyclops-cs/js-sdk#readme",- "devDependencies": {- "swagger-typescript-api": "13.2.7",- "typescript": "5.7.2"- }-}diff --git a/libs/fleet/js-sdk/pnpm-lock.yaml b/libs/fleet/js-sdk/pnpm-lock.yamldeleted file mode 100644index c1c5754a65..0000000000--- a/libs/fleet/js-sdk/pnpm-lock.yaml+++ /dev/null@@ -1,557 +0,0 @@-lockfileVersion: '9.0'--settings:- autoInstallPeers: true- excludeLinksFromLockfile: false--importers:-- .:- devDependencies:- swagger-typescript-api:- specifier: 13.2.7- version: 13.2.7- typescript:- specifier: 5.7.2- version: 5.7.2--packages:-- '@biomejs/[email protected]':- resolution: {integrity: sha512-69OfQ7+09AtiCIg+k+aU3rEsGit5o/SJWCS3BeBH/2nJYdJGi0cIx+ybka8i1EK69aNcZxYO1y1iAAEmYMq1HA==}- peerDependencies:- '@biomejs/wasm-bundler': ^2.0.0- '@biomejs/wasm-nodejs': ^2.0.0- '@biomejs/wasm-web': ^2.0.0- peerDependenciesMeta:- '@biomejs/wasm-bundler':- optional: true- '@biomejs/wasm-nodejs':- optional: true- '@biomejs/wasm-web':- optional: true-- '@biomejs/[email protected]':- resolution: {integrity: sha512-pihpBMylewgDdGFZHRkgmc3OajuGIJPXhvfYuKCNK/CWyJMrYEFmPKs8Iq1kY0sYMmGlTbD4K2udV03KYa+r0Q==}-- '@exodus/[email protected]':- resolution: {integrity: sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==}-- '@types/[email protected]':- resolution: {integrity: sha512-T92Xav+Gf/Ik1uPW581nA+JftmjWPgskw/WBf4TJzxRG/SJ+DfNnNE+WuZ4mrXuzflQMqMkm1LSYjzYW7MB1Cg==}-- resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}- engines: {node: '>=8'}-- resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}- engines: {node: '>=8'}-- resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}-- resolution: {integrity: sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==}- peerDependencies:- magicast: '*'- peerDependenciesMeta:- magicast:- optional: true-- resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==}-- resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==}- engines: {node: '>= 20.19.0'}-- resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==}-- resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}- engines: {node: '>=7.0.0'}-- resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}-- resolution: {integrity: sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==}-- resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==}- engines: {node: ^14.18.0 || >=16.10.0}-- resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==}-- resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==}-- resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}-- resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==}-- resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}- engines: {node: '>=6'}-- resolution: {integrity: sha512-UVQ72Rqjy/ZKQalzV5dCCJP80GrmPrMxh6NlNf+erV6ObL0ZFkhCstWRawS85z3smdr3d2wXPsZEY7rDPfGd2g==}- engines: {node: '>=6.0.0'}-- resolution: {integrity: sha512-D+42+T12DdIlJM3uepa55qGiL3sYdLBOxIl2ifQCzCHz4c7eiolaHsi3BIqEr7JxBzxv2pYZQX9kw16ziMcEmw==}-- resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==}-- resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}- engines: {node: 6.* || 8.* || >= 10.*}-- resolution: {integrity: sha512-gzi2D96p+AMfDcmJHGDj3KJ9NRiwvlFAU5yfa3ROwWZmFUjX4P43x3BcyRaOMMLto1vUo7C+86+MFhYTl6Ryiw==}- hasBin: true-- resolution: {integrity: sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==}-- resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}- engines: {node: '>=8'}-- resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==}- hasBin: true-- resolution: {integrity: sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==}- hasBin: true-- resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==}-- resolution: {integrity: sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==}- engines: {node: ^18 || >=20}- hasBin: true-- resolution: {integrity: sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==}- engines: {node: 4.x || >=6.0.0}-- resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}- engines: {node: 4.x || >=6.0.0}- peerDependencies:- encoding: ^0.1.0- peerDependenciesMeta:- encoding:- optional: true-- resolution: {integrity: sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==}-- resolution: {integrity: sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==}-- resolution: {integrity: sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==}-- resolution: {integrity: sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==}- hasBin: true-- resolution: {integrity: sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==}-- resolution: {integrity: sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==}-- resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==}-- resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}-- resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==}-- resolution: {integrity: sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg==}-- resolution: {integrity: sha512-gMDyleLWVE+i6Sgtc0QbbY6pEKqYs97NGi6isHQPqYlLemPoO8dxQ3uGi0f4NiP98c+jMW6cG1Kx9dDwfvqARQ==}-- resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==}- engines: {node: '>= 20.19.0'}-- resolution: {integrity: sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==}-- resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}- engines: {node: '>=0.10.0'}-- resolution: {integrity: sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==}-- resolution: {integrity: sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==}-- resolution: {integrity: sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==}-- resolution: {integrity: sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==}-- resolution: {integrity: sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==}-- resolution: {integrity: sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==}-- resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}- engines: {node: '>=8'}-- resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}- engines: {node: '>=8'}-- resolution: {integrity: sha512-rCC0NWGKr/IJhtRuPq/t37qvZHI/mH4I4sxflVM+qgVe5Z2uOCivzWaVbuioJaB61kvm5UvB7b49E+oBY0M8jA==}-- resolution: {integrity: sha512-rfqqoRFpZJPl477M/snMJPM90EvI8WqhuUHSF5ecC2r/w376T29+QXNJFVPsJmbFu5rBc/8m3vhArtMctjONdw==}- engines: {node: '>=20'}- hasBin: true-- resolution: {integrity: sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==}- hasBin: true-- resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}-- resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==}- engines: {node: '>=14.17'}- hasBin: true-- resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==}- engines: {node: '>=14.17'}- hasBin: true-- resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}-- resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}-- resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}- engines: {node: '>=10'}-- resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}- engines: {node: '>=10'}-- resolution: {integrity: sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==}- engines: {node: '>= 6'}-- resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==}- engines: {node: '>=12'}--snapshots:-- '@biomejs/[email protected](@biomejs/[email protected])':- optionalDependencies:- '@biomejs/wasm-nodejs': 2.0.5-- '@biomejs/[email protected]': {}-- '@exodus/[email protected]': {}-- '@types/[email protected]': {}-- [email protected]: {}-- dependencies:- color-convert: 2.0.1-- [email protected]: {}-- dependencies:- chokidar: 5.0.0- confbox: 0.2.4- defu: 6.1.7- dotenv: 17.4.2- exsolve: 1.1.0- giget: 3.3.0- jiti: 2.7.0- ohash: 2.0.11- pathe: 2.0.3- perfect-debounce: 2.1.0- pkg-types: 2.3.1- rc9: 3.0.1-- [email protected]: {}-- dependencies:- readdirp: 5.0.0-- dependencies:- consola: 3.4.2-- dependencies:- string-width: 4.2.3- strip-ansi: 6.0.1- wrap-ansi: 7.0.0-- dependencies:- color-name: 1.1.4-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- dependencies:- argparse: 2.0.1-- [email protected]: {}-- [email protected]: {}-- dependencies:- http2-client: 1.3.5-- dependencies:- whatwg-url: 5.0.0-- dependencies:- es6-promise: 3.3.1-- dependencies:- fast-safe-stringify: 2.1.1-- dependencies:- '@exodus/schemasafe': 1.3.0- should: 13.2.3- yaml: 1.10.3-- dependencies:- node-fetch-h2: 2.3.0- oas-kit-common: 1.0.8- reftools: 1.1.9- yaml: 1.10.3- yargs: 17.7.3-- [email protected]: {}-- dependencies:- call-me-maybe: 1.0.2- oas-kit-common: 1.0.8- oas-linter: 3.2.2- oas-resolver: 2.5.6- oas-schema-walker: 1.1.5- reftools: 1.1.9- should: 13.2.3- yaml: 1.10.3-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- dependencies:- confbox: 0.2.4- exsolve: 1.1.0- pathe: 2.0.3-- dependencies:- defu: 6.1.7- destr: 2.0.5-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- dependencies:- should-type: 1.4.0-- dependencies:- should-type: 1.4.0- should-type-adaptors: 1.1.0-- dependencies:- should-type: 1.4.0- should-util: 1.0.1-- [email protected]: {}-- [email protected]: {}-- dependencies:- should-equal: 2.0.0- should-format: 3.0.3- should-type: 1.4.0- should-type-adaptors: 1.1.0- should-util: 1.0.1-- dependencies:- emoji-regex: 8.0.0- is-fullwidth-code-point: 3.0.0- strip-ansi: 6.0.1-- dependencies:- ansi-regex: 5.0.1-- [email protected]: {}-- dependencies:- '@biomejs/js-api': 1.0.0(@biomejs/[email protected])- '@biomejs/wasm-nodejs': 2.0.5- '@types/swagger-schema-official': 2.0.25- c12: 3.3.4- citty: 0.1.6- consola: 3.4.2- eta: 2.2.0- js-yaml: 4.3.0- lodash: 4.18.1- nanoid: 5.1.16- swagger-schema-official: 2.0.0-bab6bed- swagger2openapi: 7.0.8- typescript: 5.8.3- transitivePeerDependencies:- - '@biomejs/wasm-bundler'- - '@biomejs/wasm-web'- - encoding- - magicast-- dependencies:- call-me-maybe: 1.0.2- node-fetch: 2.7.0- node-fetch-h2: 2.3.0- node-readfiles: 0.2.0- oas-kit-common: 1.0.8- oas-resolver: 2.5.6- oas-schema-walker: 1.1.5- oas-validator: 5.0.8- reftools: 1.1.9- yaml: 1.10.3- yargs: 17.7.3- transitivePeerDependencies:- - encoding-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- dependencies:- tr46: 0.0.3- webidl-conversions: 3.0.1-- dependencies:- ansi-styles: 4.3.0- string-width: 4.2.3- strip-ansi: 6.0.1-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- dependencies:- cliui: 8.0.1- escalade: 3.2.0- get-caller-file: 2.0.5- require-directory: 2.1.1- string-width: 4.2.3- y18n: 5.0.8- yargs-parser: 21.1.1diff --git a/libs/fleet/js-sdk/scripts/check-generated-client.mjs b/libs/fleet/js-sdk/scripts/check-generated-client.mjsdeleted file mode 100644index 7f77a6bbe4..0000000000--- a/libs/fleet/js-sdk/scripts/check-generated-client.mjs+++ /dev/null@@ -1,15 +0,0 @@-import { execFileSync } from "node:child_process"-import { readFile, writeFile } from "node:fs/promises"--const generatedClientPath = new URL("../src/generated/cyclops-cs-backend.ts", import.meta.url)-const before = await readFile(generatedClientPath)--try {- execFileSync("npm", ["run", "generate"], { stdio: "inherit" })- const after = await readFile(generatedClientPath)- if (!before.equals(after)) {- throw new Error("Generated client drift detected; run npm run generate and commit the result")- }-} finally {- await writeFile(generatedClientPath, before)-}diff --git a/libs/fleet/js-sdk/scripts/patch-generated-client.mjs b/libs/fleet/js-sdk/scripts/patch-generated-client.mjsdeleted file mode 100644index c038c16f3b..0000000000--- a/libs/fleet/js-sdk/scripts/patch-generated-client.mjs+++ /dev/null@@ -1,32 +0,0 @@-import { readFile, writeFile } from "node:fs/promises"--const generatedClientPath = process.argv[2] ?? new URL("../src/generated/cyclops-cs-backend.ts", import.meta.url)-const original = await readFile(generatedClientPath, "utf8")-const oldImplementation = ` private customFetch = (...fetchParams: Parameters<typeof fetch>) =>- fetch(...fetchParams);`-const newImplementation = ` private customFetch: typeof fetch = (...fetchParams) => {- const runtimeFetch = globalThis.fetch;- if (typeof runtimeFetch !== "function") {- throw new Error(- "Fetch API is unavailable. @trycua/cyclops requires Node.js 18+ or an injected customFetch implementation.",- );- }- return runtimeFetch(...fetchParams);- };`--if (!original.includes(oldImplementation)) {- throw new Error("Generated HttpClient fetch implementation did not match the expected template")-}--const oldBillingSummaryCard = " card?: BillingCardSummary | null;";-const newBillingSummaryCard = " card: BillingCardSummary | null;";--if (!original.includes(oldBillingSummaryCard)) {- throw new Error("Generated BillingSummary card declaration did not match the expected template");-}--const patched = original- .replace(oldImplementation, newImplementation)- .replace(oldBillingSummaryCard, newBillingSummaryCard);--await writeFile(generatedClientPath, patched)diff --git a/libs/fleet/js-sdk/src/generated/cyclops-cs-backend.ts b/libs/fleet/js-sdk/src/generated/cyclops-cs-backend.tsdeleted file mode 100644index db3d838f2d..0000000000--- a/libs/fleet/js-sdk/src/generated/cyclops-cs-backend.ts+++ /dev/null@@ -1,1032 +0,0 @@-/* eslint-disable */-/* tslint:disable */-// @ts-nocheck-/*- * ---------------------------------------------------------------- * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##- * ## ##- * ## AUTHOR: acacode ##- * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##- * ---------------------------------------------------------------- */--export interface BillingCardSummary {- brand?: string;- exp_month?: number;- exp_year?: number;- last4?: string;-}--export interface BillingSummary {- card: BillingCardSummary | null;- payment_method_present: boolean;-}--export interface HandlersBillingSessionResponse {- url?: string;-}--export interface HandlersConfigResponse {- /**- * Admin is true when the caller is in input.flags.admin_subs (OPA-evaluated).- * Non-admins get the customer view: infra-only nav (Nodes, Operator events)- * is hidden in the SPA and the corresponding kubectl-proxy paths are denied- * server-side by authz.rego.- */- admin?: boolean;- billing?: boolean;-}--export interface HandlersCreateKeyRequest {- /** @example "ci-prod" */- name?: string;- /** @example "test-pool" */- namespace?: string;-}--export interface HandlersCreateKeyResponse {- client_id?: string;- client_secret?: string;- name?: string;- namespace?: string;- token_url?: string;-}--export interface HandlersCreateNamespaceRequest {- /** @example "my-workspace" */- name?: string;-}--export interface HandlersCreateUserKeyRequest {- /** @example "my-ci-key" */- name?: string;- /** @example ["[\"ns1\"","\"ns2\"]"] */- scope?: string[];-}--export interface HandlersCreateUserKeyResponse {- client_id?: string;- client_secret?: string;- name?: string;- scope?: string[];- token_url?: string;-}--export interface HandlersErrorResponse {- error?: string;-}--export interface HandlersHealthResponse {- ok?: boolean;-}--export interface HandlersListKeysResponse {- keys?: KeycloakKeyClient[];-}--export interface HandlersListUserKeysResponse {- keys?: HandlersUserKeyResponse[];-}--export interface HandlersNamespaceResponse {- createdAt?: string;- labels?: Record<string, string>;- name?: string;- status?: string;-}--export interface HandlersUserKeyResponse {- client_id?: string;- id?: string;- name?: string;- scope?: string[];-}--export interface KeycloakKeyClient {- client_id?: string;- id?: string;- name?: string;- namespace?: string;- owner_sub?: string;-}--export type BatchLanesCreateError = Record<string, string>;--export type BatchLanesDeleteError = Record<string, string>;--export type BatchSubmitCreateError = Record<string, string>;--export type BatchDeleteError = Record<string, string>;--export type BatchResultsListError = Record<string, string>;--export type BatchStatusListError = Record<string, string>;--export type BillingPortalSessionCreateData = HandlersBillingSessionResponse;--export type BillingPortalSessionCreateError = Record<string, string>;--export type BillingSetupSessionCreateData = HandlersBillingSessionResponse;--export type BillingSetupSessionCreateError = Record<string, string>;--export type BillingSummaryListData = BillingSummary;--export type BillingSummaryListError = Record<string, string>;--export type BillingWebhookCreateData = any;--export type BillingWebhookCreateError = Record<string, string>;--export type ConfigListData = HandlersConfigResponse;--export type ConfigListError = HandlersErrorResponse;--export type GatewayDetailError = HandlersErrorResponse;--export type GetK8SData = string;--export type GetK8SError = HandlersErrorResponse;--export type KeysListData = HandlersListKeysResponse;--export type KeysListError = HandlersErrorResponse;--export type KeysCreateData = HandlersCreateKeyResponse;--export type KeysCreateError = HandlersErrorResponse;--export type KeysDeleteData = any;--export type KeysDeleteError = HandlersErrorResponse;--export type LabelDeleteError = Record<string, string>;--export type LabelBatchCreateError = Record<string, string>;--export type LabelResultsListError = Record<string, string>;--export type LabelStatusListError = Record<string, string>;--export type NamespacesListData = HandlersNamespaceResponse[];--export type NamespacesListError = HandlersErrorResponse;--export type NamespacesCreateData = HandlersNamespaceResponse;--export type NamespacesCreateError = HandlersErrorResponse;--export type NamespacesDeleteData = any;--export type NamespacesDeleteError = HandlersErrorResponse;--export type OrchDetailData = string;--export type OrchDetailError = HandlersErrorResponse;--export type GetSvcData = string;--export type GetSvcError = HandlersErrorResponse;--export type UserKeysListData = HandlersListUserKeysResponse;--export type UserKeysListError = HandlersErrorResponse;--export type UserKeysCreateData = HandlersCreateUserKeyResponse;--export type UserKeysCreateError = HandlersErrorResponse;--export type UserKeysDeleteData = any;--export type UserKeysDeleteError = HandlersErrorResponse;--export type HealthzListData = HandlersHealthResponse;--export type QueryParamsType = Record<string | number, any>;-export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;--export interface FullRequestParams extends Omit<RequestInit, "body"> {- /** set parameter to `true` for call `securityWorker` for this request */- secure?: boolean;- /** request path */- path: string;- /** content type of request body */- type?: ContentType;- /** query params */- query?: QueryParamsType;- /** format of response (i.e. response.json() -> format: "json") */- format?: ResponseFormat;- /** request body */- body?: unknown;- /** base url */- baseUrl?: string;- /** request cancellation token */- cancelToken?: CancelToken;-}--export type RequestParams = Omit<- FullRequestParams,- "body" | "method" | "query" | "path"->;--export interface ApiConfig<SecurityDataType = unknown> {- baseUrl?: string;- baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;- securityWorker?: (- securityData: SecurityDataType | null,- ) => Promise<RequestParams | void> | RequestParams | void;- customFetch?: typeof fetch;-}--export interface HttpResponse<D extends unknown, E extends unknown = unknown>- extends Response {- data: D;- error: E;-}--type CancelToken = Symbol | string | number;--export enum ContentType {- Json = "application/json",- JsonApi = "application/vnd.api+json",- FormData = "multipart/form-data",- UrlEncoded = "application/x-www-form-urlencoded",- Text = "text/plain",-}--export class HttpClient<SecurityDataType = unknown> {- public baseUrl: string = "/";- private securityData: SecurityDataType | null = null;- private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];- private abortControllers = new Map<CancelToken, AbortController>();- private customFetch: typeof fetch = (...fetchParams) => {- const runtimeFetch = globalThis.fetch;- if (typeof runtimeFetch !== "function") {- throw new Error(- "Fetch API is unavailable. @trycua/cyclops requires Node.js 18+ or an injected customFetch implementation.",- );- }- return runtimeFetch(...fetchParams);- };-- private baseApiParams: RequestParams = {- credentials: "same-origin",- headers: {},- redirect: "follow",- referrerPolicy: "no-referrer",- };-- constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {- Object.assign(this, apiConfig);- }-- public setSecurityData = (data: SecurityDataType | null) => {- this.securityData = data;- };-- protected encodeQueryParam(key: string, value: any) {- const encodedKey = encodeURIComponent(key);- return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;- }-- protected addQueryParam(query: QueryParamsType, key: string) {- return this.encodeQueryParam(key, query[key]);- }-- protected addArrayQueryParam(query: QueryParamsType, key: string) {- const value = query[key];- return value.map((v: any) => this.encodeQueryParam(key, v)).join("&");- }-- protected toQueryString(rawQuery?: QueryParamsType): string {- const query = rawQuery || {};- const keys = Object.keys(query).filter(- (key) => "undefined" !== typeof query[key],- );- return keys- .map((key) =>- Array.isArray(query[key])- ? this.addArrayQueryParam(query, key)- : this.addQueryParam(query, key),- )- .join("&");- }-- protected addQueryParams(rawQuery?: QueryParamsType): string {- const queryString = this.toQueryString(rawQuery);- return queryString ? `?${queryString}` : "";- }-- private contentFormatters: Record<ContentType, (input: any) => any> = {- [ContentType.Json]: (input: any) =>- input !== null && (typeof input === "object" || typeof input === "string")- ? JSON.stringify(input)- : input,- [ContentType.JsonApi]: (input: any) =>- input !== null && (typeof input === "object" || typeof input === "string")- ? JSON.stringify(input)- : input,- [ContentType.Text]: (input: any) =>- input !== null && typeof input !== "string"- ? JSON.stringify(input)- : input,- [ContentType.FormData]: (input: any) =>- Object.keys(input || {}).reduce((formData, key) => {- const property = input[key];- formData.append(- key,- property instanceof Blob- ? property- : typeof property === "object" && property !== null- ? JSON.stringify(property)- : `${property}`,- );- return formData;- }, new FormData()),- [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),- };-- protected mergeRequestParams(- params1: RequestParams,- params2?: RequestParams,- ): RequestParams {- return {- ...this.baseApiParams,- ...params1,- ...(params2 || {}),- headers: {- ...(this.baseApiParams.headers || {}),- ...(params1.headers || {}),- ...((params2 && params2.headers) || {}),- },- };- }-- protected createAbortSignal = (- cancelToken: CancelToken,- ): AbortSignal | undefined => {- if (this.abortControllers.has(cancelToken)) {- const abortController = this.abortControllers.get(cancelToken);- if (abortController) {- return abortController.signal;- }- return void 0;- }-- const abortController = new AbortController();- this.abortControllers.set(cancelToken, abortController);- return abortController.signal;- };-- public abortRequest = (cancelToken: CancelToken) => {- const abortController = this.abortControllers.get(cancelToken);-- if (abortController) {- abortController.abort();- this.abortControllers.delete(cancelToken);- }- };-- public request = async <T = any, E = any>({- body,- secure,- path,- type,- query,- format,- baseUrl,- cancelToken,- ...params- }: FullRequestParams): Promise<HttpResponse<T, E>> => {- const secureParams =- ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&- this.securityWorker &&- (await this.securityWorker(this.securityData))) ||- {};- const requestParams = this.mergeRequestParams(params, secureParams);- const queryString = query && this.toQueryString(query);- const payloadFormatter = this.contentFormatters[type || ContentType.Json];- const responseFormat = format || requestParams.format;-- return this.customFetch(- `${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,- {- ...requestParams,- headers: {- ...(requestParams.headers || {}),- ...(type && type !== ContentType.FormData- ? { "Content-Type": type }- : {}),- },- signal:- (cancelToken- ? this.createAbortSignal(cancelToken)- : requestParams.signal) || null,- body:- typeof body === "undefined" || body === null- ? null- : payloadFormatter(body),- },- ).then(async (response) => {- const r = response.clone() as HttpResponse<T, E>;- r.data = null as unknown as T;- r.error = null as unknown as E;-- const data = !responseFormat- ? r- : await response[responseFormat]()- .then((data) => {- if (r.ok) {- r.data = data;- } else {- r.error = data;- }- return r;- })- .catch((e) => {- r.error = e;- return r;- });-- if (cancelToken) {- this.abortControllers.delete(cancelToken);- }-- if (!response.ok) throw data;- return data;- });- };-}--/**- * @title Cyclops CS Backend API- * @version 0.1- * @baseUrl /- * @contact- *- * Backend sidecar for the cyclops-cs SPA — Keycloak-authenticated key management, service proxies (k8s / orch / svc), namespace management, and deprecated gateway / batch / label routes that now return 410 Gone. All pool operations use OSGymSandboxClaim CRs (Path B).- */-export class Api<- SecurityDataType extends unknown,-> extends HttpClient<SecurityDataType> {- /**- * No description- *- * @tags health- * @name HealthzList- * @summary Liveness/readiness probe- * @request GET:/healthz- */- healthzList = (params: RequestParams = {}) =>- this.request<HealthzListData, any>({- path: `/healthz`,- method: "GET",- format: "json",- ...params,- });-- batch = {- /**- * @description Route is deprecated and unavailable. Returns 410 Gone for every request. The orchestrator-backed batch surface is retired; callers must migrate to the replacement flow.- *- * @tags batch- * @name BatchLanesCreate- * @summary Deprecated batch lanes route- * @request POST:/api/batch/{pool}/lanes- * @deprecated- * @secure- */- batchLanesCreate: (pool: string, params: RequestParams = {}) =>- this.request<any, BatchLanesCreateError>({- path: `/api/batch/${pool}/lanes`,- method: "POST",- secure: true,- ...params,- }),-- /**- * @description Route is deprecated and unavailable. Returns 410 Gone for every request. The orchestrator-backed batch surface is retired; callers must migrate to the replacement flow.- *- * @tags batch- * @name BatchLanesDelete- * @summary Deprecated batch lanes route- * @request DELETE:/api/batch/{pool}/lanes- * @deprecated- * @secure- */- batchLanesDelete: (pool: string, params: RequestParams = {}) =>- this.request<any, BatchLanesDeleteError>({- path: `/api/batch/${pool}/lanes`,- method: "DELETE",- secure: true,- ...params,- }),-- /**- * @description Route is deprecated and unavailable. Returns 410 Gone for every request. The orchestrator-backed batch surface is retired; callers must migrate to the replacement flow.- *- * @tags batch- * @name BatchSubmitCreate- * @summary Deprecated batch submission route- * @request POST:/api/batch/{pool}/submit- * @deprecated- * @secure- */- batchSubmitCreate: (pool: string, params: RequestParams = {}) =>- this.request<any, BatchSubmitCreateError>({- path: `/api/batch/${pool}/submit`,- method: "POST",- secure: true,- ...params,- }),-- /**- * @description Route is deprecated and unavailable. Returns 410 Gone for every request. The orchestrator-backed batch surface is retired; callers must migrate to the replacement flow.- *- * @tags batch- * @name BatchDelete- * @summary Deprecated batch delete route- * @request DELETE:/api/batch/{pool}/{id}- * @deprecated- * @secure- */- batchDelete: (pool: string, id: string, params: RequestParams = {}) =>- this.request<any, BatchDeleteError>({- path: `/api/batch/${pool}/${id}`,- method: "DELETE",- secure: true,- ...params,- }),-- /**- * @description Route is deprecated and unavailable. Returns 410 Gone for every request. The orchestrator-backed batch surface is retired; callers must migrate to the replacement flow.- *- * @tags batch- * @name BatchResultsList- * @summary Deprecated batch results route- * @request GET:/api/batch/{pool}/{id}/results- * @deprecated- * @secure- */- batchResultsList: (pool: string, id: string, params: RequestParams = {}) =>- this.request<any, BatchResultsListError>({- path: `/api/batch/${pool}/${id}/results`,- method: "GET",- secure: true,- ...params,- }),-- /**- * @description Route is deprecated and unavailable. Returns 410 Gone for every request. The orchestrator-backed batch surface is retired; callers must migrate to the replacement flow.- *- * @tags batch- * @name BatchStatusList- * @summary Deprecated batch status route- * @request GET:/api/batch/{pool}/{id}/status- * @deprecated- * @secure- */- batchStatusList: (pool: string, id: string, params: RequestParams = {}) =>- this.request<any, BatchStatusListError>({- path: `/api/batch/${pool}/${id}/status`,- method: "GET",- secure: true,- ...params,- }),- };- billing = {- /**- * @description Creates a Stripe-hosted Billing Portal Session for the customer owned by the authenticated Cyclops subject.- *- * @tags billing- * @name BillingPortalSessionCreate- * @summary Create Stripe Billing Portal Session- * @request POST:/api/billing/portal-session- * @secure- */- billingPortalSessionCreate: (params: RequestParams = {}) =>- this.request<- BillingPortalSessionCreateData,- BillingPortalSessionCreateError- >({- path: `/api/billing/portal-session`,- method: "POST",- secure: true,- format: "json",- ...params,- }),-- /**- * @description Creates a Stripe-hosted Checkout Session in setup mode for reusable off-session card collection.- *- * @tags billing- * @name BillingSetupSessionCreate- * @summary Create Stripe card setup Session- * @request POST:/api/billing/setup-session- * @secure- */- billingSetupSessionCreate: (params: RequestParams = {}) =>- this.request<- BillingSetupSessionCreateData,- BillingSetupSessionCreateError- >({- path: `/api/billing/setup-session`,- method: "POST",- secure: true,- format: "json",- ...params,- }),-- /**- * @description Returns a sanitized Stripe-backed billing summary for the authenticated Cyclops subject.- *- * @tags billing- * @name BillingSummaryList- * @summary Billing summary- * @request GET:/api/billing/summary- * @secure- */- billingSummaryList: (params: RequestParams = {}) =>- this.request<BillingSummaryListData, BillingSummaryListError>({- path: `/api/billing/summary`,- method: "GET",- secure: true,- format: "json",- ...params,- }),-- /**- * @description Verifies a Stripe-signed raw webhook body and configures the default payment method for completed fleet setup intents.- *- * @tags billing- * @name BillingWebhookCreate- * @summary Receive Stripe webhook- * @request POST:/api/billing/webhook- */- billingWebhookCreate: (params: RequestParams = {}) =>- this.request<BillingWebhookCreateData, BillingWebhookCreateError>({- path: `/api/billing/webhook`,- method: "POST",- type: ContentType.Json,- ...params,- }),- };- config = {- /**- * @description Returns OPA-evaluated feature flags for the authenticated SPA user. `admin` is true when the caller's JWT sub appears in input.flags.admin_subs.- *- * @tags config- * @name ConfigList- * @summary Per-user feature flags- * @request GET:/api/config- * @secure- */- configList: (params: RequestParams = {}) =>- this.request<ConfigListData, ConfigListError>({- path: `/api/config`,- method: "GET",- secure: true,- format: "json",- ...params,- }),- };- gateway = {- /**- * @description The per-pool HTTP orchestrator has been deprecated and removed. All pools now use OSGymSandboxClaim CRs exclusively (Path B). This endpoint returns 410 Gone for any request. See CUA-609.- *- * @tags gateway- * @name GatewayDetail- * @summary DEPRECATED: Per-pool orchestrator reverse-proxy (CUA-609)- * @request GET:/api/gateway/{name}/{path}- */- gatewayDetail: (name: string, path?: string, params: RequestParams = {}) =>- this.request<any, GatewayDetailError>({- path: `/api/gateway/${name}/${path}`,- method: "GET",- ...params,- }),- };- k8S = {- /**- * @description Forwards requests to http://127.0.0.1:8001 (the kubectl-proxy sidecar) so the caller can read K8s resources via the pod ServiceAccount. SPA-only; OPA-gated. The policy is an allowlist: only enumerated group/version/resource/method combinations are proxied (the osgym.cua.ai and cua.ai fleet CRDs, namespaced pod/service reads, pod logs and metrics, KubeVirt reads, and API discovery). Anything else, including Kubernetes events and any cluster-scoped path, is denied and never reaches the sidecar.- *- * @tags passthrough- * @name GetK8S- * @summary Authenticated proxy to the in-pod kubectl-proxy sidecar- * @request GET:/api/k8s/{path}- * @secure- */- getK8S: (path: string, params: RequestParams = {}) =>- this.request<GetK8SData, GetK8SError>({- path: `/api/k8s/${path}`,- method: "GET",- secure: true,- ...params,- }),- };- keys = {- /**- * No description- *- * @tags keys- * @name KeysList- * @summary List the calling user's API keys- * @request GET:/api/keys- * @secure- */- keysList: (params: RequestParams = {}) =>- this.request<KeysListData, KeysListError>({- path: `/api/keys`,- method: "GET",- secure: true,- format: "json",- ...params,- }),-- /**- * @description Creates a Keycloak service-account client owned by the calling user. The returned `client_secret` is shown exactly once.- *- * @tags keys- * @name KeysCreate- * @summary Create a new API key- * @request POST:/api/keys- * @secure- */- keysCreate: (body: HandlersCreateKeyRequest, params: RequestParams = {}) =>- this.request<KeysCreateData, KeysCreateError>({- path: `/api/keys`,- method: "POST",- body: body,- secure: true,- type: ContentType.Json,- format: "json",- ...params,- }),-- /**- * No description- *- * @tags keys- * @name KeysDelete- * @summary Revoke an API key by Keycloak client UUID- * @request DELETE:/api/keys/{id}- * @secure- */- keysDelete: (id: string, params: RequestParams = {}) =>- this.request<KeysDeleteData, KeysDeleteError>({- path: `/api/keys/${id}`,- method: "DELETE",- secure: true,- ...params,- }),- };- label = {- /**- * @description Route is deprecated and unavailable. Returns 410 Gone for every request. The orchestrator-backed batch surface is retired; callers must migrate to the replacement flow.- *- * @tags label- * @name LabelDelete- * @summary Deprecated label delete route- * @request DELETE:/api/label/{pool}/{label}- * @deprecated- * @secure- */- labelDelete: (pool: string, label: string, params: RequestParams = {}) =>- this.request<any, LabelDeleteError>({- path: `/api/label/${pool}/${label}`,- method: "DELETE",- secure: true,- ...params,- }),-- /**- * @description Route is deprecated and unavailable. Returns 410 Gone for every request. The orchestrator-backed batch surface is retired; callers must migrate to the replacement flow.- *- * @tags label- * @name LabelBatchCreate- * @summary Deprecated label batch route- * @request POST:/api/label/{pool}/{label}/batch- * @deprecated- * @secure- */- labelBatchCreate: (- pool: string,- label: string,- params: RequestParams = {},- ) =>- this.request<any, LabelBatchCreateError>({- path: `/api/label/${pool}/${label}/batch`,- method: "POST",- secure: true,- ...params,- }),-- /**- * @description Route is deprecated and unavailable. Returns 410 Gone for every request. The orchestrator-backed batch surface is retired; callers must migrate to the replacement flow.- *- * @tags label- * @name LabelResultsList- * @summary Deprecated label results route- * @request GET:/api/label/{pool}/{label}/results- * @deprecated- * @secure- */- labelResultsList: (- pool: string,- label: string,- params: RequestParams = {},- ) =>- this.request<any, LabelResultsListError>({- path: `/api/label/${pool}/${label}/results`,- method: "GET",- secure: true,- ...params,- }),-- /**- * @description Route is deprecated and unavailable. Returns 410 Gone for every request. The orchestrator-backed batch surface is retired; callers must migrate to the replacement flow.- *- * @tags label- * @name LabelStatusList- * @summary Deprecated label status route- * @request GET:/api/label/{pool}/{label}/status- * @deprecated- * @secure- */- labelStatusList: (- pool: string,- label: string,- params: RequestParams = {},- ) =>- this.request<any, LabelStatusListError>({- path: `/api/label/${pool}/${label}/status`,- method: "GET",- secure: true,- ...params,- }),- };- namespaces = {- /**- * @description Returns namespaces owned by the caller's Capsule Tenant. The list is scoped by a capsule.clastix.io/tenant=<tenant> label selector built from the authenticated subject, so it stays fail-closed even when Capsule Proxy isn't filtering.- *- * @tags namespaces- * @name NamespacesList- * @summary List the calling user's namespaces- * @request GET:/api/namespaces- * @secure- */- namespacesList: (params: RequestParams = {}) =>- this.request<NamespacesListData, NamespacesListError>({- path: `/api/namespaces`,- method: "GET",- secure: true,- format: "json",- ...params,- }),-- /**- * @description Creates a K8s namespace via impersonation. Capsule's webhook intercepts the creation and assigns it to the user's Tenant.- *- * @tags namespaces- * @name NamespacesCreate- * @summary Create a namespace for the calling user- * @request POST:/api/namespaces- * @secure- */- namespacesCreate: (- body: HandlersCreateNamespaceRequest,- params: RequestParams = {},- ) =>- this.request<NamespacesCreateData, NamespacesCreateError>({- path: `/api/namespaces`,- method: "POST",- body: body,- secure: true,- type: ContentType.Json,- format: "json",- ...params,- }),-- /**- * @description Deletes a K8s namespace via impersonation. Capsule blocks deletion if the namespace doesn't belong to the user's Tenant.- *- * @tags namespaces- * @name NamespacesDelete- * @summary Delete a namespace owned by the calling user- * @request DELETE:/api/namespaces/{name}- * @secure- */- namespacesDelete: (name: string, params: RequestParams = {}) =>- this.request<NamespacesDeleteData, NamespacesDeleteError>({- path: `/api/namespaces/${name}`,- method: "DELETE",- secure: true,- ...params,- }),- };- orch = {- /**- * @description Resolves <service>.<namespace>.svc.cluster.local at request time (in-cluster DNS). The caller must hold RBAC in {namespace} (verified via an impersonated RoleBinding probe); OPA additionally validates that namespace and service look like DNS-1123 labels.- *- * @tags passthrough- * @name OrchDetail- * @summary SPA-authenticated proxy to a per-namespace orchestrator service- * @request GET:/api/orch/{namespace}/{service}/{path}- * @secure- */- orchDetail: (- namespace: string,- service: string,- path: string,- params: RequestParams = {},- ) =>- this.request<OrchDetailData, OrchDetailError>({- path: `/api/orch/${namespace}/${service}/${path}`,- method: "GET",- secure: true,- ...params,- }),- };- svc = {- /**- * @description Proxies to {service}.{namespace}.svc.cluster.local:80. Per-key tokens are bound to their `namespace` claim; all other principals (SPA, user keys, oauth2-proxy browser sessions) must hold RBAC in {namespace}, verified via an impersonated RoleBinding probe. Strips Authorization before forwarding.- *- * @tags gateway- * @name GetSvc- * @summary Authenticated reverse proxy to a K8s Service in a namespace the caller owns- * @request GET:/api/svc/{namespace}/{service}/{path}- * @secure- */- getSvc: (- namespace: string,- service: string,- path?: string,- params: RequestParams = {},- ) =>- this.request<GetSvcData, GetSvcError>({- path: `/api/svc/${namespace}/${service}/${path}`,- method: "GET",- secure: true,- ...params,- }),- };- userKeys = {- /**- * No description- *- * @tags user-keys- * @name UserKeysList- * @summary List the calling user's API keys- * @request GET:/api/user-keys- * @secure- */- userKeysList: (params: RequestParams = {}) =>- this.request<UserKeysListData, UserKeysListError>({- path: `/api/user-keys`,- method: "GET",- secure: true,- format: "json",- ...params,- }),-- /**- * @description Creates a Keycloak service-account client that acts on behalf of the calling user. The client_secret is returned exactly once; it cannot be retrieved later.- *- * @tags user-keys- * @name UserKeysCreate- * @summary Create a per-user API key- * @request POST:/api/user-keys- * @secure- */- userKeysCreate: (- body: HandlersCreateUserKeyRequest,- params: RequestParams = {},- ) =>- this.request<UserKeysCreateData, UserKeysCreateError>({- path: `/api/user-keys`,- method: "POST",- body: body,- secure: true,- type: ContentType.Json,- format: "json",- ...params,- }),-- /**- * No description- *- * @tags user-keys- * @name UserKeysDelete- * @summary Revoke a per-user API key- * @request DELETE:/api/user-keys/{id}- * @secure- */- userKeysDelete: (id: string, params: RequestParams = {}) =>- this.request<UserKeysDeleteData, UserKeysDeleteError>({- path: `/api/user-keys/${id}`,- method: "DELETE",- secure: true,- ...params,- }),- };-}diff --git a/libs/fleet/js-sdk/src/index.ts b/libs/fleet/js-sdk/src/index.tsdeleted file mode 100644index a284615e3c..0000000000--- a/libs/fleet/js-sdk/src/index.ts+++ /dev/null@@ -1,62 +0,0 @@-import { Api, type ApiConfig } from "./generated/cyclops-cs-backend.js"-import {- ClientCredentialsTokenProvider,- type ClientCredentialsTokenProviderOptions,-} from "./token.js"--export * from "./generated/cyclops-cs-backend.js"-export * from "./token.js"--export const DEFAULT_TOKEN_URL =- "https://auth.cua.ai/realms/cyclops-cs/protocol/openid-connect/token"-export const DEFAULT_BASE_URL = "https://run.cua.ai"--export interface CyclopsClientOptions {- clientId: string- clientSecret: string- tokenUrl?: string- baseUrl?: string- fetch?: typeof fetch- refreshBufferMs?: number-}--function resolveFetch(customFetch?: typeof fetch): typeof fetch {- const runtimeFetch = customFetch ?? globalThis.fetch- if (typeof runtimeFetch !== "function") {- throw new Error(- "Fetch API is unavailable. @trycua/cyclops requires Node.js 18+ or an injected fetch implementation.",- )- }- return runtimeFetch-}--export class CyclopsClient extends Api<unknown> {- readonly tokenProvider: ClientCredentialsTokenProvider-- constructor(options: CyclopsClientOptions) {- const fetch = resolveFetch(options.fetch)- const tokenOptions: ClientCredentialsTokenProviderOptions = {- tokenUrl: options.tokenUrl ?? DEFAULT_TOKEN_URL,- clientId: options.clientId,- clientSecret: options.clientSecret,- fetch,- refreshBufferMs: options.refreshBufferMs,- }- const tokenProvider = new ClientCredentialsTokenProvider(tokenOptions)- const config: ApiConfig = {- baseUrl: options.baseUrl ?? DEFAULT_BASE_URL,- customFetch: fetch,- securityWorker: async () => ({- headers: { Authorization: `Bearer ${await tokenProvider.getToken()}` },- }),- }- super(config)- this.tokenProvider = tokenProvider- }-- static async fromKey(options: CyclopsClientOptions): Promise<CyclopsClient> {- const client = new CyclopsClient(options)- await client.tokenProvider.getToken()- return client- }-}diff --git a/libs/fleet/js-sdk/src/token.ts b/libs/fleet/js-sdk/src/token.tsdeleted file mode 100644index 6b2f88d47e..0000000000--- a/libs/fleet/js-sdk/src/token.ts+++ /dev/null@@ -1,73 +0,0 @@-export interface ClientCredentialsTokenProviderOptions {- tokenUrl: string- clientId: string- clientSecret: string- fetch?: typeof fetch- refreshBufferMs?: number-}--function resolveFetch(customFetch?: typeof fetch): typeof fetch {- const runtimeFetch = customFetch ?? globalThis.fetch- if (typeof runtimeFetch !== "function") {- throw new Error(- "Fetch API is unavailable. @trycua/cyclops requires Node.js 18+ or an injected fetch implementation.",- )- }- return runtimeFetch-}--interface TokenResponse {- access_token: string- expires_in?: number-}--export class ClientCredentialsTokenProvider {- private readonly tokenUrl: string- private readonly clientId: string- private readonly clientSecret: string- private readonly fetch: typeof fetch- private readonly refreshBufferMs: number- private accessToken?: string- private tokenDeadline = 0- private refreshPromise?: Promise<string>-- constructor(options: ClientCredentialsTokenProviderOptions) {- this.tokenUrl = options.tokenUrl- this.clientId = options.clientId- this.clientSecret = options.clientSecret- this.fetch = resolveFetch(options.fetch)- this.refreshBufferMs = options.refreshBufferMs ?? 30_000- }-- async getToken(): Promise<string> {- if (this.accessToken && Date.now() < this.tokenDeadline - this.refreshBufferMs) {- return this.accessToken- }- if (!this.refreshPromise) {- this.refreshPromise = this.exchangeToken().finally(() => {- this.refreshPromise = undefined- })- }- return this.refreshPromise- }-- private async exchangeToken(): Promise<string> {- const response = await this.fetch(this.tokenUrl, {- method: "POST",- body: new URLSearchParams({- grant_type: "client_credentials",- client_id: this.clientId,- client_secret: this.clientSecret,- }),- })- if (!response.ok) {- const body = await response.text().catch(() => "")- throw new Error(`${response.status} ${response.statusText}${body ? `: ${body}` : ""}`)- }-- const token = (await response.json()) as TokenResponse- this.accessToken = token.access_token- this.tokenDeadline = Date.now() + Number(token.expires_in ?? 300) * 1000- return this.accessToken- }-}diff --git a/libs/fleet/js-sdk/test/client.test.js b/libs/fleet/js-sdk/test/client.test.jsdeleted file mode 100644index d525bbd18e..0000000000--- a/libs/fleet/js-sdk/test/client.test.js+++ /dev/null@@ -1,76 +0,0 @@-import assert from "node:assert/strict"-import test from "node:test"--import { CyclopsClient } from "../dist/index.js"--test("generated endpoint uses its generated route and bearer authentication", async () => {- const requests = []- const fetch = async (input, init = {}) => {- requests.push({ url: String(input), init })- if (String(input).endsWith("/token")) {- return Response.json({ access_token: "token-1", expires_in: 300 })- }- return Response.json({ keys: [] })- }-- const client = new CyclopsClient({- baseUrl: "https://run.example",- tokenUrl: "https://auth.example/token",- clientId: "key-example",- clientSecret: "secret",- fetch,- })-- const response = await client.keys.keysList()-- assert.deepEqual(response.data, { keys: [] })- assert.equal(requests[1].url, "https://run.example/api/keys")- assert.equal(requests[1].init.method, "GET")- assert.equal(requests[1].init.headers.Authorization, "Bearer token-1")-})--test("Node global fetch handles token and generated API requests", async () => {- const originalFetch = globalThis.fetch- const requests = []- globalThis.fetch = async (input, init = {}) => {- requests.push({ url: String(input), init })- if (String(input).endsWith("/token")) {- return Response.json({ access_token: "global-token", expires_in: 300 })- }- return Response.json({ keys: [] })- }-- try {- const client = new CyclopsClient({- baseUrl: "https://run.example",- tokenUrl: "https://auth.example/token",- clientId: "key-example",- clientSecret: "secret",- })-- await client.keys.keysList()-- assert.equal(requests.length, 2)- assert.equal(requests[1].init.headers.Authorization, "Bearer global-token")- } finally {- globalThis.fetch = originalFetch- }-})--test("client fails clearly when fetch is unavailable", () => {- const originalFetch = globalThis.fetch- globalThis.fetch = undefined-- try {- assert.throws(- () =>- new CyclopsClient({- clientId: "key-example",- clientSecret: "secret",- }),- /requires Node\.js 18\+ or an injected fetch implementation/,- )- } finally {- globalThis.fetch = originalFetch- }-})diff --git a/libs/fleet/js-sdk/test/patch-generated-client.test.mjs b/libs/fleet/js-sdk/test/patch-generated-client.test.mjsdeleted file mode 100644index dedcfdb7d9..0000000000--- a/libs/fleet/js-sdk/test/patch-generated-client.test.mjs+++ /dev/null@@ -1,22 +0,0 @@-import assert from "node:assert/strict";-import { execFile } from "node:child_process";-import { mkdtemp, writeFile } from "node:fs/promises";-import { tmpdir } from "node:os";-import { join } from "node:path";-import { promisify } from "node:util";-import test from "node:test";--const execFileAsync = promisify(execFile);--test("patch guard rejects a malformed BillingSummary declaration", async () => {- const directory = await mkdtemp(join(tmpdir(), "cyclops-sdk-patch-"));- const clientPath = join(directory, "cyclops-cs-backend.ts");- await writeFile(clientPath, ` private customFetch = (...fetchParams: Parameters<typeof fetch>) =>\n fetch(...fetchParams);\n\nexport interface BillingSummary {\n card: BillingCardSummary | null;\n}\n`);-- await assert.rejects(- execFileAsync(process.execPath, ["scripts/patch-generated-client.mjs", clientPath], {- cwd: new URL("..", import.meta.url),- }),- /BillingSummary card declaration did not match/,- );-});diff --git a/libs/fleet/js-sdk/test/token.test.js b/libs/fleet/js-sdk/test/token.test.jsdeleted file mode 100644index b2d2f859da..0000000000--- a/libs/fleet/js-sdk/test/token.test.js+++ /dev/null@@ -1,43 +0,0 @@-import assert from "node:assert/strict"-import test from "node:test"--import { ClientCredentialsTokenProvider } from "../dist/index.js"--test("token provider exchanges credentials and reuses an unexpired token", async () => {- const requests = []- const provider = new ClientCredentialsTokenProvider({- tokenUrl: "https://auth.example/token",- clientId: "key-example",- clientSecret: "secret",- fetch: async (input, init = {}) => {- requests.push({ url: String(input), init })- return Response.json({ access_token: "token-1", expires_in: 300 })- },- })-- assert.equal(await provider.getToken(), "token-1")- assert.equal(await provider.getToken(), "token-1")- assert.equal(requests.length, 1)- assert.equal(requests[0].url, "https://auth.example/token")- assert.equal(requests[0].init.method, "POST")- assert.equal(requests[0].init.body.get("grant_type"), "client_credentials")- assert.equal(requests[0].init.body.get("client_id"), "key-example")- assert.equal(requests[0].init.body.get("client_secret"), "secret")-})--test("token provider refreshes inside the configured expiry buffer", async () => {- let exchanges = 0- const provider = new ClientCredentialsTokenProvider({- tokenUrl: "https://auth.example/token",- clientId: "key-example",- clientSecret: "secret",- refreshBufferMs: 30_000,- fetch: async () => {- exchanges += 1- return Response.json({ access_token: `token-${exchanges}`, expires_in: 1 })- },- })-- assert.equal(await provider.getToken(), "token-1")- assert.equal(await provider.getToken(), "token-2")-})diff --git a/libs/fleet/js-sdk/tsconfig.json b/libs/fleet/js-sdk/tsconfig.jsondeleted file mode 100644index b9ac97ec16..0000000000--- a/libs/fleet/js-sdk/tsconfig.json+++ /dev/null@@ -1,14 +0,0 @@-{- "compilerOptions": {- "target": "ES2022",- "lib": ["ES2022", "DOM", "DOM.Iterable"],- "module": "NodeNext",- "moduleResolution": "NodeNext",- "strict": true,- "declaration": true,- "outDir": "dist",- "rootDir": "src",- "skipLibCheck": true- },- "include": ["src"]-}diff --git a/libs/fleet/nginx.conf b/libs/fleet/nginx.confindex 9f2528448f..ebc52bcbc1 100644--- a/libs/fleet/nginx.conf+++ b/libs/fleet/nginx.conf@@ -67,8 +67,6 @@ server {# /api/gateway — token-authenticated proxy to per-pool orchestrators# /api/k8s — SPA-authenticated proxy to the kubectl-proxy sidecar# (replaces the old /k8s-api/ nginx block)- # /api/orch — SPA-authenticated proxy to per-namespace orchestrator- # services (replaces the old /orch-api/ nginx block)# /api/batch — OSGym batch driver (submit/poll/results/cancel)# /api/label — same, label-scoped streaming variant#@@ -152,7 +150,7 @@ server {proxy_set_header X-Forwarded-Proto $scheme;}- location ~ ^/api/(keys|user-keys|github-trust-policies|gateway|k8s|orch|swagger|batch|label|namespaces|config|chat|billing|state)(/|$) {+ location ~ ^/api/(keys|user-keys|github-trust-policies|gateway|k8s|swagger|batch|label|namespaces|config|chat|billing|state)(/|$) {proxy_pass ${CYCLOPS_CS_BACKEND};proxy_http_version 1.1;proxy_set_header Host $host;@@ -180,9 +178,9 @@ server {return 404;}- # The previous /k8s-api/ and /orch-api/ blocks were removed — both are- # now served by the cyclops-cs-backend Deployment at /api/k8s and- # /api/orch with Keycloak SSO + OPA authorization in front. The+ # The previous /k8s-api/ block is now served by the cyclops-cs-backend+ # Deployment at /api/k8s with Keycloak SSO + OPA authorization in front.+ # The old /orch-api/ route is retired without a replacement. The# kubectl-proxy container moved with the backend (it talks to it on# 127.0.0.1:8001 to inherit the backend pod's ServiceAccount K8s# credentials).diff --git a/libs/fleet/vite.config.ts b/libs/fleet/vite.config.tsindex 5bb5899969..6eb47dd498 100644--- a/libs/fleet/vite.config.ts+++ b/libs/fleet/vite.config.ts@@ -2,10 +2,9 @@ import { defineConfig } from "vite"import react from "@vitejs/plugin-react"import { fileURLToPath, URL } from "node:url"-// /api/k8s and /api/orch are served by the cyclops-cs backend sidecar-// (Keycloak SSO + OPA), which isn't reachable from a laptop. In dev,-// route them through the deployed cyclops-cs Tailscale ingress so the-// in-cluster nginx forwards to the sidecar.+// Backend-owned routes such as /api/k8s are served by cyclops-cs behind+// Keycloak SSO + OPA and aren't reachable from a laptop. In dev, route them+// through the deployed cyclops-cs Tailscale ingress.const ORCH_API = process.env.ORCH_API ?? "https://cyclops-cs.tail204509.ts.net"export default defineConfig({