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
feat(fleets): sandbox parity (processMode Run on gVisor and KubeVirt, registry secrets, image resolve, image builds from registry) (#7887)
ddupont6762bcf63b61
diff --git a/libs/fleet/backend/auth/authz_images_resolve.rego b/libs/fleet/backend/auth/authz_images_resolve.regonew file mode 100644index 0000000000..ccd74b63f1--- /dev/null+++ b/libs/fleet/backend/auth/authz_images_resolve.rego@@ -0,0 +1,29 @@+# /api/images/resolve pins a public registry ref to a digest. It reads public+# registry metadata only (the resolver refuses non-public registries), builds+# and stores nothing, and carries no namespace, so any principal family that+# can hold a tenant grant may call it; there is no ownership boundary to check.+package authz_images_resolve++import data.authz++default allow = false++allow {+ input.route == "/api/images/resolve"+ authz.is_interactive_client+}++allow {+ input.route == "/api/images/resolve"+ input.user.principal_type == "github_oidc"+}++allow {+ input.route == "/api/images/resolve"+ authz.is_user_key_client+}++allow {+ input.route == "/api/images/resolve"+ authz.is_per_key_client+}diff --git a/libs/fleet/backend/auth/authz_images_resolve_test.rego b/libs/fleet/backend/auth/authz_images_resolve_test.regonew file mode 100644index 0000000000..f0d7400604--- /dev/null+++ b/libs/fleet/backend/auth/authz_images_resolve_test.rego@@ -0,0 +1,17 @@+package authz_images_resolve_test++import rego.v1+import data.authz_base+import data.authz_images_resolve++route_allow if { authz_base.allow; authz_images_resolve.allow }++resolve(user) := {"route": "/api/images/resolve", "method": "GET", "path": "/api/images/resolve", "params": {}, "user": user}++test_spa_resolve_allowed if { route_allow with input as resolve({"sub": "user-1", "azp": "cyclops-cs-spa", "namespace": "", "email": ""}) }++test_user_key_resolve_allowed if { route_allow with input as resolve({"sub": "user-1", "azp": "ukey-abc", "namespace": "", "email": ""}) }++test_github_oidc_resolve_allowed if { route_allow with input as resolve({"sub": "repo:org/repo", "azp": "github", "principal_type": "github_oidc", "allowed_namespaces": ["ns-a"]}) }++test_other_route_denied if { not authz_images_resolve.allow with input as object.union(resolve({"sub": "user-1", "azp": "cyclops-cs-spa"}), {"route": "/api/image-uploads/presign"}) }diff --git a/libs/fleet/backend/auth/authz_k8s.rego b/libs/fleet/backend/auth/authz_k8s.regoindex 26c336fe60..44092938ec 100644--- a/libs/fleet/backend/auth/authz_k8s.rego+++ b/libs/fleet/backend/auth/authz_k8s.rego@@ -341,6 +341,10 @@ is_write_method {# OSGymSandboxClaim spec.secretRef, and the pool-operator delivers its# keys into the bound sandbox (the cua-env-driver token at# /run/cua/env-token; osgym/pool-operator/claim_secrets.py).+# * cua-registry-*: a tenant's own registry pull credentials, a+# kubernetes.io/dockerconfigjson Secret the SDK names in+# vmTemplate.imagePullSecret (pool_admission.rego admits that pairing for+# any image). "Update" is delete + create.# A reviewed product decision, not observed traffic. Write-only by design: no# GET, LIST, WATCH, PUT or PATCH on any Secret, so a tenant cannot read back# even its own Secrets, and cannot touch any Secret outside these prefixes@@ -356,6 +360,10 @@ tenant_secret_name_pattern[pattern] {pattern := `^cua-claim-[a-z0-9]([-a-z0-9]*[a-z0-9])?$`}+tenant_secret_name_pattern[pattern] {+ pattern := `^cua-registry-[a-z0-9]([-a-z0-9]*[a-z0-9])?$`+}+k8s_request_allowed {parts := split(input.params.path, "/")core_namespaced_resource(parts, "secrets")diff --git a/libs/fleet/backend/auth/authz_k8s_test.rego b/libs/fleet/backend/auth/authz_k8s_test.regoindex e96cd7ba80..6ced3aa6a7 100644--- a/libs/fleet/backend/auth/authz_k8s_test.rego+++ b/libs/fleet/backend/auth/authz_k8s_test.rego@@ -757,6 +757,44 @@ test_github_oidc_cannot_write_claim_secrets if {not route_allow with input as request}+# Registry pull secrets: create on the collection (the body's cua-registry-*+# name and dockerconfigjson type are checked by tenant_secret_admission.rego)+# and delete by a cua-registry-* name. Nothing else on Secrets is reachable,+# including reading back a registry secret.+test_registry_secret_create_and_delete_allowed if {+ route_allow with input as spa_request("POST", "api/v1/namespaces/ns-a/secrets")+ route_allow with input as spa_request("DELETE", "api/v1/namespaces/ns-a/secrets/cua-registry-ghcr")++ user_key := object.union(+ spa_request("DELETE", "api/v1/namespaces/ns-a/secrets/cua-registry-ghcr"),+ {"user": {"sub": "user-1", "azp": "ukey-abc", "namespace": "", "email": ""}},+ )+ route_allow with input as user_key+}++test_registry_secret_surface_is_write_only_and_prefix_bound if {+ not route_allow with input as spa_request("GET", "api/v1/namespaces/ns-a/secrets/cua-registry-ghcr")+ not route_allow with input as spa_request("GET", "api/v1/namespaces/ns-a/secrets")+ not route_allow with input as spa_request("PUT", "api/v1/namespaces/ns-a/secrets/cua-registry-ghcr")+ not route_allow with input as spa_request("PATCH", "api/v1/namespaces/ns-a/secrets/cua-registry-ghcr")+ not route_allow with input as spa_request("POST", "api/v1/namespaces/ns-a/secrets/cua-registry-ghcr")+ not route_allow with input as spa_request("DELETE", "api/v1/namespaces/ns-a/secrets")+ not route_allow with input as spa_request("DELETE", "api/v1/namespaces/ns-a/secrets/ecr-credentials")+ not route_allow with input as spa_request("DELETE", "api/v1/namespaces/ns-a/secrets/workload-oidc")+ not route_allow with input as spa_request("DELETE", "api/v1/namespaces/ns-a/secrets/cua-registry-")+ not route_allow with input as spa_request("DELETE", "api/v1/namespaces/ns-a/secrets/cua-registry-x/extra")+ not route_allow with input as spa_request("GET", "api/v1/watch/namespaces/ns-a/secrets")+ not route_allow with input as spa_request("POST", "api/v1/secrets")+}++test_github_oidc_cannot_write_registry_secrets if {+ request := object.union(+ spa_request("POST", "api/v1/namespaces/ns-a/secrets"),+ {"user": {"sub": "repo:org/repo", "azp": "github", "principal_type": "github_oidc", "allowed_namespaces": ["ns-a"]}},+ )+ not route_allow with input as request+}+# Sandbox reads are customer-facing, but sandbox writes and unknown verbs stay# outside the allowlist.test_unenumerated_resource_and_verb_denied if {diff --git a/libs/fleet/backend/auth/middlewares.go b/libs/fleet/backend/auth/middlewares.goindex 4d0fca8686..8a3d120d21 100644--- a/libs/fleet/backend/auth/middlewares.go+++ b/libs/fleet/backend/auth/middlewares.go@@ -59,10 +59,18 @@ var customResourceCreationAdmissionPolicy string//go:embed sandbox_services_admission.regovar sandboxServicesAdmissionPolicy string+// sandboxProcessAdmissionPolicy checks what a template asks its sandboxes to+// run (vmTemplate command/args/env/processMode), e.g. that env and args on+// KubeVirt come with processMode: Run. A conjunct on the k8s surface.+//+//go:embed sandbox_process_admission.rego+var sandboxProcessAdmissionPolicy string+// tenantSecretAdmissionPolicy restricts the one Secret create /api/k8s admits// (POST on the secrets collection) to the tenant Secret kinds, each under its-// own name prefix (today cua-claim-*, the per-claim secret the pool-operator-// delivers into a bound sandbox). One module for every kind, so kinds never+// own name prefix (cua-claim-*, the per-claim secret the pool-operator+// delivers into a bound sandbox; cua-registry-*, a tenant registry pull+// Secret). One module for every kind, so kinds never// deny each other. A conjunct on the k8s surface, registered by name below.////go:embed tenant_secret_admission.rego@@ -108,11 +116,15 @@ var surfacePolicySources = map[string]struct {"authz-feature-flags": {"authz_feature_flags.rego", authzFeatureFlagsPolicy},"authz-account-lookup": {"authz_account_lookup.rego", authzAccountLookupPolicy},"authz-image-uploads": {"authz_image_uploads.rego", authzImageUploadsPolicy},+ "authz-images-resolve": {"authz_images_resolve.rego", authzImagesResolvePolicy},}//go:embed authz_account_lookup.regovar authzAccountLookupPolicy string+//go:embed authz_images_resolve.rego+var authzImagesResolvePolicy string+//go:embed authz_base.regovar authzBasePolicy string@@ -409,6 +421,7 @@ func LoadOpa() {RegisterPolicyModule("pool-admission", "pool_admission.rego", poolAdmissionPolicy)RegisterPolicyModule("custom-resource-creation-admission", "custom_resource_creation_admission.rego", customResourceCreationAdmissionPolicy)RegisterPolicyModule("sandbox-services-admission", "sandbox_services_admission.rego", sandboxServicesAdmissionPolicy)+ RegisterPolicyModule("sandbox-process-admission", "sandbox_process_admission.rego", sandboxProcessAdmissionPolicy)RegisterPolicyModule("tenant-secret-admission", "tenant_secret_admission.rego", tenantSecretAdmissionPolicy)RegisterPolicyModule("image-admission", "image_admission.rego", imageAdmissionPolicy)RegisterPolicyModule("image-rollout", "image_rollout.rego", imageRolloutPolicy)diff --git a/libs/fleet/backend/auth/policy_characterization_test.go b/libs/fleet/backend/auth/policy_characterization_test.goindex 9eab2baba8..07bb7edac1 100644--- a/libs/fleet/backend/auth/policy_characterization_test.go+++ b/libs/fleet/backend/auth/policy_characterization_test.go@@ -181,6 +181,7 @@ func characterizationCases() map[string][]routeCase {simple("/api/usage/pool", "/api/usage/pool")simple("/api/usage/browser-timings", "/api/usage/browser-timings")simple("/api/image-uploads/presign", "/api/image-uploads/presign")+ simple("/api/images/resolve", "/api/images/resolve")simple("/api/chat/conversations", "/api/chat/conversations")simple("/api/billing/summary", "/api/billing/summary")simple("/api/billing/usage", "/api/billing/usage")diff --git a/libs/fleet/backend/auth/policy_routes.go b/libs/fleet/backend/auth/policy_routes.goindex c4b2562789..e5cbd86be5 100644--- a/libs/fleet/backend/auth/policy_routes.go+++ b/libs/fleet/backend/auth/policy_routes.go@@ -191,6 +191,13 @@ func ImageUploadsRoutePolicy() Node {return All(BasePolicy(), surfaceLeaf("authz-image-uploads", "data.authz_image_uploads.allow"), ImageRolloutPolicy())}+// ImagesResolveRoutePolicy guards GET /api/images/resolve: a read of public+// registry metadata, open to every principal family that can hold a tenant+// grant. Not behind the image rollout gate: it builds and stores nothing.+func ImagesResolveRoutePolicy() Node {+ return All(BasePolicy(), surfaceLeaf("authz-images-resolve", "data.authz_images_resolve.allow"))+}+func ImageRolloutPolicy() Node {return Policy(Modules(Registered("authz"), Registered("image-rollout")),@@ -199,11 +206,13 @@ func ImageRolloutPolicy() Node {}// K8sRoutePolicy guards /api/k8s/{path...}. It is the same base + surface shape-// as every other route, with Image namespace ownership and five admission conjuncts: card-or-admin admission+// as every other route, with Image namespace ownership and six admission conjuncts: card-or-admin admission// for custom-resource creation, pool admission over the request body,// sandbox-services admission over the body of the one Sandbox write the-// allowlist admits, tenant-secret admission over the body of the one Secret-// create it admits, plus Image admission excluding status and mismatched identity.+// allowlist admits, sandbox-process admission over a template's+// env/args/processMode, tenant-secret admission over the body of the one Secret+// create it admits, plus Image admission excluding status and mismatched+// identity.//// Every conjunct must pass. The three body-reading leaves read the raw body// (bounded at 1 MiB) to inspect the object being created or patched, which is@@ -244,10 +253,14 @@ const ServiceWriteNotSupportedMessage = "creating or modifying Kubernetes Servic// strays outside the one field clients may write.const SandboxPatchRestrictedMessage = "a sandbox PATCH may only modify spec.vmTemplate.services (an optional metadata.resourceVersion precondition is also accepted)"+// SandboxProcessRestrictedMessage is the 403 body when a template's+// command/args/env cannot run on its runtime.+const SandboxProcessRestrictedMessage = "vmTemplate.env and args on runtime kubevirt (the default runtime) need vmTemplate.processMode: Run, which also needs a command for args and single-line values; state runtime and processMode on a PATCH; processMode is Legacy or Run; env names must match ^[A-Za-z_][A-Za-z0-9_]*$."+// TenantSecretRestrictedMessage is the 403 body when a Secret create through// /api/k8s is not one of the tenant Secret kinds (tenant_secret_admission.rego).// A new kind appends its own "; <kind>: ..." clause.-const TenantSecretRestrictedMessage = "only tenant Secrets may be created through this API, in the path's namespace, with no generateName, annotations or ownerReferences. Claim secrets: a plain Opaque Secret named cua-claim-<name>, referenced from OSGymSandboxClaim spec.secretRef."+const TenantSecretRestrictedMessage = "only tenant Secrets may be created through this API, in the path's namespace, with no generateName, annotations or ownerReferences. Claim secrets: a plain Opaque Secret named cua-claim-<name>, referenced from OSGymSandboxClaim spec.secretRef; Registry pull secrets: type kubernetes.io/dockerconfigjson named cua-registry-<name>, labeled cua.ai/registry-secret: \"true\", holding only .dockerconfigjson, referenced from vmTemplate.imagePullSecret."func K8sRoutePolicy() Node {return All(@@ -285,6 +298,14 @@ func K8sRoutePolicy() Node {),SandboxPatchRestrictedMessage,),+ Because(+ Policy(+ Registered("sandbox-process-admission"),+ Query("data.sandbox_process_admission.allow"),+ WithRawBody(1<<20),+ ),+ SandboxProcessRestrictedMessage,+ ),Because(Policy(Registered("tenant-secret-admission"),@@ -340,6 +361,7 @@ var surfacePolicies = map[string]surfacePolicy{"state-query": {tree: StateQueryRoutePolicy},"feature-flags": {tree: FeatureFlagsRoutePolicy, options: []MiddlewareOption{WithDeniedAudit("feature_flag_admin", featureFlagAuditBodyLimit), WithAdminAPIErrorResponses(), WithFreshAdminAuthorization()}},"image-uploads": {tree: ImageUploadsRoutePolicy},+ "images-resolve": {tree: ImagesResolveRoutePolicy},"k8s": {tree: K8sRoutePolicy,options: []MiddlewareOption{WithDeniedMessage("k8s request is not allowed")},@@ -363,6 +385,7 @@ var routeSurfaces = map[string]string{"/api/usage/pool": "usage","/api/usage/browser-timings": "usage","/api/image-uploads/presign": "image-uploads",+ "/api/images/resolve": "images-resolve","/api/chat/conversations": "chat","/api/chat/conversations/{id}": "chat",diff --git a/libs/fleet/backend/auth/policy_sandbox_parity_compat_test.go b/libs/fleet/backend/auth/policy_sandbox_parity_compat_test.gonew file mode 100644index 0000000000..2f06801037--- /dev/null+++ b/libs/fleet/backend/auth/policy_sandbox_parity_compat_test.go@@ -0,0 +1,108 @@+package auth++import (+ "net/http"+ "testing"+)++// Request shapes older SDKs (cyclops-sdk / Fleet SDK releases, terraform+// provider, @trycua/*) send today. The sandbox-parity admission conjuncts+// (sandbox_process_admission.rego, the cua-registry-* kind of+// tenant_secret_admission.rego, the pool_admission registry rules) must give+// every one of them the verdict it had before: admitted shapes stay admitted,+// denied shapes stay denied.+func TestK8sOldSDKRequestShapesKeepTheirVerdict(t *testing.T) {+ setCardAdmissionFlags(t, false)+ const templates = "apis/osgym.cua.ai/v1alpha1/namespaces/ns-a/osgymsandboxtemplates"+ const pools = "apis/osgym.cua.ai/v1alpha1/namespaces/ns-a/osgymsandboxwarmpools"+ for _, testCase := range []struct {+ name string+ method string+ path string+ body string+ allowed bool+ }{+ {+ name: "kubevirt template with public ECR image",+ method: http.MethodPost,+ path: templates,+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04:main-38352d34","cpuCores":4,"memory":"8Gi","services":[{"name":"api","port":8000,"targetPort":8000}]}}}`,+ allowed: true,+ },+ {+ name: "kubevirt template with a command (ignored on kubevirt, as before)",+ method: http.MethodPost,+ path: templates,+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04:main-38352d34","command":["/start.sh"]}}}`,+ allowed: true,+ },+ {+ name: "gvisor template with command and the shared ECR pull secret",+ method: http.MethodPost,+ path: templates,+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"runtime":"gvisor","containerDiskImage":"296062593712.dkr.ecr.us-west-2.amazonaws.com/desktop-workspace:main","imagePullSecret":"ecr-credentials","command":["/entrypoint.sh"]}}}`,+ allowed: true,+ },+ {+ name: "template merge patch that clears the pull secret",+ method: http.MethodPatch,+ path: templates + "/t",+ body: `{"spec":{"vmTemplate":{"cpuCores":2,"imagePullSecret":null}}}`,+ allowed: true,+ },+ {+ name: "warm pool create",+ method: http.MethodPost,+ path: pools,+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxWarmPool","metadata":{"name":"p"},"spec":{"replicas":1,"sandboxTemplateRef":{"name":"t"}}}`,+ allowed: true,+ },+ {+ name: "shared ECR pull secret with an image outside the allowlist",+ method: http.MethodPost,+ path: templates,+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"ghcr.io/acme/private:1","imagePullSecret":"ecr-credentials"}}}`,+ },+ {+ name: "arbitrary pull secret name",+ method: http.MethodPost,+ path: templates,+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"ghcr.io/acme/private:1","imagePullSecret":"my-registry"}}}`,+ },+ {+ name: "secret read",+ method: http.MethodGet,+ path: "api/v1/namespaces/ns-a/secrets/ecr-credentials",+ },+ {+ name: "plain opaque secret create",+ method: http.MethodPost,+ path: "api/v1/namespaces/ns-a/secrets",+ body: `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"my-secret"},"stringData":{"a":"b"}}`,+ },+ {+ name: "dockerconfigjson secret under a non-cua-registry name",+ method: http.MethodPost,+ path: "api/v1/namespaces/ns-a/secrets",+ body: `{"apiVersion":"v1","kind":"Secret","type":"kubernetes.io/dockerconfigjson","metadata":{"name":"ecr-credentials","labels":{"cua.ai/registry-secret":"true"}},"data":{".dockerconfigjson":"e30="}}`,+ },+ {+ name: "delete of the shared ECR pull secret",+ method: http.MethodDelete,+ path: "api/v1/namespaces/ns-a/secrets/ecr-credentials",+ },+ } {+ t.Run(testCase.name, func(t *testing.T) {+ response, reached := runK8sPolicyResponse(t, sandboxServicesRequest(testCase.method, testCase.path, testCase.body))+ if testCase.allowed {+ if response.Code != http.StatusNoContent || !reached {+ t.Fatalf("status, reached = %d, %v; want %d, true", response.Code, reached, http.StatusNoContent)+ }+ return+ }+ if response.Code != http.StatusForbidden || reached {+ t.Fatalf("status, reached = %d, %v; want %d, false", response.Code, reached, http.StatusForbidden)+ }+ })+ }+}diff --git a/libs/fleet/backend/auth/policy_sandbox_parity_test.go b/libs/fleet/backend/auth/policy_sandbox_parity_test.gonew file mode 100644index 0000000000..648045599b--- /dev/null+++ b/libs/fleet/backend/auth/policy_sandbox_parity_test.go@@ -0,0 +1,150 @@+package auth++import (+ "net/http"+ "testing"+)++// These pin the sandbox-parity surfaces end to end through the production+// tree: tenant registry pull Secrets (create/delete only, dockerconfigjson+// cua-registry-* only), templates pairing them with any image, and the+// env/args/processMode rules with their own 403 message.++const (+ registrySecretCollection = "api/v1/namespaces/ns-a/secrets"+ templateCollection = "apis/osgym.cua.ai/v1alpha1/namespaces/ns-a/osgymsandboxtemplates"+)++func TestK8sRegistrySecretCreateAndDeleteAdmitted(t *testing.T) {+ setCardAdmissionFlags(t, false)+ const body = `{"apiVersion":"v1","kind":"Secret","type":"kubernetes.io/dockerconfigjson","metadata":{"name":"cua-registry-ghcr","namespace":"ns-a","labels":{"cua.ai/registry-secret":"true"}},"data":{".dockerconfigjson":"eyJhdXRocyI6e319"}}`++ for _, testCase := range []struct {+ name string+ method string+ path string+ body string+ }{+ {name: "create", method: http.MethodPost, path: registrySecretCollection, body: body},+ {name: "delete", method: http.MethodDelete, path: registrySecretCollection + "/cua-registry-ghcr"},+ } {+ t.Run(testCase.name, func(t *testing.T) {+ response, reached := runK8sPolicyResponse(t, sandboxServicesRequest(testCase.method, testCase.path, testCase.body))+ if response.Code != http.StatusNoContent || !reached {+ t.Fatalf("status, reached = %d, %v; want %d, true", response.Code, reached, http.StatusNoContent)+ }+ })+ }+}++func TestK8sNonRegistrySecretCreateReturnsRestrictedMessage(t *testing.T) {+ setCardAdmissionFlags(t, false)+ for _, testCase := range []struct {+ name string+ body string+ }{+ {name: "opaque", body: `{"type":"Opaque","metadata":{"name":"cua-registry-x"},"stringData":{"a":"b"}}`},+ {name: "type omitted", body: `{"metadata":{"name":"cua-registry-x"},"data":{".dockerconfigjson":"e30="}}`},+ {name: "other name", body: `{"type":"kubernetes.io/dockerconfigjson","metadata":{"name":"ecr-credentials"},"data":{".dockerconfigjson":"e30="}}`},+ {name: "service account token", body: `{"type":"kubernetes.io/service-account-token","metadata":{"name":"cua-registry-x","annotations":{"kubernetes.io/service-account.name":"default"}}}`},+ } {+ t.Run(testCase.name, func(t *testing.T) {+ response, reached := runK8sPolicyResponse(t, sandboxServicesRequest(http.MethodPost, registrySecretCollection, testCase.body))+ if response.Code != http.StatusForbidden || reached {+ t.Fatalf("status, reached = %d, %v; want %d, false", response.Code, reached, http.StatusForbidden)+ }+ if got := policyErrorMessage(t, response); got != TenantSecretRestrictedMessage {+ t.Fatalf("error = %q, want %q", got, TenantSecretRestrictedMessage)+ }+ })+ }+}++func TestK8sOtherSecretOperationsStayDenied(t *testing.T) {+ setCardAdmissionFlags(t, false)+ for _, testCase := range []struct {+ method string+ path string+ }{+ {method: http.MethodGet, path: registrySecretCollection},+ {method: http.MethodGet, path: registrySecretCollection + "/cua-registry-ghcr"},+ {method: http.MethodPatch, path: registrySecretCollection + "/cua-registry-ghcr"},+ {method: http.MethodPut, path: registrySecretCollection + "/cua-registry-ghcr"},+ {method: http.MethodDelete, path: registrySecretCollection + "/ecr-credentials"},+ {method: http.MethodDelete, path: registrySecretCollection + "/workload-oidc"},+ } {+ t.Run(testCase.method+" "+testCase.path, func(t *testing.T) {+ response, reached := runK8sPolicyResponse(t, sandboxServicesRequest(testCase.method, testCase.path, `{"data":{".dockerconfigjson":"e30="}}`))+ if response.Code != http.StatusForbidden || reached {+ t.Fatalf("status, reached = %d, %v; want %d, false", response.Code, reached, http.StatusForbidden)+ }+ })+ }+}++func TestK8sTemplateProcessFieldsAndRegistrySecrets(t *testing.T) {+ setCardAdmissionFlags(t, false)+ for _, testCase := range []struct {+ name string+ body string+ allowed bool+ message string+ }{+ {+ name: "canonical public image, no secret",+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"ghcr.io/trycua/linux:24.04","runtime":"gvisor"}}}`,+ allowed: true,+ },+ {+ name: "private image with tenant registry secret, command, env",+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"ghcr.io/acme/agent:1","imagePullSecret":"cua-registry-ghcr","runtime":"gvisor","command":["python","-m","server"],"env":{"FOO":"bar"}}}}`,+ allowed: true,+ },+ {+ name: "kubevirt command (pre-existing field, still ignored on kubevirt)",+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"ghcr.io/trycua/linux:24.04-disk","command":["/usr/bin/python3","-m","http.server"]}}}`,+ allowed: true,+ },+ {+ name: "kubevirt processMode Run with command, args and env",+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"ghcr.io/trycua/linux:24.04-disk","processMode":"Run","command":["python3","-m","http.server"],"args":["$(PORT)"],"env":{"PORT":"8765"},"services":[{"name":"http","targetPort":8765}]}}}`,+ allowed: true,+ },+ {+ name: "kubevirt processMode Run with a multi-line env value",+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"ghcr.io/trycua/linux:24.04-disk","processMode":"Run","env":{"A":"x\ny"}}}}`,+ message: SandboxProcessRestrictedMessage,+ },+ {+ name: "env on kubevirt with processMode Legacy",+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"ghcr.io/trycua/linux:24.04-disk","processMode":"Legacy","env":{"FOO":"bar"}}}}`,+ message: SandboxProcessRestrictedMessage,+ },+ {+ name: "env on kubevirt",+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"ghcr.io/trycua/linux:24.04-disk","env":{"FOO":"bar"}}}}`,+ message: SandboxProcessRestrictedMessage,+ },+ {+ name: "bad env name",+ body: `{"apiVersion":"osgym.cua.ai/v1alpha1","kind":"OSGymSandboxTemplate","metadata":{"name":"t"},"spec":{"vmTemplate":{"containerDiskImage":"redis:7","runtime":"gvisor","env":{"1BAD":"x"}}}}`,+ message: SandboxProcessRestrictedMessage,+ },+ } {+ t.Run(testCase.name, func(t *testing.T) {+ response, reached := runK8sPolicyResponse(t, sandboxServicesRequest(http.MethodPost, templateCollection, testCase.body))+ if testCase.allowed {+ if response.Code != http.StatusNoContent || !reached {+ t.Fatalf("status, reached = %d, %v; want %d, true", response.Code, reached, http.StatusNoContent)+ }+ return+ }+ if response.Code != http.StatusForbidden || reached {+ t.Fatalf("status, reached = %d, %v; want %d, false", response.Code, reached, http.StatusForbidden)+ }+ if got := policyErrorMessage(t, response); got != testCase.message {+ t.Fatalf("error = %q, want %q", got, testCase.message)+ }+ })+ }+}diff --git a/libs/fleet/backend/auth/policy_test.go b/libs/fleet/backend/auth/policy_test.goindex 85d23f4662..ec6c0402f4 100644--- a/libs/fleet/backend/auth/policy_test.go+++ b/libs/fleet/backend/auth/policy_test.go@@ -37,6 +37,7 @@ func TestRouteModulesNeverReadInputFacts(t *testing.T) {"authz.rego": authzPolicy,"pool_admission.rego": poolAdmissionPolicy,"sandbox_services_admission.rego": sandboxServicesAdmissionPolicy,+ "sandbox_process_admission.rego": sandboxProcessAdmissionPolicy,"tenant_secret_admission.rego": tenantSecretAdmissionPolicy,"image_admission.rego": imageAdmissionPolicy,"image_rollout.rego": imageRolloutPolicy,diff --git a/libs/fleet/backend/auth/pool_admission.rego b/libs/fleet/backend/auth/pool_admission.regoindex 6d697bd4dc..1efe6d1b97 100644--- a/libs/fleet/backend/auth/pool_admission.rego+++ b/libs/fleet/backend/auth/pool_admission.rego@@ -6,6 +6,13 @@ default allow = falseecr_pull_secret := "ecr-credentials"+# Tenant-owned pull Secrets: kubernetes.io/dockerconfigjson Secrets the tenant+# created through /api/k8s (tenant_secret_admission.rego only admits that+# shape under this prefix). They hold the tenant's own registry credentials, so+# unlike the shared ecr-credentials they need no image allowlist: a template+# may pair one with any registry image.+registry_secret_pattern := `^cua-registry-[a-z0-9]([-a-z0-9]*[a-z0-9])?$`+allowed_image_repositories := {"296062593712.dkr.ecr.us-west-2.amazonaws.com/cua-gymdriver-dev","public.ecr.aws/k5j5w0x5/cua-windows-2022",@@ -111,6 +118,13 @@ has_image {object.get(template, "containerDiskImage", null) != null}+tenant_registry_secret {+ secret := template.imagePullSecret+ is_string(secret)+ count(secret) <= 253+ regex.match(registry_secret_pattern, secret)+}+allowed_image {image := template.containerDiskImagerepository := allowed_image_repositories[_]@@ -140,6 +154,11 @@ image_configuration_allowed {allowed_image}+image_configuration_allowed {+ input.method != "PATCH"+ tenant_registry_secret+}+image_configuration_allowed {input.method == "PATCH"not has_pull_secret@@ -157,6 +176,11 @@ image_configuration_allowed {allowed_image}+image_configuration_allowed {+ input.method == "PATCH"+ tenant_registry_secret+}+requests_macos {lower(object.get(template, "runtime", "")) == "macos"}diff --git a/libs/fleet/backend/auth/pool_admission_test.rego b/libs/fleet/backend/auth/pool_admission_test.regoindex 67e9b2a4ac..0830ce0e1b 100644--- a/libs/fleet/backend/auth/pool_admission_test.rego+++ b/libs/fleet/backend/auth/pool_admission_test.rego@@ -242,6 +242,57 @@ test_nested_virt_false_allowed_for_non_admin {}}+# ── Canonical public images, tenant registry secrets ───────────────────────++canonical_linux := "ghcr.io/trycua/linux:24.04"++canonical_linux_disk := "ghcr.io/trycua/linux:24.04-disk"++canonical_windows_disk := "ghcr.io/trycua/windows:2022-disk"++native_post(vm_template) := {+ "method": "POST",+ "params": {"path": native_path},+ "body": json.marshal({"spec": {"vmTemplate": vm_template}}),+ "user": non_admin,+ "flags": non_admin_flags,+}++native_patch(vm_template) := {+ "method": "PATCH",+ "params": {"path": concat("/", [native_path, "tpl"])},+ "body": json.marshal({"spec": {"vmTemplate": vm_template}}),+ "user": non_admin,+ "flags": non_admin_flags,+}++# The canonical repos are public: no allowlist entry and no pull secret.+test_canonical_public_images_allowed_without_pull_secret {+ pool_admission.allow with input as native_post({"containerDiskImage": canonical_linux, "runtime": "gvisor"})+ pool_admission.allow with input as native_post({"containerDiskImage": canonical_linux_disk})+ pool_admission.allow with input as native_post({"containerDiskImage": canonical_windows_disk, "firmware": "efi"})+ pool_admission.allow with input as native_post({"containerDiskImage": "ghcr.io/trycua/linux@sha256:d626893f7bc3c42603557e8ae2d9fdf8ca6ce4c671c1c5958cdba2152674f7ed", "runtime": "gvisor"})+}++# The shared ECR credentials stay pinned to the ECR allowlist.+test_canonical_image_with_shared_ecr_secret_denied {+ not pool_admission.allow with input as native_post({"containerDiskImage": canonical_linux, "imagePullSecret": "ecr-credentials"})+}++test_tenant_registry_secret_allows_any_image {+ pool_admission.allow with input as native_post({"containerDiskImage": "ghcr.io/acme/private-agent:1", "imagePullSecret": "cua-registry-ghcr", "runtime": "gvisor"})+ pool_admission.allow with input as native_post({"containerDiskImage": "registry.acme.internal:5000/vm-disk:2", "imagePullSecret": "cua-registry-acme"})+ pool_admission.allow with input as native_patch({"containerDiskImage": "ghcr.io/acme/private-agent:2", "imagePullSecret": "cua-registry-ghcr"})+}++test_registry_secret_prefix_is_exact {+ not pool_admission.allow with input as native_post({"containerDiskImage": "ghcr.io/acme/a:1", "imagePullSecret": "cua-registry-"})+ not pool_admission.allow with input as native_post({"containerDiskImage": "ghcr.io/acme/a:1", "imagePullSecret": "cua-registry-UPPER"})+ not pool_admission.allow with input as native_post({"containerDiskImage": "ghcr.io/acme/a:1", "imagePullSecret": "x-cua-registry-a"})+ not pool_admission.allow with input as native_post({"containerDiskImage": "ghcr.io/acme/a:1", "imagePullSecret": "cua-claim-a"})+ not pool_admission.allow with input as native_post({"containerDiskImage": "ghcr.io/acme/a:1", "imagePullSecret": "workload-oidc"})+}+# Warm pools and claims carry no image configuration, so pool admission does# not apply to them: the idle-TTL lifecycle fields and creator-set cua.ai/# labels and annotations pass without a policy change.diff --git a/libs/fleet/backend/auth/sandbox_process_admission.rego b/libs/fleet/backend/auth/sandbox_process_admission.regonew file mode 100644index 0000000000..42bb32591b--- /dev/null+++ b/libs/fleet/backend/auth/sandbox_process_admission.rego@@ -0,0 +1,159 @@+# Admission over what a sandbox template asks its sandboxes to run:+# spec.vmTemplate.{command,args,env,processMode} on+# OSGymSandboxTemplate writes.+#+# command, args and env run on every runtime once vmTemplate.processMode is+# Run: pod runtimes (gvisor, macos) set them on the sandbox container, and+# KubeVirt renders them into the sandbox's cloud-init. Without processMode (or+# with Legacy) KubeVirt keeps its old behavior: command is ignored, and env+# and args are refused here with a message naming processMode: Run, instead of+# a sandbox that silently ignores them. command predates this module and no+# rule refuses it, so no existing template is newly refused. KubeVirt Run+# values must be single-line (they go into files in the guest), and args need+# a command there (a VM image has no entrypoint). Runtime absent means+# kubevirt (the CRD default) and+# processMode absent means Legacy, on PATCH too: state both alongside these+# fields. Env names follow the POSIX shape. The pool-operator+# (osgym/pool-operator/sandbox_process.py) enforces the same rules as a+# backstop.+#+# Same shape as the other body admissions: `applies` matches every template+# write, `allow { not applies }` passes the rest of the surface.+package sandbox_process_admission++default allow = false++env_name_pattern := `^[A-Za-z_][A-Za-z0-9_]*$`++pod_runtimes := {"gvisor", "macos"}++process_modes := {"Legacy", "Run"}++# Any C0 control character or DEL (newlines included).+control_char_pattern := `[\x00-\x1f\x7f]`++write_method {+ input.method == "POST"+}++write_method {+ input.method == "PUT"+}++write_method {+ input.method == "PATCH"+}++# apis/osgym.cua.ai/v1alpha1/namespaces/{ns}/osgymsandboxtemplates[/{name}]+template_path {+ parts := split(input.params.path, "/")+ count(parts) >= 6+ count(parts) <= 7+ parts[0] == "apis"+ parts[1] == "osgym.cua.ai"+ parts[2] == "v1alpha1"+ parts[3] == "namespaces"+ parts[4] != ""+ parts[5] == "osgymsandboxtemplates"+}++applies {+ write_method+ template_path+}++allow {+ not applies+}++request_object := json.unmarshal(input.body) {+ applies+}++vm_template := object.get(object.get(request_object, "spec", {}), "vmTemplate", {})++runtime := lower(object.get(vm_template, "runtime", "kubevirt"))++pod_runtime {+ pod_runtimes[runtime]+}++non_empty(key) {+ value := object.get(vm_template, key, null)+ value != null+ count(value) > 0+}++invalid_env(env) {+ env != null+ not is_object(env)+}++invalid_env(env) {+ is_object(env)+ some name+ env[name]+ not regex.match(env_name_pattern, name)+}++invalid_env(env) {+ is_object(env)+ value := env[_]+ not is_string(value)+}++violation["vmTemplate.env names must match ^[A-Za-z_][A-Za-z0-9_]*$ and values must be strings"] {+ invalid_env(object.get(vm_template, "env", null))+}++process_mode := object.get(vm_template, "processMode", "Legacy")++run_mode {+ process_mode == "Run"+}++violation["vmTemplate.processMode must be Legacy or Run"] {+ not process_modes[process_mode]+}++run_only_fields := ["env", "args"]++violation["vmTemplate.env and args on runtime kubevirt need vmTemplate.processMode: Run (without it KubeVirt never runs command, args or env)"] {+ not pod_runtime+ not run_mode+ non_empty(run_only_fields[_])+}++violation["vmTemplate.args needs vmTemplate.command on runtime kubevirt (a VM image has no entrypoint)"] {+ not pod_runtime+ run_mode+ non_empty("args")+ not non_empty("command")+}++violation["vmTemplate.env values and command/args must not contain control characters on runtime kubevirt"] {+ not pod_runtime+ run_mode+ env := object.get(vm_template, "env", null)+ is_object(env)+ value := env[_]+ is_string(value)+ regex.match(control_char_pattern, value)+}++violation["vmTemplate.env values and command/args must not contain control characters on runtime kubevirt"] {+ not pod_runtime+ run_mode+ field := ["command", "args"][_]+ values := object.get(vm_template, field, null)+ is_array(values)+ value := values[_]+ is_string(value)+ regex.match(control_char_pattern, value)+}++allow {+ applies+ is_object(request_object)+ count(violation) == 0+}diff --git a/libs/fleet/backend/auth/sandbox_process_admission_test.rego b/libs/fleet/backend/auth/sandbox_process_admission_test.regonew file mode 100644index 0000000000..a01d767bf3--- /dev/null+++ b/libs/fleet/backend/auth/sandbox_process_admission_test.rego@@ -0,0 +1,108 @@+package sandbox_process_admission_test++import data.sandbox_process_admission++template_path := "apis/osgym.cua.ai/v1alpha1/namespaces/ns-a/osgymsandboxtemplates"++write(method, vm_template) := {+ "method": method,+ "params": {"path": template_path},+ "body": json.marshal({"spec": {"vmTemplate": vm_template}}),+}++post(vm_template) := write("POST", vm_template)++test_unrelated_request_allowed {+ sandbox_process_admission.allow with input as {+ "method": "POST",+ "params": {"path": "apis/osgym.cua.ai/v1alpha1/namespaces/ns-a/osgymsandboxclaims"},+ "body": "not json",+ }+}++test_plain_template_allowed {+ sandbox_process_admission.allow with input as post({"containerDiskImage": "img:1"})+}++test_gvisor_command_args_and_env_allowed {+ sandbox_process_admission.allow with input as post({+ "containerDiskImage": "python:3.12-slim",+ "runtime": "gvisor",+ "command": ["python", "-m", "server"],+ "args": ["--port", "8765"],+ "env": {"FOO": "bar", "_X1": "multi\nline is fine in a pod"},+ })+ sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "runtime": "macos", "env": {"A": "b"}})+}++test_kubevirt_command_still_allowed {+ # command predates env/args; existing KubeVirt templates that set+ # it (ignored on KubeVirt) must keep passing.+ sandbox_process_admission.allow with input as post({+ "containerDiskImage": "ghcr.io/trycua/linux:24.04-disk",+ "command": ["/usr/bin/python3", "-m", "http.server"],+ })+ sandbox_process_admission.allow with input as write("PATCH", {"command": ["/bin/true"]})+}++test_kubevirt_env_and_args_denied {+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "args": ["--x"]})+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "command": ["/x"], "args": ["--x"]})+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "env": {"A": "b"}})+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "runtime": "kubevirt", "env": {"A": "b"}})+ sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "runtime": "gvisor", "args": ["--x"]})+ sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "env": {}, "args": []})+}++test_bad_env_names_denied {+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "runtime": "gvisor", "env": {"1A": "x"}})+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "runtime": "gvisor", "env": {"A-B": "x"}})+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "runtime": "gvisor", "env": {"A": 1}})+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "runtime": "gvisor", "env": ["A=b"]})+}++test_malformed_body_denied {+ not sandbox_process_admission.allow with input as {"method": "POST", "params": {"path": template_path}, "body": "not json"}+}++test_kubevirt_run_allows_command_args_and_env {+ sandbox_process_admission.allow with input as post({+ "containerDiskImage": "ghcr.io/trycua/linux:24.04-disk",+ "processMode": "Run",+ "command": ["python3", "-m", "http.server"],+ "args": ["$(PORT)"],+ "env": {"PORT": "8765", "GREETING": "hi there"},+ })+ sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "runtime": "kubevirt", "processMode": "Run", "env": {"A": "b"}})+ # PATCH: runtime absent reads as kubevirt, so processMode must be stated.+ sandbox_process_admission.allow with input as write("PATCH", {"processMode": "Run", "env": {"A": "b"}})+ not sandbox_process_admission.allow with input as write("PATCH", {"env": {"A": "b"}})+}++test_kubevirt_without_run_refuses_env_and_args_with_the_reason {+ msgs := sandbox_process_admission.violation with input as post({"containerDiskImage": "img", "processMode": "Legacy", "env": {"A": "b"}})+ msgs["vmTemplate.env and args on runtime kubevirt need vmTemplate.processMode: Run (without it KubeVirt never runs command, args or env)"]+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "processMode": "Legacy", "args": ["x"], "command": ["y"]})+}++test_kubevirt_run_refusals {+ # A VM image has no entrypoint for bare args.+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "processMode": "Run", "args": ["--x"]})+ # Values go into guest files: single-line only.+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "processMode": "Run", "env": {"A": "two\nlines"}})+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "processMode": "Run", "command": ["/bin/echo", "a\rb"]})+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "processMode": "Run", "command": ["/x"], "args": ["a\u007fb"]})+ # Tabs and multi-line values stay fine on pods.+ sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "runtime": "gvisor", "processMode": "Run", "env": {"A": "two\nlines"}, "args": ["--x"]})+}++test_process_mode_values {+ sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "processMode": "Legacy"})+ sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "processMode": "Run"})+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "processMode": "run"})+ not sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "processMode": "Always"})+}++test_legacy_kubevirt_command_still_allowed_with_explicit_legacy {+ sandbox_process_admission.allow with input as post({"containerDiskImage": "img", "processMode": "Legacy", "command": ["/bin/true"]})+}diff --git a/libs/fleet/backend/auth/tenant_secret_admission.rego b/libs/fleet/backend/auth/tenant_secret_admission.regoindex 56a56a490a..3f36f50cba 100644--- a/libs/fleet/backend/auth/tenant_secret_admission.rego+++ b/libs/fleet/backend/auth/tenant_secret_admission.rego@@ -41,6 +41,14 @@ tenant_secret_name_pattern[pattern] {pattern := claim_secret_name_pattern}+# Registry pull secrets: a tenant's own registry credentials, named from+# vmTemplate.imagePullSecret for private images (pool_admission.rego).+registry_secret_name_pattern := `^cua-registry-[a-z0-9]([-a-z0-9]*[a-z0-9])?$`++tenant_secret_name_pattern[pattern] {+ pattern := registry_secret_name_pattern+}+# ── Kinds ───────────────────────────────────────────────────────────────────# Claim secret: a plain Opaque Secret (type omitted or "Opaque"), any string@@ -50,6 +58,34 @@ kind_admitted {optional_equals(request_object, "type", "Opaque")}+# Registry pull secret: type kubernetes.io/dockerconfigjson stated explicitly+# (an omitted type is Opaque), exactly one payload map holding only+# .dockerconfigjson (the apiserver validates it is a docker config), and the+# label cua.ai/registry-secret: "true", which marks it as managed by this+# feature so nothing else in the namespace is mistaken for one.+registry_secret_type := "kubernetes.io/dockerconfigjson"++registry_secret_key := ".dockerconfigjson"++registry_secret_label := "cua.ai/registry-secret"++kind_admitted {+ name_matches(registry_secret_name_pattern)+ request_object.type == registry_secret_type+ request_object.metadata.labels[registry_secret_label] == "true"+ registry_secret_payload+}++registry_secret_payload {+ not has_key(request_object, "stringData")+ object.keys(request_object.data) == {registry_secret_key}+}++registry_secret_payload {+ not has_key(request_object, "data")+ object.keys(request_object.stringData) == {registry_secret_key}+}+# ── Shared envelope ─────────────────────────────────────────────────────────write_method {diff --git a/libs/fleet/backend/auth/tenant_secret_admission_registry_test.rego b/libs/fleet/backend/auth/tenant_secret_admission_registry_test.regonew file mode 100644index 0000000000..9b91bb7f29--- /dev/null+++ b/libs/fleet/backend/auth/tenant_secret_admission_registry_test.rego@@ -0,0 +1,90 @@+# Registry pull secret kind (cua-registry-*) of tenant_secret_admission.rego.+package tenant_secret_admission_registry_test++import data.tenant_secret_admission++collection_path := "api/v1/namespaces/ns-a/secrets"++post(body) := {+ "method": "POST",+ "params": {"path": collection_path},+ "body": body,+}++sdk_body := `{"apiVersion":"v1","kind":"Secret","type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-ghcr","namespace":"ns-a","labels":{"cua.ai/registry-secret":"true"}},"data":{".dockerconfigjson":"eyJhdXRocyI6e319"}}`++test_sdk_registry_secret_allowed {+ tenant_secret_admission.allow with input as post(sdk_body)+}++test_string_data_registry_secret_allowed {+ tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"},"stringData":{".dockerconfigjson":"{\"auths\":{}}"}}`)+}++test_unrelated_request_allowed {+ tenant_secret_admission.allow with input as {+ "method": "POST",+ "params": {"path": "apis/osgym.cua.ai/v1alpha1/namespaces/ns-a/osgymsandboxtemplates"},+ "body": "not json",+ }+}++test_delete_passes_through_to_allowlist {+ tenant_secret_admission.allow with input as {+ "method": "DELETE",+ "params": {"path": "api/v1/namespaces/ns-a/secrets/cua-registry-x"},+ "body": "",+ }+}++test_type_must_be_stated_dockerconfigjson {+ not tenant_secret_admission.allow with input as post(`{"metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"Opaque","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/service-account-token","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockercfg","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"},"data":{".dockercfg":"e30="}}`)+}++test_other_names_denied {+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"name":"ecr-credentials"},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-"},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-X"},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"generateName":"cua-registry-"},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-claim-x"},"data":{".dockerconfigjson":"e30="}}`)+}++test_payload_must_be_exactly_the_docker_config {+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"},"data":{".dockerconfigjson":"e30=","extra":"eA=="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"},"data":{".dockerconfigjson":"e30="},"stringData":{".dockerconfigjson":"{}"}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"},"data":{".dockerconfigjson":1}}`)+}++test_metadata_and_extra_keys_denied {+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x","annotations":{"a":"b"}},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x","ownerReferences":[]},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x","namespace":"ns-b"},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"},"data":{".dockerconfigjson":"e30="},"immutable":true}`)+ not tenant_secret_admission.allow with input as post(`{"kind":"ConfigMap","type":"kubernetes.io/dockerconfigjson","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"},"data":{".dockerconfigjson":"e30="}}`)+}++test_malformed_body_denied {+ not tenant_secret_admission.allow with input as post("not json")+}++test_post_to_item_put_and_patch_denied {+ not tenant_secret_admission.allow with input as {"method": "POST", "params": {"path": "api/v1/namespaces/ns-a/secrets/cua-registry-x"}, "body": sdk_body}+ not tenant_secret_admission.allow with input as {"method": "PUT", "params": {"path": "api/v1/namespaces/ns-a/secrets/cua-registry-x"}, "body": sdk_body}+ not tenant_secret_admission.allow with input as {"method": "PATCH", "params": {"path": "api/v1/namespaces/ns-a/secrets/cua-registry-x"}, "body": `{"data":{".dockerconfigjson":"e30="}}`}+}++test_managed_label_required {+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"name":"cua-registry-x"},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"name":"cua-registry-x","labels":{"cua.ai/registry-secret":"false"}},"data":{".dockerconfigjson":"e30="}}`)+ not tenant_secret_admission.allow with input as post(`{"type":"kubernetes.io/dockerconfigjson","metadata":{"name":"cua-registry-x","labels":{"other":"true"}},"data":{".dockerconfigjson":"e30="}}`)+}++# The two kinds never admit each other's shape.+test_kinds_do_not_cross {+ not tenant_secret_admission.allow with input as post(`{"type":"Opaque","metadata":{"labels":{"cua.ai/registry-secret":"true"},"name":"cua-registry-x"},"stringData":{"env-token":"t"}}`)+ tenant_secret_admission.allow with input as post(`{"type":"Opaque","metadata":{"name":"cua-claim-x"},"stringData":{"env-token":"t"}}`)+}diff --git a/libs/fleet/backend/auth/tenant_secret_admission_test.rego b/libs/fleet/backend/auth/tenant_secret_admission_test.regoindex 5afc2bfb61..3642c32381 100644--- a/libs/fleet/backend/auth/tenant_secret_admission_test.rego+++ b/libs/fleet/backend/auth/tenant_secret_admission_test.rego@@ -132,7 +132,7 @@ test_name_patterns_agree_with_allowlist {# Kinds must not overlap: a kind's sample name matches exactly one pattern, so# only that kind's type and payload rules can admit it. Add a sample per kind.-kind_sample_names := {"cua-claim-x"}+kind_sample_names := {"cua-claim-x", "cua-registry-x"}test_each_kind_name_matches_exactly_one_pattern {count({n | n := kind_sample_names[_]; count({p | p := tenant_secret_admission.tenant_secret_name_pattern[_]; regex.match(p, n)}) != 1}) == 0diff --git a/libs/fleet/backend/auth/testdata/images-resolve-route-plan.txt b/libs/fleet/backend/auth/testdata/images-resolve-route-plan.txtnew file mode 100644index 0000000000..fda8e9d225--- /dev/null+++ b/libs/fleet/backend/auth/testdata/images-resolve-route-plan.txt@@ -0,0 +1,3 @@+All+ Leaf query=data.authz_base.allow source=registered:authz-base+ Leaf query=data.authz_images_resolve.allow source=multi["registered:authz","registered:authz-images-resolve"]diff --git a/libs/fleet/backend/auth/testdata/k8s-route-plan.txt b/libs/fleet/backend/auth/testdata/k8s-route-plan.txtindex 69be6398fb..08a61015b8 100644--- a/libs/fleet/backend/auth/testdata/k8s-route-plan.txt+++ b/libs/fleet/backend/auth/testdata/k8s-route-plan.txt@@ -17,5 +17,7 @@ AllLeaf query=data.pool_admission.allow source=multi["registered:authz","registered:pool-admission"] body=1048576Because reason="a sandbox PATCH may only modify spec.vmTemplate.services (an optional metadata.resourceVersion precondition is also accepted)"Leaf query=data.sandbox_services_admission.allow source=registered:sandbox-services-admission body=1048576- Because reason="only tenant Secrets may be created through this API, in the path's namespace, with no generateName, annotations or ownerReferences. Claim secrets: a plain Opaque Secret named cua-claim-<name>, referenced from OSGymSandboxClaim spec.secretRef."+ Because reason="vmTemplate.env and args on runtime kubevirt (the default runtime) need vmTemplate.processMode: Run, which also needs a command for args and single-line values; state runtime and processMode on a PATCH; processMode is Legacy or Run; env names must match ^[A-Za-z_][A-Za-z0-9_]*$."+ Leaf query=data.sandbox_process_admission.allow source=registered:sandbox-process-admission body=1048576+ Because reason="only tenant Secrets may be created through this API, in the path's namespace, with no generateName, annotations or ownerReferences. Claim secrets: a plain Opaque Secret named cua-claim-<name>, referenced from OSGymSandboxClaim spec.secretRef; Registry pull secrets: type kubernetes.io/dockerconfigjson named cua-registry-<name>, labeled cua.ai/registry-secret: \"true\", holding only .dockerconfigjson, referenced from vmTemplate.imagePullSecret."Leaf query=data.tenant_secret_admission.allow source=registered:tenant-secret-admission body=1048576diff --git a/libs/fleet/backend/auth/testdata/route-authorization-table.txt b/libs/fleet/backend/auth/testdata/route-authorization-table.txtindex 70164816b8..463075ed57 100644--- a/libs/fleet/backend/auth/testdata/route-authorization-table.txt+++ b/libs/fleet/backend/auth/testdata/route-authorization-table.txt@@ -988,6 +988,61 @@/api/image-uploads/presign | plain | QUERY | spa = allow/api/image-uploads/presign | plain | QUERY | user-key = allow/api/image-uploads/presign | plain | QUERY | user-key-verified = allow+/api/images/resolve | plain | DELETE | admin-spa = allow+/api/images/resolve | plain | DELETE | cua-cli = allow+/api/images/resolve | plain | DELETE | dcr-client = deny+/api/images/resolve | plain | DELETE | empty-sub = deny+/api/images/resolve | plain | DELETE | github-oidc = allow+/api/images/resolve | plain | DELETE | oauth2-proxy = deny+/api/images/resolve | plain | DELETE | per-key-other-ns = allow+/api/images/resolve | plain | DELETE | per-key-owned-ns = allow+/api/images/resolve | plain | DELETE | spa = allow+/api/images/resolve | plain | DELETE | user-key = allow+/api/images/resolve | plain | DELETE | user-key-verified = allow+/api/images/resolve | plain | GET | admin-spa = allow+/api/images/resolve | plain | GET | cua-cli = allow+/api/images/resolve | plain | GET | dcr-client = deny+/api/images/resolve | plain | GET | empty-sub = deny+/api/images/resolve | plain | GET | github-oidc = allow+/api/images/resolve | plain | GET | oauth2-proxy = deny+/api/images/resolve | plain | GET | per-key-other-ns = allow+/api/images/resolve | plain | GET | per-key-owned-ns = allow+/api/images/resolve | plain | GET | spa = allow+/api/images/resolve | plain | GET | user-key = allow+/api/images/resolve | plain | GET | user-key-verified = allow+/api/images/resolve | plain | PATCH | admin-spa = allow+/api/images/resolve | plain | PATCH | cua-cli = allow+/api/images/resolve | plain | PATCH | dcr-client = deny+/api/images/resolve | plain | PATCH | empty-sub = deny+/api/images/resolve | plain | PATCH | github-oidc = allow+/api/images/resolve | plain | PATCH | oauth2-proxy = deny+/api/images/resolve | plain | PATCH | per-key-other-ns = allow+/api/images/resolve | plain | PATCH | per-key-owned-ns = allow+/api/images/resolve | plain | PATCH | spa = allow+/api/images/resolve | plain | PATCH | user-key = allow+/api/images/resolve | plain | PATCH | user-key-verified = allow+/api/images/resolve | plain | POST | admin-spa = allow+/api/images/resolve | plain | POST | cua-cli = allow+/api/images/resolve | plain | POST | dcr-client = deny+/api/images/resolve | plain | POST | empty-sub = deny+/api/images/resolve | plain | POST | github-oidc = allow+/api/images/resolve | plain | POST | oauth2-proxy = deny+/api/images/resolve | plain | POST | per-key-other-ns = allow+/api/images/resolve | plain | POST | per-key-owned-ns = allow+/api/images/resolve | plain | POST | spa = allow+/api/images/resolve | plain | POST | user-key = allow+/api/images/resolve | plain | POST | user-key-verified = allow+/api/images/resolve | plain | QUERY | admin-spa = allow+/api/images/resolve | plain | QUERY | cua-cli = allow+/api/images/resolve | plain | QUERY | dcr-client = deny+/api/images/resolve | plain | QUERY | empty-sub = deny+/api/images/resolve | plain | QUERY | github-oidc = allow+/api/images/resolve | plain | QUERY | oauth2-proxy = deny+/api/images/resolve | plain | QUERY | per-key-other-ns = allow+/api/images/resolve | plain | QUERY | per-key-owned-ns = allow+/api/images/resolve | plain | QUERY | spa = allow+/api/images/resolve | plain | QUERY | user-key = allow+/api/images/resolve | plain | QUERY | user-key-verified = allow/api/k8s/{path...} | capsule-tenants | DELETE | admin-spa = deny/api/k8s/{path...} | capsule-tenants | DELETE | cua-cli = deny/api/k8s/{path...} | capsule-tenants | DELETE | dcr-client = denydiff --git a/libs/fleet/backend/handlers/handlers.go b/libs/fleet/backend/handlers/handlers.goindex f2cff06a2b..4f5d65b104 100644--- a/libs/fleet/backend/handlers/handlers.go+++ b/libs/fleet/backend/handlers/handlers.go@@ -17,6 +17,7 @@ import ("cyclops-cs-backend/chat""cyclops-cs-backend/config""cyclops-cs-backend/featureflagadmin"+ "cyclops-cs-backend/imageresolve""cyclops-cs-backend/keycloak""cyclops-cs-backend/productanalytics""cyclops-cs-backend/signedurls"@@ -81,6 +82,9 @@ type Handlers struct {ImageUploads config.ImageUploadConfigurationImageObjects ImageObjectStore++ // ImageResolver backs GET /api/images/resolve. nil answers 503.+ ImageResolver ImageResolver}func New(admin *keycloak.Admin, cfg *config.Configuration) Handlers {@@ -95,6 +99,8 @@ func New(admin *keycloak.Admin, cfg *config.Configuration) Handlers {Analytics: productanalytics.Nop(),ImageUploads: cfg.ImageUploads,chatLocks: newConversationLockRegistry(),++ ImageResolver: imageresolve.NewResolver(),}}diff --git a/libs/fleet/backend/handlers/image_resolve.go b/libs/fleet/backend/handlers/image_resolve.gonew file mode 100644index 0000000000..d7abc1b1ef--- /dev/null+++ b/libs/fleet/backend/handlers/image_resolve.go@@ -0,0 +1,64 @@+package handlers++import (+ "context"+ "errors"+ "net/http"++ "cyclops-cs-backend/imageresolve"++ "go.opentelemetry.io/otel/attribute"+ "go.opentelemetry.io/otel/codes"+)++// ImageResolver pins an image ref (optionally mapped to a runtime's variant)+// to a digest. imageresolve.Resolver is the production implementation.+type ImageResolver interface {+ Resolve(ctx context.Context, ref, runtime string) (imageresolve.Result, error)+}++// ResolveImage serves GET /api/images/resolve?ref=<ref>[&runtime=<runtime>].+//+// It pins public registry refs server-side so an SDK can create a+// digest-pinned pool without registry access of its own, and maps the+// canonical cua images to the variant the runtime runs (runtime kubevirt:+// ghcr.io/trycua/linux:24.04 -> :24.04-disk). Private refs fail with 422:+// the SDK holds those credentials and resolves them itself.+func (h Handlers) ResolveImage(w http.ResponseWriter, r *http.Request) {+ ctx, span := handlerTracer().Start(r.Context(), "images.resolve")+ defer span.End()+ w.Header().Set("Cache-Control", "private, no-store")++ query := r.URL.Query()+ ref := query.Get("ref")+ runtime := query.Get("runtime")+ if ref == "" {+ writeErr(w, http.StatusBadRequest, "ref query parameter is required")+ return+ }+ if h.ImageResolver == nil {+ writeErr(w, http.StatusServiceUnavailable, "image resolution is not configured")+ return+ }+ span.SetAttributes(attribute.String("images.runtime", runtime))++ result, err := h.ImageResolver.Resolve(ctx, ref, runtime)+ if err != nil {+ status := http.StatusBadGateway+ switch {+ case errors.Is(err, imageresolve.ErrInvalidReference), errors.Is(err, imageresolve.ErrUnsupported):+ status = http.StatusBadRequest+ case errors.Is(err, imageresolve.ErrNotFound):+ status = http.StatusNotFound+ case errors.Is(err, imageresolve.ErrRegistryNotAllowed), errors.Is(err, imageresolve.ErrUnauthorized):+ status = http.StatusUnprocessableEntity+ }+ if status == http.StatusBadGateway {+ span.SetStatus(codes.Error, "image resolve failed")+ }+ writeErr(w, status, err.Error())+ return+ }+ span.SetAttributes(attribute.String("images.variant", result.Variant))+ writeJSON(w, http.StatusOK, result)+}diff --git a/libs/fleet/backend/handlers/image_resolve_test.go b/libs/fleet/backend/handlers/image_resolve_test.gonew file mode 100644index 0000000000..1c30e45d3b--- /dev/null+++ b/libs/fleet/backend/handlers/image_resolve_test.go@@ -0,0 +1,85 @@+package handlers++import (+ "context"+ "encoding/json"+ "fmt"+ "net/http"+ "net/http/httptest"+ "testing"++ "cyclops-cs-backend/auth"+ "cyclops-cs-backend/imageresolve"+)++type fakeImageResolver struct {+ ref, runtime string+ result imageresolve.Result+ err error+}++func (f *fakeImageResolver) Resolve(_ context.Context, ref, runtime string) (imageresolve.Result, error) {+ f.ref, f.runtime = ref, runtime+ return f.result, f.err+}++func resolveRequest(query string) *http.Request {+ return withUser(httptest.NewRequest(http.MethodGet, "/api/images/resolve"+query, nil), &auth.User{ID: "user"})+}++func TestResolveImageReturnsThePin(t *testing.T) {+ resolver := &fakeImageResolver{result: imageresolve.Result{+ Ref: "ghcr.io/trycua/linux:24.04", ResolvedRef: "ghcr.io/trycua/linux:24.04-disk",+ PinnedRef: "ghcr.io/trycua/linux@sha256:abc", Digest: "sha256:abc",+ Variant: "containerdisk", VariantSource: "tag", MediaType: "application/vnd.oci.image.index.v1+json",+ }}+ w := httptest.NewRecorder()+ Handlers{ImageResolver: resolver}.ResolveImage(w, resolveRequest("?ref=ghcr.io%2Ftrycua%2Flinux%3A24.04&runtime=kubevirt"))++ if w.Code != http.StatusOK || resolver.ref != "ghcr.io/trycua/linux:24.04" || resolver.runtime != "kubevirt" {+ t.Fatalf("status=%d resolver=%+v", w.Code, resolver)+ }+ if w.Header().Get("Cache-Control") != "private, no-store" {+ t.Fatalf("cache-control = %q", w.Header().Get("Cache-Control"))+ }+ var body map[string]any+ if err := json.Unmarshal(w.Body.Bytes(), &body); err != nil {+ t.Fatal(err)+ }+ for _, key := range []string{"ref", "resolvedRef", "pinnedRef", "digest", "variant", "variantSource", "platformDigest", "mediaType"} {+ if _, ok := body[key]; !ok {+ t.Errorf("response is missing %q: %s", key, w.Body.String())+ }+ }+}++func TestResolveImageMapsErrors(t *testing.T) {+ for _, testCase := range []struct {+ err error+ want int+ }{+ {imageresolve.ErrInvalidReference, http.StatusBadRequest},+ {fmt.Errorf("%w: runtime", imageresolve.ErrUnsupported), http.StatusBadRequest},+ {imageresolve.ErrNotFound, http.StatusNotFound},+ {imageresolve.ErrUnauthorized, http.StatusUnprocessableEntity},+ {imageresolve.ErrRegistryNotAllowed, http.StatusUnprocessableEntity},+ {fmt.Errorf("%w: 500", imageresolve.ErrUpstream), http.StatusBadGateway},+ } {+ w := httptest.NewRecorder()+ Handlers{ImageResolver: &fakeImageResolver{err: testCase.err}}.ResolveImage(w, resolveRequest("?ref=x"))+ if w.Code != testCase.want {+ t.Errorf("%v: status = %d, want %d", testCase.err, w.Code, testCase.want)+ }+ }++ w := httptest.NewRecorder()+ Handlers{ImageResolver: &fakeImageResolver{}}.ResolveImage(w, resolveRequest(""))+ if w.Code != http.StatusBadRequest {+ t.Errorf("missing ref: status = %d", w.Code)+ }+ w = httptest.NewRecorder()+ Handlers{}.ResolveImage(w, resolveRequest("?ref=x"))+ if w.Code != http.StatusServiceUnavailable {+ t.Errorf("unconfigured: status = %d", w.Code)+ }+}diff --git a/libs/fleet/backend/imageresolve/resolve.go b/libs/fleet/backend/imageresolve/resolve.gonew file mode 100644index 0000000000..52f1bf78cd--- /dev/null+++ b/libs/fleet/backend/imageresolve/resolve.go@@ -0,0 +1,525 @@+// Package imageresolve pins public registry image refs to digests for+// GET /api/images/resolve, so SDKs can run a digest-pinned image (and hash a+// pool spec by digest) without registry access of their own.+//+// It is deliberately small: an anonymous OCI distribution client (one+// manifest GET plus the anonymous bearer-token dance) over an allowlist of+// public registries. The allowlist is the SSRF boundary: the gateway never+// dials a host a caller names unless it is one of the public registries (or+// their token realms), and it never follows a redirect off that list.+// Private refs are the SDK's job (it holds the credentials); here they fail+// with ErrNotFound/ErrUnauthorized.+//+// Canonical cua images (ghcr.io/trycua/linux, ghcr.io/trycua/windows) map to+// their runtime variant first: runtime kubevirt resolves the containerDisk+// sibling tag (`24.04` -> `24.04-disk`), gvisor/macos the rootfs tag.+package imageresolve++import (+ "context"+ "crypto/sha256"+ "encoding/hex"+ "encoding/json"+ "errors"+ "fmt"+ "io"+ "net/http"+ "net/url"+ "regexp"+ "strings"+ "sync"+ "time"+)++const (+ mediaTypeOCIIndex = "application/vnd.oci.image.index.v1+json"+ mediaTypeOCIManifest = "application/vnd.oci.image.manifest.v1+json"+ mediaTypeDockerList = "application/vnd.docker.distribution.manifest.list.v2+json"+ mediaTypeDockerV2 = "application/vnd.docker.distribution.manifest.v2+json"+ maxManifestBytes = 4 << 20+ maxTokenBytes = 64 << 10+ defaultCacheTTL = time.Minute+ maxCacheEntries = 1024+ maxReferenceBytes = 1024+ variantAnnotation = "ai.cua.image.variant"+ canonicalDiskTagSuffix = "-disk"++ VariantRootfs = "rootfs"+ VariantContainerDisk = "containerdisk"+)++var (+ ErrInvalidReference = errors.New("invalid image reference")+ ErrRegistryNotAllowed = errors.New("registry is not on the public registry allowlist")+ ErrNotFound = errors.New("image not found")+ ErrUnauthorized = errors.New("image requires credentials (resolve private images client-side)")+ ErrUnsupported = errors.New("unsupported image or runtime")+ ErrUpstream = errors.New("registry request failed")+)++// DefaultRegistries are the public registries the gateway resolves against,+// keyed by the registry name refs use, valued by the API host to dial.+var DefaultRegistries = map[string]string{+ "ghcr.io": "ghcr.io",+ "docker.io": "registry-1.docker.io",+ "public.ecr.aws": "public.ecr.aws",+ "quay.io": "quay.io",+ "gcr.io": "gcr.io",+ "mcr.microsoft.com": "mcr.microsoft.com",+ "registry.k8s.io": "registry.k8s.io",+ "nvcr.io": "nvcr.io",+}++// DefaultTokenHosts are the anonymous token realms those registries name.+var DefaultTokenHosts = map[string]bool{+ "ghcr.io": true,+ "auth.docker.io": true,+ "public.ecr.aws": true,+ "quay.io": true,+ "gcr.io": true,+ "mcr.microsoft.com": true,+ "registry.k8s.io": true,+ "nvcr.io": true,+}++// canonicalRepositories lists the canonical cua image repositories and+// whether each has a rootfs (docker/gVisor) variant.+var canonicalRepositories = map[string]bool{+ "ghcr.io/trycua/linux": true,+ "ghcr.io/trycua/windows": false,+}++var (+ tagPattern = regexp.MustCompile(`^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$`)+ digestPattern = regexp.MustCompile(`^sha256:[0-9a-f]{64}$`)+ pathComponent = regexp.MustCompile(`^[a-z0-9]+(?:(?:[._]|__|-+)[a-z0-9]+)*$`)+)++// Reference is a parsed image ref.+type Reference struct {+ Registry string+ Repository string+ Tag string+ Digest string+}++// Name is registry/repository.+func (r Reference) Name() string { return r.Registry + "/" + r.Repository }++// String is the canonical full ref.+func (r Reference) String() string {+ s := r.Name()+ if r.Tag != "" {+ s += ":" + r.Tag+ }+ if r.Digest != "" {+ s += "@" + r.Digest+ }+ return s+}++// ParseReference parses a docker-style ref. Short refs resolve to docker.io+// (`python:3.12` -> `docker.io/library/python:3.12`), matching docker and the+// cua SDK's resolver.+func ParseReference(raw string) (Reference, error) {+ if raw == "" || len(raw) > maxReferenceBytes || strings.ContainsAny(raw, " \t\r\n") {+ return Reference{}, ErrInvalidReference+ }+ var ref Reference+ rest := raw+ if at := strings.Index(rest, "@"); at >= 0 {+ ref.Digest = rest[at+1:]+ rest = rest[:at]+ if !digestPattern.MatchString(ref.Digest) {+ return Reference{}, fmt.Errorf("%w: digest must be sha256:<64 hex>", ErrInvalidReference)+ }+ }+ if colon := strings.LastIndex(rest, ":"); colon > strings.LastIndex(rest, "/") {+ ref.Tag = rest[colon+1:]+ rest = rest[:colon]+ if !tagPattern.MatchString(ref.Tag) {+ return Reference{}, fmt.Errorf("%w: bad tag", ErrInvalidReference)+ }+ }+ parts := strings.SplitN(rest, "/", 2)+ if len(parts) == 2 && (strings.ContainsAny(parts[0], ".:") || parts[0] == "localhost") {+ ref.Registry, ref.Repository = strings.ToLower(parts[0]), parts[1]+ } else {+ ref.Registry, ref.Repository = "docker.io", rest+ }+ if ref.Registry == "index.docker.io" || ref.Registry == "registry-1.docker.io" {+ ref.Registry = "docker.io"+ }+ if ref.Registry == "docker.io" && !strings.Contains(ref.Repository, "/") {+ ref.Repository = "library/" + ref.Repository+ }+ for _, component := range strings.Split(ref.Repository, "/") {+ if !pathComponent.MatchString(component) {+ return Reference{}, fmt.Errorf("%w: bad repository", ErrInvalidReference)+ }+ }+ if ref.Tag == "" && ref.Digest == "" {+ ref.Tag = "latest"+ }+ return ref, nil+}++// Result is the JSON body of GET /api/images/resolve.+type Result struct {+ Ref string `json:"ref"`+ ResolvedRef string `json:"resolvedRef"`+ PinnedRef string `json:"pinnedRef"`+ Digest string `json:"digest"`+ Variant string `json:"variant"`+ VariantSource string `json:"variantSource"`+ PlatformDigest *string `json:"platformDigest"`+ MediaType string `json:"mediaType"`+}++// Resolver resolves refs against the public registry allowlist.+type Resolver struct {+ Client *http.Client+ // Registries maps a ref's registry name to the host to dial.+ Registries map[string]string+ // TokenHosts are the token realm hosts the resolver may call.+ TokenHosts map[string]bool+ // Scheme is "https" in production; tests point it at httptest servers.+ Scheme string+ CacheTTL time.Duration+ Now func() time.Time++ mu sync.Mutex+ cache map[string]cacheEntry+}++type cacheEntry struct {+ result Result+ expires time.Time+}++// NewResolver returns the production resolver.+func NewResolver() *Resolver {+ r := &Resolver{+ Registries: DefaultRegistries,+ TokenHosts: DefaultTokenHosts,+ Scheme: "https",+ CacheTTL: defaultCacheTTL,+ }+ r.Client = &http.Client{Timeout: 15 * time.Second, CheckRedirect: r.checkRedirect}+ return r+}++func (r *Resolver) allowedHost(host string) bool {+ for _, apiHost := range r.Registries {+ if apiHost == host {+ return true+ }+ }+ return r.TokenHosts[host]+}++func (r *Resolver) checkRedirect(request *http.Request, via []*http.Request) error {+ if len(via) >= 5 {+ return errors.New("too many redirects")+ }+ if request.URL.Scheme != r.scheme() || !r.allowedHost(request.URL.Host) {+ return fmt.Errorf("%w: redirect to %s", ErrRegistryNotAllowed, request.URL.Host)+ }+ return nil+}++func (r *Resolver) scheme() string {+ if r.Scheme == "" {+ return "https"+ }+ return r.Scheme+}++func (r *Resolver) now() time.Time {+ if r.Now != nil {+ return r.Now()+ }+ return time.Now()+}++// VariantRef maps a canonical cua ref to the variant a runtime runs. Other+// refs are returned unchanged.+func VariantRef(ref Reference, runtime string) (Reference, error) {+ hasRootfs, canonical := canonicalRepositories[ref.Name()]+ if !canonical || ref.Tag == "" || runtime == "" {+ return ref, nil+ }+ isDisk := strings.HasSuffix(ref.Tag, canonicalDiskTagSuffix)+ switch runtime {+ case "kubevirt":+ if !isDisk {+ ref.Tag += canonicalDiskTagSuffix+ ref.Digest = ""+ }+ case "gvisor", "macos":+ if !hasRootfs {+ return Reference{}, fmt.Errorf("%w: %s is a KubeVirt containerDisk image; use runtime kubevirt", ErrUnsupported, ref.Name())+ }+ if isDisk {+ ref.Tag = strings.TrimSuffix(ref.Tag, canonicalDiskTagSuffix)+ ref.Digest = ""+ }+ default:+ return Reference{}, fmt.Errorf("%w: runtime must be kubevirt, gvisor or macos", ErrUnsupported)+ }+ return ref, nil+}++// Resolve pins raw (optionally mapped to runtime's variant) to a digest.+func (r *Resolver) Resolve(ctx context.Context, raw, runtime string) (Result, error) {+ if runtime != "" && runtime != "kubevirt" && runtime != "gvisor" && runtime != "macos" {+ return Result{}, fmt.Errorf("%w: runtime must be kubevirt, gvisor or macos", ErrUnsupported)+ }+ ref, err := ParseReference(raw)+ if err != nil {+ return Result{}, err+ }+ ref, err = VariantRef(ref, runtime)+ if err != nil {+ return Result{}, err+ }+ if _, ok := r.Registries[ref.Registry]; !ok {+ return Result{}, fmt.Errorf("%w: %s", ErrRegistryNotAllowed, ref.Registry)+ }++ key := ref.String()+ if cached, ok := r.cached(key); ok {+ cached.Ref = raw+ return cached, nil+ }+ result, err := r.resolve(ctx, ref)+ if err != nil {+ return Result{}, err+ }+ r.store(key, result)+ result.Ref = raw+ return result, nil+}++func (r *Resolver) cached(key string) (Result, bool) {+ r.mu.Lock()+ defer r.mu.Unlock()+ entry, ok := r.cache[key]+ if !ok || r.now().After(entry.expires) {+ return Result{}, false+ }+ return entry.result, true+}++func (r *Resolver) store(key string, result Result) {+ ttl := r.CacheTTL+ if ttl <= 0 {+ return+ }+ r.mu.Lock()+ defer r.mu.Unlock()+ if r.cache == nil || len(r.cache) >= maxCacheEntries {+ r.cache = map[string]cacheEntry{}+ }+ r.cache[key] = cacheEntry{result: result, expires: r.now().Add(ttl)}+}++type manifest struct {+ MediaType string `json:"mediaType"`+ Annotations map[string]string `json:"annotations"`+ Manifests []struct {+ MediaType string `json:"mediaType"`+ Digest string `json:"digest"`+ Platform *struct {+ OS string `json:"os"`+ Architecture string `json:"architecture"`+ } `json:"platform"`+ Annotations map[string]string `json:"annotations"`+ } `json:"manifests"`+}++func (r *Resolver) resolve(ctx context.Context, ref Reference) (Result, error) {+ reference := ref.Digest+ if reference == "" {+ reference = ref.Tag+ }+ host := r.Registries[ref.Registry]+ manifestURL := fmt.Sprintf("%s://%s/v2/%s/manifests/%s", r.scheme(), host, ref.Repository, reference)+ body, headers, err := r.getManifest(ctx, manifestURL, ref.Repository)+ if err != nil {+ return Result{}, err+ }++ sum := sha256.Sum256(body)+ digest := "sha256:" + hex.EncodeToString(sum[:])+ if header := headers.Get("Docker-Content-Digest"); header != "" && header != digest {+ return Result{}, fmt.Errorf("%w: registry digest header does not match the manifest", ErrUpstream)+ }+ if ref.Digest != "" && ref.Digest != digest {+ return Result{}, fmt.Errorf("%w: manifest does not match the requested digest", ErrUpstream)+ }++ var parsed manifest+ if err := json.Unmarshal(body, &parsed); err != nil {+ return Result{}, fmt.Errorf("%w: manifest is not JSON: %w", ErrUpstream, err)+ }+ mediaType := parsed.MediaType+ if mediaType == "" {+ mediaType = strings.TrimSpace(strings.Split(headers.Get("Content-Type"), ";")[0])+ }++ result := Result{+ ResolvedRef: Reference{Registry: ref.Registry, Repository: ref.Repository, Tag: ref.Tag}.String(),+ PinnedRef: ref.Name() + "@" + digest,+ Digest: digest,+ MediaType: mediaType,+ }+ if ref.Tag == "" {+ result.ResolvedRef = result.PinnedRef+ }++ variantAnnotationValue := parsed.Annotations[variantAnnotation]+ if mediaType == mediaTypeOCIIndex || mediaType == mediaTypeDockerList {+ for _, child := range parsed.Manifests {+ if child.Platform != nil && child.Platform.OS == "linux" && child.Platform.Architecture == "amd64" {+ platformDigest := child.Digest+ result.PlatformDigest = &platformDigest+ if variantAnnotationValue == "" {+ variantAnnotationValue = child.Annotations[variantAnnotation]+ }+ break+ }+ }+ }+ switch {+ case variantAnnotationValue == VariantContainerDisk || variantAnnotationValue == VariantRootfs:+ result.Variant, result.VariantSource = variantAnnotationValue, "annotation"+ case strings.HasSuffix(ref.Tag, canonicalDiskTagSuffix):+ result.Variant, result.VariantSource = VariantContainerDisk, "tag"+ default:+ result.Variant, result.VariantSource = VariantRootfs, "default"+ }+ return result, nil+}++var acceptManifests = strings.Join([]string{mediaTypeOCIIndex, mediaTypeOCIManifest, mediaTypeDockerList, mediaTypeDockerV2}, ", ")++func (r *Resolver) getManifest(ctx context.Context, manifestURL, repository string) ([]byte, http.Header, error) {+ token := ""+ for attempt := 0; attempt < 2; attempt++ {+ request, err := http.NewRequestWithContext(ctx, http.MethodGet, manifestURL, nil)+ if err != nil {+ return nil, nil, fmt.Errorf("%w: %w", ErrUpstream, err)+ }+ request.Header.Set("Accept", acceptManifests)+ if token != "" {+ request.Header.Set("Authorization", "Bearer "+token)+ }+ response, err := r.client().Do(request)+ if err != nil {+ if errors.Is(err, ErrRegistryNotAllowed) {+ return nil, nil, err+ }+ return nil, nil, fmt.Errorf("%w: %w", ErrUpstream, err)+ }+ body, readErr := readBounded(response.Body, maxManifestBytes)+ response.Body.Close()+ switch {+ case response.StatusCode == http.StatusOK:+ if readErr != nil {+ return nil, nil, fmt.Errorf("%w: %w", ErrUpstream, readErr)+ }+ return body, response.Header, nil+ case response.StatusCode == http.StatusUnauthorized && token == "":+ token, err = r.anonymousToken(ctx, response.Header.Get("WWW-Authenticate"), repository)+ if err != nil {+ return nil, nil, err+ }+ case response.StatusCode == http.StatusUnauthorized || response.StatusCode == http.StatusForbidden:+ return nil, nil, ErrUnauthorized+ case response.StatusCode == http.StatusNotFound:+ return nil, nil, ErrNotFound+ default:+ return nil, nil, fmt.Errorf("%w: registry returned %d", ErrUpstream, response.StatusCode)+ }+ }+ return nil, nil, ErrUnauthorized+}++func (r *Resolver) client() *http.Client {+ if r.Client != nil {+ return r.Client+ }+ return &http.Client{Timeout: 15 * time.Second, CheckRedirect: r.checkRedirect}+}++var challengeParam = regexp.MustCompile(`(\w+)="([^"]*)"`)++// anonymousToken performs the distribution-spec anonymous bearer flow.+func (r *Resolver) anonymousToken(ctx context.Context, challenge, repository string) (string, error) {+ if !strings.HasPrefix(strings.ToLower(challenge), "bearer ") {+ return "", ErrUnauthorized+ }+ params := map[string]string{}+ for _, match := range challengeParam.FindAllStringSubmatch(challenge, -1) {+ params[strings.ToLower(match[1])] = match[2]+ }+ realm, err := url.Parse(params["realm"])+ if err != nil {+ return "", fmt.Errorf("%w: token realm %q: %w", ErrRegistryNotAllowed, params["realm"], err)+ }+ if realm.Scheme != r.scheme() || !r.TokenHosts[realm.Host] || realm.User != nil {+ return "", fmt.Errorf("%w: token realm %q", ErrRegistryNotAllowed, params["realm"])+ }+ query := realm.Query()+ if service := params["service"]; service != "" {+ query.Set("service", service)+ }+ query.Set("scope", "repository:"+repository+":pull")+ realm.RawQuery = query.Encode()++ request, err := http.NewRequestWithContext(ctx, http.MethodGet, realm.String(), nil)+ if err != nil {+ return "", fmt.Errorf("%w: %w", ErrUpstream, err)+ }+ response, err := r.client().Do(request)+ if err != nil {+ return "", fmt.Errorf("%w: %w", ErrUpstream, err)+ }+ defer response.Body.Close()+ if response.StatusCode == http.StatusUnauthorized || response.StatusCode == http.StatusForbidden {+ return "", ErrUnauthorized+ }+ if response.StatusCode != http.StatusOK {+ return "", fmt.Errorf("%w: token endpoint returned %d", ErrUpstream, response.StatusCode)+ }+ body, err := readBounded(response.Body, maxTokenBytes)+ if err != nil {+ return "", fmt.Errorf("%w: %w", ErrUpstream, err)+ }+ var tokens struct {+ Token string `json:"token"`+ AccessToken string `json:"access_token"`+ }+ if err := json.Unmarshal(body, &tokens); err != nil {+ return "", fmt.Errorf("%w: token response is not JSON: %w", ErrUpstream, err)+ }+ if tokens.Token != "" {+ return tokens.Token, nil+ }+ if tokens.AccessToken != "" {+ return tokens.AccessToken, nil+ }+ return "", ErrUnauthorized+}++func readBounded(reader io.Reader, limit int64) ([]byte, error) {+ body, err := io.ReadAll(io.LimitReader(reader, limit+1))+ if err != nil {+ return nil, err+ }+ if int64(len(body)) > limit {+ return nil, fmt.Errorf("response exceeds %d bytes", limit)+ }+ return body, nil+}diff --git a/libs/fleet/backend/imageresolve/resolve_test.go b/libs/fleet/backend/imageresolve/resolve_test.gonew file mode 100644index 0000000000..27990bd88e--- /dev/null+++ b/libs/fleet/backend/imageresolve/resolve_test.go@@ -0,0 +1,306 @@+package imageresolve++import (+ "context"+ "crypto/sha256"+ "encoding/hex"+ "errors"+ "fmt"+ "net/http"+ "net/http/httptest"+ "net/url"+ "strings"+ "sync/atomic"+ "testing"+ "time"+)++func digestOf(body string) string {+ sum := sha256.Sum256([]byte(body))+ return "sha256:" + hex.EncodeToString(sum[:])+}++func TestParseReference(t *testing.T) {+ digest := "sha256:" + strings.Repeat("a", 64)+ for _, testCase := range []struct {+ in string+ want string+ }{+ {"python:3.12-slim", "docker.io/library/python:3.12-slim"},+ {"python", "docker.io/library/python:latest"},+ {"acme/app:1", "docker.io/acme/app:1"},+ {"index.docker.io/library/redis:7", "docker.io/library/redis:7"},+ {"ghcr.io/trycua/linux:24.04", "ghcr.io/trycua/linux:24.04"},+ {"ghcr.io/trycua/linux@" + digest, "ghcr.io/trycua/linux@" + digest},+ {"ghcr.io/trycua/linux:24.04@" + digest, "ghcr.io/trycua/linux:24.04@" + digest},+ {"localhost:5000/app:1", "localhost:5000/app:1"},+ {"GHCR.io/trycua/linux:24.04", "ghcr.io/trycua/linux:24.04"},+ } {+ got, err := ParseReference(testCase.in)+ if err != nil || got.String() != testCase.want {+ t.Errorf("ParseReference(%q) = %q, %v; want %q", testCase.in, got.String(), err, testCase.want)+ }+ }+ for _, bad := range []string{"", "a b", "ghcr.io/Trycua/linux:1", "ghcr.io/x@sha256:short", "ghcr.io/x:bad/tag", strings.Repeat("a", 1100)} {+ if _, err := ParseReference(bad); !errors.Is(err, ErrInvalidReference) {+ t.Errorf("ParseReference(%q) err = %v; want ErrInvalidReference", bad, err)+ }+ }+}++func TestVariantRefMapsCanonicalImages(t *testing.T) {+ for _, testCase := range []struct {+ in, runtime, want string+ wantErr bool+ }{+ {"ghcr.io/trycua/linux:24.04", "kubevirt", "ghcr.io/trycua/linux:24.04-disk", false},+ {"ghcr.io/trycua/linux:24.04-disk", "kubevirt", "ghcr.io/trycua/linux:24.04-disk", false},+ {"ghcr.io/trycua/linux:24.04-disk", "gvisor", "ghcr.io/trycua/linux:24.04", false},+ {"ghcr.io/trycua/linux:24.04", "gvisor", "ghcr.io/trycua/linux:24.04", false},+ {"ghcr.io/trycua/linux:24.04", "", "ghcr.io/trycua/linux:24.04", false},+ {"ghcr.io/trycua/windows:2022-disk", "kubevirt", "ghcr.io/trycua/windows:2022-disk", false},+ {"ghcr.io/trycua/windows:2022-disk", "gvisor", "", true},+ {"python:3.12", "kubevirt", "docker.io/library/python:3.12", false},+ {"ghcr.io/trycua/linux:24.04", "docker", "", true},+ } {+ ref, err := ParseReference(testCase.in)+ if err != nil {+ t.Fatal(err)+ }+ got, err := VariantRef(ref, testCase.runtime)+ if testCase.wantErr {+ if !errors.Is(err, ErrUnsupported) {+ t.Errorf("VariantRef(%q, %q) err = %v; want ErrUnsupported", testCase.in, testCase.runtime, err)+ }+ continue+ }+ if err != nil || got.String() != testCase.want {+ t.Errorf("VariantRef(%q, %q) = %q, %v; want %q", testCase.in, testCase.runtime, got.String(), err, testCase.want)+ }+ }+}++// fakeRegistry is a distribution-spec registry that demands the anonymous+// bearer flow, like ghcr.io and Docker Hub.+type fakeRegistry struct {+ server *httptest.Server+ manifests map[string]string // "<repo>:<ref>" -> body+ gets atomic.Int32+ nonGets atomic.Int32+}++func newFakeRegistry(t *testing.T) *fakeRegistry {+ registry := &fakeRegistry{manifests: map[string]string{}}+ registry.server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ if r.Method != http.MethodGet {+ registry.nonGets.Add(1)+ }+ if r.URL.Path == "/token" {+ if !strings.HasPrefix(r.URL.Query().Get("scope"), "repository:") {+ http.Error(w, "scope", http.StatusBadRequest)+ return+ }+ fmt.Fprint(w, `{"token":"anon"}`)+ return+ }+ if r.Header.Get("Authorization") != "Bearer anon" {+ w.Header().Set("WWW-Authenticate", fmt.Sprintf(`Bearer realm="%s/token",service="fake",scope="repository:x:pull"`, registry.server.URL))+ w.WriteHeader(http.StatusUnauthorized)+ return+ }+ registry.gets.Add(1)+ path := strings.TrimPrefix(r.URL.Path, "/v2/")+ repository, reference, ok := strings.Cut(path, "/manifests/")+ if !ok {+ http.NotFound(w, r)+ return+ }+ body, ok := registry.manifests[repository+":"+reference]+ if !ok {+ http.NotFound(w, r)+ return+ }+ w.Header().Set("Docker-Content-Digest", digestOf(body))+ fmt.Fprint(w, body)+ }))+ t.Cleanup(registry.server.Close)+ return registry+}++func (registry *fakeRegistry) resolver() *Resolver {+ host := strings.TrimPrefix(registry.server.URL, "http://")+ resolver := &Resolver{+ Registries: map[string]string{"ghcr.io": host, "docker.io": host},+ TokenHosts: map[string]bool{host: true},+ Scheme: "http",+ CacheTTL: time.Minute,+ }+ resolver.Client = &http.Client{Timeout: 5 * time.Second, CheckRedirect: resolver.checkRedirect}+ return resolver+}++const linuxIndex = `{"schemaVersion":2,"mediaType":"application/vnd.oci.image.index.v1+json","manifests":[{"mediaType":"application/vnd.oci.image.manifest.v1+json","digest":"sha256:1111111111111111111111111111111111111111111111111111111111111111","platform":{"os":"linux","architecture":"arm64"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","digest":"sha256:2222222222222222222222222222222222222222222222222222222222222222","platform":{"os":"linux","architecture":"amd64"}}]}`++const diskIndex = `{"schemaVersion":2,"mediaType":"application/vnd.oci.image.index.v1+json","annotations":{"ai.cua.image.variant":"containerdisk"},"manifests":[{"mediaType":"application/vnd.oci.image.manifest.v1+json","digest":"sha256:3333333333333333333333333333333333333333333333333333333333333333","platform":{"os":"linux","architecture":"amd64"}}]}`++const plainManifest = `{"schemaVersion":2,"mediaType":"application/vnd.docker.distribution.manifest.v2+json","config":{"digest":"sha256:4444444444444444444444444444444444444444444444444444444444444444"}}`++func TestResolvePinsCanonicalVariantsThroughTheAnonymousTokenFlow(t *testing.T) {+ registry := newFakeRegistry(t)+ registry.manifests["trycua/linux:24.04"] = linuxIndex+ registry.manifests["trycua/linux:24.04-disk"] = diskIndex+ resolver := registry.resolver()++ rootfs, err := resolver.Resolve(context.Background(), "ghcr.io/trycua/linux:24.04", "gvisor")+ if err != nil {+ t.Fatal(err)+ }+ if rootfs.Variant != VariantRootfs || rootfs.VariantSource != "default" ||+ rootfs.PinnedRef != "ghcr.io/trycua/linux@"+digestOf(linuxIndex) ||+ rootfs.PlatformDigest == nil || *rootfs.PlatformDigest != "sha256:"+strings.Repeat("2", 64) ||+ rootfs.MediaType != mediaTypeOCIIndex {+ t.Fatalf("rootfs = %+v", rootfs)+ }++ disk, err := resolver.Resolve(context.Background(), "ghcr.io/trycua/linux:24.04", "kubevirt")+ if err != nil {+ t.Fatal(err)+ }+ if disk.Ref != "ghcr.io/trycua/linux:24.04" || disk.ResolvedRef != "ghcr.io/trycua/linux:24.04-disk" ||+ disk.Variant != VariantContainerDisk || disk.VariantSource != "annotation" ||+ disk.Digest != digestOf(diskIndex) {+ t.Fatalf("disk = %+v", disk)+ }++ // Cached: a second resolve does not hit the registry.+ before := registry.gets.Load()+ if _, err := resolver.Resolve(context.Background(), "ghcr.io/trycua/linux:24.04", "kubevirt"); err != nil {+ t.Fatal(err)+ }+ if registry.gets.Load() != before {+ t.Fatal("cached resolve reached the registry")+ }+ // Read-only: the resolver only ever issues GETs (manifest and token).+ if registry.nonGets.Load() != 0 {+ t.Fatalf("resolver sent %d non-GET requests", registry.nonGets.Load())+ }+}++func TestResolveShortRefsAndDigestRefs(t *testing.T) {+ registry := newFakeRegistry(t)+ registry.manifests["library/python:3.12-slim"] = plainManifest+ registry.manifests["library/python:"+digestOf(plainManifest)] = plainManifest+ resolver := registry.resolver()++ result, err := resolver.Resolve(context.Background(), "python:3.12-slim", "")+ if err != nil {+ t.Fatal(err)+ }+ if result.PinnedRef != "docker.io/library/python@"+digestOf(plainManifest) || result.PlatformDigest != nil || result.Variant != VariantRootfs {+ t.Fatalf("result = %+v", result)+ }+ pinned, err := resolver.Resolve(context.Background(), result.PinnedRef, "")+ if err != nil || pinned.Digest != result.Digest || pinned.ResolvedRef != result.PinnedRef {+ t.Fatalf("pinned = %+v, %v", pinned, err)+ }+}++func TestResolveErrors(t *testing.T) {+ registry := newFakeRegistry(t)+ resolver := registry.resolver()+ ctx := context.Background()++ if _, err := resolver.Resolve(ctx, "ghcr.io/trycua/missing:1", ""); !errors.Is(err, ErrNotFound) {+ t.Errorf("missing: %v", err)+ }+ if _, err := resolver.Resolve(ctx, "evil.internal/app:1", ""); !errors.Is(err, ErrRegistryNotAllowed) {+ t.Errorf("unlisted registry: %v", err)+ }+ if _, err := resolver.Resolve(ctx, "169.254.169.254/latest:1", ""); !errors.Is(err, ErrRegistryNotAllowed) {+ t.Errorf("metadata host: %v", err)+ }+ if _, err := resolver.Resolve(ctx, "ghcr.io/trycua/linux:24.04", "docker"); !errors.Is(err, ErrUnsupported) {+ t.Errorf("runtime: %v", err)+ }+ if _, err := resolver.Resolve(ctx, "not a ref", ""); !errors.Is(err, ErrInvalidReference) {+ t.Errorf("invalid: %v", err)+ }+}++func TestResolveRefusesTokenRealmsOffTheAllowlist(t *testing.T) {+ var realmHits atomic.Int32+ realm := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ realmHits.Add(1)+ fmt.Fprint(w, `{"token":"x"}`)+ }))+ defer realm.Close()+ registry := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ w.Header().Set("WWW-Authenticate", fmt.Sprintf(`Bearer realm="%s/token",service="x"`, realm.URL))+ w.WriteHeader(http.StatusUnauthorized)+ }))+ defer registry.Close()+ host := strings.TrimPrefix(registry.URL, "http://")+ resolver := &Resolver{Registries: map[string]string{"ghcr.io": host}, TokenHosts: map[string]bool{host: true}, Scheme: "http"}++ if _, err := resolver.Resolve(context.Background(), "ghcr.io/a/b:1", ""); !errors.Is(err, ErrRegistryNotAllowed) {+ t.Fatalf("err = %v", err)+ }+ if realmHits.Load() != 0 {+ t.Fatal("resolver called a token realm outside the allowlist")+ }+}++func TestResolveRefusesRedirectsOffTheAllowlist(t *testing.T) {+ var elsewhereHits atomic.Int32+ elsewhere := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ elsewhereHits.Add(1)+ }))+ defer elsewhere.Close()+ registry := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ http.Redirect(w, r, elsewhere.URL+"/v2/x", http.StatusTemporaryRedirect)+ }))+ defer registry.Close()+ host := strings.TrimPrefix(registry.URL, "http://")+ resolver := &Resolver{Registries: map[string]string{"ghcr.io": host}, TokenHosts: map[string]bool{}, Scheme: "http"}+ resolver.Client = &http.Client{CheckRedirect: resolver.checkRedirect}++ if _, err := resolver.Resolve(context.Background(), "ghcr.io/a/b:1", ""); !errors.Is(err, ErrRegistryNotAllowed) {+ t.Fatalf("err = %v", err)+ }+ if elsewhereHits.Load() != 0 {+ t.Fatal("resolver followed a redirect off the allowlist")+ }+}++func TestResolveRejectsDigestMismatchAndOversizedManifests(t *testing.T) {+ registry := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ if strings.HasSuffix(r.URL.Path, "/big") {+ w.Write([]byte(strings.Repeat(" ", maxManifestBytes+1)))+ return+ }+ w.Header().Set("Docker-Content-Digest", "sha256:"+strings.Repeat("0", 64))+ fmt.Fprint(w, plainManifest)+ }))+ defer registry.Close()+ host := strings.TrimPrefix(registry.URL, "http://")+ resolver := &Resolver{Registries: map[string]string{"ghcr.io": host}, TokenHosts: map[string]bool{}, Scheme: "http"}++ if _, err := resolver.Resolve(context.Background(), "ghcr.io/a/b:1", ""); !errors.Is(err, ErrUpstream) {+ t.Fatalf("mismatch err = %v", err)+ }+ if _, err := resolver.Resolve(context.Background(), "ghcr.io/a/b:big", ""); !errors.Is(err, ErrUpstream) {+ t.Fatalf("oversized err = %v", err)+ }+}++func TestDefaultRegistriesAreHTTPSHostsOnly(t *testing.T) {+ resolver := NewResolver()+ if resolver.scheme() != "https" {+ t.Fatal("production scheme must be https")+ }+ for name, host := range DefaultRegistries {+ if _, err := url.Parse("https://" + host); err != nil || strings.ContainsAny(host, "/@") {+ t.Errorf("registry %s host %q is not a bare host", name, host)+ }+ }+}diff --git a/libs/fleet/backend/main.go b/libs/fleet/backend/main.goindex 3b06657599..28709ac497 100644--- a/libs/fleet/backend/main.go+++ b/libs/fleet/backend/main.go@@ -195,6 +195,8 @@ func setupRouter(c handlers.Handlers) http.Handler {r.Handle("POST /api/image-uploads/presign",withAuthenticatedMiddlewares("/api/image-uploads/presign", c.PresignImageUploads))+ r.Handle("GET /api/images/resolve",+ withAuthenticatedMiddlewares("/api/images/resolve", c.ResolveImage))// Stripe-hosted billing. Browser routes require the normal SPA JWT; the// webhook uses Stripe signature verification as its authentication boundary.diff --git a/libs/fleet/scripts/generate-sdk-bindings.sh b/libs/fleet/scripts/generate-sdk-bindings.shindex b0db877690..15686df436 100755--- a/libs/fleet/scripts/generate-sdk-bindings.sh+++ b/libs/fleet/scripts/generate-sdk-bindings.sh@@ -905,10 +905,10 @@ def replace_buffer(match):f"{indent})")text, buffer_replacements = re.subn(buffer_pattern, replace_buffer, text)-if buffer_replacements != 34:- raise SystemExit(f"expected 34 Ruby Rust-buffer future wrappers, found {buffer_replacements}")-if len(re.findall(r"result = FleetSdk\.rust_call_with_error\(SdkBuildError,:uniffi_[a-z0-9_]*builder_build,", text)) != 8:- raise SystemExit("expected eight synchronous Ruby SDK builder build calls")+if buffer_replacements != 36:+ raise SystemExit(f"expected 36 Ruby Rust-buffer future wrappers, found {buffer_replacements}")+if len(re.findall(r"result = FleetSdk\.rust_call_with_error\(SdkBuildError,:uniffi_[a-z0-9_]*builder_build,", text)) != 9:+ raise SystemExit("expected nine synchronous Ruby SDK builder build calls")void_pattern = r"(?m)^(\s*)FleetSdk\.rust_call_with_error\(([^,]+),:([a-z0-9_]+),(.*)\)$"def replace_void(match):@@ -921,8 +921,8 @@ def replace_void(match):f"{indent})")text, void_replacements = re.subn(void_pattern, replace_void, text)-if void_replacements != 7:- raise SystemExit(f"expected 7 Ruby void future wrappers, found {void_replacements}")+if void_replacements != 8:+ raise SystemExit(f"expected 8 Ruby void future wrappers, found {void_replacements}")handle_map_anchor = """def self.uniffi_bytes(v)raise TypeError, \"no implicit conversion of #{v} into String\" unless v.respond_to?(:to_str)diff --git a/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.go b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.goindex c16bb804a8..6783293a6f 100644--- a/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.go+++ b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.go@@ -1399,6 +1399,9 @@ type VmTemplate struct {Services *[]SandboxServiceOidc *OidcConfigClaimSecrets *bool+ Args *[]string+ Env *map[string]string+ ProcessMode *ProcessMode}func (r *VmTemplate) Destroy() {@@ -1418,6 +1421,9 @@ func (r *VmTemplate) Destroy() {FfiDestroyerOptionalSequenceSandboxService{}.Destroy(r.Services)FfiDestroyerOptionalOidcConfig{}.Destroy(r.Oidc)FfiDestroyerOptionalBool{}.Destroy(r.ClaimSecrets)+ FfiDestroyerOptionalSequenceString{}.Destroy(r.Args)+ FfiDestroyerOptionalMapStringString{}.Destroy(r.Env)+ FfiDestroyerOptionalProcessMode{}.Destroy(r.ProcessMode)}type FfiConverterVmTemplate struct{}@@ -1446,6 +1452,9 @@ func (c FfiConverterVmTemplate) Read(reader io.Reader) VmTemplate {FfiConverterOptionalSequenceSandboxServiceINSTANCE.Read(reader),FfiConverterOptionalOidcConfigINSTANCE.Read(reader),FfiConverterOptionalBoolINSTANCE.Read(reader),+ FfiConverterOptionalSequenceStringINSTANCE.Read(reader),+ FfiConverterOptionalMapStringStringINSTANCE.Read(reader),+ FfiConverterOptionalProcessModeINSTANCE.Read(reader),}}@@ -1474,6 +1483,9 @@ func (c FfiConverterVmTemplate) Write(writer io.Writer, value VmTemplate) {FfiConverterOptionalSequenceSandboxServiceINSTANCE.Write(writer, value.Services)FfiConverterOptionalOidcConfigINSTANCE.Write(writer, value.Oidc)FfiConverterOptionalBoolINSTANCE.Write(writer, value.ClaimSecrets)+ FfiConverterOptionalSequenceStringINSTANCE.Write(writer, value.Args)+ FfiConverterOptionalMapStringStringINSTANCE.Write(writer, value.Env)+ FfiConverterOptionalProcessModeINSTANCE.Write(writer, value.ProcessMode)}type FfiDestroyerVmTemplate struct{}@@ -1709,6 +1721,48 @@ func (_ FfiDestroyerJsonValueError) Destroy(value *JsonValueError) {}}+// How `vmTemplate.command`/`args`/`env` reach the sandbox+// (`vmTemplate.processMode`). Absent means `Legacy`.+type ProcessMode uint++const (+ // What templates did before processMode existed: pod runtimes run+ // command/args/env; KubeVirt ignores command and refuses args/env.+ ProcessModeLegacy ProcessMode = 1+ // Every runtime runs command/args/env. Pod runtimes set them on the+ // sandbox container; KubeVirt renders them into the sandbox's cloud-init.+ ProcessModeRun ProcessMode = 2+)++type FfiConverterProcessMode struct{}++var FfiConverterProcessModeINSTANCE = FfiConverterProcessMode{}++func (c FfiConverterProcessMode) Lift(rb RustBufferI) ProcessMode {+ return LiftFromRustBuffer[ProcessMode](c, rb)+}++func (c FfiConverterProcessMode) Lower(value ProcessMode) C.RustBuffer {+ return LowerIntoRustBuffer[ProcessMode](c, value)+}++func (c FfiConverterProcessMode) LowerExternal(value ProcessMode) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[ProcessMode](c, value))+}+func (FfiConverterProcessMode) Read(reader io.Reader) ProcessMode {+ id := readInt32(reader)+ return ProcessMode(id)+}++func (FfiConverterProcessMode) Write(writer io.Writer, value ProcessMode) {+ writeInt32(writer, int32(value))+}++type FfiDestroyerProcessMode struct{}++func (_ FfiDestroyerProcessMode) Destroy(value ProcessMode) {+}+type RuntimeKind uintconst (@@ -2389,6 +2443,47 @@ func (_ FfiDestroyerOptionalImagePullPolicy) Destroy(value *ImagePullPolicy) {}}+type FfiConverterOptionalProcessMode struct{}++var FfiConverterOptionalProcessModeINSTANCE = FfiConverterOptionalProcessMode{}++func (c FfiConverterOptionalProcessMode) Lift(rb RustBufferI) *ProcessMode {+ return LiftFromRustBuffer[*ProcessMode](c, rb)+}++func (_ FfiConverterOptionalProcessMode) Read(reader io.Reader) *ProcessMode {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterProcessModeINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalProcessMode) Lower(value *ProcessMode) C.RustBuffer {+ return LowerIntoRustBuffer[*ProcessMode](c, value)+}++func (c FfiConverterOptionalProcessMode) LowerExternal(value *ProcessMode) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*ProcessMode](c, value))+}++func (_ FfiConverterOptionalProcessMode) Write(writer io.Writer, value *ProcessMode) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterProcessModeINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalProcessMode struct{}++func (_ FfiDestroyerOptionalProcessMode) Destroy(value *ProcessMode) {+ if value != nil {+ FfiDestroyerProcessMode{}.Destroy(*value)+ }+}+type FfiConverterOptionalRuntimeKind struct{}var FfiConverterOptionalRuntimeKindINSTANCE = FfiConverterOptionalRuntimeKind{}diff --git a/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.h b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.hindex 03a69a6c00..7b7b0812ef 100644--- a/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.h+++ b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.h@@ -446,6 +446,11 @@ void uniffi_cyclops_sdk_schema_fn_free_vmtemplatebuilder(uint64_t handle, RustCa#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_CONSTRUCTOR_VMTEMPLATEBUILDER_NEWuint64_t uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new(RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_ARGS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_ARGS+uint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(uint64_t ptr, RustBuffer value, RustCallStatus *out_status);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_BUILD@@ -473,6 +478,11 @@ uint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_container_disk_imuint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores(uint64_t ptr, uint32_t value, RustCallStatus *out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_ENV+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_ENV+uint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(uint64_t ptr, RustBuffer value, RustCallStatus *out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_FIRMWARE#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_FIRMWAREuint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware(uint64_t ptr, RustBuffer value, RustCallStatus *out_status@@ -513,6 +523,11 @@ uint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_oidc(uint64_t ptruint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes(uint64_t ptr, uint64_t value, RustCallStatus *out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_PROCESS_MODE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_PROCESS_MODE+uint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(uint64_t ptr, RustBuffer value, RustCallStatus *out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_RUNTIME#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_RUNTIMEuint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime(uint64_t ptr, RustBuffer value, RustCallStatus *out_status@@ -960,6 +975,12 @@ uint16_t uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_bui#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_SANDBOXTEMPLATEREFBUILDER_NAMEuint16_t uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_ARGS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_ARGS+uint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_BUILD@@ -990,6 +1011,12 @@ uint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_container_d#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_CPU_CORESuint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_ENV+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_ENV+uint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_FIRMWARE@@ -1038,6 +1065,12 @@ uint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_oidc(void#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_PROBESuint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_PROCESS_MODE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_PROCESS_MODE+uint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_RUNTIMEdiff --git a/libs/fleet/sdk-bindings/go-uniffi/fleet_sdk/fleet_sdk.go b/libs/fleet/sdk-bindings/go-uniffi/fleet_sdk/fleet_sdk.goindex adc77f3094..2c1ad2be77 100644--- a/libs/fleet/sdk-bindings/go-uniffi/fleet_sdk/fleet_sdk.go+++ b/libs/fleet/sdk-bindings/go-uniffi/fleet_sdk/fleet_sdk.go@@ -394,6 +394,15 @@ func uniffiCheckChecksums() {panic("fleet_sdk: uniffi_cyclops_sdk_checksum_func_fleet_label_key: UniFFI API checksum mismatch")}}+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix()+ })+ if checksum != 63379 {+ // If this happens try cleaning and rebuilding your project+ panic("fleet_sdk: uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix: UniFFI API checksum mismatch")+ }+ }{checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {return C.uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status()@@ -664,6 +673,33 @@ func uniffiCheckChecksums() {panic("fleet_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool: UniFFI API checksum mismatch")}}+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret()+ })+ if checksum != 5524 {+ // If this happens try cleaning and rebuilding your project+ panic("fleet_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret()+ })+ if checksum != 778 {+ // If this happens try cleaning and rebuilding your project+ panic("fleet_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image()+ })+ if checksum != 1395 {+ // If this happens try cleaning and rebuilding your project+ panic("fleet_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image: UniFFI API checksum mismatch")+ }+ }{checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request()@@ -790,6 +826,7 @@ func uniffiCheckChecksums() {panic("fleet_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_api_keys: UniFFI API checksum mismatch")}}+{checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {return C.uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token()@@ -1459,6 +1496,15 @@ type CyclopsClientInterface interface {ListPools(namespace string) ([]Pool, error)ReconcilePool(request CreatePoolRequest) (Pool, error)UpdatePool(pool Pool) (Pool, error)+ // Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ // On a name conflict the old Secret is deleted and the new one created,+ // since the gateway admits no Secret update.+ CreateRegistrySecret(request CreateRegistrySecretRequest) (RegistrySecret, error)+ DeleteRegistrySecret(namespace string, name string) error+ // Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ // `kubevirt`, `macos`) selects the variant for canonical cua images:+ // `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+ ResolveImage(reference string, runtime *string) (ResolvedImage, error)ServiceRequest(sandbox Sandbox, service string, path string, request HttpRequest) (HttpResponse, error)// Where a native client opens its own WebSocket to a sandbox service:// the gateway's `/api/svc` proxy forwards the HTTP upgrade, so the@@ -2455,6 +2501,113 @@ func (_self *CyclopsClient) UpdatePool(pool Pool) (Pool, error) {return res, err}+// Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+// On a name conflict the old Secret is deleted and the new one created,+// since the gateway admits no Secret update.+func (_self *CyclopsClient) CreateRegistrySecret(request CreateRegistrySecretRequest) (RegistrySecret, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) RegistrySecret {+ return FfiConverterRegistrySecretINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(+ _pointer, FfiConverterCreateRegistrySecretRequestINSTANCE.Lower(request)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}++func (_self *CyclopsClient) DeleteRegistrySecret(namespace string, name string) error {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ _, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) struct{} {+ C.ffi_cyclops_sdk_rust_future_complete_void(handle, status)+ return struct{}{}+ },+ // liftFn+ func(_ struct{}) struct{} { return struct{}{} },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(+ _pointer, FfiConverterStringINSTANCE.Lower(namespace), FfiConverterStringINSTANCE.Lower(name)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_void(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_void(handle)+ },+ )++ if err == nil {+ return nil+ }++ return err+}++// Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+// `kubevirt`, `macos`) selects the variant for canonical cua images:+// `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+func (_self *CyclopsClient) ResolveImage(reference string, runtime *string) (ResolvedImage, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) ResolvedImage {+ return FfiConverterResolvedImageINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(+ _pointer, FfiConverterStringINSTANCE.Lower(reference), FfiConverterOptionalStringINSTANCE.Lower(runtime)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}+func (_self *CyclopsClient) ServiceRequest(sandbox Sandbox, service string, path string, request HttpRequest) (HttpResponse, error) {_pointer := _self.ffiObject.incrementPointer("*CyclopsClient")defer _self.ffiObject.decrementPointer()@@ -3444,6 +3597,69 @@ func (_ FfiDestroyerCreatePoolRequest) Destroy(value CreatePoolRequest) {value.Destroy()}+// Credentials for one registry, stored as a `cua-registry-*` pull Secret.+type CreateRegistrySecretRequest struct {+ // Pool namespace the Secret is created in. It must already exist (the+ // pool's namespace, created by `create_pool`, or by `create_namespace`).+ Namespace string+ // Full Secret name, `cua-registry-<dns-label>`.+ Name string+ // Registry host the credentials are for, as image refs spell it, e.g.+ // `ghcr.io`, `registry.example.com:5000` or `docker.io`.+ Registry string+ Username string+ // Password or access token. Never serialized by `Debug`.+ Password string+}++func (r *CreateRegistrySecretRequest) Destroy() {+ FfiDestroyerString{}.Destroy(r.Namespace)+ FfiDestroyerString{}.Destroy(r.Name)+ FfiDestroyerString{}.Destroy(r.Registry)+ FfiDestroyerString{}.Destroy(r.Username)+ FfiDestroyerString{}.Destroy(r.Password)+}++type FfiConverterCreateRegistrySecretRequest struct{}++var FfiConverterCreateRegistrySecretRequestINSTANCE = FfiConverterCreateRegistrySecretRequest{}++func (c FfiConverterCreateRegistrySecretRequest) Lift(rb RustBufferI) CreateRegistrySecretRequest {+ return LiftFromRustBuffer[CreateRegistrySecretRequest](c, rb)+}++func (c FfiConverterCreateRegistrySecretRequest) Read(reader io.Reader) CreateRegistrySecretRequest {+ return CreateRegistrySecretRequest{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterCreateRegistrySecretRequest) Lower(value CreateRegistrySecretRequest) C.RustBuffer {+ return LowerIntoRustBuffer[CreateRegistrySecretRequest](c, value)+}++func (c FfiConverterCreateRegistrySecretRequest) LowerExternal(value CreateRegistrySecretRequest) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[CreateRegistrySecretRequest](c, value))+}++func (c FfiConverterCreateRegistrySecretRequest) Write(writer io.Writer, value CreateRegistrySecretRequest) {+ FfiConverterStringINSTANCE.Write(writer, value.Namespace)+ FfiConverterStringINSTANCE.Write(writer, value.Name)+ FfiConverterStringINSTANCE.Write(writer, value.Registry)+ FfiConverterStringINSTANCE.Write(writer, value.Username)+ FfiConverterStringINSTANCE.Write(writer, value.Password)+}++type FfiDestroyerCreateRegistrySecretRequest struct{}++func (_ FfiDestroyerCreateRegistrySecretRequest) Destroy(value CreateRegistrySecretRequest) {+ value.Destroy()+}+type CreateSignedServiceUrlRequest struct {Sandbox SandboxService string@@ -4407,6 +4623,127 @@ func (_ FfiDestroyerPresignedPut) Destroy(value PresignedPut) {value.Destroy()}+// A created registry pull Secret. Carries no credential: Secrets are+// write-only through the gateway.+type RegistrySecret struct {+ Namespace string+ Name string+ Registry string+}++func (r *RegistrySecret) Destroy() {+ FfiDestroyerString{}.Destroy(r.Namespace)+ FfiDestroyerString{}.Destroy(r.Name)+ FfiDestroyerString{}.Destroy(r.Registry)+}++type FfiConverterRegistrySecret struct{}++var FfiConverterRegistrySecretINSTANCE = FfiConverterRegistrySecret{}++func (c FfiConverterRegistrySecret) Lift(rb RustBufferI) RegistrySecret {+ return LiftFromRustBuffer[RegistrySecret](c, rb)+}++func (c FfiConverterRegistrySecret) Read(reader io.Reader) RegistrySecret {+ return RegistrySecret{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterRegistrySecret) Lower(value RegistrySecret) C.RustBuffer {+ return LowerIntoRustBuffer[RegistrySecret](c, value)+}++func (c FfiConverterRegistrySecret) LowerExternal(value RegistrySecret) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[RegistrySecret](c, value))+}++func (c FfiConverterRegistrySecret) Write(writer io.Writer, value RegistrySecret) {+ FfiConverterStringINSTANCE.Write(writer, value.Namespace)+ FfiConverterStringINSTANCE.Write(writer, value.Name)+ FfiConverterStringINSTANCE.Write(writer, value.Registry)+}++type FfiDestroyerRegistrySecret struct{}++func (_ FfiDestroyerRegistrySecret) Destroy(value RegistrySecret) {+ value.Destroy()+}++// A registry ref pinned by the gateway (`GET /api/images/resolve`).+type ResolvedImage struct {+ // The ref as requested.+ Reference string+ // The ref actually resolved: for a canonical image and runtime+ // `kubevirt` this is the containerDisk sibling (`…:24.04-disk`).+ ResolvedRef string+ // `repo@sha256:…` of the manifest (or index) to run.+ PinnedRef string+ Digest string+ // `rootfs` (docker/gVisor), `containerdisk` (KubeVirt) or `unknown`.+ Variant string+ // The linux/amd64 child manifest digest when the ref is an index.+ PlatformDigest *string+ MediaType string+}++func (r *ResolvedImage) Destroy() {+ FfiDestroyerString{}.Destroy(r.Reference)+ FfiDestroyerString{}.Destroy(r.ResolvedRef)+ FfiDestroyerString{}.Destroy(r.PinnedRef)+ FfiDestroyerString{}.Destroy(r.Digest)+ FfiDestroyerString{}.Destroy(r.Variant)+ FfiDestroyerOptionalString{}.Destroy(r.PlatformDigest)+ FfiDestroyerString{}.Destroy(r.MediaType)+}++type FfiConverterResolvedImage struct{}++var FfiConverterResolvedImageINSTANCE = FfiConverterResolvedImage{}++func (c FfiConverterResolvedImage) Lift(rb RustBufferI) ResolvedImage {+ return LiftFromRustBuffer[ResolvedImage](c, rb)+}++func (c FfiConverterResolvedImage) Read(reader io.Reader) ResolvedImage {+ return ResolvedImage{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterResolvedImage) Lower(value ResolvedImage) C.RustBuffer {+ return LowerIntoRustBuffer[ResolvedImage](c, value)+}++func (c FfiConverterResolvedImage) LowerExternal(value ResolvedImage) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[ResolvedImage](c, value))+}++func (c FfiConverterResolvedImage) Write(writer io.Writer, value ResolvedImage) {+ FfiConverterStringINSTANCE.Write(writer, value.Reference)+ FfiConverterStringINSTANCE.Write(writer, value.ResolvedRef)+ FfiConverterStringINSTANCE.Write(writer, value.PinnedRef)+ FfiConverterStringINSTANCE.Write(writer, value.Digest)+ FfiConverterStringINSTANCE.Write(writer, value.Variant)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.PlatformDigest)+ FfiConverterStringINSTANCE.Write(writer, value.MediaType)+}++type FfiDestroyerResolvedImage struct{}++func (_ FfiDestroyerResolvedImage) Destroy(value ResolvedImage) {+ value.Destroy()+}+type ResourceMetadata struct {Namespace stringName string@@ -6711,6 +7048,15 @@ func FleetLabelKey() string {}))}+// The name prefix every tenant registry pull Secret must carry.+func RegistrySecretNamePrefix() string {+ return FfiConverterStringINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) RustBufferI {+ return GoRustBuffer{+ inner: C.uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(_uniffiStatus),+ }+ }))+}+func HealthyPoolDisplayStatus() PoolDisplayStatus {return FfiConverterPoolDisplayStatusINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) RustBufferI {return GoRustBuffer{diff --git a/libs/fleet/sdk-bindings/go-uniffi/fleet_sdk/fleet_sdk.h b/libs/fleet/sdk-bindings/go-uniffi/fleet_sdk/fleet_sdk.hindex a0cf886665..f8c30072d9 100644--- a/libs/fleet/sdk-bindings/go-uniffi/fleet_sdk/fleet_sdk.h+++ b/libs/fleet/sdk-bindings/go-uniffi/fleet_sdk/fleet_sdk.h@@ -586,6 +586,21 @@ uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_reconcile_pool(uint64_t ptr,uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(uint64_t ptr, RustBuffer pool);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_CREATE_REGISTRY_SECRET+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_CREATE_REGISTRY_SECRET+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(uint64_t ptr, RustBuffer request+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_DELETE_REGISTRY_SECRET+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_DELETE_REGISTRY_SECRET+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(uint64_t ptr, RustBuffer namespace, RustBuffer name+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_RESOLVE_IMAGE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_RESOLVE_IMAGE+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(uint64_t ptr, RustBuffer reference, RustBuffer runtime+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_SERVICE_REQUEST#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_SERVICE_REQUESTuint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(uint64_t ptr, RustBuffer sandbox, RustBuffer service, RustBuffer path, RustBuffer request@@ -656,6 +671,52 @@ uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_user_api_key(uint64_tuint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_list_user_api_keys(uint64_t ptr);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CREATEREGISTRYSECRETREQUESTBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CREATEREGISTRYSECRETREQUESTBUILDER+uint64_t uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CREATEREGISTRYSECRETREQUESTBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CREATEREGISTRYSECRETREQUESTBUILDER+void uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CREATEREGISTRYSECRETREQUESTBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CREATEREGISTRYSECRETREQUESTBUILDER_NEW+uint64_t uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new(RustCallStatus *out_status++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_BUILD+RustBuffer uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build(uint64_t ptr, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAME+uint64_t uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name(uint64_t ptr, RustBuffer value, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAMESPACE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAMESPACE+uint64_t uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace(uint64_t ptr, RustBuffer value, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_PASSWORD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_PASSWORD+uint64_t uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password(uint64_t ptr, RustBuffer value, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_REGISTRY+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_REGISTRY+uint64_t uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry(uint64_t ptr, RustBuffer value, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_USERNAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_USERNAME+uint64_t uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username(uint64_t ptr, RustBuffer value, RustCallStatus *out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_ACCESSTOKENPROVIDER#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_ACCESSTOKENPROVIDERuint64_t uniffi_cyclops_sdk_fn_clone_accesstokenprovider(uint64_t handle, RustCallStatus *out_status@@ -1044,6 +1105,12 @@ RustBuffer uniffi_cyclops_sdk_fn_func_claim_env_token_key(RustCallStatus *out_st#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FUNC_FLEET_LABEL_KEYRustBuffer uniffi_cyclops_sdk_fn_func_fleet_label_key(RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FUNC_REGISTRY_SECRET_NAME_PREFIX+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FUNC_REGISTRY_SECRET_NAME_PREFIX+RustBuffer uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(RustCallStatus *out_status+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FUNC_HEALTHY_POOL_DISPLAY_STATUS@@ -1345,6 +1412,12 @@ uint16_t uniffi_cyclops_sdk_checksum_func_claim_env_token_key(void#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_FUNC_FLEET_LABEL_KEYuint16_t uniffi_cyclops_sdk_checksum_func_fleet_label_key(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_FUNC_REGISTRY_SECRET_NAME_PREFIX+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_FUNC_REGISTRY_SECRET_NAME_PREFIX+uint16_t uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_FUNC_HEALTHY_POOL_DISPLAY_STATUS@@ -1525,6 +1598,24 @@ uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_reconcile_pool(void#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_UPDATE_POOLuint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_CREATE_REGISTRY_SECRET+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_CREATE_REGISTRY_SECRET+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_DELETE_REGISTRY_SECRET+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_DELETE_REGISTRY_SECRET+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_RESOLVE_IMAGE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_RESOLVE_IMAGE+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_SERVICE_REQUEST@@ -1609,6 +1700,42 @@ uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_user_api_key(vo#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_LIST_USER_API_KEYSuint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_api_keys(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_BUILD+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAME+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAMESPACE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAMESPACE+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_PASSWORD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_PASSWORD+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_REGISTRY+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_REGISTRY+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_USERNAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_USERNAME+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_ACCESSTOKENPROVIDER_GET_ACCESS_TOKEN@@ -1897,6 +2024,12 @@ uint16_t uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_acce#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSCLIENT_CONNECT_WITH_NATIVE_HTTP_CLIENTuint16_t uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_native_http_client(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATEREGISTRYSECRETREQUESTBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATEREGISTRYSECRETREQUESTBUILDER_NEW+uint16_t uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATECLAIMREQUESTBUILDER_NEWdiff --git a/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/fleet_sdk.kt b/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/fleet_sdk.ktindex b968213b7f..15b8afc50d 100644--- a/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/fleet_sdk.kt+++ b/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/fleet_sdk.kt@@ -706,213 +706,235 @@ internal object IntegrityCheckingUniffiLib {uniffiCheckApiChecksums(this)}external fun uniffi_cyclops_sdk_checksum_func_claim_env_token_key(- ): Short- external fun uniffi_cyclops_sdk_checksum_func_fleet_label_key(- ): Short- external fun uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status(- ): Short- external fun uniffi_cyclops_sdk_checksum_func_pool_display_status(- ): Short- external fun uniffi_cyclops_sdk_checksum_func_removed_pool_display_status(- ): Short- external fun uniffi_cyclops_sdk_checksum_func_terminating_pool_display_status(- ): Short- external fun uniffi_cyclops_sdk_checksum_func_unknown_pool_display_status(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_renew_claim(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_access_token(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_fleet_claims(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_fleet_claims(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_presign_image_uploads(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_upload_image_file(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_image(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_image(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_image(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_images(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_namespace(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_namespace(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_namespace(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_namespaces(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_reconcile_pool(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_websocket_url(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_signed_service_urls(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_template(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_template(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_templates(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_reconcile_template(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_template(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_user_api_key(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_user_api_key(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_api_keys(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_httpclient_execute(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_labels(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_secret_files(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_build(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_namespace(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_spec(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_build(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_expires_in_seconds(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_label(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_sandbox(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_service(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_build(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_name(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_namespace(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_spec(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_body(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_build(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_headers(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_max_response_bytes(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_method(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_timeout_secs(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_url(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_templatebuilder_build(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_templatebuilder_kind(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata(- ): Short- external fun uniffi_cyclops_sdk_checksum_method_templatebuilder_spec(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_browser_with_access_token(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_access_token(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_access_token_and_native_http_client(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_access_token_provider(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_access_token_provider_and_native_http_client(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_native_http_client(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_createsignedserviceurlrequestbuilder_new(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_createtemplaterequestbuilder_new(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_httprequestbuilder_new(- ): Short- external fun uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new(- ): Short- external fun ffi_cyclops_sdk_uniffi_contract_version(- ): Int+): Short+external fun uniffi_cyclops_sdk_checksum_func_fleet_label_key(+): Short+external fun uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix(+): Short+external fun uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status(+): Short+external fun uniffi_cyclops_sdk_checksum_func_pool_display_status(+): Short+external fun uniffi_cyclops_sdk_checksum_func_removed_pool_display_status(+): Short+external fun uniffi_cyclops_sdk_checksum_func_terminating_pool_display_status(+): Short+external fun uniffi_cyclops_sdk_checksum_func_unknown_pool_display_status(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_renew_claim(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_access_token(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_fleet_claims(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_fleet_claims(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_presign_image_uploads(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_upload_image_file(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_image(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_image(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_image(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_images(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_namespace(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_namespace(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_namespace(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_namespaces(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_reconcile_pool(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_websocket_url(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_signed_service_urls(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_template(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_template(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_templates(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_reconcile_template(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_template(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_user_api_key(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_user_api_key(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_api_keys(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username(+): Short+external fun uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token(+): Short+external fun uniffi_cyclops_sdk_checksum_method_httpclient_execute(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_labels(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_secret_files(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_build(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_namespace(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_spec(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_build(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_expires_in_seconds(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_label(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_sandbox(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_service(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_build(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_name(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_namespace(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_spec(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name(+): Short+external fun uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms(+): Short+external fun uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit(+): Short+external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_body(+): Short+external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_build(+): Short+external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_headers(+): Short+external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_max_response_bytes(+): Short+external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_method(+): Short+external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_timeout_secs(+): Short+external fun uniffi_cyclops_sdk_checksum_method_httprequestbuilder_url(+): Short+external fun uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version(+): Short+external fun uniffi_cyclops_sdk_checksum_method_templatebuilder_build(+): Short+external fun uniffi_cyclops_sdk_checksum_method_templatebuilder_kind(+): Short+external fun uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata(+): Short+external fun uniffi_cyclops_sdk_checksum_method_templatebuilder_spec(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_browser_with_access_token(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_access_token(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_access_token_and_native_http_client(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_access_token_provider(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_access_token_provider_and_native_http_client(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_native_http_client(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_createsignedserviceurlrequestbuilder_new(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_createtemplaterequestbuilder_new(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_httprequestbuilder_new(+): Short+external fun uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new(+): Short+external fun ffi_cyclops_sdk_uniffi_contract_version(+): Int}@@ -1000,6 +1022,12 @@ external fun uniffi_cyclops_sdk_fn_method_cyclopsclient_reconcile_pool(`ptr`: Lo): Longexternal fun uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(`ptr`: Long,`pool`: RustBuffer.ByValue,): Long+external fun uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(`ptr`: Long,`request`: RustBuffer.ByValue,+): Long+external fun uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(`ptr`: Long,`namespace`: RustBuffer.ByValue,`name`: RustBuffer.ByValue,+): Long+external fun uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(`ptr`: Long,`reference`: RustBuffer.ByValue,`runtime`: RustBuffer.ByValue,+): Longexternal fun uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(`ptr`: Long,`sandbox`: RustBuffer.ByValue,`service`: RustBuffer.ByValue,`path`: RustBuffer.ByValue,`request`: RustBuffer.ByValue,): Longexternal fun uniffi_cyclops_sdk_fn_method_cyclopsclient_service_websocket_url(`ptr`: Long,`sandbox`: RustBuffer.ByValue,`service`: RustBuffer.ByValue,`path`: RustBuffer.ByValue,@@ -1028,6 +1056,24 @@ external fun uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_user_api_key(`ptr): Longexternal fun uniffi_cyclops_sdk_fn_method_cyclopsclient_list_user_api_keys(`ptr`: Long,): Long+external fun uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Unit+external fun uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new(uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,+): RustBuffer.ByValue+external fun uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Longexternal fun uniffi_cyclops_sdk_fn_clone_accesstokenprovider(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,): Longexternal fun uniffi_cyclops_sdk_fn_free_accesstokenprovider(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,@@ -1180,6 +1226,8 @@ external fun uniffi_cyclops_sdk_fn_func_claim_env_token_key(uniffi_out_err: Unif): RustBuffer.ByValueexternal fun uniffi_cyclops_sdk_fn_func_fleet_label_key(uniffi_out_err: UniffiRustCallStatus,): RustBuffer.ByValue+external fun uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(uniffi_out_err: UniffiRustCallStatus,+): RustBuffer.ByValueexternal fun uniffi_cyclops_sdk_fn_func_healthy_pool_display_status(uniffi_out_err: UniffiRustCallStatus,): RustBuffer.ByValueexternal fun uniffi_cyclops_sdk_fn_func_pool_display_status(`pool`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,@@ -1315,6 +1363,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_checksum_func_fleet_label_key() != 5219.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix() != 63379.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status() != 3094.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}@@ -1405,6 +1456,15 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() != 17695.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret() != 5524.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret() != 778.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image() != 1395.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() != 46699.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}@@ -1447,6 +1507,24 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_api_keys() != 5949.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build() != 37137.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name() != 24925.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace() != 5201.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password() != 1991.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry() != 58635.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username() != 20465.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token() != 1180.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}@@ -1591,6 +1669,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_native_http_client() != 49301.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new() != 33724.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new() != 10967.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}@@ -2972,37 +3053,371 @@ open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolReques}}- /**- * @suppress- */- fun uniffiCloneHandle(): Long {- if (handle == 0.toLong()) {- throw InternalException("uniffiCloneHandle() called on NoHandle object");- }- return uniffiRustCall() { status ->- UniffiLib.uniffi_cyclops_sdk_fn_clone_createpoolrequestbuilder(handle, status)- }+ /**+ * @suppress+ */+ fun uniffiCloneHandle(): Long {+ if (handle == 0.toLong()) {+ throw InternalException("uniffiCloneHandle() called on NoHandle object");+ }+ return uniffiRustCall() { status ->+ UniffiLib.uniffi_cyclops_sdk_fn_clone_createpoolrequestbuilder(handle, status)+ }+ }+++ @Throws(SdkBuildException::class)override fun `build`(): CreatePoolRequest {+ return FfiConverterTypeCreatePoolRequest.lift(+ callWithHandle {+ uniffiRustCallWithError(SdkBuildException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_build(+ it,+ _status)+}+ }+ )+ }+++ override fun `namespace`(`value`: kotlin.String): CreatePoolRequestBuilder {+ return FfiConverterTypeCreatePoolRequestBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_namespace(+ it,+ FfiConverterString.lower(`value`),_status)+}+ }+ )+ }+++ override fun `spec`(`value`: OsGymSandboxWarmPoolSpec): CreatePoolRequestBuilder {+ return FfiConverterTypeCreatePoolRequestBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_spec(+ it,+ FfiConverterTypeOSGymSandboxWarmPoolSpec.lower(`value`),_status)+}+ }+ )+ }++++++++++ /**+ * @suppress+ */+ companion object++}+++/**+ * @suppress+ */+public object FfiConverterTypeCreatePoolRequestBuilder: FfiConverter<CreatePoolRequestBuilder, Long> {+ override fun lower(value: CreatePoolRequestBuilder): Long {+ return value.uniffiCloneHandle()+ }++ override fun lift(value: Long): CreatePoolRequestBuilder {+ return CreatePoolRequestBuilder(UniffiWithHandle, value)+ }++ override fun read(buf: ByteBuffer): CreatePoolRequestBuilder {+ return lift(buf.getLong())+ }++ override fun allocationSize(value: CreatePoolRequestBuilder) = 8UL++ override fun write(value: CreatePoolRequestBuilder, buf: ByteBuffer) {+ buf.putLong(lower(value))+ }+}+++// This template implements a class for working with a Rust struct via a handle+// to the live Rust struct on the other side of the FFI.+//+// There's some subtlety here, because we have to be careful not to operate on a Rust+// struct after it has been dropped, and because we must expose a public API for freeing+// theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are:+//+// * Each instance holds an opaque handle to the underlying Rust struct.+// Method calls need to read this handle from the object's state and pass it in to+// the Rust FFI.+//+// * When an instance is no longer needed, its handle should be passed to a+// special destructor function provided by the Rust FFI, which will drop the+// underlying Rust struct.+//+// * Given an instance, calling code is expected to call the special+// `destroy` method in order to free it after use, either by calling it explicitly+// or by using a higher-level helper like the `use` method. Failing to do so risks+// leaking the underlying Rust struct.+//+// * We can't assume that calling code will do the right thing, and must be prepared+// to handle Kotlin method calls executing concurrently with or even after a call to+// `destroy`, and to handle multiple (possibly concurrent!) calls to `destroy`.+//+// * We must never allow Rust code to operate on the underlying Rust struct after+// the destructor has been called, and must never call the destructor more than once.+// Doing so may trigger memory unsafety.+//+// * To mitigate many of the risks of leaking memory and use-after-free unsafety, a `Cleaner`+// is implemented to call the destructor when the Kotlin object becomes unreachable.+// This is done in a background thread. This is not a panacea, and client code should be aware that+// 1. the thread may starve if some there are objects that have poorly performing+// `drop` methods or do significant work in their `drop` methods.+// 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`,+// or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html).+//+// If we try to implement this with mutual exclusion on access to the handle, there is the+// possibility of a race between a method call and a concurrent call to `destroy`:+//+// * Thread A starts a method call, reads the value of the handle, but is interrupted+// before it can pass the handle over the FFI to Rust.+// * Thread B calls `destroy` and frees the underlying Rust struct.+// * Thread A resumes, passing the already-read handle value to Rust and triggering+// a use-after-free.+//+// One possible solution would be to use a `ReadWriteLock`, with each method call taking+// a read lock (and thus allowed to run concurrently) and the special `destroy` method+// taking a write lock (and thus blocking on live method calls). However, we aim not to+// generate methods with any hidden blocking semantics, and a `destroy` method that might+// block if called incorrectly seems to meet that bar.+//+// So, we achieve our goals by giving each instance an associated `AtomicLong` counter to track+// the number of in-flight method calls, and an `AtomicBoolean` flag to indicate whether `destroy`+// has been called. These are updated according to the following rules:+//+// * The initial value of the counter is 1, indicating a live object with no in-flight calls.+// The initial value for the flag is false.+//+// * At the start of each method call, we atomically check the counter.+// If it is 0 then the underlying Rust struct has already been destroyed and the call is aborted.+// If it is nonzero them we atomically increment it by 1 and proceed with the method call.+//+// * At the end of each method call, we atomically decrement and check the counter.+// If it has reached zero then we destroy the underlying Rust struct.+//+// * When `destroy` is called, we atomically flip the flag from false to true.+// If the flag was already true we silently fail.+// Otherwise we atomically decrement and check the counter.+// If it has reached zero then we destroy the underlying Rust struct.+//+// Astute readers may observe that this all sounds very similar to the way that Rust's `Arc<T>` works,+// and indeed it is, with the addition of a flag to guard against multiple calls to `destroy`.+//+// The overall effect is that the underlying Rust struct is destroyed only when `destroy` has been+// called *and* all in-flight method calls have completed, avoiding violating any of the expectations+// of the underlying Rust code.+//+// This makes a cleaner a better alternative to _not_ calling `destroy()` as+// and when the object is finished with, but the abstraction is not perfect: if the Rust object's `drop`+// method is slow, and/or there are many objects to cleanup, and it's on a low end Android device, then the cleaner+// thread may be starved, and the app will leak memory.+//+// In this case, `destroy`ing manually may be a better solution.+//+// The cleaner can live side by side with the manual calling of `destroy`. In the order of responsiveness, uniffi objects+// with Rust peers are reclaimed:+//+// 1. By calling the `destroy` method of the object, which calls `rustObject.free()`. If that doesn't happen:+// 2. When the object becomes unreachable, AND the Cleaner thread gets to call `rustObject.free()`. If the thread is starved then:+// 3. The memory is reclaimed when the process terminates.+//+// [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219+//+++public interface CreateRegistrySecretRequestBuilderInterface {++ fun `build`(): CreateRegistrySecretRequest++ fun `name`(`value`: kotlin.String): CreateRegistrySecretRequestBuilder++ fun `namespace`(`value`: kotlin.String): CreateRegistrySecretRequestBuilder++ fun `password`(`value`: kotlin.String): CreateRegistrySecretRequestBuilder++ fun `registry`(`value`: kotlin.String): CreateRegistrySecretRequestBuilder++ fun `username`(`value`: kotlin.String): CreateRegistrySecretRequestBuilder++ companion object+}++open class CreateRegistrySecretRequestBuilder: Disposable, AutoCloseable, CreateRegistrySecretRequestBuilderInterface+{++ @Suppress("UNUSED_PARAMETER")+ /**+ * @suppress+ */+ constructor(withHandle: UniffiWithHandle, handle: Long) {+ this.handle = handle+ this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle))+ }++ /**+ * @suppress+ *+ * This constructor can be used to instantiate a fake object. Only used for tests. Any+ * attempt to actually use an object constructed this way will fail as there is no+ * connected Rust object.+ */+ @Suppress("UNUSED_PARAMETER")+ constructor(noHandle: NoHandle) {+ this.handle = 0+ this.cleanable = null+ }+ constructor() :+ this(UniffiWithHandle,+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new(++ _status)+}+ )++ protected val handle: Long+ protected val cleanable: UniffiCleaner.Cleanable?++ private val wasDestroyed = AtomicBoolean(false)+ private val callCounter = AtomicLong(1)++ override fun destroy() {+ // Only allow a single call to this method.+ // TODO: maybe we should log a warning if called more than once?+ if (this.wasDestroyed.compareAndSet(false, true)) {+ // This decrement always matches the initial count of 1 given at creation time.+ if (this.callCounter.decrementAndGet() == 0L) {+ cleanable?.clean()+ }+ }+ }++ @Synchronized+ override fun close() {+ this.destroy()+ }++ internal inline fun <R> callWithHandle(block: (handle: Long) -> R): R {+ // Check and increment the call counter, to keep the object alive.+ // This needs a compare-and-set retry loop in case of concurrent updates.+ do {+ val c = this.callCounter.get()+ if (c == 0L) {+ throw IllegalStateException("${this.javaClass.simpleName} object has already been destroyed")+ }+ if (c == Long.MAX_VALUE) {+ throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow")+ }+ } while (! this.callCounter.compareAndSet(c, c + 1L))+ // Now we can safely do the method call without the handle being freed concurrently.+ try {+ return block(this.uniffiCloneHandle())+ } finally {+ // This decrement always matches the increment we performed above.+ if (this.callCounter.decrementAndGet() == 0L) {+ cleanable?.clean()+ }+ }+ }++ // Use a static inner class instead of a closure so as not to accidentally+ // capture `this` as part of the cleanable's action.+ private class UniffiCleanAction(private val handle: Long) : Runnable {+ override fun run() {+ if (handle == 0.toLong()) {+ // Fake object created with `NoHandle`, don't try to free.+ return;+ }+ uniffiRustCall { status ->+ UniffiLib.uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder(handle, status)+ }+ }+ }++ /**+ * @suppress+ */+ fun uniffiCloneHandle(): Long {+ if (handle == 0.toLong()) {+ throw InternalException("uniffiCloneHandle() called on NoHandle object");+ }+ return uniffiRustCall() { status ->+ UniffiLib.uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder(handle, status)+ }+ }+++ @Throws(SdkBuildException::class)override fun `build`(): CreateRegistrySecretRequest {+ return FfiConverterTypeCreateRegistrySecretRequest.lift(+ callWithHandle {+ uniffiRustCallWithError(SdkBuildException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build(+ it,+ _status)+}+ }+ )+ }+++ override fun `name`(`value`: kotlin.String): CreateRegistrySecretRequestBuilder {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name(+ it,+ FfiConverterString.lower(`value`),_status)+}+ }+ )+ }+++ override fun `namespace`(`value`: kotlin.String): CreateRegistrySecretRequestBuilder {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace(+ it,+ FfiConverterString.lower(`value`),_status)+}+ }+ )}- @Throws(SdkBuildException::class)override fun `build`(): CreatePoolRequest {- return FfiConverterTypeCreatePoolRequest.lift(+ override fun `password`(`value`: kotlin.String): CreateRegistrySecretRequestBuilder {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(callWithHandle {- uniffiRustCallWithError(SdkBuildException) { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_build(+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password(it,- _status)+ FfiConverterString.lower(`value`),_status)}})}- override fun `namespace`(`value`: kotlin.String): CreatePoolRequestBuilder {- return FfiConverterTypeCreatePoolRequestBuilder.lift(+ override fun `registry`(`value`: kotlin.String): CreateRegistrySecretRequestBuilder {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(callWithHandle {uniffiRustCall() { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_namespace(+ UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry(it,FfiConverterString.lower(`value`),_status)}@@ -3011,13 +3426,13 @@ open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolReques}- override fun `spec`(`value`: OsGymSandboxWarmPoolSpec): CreatePoolRequestBuilder {- return FfiConverterTypeCreatePoolRequestBuilder.lift(+ override fun `username`(`value`: kotlin.String): CreateRegistrySecretRequestBuilder {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(callWithHandle {uniffiRustCall() { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_spec(+ UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username(it,- FfiConverterTypeOSGymSandboxWarmPoolSpec.lower(`value`),_status)+ FfiConverterString.lower(`value`),_status)}})@@ -3042,22 +3457,22 @@ open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolReques/*** @suppress*/-public object FfiConverterTypeCreatePoolRequestBuilder: FfiConverter<CreatePoolRequestBuilder, Long> {- override fun lower(value: CreatePoolRequestBuilder): Long {+public object FfiConverterTypeCreateRegistrySecretRequestBuilder: FfiConverter<CreateRegistrySecretRequestBuilder, Long> {+ override fun lower(value: CreateRegistrySecretRequestBuilder): Long {return value.uniffiCloneHandle()}- override fun lift(value: Long): CreatePoolRequestBuilder {- return CreatePoolRequestBuilder(UniffiWithHandle, value)+ override fun lift(value: Long): CreateRegistrySecretRequestBuilder {+ return CreateRegistrySecretRequestBuilder(UniffiWithHandle, value)}- override fun read(buf: ByteBuffer): CreatePoolRequestBuilder {+ override fun read(buf: ByteBuffer): CreateRegistrySecretRequestBuilder {return lift(buf.getLong())}- override fun allocationSize(value: CreatePoolRequestBuilder) = 8UL+ override fun allocationSize(value: CreateRegistrySecretRequestBuilder) = 8UL- override fun write(value: CreatePoolRequestBuilder, buf: ByteBuffer) {+ override fun write(value: CreateRegistrySecretRequestBuilder, buf: ByteBuffer) {buf.putLong(lower(value))}}@@ -4161,6 +4576,22 @@ public interface CyclopsClientInterface {suspend fun `updatePool`(`pool`: Pool): Pool+ /**+ * Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ * On a name conflict the old Secret is deleted and the new one created,+ * since the gateway admits no Secret update.+ */+ suspend fun `createRegistrySecret`(`request`: CreateRegistrySecretRequest): RegistrySecret++ suspend fun `deleteRegistrySecret`(`namespace`: kotlin.String, `name`: kotlin.String)++ /**+ * Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ * `kubevirt`, `macos`) selects the variant for canonical cua images:+ * `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+ */+ suspend fun `resolveImage`(`reference`: kotlin.String, `runtime`: kotlin.String?): ResolvedImage+suspend fun `serviceRequest`(`sandbox`: Sandbox, `service`: kotlin.String, `path`: kotlin.String, `request`: HttpRequest): HttpResponse/**@@ -4864,6 +5295,80 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterface}+ /**+ * Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ * On a name conflict the old Secret is deleted and the new one created,+ * since the gateway admits no Secret update.+ */+ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `createRegistrySecret`(`request`: CreateRegistrySecretRequest) : RegistrySecret {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(+ uniffiHandle,+ FfiConverterTypeCreateRegistrySecretRequest.lower(`request`),+ )+ },+ { future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },+ { future, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_complete_rust_buffer(future, continuation) },+ { future -> UniffiLib.ffi_cyclops_sdk_rust_future_free_rust_buffer(future) },+ // lift function+ { FfiConverterTypeRegistrySecret.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `deleteRegistrySecret`(`namespace`: kotlin.String, `name`: kotlin.String) {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(+ uniffiHandle,+ FfiConverterString.lower(`namespace`),FfiConverterString.lower(`name`),+ )+ },+ { future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_void(future, callback, continuation) },+ { future, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_complete_void(future, continuation) },+ { future -> UniffiLib.ffi_cyclops_sdk_rust_future_free_void(future) },+ // lift function+ { Unit },++ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ /**+ * Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ * `kubevirt`, `macos`) selects the variant for canonical cua images:+ * `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+ */+ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `resolveImage`(`reference`: kotlin.String, `runtime`: kotlin.String?) : ResolvedImage {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(+ uniffiHandle,+ FfiConverterString.lower(`reference`),FfiConverterOptionalString.lower(`runtime`),+ )+ },+ { future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },+ { future, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_complete_rust_buffer(future, continuation) },+ { future -> UniffiLib.ffi_cyclops_sdk_rust_future_free_rust_buffer(future) },+ // lift function+ { FfiConverterTypeResolvedImage.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }++@Throws(SdkException::class)@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")override suspend fun `serviceRequest`(`sandbox`: Sandbox, `service`: kotlin.String, `path`: kotlin.String, `request`: HttpRequest) : HttpResponse {@@ -7047,6 +7552,76 @@ public object FfiConverterTypeCreatePoolRequest: FfiConverterRustBuffer<CreatePo+/**+ * Credentials for one registry, stored as a `cua-registry-*` pull Secret.+ */+data class CreateRegistrySecretRequest (+ /**+ * Pool namespace the Secret is created in. It must already exist (the+ * pool's namespace, created by `create_pool`, or by `create_namespace`).+ */+ var `namespace`: kotlin.String+ ,+ /**+ * Full Secret name, `cua-registry-<dns-label>`.+ */+ var `name`: kotlin.String+ ,+ /**+ * Registry host the credentials are for, as image refs spell it, e.g.+ * `ghcr.io`, `registry.example.com:5000` or `docker.io`.+ */+ var `registry`: kotlin.String+ ,+ var `username`: kotlin.String+ ,+ /**+ * Password or access token. Never serialized by `Debug`.+ */+ var `password`: kotlin.String++){++++++ companion object+}++/**+ * @suppress+ */+public object FfiConverterTypeCreateRegistrySecretRequest: FfiConverterRustBuffer<CreateRegistrySecretRequest> {+ override fun read(buf: ByteBuffer): CreateRegistrySecretRequest {+ return CreateRegistrySecretRequest(+ FfiConverterString.read(buf),+ FfiConverterString.read(buf),+ FfiConverterString.read(buf),+ FfiConverterString.read(buf),+ FfiConverterString.read(buf),+ )+ }++ override fun allocationSize(value: CreateRegistrySecretRequest) = (+ FfiConverterString.allocationSize(value.`namespace`) ++ FfiConverterString.allocationSize(value.`name`) ++ FfiConverterString.allocationSize(value.`registry`) ++ FfiConverterString.allocationSize(value.`username`) ++ FfiConverterString.allocationSize(value.`password`)+ )++ override fun write(value: CreateRegistrySecretRequest, buf: ByteBuffer) {+ FfiConverterString.write(value.`namespace`, buf)+ FfiConverterString.write(value.`name`, buf)+ FfiConverterString.write(value.`registry`, buf)+ FfiConverterString.write(value.`username`, buf)+ FfiConverterString.write(value.`password`, buf)+ }+}+++data class CreateSignedServiceUrlRequest (var `sandbox`: Sandbox,@@ -7948,6 +8523,135 @@ public object FfiConverterTypePresignedPut: FfiConverterRustBuffer<PresignedPut>+/**+ * A created registry pull Secret. Carries no credential: Secrets are+ * write-only through the gateway.+ */+data class RegistrySecret (+ var `namespace`: kotlin.String+ ,+ var `name`: kotlin.String+ ,+ var `registry`: kotlin.String++){++++++ companion object+}++/**+ * @suppress+ */+public object FfiConverterTypeRegistrySecret: FfiConverterRustBuffer<RegistrySecret> {+ override fun read(buf: ByteBuffer): RegistrySecret {+ return RegistrySecret(+ FfiConverterString.read(buf),+ FfiConverterString.read(buf),+ FfiConverterString.read(buf),+ )+ }++ override fun allocationSize(value: RegistrySecret) = (+ FfiConverterString.allocationSize(value.`namespace`) ++ FfiConverterString.allocationSize(value.`name`) ++ FfiConverterString.allocationSize(value.`registry`)+ )++ override fun write(value: RegistrySecret, buf: ByteBuffer) {+ FfiConverterString.write(value.`namespace`, buf)+ FfiConverterString.write(value.`name`, buf)+ FfiConverterString.write(value.`registry`, buf)+ }+}++++/**+ * A registry ref pinned by the gateway (`GET /api/images/resolve`).+ */+data class ResolvedImage (+ /**+ * The ref as requested.+ */+ var `reference`: kotlin.String+ ,+ /**+ * The ref actually resolved: for a canonical image and runtime+ * `kubevirt` this is the containerDisk sibling (`…:24.04-disk`).+ */+ var `resolvedRef`: kotlin.String+ ,+ /**+ * `repo@sha256:…` of the manifest (or index) to run.+ */+ var `pinnedRef`: kotlin.String+ ,+ var `digest`: kotlin.String+ ,+ /**+ * `rootfs` (docker/gVisor), `containerdisk` (KubeVirt) or `unknown`.+ */+ var `variant`: kotlin.String+ ,+ /**+ * The linux/amd64 child manifest digest when the ref is an index.+ */+ var `platformDigest`: kotlin.String?+ ,+ var `mediaType`: kotlin.String++){++++++ companion object+}++/**+ * @suppress+ */+public object FfiConverterTypeResolvedImage: FfiConverterRustBuffer<ResolvedImage> {+ override fun read(buf: ByteBuffer): ResolvedImage {+ return ResolvedImage(+ FfiConverterString.read(buf),+ FfiConverterString.read(buf),+ FfiConverterString.read(buf),+ FfiConverterString.read(buf),+ FfiConverterString.read(buf),+ FfiConverterOptionalString.read(buf),+ FfiConverterString.read(buf),+ )+ }++ override fun allocationSize(value: ResolvedImage) = (+ FfiConverterString.allocationSize(value.`reference`) ++ FfiConverterString.allocationSize(value.`resolvedRef`) ++ FfiConverterString.allocationSize(value.`pinnedRef`) ++ FfiConverterString.allocationSize(value.`digest`) ++ FfiConverterString.allocationSize(value.`variant`) ++ FfiConverterOptionalString.allocationSize(value.`platformDigest`) ++ FfiConverterString.allocationSize(value.`mediaType`)+ )++ override fun write(value: ResolvedImage, buf: ByteBuffer) {+ FfiConverterString.write(value.`reference`, buf)+ FfiConverterString.write(value.`resolvedRef`, buf)+ FfiConverterString.write(value.`pinnedRef`, buf)+ FfiConverterString.write(value.`digest`, buf)+ FfiConverterString.write(value.`variant`, buf)+ FfiConverterOptionalString.write(value.`platformDigest`, buf)+ FfiConverterString.write(value.`mediaType`, buf)+ }+}+++data class ResourceMetadata (var `namespace`: kotlin.String,@@ -9498,6 +10202,19 @@ public object FfiConverterMapStringString: FfiConverterRustBuffer<Map<kotlin.Str_status)}+ )+ }+++ /**+ * The name prefix every tenant registry pull Secret must carry.+ */ fun `registrySecretNamePrefix`(): kotlin.String {+ return FfiConverterString.lift(+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(++ _status)+})}diff --git a/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/schema/cyclops_sdk_schema.kt b/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/schema/cyclops_sdk_schema.ktindex 2f13f113ab..5612673a66 100644--- a/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/schema/cyclops_sdk_schema.kt+++ b/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/schema/cyclops_sdk_schema.kt@@ -648,6 +648,8 @@ internal object IntegrityCheckingUniffiLib {): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name(): Short+ external fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args(+ ): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build(): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_claim_secrets(@@ -658,6 +660,8 @@ internal object IntegrityCheckingUniffiLib {): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores(): Short+ external fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env(+ ): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware(): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_policy(@@ -674,6 +678,8 @@ internal object IntegrityCheckingUniffiLib {): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes(): Short+ external fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode(+ ): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime(): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime_class_name(@@ -772,6 +778,8 @@ external fun uniffi_cyclops_sdk_schema_fn_free_vmtemplatebuilder(`handle`: Long,): Unitexternal fun uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new(uniffi_out_err: UniffiRustCallStatus,): Long+external fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Longexternal fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,): RustBuffer.ByValueexternal fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_claim_secrets(`ptr`: Long,`value`: Byte,uniffi_out_err: UniffiRustCallStatus,@@ -782,6 +790,8 @@ external fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_container_dis): Longexternal fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores(`ptr`: Long,`value`: Int,uniffi_out_err: UniffiRustCallStatus,): Long+external fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Longexternal fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,): Longexternal fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_image_pull_policy(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,@@ -798,6 +808,8 @@ external fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_oidc(`ptr`: L): Longexternal fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes(`ptr`: Long,`value`: Long,uniffi_out_err: UniffiRustCallStatus,): Long+external fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Longexternal fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,): Longexternal fun uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime_class_name(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,@@ -995,6 +1007,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name() != 1803.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args() != 38529.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build() != 17867.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}@@ -1010,6 +1025,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores() != 25645.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env() != 48368.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware() != 33926.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}@@ -1034,6 +1052,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes() != 40623.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode() != 49070.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime() != 63375.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}@@ -2951,6 +2972,8 @@ public object FfiConverterTypeSandboxTemplateRefBuilder: FfiConverter<SandboxTempublic interface VmTemplateBuilderInterface {+ fun `args`(`value`: List<kotlin.String>): VmTemplateBuilder+fun `build`(): VmTemplatefun `claimSecrets`(`value`: kotlin.Boolean): VmTemplateBuilder@@ -2961,6 +2984,8 @@ public interface VmTemplateBuilderInterface {fun `cpuCores`(`value`: kotlin.UInt): VmTemplateBuilder+ fun `env`(`value`: Map<kotlin.String, kotlin.String>): VmTemplateBuilder+fun `firmware`(`value`: Firmware): VmTemplateBuilderfun `imagePullPolicy`(`value`: ImagePullPolicy): VmTemplateBuilder@@ -2977,6 +3002,8 @@ public interface VmTemplateBuilderInterface {fun `probes`(`value`: PreservedJson): VmTemplateBuilder+ fun `processMode`(`value`: ProcessMode): VmTemplateBuilder+fun `runtime`(`value`: RuntimeKind): VmTemplateBuilderfun `runtimeClassName`(`value`: kotlin.String): VmTemplateBuilder@@ -3092,6 +3119,19 @@ open class VmTemplateBuilder: Disposable, AutoCloseable, VmTemplateBuilderInterf}}+ override fun `args`(`value`: List<kotlin.String>): VmTemplateBuilder {+ return FfiConverterTypeVmTemplateBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(+ it,+ FfiConverterSequenceString.lower(`value`),_status)+}+ }+ )+ }++@Throws(SchemaBuildException::class)override fun `build`(): VmTemplate {return FfiConverterTypeVmTemplate.lift(@@ -3158,6 +3198,19 @@ open class VmTemplateBuilder: Disposable, AutoCloseable, VmTemplateBuilderInterf}+ override fun `env`(`value`: Map<kotlin.String, kotlin.String>): VmTemplateBuilder {+ return FfiConverterTypeVmTemplateBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(+ it,+ FfiConverterMapStringString.lower(`value`),_status)+}+ }+ )+ }++override fun `firmware`(`value`: Firmware): VmTemplateBuilder {return FfiConverterTypeVmTemplateBuilder.lift(callWithHandle {@@ -3262,6 +3315,19 @@ open class VmTemplateBuilder: Disposable, AutoCloseable, VmTemplateBuilderInterf}+ override fun `processMode`(`value`: ProcessMode): VmTemplateBuilder {+ return FfiConverterTypeVmTemplateBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(+ it,+ FfiConverterTypeProcessMode.lower(`value`),_status)+}+ }+ )+ }++override fun `runtime`(`value`: RuntimeKind): VmTemplateBuilder {return FfiConverterTypeVmTemplateBuilder.lift(callWithHandle {@@ -4352,6 +4418,12 @@ data class VmTemplate (var `oidc`: OidcConfig?,var `claimSecrets`: kotlin.Boolean? = null+ ,+ var `args`: List<kotlin.String>? = null+ ,+ var `env`: Map<kotlin.String, kotlin.String>? = null+ ,+ var `processMode`: ProcessMode? = null): Disposable{@@ -4378,7 +4450,10 @@ data class VmTemplate (this.`probes`,this.`services`,this.`oidc`,- this.`claimSecrets`+ this.`claimSecrets`,+ this.`args`,+ this.`env`,+ this.`processMode`)}@@ -4407,6 +4482,9 @@ public object FfiConverterTypeVmTemplate: FfiConverterRustBuffer<VmTemplate> {FfiConverterOptionalSequenceTypeSandboxService.read(buf),FfiConverterOptionalTypeOidcConfig.read(buf),FfiConverterOptionalBoolean.read(buf),+ FfiConverterOptionalSequenceString.read(buf),+ FfiConverterOptionalMapStringString.read(buf),+ FfiConverterOptionalTypeProcessMode.read(buf),)}@@ -4426,7 +4504,10 @@ public object FfiConverterTypeVmTemplate: FfiConverterRustBuffer<VmTemplate> {FfiConverterOptionalTypePreservedJson.allocationSize(value.`probes`) +FfiConverterOptionalSequenceTypeSandboxService.allocationSize(value.`services`) +FfiConverterOptionalTypeOidcConfig.allocationSize(value.`oidc`) +- FfiConverterOptionalBoolean.allocationSize(value.`claimSecrets`)+ FfiConverterOptionalBoolean.allocationSize(value.`claimSecrets`) ++ FfiConverterOptionalSequenceString.allocationSize(value.`args`) ++ FfiConverterOptionalMapStringString.allocationSize(value.`env`) ++ FfiConverterOptionalTypeProcessMode.allocationSize(value.`processMode`))override fun write(value: VmTemplate, buf: ByteBuffer) {@@ -4446,6 +4527,9 @@ public object FfiConverterTypeVmTemplate: FfiConverterRustBuffer<VmTemplate> {FfiConverterOptionalSequenceTypeSandboxService.write(value.`services`, buf)FfiConverterOptionalTypeOidcConfig.write(value.`oidc`, buf)FfiConverterOptionalBoolean.write(value.`claimSecrets`, buf)+ FfiConverterOptionalSequenceString.write(value.`args`, buf)+ FfiConverterOptionalMapStringString.write(value.`env`, buf)+ FfiConverterOptionalTypeProcessMode.write(value.`processMode`, buf)}}@@ -4625,6 +4709,52 @@ public object FfiConverterTypeJsonValueError : FfiConverterRustBuffer<JsonValueE+/**+ * How `vmTemplate.command`/`args`/`env` reach the sandbox+ * (`vmTemplate.processMode`). Absent means `Legacy`.+ */++enum class ProcessMode {++ /**+ * What templates did before processMode existed: pod runtimes run+ * command/args/env; KubeVirt ignores command and refuses args/env.+ */+ LEGACY,+ /**+ * Every runtime runs command/args/env. Pod runtimes set them on the+ * sandbox container; KubeVirt renders them into the sandbox's cloud-init.+ */+ RUN;+++++ companion object+}+++/**+ * @suppress+ */+public object FfiConverterTypeProcessMode: FfiConverterRustBuffer<ProcessMode> {+ override fun read(buf: ByteBuffer) = try {+ ProcessMode.values()[buf.getInt() - 1]+ } catch (e: IndexOutOfBoundsException) {+ throw RuntimeException("invalid enum value, something is very wrong!!", e)+ }++ override fun allocationSize(value: ProcessMode) = 4UL++ override fun write(value: ProcessMode, buf: ByteBuffer) {+ buf.putInt(value.ordinal + 1)+ }+}+++++enum class RuntimeKind {@@ -5159,6 +5289,38 @@ public object FfiConverterOptionalTypeImagePullPolicy: FfiConverterRustBuffer<Im+/**+ * @suppress+ */+public object FfiConverterOptionalTypeProcessMode: FfiConverterRustBuffer<ProcessMode?> {+ override fun read(buf: ByteBuffer): ProcessMode? {+ if (buf.get().toInt() == 0) {+ return null+ }+ return FfiConverterTypeProcessMode.read(buf)+ }++ override fun allocationSize(value: ProcessMode?): ULong {+ if (value == null) {+ return 1UL+ } else {+ return 1UL + FfiConverterTypeProcessMode.allocationSize(value)+ }+ }++ override fun write(value: ProcessMode?, buf: ByteBuffer) {+ if (value == null) {+ buf.put(0)+ } else {+ buf.put(1)+ FfiConverterTypeProcessMode.write(value, buf)+ }+ }+}++++/*** @suppress*/diff --git a/libs/fleet/sdk-bindings/python/fleet_sdk/_schema.py b/libs/fleet/sdk-bindings/python/fleet_sdk/_schema.pyindex 6a122fb747..4150f60554 100644--- a/libs/fleet/sdk-bindings/python/fleet_sdk/_schema.py+++ b/libs/fleet/sdk-bindings/python/fleet_sdk/_schema.py@@ -522,6 +522,8 @@ def _uniffi_check_api_checksums(lib):raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_schema_checksum_constructor_vmtemplatebuilder_new() != 27302:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args() != 38529:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build() != 17867:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_claim_secrets() != 62567:@@ -532,6 +534,8 @@ def _uniffi_check_api_checksums(lib):raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores() != 25645:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env() != 48368:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware() != 33926:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_policy() != 41828:@@ -548,6 +552,8 @@ def _uniffi_check_api_checksums(lib):raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes() != 40623:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode() != 49070:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime() != 63375:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime_class_name() != 25466:@@ -1015,6 +1021,12 @@ _UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new.argtypctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args.restype = ctypes.c_uint64_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build.argtypes = (ctypes.c_uint64,ctypes.POINTER(_UniffiRustCallStatus),@@ -1044,6 +1056,12 @@ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores.argtyctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env.restype = ctypes.c_uint64_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware.argtypes = (ctypes.c_uint64,_UniffiRustBuffer,@@ -1092,6 +1110,12 @@ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes.argtypesctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode.restype = ctypes.c_uint64_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime.argtypes = (ctypes.c_uint64,_UniffiRustBuffer,@@ -1212,6 +1236,9 @@ _UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_n_UniffiLib.uniffi_cyclops_sdk_schema_checksum_constructor_vmtemplatebuilder_new.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_schema_checksum_constructor_vmtemplatebuilder_new.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build.restype = ctypes.c_uint16@@ -1227,6 +1254,9 @@ _UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_container_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware.restype = ctypes.c_uint16@@ -1251,6 +1281,9 @@ _UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_oidc.rest_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime.restype = ctypes.c_uint16@@ -2577,9 +2610,86 @@ class _UniffiFfiConverterOptionalTypeOidcConfig(_UniffiConverterRustBuffer):else:raise InternalError("Unexpected flag byte for optional type")++++++class ProcessMode(enum.Enum):+ """+ How `vmTemplate.command`/`args`/`env` reach the sandbox+ (`vmTemplate.processMode`). Absent means `Legacy`.+"""++ LEGACY = 0+ """+ What templates did before processMode existed: pod runtimes run+ command/args/env; KubeVirt ignores command and refuses args/env.+"""++ RUN = 1+ """+ Every runtime runs command/args/env. Pod runtimes set them on the+ sandbox container; KubeVirt renders them into the sandbox's cloud-init.+"""++++class _UniffiFfiConverterTypeProcessMode(_UniffiConverterRustBuffer):+ @staticmethod+ def read(buf):+ variant = buf.read_i32()+ if variant == 1:+ return ProcessMode.LEGACY+ if variant == 2:+ return ProcessMode.RUN+ raise InternalError("Raw enum value doesn't match any cases")++ @staticmethod+ def check_lower(value):+ if value == ProcessMode.LEGACY:+ return+ if value == ProcessMode.RUN:+ return+ raise ValueError(value)++ @staticmethod+ def write(value, buf):+ if value == ProcessMode.LEGACY:+ buf.write_i32(1)+ if value == ProcessMode.RUN:+ buf.write_i32(2)++++class _UniffiFfiConverterOptionalTypeProcessMode(_UniffiConverterRustBuffer):+ @classmethod+ def check_lower(cls, value):+ if value is not None:+ _UniffiFfiConverterTypeProcessMode.check_lower(value)++ @classmethod+ def write(cls, value, buf):+ if value is None:+ buf.write_u8(0)+ return++ buf.write_u8(1)+ _UniffiFfiConverterTypeProcessMode.write(value, buf)++ @classmethod+ def read(cls, buf):+ flag = buf.read_u8()+ if flag == 0:+ return None+ elif flag == 1:+ return _UniffiFfiConverterTypeProcessMode.read(buf)+ else:+ raise InternalError("Unexpected flag byte for optional type")+@dataclassclass VmTemplate:- def __init__(self, *, container_disk_image:str, command:typing.Optional[typing.List[str]], runtime:typing.Optional[RuntimeKind], runtime_class_name:typing.Optional[str], node_selector:typing.Optional[dict[str, str]], tolerations:typing.Optional[typing.List[PreservedJson]], image_pull_policy:typing.Optional[ImagePullPolicy], image_pull_secret:typing.Optional[str], cpu_cores:typing.Optional[int], memory:typing.Optional[str], firmware:typing.Optional[Firmware], nested_virtualization:typing.Optional[bool], probes:typing.Optional[PreservedJson], services:typing.Optional[typing.List[SandboxService]], oidc:typing.Optional[OidcConfig], claim_secrets:typing.Optional[bool] = _DEFAULT):+ def __init__(self, *, container_disk_image:str, command:typing.Optional[typing.List[str]], runtime:typing.Optional[RuntimeKind], runtime_class_name:typing.Optional[str], node_selector:typing.Optional[dict[str, str]], tolerations:typing.Optional[typing.List[PreservedJson]], image_pull_policy:typing.Optional[ImagePullPolicy], image_pull_secret:typing.Optional[str], cpu_cores:typing.Optional[int], memory:typing.Optional[str], firmware:typing.Optional[Firmware], nested_virtualization:typing.Optional[bool], probes:typing.Optional[PreservedJson], services:typing.Optional[typing.List[SandboxService]], oidc:typing.Optional[OidcConfig], claim_secrets:typing.Optional[bool] = _DEFAULT, args:typing.Optional[typing.List[str]] = _DEFAULT, env:typing.Optional[dict[str, str]] = _DEFAULT, process_mode:typing.Optional[ProcessMode] = _DEFAULT):self.container_disk_image = container_disk_imageself.command = commandself.runtime = runtime@@ -2599,12 +2709,24 @@ class VmTemplate:self.claim_secrets = Noneelse:self.claim_secrets = claim_secrets+ if args is _DEFAULT:+ self.args = None+ else:+ self.args = args+ if env is _DEFAULT:+ self.env = None+ else:+ self.env = env+ if process_mode is _DEFAULT:+ self.process_mode = None+ else:+ self.process_mode = process_modedef __str__(self):- return "VmTemplate(container_disk_image={}, command={}, runtime={}, runtime_class_name={}, node_selector={}, tolerations={}, image_pull_policy={}, image_pull_secret={}, cpu_cores={}, memory={}, firmware={}, nested_virtualization={}, probes={}, services={}, oidc={}, claim_secrets={})".format(self.container_disk_image, self.command, self.runtime, self.runtime_class_name, self.node_selector, self.tolerations, self.image_pull_policy, self.image_pull_secret, self.cpu_cores, self.memory, self.firmware, self.nested_virtualization, self.probes, self.services, self.oidc, self.claim_secrets)+ return "VmTemplate(container_disk_image={}, command={}, runtime={}, runtime_class_name={}, node_selector={}, tolerations={}, image_pull_policy={}, image_pull_secret={}, cpu_cores={}, memory={}, firmware={}, nested_virtualization={}, probes={}, services={}, oidc={}, claim_secrets={}, args={}, env={}, process_mode={})".format(self.container_disk_image, self.command, self.runtime, self.runtime_class_name, self.node_selector, self.tolerations, self.image_pull_policy, self.image_pull_secret, self.cpu_cores, self.memory, self.firmware, self.nested_virtualization, self.probes, self.services, self.oidc, self.claim_secrets, self.args, self.env, self.process_mode)def __eq__(self, other):if self.container_disk_image != other.container_disk_image:return False@@ -2638,6 +2760,12 @@ class VmTemplate:return Falseif self.claim_secrets != other.claim_secrets:return False+ if self.args != other.args:+ return False+ if self.env != other.env:+ return False+ if self.process_mode != other.process_mode:+ return Falsereturn Trueclass _UniffiFfiConverterTypeVmTemplate(_UniffiConverterRustBuffer):@@ -2660,6 +2788,9 @@ class _UniffiFfiConverterTypeVmTemplate(_UniffiConverterRustBuffer):services=_UniffiFfiConverterOptionalSequenceTypeSandboxService.read(buf),oidc=_UniffiFfiConverterOptionalTypeOidcConfig.read(buf),claim_secrets=_UniffiFfiConverterOptionalBoolean.read(buf),+ args=_UniffiFfiConverterOptionalSequenceString.read(buf),+ env=_UniffiFfiConverterOptionalMapStringString.read(buf),+ process_mode=_UniffiFfiConverterOptionalTypeProcessMode.read(buf),)@staticmethod@@ -2680,6 +2811,9 @@ class _UniffiFfiConverterTypeVmTemplate(_UniffiConverterRustBuffer):_UniffiFfiConverterOptionalSequenceTypeSandboxService.check_lower(value.services)_UniffiFfiConverterOptionalTypeOidcConfig.check_lower(value.oidc)_UniffiFfiConverterOptionalBoolean.check_lower(value.claim_secrets)+ _UniffiFfiConverterOptionalSequenceString.check_lower(value.args)+ _UniffiFfiConverterOptionalMapStringString.check_lower(value.env)+ _UniffiFfiConverterOptionalTypeProcessMode.check_lower(value.process_mode)@staticmethoddef write(value, buf):@@ -2699,6 +2833,9 @@ class _UniffiFfiConverterTypeVmTemplate(_UniffiConverterRustBuffer):_UniffiFfiConverterOptionalSequenceTypeSandboxService.write(value.services, buf)_UniffiFfiConverterOptionalTypeOidcConfig.write(value.oidc, buf)_UniffiFfiConverterOptionalBoolean.write(value.claim_secrets, buf)+ _UniffiFfiConverterOptionalSequenceString.write(value.args, buf)+ _UniffiFfiConverterOptionalMapStringString.write(value.env, buf)+ _UniffiFfiConverterOptionalTypeProcessMode.write(value.process_mode, buf)@dataclassclass OsGymSandboxSpec:@@ -3725,6 +3862,8 @@ class _UniffiFfiConverterTypeSandboxTemplateRefBuilder:class VmTemplateBuilderProtocol(typing.Protocol):+ def args(self, value: typing.List[str]) -> VmTemplateBuilder:+ raise NotImplementedErrordef build(self, ) -> VmTemplate:raise NotImplementedErrordef claim_secrets(self, value: bool) -> VmTemplateBuilder:@@ -3735,6 +3874,8 @@ class VmTemplateBuilderProtocol(typing.Protocol):raise NotImplementedErrordef cpu_cores(self, value: int) -> VmTemplateBuilder:raise NotImplementedError+ def env(self, value: dict[str, str]) -> VmTemplateBuilder:+ raise NotImplementedErrordef firmware(self, value: Firmware) -> VmTemplateBuilder:raise NotImplementedErrordef image_pull_policy(self, value: ImagePullPolicy) -> VmTemplateBuilder:@@ -3751,6 +3892,8 @@ class VmTemplateBuilderProtocol(typing.Protocol):raise NotImplementedErrordef probes(self, value: PreservedJson) -> VmTemplateBuilder:raise NotImplementedError+ def process_mode(self, value: ProcessMode) -> VmTemplateBuilder:+ raise NotImplementedErrordef runtime(self, value: RuntimeKind) -> VmTemplateBuilder:raise NotImplementedErrordef runtime_class_name(self, value: str) -> VmTemplateBuilder:@@ -3792,6 +3935,21 @@ class VmTemplateBuilder(VmTemplateBuilderProtocol):inst = cls.__new__(cls)inst._handle = handlereturn inst+ def args(self, value: typing.List[str]) -> VmTemplateBuilder:++ _UniffiFfiConverterSequenceString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterSequenceString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeVmTemplateBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)def build(self, ) -> VmTemplate:_uniffi_lowered_args = (self._uniffi_clone_handle(),@@ -3864,6 +4022,21 @@ class VmTemplateBuilder(VmTemplateBuilderProtocol):*_uniffi_lowered_args,)return _uniffi_lift_return(_uniffi_ffi_result)+ def env(self, value: dict[str, str]) -> VmTemplateBuilder:++ _UniffiFfiConverterMapStringString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterMapStringString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeVmTemplateBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)def firmware(self, value: Firmware) -> VmTemplateBuilder:_UniffiFfiConverterTypeFirmware.check_lower(value)@@ -3984,6 +4157,21 @@ class VmTemplateBuilder(VmTemplateBuilderProtocol):*_uniffi_lowered_args,)return _uniffi_lift_return(_uniffi_ffi_result)+ def process_mode(self, value: ProcessMode) -> VmTemplateBuilder:++ _UniffiFfiConverterTypeProcessMode.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterTypeProcessMode.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeVmTemplateBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)def runtime(self, value: RuntimeKind) -> VmTemplateBuilder:_UniffiFfiConverterTypeRuntimeKind.check_lower(value)@@ -4224,6 +4412,7 @@ __all__ = ["ImagePullPolicy","Firmware","ServiceProtocol",+ "ProcessMode","WarmPoolTtlPolicy","JsonValueError","SchemaBuildError",diff --git a/libs/fleet/sdk-bindings/python/fleet_sdk/_sdk.py b/libs/fleet/sdk-bindings/python/fleet_sdk/_sdk.pyindex c0850aacf2..b16fb2bfa6 100644--- a/libs/fleet/sdk-bindings/python/fleet_sdk/_sdk.py+++ b/libs/fleet/sdk-bindings/python/fleet_sdk/_sdk.py@@ -488,6 +488,8 @@ def _uniffi_check_api_checksums(lib):raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_func_pool_display_status() != 8587:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix() != 63379:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_func_removed_pool_display_status() != 48761:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_func_terminating_pool_display_status() != 41320:@@ -518,6 +520,20 @@ def _uniffi_check_api_checksums(lib):raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_spec() != 7566:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new() != 33724:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build() != 37137:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name() != 24925:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace() != 5201:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password() != 1991:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry() != 58635:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username() != 20465:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_constructor_createsignedserviceurlrequestbuilder_new() != 16004:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_build() != 4255:@@ -574,6 +590,8 @@ def _uniffi_check_api_checksums(lib):raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() != 48557:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret() != 5524:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url() != 17810:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_template() != 13689:@@ -588,6 +606,8 @@ def _uniffi_check_api_checksums(lib):raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() != 31235:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret() != 778:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template() != 54852:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_user_api_key() != 1700:@@ -626,6 +646,8 @@ def _uniffi_check_api_checksums(lib):raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_renew_claim() != 17505:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image() != 1395:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url() != 59989:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() != 46699:@@ -979,6 +1001,16 @@ _UniffiLib.uniffi_cyclops_sdk_fn_free_createpoolrequestbuilder.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_fn_free_createpoolrequestbuilder.restype = None+_UniffiLib.uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder.restype = None_UniffiLib.uniffi_cyclops_sdk_fn_clone_createsignedserviceurlrequestbuilder.argtypes = (ctypes.c_uint64,ctypes.POINTER(_UniffiRustCallStatus),@@ -1125,6 +1157,10 @@ _UniffiLib.uniffi_cyclops_sdk_fn_func_pool_display_status.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_fn_func_pool_display_status.restype = _UniffiRustBuffer+_UniffiLib.uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix.argtypes = (+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix.restype = _UniffiRustBuffer_UniffiLib.uniffi_cyclops_sdk_fn_func_removed_pool_display_status.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)@@ -1202,6 +1238,45 @@ _UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_spec.argtypes =ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_spec.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new.argtypes = (+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build.restype = _UniffiRustBuffer+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username.restype = ctypes.c_uint64_UniffiLib.uniffi_cyclops_sdk_fn_constructor_createsignedserviceurlrequestbuilder_new.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)@@ -1358,6 +1433,11 @@ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool.argtypes = (_UniffiRustBuffer,)_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret.restype = ctypes.c_uint64_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_signed_service_url.argtypes = (ctypes.c_uint64,_UniffiRustBuffer,@@ -1394,6 +1474,12 @@ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool.argtypes = (_UniffiRustBuffer,)_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret.restype = ctypes.c_uint64_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_template.argtypes = (ctypes.c_uint64,_UniffiRustBuffer,@@ -1491,6 +1577,12 @@ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_renew_claim.argtypes = (_UniffiRustBuffer,)_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_renew_claim.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image.restype = ctypes.c_uint64_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_revoke_signed_service_url.argtypes = (ctypes.c_uint64,_UniffiRustBuffer,@@ -1676,6 +1768,9 @@ _UniffiLib.uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status.restype_UniffiLib.uniffi_cyclops_sdk_checksum_func_pool_display_status.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_func_pool_display_status.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_checksum_func_removed_pool_display_status.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_func_removed_pool_display_status.restype = ctypes.c_uint16@@ -1721,6 +1816,27 @@ _UniffiLib.uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_namespace_UniffiLib.uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_spec.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_spec.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_createsignedserviceurlrequestbuilder_new.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_createsignedserviceurlrequestbuilder_new.restype = ctypes.c_uint16@@ -1805,6 +1921,9 @@ _UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_namespace.res_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url.restype = ctypes.c_uint16@@ -1826,6 +1945,9 @@ _UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_namespace.res_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template.restype = ctypes.c_uint16@@ -1883,6 +2005,9 @@ _UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_reconcile_template.r_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_renew_claim.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_renew_claim.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url.restype = ctypes.c_uint16@@ -2566,6 +2691,63 @@ class _UniffiFfiConverterTypeCreatePoolRequest(_UniffiConverterRustBuffer):_UniffiFfiConverterString.write(value.namespace, buf)fleet_sdk._UniffiFfiConverterTypeOSGymSandboxWarmPoolSpec.write(value.spec, buf)+@dataclass+class CreateRegistrySecretRequest:+ """+ Credentials for one registry, stored as a `cua-registry-*` pull Secret.+"""+ def __init__(self, *, namespace:str, name:str, registry:str, username:str, password:str):+ self.namespace = namespace+ self.name = name+ self.registry = registry+ self.username = username+ self.password = password+++++ def __str__(self):+ return "CreateRegistrySecretRequest(namespace={}, name={}, registry={}, username={}, password={})".format(self.namespace, self.name, self.registry, self.username, self.password)+ def __eq__(self, other):+ if self.namespace != other.namespace:+ return False+ if self.name != other.name:+ return False+ if self.registry != other.registry:+ return False+ if self.username != other.username:+ return False+ if self.password != other.password:+ return False+ return True++class _UniffiFfiConverterTypeCreateRegistrySecretRequest(_UniffiConverterRustBuffer):+ @staticmethod+ def read(buf):+ return CreateRegistrySecretRequest(+ namespace=_UniffiFfiConverterString.read(buf),+ name=_UniffiFfiConverterString.read(buf),+ registry=_UniffiFfiConverterString.read(buf),+ username=_UniffiFfiConverterString.read(buf),+ password=_UniffiFfiConverterString.read(buf),+ )++ @staticmethod+ def check_lower(value):+ _UniffiFfiConverterString.check_lower(value.namespace)+ _UniffiFfiConverterString.check_lower(value.name)+ _UniffiFfiConverterString.check_lower(value.registry)+ _UniffiFfiConverterString.check_lower(value.username)+ _UniffiFfiConverterString.check_lower(value.password)++ @staticmethod+ def write(value, buf):+ _UniffiFfiConverterString.write(value.namespace, buf)+ _UniffiFfiConverterString.write(value.name, buf)+ _UniffiFfiConverterString.write(value.registry, buf)+ _UniffiFfiConverterString.write(value.username, buf)+ _UniffiFfiConverterString.write(value.password, buf)+class _UniffiFfiConverterSequenceString(_UniffiConverterRustBuffer):@classmethoddef check_lower(cls, value):@@ -3813,6 +3995,121 @@ class _UniffiFfiConverterTypePoolDisplayStatus(_UniffiConverterRustBuffer):_UniffiFfiConverterString.write(value.label, buf)_UniffiFfiConverterString.write(value.indicator, buf)+@dataclass+class RegistrySecret:+ """+ A created registry pull Secret. Carries no credential: Secrets are+ write-only through the gateway.+"""+ def __init__(self, *, namespace:str, name:str, registry:str):+ self.namespace = namespace+ self.name = name+ self.registry = registry+++++ def __str__(self):+ return "RegistrySecret(namespace={}, name={}, registry={})".format(self.namespace, self.name, self.registry)+ def __eq__(self, other):+ if self.namespace != other.namespace:+ return False+ if self.name != other.name:+ return False+ if self.registry != other.registry:+ return False+ return True++class _UniffiFfiConverterTypeRegistrySecret(_UniffiConverterRustBuffer):+ @staticmethod+ def read(buf):+ return RegistrySecret(+ namespace=_UniffiFfiConverterString.read(buf),+ name=_UniffiFfiConverterString.read(buf),+ registry=_UniffiFfiConverterString.read(buf),+ )++ @staticmethod+ def check_lower(value):+ _UniffiFfiConverterString.check_lower(value.namespace)+ _UniffiFfiConverterString.check_lower(value.name)+ _UniffiFfiConverterString.check_lower(value.registry)++ @staticmethod+ def write(value, buf):+ _UniffiFfiConverterString.write(value.namespace, buf)+ _UniffiFfiConverterString.write(value.name, buf)+ _UniffiFfiConverterString.write(value.registry, buf)++@dataclass+class ResolvedImage:+ """+ A registry ref pinned by the gateway (`GET /api/images/resolve`).+"""+ def __init__(self, *, reference:str, resolved_ref:str, pinned_ref:str, digest:str, variant:str, platform_digest:typing.Optional[str], media_type:str):+ self.reference = reference+ self.resolved_ref = resolved_ref+ self.pinned_ref = pinned_ref+ self.digest = digest+ self.variant = variant+ self.platform_digest = platform_digest+ self.media_type = media_type+++++ def __str__(self):+ return "ResolvedImage(reference={}, resolved_ref={}, pinned_ref={}, digest={}, variant={}, platform_digest={}, media_type={})".format(self.reference, self.resolved_ref, self.pinned_ref, self.digest, self.variant, self.platform_digest, self.media_type)+ def __eq__(self, other):+ if self.reference != other.reference:+ return False+ if self.resolved_ref != other.resolved_ref:+ return False+ if self.pinned_ref != other.pinned_ref:+ return False+ if self.digest != other.digest:+ return False+ if self.variant != other.variant:+ return False+ if self.platform_digest != other.platform_digest:+ return False+ if self.media_type != other.media_type:+ return False+ return True++class _UniffiFfiConverterTypeResolvedImage(_UniffiConverterRustBuffer):+ @staticmethod+ def read(buf):+ return ResolvedImage(+ reference=_UniffiFfiConverterString.read(buf),+ resolved_ref=_UniffiFfiConverterString.read(buf),+ pinned_ref=_UniffiFfiConverterString.read(buf),+ digest=_UniffiFfiConverterString.read(buf),+ variant=_UniffiFfiConverterString.read(buf),+ platform_digest=_UniffiFfiConverterOptionalString.read(buf),+ media_type=_UniffiFfiConverterString.read(buf),+ )++ @staticmethod+ def check_lower(value):+ _UniffiFfiConverterString.check_lower(value.reference)+ _UniffiFfiConverterString.check_lower(value.resolved_ref)+ _UniffiFfiConverterString.check_lower(value.pinned_ref)+ _UniffiFfiConverterString.check_lower(value.digest)+ _UniffiFfiConverterString.check_lower(value.variant)+ _UniffiFfiConverterOptionalString.check_lower(value.platform_digest)+ _UniffiFfiConverterString.check_lower(value.media_type)++ @staticmethod+ def write(value, buf):+ _UniffiFfiConverterString.write(value.reference, buf)+ _UniffiFfiConverterString.write(value.resolved_ref, buf)+ _UniffiFfiConverterString.write(value.pinned_ref, buf)+ _UniffiFfiConverterString.write(value.digest, buf)+ _UniffiFfiConverterString.write(value.variant, buf)+ _UniffiFfiConverterOptionalString.write(value.platform_digest, buf)+ _UniffiFfiConverterString.write(value.media_type, buf)+@dataclassclass ServiceStreamTarget:"""@@ -4978,6 +5275,171 @@ class _UniffiFfiConverterTypeCreatePoolRequestBuilder:buf.write_u64(cls.lower(value))+class CreateRegistrySecretRequestBuilderProtocol(typing.Protocol):++ def build(self, ) -> CreateRegistrySecretRequest:+ raise NotImplementedError+ def name(self, value: str) -> CreateRegistrySecretRequestBuilder:+ raise NotImplementedError+ def namespace(self, value: str) -> CreateRegistrySecretRequestBuilder:+ raise NotImplementedError+ def password(self, value: str) -> CreateRegistrySecretRequestBuilder:+ raise NotImplementedError+ def registry(self, value: str) -> CreateRegistrySecretRequestBuilder:+ raise NotImplementedError+ def username(self, value: str) -> CreateRegistrySecretRequestBuilder:+ raise NotImplementedError++class CreateRegistrySecretRequestBuilder(CreateRegistrySecretRequestBuilderProtocol):++ _handle: ctypes.c_uint64+ def __init__(self, ):+ _uniffi_lowered_args = (+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateRegistrySecretRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new,+ *_uniffi_lowered_args,+ )+ self._handle = _uniffi_ffi_result++ def __del__(self):+ # In case of partial initialization of instances.+ handle = getattr(self, "_handle", None)+ if handle is not None:+ _uniffi_rust_call(_UniffiLib.uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder, handle)++ def _uniffi_clone_handle(self):+ return _uniffi_rust_call(_UniffiLib.uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder, self._handle)++ # Used by alternative constructors or any methods which return this type.+ @classmethod+ def _uniffi_make_instance(cls, handle):+ # Lightly yucky way to bypass the usual __init__ logic+ # and just create a new instance with the required handle.+ inst = cls.__new__(cls)+ inst._handle = handle+ return inst+ def build(self, ) -> CreateRegistrySecretRequest:+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateRegistrySecretRequest.lift+ _uniffi_error_converter = _UniffiFfiConverterTypeSdkBuildError+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def name(self, value: str) -> CreateRegistrySecretRequestBuilder:++ _UniffiFfiConverterString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateRegistrySecretRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def namespace(self, value: str) -> CreateRegistrySecretRequestBuilder:++ _UniffiFfiConverterString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateRegistrySecretRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def password(self, value: str) -> CreateRegistrySecretRequestBuilder:++ _UniffiFfiConverterString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateRegistrySecretRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def registry(self, value: str) -> CreateRegistrySecretRequestBuilder:++ _UniffiFfiConverterString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateRegistrySecretRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def username(self, value: str) -> CreateRegistrySecretRequestBuilder:++ _UniffiFfiConverterString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateRegistrySecretRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)++++++class _UniffiFfiConverterTypeCreateRegistrySecretRequestBuilder:+ @staticmethod+ def lift(value: int) -> CreateRegistrySecretRequestBuilder:+ return CreateRegistrySecretRequestBuilder._uniffi_make_instance(value)++ @staticmethod+ def check_lower(value: CreateRegistrySecretRequestBuilder):+ if not isinstance(value, CreateRegistrySecretRequestBuilder):+ raise TypeError("Expected CreateRegistrySecretRequestBuilder instance, {} found".format(type(value).__name__))++ @staticmethod+ def lower(value: CreateRegistrySecretRequestBuilder) -> ctypes.c_uint64:+ return value._uniffi_clone_handle()++ @classmethod+ def read(cls, buf: _UniffiRustBuffer) -> CreateRegistrySecretRequestBuilder:+ ptr = buf.read_u64()+ if ptr == 0:+ raise InternalError("Raw handle value was null")+ return cls.lift(ptr)++ @classmethod+ def write(cls, value: CreateRegistrySecretRequestBuilder, buf: _UniffiRustBuffer):+ buf.write_u64(cls.lower(value))++class CreateSignedServiceUrlRequestBuilderProtocol(typing.Protocol):def build(self, ) -> CreateSignedServiceUrlRequest:@@ -5563,6 +6025,13 @@ class CyclopsClientProtocol(typing.Protocol):raise NotImplementedErrorasync def create_pool(self, request: CreatePoolRequest) -> Pool:raise NotImplementedError+ async def create_registry_secret(self, request: CreateRegistrySecretRequest) -> RegistrySecret:+ """+ Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ On a name conflict the old Secret is deleted and the new one created,+ since the gateway admits no Secret update.+"""+ raise NotImplementedErrorasync def create_signed_service_url(self, request: CreateSignedServiceUrlRequest) -> SignedServiceUrl:raise NotImplementedErrorasync def create_template(self, request: CreateTemplateRequest) -> Template:@@ -5582,6 +6051,8 @@ class CyclopsClientProtocol(typing.Protocol):raise NotImplementedErrorasync def delete_pool(self, pool: Pool) -> None:raise NotImplementedError+ async def delete_registry_secret(self, namespace: str,name: str) -> None:+ raise NotImplementedErrorasync def delete_template(self, template: Template) -> None:raise NotImplementedErrorasync def delete_user_api_key(self, id: str) -> None:@@ -5632,6 +6103,13 @@ class CyclopsClientProtocol(typing.Protocol):the deadline passes or the bound sandbox is deleted underneath it.Deliberately narrower than a claim update: nothing else on the claimcan be mutated through the SDK.+"""+ raise NotImplementedError+ async def resolve_image(self, reference: str,runtime: typing.Optional[str]) -> ResolvedImage:+ """+ Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ `kubevirt`, `macos`) selects the variant for canonical cua images:+ `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling."""raise NotImplementedErrorasync def revoke_signed_service_url(self, signed_service_url: SignedServiceUrl) -> None:@@ -5937,6 +6415,28 @@ class CyclopsClient(CyclopsClientProtocol):_uniffi_lift_return,_uniffi_error_converter,)+ async def create_registry_secret(self, request: CreateRegistrySecretRequest) -> RegistrySecret:+ """+ Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ On a name conflict the old Secret is deleted and the new one created,+ since the gateway admits no Secret update.+"""++ _UniffiFfiConverterTypeCreateRegistrySecretRequest.check_lower(request)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterTypeCreateRegistrySecretRequest.lower(request),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeRegistrySecret.lift+ _uniffi_error_converter = _UniffiFfiConverterTypeSdkError+ return await _uniffi_rust_call_async(+ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(*_uniffi_lowered_args),+ _UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ _UniffiLib.ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ _UniffiLib.ffi_cyclops_sdk_rust_future_free_rust_buffer,+ _uniffi_lift_return,+ _uniffi_error_converter,+ )async def create_signed_service_url(self, request: CreateSignedServiceUrlRequest) -> SignedServiceUrl:_UniffiFfiConverterTypeCreateSignedServiceUrlRequest.check_lower(request)@@ -6064,6 +6564,26 @@ class CyclopsClient(CyclopsClientProtocol):_uniffi_lift_return,_uniffi_error_converter,)+ async def delete_registry_secret(self, namespace: str,name: str) -> None:++ _UniffiFfiConverterString.check_lower(namespace)++ _UniffiFfiConverterString.check_lower(name)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(namespace),+ _UniffiFfiConverterString.lower(name),+ )+ _uniffi_lift_return = lambda val: None+ _uniffi_error_converter = _UniffiFfiConverterTypeSdkError+ return await _uniffi_rust_call_async(+ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(*_uniffi_lowered_args),+ _UniffiLib.ffi_cyclops_sdk_rust_future_poll_void,+ _UniffiLib.ffi_cyclops_sdk_rust_future_complete_void,+ _UniffiLib.ffi_cyclops_sdk_rust_future_free_void,+ _uniffi_lift_return,+ _uniffi_error_converter,+ )async def delete_template(self, template: Template) -> None:_UniffiFfiConverterTypeTemplate.check_lower(template)@@ -6407,6 +6927,31 @@ class CyclopsClient(CyclopsClientProtocol):_uniffi_lift_return,_uniffi_error_converter,)+ async def resolve_image(self, reference: str,runtime: typing.Optional[str]) -> ResolvedImage:+ """+ Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ `kubevirt`, `macos`) selects the variant for canonical cua images:+ `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+"""++ _UniffiFfiConverterString.check_lower(reference)++ _UniffiFfiConverterOptionalString.check_lower(runtime)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(reference),+ _UniffiFfiConverterOptionalString.lower(runtime),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeResolvedImage.lift+ _uniffi_error_converter = _UniffiFfiConverterTypeSdkError+ return await _uniffi_rust_call_async(+ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(*_uniffi_lowered_args),+ _UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ _UniffiLib.ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ _UniffiLib.ffi_cyclops_sdk_rust_future_free_rust_buffer,+ _uniffi_lift_return,+ _uniffi_error_converter,+ )async def revoke_signed_service_url(self, signed_service_url: SignedServiceUrl) -> None:_UniffiFfiConverterTypeSignedServiceUrl.check_lower(signed_service_url)@@ -7315,6 +7860,20 @@ def pool_display_status(pool: Pool) -> PoolDisplayStatus:*_uniffi_lowered_args,)return _uniffi_lift_return(_uniffi_ffi_result)+def registry_secret_name_prefix() -> str:+ """+ The name prefix every tenant registry pull Secret must carry.+"""+ _uniffi_lowered_args = (+ )+ _uniffi_lift_return = _UniffiFfiConverterString.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)def removed_pool_display_status() -> PoolDisplayStatus:_uniffi_lowered_args = ()@@ -7361,6 +7920,7 @@ __all__ = ["Pool","CreateClaimRequest","CreatePoolRequest",+ "CreateRegistrySecretRequest","Sandbox","CreateSignedServiceUrlRequest","CreateTemplateRequest",@@ -7380,6 +7940,8 @@ __all__ = ["Namespace","NewUserApiKey","PoolDisplayStatus",+ "RegistrySecret",+ "ResolvedImage","ServiceStreamTarget","SignedServiceUrl","Template",@@ -7388,6 +7950,7 @@ __all__ = ["fleet_label_key","healthy_pool_display_status","pool_display_status",+ "registry_secret_name_prefix","removed_pool_display_status","terminating_pool_display_status","unknown_pool_display_status",@@ -7399,6 +7962,8 @@ __all__ = ["CreateClaimRequestBuilderProtocol","CreatePoolRequestBuilder","CreatePoolRequestBuilderProtocol",+ "CreateRegistrySecretRequestBuilder",+ "CreateRegistrySecretRequestBuilderProtocol","CreateSignedServiceUrlRequestBuilder","CreateSignedServiceUrlRequestBuilderProtocol","CreateTemplateRequestBuilder",diff --git a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rb b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rbindex 8b1d0dedb2..12f4f2d25c 100644--- a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rb+++ b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rb@@ -432,6 +432,9 @@ endRustBuffer.check_lower_OptionalSequenceTypeSandboxService(v.services)RustBuffer.check_lower_OptionalTypeOidcConfig(v.oidc)RustBuffer.check_lower_Optionalbool(v.claim_secrets)+ RustBuffer.check_lower_OptionalSequencestring(v.args)+ RustBuffer.check_lower_OptionalMapStringString(v.env)+ RustBuffer.check_lower_OptionalTypeProcessMode(v.process_mode)enddef self.alloc_from_TypeVmTemplate(v)@@ -508,6 +511,25 @@ end+ # The Enum type ProcessMode.++ def self.check_lower_TypeProcessMode(v)+ end++ def self.alloc_from_TypeProcessMode(v)+ RustBuffer.allocWithBuilder do |builder|+ builder.write_TypeProcessMode(v)+ return builder.finalize+ end+ end++ def consumeIntoTypeProcessMode+ consumeWithStream do |stream|+ return stream.readTypeProcessMode+ end+ end++# The Enum type RuntimeKind.def self.check_lower_TypeRuntimeKind(v)@@ -798,6 +820,27 @@ endendend+ # The Optional<T> type for TypeProcessMode.++ def self.check_lower_OptionalTypeProcessMode(v)+ if not v.nil?+ RustBuffer.check_lower_TypeProcessMode(v)+ end+ end++ def self.alloc_from_OptionalTypeProcessMode(v)+ RustBuffer.allocWithBuilder do |builder|+ builder.write_OptionalTypeProcessMode(v)+ return builder.finalize()+ end+ end++ def consumeIntoOptionalTypeProcessMode+ consumeWithStream do |stream|+ return stream.readOptionalTypeProcessMode+ end+ end+# The Optional<T> type for TypeRuntimeKind.def self.check_lower_OptionalTypeRuntimeKind(v)@@ -1357,7 +1400,10 @@ class RustBufferStreamprobes: readOptionalTypePreservedJson,services: readOptionalSequenceTypeSandboxService,oidc: readOptionalTypeOidcConfig,- claim_secrets: readOptionalbool+ claim_secrets: readOptionalbool,+ args: readOptionalSequencestring,+ env: readOptionalMapStringString,+ process_mode: readOptionalTypeProcessMode)end@@ -1433,6 +1479,25 @@ class RustBufferStream+ # The Enum type ProcessMode.++ def readTypeProcessMode+ variant = unpack_from 4, 'l>'++ if variant == 1+ return ProcessMode::LEGACY+ end+ if variant == 2+ return ProcessMode::RUN+ end++ raise InternalError, 'Unexpected variant tag for TypeProcessMode'+ end+++++# The Enum type RuntimeKind.def readTypeRuntimeKind@@ -1665,6 +1730,20 @@ class RustBufferStreamendend+ # The Optional<T> type for TypeProcessMode.++ def readOptionalTypeProcessMode+ flag = unpack_from 1, 'c'++ if flag == 0+ return nil+ elsif flag == 1+ return readTypeProcessMode+ else+ raise InternalError, 'Unexpected flag byte for OptionalTypeProcessMode'+ end+ end+# The Optional<T> type for TypeRuntimeKind.def readOptionalTypeRuntimeKind@@ -2108,6 +2187,9 @@ class RustBufferBuilderself.write_OptionalSequenceTypeSandboxService(v.services)self.write_OptionalTypeOidcConfig(v.oidc)self.write_Optionalbool(v.claim_secrets)+ self.write_OptionalSequencestring(v.args)+ self.write_OptionalMapStringString(v.env)+ self.write_OptionalTypeProcessMode(v.process_mode)end# The Record type WarmPoolAutoscaling.@@ -2134,6 +2216,13 @@ class RustBufferBuilder+ # The Enum type ProcessMode.++ def write_TypeProcessMode(v)+ pack_into(4, 'l>', v)+ end++# The Enum type RuntimeKind.def write_TypeRuntimeKind(v)@@ -2278,6 +2367,17 @@ class RustBufferBuilderendend+ # The Optional<T> type for TypeProcessMode.++ def write_OptionalTypeProcessMode(v)+ if v.nil?+ pack_into(1, 'c', 0)+ else+ pack_into(1, 'c', 1)+ self.write_TypeProcessMode(v)+ end+ end+# The Optional<T> type for TypeRuntimeKind.def write_OptionalTypeRuntimeKind(v)@@ -2486,6 +2586,7 @@ end+module JsonValueErrorclass Invalid < StandardErrordef initialize(reason)@@ -2515,6 +2616,7 @@ ERROR_MODULE_TO_READER_METHOD = {+JsonValueError => :readTypeJsonValueError,@@ -2632,6 +2734,9 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new,[RustCallStatus.by_ref],:uint64+ attach_function :uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64attach_function :uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build,[:uint64, RustCallStatus.by_ref],RustBuffer.by_value@@ -2647,6 +2752,9 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores,[:uint64, :uint32, RustCallStatus.by_ref],:uint64+ attach_function :uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64attach_function :uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware,[:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64@@ -2671,6 +2779,9 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes,[:uint64, :uint64, RustCallStatus.by_ref],:uint64+ attach_function :uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64attach_function :uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime,[:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64@@ -2791,6 +2902,9 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build,[RustCallStatus.by_ref],:uint16@@ -2806,6 +2920,9 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware,[RustCallStatus.by_ref],:uint16@@ -2830,6 +2947,9 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime,[RustCallStatus.by_ref],:uint16@@ -2941,6 +3061,17 @@ end+class ProcessMode+ LEGACY = 1+ RUN = 2++end++++++class RuntimeKindKUBEVIRT = 1MACOS = 2@@ -3208,9 +3339,9 @@ end# Record type VmTemplateclass VmTemplate- attr_reader :container_disk_image, :command, :runtime, :runtime_class_name, :node_selector, :tolerations, :image_pull_policy, :image_pull_secret, :cpu_cores, :memory, :firmware, :nested_virtualization, :probes, :services, :oidc, :claim_secrets+ attr_reader :container_disk_image, :command, :runtime, :runtime_class_name, :node_selector, :tolerations, :image_pull_policy, :image_pull_secret, :cpu_cores, :memory, :firmware, :nested_virtualization, :probes, :services, :oidc, :claim_secrets, :args, :env, :process_mode- def initialize(container_disk_image:, command:, runtime:, runtime_class_name:, node_selector:, tolerations:, image_pull_policy:, image_pull_secret:, cpu_cores:, memory:, firmware:, nested_virtualization:, probes:, services:, oidc:, claim_secrets: nil)+ def initialize(container_disk_image:, command:, runtime:, runtime_class_name:, node_selector:, tolerations:, image_pull_policy:, image_pull_secret:, cpu_cores:, memory:, firmware:, nested_virtualization:, probes:, services:, oidc:, claim_secrets: nil, args: nil, env: nil, process_mode: nil)@container_disk_image = container_disk_image@command = command@runtime = runtime@@ -3227,6 +3358,9 @@ class VmTemplate@services = services@oidc = oidc@claim_secrets = claim_secrets+ @args = args+ @env = env+ @process_mode = process_modeenddef ==(other)@@ -3278,6 +3412,15 @@ class VmTemplateif @claim_secrets != other.claim_secretsreturn falseend+ if @args != other.args+ return false+ end+ if @env != other.env+ return false+ end+ if @process_mode != other.process_mode+ return false+ endtrueend@@ -3649,6 +3792,12 @@ end+ def args(value)+ value = value.map { |v| CyclopsSdkSchema::uniffi_utf8(v) }+ RustBuffer.check_lower_Sequencestring(value)+ result = CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args,uniffi_clone_handle(),RustBuffer.alloc_from_Sequencestring(value))+ return VmTemplateBuilder.uniffi_allocate(result)+ enddef build()result = CyclopsSdkSchema.rust_call_with_error(SchemaBuildError,:uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build,uniffi_clone_handle(),)return result.consumeIntoTypeVmTemplate@@ -3677,6 +3826,12 @@ endresult = CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores,uniffi_clone_handle(),value)return VmTemplateBuilder.uniffi_allocate(result)end+ def env(value)+ value = value.each.with_object({}) { |(k, v), res| res[CyclopsSdkSchema::uniffi_utf8(k)] = CyclopsSdkSchema::uniffi_utf8(v) }+ RustBuffer.check_lower_MapStringString(value)+ result = CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env,uniffi_clone_handle(),RustBuffer.alloc_from_MapStringString(value))+ return VmTemplateBuilder.uniffi_allocate(result)+ enddef firmware(value)value = valueRustBuffer.check_lower_TypeFirmware(value)@@ -3725,6 +3880,12 @@ endresult = CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes,uniffi_clone_handle(),(PreservedJson.uniffi_lower value))return VmTemplateBuilder.uniffi_allocate(result)end+ def process_mode(value)+ value = value+ RustBuffer.check_lower_TypeProcessMode(value)+ result = CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode,uniffi_clone_handle(),RustBuffer.alloc_from_TypeProcessMode(value))+ return VmTemplateBuilder.uniffi_allocate(result)+ enddef runtime(value)value = valueRustBuffer.check_lower_TypeRuntimeKind(value)diff --git a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rb b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rbindex d34c44d184..9721337609 100644--- a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rb+++ b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rb@@ -235,6 +235,29 @@ private_constant :UniffiHandleMapendend+ # The Record type CreateRegistrySecretRequest.++ def self.check_lower_TypeCreateRegistrySecretRequest(v)++++++ end++ def self.alloc_from_TypeCreateRegistrySecretRequest(v)+ RustBuffer.allocWithBuilder do |builder|+ builder.write_TypeCreateRegistrySecretRequest(v)+ return builder.finalize+ end+ end++ def consumeIntoTypeCreateRegistrySecretRequest+ consumeWithStream do |stream|+ return stream.readTypeCreateRegistrySecretRequest+ end+ end+# The Record type CreateSignedServiceUrlRequest.def self.check_lower_TypeCreateSignedServiceUrlRequest(v)@@ -643,6 +666,52 @@ private_constant :UniffiHandleMapendend+ # The Record type RegistrySecret.++ def self.check_lower_TypeRegistrySecret(v)++++ end++ def self.alloc_from_TypeRegistrySecret(v)+ RustBuffer.allocWithBuilder do |builder|+ builder.write_TypeRegistrySecret(v)+ return builder.finalize+ end+ end++ def consumeIntoTypeRegistrySecret+ consumeWithStream do |stream|+ return stream.readTypeRegistrySecret+ end+ end++ # The Record type ResolvedImage.++ def self.check_lower_TypeResolvedImage(v)++++++ RustBuffer.check_lower_Optionalstring(v.platform_digest)++ end++ def self.alloc_from_TypeResolvedImage(v)+ RustBuffer.allocWithBuilder do |builder|+ builder.write_TypeResolvedImage(v)+ return builder.finalize+ end+ end++ def consumeIntoTypeResolvedImage+ consumeWithStream do |stream|+ return stream.readTypeResolvedImage+ end+ end+# The Record type ResourceMetadata.def self.check_lower_TypeResourceMetadata(v)@@ -1351,6 +1420,13 @@ class RustBufferStreamreturn CreatePoolRequestBuilder.uniffi_allocate(handle)end+ # The Object type CreateRegistrySecretRequestBuilder.++ def readTypeCreateRegistrySecretRequestBuilder+ handle = unpack_from 8, 'Q>'+ return CreateRegistrySecretRequestBuilder.uniffi_allocate(handle)+ end+# The Object type CreateSignedServiceUrlRequestBuilder.def readTypeCreateSignedServiceUrlRequestBuilder@@ -1447,6 +1523,18 @@ class RustBufferStream)end+ # The Record type CreateRegistrySecretRequest.++ def readTypeCreateRegistrySecretRequest+ CreateRegistrySecretRequest.new(+ namespace: readString,+ name: readString,+ registry: readString,+ username: readString,+ password: readString+ )+ end+# The Record type CreateSignedServiceUrlRequest.def readTypeCreateSignedServiceUrlRequest@@ -1646,6 +1734,30 @@ class RustBufferStream)end+ # The Record type RegistrySecret.++ def readTypeRegistrySecret+ RegistrySecret.new(+ namespace: readString,+ name: readString,+ registry: readString+ )+ end++ # The Record type ResolvedImage.++ def readTypeResolvedImage+ ResolvedImage.new(+ reference: readString,+ resolved_ref: readString,+ pinned_ref: readString,+ digest: readString,+ variant: readString,+ platform_digest: readOptionalstring,+ media_type: readString+ )+ end+# The Record type ResourceMetadata.def readTypeResourceMetadata@@ -2297,6 +2409,13 @@ class RustBufferBuilderpack_into(8, 'Q>', handle)end+ # The Object type CreateRegistrySecretRequestBuilder.++ def write_TypeCreateRegistrySecretRequestBuilder(obj)+ handle = CreateRegistrySecretRequestBuilder.uniffi_lower obj+ pack_into(8, 'Q>', handle)+ end+# The Object type CreateSignedServiceUrlRequestBuilder.def write_TypeCreateSignedServiceUrlRequestBuilder(obj)@@ -2387,6 +2506,16 @@ class RustBufferBuilderself.write_TypeOSGymSandboxWarmPoolSpec(v.spec)end+ # The Record type CreateRegistrySecretRequest.++ def write_TypeCreateRegistrySecretRequest(v)+ self.write_String(v.namespace)+ self.write_String(v.name)+ self.write_String(v.registry)+ self.write_String(v.username)+ self.write_String(v.password)+ end+# The Record type CreateSignedServiceUrlRequest.def write_TypeCreateSignedServiceUrlRequest(v)@@ -2548,6 +2677,26 @@ class RustBufferBuilderself.write_MapStringString(v.headers)end+ # The Record type RegistrySecret.++ def write_TypeRegistrySecret(v)+ self.write_String(v.namespace)+ self.write_String(v.name)+ self.write_String(v.registry)+ end++ # The Record type ResolvedImage.++ def write_TypeResolvedImage(v)+ self.write_String(v.reference)+ self.write_String(v.resolved_ref)+ self.write_String(v.pinned_ref)+ self.write_String(v.digest)+ self.write_String(v.variant)+ self.write_Optionalstring(v.platform_digest)+ self.write_String(v.media_type)+ end+# The Record type ResourceMetadata.def write_TypeResourceMetadata(v)@@ -3432,6 +3581,15 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool,[:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64+ attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret,+ [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image,+ [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request,[:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],:uint64@@ -3474,6 +3632,33 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_list_user_api_keys,[:uint64, RustCallStatus.by_ref],:uint64+ attach_function :uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder,+ [:uint64, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder,+ [:uint64, RustCallStatus.by_ref],+ :void+ attach_function :uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new,+ [RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build,+ [:uint64, RustCallStatus.by_ref],+ RustBuffer.by_value+ attach_function :uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64attach_function :uniffi_cyclops_sdk_fn_clone_accesstokenprovider,[:uint64, RustCallStatus.by_ref],:uint64@@ -3730,6 +3915,9 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_fn_func_fleet_label_key,[RustCallStatus.by_ref],RustBuffer.by_value+ attach_function :uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix,+ [RustCallStatus.by_ref],+ RustBuffer.by_valueattach_function :uniffi_cyclops_sdk_fn_func_healthy_pool_display_status,[RustCallStatus.by_ref],RustBuffer.by_value@@ -3763,6 +3951,9 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_checksum_func_fleet_label_key,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status,[RustCallStatus.by_ref],:uint16@@ -3853,6 +4044,15 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request,[RustCallStatus.by_ref],:uint16@@ -3895,6 +4095,24 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_api_keys,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token,[RustCallStatus.by_ref],:uint16@@ -4039,6 +4257,9 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_native_http_client,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new,[RustCallStatus.by_ref],:uint16@@ -4252,6 +4473,105 @@ class PresignedPutendend+ # Record type CreateRegistrySecretRequest+class CreateRegistrySecretRequest+ attr_reader :namespace, :name, :registry, :username, :password++ def initialize(namespace:, name:, registry:, username:, password:)+ @namespace = namespace+ @name = name+ @registry = registry+ @username = username+ @password = password+ end++ def ==(other)+ if @namespace != other.namespace+ return false+ end+ if @name != other.name+ return false+ end+ if @registry != other.registry+ return false+ end+ if @username != other.username+ return false+ end+ if @password != other.password+ return false+ end++ true+ end+end++ # Record type RegistrySecret+class RegistrySecret+ attr_reader :namespace, :name, :registry++ def initialize(namespace:, name:, registry:)+ @namespace = namespace+ @name = name+ @registry = registry+ end++ def ==(other)+ if @namespace != other.namespace+ return false+ end+ if @name != other.name+ return false+ end+ if @registry != other.registry+ return false+ end++ true+ end+end++ # Record type ResolvedImage+class ResolvedImage+ attr_reader :reference, :resolved_ref, :pinned_ref, :digest, :variant, :platform_digest, :media_type++ def initialize(reference:, resolved_ref:, pinned_ref:, digest:, variant:, platform_digest:, media_type:)+ @reference = reference+ @resolved_ref = resolved_ref+ @pinned_ref = pinned_ref+ @digest = digest+ @variant = variant+ @platform_digest = platform_digest+ @media_type = media_type+ end++ def ==(other)+ if @reference != other.reference+ return false+ end+ if @resolved_ref != other.resolved_ref+ return false+ end+ if @pinned_ref != other.pinned_ref+ return false+ end+ if @digest != other.digest+ return false+ end+ if @variant != other.variant+ return false+ end+ if @platform_digest != other.platform_digest+ return false+ end+ if @media_type != other.media_type+ return false+ end++ true+ end+end+# Record type PoolDisplayStatusclass PoolDisplayStatusattr_reader :kind, :label, :indicator@@ -4907,6 +5227,15 @@ end+def self.registry_secret_name_prefix()+ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix,)+ return result.consumeIntoString+end+++++def self.healthy_pool_display_status()result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_func_healthy_pool_display_status,)return result.consumeIntoTypePoolDisplayStatus@@ -5350,6 +5679,40 @@ end)return result.consumeIntoTypePoolend+ def create_registry_secret(request)+ request = request+ RustBuffer.check_lower_TypeCreateRegistrySecretRequest(request)+ result = FleetSdk.uniffi_rust_future_rust_buffer(+ SdkError,+ UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(uniffi_clone_handle(),RustBuffer.alloc_from_TypeCreateRegistrySecretRequest(request),RustCallStatus.new),+ )+ return result.consumeIntoTypeRegistrySecret+ end+ def delete_registry_secret(namespace, name)+ namespace = FleetSdk::uniffi_utf8(namespace)++ name = FleetSdk::uniffi_utf8(name)++ FleetSdk.uniffi_rust_future_void(++ SdkError,++ UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(uniffi_clone_handle(),RustBuffer.allocFromString(namespace),RustBuffer.allocFromString(name),RustCallStatus.new),++ )+ end++ def resolve_image(reference, runtime)+ reference = FleetSdk::uniffi_utf8(reference)++ runtime = (runtime ? FleetSdk::uniffi_utf8(runtime) : nil)+ RustBuffer.check_lower_Optionalstring(runtime)+ result = FleetSdk.uniffi_rust_future_rust_buffer(+ SdkError,+ UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(uniffi_clone_handle(),RustBuffer.allocFromString(reference),RustBuffer.alloc_from_Optionalstring(runtime),RustCallStatus.new),+ )+ return result.consumeIntoTypeResolvedImage+ enddef service_request(sandbox, service, path, request)sandbox = sandboxRustBuffer.check_lower_TypeSandbox(sandbox)@@ -5499,6 +5862,93 @@ endreturn result.consumeIntoSequenceTypeUserApiKeyend+end++ class CreateRegistrySecretRequestBuilder++ # A private helper for initializing instances of the class from a raw handle,+ # bypassing any initialization logic and ensuring they are GC'd properly.+ def self.uniffi_allocate(handle)+ inst = allocate+ inst.instance_variable_set :@handle, handle+ ObjectSpace.define_finalizer(inst, uniffi_define_finalizer_by_handle(handle, inst.object_id))+ return inst+ end++ # A private helper for registering an object finalizer.+ # N.B. it's important that this does not capture a reference+ # to the actual instance, only its underlying handle.+ def self.uniffi_define_finalizer_by_handle(handle, object_id)+ Proc.new do |_id|+ FleetSdk.rust_call(+ :uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder,+ handle+ )+ end+ end++ # A private helper for lowering instances into a raw handle.+ # This does an explicit typecheck, because accidentally lowering a different type of+ # object in a place where this type is expected, could lead to memory unsafety.+ def self.uniffi_check_lower(inst)+ if not inst.is_a? self+ raise TypeError.new "Expected a CreateRegistrySecretRequestBuilder instance, got #{inst}"+ end+ end++ def uniffi_clone_handle()+ return FleetSdk.rust_call(+ :uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder,+ @handle+ )+ end++ def self.uniffi_lower(inst)+ return inst.uniffi_clone_handle()+ end+ def initialize()+ handle = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new,)+ @handle = handle+ ObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id))+ end++++ def build()+ result = FleetSdk.rust_call_with_error(SdkBuildError,:uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build,uniffi_clone_handle(),)+ return result.consumeIntoTypeCreateRegistrySecretRequest+ end+ def name(value)+ value = FleetSdk::uniffi_utf8(value)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name,uniffi_clone_handle(),RustBuffer.allocFromString(value))+ return CreateRegistrySecretRequestBuilder.uniffi_allocate(result)+ end+ def namespace(value)+ value = FleetSdk::uniffi_utf8(value)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace,uniffi_clone_handle(),RustBuffer.allocFromString(value))+ return CreateRegistrySecretRequestBuilder.uniffi_allocate(result)+ end+ def password(value)+ value = FleetSdk::uniffi_utf8(value)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password,uniffi_clone_handle(),RustBuffer.allocFromString(value))+ return CreateRegistrySecretRequestBuilder.uniffi_allocate(result)+ end+ def registry(value)+ value = FleetSdk::uniffi_utf8(value)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry,uniffi_clone_handle(),RustBuffer.allocFromString(value))+ return CreateRegistrySecretRequestBuilder.uniffi_allocate(result)+ end+ def username(value)+ value = FleetSdk::uniffi_utf8(value)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username,uniffi_clone_handle(),RustBuffer.allocFromString(value))+ return CreateRegistrySecretRequestBuilder.uniffi_allocate(result)+ end+endclass AccessTokenProviderdiff --git a/libs/fleet/sdk-bindings/swift/CyclopsSdk.swift b/libs/fleet/sdk-bindings/swift/CyclopsSdk.swiftindex 13b3a399e9..06cd464658 100644--- a/libs/fleet/sdk-bindings/swift/CyclopsSdk.swift+++ b/libs/fleet/sdk-bindings/swift/CyclopsSdk.swift@@ -1093,6 +1093,184 @@ public func FfiConverterTypeCreatePoolRequestBuilder_lower(_ value: CreatePoolRe+public protocol CreateRegistrySecretRequestBuilderProtocol: AnyObject, Sendable {++ func build() throws -> CreateRegistrySecretRequest++ func name(value: String) -> CreateRegistrySecretRequestBuilder++ func namespace(value: String) -> CreateRegistrySecretRequestBuilder++ func password(value: String) -> CreateRegistrySecretRequestBuilder++ func registry(value: String) -> CreateRegistrySecretRequestBuilder++ func username(value: String) -> CreateRegistrySecretRequestBuilder++}+open class CreateRegistrySecretRequestBuilder: CreateRegistrySecretRequestBuilderProtocol, @unchecked Sendable {+ fileprivate let handle: UInt64++ /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly.+#if swift(>=5.8)+ @_documentation(visibility: private)+#endif+ public struct NoHandle {+ public init() {}+ }++ // TODO: We'd like this to be `private` but for Swifty reasons,+ // we can't implement `FfiConverter` without making this `required` and we can't+ // make it `required` without making it `public`.+#if swift(>=5.8)+ @_documentation(visibility: private)+#endif+ required public init(unsafeFromHandle handle: UInt64) {+ self.handle = handle+ }++ // This constructor can be used to instantiate a fake object.+ // - Parameter noHandle: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject].+ //+ // - Warning:+ // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash.+#if swift(>=5.8)+ @_documentation(visibility: private)+#endif+ public init(noHandle: NoHandle) {+ self.handle = 0+ }++#if swift(>=5.8)+ @_documentation(visibility: private)+#endif+ public func uniffiCloneHandle() -> UInt64 {+ return try! rustCall { uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder(self.handle, $0) }+ }+public convenience init() {+ let handle =+ try! rustCall() {+ uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new($0+ )+}+ self.init(unsafeFromHandle: handle)+}++ deinit {+ if handle == 0 {+ // Mock objects have handle=0 don't try to free them+ return+ }++ try! rustCall { uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder(handle, $0) }+ }+++++open func build()throws -> CreateRegistrySecretRequest {+ return try FfiConverterTypeCreateRegistrySecretRequest_lift(try rustCallWithError(FfiConverterTypeSdkBuildError_lift) {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build(+ self.uniffiCloneHandle(),$0+ )+})+}++open func name(value: String) -> CreateRegistrySecretRequestBuilder {+ return try! FfiConverterTypeCreateRegistrySecretRequestBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(value),$0+ )+})+}++open func namespace(value: String) -> CreateRegistrySecretRequestBuilder {+ return try! FfiConverterTypeCreateRegistrySecretRequestBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(value),$0+ )+})+}++open func password(value: String) -> CreateRegistrySecretRequestBuilder {+ return try! FfiConverterTypeCreateRegistrySecretRequestBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(value),$0+ )+})+}++open func registry(value: String) -> CreateRegistrySecretRequestBuilder {+ return try! FfiConverterTypeCreateRegistrySecretRequestBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(value),$0+ )+})+}++open func username(value: String) -> CreateRegistrySecretRequestBuilder {+ return try! FfiConverterTypeCreateRegistrySecretRequestBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(value),$0+ )+})+}++++}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeCreateRegistrySecretRequestBuilder: FfiConverter {+ typealias FfiType = UInt64+ typealias SwiftType = CreateRegistrySecretRequestBuilder++ public static func lift(_ handle: UInt64) throws -> CreateRegistrySecretRequestBuilder {+ return CreateRegistrySecretRequestBuilder(unsafeFromHandle: handle)+ }++ public static func lower(_ value: CreateRegistrySecretRequestBuilder) -> UInt64 {+ return value.uniffiCloneHandle()+ }++ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CreateRegistrySecretRequestBuilder {+ let handle: UInt64 = try readInt(&buf)+ return try lift(handle)+ }++ public static func write(_ value: CreateRegistrySecretRequestBuilder, into buf: inout [UInt8]) {+ writeInt(&buf, lower(value))+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeCreateRegistrySecretRequestBuilder_lift(_ handle: UInt64) throws -> CreateRegistrySecretRequestBuilder {+ return try FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(handle)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeCreateRegistrySecretRequestBuilder_lower(_ value: CreateRegistrySecretRequestBuilder) -> UInt64 {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lower(value)+}++++++public protocol CreateSignedServiceUrlRequestBuilderProtocol: AnyObject, Sendable {func build() throws -> CreateSignedServiceUrlRequest@@ -1652,6 +1830,22 @@ public protocol CyclopsClientProtocol: AnyObject, Sendable {func updatePool(pool: Pool) async throws -> Pool+ /**+ * Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ * On a name conflict the old Secret is deleted and the new one created,+ * since the gateway admits no Secret update.+ */+ func createRegistrySecret(request: CreateRegistrySecretRequest) async throws -> RegistrySecret++ func deleteRegistrySecret(namespace: String, name: String) async throws++ /**+ * Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ * `kubevirt`, `macos`) selects the variant for canonical cua images:+ * `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+ */+ func resolveImage(reference: String, runtime: String?) async throws -> ResolvedImage+func serviceRequest(sandbox: Sandbox, service: String, path: String, request: HttpRequest) async throws -> HttpResponse/**@@ -2269,6 +2463,67 @@ open func updatePool(pool: Pool)async throws -> Pool {)}+ /**+ * Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ * On a name conflict the old Secret is deleted and the new one created,+ * since the gateway admits no Secret update.+ */+open func createRegistrySecret(request: CreateRegistrySecretRequest)async throws -> RegistrySecret {+ return+ try await uniffiRustCallAsync(+ rustFutureFunc: {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(+ self.uniffiCloneHandle(),+ FfiConverterTypeCreateRegistrySecretRequest_lower(request)+ )+ },+ pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ completeFunc: ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ freeFunc: ffi_cyclops_sdk_rust_future_free_rust_buffer,+ liftFunc: FfiConverterTypeRegistrySecret_lift,+ errorHandler: FfiConverterTypeSdkError_lift+ )+}++open func deleteRegistrySecret(namespace: String, name: String)async throws {+ return+ try await uniffiRustCallAsync(+ rustFutureFunc: {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(namespace),FfiConverterString.lower(name)+ )+ },+ pollFunc: ffi_cyclops_sdk_rust_future_poll_void,+ completeFunc: ffi_cyclops_sdk_rust_future_complete_void,+ freeFunc: ffi_cyclops_sdk_rust_future_free_void,+ liftFunc: { $0 },+ errorHandler: FfiConverterTypeSdkError_lift+ )+}++ /**+ * Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ * `kubevirt`, `macos`) selects the variant for canonical cua images:+ * `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+ */+open func resolveImage(reference: String, runtime: String?)async throws -> ResolvedImage {+ return+ try await uniffiRustCallAsync(+ rustFutureFunc: {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(reference),FfiConverterOptionString.lower(runtime)+ )+ },+ pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ completeFunc: ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ freeFunc: ffi_cyclops_sdk_rust_future_free_rust_buffer,+ liftFunc: FfiConverterTypeResolvedImage_lift,+ errorHandler: FfiConverterTypeSdkError_lift+ )+}+open func serviceRequest(sandbox: Sandbox, service: String, path: String, request: HttpRequest)async throws -> HttpResponse {returntry await uniffiRustCallAsync(@@ -3663,6 +3918,103 @@ public func FfiConverterTypeCreatePoolRequest_lower(_ value: CreatePoolRequest)}+/**+ * Credentials for one registry, stored as a `cua-registry-*` pull Secret.+ */+public struct CreateRegistrySecretRequest: Equatable, Hashable {+ /**+ * Pool namespace the Secret is created in. It must already exist (the+ * pool's namespace, created by `create_pool`, or by `create_namespace`).+ */+ public var namespace: String+ /**+ * Full Secret name, `cua-registry-<dns-label>`.+ */+ public var name: String+ /**+ * Registry host the credentials are for, as image refs spell it, e.g.+ * `ghcr.io`, `registry.example.com:5000` or `docker.io`.+ */+ public var registry: String+ public var username: String+ /**+ * Password or access token. Never serialized by `Debug`.+ */+ public var password: String++ // Default memberwise initializers are never public by default, so we+ // declare one manually.+ public init(+ /**+ * Pool namespace the Secret is created in. It must already exist (the+ * pool's namespace, created by `create_pool`, or by `create_namespace`).+ */namespace: String,+ /**+ * Full Secret name, `cua-registry-<dns-label>`.+ */name: String,+ /**+ * Registry host the credentials are for, as image refs spell it, e.g.+ * `ghcr.io`, `registry.example.com:5000` or `docker.io`.+ */registry: String, username: String,+ /**+ * Password or access token. Never serialized by `Debug`.+ */password: String) {+ self.namespace = namespace+ self.name = name+ self.registry = registry+ self.username = username+ self.password = password+ }+++++}++#if compiler(>=6)+extension CreateRegistrySecretRequest: Sendable {}+#endif++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeCreateRegistrySecretRequest: FfiConverterRustBuffer {+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CreateRegistrySecretRequest {+ return+ try CreateRegistrySecretRequest(+ namespace: FfiConverterString.read(from: &buf),+ name: FfiConverterString.read(from: &buf),+ registry: FfiConverterString.read(from: &buf),+ username: FfiConverterString.read(from: &buf),+ password: FfiConverterString.read(from: &buf)+ )+ }++ public static func write(_ value: CreateRegistrySecretRequest, into buf: inout [UInt8]) {+ FfiConverterString.write(value.namespace, into: &buf)+ FfiConverterString.write(value.name, into: &buf)+ FfiConverterString.write(value.registry, into: &buf)+ FfiConverterString.write(value.username, into: &buf)+ FfiConverterString.write(value.password, into: &buf)+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeCreateRegistrySecretRequest_lift(_ buf: RustBuffer) throws -> CreateRegistrySecretRequest {+ return try FfiConverterTypeCreateRegistrySecretRequest.lift(buf)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeCreateRegistrySecretRequest_lower(_ value: CreateRegistrySecretRequest) -> RustBuffer {+ return FfiConverterTypeCreateRegistrySecretRequest.lower(value)+}++public struct CreateSignedServiceUrlRequest: Equatable, Hashable {public var sandbox: Sandboxpublic var service: String@@ -4835,6 +5187,177 @@ public func FfiConverterTypePresignedPut_lower(_ value: PresignedPut) -> RustBuf}+/**+ * A created registry pull Secret. Carries no credential: Secrets are+ * write-only through the gateway.+ */+public struct RegistrySecret: Equatable, Hashable {+ public var namespace: String+ public var name: String+ public var registry: String++ // Default memberwise initializers are never public by default, so we+ // declare one manually.+ public init(namespace: String, name: String, registry: String) {+ self.namespace = namespace+ self.name = name+ self.registry = registry+ }+++++}++#if compiler(>=6)+extension RegistrySecret: Sendable {}+#endif++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeRegistrySecret: FfiConverterRustBuffer {+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RegistrySecret {+ return+ try RegistrySecret(+ namespace: FfiConverterString.read(from: &buf),+ name: FfiConverterString.read(from: &buf),+ registry: FfiConverterString.read(from: &buf)+ )+ }++ public static func write(_ value: RegistrySecret, into buf: inout [UInt8]) {+ FfiConverterString.write(value.namespace, into: &buf)+ FfiConverterString.write(value.name, into: &buf)+ FfiConverterString.write(value.registry, into: &buf)+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeRegistrySecret_lift(_ buf: RustBuffer) throws -> RegistrySecret {+ return try FfiConverterTypeRegistrySecret.lift(buf)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeRegistrySecret_lower(_ value: RegistrySecret) -> RustBuffer {+ return FfiConverterTypeRegistrySecret.lower(value)+}+++/**+ * A registry ref pinned by the gateway (`GET /api/images/resolve`).+ */+public struct ResolvedImage: Equatable, Hashable {+ /**+ * The ref as requested.+ */+ public var reference: String+ /**+ * The ref actually resolved: for a canonical image and runtime+ * `kubevirt` this is the containerDisk sibling (`…:24.04-disk`).+ */+ public var resolvedRef: String+ /**+ * `repo@sha256:…` of the manifest (or index) to run.+ */+ public var pinnedRef: String+ public var digest: String+ /**+ * `rootfs` (docker/gVisor), `containerdisk` (KubeVirt) or `unknown`.+ */+ public var variant: String+ /**+ * The linux/amd64 child manifest digest when the ref is an index.+ */+ public var platformDigest: String?+ public var mediaType: String++ // Default memberwise initializers are never public by default, so we+ // declare one manually.+ public init(+ /**+ * The ref as requested.+ */reference: String,+ /**+ * The ref actually resolved: for a canonical image and runtime+ * `kubevirt` this is the containerDisk sibling (`…:24.04-disk`).+ */resolvedRef: String,+ /**+ * `repo@sha256:…` of the manifest (or index) to run.+ */pinnedRef: String, digest: String,+ /**+ * `rootfs` (docker/gVisor), `containerdisk` (KubeVirt) or `unknown`.+ */variant: String,+ /**+ * The linux/amd64 child manifest digest when the ref is an index.+ */platformDigest: String?, mediaType: String) {+ self.reference = reference+ self.resolvedRef = resolvedRef+ self.pinnedRef = pinnedRef+ self.digest = digest+ self.variant = variant+ self.platformDigest = platformDigest+ self.mediaType = mediaType+ }+++++}++#if compiler(>=6)+extension ResolvedImage: Sendable {}+#endif++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeResolvedImage: FfiConverterRustBuffer {+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ResolvedImage {+ return+ try ResolvedImage(+ reference: FfiConverterString.read(from: &buf),+ resolvedRef: FfiConverterString.read(from: &buf),+ pinnedRef: FfiConverterString.read(from: &buf),+ digest: FfiConverterString.read(from: &buf),+ variant: FfiConverterString.read(from: &buf),+ platformDigest: FfiConverterOptionString.read(from: &buf),+ mediaType: FfiConverterString.read(from: &buf)+ )+ }++ public static func write(_ value: ResolvedImage, into buf: inout [UInt8]) {+ FfiConverterString.write(value.reference, into: &buf)+ FfiConverterString.write(value.resolvedRef, into: &buf)+ FfiConverterString.write(value.pinnedRef, into: &buf)+ FfiConverterString.write(value.digest, into: &buf)+ FfiConverterString.write(value.variant, into: &buf)+ FfiConverterOptionString.write(value.platformDigest, into: &buf)+ FfiConverterString.write(value.mediaType, into: &buf)+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeResolvedImage_lift(_ buf: RustBuffer) throws -> ResolvedImage {+ return try FfiConverterTypeResolvedImage.lift(buf)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeResolvedImage_lower(_ value: ResolvedImage) -> RustBuffer {+ return FfiConverterTypeResolvedImage.lower(value)+}++public struct ResourceMetadata: Equatable, Hashable {public var namespace: Stringpublic var name: String@@ -6418,6 +6941,15 @@ public func fleetLabelKey() -> String {)})}+/**+ * The name prefix every tenant registry pull Secret must carry.+ */+public func registrySecretNamePrefix() -> String {+ return try! FfiConverterString.lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix($0+ )+})+}public func healthyPoolDisplayStatus() -> PoolDisplayStatus {return try! FfiConverterTypePoolDisplayStatus_lift(try! rustCall() {uniffi_cyclops_sdk_fn_func_healthy_pool_display_status($0@@ -6471,6 +7003,9 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_checksum_func_fleet_label_key() != 5219) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix() != 63379) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status() != 3094) {return InitializationResult.apiChecksumMismatch}@@ -6561,6 +7096,15 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() != 17695) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret() != 5524) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret() != 778) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image() != 1395) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() != 46699) {return InitializationResult.apiChecksumMismatch}@@ -6603,6 +7147,24 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_api_keys() != 5949) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build() != 37137) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name() != 24925) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace() != 5201) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password() != 1991) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry() != 58635) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username() != 20465) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token() != 1180) {return InitializationResult.apiChecksumMismatch}@@ -6747,6 +7309,9 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_native_http_client() != 49301) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new() != 33724) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new() != 10967) {return InitializationResult.apiChecksumMismatch}diff --git a/libs/fleet/sdk-bindings/swift/CyclopsSdkFFI.h b/libs/fleet/sdk-bindings/swift/CyclopsSdkFFI.hindex 5bdeda7e62..fc47bdc19f 100644--- a/libs/fleet/sdk-bindings/swift/CyclopsSdkFFI.h+++ b/libs/fleet/sdk-bindings/swift/CyclopsSdkFFI.h@@ -443,6 +443,21 @@ uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_reconcile_pool(uint64_t ptr,uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(uint64_t ptr, RustBuffer pool);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_CREATE_REGISTRY_SECRET+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_CREATE_REGISTRY_SECRET+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(uint64_t ptr, RustBuffer request+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_DELETE_REGISTRY_SECRET+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_DELETE_REGISTRY_SECRET+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(uint64_t ptr, RustBuffer namespace, RustBuffer name+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_RESOLVE_IMAGE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_RESOLVE_IMAGE+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(uint64_t ptr, RustBuffer reference, RustBuffer runtime+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_SERVICE_REQUEST#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_SERVICE_REQUESTuint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(uint64_t ptr, RustBuffer sandbox, RustBuffer service, RustBuffer path, RustBuffer request@@ -513,6 +528,52 @@ uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_user_api_key(uint64_tuint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_list_user_api_keys(uint64_t ptr);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CREATEREGISTRYSECRETREQUESTBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CREATEREGISTRYSECRETREQUESTBUILDER+uint64_t uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CREATEREGISTRYSECRETREQUESTBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CREATEREGISTRYSECRETREQUESTBUILDER+void uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CREATEREGISTRYSECRETREQUESTBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CREATEREGISTRYSECRETREQUESTBUILDER_NEW+uint64_t uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new(RustCallStatus *_Nonnull out_status++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_BUILD+RustBuffer uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build(uint64_t ptr, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAME+uint64_t uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAMESPACE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAMESPACE+uint64_t uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_PASSWORD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_PASSWORD+uint64_t uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_REGISTRY+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_REGISTRY+uint64_t uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_USERNAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_USERNAME+uint64_t uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_ACCESSTOKENPROVIDER#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_ACCESSTOKENPROVIDERuint64_t uniffi_cyclops_sdk_fn_clone_accesstokenprovider(uint64_t handle, RustCallStatus *_Nonnull out_status@@ -901,6 +962,12 @@ RustBuffer uniffi_cyclops_sdk_fn_func_claim_env_token_key(RustCallStatus *_Nonnu#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FUNC_FLEET_LABEL_KEYRustBuffer uniffi_cyclops_sdk_fn_func_fleet_label_key(RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FUNC_REGISTRY_SECRET_NAME_PREFIX+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FUNC_REGISTRY_SECRET_NAME_PREFIX+RustBuffer uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(RustCallStatus *_Nonnull out_status+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FUNC_HEALTHY_POOL_DISPLAY_STATUS@@ -1202,6 +1269,12 @@ uint16_t uniffi_cyclops_sdk_checksum_func_claim_env_token_key(void#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_FUNC_FLEET_LABEL_KEYuint16_t uniffi_cyclops_sdk_checksum_func_fleet_label_key(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_FUNC_REGISTRY_SECRET_NAME_PREFIX+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_FUNC_REGISTRY_SECRET_NAME_PREFIX+uint16_t uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_FUNC_HEALTHY_POOL_DISPLAY_STATUS@@ -1382,6 +1455,24 @@ uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_reconcile_pool(void#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_UPDATE_POOLuint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_CREATE_REGISTRY_SECRET+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_CREATE_REGISTRY_SECRET+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_DELETE_REGISTRY_SECRET+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_DELETE_REGISTRY_SECRET+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_RESOLVE_IMAGE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_RESOLVE_IMAGE+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_SERVICE_REQUEST@@ -1466,6 +1557,42 @@ uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_user_api_key(vo#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_LIST_USER_API_KEYSuint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_api_keys(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_BUILD+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAME+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAMESPACE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_NAMESPACE+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_PASSWORD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_PASSWORD+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_REGISTRY+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_REGISTRY+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_USERNAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEREGISTRYSECRETREQUESTBUILDER_USERNAME+uint16_t uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_ACCESSTOKENPROVIDER_GET_ACCESS_TOKEN@@ -1754,6 +1881,12 @@ uint16_t uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_acce#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSCLIENT_CONNECT_WITH_NATIVE_HTTP_CLIENTuint16_t uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_native_http_client(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATEREGISTRYSECRETREQUESTBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATEREGISTRYSECRETREQUESTBUILDER_NEW+uint16_t uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATECLAIMREQUESTBUILDER_NEWdiff --git a/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swift b/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swiftindex d6302b5f95..7e43832514 100644--- a/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swift+++ b/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swift@@ -1255,6 +1255,8 @@ public func FfiConverterTypeSandboxTemplateRefBuilder_lower(_ value: SandboxTemppublic protocol VmTemplateBuilderProtocol: AnyObject, Sendable {+ func args(value: [String]) -> VmTemplateBuilder+func build() throws -> VmTemplatefunc claimSecrets(value: Bool) -> VmTemplateBuilder@@ -1265,6 +1267,8 @@ public protocol VmTemplateBuilderProtocol: AnyObject, Sendable {func cpuCores(value: UInt32) -> VmTemplateBuilder+ func env(value: [String: String]) -> VmTemplateBuilder+func firmware(value: Firmware) -> VmTemplateBuilderfunc imagePullPolicy(value: ImagePullPolicy) -> VmTemplateBuilder@@ -1281,6 +1285,8 @@ public protocol VmTemplateBuilderProtocol: AnyObject, Sendable {func probes(value: PreservedJson) -> VmTemplateBuilder+ func processMode(value: ProcessMode) -> VmTemplateBuilder+func runtime(value: RuntimeKind) -> VmTemplateBuilderfunc runtimeClassName(value: String) -> VmTemplateBuilder@@ -1350,6 +1356,15 @@ public convenience init() {+open func args(value: [String]) -> VmTemplateBuilder {+ return try! FfiConverterTypeVmTemplateBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(+ self.uniffiCloneHandle(),+ FfiConverterSequenceString.lower(value),$0+ )+})+}+open func build()throws -> VmTemplate {return try FfiConverterTypeVmTemplate_lift(try rustCallWithError(FfiConverterTypeSchemaBuildError_lift) {uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build(@@ -1394,6 +1409,15 @@ open func cpuCores(value: UInt32) -> VmTemplateBuilder {})}+open func env(value: [String: String]) -> VmTemplateBuilder {+ return try! FfiConverterTypeVmTemplateBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(+ self.uniffiCloneHandle(),+ FfiConverterDictionaryStringString.lower(value),$0+ )+})+}+open func firmware(value: Firmware) -> VmTemplateBuilder {return try! FfiConverterTypeVmTemplateBuilder_lift(try! rustCall() {uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware(@@ -1466,6 +1490,15 @@ open func probes(value: PreservedJson) -> VmTemplateBuilder {})}+open func processMode(value: ProcessMode) -> VmTemplateBuilder {+ return try! FfiConverterTypeVmTemplateBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(+ self.uniffiCloneHandle(),+ FfiConverterTypeProcessMode_lower(value),$0+ )+})+}+open func runtime(value: RuntimeKind) -> VmTemplateBuilder {return try! FfiConverterTypeVmTemplateBuilder_lift(try! rustCall() {uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime(@@ -2571,10 +2604,13 @@ public struct VmTemplate {public var services: [SandboxService]?public var oidc: OidcConfig?public var claimSecrets: Bool?+ public var args: [String]?+ public var env: [String: String]?+ public var processMode: ProcessMode?// Default memberwise initializers are never public by default, so we// declare one manually.- public init(containerDiskImage: String, command: [String]?, runtime: RuntimeKind?, runtimeClassName: String?, nodeSelector: [String: String]?, tolerations: [PreservedJson]?, imagePullPolicy: ImagePullPolicy?, imagePullSecret: String?, cpuCores: UInt32?, memory: String?, firmware: Firmware?, nestedVirtualization: Bool?, probes: PreservedJson?, services: [SandboxService]?, oidc: OidcConfig?, claimSecrets: Bool? = nil) {+ public init(containerDiskImage: String, command: [String]?, runtime: RuntimeKind?, runtimeClassName: String?, nodeSelector: [String: String]?, tolerations: [PreservedJson]?, imagePullPolicy: ImagePullPolicy?, imagePullSecret: String?, cpuCores: UInt32?, memory: String?, firmware: Firmware?, nestedVirtualization: Bool?, probes: PreservedJson?, services: [SandboxService]?, oidc: OidcConfig?, claimSecrets: Bool? = nil, args: [String]? = nil, env: [String: String]? = nil, processMode: ProcessMode? = nil) {self.containerDiskImage = containerDiskImageself.command = commandself.runtime = runtime@@ -2591,6 +2627,9 @@ public struct VmTemplate {self.services = servicesself.oidc = oidcself.claimSecrets = claimSecrets+ self.args = args+ self.env = env+ self.processMode = processMode}@@ -2624,7 +2663,10 @@ public struct FfiConverterTypeVmTemplate: FfiConverterRustBuffer {probes: FfiConverterOptionTypePreservedJson.read(from: &buf),services: FfiConverterOptionSequenceTypeSandboxService.read(from: &buf),oidc: FfiConverterOptionTypeOidcConfig.read(from: &buf),- claimSecrets: FfiConverterOptionBool.read(from: &buf)+ claimSecrets: FfiConverterOptionBool.read(from: &buf),+ args: FfiConverterOptionSequenceString.read(from: &buf),+ env: FfiConverterOptionDictionaryStringString.read(from: &buf),+ processMode: FfiConverterOptionTypeProcessMode.read(from: &buf))}@@ -2645,6 +2687,9 @@ public struct FfiConverterTypeVmTemplate: FfiConverterRustBuffer {FfiConverterOptionSequenceTypeSandboxService.write(value.services, into: &buf)FfiConverterOptionTypeOidcConfig.write(value.oidc, into: &buf)FfiConverterOptionBool.write(value.claimSecrets, into: &buf)+ FfiConverterOptionSequenceString.write(value.args, into: &buf)+ FfiConverterOptionDictionaryStringString.write(value.env, into: &buf)+ FfiConverterOptionTypeProcessMode.write(value.processMode, into: &buf)}}@@ -2936,6 +2981,85 @@ public func FfiConverterTypeJsonValueError_lower(_ value: JsonValueError) -> Rusreturn FfiConverterTypeJsonValueError.lower(value)}+// Note that we don't yet support `indirect` for enums.+// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.+/**+ * How `vmTemplate.command`/`args`/`env` reach the sandbox+ * (`vmTemplate.processMode`). Absent means `Legacy`.+ */++public enum ProcessMode: Equatable, Hashable {++ /**+ * What templates did before processMode existed: pod runtimes run+ * command/args/env; KubeVirt ignores command and refuses args/env.+ */+ case legacy+ /**+ * Every runtime runs command/args/env. Pod runtimes set them on the+ * sandbox container; KubeVirt renders them into the sandbox's cloud-init.+ */+ case run++++++}++#if compiler(>=6)+extension ProcessMode: Sendable {}+#endif++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeProcessMode: FfiConverterRustBuffer {+ typealias SwiftType = ProcessMode++ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProcessMode {+ let variant: Int32 = try readInt(&buf)+ switch variant {++ case 1: return .legacy++ case 2: return .run++ default: throw UniffiInternalError.unexpectedEnumCase+ }+ }++ public static func write(_ value: ProcessMode, into buf: inout [UInt8]) {+ switch value {+++ case .legacy:+ writeInt(&buf, Int32(1))+++ case .run:+ writeInt(&buf, Int32(2))++ }+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeProcessMode_lift(_ buf: RustBuffer) throws -> ProcessMode {+ return try FfiConverterTypeProcessMode.lift(buf)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeProcessMode_lower(_ value: ProcessMode) -> RustBuffer {+ return FfiConverterTypeProcessMode.lower(value)+}++// Note that we don't yet support `indirect` for enums.// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.@@ -3495,6 +3619,30 @@ fileprivate struct FfiConverterOptionTypeImagePullPolicy: FfiConverterRustBuffer}}+#if swift(>=5.8)+@_documentation(visibility: private)+#endif+fileprivate struct FfiConverterOptionTypeProcessMode: FfiConverterRustBuffer {+ typealias SwiftType = ProcessMode?++ public static func write(_ value: SwiftType, into buf: inout [UInt8]) {+ guard let value = value else {+ writeInt(&buf, Int8(0))+ return+ }+ writeInt(&buf, Int8(1))+ FfiConverterTypeProcessMode.write(value, into: &buf)+ }++ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {+ switch try readInt(&buf) as Int8 {+ case 0: return nil+ case 1: return try FfiConverterTypeProcessMode.read(from: &buf)+ default: throw UniffiInternalError.unexpectedOptionalTag+ }+ }+}+#if swift(>=5.8)@_documentation(visibility: private)#endif@@ -3846,6 +3994,9 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name() != 1803) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args() != 38529) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build() != 17867) {return InitializationResult.apiChecksumMismatch}@@ -3861,6 +4012,9 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores() != 25645) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env() != 48368) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware() != 33926) {return InitializationResult.apiChecksumMismatch}@@ -3885,6 +4039,9 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes() != 40623) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode() != 49070) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime() != 63375) {return InitializationResult.apiChecksumMismatch}diff --git a/libs/fleet/sdk-bindings/swift/CyclopsSdkSchemaFFI.h b/libs/fleet/sdk-bindings/swift/CyclopsSdkSchemaFFI.hindex 27e6eaba04..a82a9b6722 100644--- a/libs/fleet/sdk-bindings/swift/CyclopsSdkSchemaFFI.h+++ b/libs/fleet/sdk-bindings/swift/CyclopsSdkSchemaFFI.h@@ -319,6 +319,11 @@ void uniffi_cyclops_sdk_schema_fn_free_vmtemplatebuilder(uint64_t handle, RustCa#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_CONSTRUCTOR_VMTEMPLATEBUILDER_NEWuint64_t uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new(RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_ARGS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_ARGS+uint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_BUILD@@ -346,6 +351,11 @@ uint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_container_disk_imuint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores(uint64_t ptr, uint32_t value, RustCallStatus *_Nonnull out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_ENV+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_ENV+uint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_FIRMWARE#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_FIRMWAREuint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status@@ -386,6 +396,11 @@ uint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_oidc(uint64_t ptruint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes(uint64_t ptr, uint64_t value, RustCallStatus *_Nonnull out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_PROCESS_MODE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_PROCESS_MODE+uint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_RUNTIME#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_VMTEMPLATEBUILDER_RUNTIMEuint64_t uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status@@ -833,6 +848,12 @@ uint16_t uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_bui#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_SANDBOXTEMPLATEREFBUILDER_NAMEuint16_t uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_ARGS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_ARGS+uint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_BUILD@@ -863,6 +884,12 @@ uint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_container_d#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_CPU_CORESuint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_ENV+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_ENV+uint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_FIRMWARE@@ -911,6 +938,12 @@ uint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_oidc(void#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_PROBESuint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_PROCESS_MODE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_PROCESS_MODE+uint16_t uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_VMTEMPLATEBUILDER_RUNTIMEdiff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/cyclops_sdk_schema_module.rs b/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/cyclops_sdk_schema_module.rsindex 6ffaf7190c..d4e4b50d68 100644--- a/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/cyclops_sdk_schema_module.rs+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/cyclops_sdk_schema_module.rs@@ -63,6 +63,11 @@ extern "C" {fn uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new(status_: &mut u::RustCallStatus,) -> u64;+ fn uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(+ ptr: u64,+ value: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;fn uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build(ptr: u64,status_: &mut u::RustCallStatus,@@ -87,6 +92,11 @@ extern "C" {value: u32,status_: &mut u::RustCallStatus,) -> u64;+ fn uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(+ ptr: u64,+ value: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;fn uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware(ptr: u64,value: u::RustBuffer,@@ -127,6 +137,11 @@ extern "C" {value: u64,status_: &mut u::RustCallStatus,) -> u64;+ fn uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(+ ptr: u64,+ value: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;fn uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime(ptr: u64,value: u::RustBuffer,@@ -264,11 +279,13 @@ extern "C" {fn uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_target_port() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_build() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name() -> u16;+ fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_claim_secrets() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_command() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_container_disk_image() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores() -> u16;+ fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_policy() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_secret() -> u16;@@ -277,6 +294,7 @@ extern "C" {fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_node_selector() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_oidc() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes() -> u16;+ fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime_class_name() -> u16;fn uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_services() -> u16;@@ -520,6 +538,23 @@ pub fn ubrn_uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new(value_.into_js()}#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(+ ptr: js::Handle,+ value: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(value),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build(ptr: js::Handle,f_status_: &mut js::RustCallStatus,@@ -603,6 +638,23 @@ pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores(value_.into_js()}#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(+ ptr: js::Handle,+ value: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(value),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware(ptr: js::Handle,value: js::ForeignBytes,@@ -739,6 +791,23 @@ pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes(value_.into_js()}#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(+ ptr: js::Handle,+ value: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(value),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime(ptr: js::Handle,value: js::ForeignBytes,@@ -1221,6 +1290,11 @@ pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name().into_js()}#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args() -> js::UInt16+{+ uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args().into_js()+}+#[wasm_bindgen]pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build() -> js::UInt16{uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build().into_js()@@ -1246,6 +1320,10 @@ pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cuniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores().into_js()}#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env() -> js::UInt16 {+ uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env().into_js()+}+#[wasm_bindgen]pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware() -> js::UInt16 {uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware().into_js()@@ -1286,6 +1364,11 @@ pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_puniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes().into_js()}#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode(+) -> js::UInt16 {+ uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode().into_js()+}+#[wasm_bindgen]pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime() -> js::UInt16 {uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime().into_js()diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/fleet_sdk_module.rs b/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/fleet_sdk_module.rsindex 436c817307..aef85a9ad1 100644--- a/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/fleet_sdk_module.rs+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/fleet_sdk_module.rs@@ -133,6 +133,20 @@ extern "C" {) -> u64;fn uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(ptr: u64, pool: u::RustBuffer)-> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(+ ptr: u64,+ request: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(+ ptr: u64,+ namespace: u::RustBuffer,+ name: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(+ ptr: u64,+ reference: u::RustBuffer,+ runtime: u::RustBuffer,+ ) -> u64;fn uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(ptr: u64,sandbox: u::RustBuffer,@@ -192,6 +206,46 @@ extern "C" {id: u::RustBuffer,) -> u64;fn uniffi_cyclops_sdk_fn_method_cyclopsclient_list_user_api_keys(ptr: u64) -> u64;+ fn uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder(+ handle: u64,+ status_: &mut u::RustCallStatus,+ );+ fn uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new(+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build(+ ptr: u64,+ status_: &mut u::RustCallStatus,+ ) -> u::RustBuffer;+ fn uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name(+ ptr: u64,+ value: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace(+ ptr: u64,+ value: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password(+ ptr: u64,+ value: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry(+ ptr: u64,+ value: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username(+ ptr: u64,+ value: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;fn uniffi_cyclops_sdk_fn_clone_accesstokenprovider(handle: u64,status_: &mut u::RustCallStatus,@@ -494,6 +548,9 @@ extern "C" {) -> u::RustBuffer;fn uniffi_cyclops_sdk_fn_func_fleet_label_key(status_: &mut u::RustCallStatus)-> u::RustBuffer;+ fn uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(+ status_: &mut u::RustCallStatus,+ ) -> u::RustBuffer;fn uniffi_cyclops_sdk_fn_func_healthy_pool_display_status(status_: &mut u::RustCallStatus,) -> u::RustBuffer;@@ -635,6 +692,7 @@ extern "C" {fn ffi_cyclops_sdk_rust_future_complete_void(handle: u64, status_: &mut u::RustCallStatus);fn uniffi_cyclops_sdk_checksum_func_claim_env_token_key() -> u16;fn uniffi_cyclops_sdk_checksum_func_fleet_label_key() -> u16;+ fn uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix() -> u16;fn uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status() -> u16;fn uniffi_cyclops_sdk_checksum_func_pool_display_status() -> u16;fn uniffi_cyclops_sdk_checksum_func_removed_pool_display_status() -> u16;@@ -665,6 +723,9 @@ extern "C" {fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() -> u16;fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_reconcile_pool() -> u16;fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image() -> u16;fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() -> u16;fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_websocket_url() -> u16;fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url() -> u16;@@ -679,6 +740,12 @@ extern "C" {fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_user_api_key() -> u16;fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_user_api_key() -> u16;fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_api_keys() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username() -> u16;fn uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token() -> u16;fn uniffi_cyclops_sdk_checksum_method_httpclient_execute() -> u16;fn uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build() -> u16;@@ -736,6 +803,7 @@ extern "C" {fn uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_access_token_provider_and_native_http_client() -> u16;fn uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_native_http_client() -> u16;+ fn uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new() -> u16;fn uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new() -> u16;fn uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new() -> u16;fn uniffi_cyclops_sdk_checksum_constructor_createsignedserviceurlrequestbuilder_new() -> u16;@@ -1168,6 +1236,43 @@ pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(.into_js()}#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(+ ptr: js::Handle,+ request: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(request),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(+ ptr: js::Handle,+ namespace: js::ForeignBytes,+ name: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(namespace),+ u::RustBuffer::into_rust(name),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(+ ptr: js::Handle,+ reference: js::ForeignBytes,+ runtime: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(reference),+ u::RustBuffer::into_rust(runtime),+ )+ .into_js()+}+#[wasm_bindgen]pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(ptr: js::Handle,sandbox: js::ForeignBytes,@@ -1329,6 +1434,146 @@ pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_list_user_api_keysuniffi_cyclops_sdk_fn_method_cyclopsclient_list_user_api_keys(u64::into_rust(ptr)).into_js()}#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder(+ u64::into_rust(handle),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) {+ let mut u_status_ = u::RustCallStatus::default();+ unsafe {+ uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder(+ u64::into_rust(handle),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new(+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new(&mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build(+ ptr: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::ForeignBytes {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build(+ u64::into_rust(ptr),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name(+ ptr: js::Handle,+ value: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(value),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace(+ ptr: js::Handle,+ value: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(value),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password(+ ptr: js::Handle,+ value: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(value),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry(+ ptr: js::Handle,+ value: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(value),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username(+ ptr: js::Handle,+ value: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(value),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]pub fn ubrn_uniffi_cyclops_sdk_fn_clone_accesstokenprovider(handle: js::Handle,f_status_: &mut js::RustCallStatus,@@ -2403,6 +2648,15 @@ pub fn ubrn_uniffi_cyclops_sdk_fn_func_fleet_label_key(value_.into_js()}#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(+ f_status_: &mut js::RustCallStatus,+) -> js::ForeignBytes {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe { uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(&mut u_status_) };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]pub fn ubrn_uniffi_cyclops_sdk_fn_func_healthy_pool_display_status(f_status_: &mut js::RustCallStatus,) -> js::ForeignBytes {@@ -2834,6 +3088,10 @@ pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_func_fleet_label_key() -> js::UInuniffi_cyclops_sdk_checksum_func_fleet_label_key().into_js()}#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix().into_js()+}+#[wasm_bindgen]pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status() -> js::UInt16 {uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status().into_js()}@@ -2962,6 +3220,20 @@ pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool(uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool().into_js()}#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret(+) -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret(+) -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image().into_js()+}+#[wasm_bindgen]pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() -> js::UInt16{uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request().into_js()@@ -3030,6 +3302,36 @@ pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_apuniffi_cyclops_sdk_checksum_method_cyclopsclient_list_user_api_keys().into_js()}#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build(+) -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name(+) -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace(+) -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password(+) -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry(+) -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username(+) -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username().into_js()+}+#[wasm_bindgen]pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token() -> js::UInt16 {uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token().into_js()@@ -3264,6 +3566,11 @@ pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect.into_js()}#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new(+) -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new().into_js()+}+#[wasm_bindgen]pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new() -> js::UInt16 {uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new().into_js()diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk_schema.ts b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk_schema.tsindex cae2e0ebf6..c1bf595a74 100644--- a/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk_schema.ts+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk_schema.ts@@ -742,6 +742,47 @@ const FfiConverterTypeOidcConfig = (() => {return new FFIConverter();})();+/**+ * How `vmTemplate.command`/`args`/`env` reach the sandbox+ * (`vmTemplate.processMode`). Absent means `Legacy`.+ */+export enum ProcessMode {+ /**+ * What templates did before processMode existed: pod runtimes run+ * command/args/env; KubeVirt ignores command and refuses args/env.+ */+ Legacy,+ /**+ * Every runtime runs command/args/env. Pod runtimes set them on the+ * sandbox container; KubeVirt renders them into the sandbox's cloud-init.+ */+ Run+}++const FfiConverterTypeProcessMode = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = ProcessMode;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return ProcessMode.Legacy;+ case 2: return ProcessMode.Run;+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value) {+ case ProcessMode.Legacy: return ordinalConverter.write(1, into);+ case ProcessMode.Run: return ordinalConverter.write(2, into);+ }+ }+ allocationSize(value: TypeName): number {+ return ordinalConverter.allocationSize(0);+ }+ }+ return new FFIConverter();+})();+export type VmTemplate = {containerDiskImage: string,command?: Array<string>,@@ -758,7 +799,10 @@ export type VmTemplate = {probes?: PreservedJsonLike,services?: Array<SandboxService>,oidc?: OidcConfig,- claimSecrets?: boolean+ claimSecrets?: boolean,+ args?: Array<string>,+ env?: Map<string, string>,+ processMode?: ProcessMode}/**@@ -766,7 +810,10 @@ export type VmTemplate = {*/export const VmTemplate = (() => {const defaults = () => ({- claimSecrets: undefined+ claimSecrets: undefined,+ args: undefined,+ env: undefined,+ processMode: undefined});const create = (() => {return uniffiCreateRecord<VmTemplate, ReturnType<typeof defaults>>(defaults);@@ -798,7 +845,10 @@ const FfiConverterTypeVmTemplate = (() => {probes: FfiConverterOptionalTypePreservedJson.read(from),services: FfiConverterOptionalSequenceTypeSandboxService.read(from),oidc: FfiConverterOptionalTypeOidcConfig.read(from),- claimSecrets: FfiConverterOptionalBoolean.read(from)+ claimSecrets: FfiConverterOptionalBoolean.read(from),+ args: FfiConverterOptionalSequenceString.read(from),+ env: FfiConverterOptionalMapStringString.read(from),+ processMode: FfiConverterOptionalTypeProcessMode.read(from)};}write(value: TypeName, into: RustBuffer): void {@@ -818,6 +868,9 @@ const FfiConverterTypeVmTemplate = (() => {FfiConverterOptionalSequenceTypeSandboxService.write(value.services, into);FfiConverterOptionalTypeOidcConfig.write(value.oidc, into);FfiConverterOptionalBoolean.write(value.claimSecrets, into);+ FfiConverterOptionalSequenceString.write(value.args, into);+ FfiConverterOptionalMapStringString.write(value.env, into);+ FfiConverterOptionalTypeProcessMode.write(value.processMode, into);}allocationSize(value: TypeName): number {return FfiConverterString.allocationSize(value.containerDiskImage) +@@ -835,7 +888,10 @@ const FfiConverterTypeVmTemplate = (() => {FfiConverterOptionalTypePreservedJson.allocationSize(value.probes) +FfiConverterOptionalSequenceTypeSandboxService.allocationSize(value.services) +FfiConverterOptionalTypeOidcConfig.allocationSize(value.oidc) +- FfiConverterOptionalBoolean.allocationSize(value.claimSecrets);+ FfiConverterOptionalBoolean.allocationSize(value.claimSecrets) ++ FfiConverterOptionalSequenceString.allocationSize(value.args) ++ FfiConverterOptionalMapStringString.allocationSize(value.env) ++ FfiConverterOptionalTypeProcessMode.allocationSize(value.processMode);}};@@ -2058,11 +2114,13 @@ const FfiConverterTypeSandboxTemplateRefBuilder = new FfiConverterObject(uniffiTexport interface VmTemplateBuilderLike {+ args(value: Array<string>): VmTemplateBuilderLike;build() /*throws*/: VmTemplate;claimSecrets(value: boolean): VmTemplateBuilderLike;command(value: Array<string>): VmTemplateBuilderLike;containerDiskImage(value: string): VmTemplateBuilderLike;cpuCores(value: number): VmTemplateBuilderLike;+ env(value: Map<string, string>): VmTemplateBuilderLike;firmware(value: Firmware): VmTemplateBuilderLike;imagePullPolicy(value: ImagePullPolicy): VmTemplateBuilderLike;imagePullSecret(value: string): VmTemplateBuilderLike;@@ -2071,6 +2129,7 @@ export interface VmTemplateBuilderLike {nodeSelector(value: Map<string, string>): VmTemplateBuilderLike;oidc(value: OidcConfig): VmTemplateBuilderLike;probes(value: PreservedJsonLike): VmTemplateBuilderLike;+ processMode(value: ProcessMode): VmTemplateBuilderLike;runtime(value: RuntimeKind): VmTemplateBuilderLike;runtimeClassName(value: string): VmTemplateBuilderLike;services(value: Array<SandboxService>): VmTemplateBuilderLike;@@ -2104,6 +2163,18 @@ export class VmTemplateBuilder extends UniffiAbstractObject implements VmTemplat+ args(value: Array<string>): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterSequenceString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }+build(): VmTemplate /*throws*/ {return ((__rb: Uint8Array) => {try {@@ -2170,6 +2241,18 @@ export class VmTemplateBuilder extends UniffiAbstractObject implements VmTemplat));}+ env(value: Map<string, string>): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterMapStringString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }+firmware(value: Firmware): VmTemplateBuilderLike {return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(/*caller:*/ (callStatus) => {@@ -2266,6 +2349,18 @@ export class VmTemplateBuilder extends UniffiAbstractObject implements VmTemplat));}+ processMode(value: ProcessMode): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterTypeProcessMode.lower(value, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }+runtime(value: RuntimeKind): VmTemplateBuilderLike {return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(/*caller:*/ (callStatus) => {@@ -2629,6 +2724,9 @@ const FfiConverterOptionalSequenceTypeSandboxService = new FfiConverterOptional(// FfiConverter for OidcConfig | undefinedconst FfiConverterOptionalTypeOidcConfig = new FfiConverterOptional(FfiConverterTypeOidcConfig);+// FfiConverter for ProcessMode | undefined+const FfiConverterOptionalTypeProcessMode = new FfiConverterOptional(FfiConverterTypeProcessMode);+// FfiConverter for WarmPoolAutoscaling | undefinedconst FfiConverterOptionalTypeWarmPoolAutoscaling = new FfiConverterOptional(FfiConverterTypeWarmPoolAutoscaling);@@ -2720,6 +2818,9 @@ function uniffiEnsureInitialized() {if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_vmtemplatebuilder_new() !== 27302) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_constructor_vmtemplatebuilder_new");}+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args() !== 38529) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args");+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build() !== 17867) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build");}@@ -2735,6 +2836,9 @@ function uniffiEnsureInitialized() {if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores() !== 25645) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores");}+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env() !== 48368) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env");+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware() !== 33926) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware");}@@ -2759,6 +2863,9 @@ function uniffiEnsureInitialized() {if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes() !== 40623) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes");}+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode() !== 49070) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode");+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime() !== 63375) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime");}@@ -2810,6 +2917,7 @@ export default Object.freeze({FfiConverterTypeOSGymSandboxWarmPoolStatus,FfiConverterTypeOidcConfig,FfiConverterTypePreservedJson,+ FfiConverterTypeProcessMode,FfiConverterTypeRuntimeKind,FfiConverterTypeSandboxService,FfiConverterTypeSandboxServiceBuilder,diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/fleet_sdk.ts b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/fleet_sdk.tsindex 80b1b34983..80a9e24640 100644--- a/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/fleet_sdk.ts+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/fleet_sdk.ts@@ -105,6 +105,25 @@ export function poolDisplayStatus(pool: Pool): PoolDisplayStatus {));}+/**+ * The name prefix every tenant registry pull Secret must carry.+ */+export function registrySecretNamePrefix(): string {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterString.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }+export function removedPoolDisplayStatus(): PoolDisplayStatus {return ((__rb: Uint8Array) => {try {@@ -464,6 +483,78 @@ const FfiConverterTypeCreatePoolRequest = (() => {return new FFIConverter();})();+/**+ * Credentials for one registry, stored as a `cua-registry-*` pull Secret.+ */+export type CreateRegistrySecretRequest = {+ /**+ * Pool namespace the Secret is created in. It must already exist (the+ * pool's namespace, created by `create_pool`, or by `create_namespace`).+ */+ namespace: string,+ /**+ * Full Secret name, `cua-registry-<dns-label>`.+ */+ name: string,+ /**+ * Registry host the credentials are for, as image refs spell it, e.g.+ * `ghcr.io`, `registry.example.com:5000` or `docker.io`.+ */+ registry: string,+ username: string,+ /**+ * Password or access token. Never serialized by `Debug`.+ */+ password: string+}++/**+ * Generated factory for {@link CreateRegistrySecretRequest} record objects.+ */+export const CreateRegistrySecretRequest = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<CreateRegistrySecretRequest, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<CreateRegistrySecretRequest>,+ });+})();++const FfiConverterTypeCreateRegistrySecretRequest = (() => {+ type TypeName = CreateRegistrySecretRequest;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ namespace: FfiConverterString.read(from),+ name: FfiConverterString.read(from),+ registry: FfiConverterString.read(from),+ username: FfiConverterString.read(from),+ password: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.namespace, into);+ FfiConverterString.write(value.name, into);+ FfiConverterString.write(value.registry, into);+ FfiConverterString.write(value.username, into);+ FfiConverterString.write(value.password, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.namespace) ++ FfiConverterString.allocationSize(value.name) ++ FfiConverterString.allocationSize(value.registry) ++ FfiConverterString.allocationSize(value.username) ++ FfiConverterString.allocationSize(value.password);++ }+ };+ return new FFIConverter();+})();+export type Sandbox = {namespace: string,claim: string,@@ -1558,6 +1649,139 @@ const FfiConverterTypePoolDisplayStatus = (() => {return new FFIConverter();})();+/**+ * A created registry pull Secret. Carries no credential: Secrets are+ * write-only through the gateway.+ */+export type RegistrySecret = {+ namespace: string,+ name: string,+ registry: string+}++/**+ * Generated factory for {@link RegistrySecret} record objects.+ */+export const RegistrySecret = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<RegistrySecret, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<RegistrySecret>,+ });+})();++const FfiConverterTypeRegistrySecret = (() => {+ type TypeName = RegistrySecret;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ namespace: FfiConverterString.read(from),+ name: FfiConverterString.read(from),+ registry: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.namespace, into);+ FfiConverterString.write(value.name, into);+ FfiConverterString.write(value.registry, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.namespace) ++ FfiConverterString.allocationSize(value.name) ++ FfiConverterString.allocationSize(value.registry);++ }+ };+ return new FFIConverter();+})();++/**+ * A registry ref pinned by the gateway (`GET /api/images/resolve`).+ */+export type ResolvedImage = {+ /**+ * The ref as requested.+ */+ reference: string,+ /**+ * The ref actually resolved: for a canonical image and runtime+ * `kubevirt` this is the containerDisk sibling (`…:24.04-disk`).+ */+ resolvedRef: string,+ /**+ * `repo@sha256:…` of the manifest (or index) to run.+ */+ pinnedRef: string,+ digest: string,+ /**+ * `rootfs` (docker/gVisor), `containerdisk` (KubeVirt) or `unknown`.+ */+ variant: string,+ /**+ * The linux/amd64 child manifest digest when the ref is an index.+ */+ platformDigest?: string,+ mediaType: string+}++/**+ * Generated factory for {@link ResolvedImage} record objects.+ */+export const ResolvedImage = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<ResolvedImage, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<ResolvedImage>,+ });+})();++const FfiConverterTypeResolvedImage = (() => {+ type TypeName = ResolvedImage;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ reference: FfiConverterString.read(from),+ resolvedRef: FfiConverterString.read(from),+ pinnedRef: FfiConverterString.read(from),+ digest: FfiConverterString.read(from),+ variant: FfiConverterString.read(from),+ platformDigest: FfiConverterOptionalString.read(from),+ mediaType: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.reference, into);+ FfiConverterString.write(value.resolvedRef, into);+ FfiConverterString.write(value.pinnedRef, into);+ FfiConverterString.write(value.digest, into);+ FfiConverterString.write(value.variant, into);+ FfiConverterOptionalString.write(value.platformDigest, into);+ FfiConverterString.write(value.mediaType, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.reference) ++ FfiConverterString.allocationSize(value.resolvedRef) ++ FfiConverterString.allocationSize(value.pinnedRef) ++ FfiConverterString.allocationSize(value.digest) ++ FfiConverterString.allocationSize(value.variant) ++ FfiConverterOptionalString.allocationSize(value.platformDigest) ++ FfiConverterString.allocationSize(value.mediaType);++ }+ };+ return new FFIConverter();+})();+/*** Where a native client opens its own WebSocket to a sandbox service through* the gateway's `/api/svc` proxy. `url` is the `ws(s)://` endpoint;@@ -3311,6 +3535,201 @@ const uniffiTypeCreatePoolRequestBuilderObjectFactory: UniffiObjectFactory<Creat}})();const FfiConverterTypeCreatePoolRequestBuilder = new FfiConverterObject(uniffiTypeCreatePoolRequestBuilderObjectFactory);+export interface CreateRegistrySecretRequestBuilderLike {++ build() /*throws*/: CreateRegistrySecretRequest;+ name(value: string): CreateRegistrySecretRequestBuilderLike;+ namespace(value: string): CreateRegistrySecretRequestBuilderLike;+ password(value: string): CreateRegistrySecretRequestBuilderLike;+ registry(value: string): CreateRegistrySecretRequestBuilderLike;+ username(value: string): CreateRegistrySecretRequestBuilderLike;+}+/**+ * @deprecated Use `CreateRegistrySecretRequestBuilderLike` instead.+ */+export type CreateRegistrySecretRequestBuilderInterface = CreateRegistrySecretRequestBuilderLike;+++export class CreateRegistrySecretRequestBuilder extends UniffiAbstractObject implements CreateRegistrySecretRequestBuilderLike {++ readonly [uniffiTypeNameSymbol] = "CreateRegistrySecretRequestBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer =+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new(+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] = uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.bless(pointer);+ }+++++ build(): CreateRegistrySecretRequest /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeCreateRegistrySecretRequest.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSdkBuildError.lift.bind(FfiConverterTypeSdkBuildError),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build(+ uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.clonePointer(this),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }++ name(value: string): CreateRegistrySecretRequestBuilderLike {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name(+ uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }++ namespace(value: string): CreateRegistrySecretRequestBuilderLike {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace(+ uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }++ password(value: string): CreateRegistrySecretRequestBuilderLike {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password(+ uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }++ registry(value: string): CreateRegistrySecretRequestBuilderLike {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry(+ uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }++ username(value: string): CreateRegistrySecretRequestBuilderLike {+ return FfiConverterTypeCreateRegistrySecretRequestBuilder.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username(+ uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }+++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer = uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.pointer(this);+ uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.freePointer(pointer);+ uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is CreateRegistrySecretRequestBuilder {+ return uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.isConcreteType(obj_);+ }+++}++const uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory: UniffiObjectFactory<CreateRegistrySecretRequestBuilderLike> = (() => {++ /// <reference lib="es2021" />+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory.freePointer(heldValue);+ }) : null;++ return {+ create(pointer: UniffiHandle): CreateRegistrySecretRequestBuilderLike {+ const instance = Object.create(CreateRegistrySecretRequestBuilder.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "CreateRegistrySecretRequestBuilder";+ return instance;+ },+++ bless(p: UniffiHandle): UniffiGcObject {+ const ptr = {+ p, // make sure this object doesn't get optimized away.+ markDestroyed: () => undefined,+ };+ if (registry) {+ registry.register(ptr, p, ptr);+ }+ return ptr;+ },++ unbless(ptr_: UniffiGcObject) {+ if (registry) {+ registry.unregister(ptr_);+ }+ },++ pointer(obj_: CreateRegistrySecretRequestBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: CreateRegistrySecretRequestBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ isConcreteType(obj_: any): obj_ is CreateRegistrySecretRequestBuilderLike {+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "CreateRegistrySecretRequestBuilder";+ },+}})();+const FfiConverterTypeCreateRegistrySecretRequestBuilder = new FfiConverterObject(uniffiTypeCreateRegistrySecretRequestBuilderObjectFactory);+export interface CreateSignedServiceUrlRequestBuilderLike {build() /*throws*/: CreateSignedServiceUrlRequest;@@ -3841,6 +4260,12 @@ export interface CyclopsClientLike {createImage(namespace: string, manifest: PreservedJsonLike, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<PreservedJsonLike>;createNamespace(name: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Namespace>;createPool(request: CreatePoolRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Pool>;+/**+ * Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ * On a name conflict the old Secret is deleted and the new one created,+ * since the gateway admits no Secret update.+ */+ createRegistrySecret(request: CreateRegistrySecretRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<RegistrySecret>;createSignedServiceUrl(request: CreateSignedServiceUrlRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<SignedServiceUrl>;createTemplate(request: CreateTemplateRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Template>;createUserApiKey(request: CreateUserApiKeyRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<NewUserApiKey>;@@ -3853,6 +4278,7 @@ export interface CyclopsClientLike {deleteImage(namespace: string, name: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;deleteNamespace(name: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;deletePool(pool: Pool, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;+ deleteRegistrySecret(namespace: string, name: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;deleteTemplate(template: Template, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;deleteUserApiKey(id: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;getClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Claim>;@@ -3886,6 +4312,12 @@ export interface CyclopsClientLike {* can be mutated through the SDK.*/renewClaim(claim: Claim, shutdownTime: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Claim>;+/**+ * Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ * `kubevirt`, `macos`) selects the variant for canonical cua images:+ * `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+ */+ resolveImage(reference: string, runtime: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<ResolvedImage>;revokeSignedServiceUrl(signedServiceUrl: SignedServiceUrl, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;serviceRequest(sandbox: Sandbox, service: string, path: string, request: HttpRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<HttpResponse>;/**@@ -4178,6 +4610,35 @@ private constructor(pointer: UniffiHandle) {);}+/**+ * Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ * On a name conflict the old Secret is deleted and the new one created,+ * since the gateway admits no Secret update.+ */+ async createRegistrySecret(request: CreateRegistrySecretRequest, asyncOpts_?: { signal: AbortSignal }): Promise<RegistrySecret> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeCreateRegistrySecretRequest.lower(request, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeRegistrySecret.lift.bind(FfiConverterTypeRegistrySecret),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }+async createSignedServiceUrl(request: CreateSignedServiceUrlRequest, asyncOpts_?: { signal: AbortSignal }): Promise<SignedServiceUrl> /*throws*/ {return await uniffiRustCallAsync(/*rustCaller:*/ uniffiCaller,@@ -4331,6 +4792,25 @@ private constructor(pointer: UniffiHandle) {);}+ async deleteRegistrySecret(namespace: string, name: string, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterString.lower(namespace, nativeModule().rustbuffer_alloc),FfiConverterString.lower(name, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_void,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_void,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_void,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_void,+ /*liftFunc:*/ (_v) => {},+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }+async deleteTemplate(template: Template, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {return await uniffiRustCallAsync(/*rustCaller:*/ uniffiCaller,@@ -4791,6 +5271,35 @@ private constructor(pointer: UniffiHandle) {);}+/**+ * Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ * `kubevirt`, `macos`) selects the variant for canonical cua images:+ * `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+ */+ async resolveImage(reference: string, runtime: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<ResolvedImage> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterString.lower(reference, nativeModule().rustbuffer_alloc),FfiConverterOptionalString.lower(runtime, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeResolvedImage.lift.bind(FfiConverterTypeResolvedImage),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }+async revokeSignedServiceUrl(signedServiceUrl: SignedServiceUrl, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {return await uniffiRustCallAsync(/*rustCaller:*/ uniffiCaller,@@ -5930,6 +6439,9 @@ function uniffiEnsureInitialized() {if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_func_pool_display_status() !== 8587) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_func_pool_display_status");}+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix() !== 63379) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix");+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_func_removed_pool_display_status() !== 48761) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_func_removed_pool_display_status");}@@ -5975,6 +6487,27 @@ function uniffiEnsureInitialized() {if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_spec() !== 7566) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_spec");}+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new() !== 33724) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build() !== 37137) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name() !== 24925) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace() !== 5201) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password() !== 1991) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry() !== 58635) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username() !== 20465) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username");+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_constructor_createsignedserviceurlrequestbuilder_new() !== 16004) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_constructor_createsignedserviceurlrequestbuilder_new");}@@ -6059,6 +6592,9 @@ function uniffiEnsureInitialized() {if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() !== 48557) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool");}+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret() !== 5524) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret");+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url() !== 17810) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url");}@@ -6080,6 +6616,9 @@ function uniffiEnsureInitialized() {if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() !== 31235) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool");}+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret() !== 778) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret");+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template() !== 54852) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template");}@@ -6137,6 +6676,9 @@ function uniffiEnsureInitialized() {if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_renew_claim() !== 17505) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_renew_claim");}+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image() !== 1395) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image");+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url() !== 59989) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url");}@@ -6242,6 +6784,8 @@ export default Object.freeze({FfiConverterTypeCreateClaimRequestBuilder,FfiConverterTypeCreatePoolRequest,FfiConverterTypeCreatePoolRequestBuilder,+ FfiConverterTypeCreateRegistrySecretRequest,+ FfiConverterTypeCreateRegistrySecretRequestBuilder,FfiConverterTypeCreateSignedServiceUrlRequest,FfiConverterTypeCreateSignedServiceUrlRequestBuilder,FfiConverterTypeCreateTemplateRequest,@@ -6271,6 +6815,8 @@ export default Object.freeze({FfiConverterTypePoolDisplayStatus,FfiConverterTypePoolDisplayStatusKind,FfiConverterTypePresignedPut,+ FfiConverterTypeRegistrySecret,+ FfiConverterTypeResolvedImage,FfiConverterTypeResourceMetadata,FfiConverterTypeSandbox,FfiConverterTypeSdkBuildError,diff --git a/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema-ffi.ts b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema-ffi.tsindex 798ba32786..75520bc869 100644--- a/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema-ffi.ts+++ b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema-ffi.ts@@ -443,6 +443,11 @@ const DEFINITIONS = {ret: FfiType.Handle,hasRustCallStatus: true,},+ "uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },"uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build": {args: [FfiType.Handle],ret: FfiType.RustBuffer,@@ -468,6 +473,11 @@ const DEFINITIONS = {ret: FfiType.Handle,hasRustCallStatus: true,},+ "uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },"uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware": {args: [FfiType.Handle, FfiType.RustBuffer],ret: FfiType.Handle,@@ -508,6 +518,11 @@ const DEFINITIONS = {ret: FfiType.Handle,hasRustCallStatus: true,},+ "uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },"uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime": {args: [FfiType.Handle, FfiType.RustBuffer],ret: FfiType.Handle,@@ -668,6 +683,11 @@ const DEFINITIONS = {ret: FfiType.UInt16,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build": {args: [],ret: FfiType.UInt16,@@ -693,6 +713,11 @@ const DEFINITIONS = {ret: FfiType.UInt16,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware": {args: [],ret: FfiType.UInt16,@@ -733,6 +758,11 @@ const DEFINITIONS = {ret: FfiType.UInt16,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime": {args: [],ret: FfiType.UInt16,@@ -884,11 +914,13 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_schema_fn_method_sandboxtemplaterefbuilder_build(uniffiSelf: bigint, uniffi_out_err: UniffiRustCallStatus): Uint8Array;uniffi_cyclops_sdk_schema_fn_method_sandboxtemplaterefbuilder_name(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new(uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build(uniffiSelf: bigint, uniffi_out_err: UniffiRustCallStatus): Uint8Array;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_claim_secrets(uniffiSelf: bigint, value: number, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_command(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_container_disk_image(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores(uniffiSelf: bigint, value: number, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_image_pull_policy(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_image_pull_secret(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;@@ -897,6 +929,7 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_node_selector(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_oidc(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes(uniffiSelf: bigint, value: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime_class_name(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_services(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;@@ -929,11 +962,13 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_build(): number;uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name(): number;uniffi_cyclops_sdk_schema_checksum_constructor_vmtemplatebuilder_new(): number;+ uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_claim_secrets(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_command(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_container_disk_image(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores(): number;+ uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_policy(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_secret(): number;@@ -942,6 +977,7 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_node_selector(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_oidc(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes(): number;+ uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime_class_name(): number;uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_services(): number;diff --git a/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema.ts b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema.tsindex 965793dbf9..556d0ec0e3 100644--- a/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema.ts+++ b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema.ts@@ -733,6 +733,47 @@ const FfiConverterTypeOidcConfig = (() => {return new FFIConverter();})();+/**+ * How `vmTemplate.command`/`args`/`env` reach the sandbox+ * (`vmTemplate.processMode`). Absent means `Legacy`.+ */+export enum ProcessMode {+ /**+ * What templates did before processMode existed: pod runtimes run+ * command/args/env; KubeVirt ignores command and refuses args/env.+ */+ Legacy,+ /**+ * Every runtime runs command/args/env. Pod runtimes set them on the+ * sandbox container; KubeVirt renders them into the sandbox's cloud-init.+ */+ Run+}++const FfiConverterTypeProcessMode = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = ProcessMode;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return ProcessMode.Legacy;+ case 2: return ProcessMode.Run;+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value) {+ case ProcessMode.Legacy: return ordinalConverter.write(1, into);+ case ProcessMode.Run: return ordinalConverter.write(2, into);+ }+ }+ allocationSize(value: TypeName): number {+ return ordinalConverter.allocationSize(0);+ }+ }+ return new FFIConverter();+})();+export type VmTemplate = {containerDiskImage: string,command?: Array<string>,@@ -749,7 +790,10 @@ export type VmTemplate = {probes?: PreservedJsonLike,services?: Array<SandboxService>,oidc?: OidcConfig,- claimSecrets?: boolean+ claimSecrets?: boolean,+ args?: Array<string>,+ env?: Map<string, string>,+ processMode?: ProcessMode}/**@@ -757,7 +801,10 @@ export type VmTemplate = {*/export const VmTemplate = (() => {const defaults = () => ({- claimSecrets: undefined+ claimSecrets: undefined,+ args: undefined,+ env: undefined,+ processMode: undefined});const create = (() => {return uniffiCreateRecord<VmTemplate, ReturnType<typeof defaults>>(defaults);@@ -789,7 +836,10 @@ const FfiConverterTypeVmTemplate = (() => {probes: FfiConverterOptionalTypePreservedJson.read(from),services: FfiConverterOptionalSequenceTypeSandboxService.read(from),oidc: FfiConverterOptionalTypeOidcConfig.read(from),- claimSecrets: FfiConverterOptionalBoolean.read(from)+ claimSecrets: FfiConverterOptionalBoolean.read(from),+ args: FfiConverterOptionalSequenceString.read(from),+ env: FfiConverterOptionalMapStringString.read(from),+ processMode: FfiConverterOptionalTypeProcessMode.read(from)};}write(value: TypeName, into: RustBuffer): void {@@ -809,6 +859,9 @@ const FfiConverterTypeVmTemplate = (() => {FfiConverterOptionalSequenceTypeSandboxService.write(value.services, into);FfiConverterOptionalTypeOidcConfig.write(value.oidc, into);FfiConverterOptionalBoolean.write(value.claimSecrets, into);+ FfiConverterOptionalSequenceString.write(value.args, into);+ FfiConverterOptionalMapStringString.write(value.env, into);+ FfiConverterOptionalTypeProcessMode.write(value.processMode, into);}allocationSize(value: TypeName): number {return FfiConverterString.allocationSize(value.containerDiskImage) +@@ -826,7 +879,10 @@ const FfiConverterTypeVmTemplate = (() => {FfiConverterOptionalTypePreservedJson.allocationSize(value.probes) +FfiConverterOptionalSequenceTypeSandboxService.allocationSize(value.services) +FfiConverterOptionalTypeOidcConfig.allocationSize(value.oidc) +- FfiConverterOptionalBoolean.allocationSize(value.claimSecrets);+ FfiConverterOptionalBoolean.allocationSize(value.claimSecrets) ++ FfiConverterOptionalSequenceString.allocationSize(value.args) ++ FfiConverterOptionalMapStringString.allocationSize(value.env) ++ FfiConverterOptionalTypeProcessMode.allocationSize(value.processMode);}};@@ -1449,6 +1505,9 @@ const FfiConverterOptionalSequenceTypeSandboxService = new FfiConverterOptional(// FfiConverter for OidcConfig | undefinedconst FfiConverterOptionalTypeOidcConfig = new FfiConverterOptional(FfiConverterTypeOidcConfig);+// FfiConverter for ProcessMode | undefined+const FfiConverterOptionalTypeProcessMode = new FfiConverterOptional(FfiConverterTypeProcessMode);+// FfiConverter for WarmPoolAutoscaling | undefinedconst FfiConverterOptionalTypeWarmPoolAutoscaling = new FfiConverterOptional(FfiConverterTypeWarmPoolAutoscaling);@@ -1502,6 +1561,7 @@ export default Object.freeze({FfiConverterTypeOSGymSandboxWarmPoolStatus,FfiConverterTypeOidcConfig,FfiConverterTypePreservedJson,+ FfiConverterTypeProcessMode,FfiConverterTypeRuntimeKind,FfiConverterTypeSandboxService,FfiConverterTypeSandboxTemplateRef,diff --git a/libs/fleet/sdk-bindings/ts-uniffi/fleet_sdk-ffi.ts b/libs/fleet/sdk-bindings/ts-uniffi/fleet_sdk-ffi.tsindex b40a3d64a4..4d1a130025 100644--- a/libs/fleet/sdk-bindings/ts-uniffi/fleet_sdk-ffi.ts+++ b/libs/fleet/sdk-bindings/ts-uniffi/fleet_sdk-ffi.ts@@ -293,6 +293,16 @@ const DEFINITIONS = {ret: FfiType.Void,hasRustCallStatus: true,},+ "uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder": {+ args: [FfiType.Handle],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: true,+ },"uniffi_cyclops_sdk_fn_clone_createsignedserviceurlrequestbuilder": {args: [FfiType.Handle],ret: FfiType.Handle,@@ -413,6 +423,11 @@ const DEFINITIONS = {ret: FfiType.RustBuffer,hasRustCallStatus: true,},+ "uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix": {+ args: [],+ ret: FfiType.RustBuffer,+ hasRustCallStatus: true,+ },"uniffi_cyclops_sdk_fn_func_removed_pool_display_status": {args: [],ret: FfiType.RustBuffer,@@ -488,6 +503,41 @@ const DEFINITIONS = {ret: FfiType.Handle,hasRustCallStatus: true,},+ "uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new": {+ args: [],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build": {+ args: [FfiType.Handle],+ ret: FfiType.RustBuffer,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },"uniffi_cyclops_sdk_fn_constructor_createsignedserviceurlrequestbuilder_new": {args: [],ret: FfiType.Handle,@@ -628,6 +678,11 @@ const DEFINITIONS = {ret: FfiType.Handle,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_fn_method_cyclopsclient_create_signed_service_url": {args: [FfiType.Handle, FfiType.RustBuffer],ret: FfiType.Handle,@@ -663,6 +718,11 @@ const DEFINITIONS = {ret: FfiType.Handle,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret": {+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_template": {args: [FfiType.Handle, FfiType.RustBuffer],ret: FfiType.Handle,@@ -758,6 +818,11 @@ const DEFINITIONS = {ret: FfiType.Handle,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image": {+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_fn_method_cyclopsclient_revoke_signed_service_url": {args: [FfiType.Handle, FfiType.RustBuffer],ret: FfiType.Handle,@@ -933,6 +998,11 @@ const DEFINITIONS = {ret: FfiType.UInt16,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_checksum_func_removed_pool_display_status": {args: [],ret: FfiType.UInt16,@@ -1008,6 +1078,41 @@ const DEFINITIONS = {ret: FfiType.UInt16,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_checksum_constructor_createsignedserviceurlrequestbuilder_new": {args: [],ret: FfiType.UInt16,@@ -1148,6 +1253,11 @@ const DEFINITIONS = {ret: FfiType.UInt16,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url": {args: [],ret: FfiType.UInt16,@@ -1183,6 +1293,11 @@ const DEFINITIONS = {ret: FfiType.UInt16,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template": {args: [],ret: FfiType.UInt16,@@ -1278,6 +1393,11 @@ const DEFINITIONS = {ret: FfiType.UInt16,hasRustCallStatus: false,},+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },"uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url": {args: [],ret: FfiType.UInt16,@@ -1555,6 +1675,8 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_fn_free_createclaimrequestbuilder(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): void;uniffi_cyclops_sdk_fn_clone_createpoolrequestbuilder(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_fn_free_createpoolrequestbuilder(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): void;+ uniffi_cyclops_sdk_fn_clone_createregistrysecretrequestbuilder(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_free_createregistrysecretrequestbuilder(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): void;uniffi_cyclops_sdk_fn_clone_createsignedserviceurlrequestbuilder(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_fn_free_createsignedserviceurlrequestbuilder(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): void;uniffi_cyclops_sdk_fn_clone_createtemplaterequestbuilder(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;@@ -1579,6 +1701,7 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_fn_func_fleet_label_key(uniffi_out_err: UniffiRustCallStatus): Uint8Array;uniffi_cyclops_sdk_fn_func_healthy_pool_display_status(uniffi_out_err: UniffiRustCallStatus): Uint8Array;uniffi_cyclops_sdk_fn_func_pool_display_status(pool: Uint8Array, uniffi_out_err: UniffiRustCallStatus): Uint8Array;+ uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(uniffi_out_err: UniffiRustCallStatus): Uint8Array;uniffi_cyclops_sdk_fn_func_removed_pool_display_status(uniffi_out_err: UniffiRustCallStatus): Uint8Array;uniffi_cyclops_sdk_fn_func_terminating_pool_display_status(uniffi_out_err: UniffiRustCallStatus): Uint8Array;uniffi_cyclops_sdk_fn_func_unknown_pool_display_status(uniffi_out_err: UniffiRustCallStatus): Uint8Array;@@ -1594,6 +1717,13 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_build(uniffiSelf: bigint, uniffi_out_err: UniffiRustCallStatus): Uint8Array;uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_namespace(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_spec(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_constructor_createregistrysecretrequestbuilder_new(uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_build(uniffiSelf: bigint, uniffi_out_err: UniffiRustCallStatus): Uint8Array;+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_name(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_namespace(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_password(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_registry(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_method_createregistrysecretrequestbuilder_username(uniffiSelf: bigint, value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_fn_constructor_createsignedserviceurlrequestbuilder_new(uniffi_out_err: UniffiRustCallStatus): bigint;uniffi_cyclops_sdk_fn_method_createsignedserviceurlrequestbuilder_build(uniffiSelf: bigint, uniffi_out_err: UniffiRustCallStatus): Uint8Array;uniffi_cyclops_sdk_fn_method_createsignedserviceurlrequestbuilder_expires_in_seconds(uniffiSelf: bigint, value: number, uniffi_out_err: UniffiRustCallStatus): bigint;@@ -1622,6 +1752,7 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_fn_method_cyclopsclient_create_image(uniffiSelf: bigint, namespace: Uint8Array, manifest: bigint): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_create_namespace(uniffiSelf: bigint, name: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(uniffiSelf: bigint, request: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(uniffiSelf: bigint, request: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_create_signed_service_url(uniffiSelf: bigint, request: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_create_template(uniffiSelf: bigint, request: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_create_user_api_key(uniffiSelf: bigint, request: Uint8Array): bigint;@@ -1629,6 +1760,7 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_image(uniffiSelf: bigint, namespace: Uint8Array, name: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_namespace(uniffiSelf: bigint, name: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(uniffiSelf: bigint, pool: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(uniffiSelf: bigint, namespace: Uint8Array, name: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_template(uniffiSelf: bigint, template: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_user_api_key(uniffiSelf: bigint, id: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(uniffiSelf: bigint, claim: Uint8Array): bigint;@@ -1648,6 +1780,7 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_fn_method_cyclopsclient_reconcile_pool(uniffiSelf: bigint, request: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_reconcile_template(uniffiSelf: bigint, request: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_renew_claim(uniffiSelf: bigint, claim: Uint8Array, shutdownTime: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(uniffiSelf: bigint, reference: Uint8Array, runtime: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_revoke_signed_service_url(uniffiSelf: bigint, signedServiceUrl: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(uniffiSelf: bigint, sandbox: Uint8Array, service: Uint8Array, path: Uint8Array, request: Uint8Array): bigint;uniffi_cyclops_sdk_fn_method_cyclopsclient_service_websocket_url(uniffiSelf: bigint, sandbox: Uint8Array, service: Uint8Array, path: Uint8Array): bigint;@@ -1683,6 +1816,7 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_checksum_func_fleet_label_key(): number;uniffi_cyclops_sdk_checksum_func_healthy_pool_display_status(): number;uniffi_cyclops_sdk_checksum_func_pool_display_status(): number;+ uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix(): number;uniffi_cyclops_sdk_checksum_func_removed_pool_display_status(): number;uniffi_cyclops_sdk_checksum_func_terminating_pool_display_status(): number;uniffi_cyclops_sdk_checksum_func_unknown_pool_display_status(): number;@@ -1698,6 +1832,13 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_build(): number;uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_namespace(): number;uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_spec(): number;+ uniffi_cyclops_sdk_checksum_constructor_createregistrysecretrequestbuilder_new(): number;+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_build(): number;+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_name(): number;+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_namespace(): number;+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_password(): number;+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_registry(): number;+ uniffi_cyclops_sdk_checksum_method_createregistrysecretrequestbuilder_username(): number;uniffi_cyclops_sdk_checksum_constructor_createsignedserviceurlrequestbuilder_new(): number;uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_build(): number;uniffi_cyclops_sdk_checksum_method_createsignedserviceurlrequestbuilder_expires_in_seconds(): number;@@ -1726,6 +1867,7 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_image(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_namespace(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_template(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_user_api_key(): number;@@ -1733,6 +1875,7 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_image(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_namespace(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_user_api_key(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim(): number;@@ -1752,6 +1895,7 @@ interface NativeModuleInterface {uniffi_cyclops_sdk_checksum_method_cyclopsclient_reconcile_pool(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_reconcile_template(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_renew_claim(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request(): number;uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_websocket_url(): number;diff --git a/libs/fleet/sdk-bindings/ts-uniffi/fleet_sdk.ts b/libs/fleet/sdk-bindings/ts-uniffi/fleet_sdk.tsindex f188cb9344..a2f23914c7 100644--- a/libs/fleet/sdk-bindings/ts-uniffi/fleet_sdk.ts+++ b/libs/fleet/sdk-bindings/ts-uniffi/fleet_sdk.ts@@ -96,6 +96,25 @@ export function poolDisplayStatus(pool: Pool): PoolDisplayStatus {));}+/**+ * The name prefix every tenant registry pull Secret must carry.+ */+export function registrySecretNamePrefix(): string {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterString.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().uniffi_cyclops_sdk_fn_func_registry_secret_name_prefix(+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }+export function removedPoolDisplayStatus(): PoolDisplayStatus {return ((__rb: Uint8Array) => {try {@@ -455,6 +474,78 @@ const FfiConverterTypeCreatePoolRequest = (() => {return new FFIConverter();})();+/**+ * Credentials for one registry, stored as a `cua-registry-*` pull Secret.+ */+export type CreateRegistrySecretRequest = {+ /**+ * Pool namespace the Secret is created in. It must already exist (the+ * pool's namespace, created by `create_pool`, or by `create_namespace`).+ */+ namespace: string,+ /**+ * Full Secret name, `cua-registry-<dns-label>`.+ */+ name: string,+ /**+ * Registry host the credentials are for, as image refs spell it, e.g.+ * `ghcr.io`, `registry.example.com:5000` or `docker.io`.+ */+ registry: string,+ username: string,+ /**+ * Password or access token. Never serialized by `Debug`.+ */+ password: string+}++/**+ * Generated factory for {@link CreateRegistrySecretRequest} record objects.+ */+export const CreateRegistrySecretRequest = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<CreateRegistrySecretRequest, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<CreateRegistrySecretRequest>,+ });+})();++const FfiConverterTypeCreateRegistrySecretRequest = (() => {+ type TypeName = CreateRegistrySecretRequest;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ namespace: FfiConverterString.read(from),+ name: FfiConverterString.read(from),+ registry: FfiConverterString.read(from),+ username: FfiConverterString.read(from),+ password: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.namespace, into);+ FfiConverterString.write(value.name, into);+ FfiConverterString.write(value.registry, into);+ FfiConverterString.write(value.username, into);+ FfiConverterString.write(value.password, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.namespace) ++ FfiConverterString.allocationSize(value.name) ++ FfiConverterString.allocationSize(value.registry) ++ FfiConverterString.allocationSize(value.username) ++ FfiConverterString.allocationSize(value.password);++ }+ };+ return new FFIConverter();+})();+export type Sandbox = {namespace: string,claim: string,@@ -1549,6 +1640,139 @@ const FfiConverterTypePoolDisplayStatus = (() => {return new FFIConverter();})();+/**+ * A created registry pull Secret. Carries no credential: Secrets are+ * write-only through the gateway.+ */+export type RegistrySecret = {+ namespace: string,+ name: string,+ registry: string+}++/**+ * Generated factory for {@link RegistrySecret} record objects.+ */+export const RegistrySecret = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<RegistrySecret, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<RegistrySecret>,+ });+})();++const FfiConverterTypeRegistrySecret = (() => {+ type TypeName = RegistrySecret;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ namespace: FfiConverterString.read(from),+ name: FfiConverterString.read(from),+ registry: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.namespace, into);+ FfiConverterString.write(value.name, into);+ FfiConverterString.write(value.registry, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.namespace) ++ FfiConverterString.allocationSize(value.name) ++ FfiConverterString.allocationSize(value.registry);++ }+ };+ return new FFIConverter();+})();++/**+ * A registry ref pinned by the gateway (`GET /api/images/resolve`).+ */+export type ResolvedImage = {+ /**+ * The ref as requested.+ */+ reference: string,+ /**+ * The ref actually resolved: for a canonical image and runtime+ * `kubevirt` this is the containerDisk sibling (`…:24.04-disk`).+ */+ resolvedRef: string,+ /**+ * `repo@sha256:…` of the manifest (or index) to run.+ */+ pinnedRef: string,+ digest: string,+ /**+ * `rootfs` (docker/gVisor), `containerdisk` (KubeVirt) or `unknown`.+ */+ variant: string,+ /**+ * The linux/amd64 child manifest digest when the ref is an index.+ */+ platformDigest?: string,+ mediaType: string+}++/**+ * Generated factory for {@link ResolvedImage} record objects.+ */+export const ResolvedImage = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<ResolvedImage, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<ResolvedImage>,+ });+})();++const FfiConverterTypeResolvedImage = (() => {+ type TypeName = ResolvedImage;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ reference: FfiConverterString.read(from),+ resolvedRef: FfiConverterString.read(from),+ pinnedRef: FfiConverterString.read(from),+ digest: FfiConverterString.read(from),+ variant: FfiConverterString.read(from),+ platformDigest: FfiConverterOptionalString.read(from),+ mediaType: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.reference, into);+ FfiConverterString.write(value.resolvedRef, into);+ FfiConverterString.write(value.pinnedRef, into);+ FfiConverterString.write(value.digest, into);+ FfiConverterString.write(value.variant, into);+ FfiConverterOptionalString.write(value.platformDigest, into);+ FfiConverterString.write(value.mediaType, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.reference) ++ FfiConverterString.allocationSize(value.resolvedRef) ++ FfiConverterString.allocationSize(value.pinnedRef) ++ FfiConverterString.allocationSize(value.digest) ++ FfiConverterString.allocationSize(value.variant) ++ FfiConverterOptionalString.allocationSize(value.platformDigest) ++ FfiConverterString.allocationSize(value.mediaType);++ }+ };+ return new FFIConverter();+})();+/*** Where a native client opens its own WebSocket to a sandbox service through* the gateway's `/api/svc` proxy. `url` is the `ws(s)://` endpoint;@@ -2982,6 +3206,12 @@ export interface CyclopsClientLike {createImage(namespace: string, manifest: PreservedJsonLike, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<PreservedJsonLike>;createNamespace(name: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Namespace>;createPool(request: CreatePoolRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Pool>;+/**+ * Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ * On a name conflict the old Secret is deleted and the new one created,+ * since the gateway admits no Secret update.+ */+ createRegistrySecret(request: CreateRegistrySecretRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<RegistrySecret>;createSignedServiceUrl(request: CreateSignedServiceUrlRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<SignedServiceUrl>;createTemplate(request: CreateTemplateRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Template>;createUserApiKey(request: CreateUserApiKeyRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<NewUserApiKey>;@@ -2994,6 +3224,7 @@ export interface CyclopsClientLike {deleteImage(namespace: string, name: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;deleteNamespace(name: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;deletePool(pool: Pool, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;+ deleteRegistrySecret(namespace: string, name: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;deleteTemplate(template: Template, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;deleteUserApiKey(id: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;getClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Claim>;@@ -3027,6 +3258,12 @@ export interface CyclopsClientLike {* can be mutated through the SDK.*/renewClaim(claim: Claim, shutdownTime: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Claim>;+/**+ * Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ * `kubevirt`, `macos`) selects the variant for canonical cua images:+ * `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+ */+ resolveImage(reference: string, runtime: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<ResolvedImage>;revokeSignedServiceUrl(signedServiceUrl: SignedServiceUrl, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;serviceRequest(sandbox: Sandbox, service: string, path: string, request: HttpRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<HttpResponse>;/**@@ -3367,6 +3604,43 @@ private constructor(pointer: UniffiHandle) {}}+/**+ * Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ * On a name conflict the old Secret is deleted and the new one created,+ * since the gateway admits no Secret update.+ */+ async createRegistrySecret(request: CreateRegistrySecretRequest, asyncOpts_?: { signal: AbortSignal }): Promise<RegistrySecret> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_create_registry_secret(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeCreateRegistrySecretRequest.lower(request, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeRegistrySecret.lift.bind(FfiConverterTypeRegistrySecret),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }+async createSignedServiceUrl(request: CreateSignedServiceUrlRequest, asyncOpts_?: { signal: AbortSignal }): Promise<SignedServiceUrl> /*throws*/ {const __stack = uniffiIsDebug ? new Error().stack : undefined;try {@@ -3576,6 +3850,33 @@ private constructor(pointer: UniffiHandle) {}}+ async deleteRegistrySecret(namespace: string, name: string, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_registry_secret(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterString.lower(namespace, nativeModule().rustbuffer_alloc),FfiConverterString.lower(name, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_void,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_void,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_void,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_void,+ /*liftFunc:*/ (_v) => {},+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }+async deleteTemplate(template: Template, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {const __stack = uniffiIsDebug ? new Error().stack : undefined;try {@@ -4188,6 +4489,43 @@ private constructor(pointer: UniffiHandle) {}}+/**+ * Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ * `kubevirt`, `macos`) selects the variant for canonical cua images:+ * `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+ */+ async resolveImage(reference: string, runtime: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<ResolvedImage> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_resolve_image(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterString.lower(reference, nativeModule().rustbuffer_alloc),FfiConverterOptionalString.lower(runtime, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeResolvedImage.lift.bind(FfiConverterTypeResolvedImage),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }+async revokeSignedServiceUrl(signedServiceUrl: SignedServiceUrl, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {const __stack = uniffiIsDebug ? new Error().stack : undefined;try {@@ -4805,6 +5143,9 @@ function uniffiEnsureInitialized() {if (nativeModule().uniffi_cyclops_sdk_checksum_func_pool_display_status() !== 8587) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_func_pool_display_status");}+ if (nativeModule().uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix() !== 63379) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_func_registry_secret_name_prefix");+ }if (nativeModule().uniffi_cyclops_sdk_checksum_func_removed_pool_display_status() !== 48761) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_func_removed_pool_display_status");}@@ -4856,6 +5197,9 @@ function uniffiEnsureInitialized() {if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() !== 48557) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool");}+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret() !== 5524) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_registry_secret");+ }if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url() !== 17810) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_signed_service_url");}@@ -4877,6 +5221,9 @@ function uniffiEnsureInitialized() {if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() !== 31235) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool");}+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret() !== 778) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_registry_secret");+ }if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template() !== 54852) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_template");}@@ -4934,6 +5281,9 @@ function uniffiEnsureInitialized() {if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_renew_claim() !== 17505) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_renew_claim");}+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image() !== 1395) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_resolve_image");+ }if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url() !== 59989) {throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_revoke_signed_service_url");}@@ -4974,6 +5324,7 @@ export default Object.freeze({FfiConverterTypeClaim,FfiConverterTypeCreateClaimRequest,FfiConverterTypeCreatePoolRequest,+ FfiConverterTypeCreateRegistrySecretRequest,FfiConverterTypeCreateSignedServiceUrlRequest,FfiConverterTypeCreateTemplateRequest,FfiConverterTypeCreateUserApiKeyRequest,@@ -4998,6 +5349,8 @@ export default Object.freeze({FfiConverterTypePoolDisplayStatus,FfiConverterTypePoolDisplayStatusKind,FfiConverterTypePresignedPut,+ FfiConverterTypeRegistrySecret,+ FfiConverterTypeResolvedImage,FfiConverterTypeResourceMetadata,FfiConverterTypeSandbox,FfiConverterTypeSdkBuildError,diff --git a/libs/fleet/sdk-schema/src/common.rs b/libs/fleet/sdk-schema/src/common.rsindex 0cec209a18..3cd4a24dcf 100644--- a/libs/fleet/sdk-schema/src/common.rs+++ b/libs/fleet/sdk-schema/src/common.rs@@ -31,6 +31,10 @@ fn image_pull_policy_schema(generator: &mut schemars::SchemaGenerator) -> schemaImagePullPolicy::json_schema(generator)}+fn process_mode_schema(generator: &mut schemars::SchemaGenerator) -> schemars::Schema {+ ProcessMode::json_schema(generator)+}+fn service_protocol_schema(generator: &mut schemars::SchemaGenerator) -> schemars::Schema {ServiceProtocol::json_schema(generator)}@@ -55,6 +59,20 @@ pub(crate) fn oidc_schema(generator: &mut schemars::SchemaGenerator) -> schemarsOidcConfig::json_schema(generator)}+pub(crate) fn env_schema(generator: &mut schemars::SchemaGenerator) -> schemars::Schema {+ HashMap::<String, String>::json_schema(generator)+}++/// Name prefix of a tenant-owned registry pull Secret. The /api/k8s gateway+/// lets a tenant create (and delete) only `kubernetes.io/dockerconfigjson`+/// Secrets with this prefix, and admits `vmTemplate.imagePullSecret` naming one+/// for any registry. The shared `ecr-credentials` Secret keeps its ECR+/// repository allowlist.+pub const REGISTRY_SECRET_NAME_PREFIX: &str = "cua-registry-";++/// The shared, operator-provisioned ECR pull Secret in every pool namespace.+pub const SHARED_ECR_PULL_SECRET: &str = "ecr-credentials";+pub(crate) fn default_runtime() -> Option<RuntimeKind> {Some(RuntimeKind::Kubevirt)}@@ -109,6 +127,18 @@ pub enum ImagePullPolicy {Never,}+/// How `vmTemplate.command`/`args`/`env` reach the sandbox+/// (`vmTemplate.processMode`). Absent means `Legacy`.+#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema, uniffi::Enum)]+pub enum ProcessMode {+ /// What templates did before processMode existed: pod runtimes run+ /// command/args/env; KubeVirt ignores command and refuses args/env.+ Legacy,+ /// Every runtime runs command/args/env. Pod runtimes set them on the+ /// sandbox container; KubeVirt renders them into the sandbox's cloud-init.+ Run,+}+#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema, uniffi::Enum)]pub enum ServiceProtocol {TCP,@@ -194,7 +224,7 @@ pub struct VmTemplate {)]pub container_disk_image: String,#[schemars(- description = "Pod runtimes (macos/gvisor) only. Entrypoint command for the sandbox container (overrides the image default)."+ description = "Entrypoint command (Kubernetes command semantics: replaces the image ENTRYPOINT). Pod runtimes (gvisor/macos) run it on the sandbox container. KubeVirt runs it only with processMode: Run (as /etc/cua/command.sh under cua-command.service, through the sandbox's cloud-init); without it KubeVirt ignores command, as it always has.")]#[schemars(schema_with = "string_list_schema")]#[serde(skip_serializing_if = "Option::is_none")]@@ -235,7 +265,10 @@ pub struct VmTemplate {#[serde(skip_serializing_if = "Option::is_none")]#[schemars(default)]pub image_pull_policy: Option<ImagePullPolicy>,- #[schemars(schema_with = "string_schema")]+ #[schemars(+ description = "Pull Secret for containerDiskImage, in the pool namespace. Either the shared ecr-credentials Secret (only for the allowlisted ECR repositories) or a tenant-created kubernetes.io/dockerconfigjson Secret named cua-registry-<name> (any registry). Public images need none.",+ schema_with = "string_schema"+ )]#[serde(skip_serializing_if = "Option::is_none")]#[schemars(default)]pub image_pull_secret: Option<String>,@@ -281,13 +314,37 @@ pub struct VmTemplate {#[schemars(default)]pub oidc: Option<OidcConfig>,#[schemars(- description = "Opt in to claim-scoped secret delivery (OSGymSandboxClaim spec.secretRef). The pool-operator gives every sandbox an operator-owned Secret, empty while the sandbox is warm, fills it when a claim binds and wipes it on release, so a warm sandbox receives its claimant's secrets without a restart. Pod runtimes mount it read-only as a directory (never subPath) at /run/cua, root-owned, mode 0600; the image keeps its default root user, and its root token-sync helper hands the token to a non-root driver. KubeVirt shares it over virtiofs as tag cua-claim-secrets (needs the KubeVirt EnableVirtioFsConfigVolumes feature gate); the guest image mounts that tag read-only at /run/cua. cua-env-driver images enable their await-token mode only when /run/cua is a mount point, so the key env-token becomes /run/cua/env-token. Claims with a secretRef fail on templates without this flag.",+ description = "Opt in to claim-scoped secret delivery (OSGymSandboxClaim spec.secretRef). The pool-operator gives every sandbox an operator-owned Secret, empty while the sandbox is warm, fills it when a claim binds and wipes it on release, so a warm sandbox receives its claimant's secrets without a restart. Pod runtimes mount it read-only as a directory (never subPath) at /run/cua, root-owned, mode 0600; the image keeps its default root user, and its root token-sync helper hands the token to a non-root driver. KubeVirt shares it over virtiofs as tag cua-claim-secrets (the EnableVirtioFsConfigVolumes feature gate is GA from KubeVirt v1.8; older KubeVirt needs it enabled); the guest image mounts that tag read-only at /run/cua. cua-env-driver images enable their await-token mode only when /run/cua is a mount point, so the key env-token becomes /run/cua/env-token. Claims with a secretRef fail on templates without this flag.",schema_with = "bool_schema")]#[serde(skip_serializing_if = "Option::is_none")]#[schemars(default)]#[uniffi(default = None)]pub claim_secrets: Option<bool>,+ #[schemars(+ description = "Arguments (Kubernetes args semantics: they replace the image CMD and follow vmTemplate.command). Runs on pod runtimes (gvisor/macos). On runtime kubevirt it needs processMode: Run and a command (a VM image has no entrypoint to pass them to); without Run the gateway and the pool-operator refuse it."+ )]+ #[schemars(schema_with = "string_list_schema")]+ #[serde(skip_serializing_if = "Option::is_none")]+ #[schemars(default)]+ #[uniffi(default = None)]+ pub args: Option<Vec<String>>,+ #[schemars(+ description = "Plain environment variables for the sandbox's command (not for secrets: the values are stored in the template and visible to anyone who can read it). Names must match ^[A-Za-z_][A-Za-z0-9_]*$. $(NAME) references in command/args expand as in Kubernetes. Pod runtimes (gvisor/macos) set them on the sandbox container. On runtime kubevirt they need processMode: Run and go to /etc/cua/env (root, 0600) and the command's environment; values must be single-line there. Without Run the gateway and the pool-operator refuse env on kubevirt."+ )]+ #[schemars(schema_with = "env_schema")]+ #[serde(skip_serializing_if = "Option::is_none")]+ #[schemars(default)]+ #[uniffi(default = None)]+ pub env: Option<HashMap<String, String>>,+ #[schemars(+ description = "How command, args and env reach the sandbox. Absent or Legacy: unchanged behavior (pod runtimes run them; KubeVirt ignores command and refuses args and env). Run: every runtime runs them with the same semantics. Pod runtimes set them on the sandbox container; KubeVirt writes /etc/cua/env (0600), /etc/cua/command.sh (0700) and cua-command.service into the sandbox's cloud-init Secret, which the guest re-reads on every boot, so warm VMs get it on return-to-pool too. KubeVirt Run needs a Linux guest with cloud-init and systemd.",+ schema_with = "process_mode_schema"+ )]+ #[serde(skip_serializing_if = "Option::is_none")]+ #[schemars(default)]+ #[uniffi(default = None)]+ pub process_mode: Option<ProcessMode>,}pub(crate) fn date_time_schema(_: &mut schemars::SchemaGenerator) -> schemars::Schema {diff --git a/libs/fleet/sdk-schema/src/lib.rs b/libs/fleet/sdk-schema/src/lib.rsindex d3d2baa80b..59b187428f 100644--- a/libs/fleet/sdk-schema/src/lib.rs+++ b/libs/fleet/sdk-schema/src/lib.rs@@ -11,8 +11,9 @@ pub use claim::{OSGymSandboxClaimSandbox, OSGymSandboxClaimStatus,};pub use common::{- Firmware, ImagePullPolicy, OidcConfig, RuntimeKind, SandboxService, SandboxServiceBuilder,- ServiceProtocol, VmTemplate, VmTemplateBuilder,+ Firmware, ImagePullPolicy, OidcConfig, ProcessMode, REGISTRY_SECRET_NAME_PREFIX, RuntimeKind,+ SHARED_ECR_PULL_SECRET, SandboxService, SandboxServiceBuilder, ServiceProtocol, VmTemplate,+ VmTemplateBuilder,};pub use common::{SandboxTemplateRef, SandboxTemplateRefBuilder};pub use json::{JsonValueError, PreservedJson};diff --git a/libs/fleet/sdk-schema/tests/ffi_models.rs b/libs/fleet/sdk-schema/tests/ffi_models.rsindex bfee5f569d..2291e8a883 100644--- a/libs/fleet/sdk-schema/tests/ffi_models.rs+++ b/libs/fleet/sdk-schema/tests/ffi_models.rs@@ -1,8 +1,8 @@use cyclops_sdk_schema::{Firmware, ImagePullPolicy, JsonValueError, OSGymSandboxClaimCondition,OSGymSandboxClaimSandbox, OSGymSandboxClaimStatus, OSGymSandboxStatus,- OSGymSandboxWarmPoolStatus, OidcConfig, PreservedJson, RuntimeKind, SandboxService,- ServiceProtocol, VmTemplate,+ OSGymSandboxWarmPoolStatus, OidcConfig, PreservedJson, ProcessMode, RuntimeKind,+ SandboxService, ServiceProtocol, VmTemplate,};use schemars::schema_for;use serde_json::json;@@ -104,7 +104,10 @@ fn vm_template_round_trips_every_known_field() {aws_role_arn: Some("arn:aws:iam::123456789012:role/workload".into()),refresh_interval_seconds: Some(900),}),+ args: Some(vec!["--port".into(), "8765".into()]),+ env: Some(HashMap::from([("FOO".into(), "bar".into())])),claim_secrets: Some(true),+ process_mode: Some(ProcessMode::Run),};let value = serde_json::to_value(&template).unwrap();@@ -114,6 +117,9 @@ fn vm_template_round_trips_every_known_field() {value["probes"]["readinessProbe"]["tcpSocket"]["port"],json!(22));+ assert_eq!(value["args"], json!(["--port", "8765"]));+ assert_eq!(value["env"], json!({"FOO": "bar"}));+ assert_eq!(value["processMode"], json!("Run"));assert_eq!(serde_json::from_value::<VmTemplate>(value).unwrap(),template@@ -149,7 +155,10 @@ fn minimal_vm_template_omits_none_fields_and_round_trips() {probes: None,services: None,oidc: None,+ args: None,+ env: None,claim_secrets: None,+ process_mode: None,};let value = serde_json::to_value(&template).unwrap();diff --git a/libs/fleet/sdk-schema/tests/uniffi_builder.rs b/libs/fleet/sdk-schema/tests/uniffi_builder.rsindex 1642a7c42c..af99454dbe 100644--- a/libs/fleet/sdk-schema/tests/uniffi_builder.rs+++ b/libs/fleet/sdk-schema/tests/uniffi_builder.rs@@ -1,7 +1,7 @@use cyclops_sdk_schema::{OSGymSandboxTemplateSpec, OSGymSandboxTemplateSpecBuilder, OSGymSandboxWarmPoolSpec,- OSGymSandboxWarmPoolSpecBuilder, SandboxService, SandboxServiceBuilder, SandboxTemplateRef,- SandboxTemplateRefBuilder, SchemaBuildError, VmTemplate, VmTemplateBuilder,+ OSGymSandboxWarmPoolSpecBuilder, ProcessMode, SandboxService, SandboxServiceBuilder,+ SandboxTemplateRef, SandboxTemplateRefBuilder, SchemaBuildError, VmTemplate, VmTemplateBuilder,WarmPoolAutoscaling, WarmPoolAutoscalingBuilder,};@@ -104,3 +104,25 @@ fn autoscaling_builder_supports_empty_and_immutable_optional_values() {});}++#[test]+fn vm_template_builder_sets_env_command_args_and_process_mode() {+ let vm: VmTemplate = VmTemplateBuilder::new()+ .container_disk_image("python:3.12-slim".into())+ .command(vec!["python".into(), "-m".into(), "server".into()])+ .args(vec!["--port".into(), "8765".into()])+ .env(std::collections::HashMap::from([(+ "FOO".into(),+ "bar".into(),+ )]))+ .process_mode(ProcessMode::Run)+ .build()+ .unwrap();++ assert_eq!(+ vm.args.as_deref(),+ Some(&["--port".to_string(), "8765".to_string()][..])+ );+ assert_eq!(vm.env.as_ref().unwrap()["FOO"], "bar");+ assert_eq!(vm.process_mode, Some(ProcessMode::Run));+}diff --git a/libs/fleet/sdk/src/lib.rs b/libs/fleet/sdk/src/lib.rsindex 5a81e29185..00b550efb3 100644--- a/libs/fleet/sdk/src/lib.rs+++ b/libs/fleet/sdk/src/lib.rs@@ -6,6 +6,7 @@ mod image_uploads;mod images;mod namespaces;mod pools;+mod registry_secrets;mod routes;mod services;mod signed_service_urls;@@ -30,6 +31,10 @@ pub use image_uploads::{ImageUploadFileRequest, ImageUploadInstruction, ImageUploadRequest, ImageUploadResponse,PresignedPut,};+pub use registry_secrets::{+ CreateRegistrySecretRequest, CreateRegistrySecretRequestBuilder, RegistrySecret, ResolvedImage,+ registry_secret_name_prefix,+};pub use routes::validate_dns_label;pub use status::{PoolDisplayStatus, PoolDisplayStatusKind, healthy_pool_display_status, pool_display_status,diff --git a/libs/fleet/sdk/src/registry_secrets.rs b/libs/fleet/sdk/src/registry_secrets.rsnew file mode 100644index 0000000000..1416db7469--- /dev/null+++ b/libs/fleet/sdk/src/registry_secrets.rs@@ -0,0 +1,252 @@+//! Tenant-owned registry pull Secrets and server-side image resolution.+//!+//! A private registry image needs a pull Secret in the pool namespace. The+//! gateway lets a tenant create exactly one kind of Secret for that: a+//! `kubernetes.io/dockerconfigjson` Secret named `cua-registry-<name>` and+//! labeled `cua.ai/registry-secret: "true"`+//! (`cyclops-cs/backend/auth/tenant_secret_admission.rego`). Secrets are+//! write-only through the gateway: no read, list or update, so a credential+//! cannot be read back, and "update" is delete + create.+//!+//! Reference the Secret from `vmTemplate.imagePullSecret`; the pod runtimes+//! put it in the pod's `imagePullSecrets` and KubeVirt uses it for the+//! containerDisk pull.++use crate::{CyclopsClient, HttpHeader, HttpRequest, SdkError, routes};+use base64::{Engine, engine::general_purpose::STANDARD};+use cyclops_sdk_schema::REGISTRY_SECRET_NAME_PREFIX;+use serde::{Deserialize, Serialize};+use std::{fmt, sync::Arc};++const JSON_CONTENT_TYPE: &str = "application/json";+const DOCKER_CONFIG_JSON_TYPE: &str = "kubernetes.io/dockerconfigjson";+const DOCKER_CONFIG_JSON_KEY: &str = ".dockerconfigjson";++/// Credentials for one registry, stored as a `cua-registry-*` pull Secret.+#[derive(Clone, uniffi::Record, uniffi_builder_derive::UniffiBuilder)]+#[uniffi_builder(crate::SdkBuildError)]+pub struct CreateRegistrySecretRequest {+ /// Pool namespace the Secret is created in. It must already exist (the+ /// pool's namespace, created by `create_pool`, or by `create_namespace`).+ pub namespace: String,+ /// Full Secret name, `cua-registry-<dns-label>`.+ pub name: String,+ /// Registry host the credentials are for, as image refs spell it, e.g.+ /// `ghcr.io`, `registry.example.com:5000` or `docker.io`.+ pub registry: String,+ pub username: String,+ /// Password or access token. Never serialized by `Debug`.+ pub password: String,+}++impl fmt::Debug for CreateRegistrySecretRequest {+ fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {+ formatter+ .debug_struct("CreateRegistrySecretRequest")+ .field("namespace", &self.namespace)+ .field("name", &self.name)+ .field("registry", &self.registry)+ .field("username", &self.username)+ .field("password", &"<redacted>")+ .finish()+ }+}++/// A created registry pull Secret. Carries no credential: Secrets are+/// write-only through the gateway.+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, uniffi::Record)]+pub struct RegistrySecret {+ pub namespace: String,+ pub name: String,+ pub registry: String,+}++/// A registry ref pinned by the gateway (`GET /api/images/resolve`).+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, uniffi::Record)]+#[serde(rename_all = "camelCase")]+pub struct ResolvedImage {+ /// The ref as requested.+ #[serde(rename = "ref")]+ pub reference: String,+ /// The ref actually resolved: for a canonical image and runtime+ /// `kubevirt` this is the containerDisk sibling (`…:24.04-disk`).+ pub resolved_ref: String,+ /// `repo@sha256:…` of the manifest (or index) to run.+ pub pinned_ref: String,+ pub digest: String,+ /// `rootfs` (docker/gVisor), `containerdisk` (KubeVirt) or `unknown`.+ pub variant: String,+ /// The linux/amd64 child manifest digest when the ref is an index.+ #[serde(default)]+ pub platform_digest: Option<String>,+ pub media_type: String,+}++/// The name prefix every tenant registry pull Secret must carry.+#[uniffi::export]+pub fn registry_secret_name_prefix() -> String {+ REGISTRY_SECRET_NAME_PREFIX.into()+}++#[uniffi::export]+impl CyclopsClient {+ /// Create (or replace) a `cua-registry-*` dockerconfigjson pull Secret.+ /// On a name conflict the old Secret is deleted and the new one created,+ /// since the gateway admits no Secret update.+ pub async fn create_registry_secret(+ self: Arc<Self>,+ request: CreateRegistrySecretRequest,+ ) -> Result<RegistrySecret, SdkError> {+ let collection_url =+ routes::registry_secret_collection(self.base_url(), &request.namespace)?;+ let item_url =+ routes::registry_secret_item(self.base_url(), &request.namespace, &request.name)?;+ let body = registry_secret_body(&request)?;++ let created = self+ .send_allowed(+ "create registry secret",+ json_request("POST", collection_url.clone(), Some(body.clone())),+ &[200, 201, 202, 409],+ )+ .await?;+ if created.status == 409 {+ self.send_unit_crud(+ "replace registry secret",+ json_request("DELETE", item_url, None),+ &[200, 202, 204, 404],+ )+ .await?;+ self.send_unit_crud(+ "create registry secret",+ json_request("POST", collection_url, Some(body)),+ &[200, 201, 202],+ )+ .await?;+ }+ Ok(RegistrySecret {+ namespace: request.namespace,+ name: request.name,+ registry: request.registry,+ })+ }++ pub async fn delete_registry_secret(+ self: Arc<Self>,+ namespace: String,+ name: String,+ ) -> Result<(), SdkError> {+ let item_url = routes::registry_secret_item(self.base_url(), &namespace, &name)?;+ self.send_unit_crud(+ "delete registry secret",+ json_request("DELETE", item_url, None),+ &[200, 202, 204, 404],+ )+ .await+ }++ /// Pin a public registry ref to a digest server-side. `runtime` (`gvisor`,+ /// `kubevirt`, `macos`) selects the variant for canonical cua images:+ /// `kubevirt` maps `ghcr.io/trycua/linux:24.04` to its `-disk` sibling.+ pub async fn resolve_image(+ self: Arc<Self>,+ reference: String,+ runtime: Option<String>,+ ) -> Result<ResolvedImage, SdkError> {+ let url = routes::image_resolve(self.base_url(), &reference, runtime.as_deref())?;+ self.send_json_crud("resolve image", json_request("GET", url, None), &[200])+ .await+ }+}++pub(crate) fn validate_registry_secret_name(name: &str) -> Result<(), SdkError> {+ let rest = name+ .strip_prefix(REGISTRY_SECRET_NAME_PREFIX)+ .ok_or_else(|| SdkError::Configuration {+ reason: format!("registry secret name must start with {REGISTRY_SECRET_NAME_PREFIX}"),+ })?;+ routes::validate_dns_label_for("registry secret name", rest)?;+ if name.len() > 253 {+ return Err(SdkError::Configuration {+ reason: "registry secret name must be at most 253 characters".into(),+ });+ }+ Ok(())+}++fn validate_registry_host(registry: &str) -> Result<(), SdkError> {+ let invalid = registry.is_empty()+ || registry.len() > 255+ || registry.contains("://")+ || registry.contains('/')+ || registry+ .bytes()+ .any(|byte| byte.is_ascii_whitespace() || byte.is_ascii_control());+ if invalid {+ return Err(SdkError::Configuration {+ reason: "registry must be a bare host[:port] such as ghcr.io".into(),+ });+ }+ Ok(())+}++/// The Secret body the gateway admits: exactly the dockerconfigjson shape,+/// with no annotations, owner references or generateName.+pub(crate) fn registry_secret_body(+ request: &CreateRegistrySecretRequest,+) -> Result<Vec<u8>, SdkError> {+ validate_registry_secret_name(&request.name)?;+ validate_registry_host(&request.registry)?;+ if request.username.is_empty() || request.password.is_empty() {+ return Err(SdkError::Configuration {+ reason: "registry username and password must not be empty".into(),+ });+ }+ let auth = STANDARD.encode(format!("{}:{}", request.username, request.password));+ let docker_config = serde_json::json!({+ "auths": {+ request.registry.clone(): {+ "username": request.username,+ "password": request.password,+ "auth": auth,+ }+ }+ });+ let docker_config = serde_json::to_vec(&docker_config).map_err(|error| SdkError::Body {+ reason: error.to_string(),+ })?;+ let secret = serde_json::json!({+ "apiVersion": "v1",+ "kind": "Secret",+ "type": DOCKER_CONFIG_JSON_TYPE,+ "metadata": {+ "name": request.name,+ "namespace": request.namespace,+ "labels": {"cua.ai/registry-secret": "true"},+ },+ "data": {DOCKER_CONFIG_JSON_KEY: STANDARD.encode(docker_config)},+ });+ serde_json::to_vec(&secret).map_err(|error| SdkError::Body {+ reason: error.to_string(),+ })+}++fn json_request(method: &str, url: url::Url, body: Option<Vec<u8>>) -> HttpRequest {+ HttpRequest {+ method: method.into(),+ url: url.into(),+ headers: vec![+ HttpHeader {+ name: "accept".into(),+ value: JSON_CONTENT_TYPE.into(),+ },+ HttpHeader {+ name: "content-type".into(),+ value: JSON_CONTENT_TYPE.into(),+ },+ ],+ body,+ timeout_secs: None,+ max_response_bytes: Some(1 << 20),+ }+}diff --git a/libs/fleet/sdk/src/routes.rs b/libs/fleet/sdk/src/routes.rsindex 9785bdf552..28cef26f4a 100644--- a/libs/fleet/sdk/src/routes.rs+++ b/libs/fleet/sdk/src/routes.rs@@ -14,6 +14,8 @@ const NAMESPACE_PREFIX: &str = "api/namespaces/";const SERVICE_COLLECTION_PREFIX: &str = "api/svc/";const SIGNED_SERVICE_URL_COLLECTION_PREFIX: &str = "api/signed-service-urls/";const USER_KEY_COLLECTION: &str = "api/user-keys";+const IMAGE_RESOLVE: &str = "api/images/resolve";+const MAX_IMAGE_REFERENCE_BYTES: usize = 1024;pub fn pool_collection(base: &Url, namespace: &str) -> Result<Url, SdkError> {validate_dns_label_for("namespace", namespace)?;@@ -74,6 +76,51 @@ pub fn image_item(base: &Url, namespace: &str, name: &str) -> Result<Url, SdkErr)}+/// Core Secrets collection in a pool namespace. The gateway only admits+/// creating `cua-registry-*` dockerconfigjson Secrets here.+pub fn registry_secret_collection(base: &Url, namespace: &str) -> Result<Url, SdkError> {+ validate_dns_label_for("namespace", namespace)?;+ route(+ base,+ format!("{SECRET_COLLECTION_PREFIX}{namespace}{SECRET_COLLECTION_SUFFIX}"),+ )+}++/// One tenant registry pull Secret (`cua-registry-<dns-label>`).+pub fn registry_secret_item(base: &Url, namespace: &str, name: &str) -> Result<Url, SdkError> {+ validate_dns_label_for("namespace", namespace)?;+ crate::registry_secrets::validate_registry_secret_name(name)?;+ route(+ base,+ format!("{SECRET_COLLECTION_PREFIX}{namespace}{SECRET_COLLECTION_SUFFIX}/{name}"),+ )+}++/// `GET /api/images/resolve?ref=<ref>[&runtime=<runtime>]`.+pub fn image_resolve(base: &Url, reference: &str, runtime: Option<&str>) -> Result<Url, SdkError> {+ if reference.is_empty()+ || reference.len() > MAX_IMAGE_REFERENCE_BYTES+ || reference+ .bytes()+ .any(|byte| byte.is_ascii_whitespace() || byte.is_ascii_control())+ {+ return Err(SdkError::Configuration {+ reason: "image reference must be a non-empty registry ref without whitespace".into(),+ });+ }+ let mut url = route(base, IMAGE_RESOLVE.into())?;+ url.query_pairs_mut().append_pair("ref", reference);+ if let Some(runtime) = runtime {+ if !matches!(runtime, "kubevirt" | "gvisor" | "macos") {+ return Err(SdkError::Configuration {+ reason: "runtime must be kubevirt, gvisor or macos".into(),+ });+ }+ url.query_pairs_mut().append_pair("runtime", runtime);+ }+ Ok(url)+}+pub fn image_uploads_presign(base: &Url) -> Result<Url, SdkError> {route(base, IMAGE_UPLOADS_PRESIGN.into())}diff --git a/libs/fleet/sdk/src/templates.rs b/libs/fleet/sdk/src/templates.rsindex b2de05565c..8011436416 100644--- a/libs/fleet/sdk/src/templates.rs+++ b/libs/fleet/sdk/src/templates.rs@@ -144,14 +144,17 @@ fn template_merge_patch_json(template: &Template) -> Result<Vec<u8>, SdkError> {reason: error.to_string(),})?;// The same explicit null clears the optional process and delivery fields a- // desired spec drops (Terraform removing `command`, say); a merge patch- // would otherwise keep them.+ // desired spec drops (Terraform removing `command`, say, or a reconcile+ // without env/args/processMode); a merge patch would otherwise keep them.let vm_template = &template.spec.vm_template;for (key, absent) in [("imagePullSecret", vm_template.image_pull_secret.is_none()),("command", vm_template.command.is_none()),("probes", vm_template.probes.is_none()),("claimSecrets", vm_template.claim_secrets.is_none()),+ ("args", vm_template.args.is_none()),+ ("env", vm_template.env.is_none()),+ ("processMode", vm_template.process_mode.is_none()),] {if absent {value["spec"]["vmTemplate"][key] = serde_json::Value::Null;diff --git a/libs/fleet/sdk/tests/registry_secret_flow.rs b/libs/fleet/sdk/tests/registry_secret_flow.rsnew file mode 100644index 0000000000..4486b07e54--- /dev/null+++ b/libs/fleet/sdk/tests/registry_secret_flow.rs@@ -0,0 +1,229 @@+mod support;++use base64::{Engine, engine::general_purpose::STANDARD};+use cyclops_sdk::{+ CreateRegistrySecretRequest, CyclopsClient, CyclopsConfiguration, CyclopsCredentials,+ HttpResponse, RegistrySecret, SdkError, registry_secret_name_prefix,+};+use std::sync::Arc;+use support::ScriptedHttpClient;++const BASE_URL: &str = "https://cyclops.example:8443/prefix";+const TOKEN_URL: &str = "https://identity.example/oauth/token";+const SECRETS: &str =+ "https://cyclops.example:8443/prefix/api/k8s/api/v1/namespaces/example-pool/secrets";++fn request() -> CreateRegistrySecretRequest {+ CreateRegistrySecretRequest {+ namespace: "example-pool".into(),+ name: "cua-registry-ghcr".into(),+ registry: "ghcr.io".into(),+ username: "octo".into(),+ password: "ghp_token".into(),+ }+}++#[tokio::test]+async fn create_registry_secret_posts_a_dockerconfigjson_secret() {+ let http = Arc::new(ScriptedHttpClient::new([+ Ok(token()),+ Ok(response(201, br#"{"kind":"Secret"}"#)),+ ]));++ let secret = client(Arc::clone(&http))+ .create_registry_secret(request())+ .await+ .unwrap();++ assert_eq!(+ secret,+ RegistrySecret {+ namespace: "example-pool".into(),+ name: "cua-registry-ghcr".into(),+ registry: "ghcr.io".into(),+ }+ );+ let requests = http.authenticated_requests().await;+ assert_eq!(requests.len(), 1);+ assert_eq!(requests[0].method, "POST");+ assert_eq!(requests[0].url, SECRETS);+ let body: serde_json::Value =+ serde_json::from_slice(requests[0].body.as_deref().unwrap()).unwrap();+ assert_eq!(body["type"], "kubernetes.io/dockerconfigjson");+ assert_eq!(body["metadata"]["name"], "cua-registry-ghcr");+ assert_eq!(body["metadata"]["namespace"], "example-pool");+ assert!(body["metadata"].get("annotations").is_none());+ assert!(body.get("stringData").is_none());+ let config: serde_json::Value = serde_json::from_slice(+ &STANDARD+ .decode(body["data"][".dockerconfigjson"].as_str().unwrap())+ .unwrap(),+ )+ .unwrap();+ let auth = &config["auths"]["ghcr.io"];+ assert_eq!(auth["username"], "octo");+ assert_eq!(auth["password"], "ghp_token");+ assert_eq!(auth["auth"], STANDARD.encode("octo:ghp_token"));+}++#[tokio::test]+async fn create_registry_secret_replaces_an_existing_secret() {+ let http = Arc::new(ScriptedHttpClient::new([+ Ok(token()),+ Ok(response(409, br#"{"reason":"AlreadyExists"}"#)),+ Ok(response(200, b"{}")),+ Ok(response(201, b"{}")),+ ]));++ client(Arc::clone(&http))+ .create_registry_secret(request())+ .await+ .unwrap();++ let requests = http.authenticated_requests().await;+ let calls: Vec<_> = requests+ .iter()+ .map(|request| (request.method.as_str(), request.url.as_str()))+ .collect();+ let item = format!("{SECRETS}/cua-registry-ghcr");+ assert_eq!(+ calls,+ vec![+ ("POST", SECRETS),+ ("DELETE", item.as_str()),+ ("POST", SECRETS)+ ]+ );+}++#[tokio::test]+async fn registry_secret_names_and_hosts_are_validated_before_any_request() {+ for (mutate, needle) in [+ (+ (|request: &mut CreateRegistrySecretRequest| request.name = "ecr-credentials".into())+ as fn(&mut CreateRegistrySecretRequest),+ "must start with cua-registry-",+ ),+ (+ |request: &mut CreateRegistrySecretRequest| request.name = "cua-registry-".into(),+ "registry secret name",+ ),+ (+ |request: &mut CreateRegistrySecretRequest| request.registry = "https://ghcr.io".into(),+ "bare host",+ ),+ (+ |request: &mut CreateRegistrySecretRequest| request.password = String::new(),+ "must not be empty",+ ),+ ] {+ let http = Arc::new(ScriptedHttpClient::new([Ok(token())]));+ let mut request = request();+ mutate(&mut request);+ let error = client(Arc::clone(&http))+ .create_registry_secret(request)+ .await+ .unwrap_err();+ let matched = match &error {+ SdkError::Configuration { reason } => reason.contains(needle),+ SdkError::InvalidResourceName { field, .. } => field.contains(needle),+ _ => false,+ };+ assert!(matched, "{error:?}");+ assert!(http.authenticated_requests().await.is_empty());+ }+}++#[test]+fn registry_secret_request_debug_redacts_the_password() {+ let debug = format!("{:?}", request());+ assert!(!debug.contains("ghp_token"));+ assert!(debug.contains("<redacted>"));+ assert_eq!(registry_secret_name_prefix(), "cua-registry-");+}++#[tokio::test]+async fn delete_registry_secret_targets_the_item_and_tolerates_404() {+ let http = Arc::new(ScriptedHttpClient::new([+ Ok(token()),+ Ok(response(404, b"{}")),+ ]));++ client(Arc::clone(&http))+ .delete_registry_secret("example-pool".into(), "cua-registry-ghcr".into())+ .await+ .unwrap();++ let requests = http.authenticated_requests().await;+ assert_eq!(requests[0].method, "DELETE");+ assert_eq!(requests[0].url, format!("{SECRETS}/cua-registry-ghcr"));+}++#[tokio::test]+async fn resolve_image_queries_the_gateway_and_decodes_the_pin() {+ let digest = format!("sha256:{}", "a".repeat(64));+ let http = Arc::new(ScriptedHttpClient::new([+ Ok(token()),+ Ok(response(+ 200,+ serde_json::json!({+ "ref": "ghcr.io/trycua/linux:24.04",+ "resolvedRef": "ghcr.io/trycua/linux:24.04-disk",+ "pinnedRef": format!("ghcr.io/trycua/linux@{digest}"),+ "digest": digest,+ "variant": "containerdisk",+ "platformDigest": null,+ "mediaType": "application/vnd.oci.image.index.v1+json",+ })+ .to_string()+ .as_bytes(),+ )),+ ]));++ let resolved = client(Arc::clone(&http))+ .resolve_image("ghcr.io/trycua/linux:24.04".into(), Some("kubevirt".into()))+ .await+ .unwrap();++ assert_eq!(resolved.variant, "containerdisk");+ assert_eq!(resolved.resolved_ref, "ghcr.io/trycua/linux:24.04-disk");+ let requests = http.authenticated_requests().await;+ assert_eq!(+ requests[0].url,+ "https://cyclops.example:8443/prefix/api/images/resolve?ref=ghcr.io%2Ftrycua%2Flinux%3A24.04&runtime=kubevirt"+ );++ let error = client(Arc::new(ScriptedHttpClient::new([Ok(token())])))+ .resolve_image("ghcr.io/x".into(), Some("docker".into()))+ .await+ .unwrap_err();+ assert!(matches!(error, SdkError::Configuration { .. }));+}++fn client(http: Arc<ScriptedHttpClient>) -> Arc<CyclopsClient> {+ CyclopsClient::connect(+ CyclopsConfiguration {+ base_url: BASE_URL.into(),+ token_url: TOKEN_URL.into(),+ credentials: CyclopsCredentials::new("client".into(), "secret".into()),+ pool_poll_interval_ms: 1,+ pool_poll_limit: 1,+ claim_poll_interval_ms: 1,+ claim_poll_limit: 1,+ },+ http,+ )+ .unwrap()+}++fn token() -> HttpResponse {+ response(200, br#"{"access_token":"token-a","expires_in":3600}"#)+}++fn response(status: u16, body: &[u8]) -> HttpResponse {+ HttpResponse {+ status,+ headers: Vec::new(),+ body: body.to_vec(),+ }+}diff --git a/libs/fleet/sdk/tests/template_flow.rs b/libs/fleet/sdk/tests/template_flow.rsindex 248fe37fc5..65fe2a5337 100644--- a/libs/fleet/sdk/tests/template_flow.rs+++ b/libs/fleet/sdk/tests/template_flow.rs@@ -90,6 +90,76 @@ async fn reconcile_template_keeps_a_pull_secret_the_desired_spec_asks_for() {);}+/// Reconcile means "make the template exactly this". A desired spec without+/// a command, args, env or processMode must clear the ones an earlier spec set,+/// which a merge patch can only say with explicit nulls.+#[tokio::test]+async fn reconcile_template_clears_process_fields_the_desired_spec_omits() {+ let mut stored = template(None);+ stored.spec.vm_template.command = Some(vec!["python".into(), "-m".into(), "old".into()]);+ stored.spec.vm_template.env = Some(std::collections::HashMap::from([(+ "OLD".into(),+ "1".into(),+ )]));+ let http = Arc::new(ScriptedHttpClient::new([+ Ok(token()),+ Ok(json_response(200, &stored)),+ Ok(json_response(200, &template(None))),+ ]));++ client(Arc::clone(&http))+ .reconcile_template(create_request(None))+ .await+ .unwrap();++ let requests = http.authenticated_requests().await;+ let body: serde_json::Value =+ serde_json::from_slice(requests[1].body.as_deref().unwrap()).unwrap();+ let vm_template = body["spec"]["vmTemplate"].as_object().unwrap();+ for key in ["command", "args", "env", "processMode"] {+ assert_eq!(+ vm_template.get(key),+ Some(&serde_json::Value::Null),+ "{key}"+ );+ }+}++#[tokio::test]+async fn reconcile_template_sends_env_command_and_process_mode_it_asks_for() {+ let mut request = create_request(None);+ let vm_template = &mut request.spec.vm_template;+ vm_template.command = Some(vec!["python".into(), "-m".into(), "server".into()]);+ vm_template.args = Some(vec!["--port".into(), "8765".into()]);+ vm_template.env = Some(std::collections::HashMap::from([(+ "FOO".into(),+ "bar".into(),+ )]));+ vm_template.process_mode = Some(cyclops_sdk_schema::ProcessMode::Run);+ let http = Arc::new(ScriptedHttpClient::new([+ Ok(token()),+ Ok(json_response(200, &template(None))),+ Ok(json_response(200, &template(None))),+ ]));++ client(Arc::clone(&http))+ .reconcile_template(request)+ .await+ .unwrap();++ let requests = http.authenticated_requests().await;+ let body: serde_json::Value =+ serde_json::from_slice(requests[1].body.as_deref().unwrap()).unwrap();+ let vm_template = &body["spec"]["vmTemplate"];+ assert_eq!(+ vm_template["command"],+ serde_json::json!(["python", "-m", "server"])+ );+ assert_eq!(vm_template["args"], serde_json::json!(["--port", "8765"]));+ assert_eq!(vm_template["env"], serde_json::json!({"FOO": "bar"}));+ assert_eq!(vm_template["processMode"], serde_json::json!("Run"));+}+/// Terraform drops `command`, the probes or `claim_secrets` by leaving them/// out of the desired spec; the merge patch has to null them to clear them.#[tokio::test]diff --git a/libs/fleet/src/fleet/pools.ts b/libs/fleet/src/fleet/pools.tsindex aa98f8ed20..f66dce04ee 100644--- a/libs/fleet/src/fleet/pools.ts+++ b/libs/fleet/src/fleet/pools.ts@@ -268,6 +268,11 @@ function seedVmTemplateBuilder(vm: VmTemplate): VmTemplateBuilderLike {if (vm.probes !== undefined) builder = builder.probes(vm.probes)if (vm.services !== undefined) builder = builder.services(vm.services)if (vm.oidc !== undefined) builder = builder.oidc(vm.oidc)+ // Carry the process fields too: reconcile/update patches clear any field the+ // rebuilt template omits, so dropping these would wipe them on a services edit.+ if (vm.args !== undefined) builder = builder.args(vm.args)+ if (vm.env !== undefined) builder = builder.env(vm.env)+ if (vm.processMode !== undefined) builder = builder.processMode(vm.processMode)// The SDK patches a dropped claimSecrets to null, so a services edit has to// carry it or it would turn claim-secret delivery off.if (vm.claimSecrets !== undefined) {