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(cyclops-cs): adopt generated builder API (#6609)
r33drichards604db8179185
diff --git a/libs/fleet/e2e/sdk-builders.spec.ts b/libs/fleet/e2e/sdk-builders.spec.tsnew file mode 100644index 0000000000..0ed9ce8451--- /dev/null+++ b/libs/fleet/e2e/sdk-builders.spec.ts@@ -0,0 +1,328 @@+import { expect, test } from "@playwright/test"+import { mockAuth, mockNamespacesApi, mockPoolsApi } from "./fixtures/mock-api"++test.describe("SDK builders", () => {+ test.beforeEach(async ({ page }) => {+ await mockAuth(page)+ await page.route("**/api/config", route =>+ route.fulfill({+ contentType: "application/json",+ body: JSON.stringify({ admin: false, billing: false }),+ }),+ )+ await mockNamespacesApi(page)+ await mockPoolsApi(page)+ await page.goto("/pools")+ })++ test("builds client, claim, and user-key records", async ({ page }) => {+ const result = await page.evaluate(async () => {+ const { buildClientConfiguration } = await import("/src/sdk/client.ts")+ const { buildClaimRequest } = await import("/src/sdk/claims.ts")+ const { buildUserApiKeyRequest } = await import("/src/sdk/userKeys.ts")+ const pool = {+ apiVersion: "osgym.cua.ai/v1alpha1",+ kind: "OSGymSandboxWarmPool",+ metadata: { namespace: "demo-pool", name: "demo-pool" },+ spec: {+ replicas: 1,+ sandboxTemplateRef: { name: "demo-pool-template" },+ },+ }+ const configuration = buildClientConfiguration()+ const claim = buildClaimRequest(pool)+ const userKey = buildUserApiKeyRequest("automation")+ return {+ baseUrl: configuration.baseUrl,+ poolPollIntervalMs: configuration.poolPollIntervalMs.toString(),+ poolPollLimit: configuration.poolPollLimit,+ claimPollIntervalMs: configuration.claimPollIntervalMs.toString(),+ claimPollLimit: configuration.claimPollLimit,+ claimPool: claim.pool.metadata.name,+ claimSpecUnset: claim.spec === undefined,+ claimNameUnset: claim.name === undefined,+ keyName: userKey.name,+ keyScope: userKey.scope,+ }+ })++ expect(result).toEqual({+ baseUrl: new URL(page.url()).origin,+ poolPollIntervalMs: "5000",+ poolPollLimit: 120,+ claimPollIntervalMs: "5000",+ claimPollLimit: 120,+ claimPool: "demo-pool",+ claimSpecUnset: true,+ claimNameUnset: true,+ keyName: "automation",+ keyScope: [],+ })+ })++ test("builds nested pool and template requests", async ({ page }) => {+ const result = await page.evaluate(async () => {+ const { buildPoolRequest, buildTemplateRequest } = await import("/src/sdk/pools.ts")+ const { Firmware, ServiceProtocol } = await import("/src/sdk/generated.ts")+ const values = {+ cpu: 4,+ ram: "8Gi",+ ociImage: "registry.example/cyclops:v1",+ replicas: 2,+ firmware: "efi" as const,+ services: [+ { name: "ssh", targetPort: 22, protocol: "TCP" },+ { name: "dns", targetPort: 53, protocol: "udp" },+ ],+ autoscaling: { minPoolSize: 1, initialPoolSize: 2, maxPoolSize: 5 },+ }+ const pool = buildPoolRequest("demo-pool", "demo-pool-template", values)+ const template = buildTemplateRequest("demo-pool", "demo-pool-template", values)+ return {+ pool: {+ namespace: pool.namespace,+ replicas: pool.spec.replicas,+ template: pool.spec.sandboxTemplateRef.name,+ autoscaling: pool.spec.autoscaling,+ },+ template: {+ namespace: template.namespace,+ name: template.name,+ image: template.spec.vmTemplate.containerDiskImage,+ secret: template.spec.vmTemplate.imagePullSecret,+ firmwareIsEfi: template.spec.vmTemplate.firmware === Firmware.Efi,+ services: template.spec.vmTemplate.services?.map(service => ({+ name: service.name,+ targetPort: service.targetPort,+ udp: service.protocol === ServiceProtocol.Udp,+ })),+ },+ }+ })++ expect(result.pool).toEqual({+ namespace: "demo-pool",+ replicas: 2,+ template: "demo-pool-template",+ autoscaling: { minPoolSize: 1, initialPoolSize: 2, maxPoolSize: 5 },+ })+ expect(result.template).toEqual({+ namespace: "demo-pool",+ name: "demo-pool-template",+ image: "registry.example/cyclops:v1",+ secret: "ecr-credentials",+ firmwareIsEfi: true,+ services: [+ { name: "ssh", targetPort: 22, udp: false },+ { name: "dns", targetPort: 53, udp: true },+ ],+ })+ })++ test("rebuilds template services without mutation", async ({ page }) => {+ const result = await page.evaluate(async () => {+ const { rebuildTemplateWithServices } = await import("/src/sdk/pools.ts")+ const {+ Firmware,+ ImagePullPolicy,+ OidcConfig,+ PreservedJson,+ RuntimeKind,+ SandboxServiceBuilder,+ } = await import("/src/sdk/generated.ts")+ const originalService = new SandboxServiceBuilder()+ .name("old")+ .targetPort(8080)+ .build()+ const toleration = PreservedJson.fromJson(+ JSON.stringify({ key: "dedicated", operator: "Equal", value: "gpu" }),+ )+ const probes = PreservedJson.fromJson(+ JSON.stringify({ liveness: { path: "/health", port: 8080 } }),+ )+ const oidc = OidcConfig.new({+ credentialsSecret: "oidc-credentials",+ tokenUrl: "https://issuer.example.test/token",+ awsRoleArn: "arn:aws:iam::123456789012:role/cyclops",+ awsRegion: "us-east-1",+ refreshIntervalSeconds: 300,+ })+ const original = {+ apiVersion: "osgym.cua.ai/v1alpha1",+ kind: "OSGymSandboxTemplate",+ metadata: {+ namespace: "demo-pool",+ name: "demo-pool-template",+ labels: new Map([["owner", "cyclops"]]),+ creationTimestamp: "2026-08-07T00:00:00Z",+ },+ spec: {+ vmTemplate: {+ containerDiskImage: "registry.example/cyclops:v1",+ command: ["sleep", "infinity"],+ runtime: RuntimeKind.Gvisor,+ runtimeClassName: "kata",+ nodeSelector: new Map([["node-role.kubernetes.io/gpu", "true"]]),+ tolerations: [toleration],+ imagePullPolicy: ImagePullPolicy.IfNotPresent,+ imagePullSecret: "pull-secret",+ cpuCores: 4,+ memory: "8Gi",+ firmware: Firmware.Efi,+ probes,+ services: [originalService],+ oidc,+ },+ },+ }+ const originalVm = original.spec.vmTemplate+ const rebuilt = rebuildTemplateWithServices(original, [+ { name: "ssh", targetPort: 22, protocol: "TCP" },+ ])+ return {+ templateChanged: rebuilt !== original,+ vmChanged: rebuilt.spec.vmTemplate !== originalVm,+ originalServices: original.spec.vmTemplate.services?.map(service => ({+ name: service.name,+ targetPort: service.targetPort,+ })),+ originalNodeSelector: Array.from(+ original.spec.vmTemplate.nodeSelector?.entries() ?? [],+ ),+ originalTolerations: original.spec.vmTemplate.tolerations?.map(value =>+ value.toJson(),+ ),+ originalProbes: original.spec.vmTemplate.probes?.toJson(),+ originalOidc: original.spec.vmTemplate.oidc,+ rebuiltServices: rebuilt.spec.vmTemplate.services?.map(service => ({+ name: service.name,+ targetPort: service.targetPort,+ })),+ vm: {+ containerDiskImage: rebuilt.spec.vmTemplate.containerDiskImage,+ command: rebuilt.spec.vmTemplate.command,+ runtime: rebuilt.spec.vmTemplate.runtime,+ runtimeClassName: rebuilt.spec.vmTemplate.runtimeClassName,+ nodeSelector: Array.from(+ rebuilt.spec.vmTemplate.nodeSelector?.entries() ?? [],+ ),+ tolerations: rebuilt.spec.vmTemplate.tolerations?.map(value =>+ value.toJson(),+ ),+ imagePullPolicy: rebuilt.spec.vmTemplate.imagePullPolicy,+ imagePullSecret: rebuilt.spec.vmTemplate.imagePullSecret,+ cpuCores: rebuilt.spec.vmTemplate.cpuCores,+ memory: rebuilt.spec.vmTemplate.memory,+ firmware: rebuilt.spec.vmTemplate.firmware,+ probes: rebuilt.spec.vmTemplate.probes?.toJson(),+ oidc: rebuilt.spec.vmTemplate.oidc,+ },+ owner: rebuilt.metadata.labels?.get("owner"),+ creationTimestamp: rebuilt.metadata.creationTimestamp,+ }+ })++ expect(result).toEqual({+ templateChanged: true,+ vmChanged: true,+ originalServices: [{ name: "old", targetPort: 8080 }],+ originalNodeSelector: [["node-role.kubernetes.io/gpu", "true"]],+ originalTolerations: [+ '{"key":"dedicated","operator":"Equal","value":"gpu"}',+ ],+ originalProbes: '{"liveness":{"path":"/health","port":8080}}',+ originalOidc: {+ credentialsSecret: "oidc-credentials",+ tokenUrl: "https://issuer.example.test/token",+ awsRoleArn: "arn:aws:iam::123456789012:role/cyclops",+ awsRegion: "us-east-1",+ refreshIntervalSeconds: 300,+ },+ rebuiltServices: [{ name: "ssh", targetPort: 22 }],+ vm: {+ containerDiskImage: "registry.example/cyclops:v1",+ command: ["sleep", "infinity"],+ runtime: 2,+ runtimeClassName: "kata",+ nodeSelector: [["node-role.kubernetes.io/gpu", "true"]],+ tolerations: [+ '{"key":"dedicated","operator":"Equal","value":"gpu"}',+ ],+ imagePullPolicy: 1,+ imagePullSecret: "pull-secret",+ cpuCores: 4,+ memory: "8Gi",+ firmware: 1,+ probes: '{"liveness":{"path":"/health","port":8080}}',+ oidc: {+ credentialsSecret: "oidc-credentials",+ tokenUrl: "https://issuer.example.test/token",+ awsRoleArn: "arn:aws:iam::123456789012:role/cyclops",+ awsRegion: "us-east-1",+ refreshIntervalSeconds: 300,+ },+ },+ owner: "cyclops",+ creationTimestamp: "2026-08-07T00:00:00Z",+ })+ })++ test("rolls back once and rethrows the template failure", async ({ page }) => {+ const poolPath =+ "**/api/k8s/apis/osgym.cua.ai/v1alpha1/namespaces/rollback-pool/osgymsandboxwarmpools"+ const templatePath =+ "**/api/k8s/apis/osgym.cua.ai/v1alpha1/namespaces/rollback-pool/osgymsandboxtemplates"+ const deletePath = `${poolPath}/rollback-pool`+ const templateFailure = "template creation failed distinctively"+ let deleteAttempts = 0++ await page.route(poolPath, async route => {+ if (route.request().method() !== "POST") return route.continue()+ await route.fulfill({+ status: 201,+ contentType: "application/json",+ body: JSON.stringify({+ apiVersion: "osgym.cua.ai/v1alpha1",+ kind: "OSGymSandboxWarmPool",+ metadata: { namespace: "rollback-pool", name: "rollback-pool" },+ spec: {+ replicas: 1,+ sandboxTemplateRef: { name: "rollback-pool-template" },+ },+ }),+ })+ })+ await page.route(templatePath, route =>+ route.fulfill({ status: 422, body: templateFailure }),+ )+ await page.route(deletePath, async route => {+ deleteAttempts += 1+ await route.fulfill({ status: 503, body: "rollback cleanup failed" })+ })++ const result = await page.evaluate(async () => {+ const { createPool } = await import("/src/sdk/pools.ts")+ const { SdkError } = await import("/src/sdk/generated.ts")+ try {+ await createPool("rollback-pool", {+ cpu: 1,+ ram: "1Gi",+ ociImage: "registry.example/cyclops:v1",+ replicas: 1,+ })+ } catch (error) {+ if (SdkError.Status.instanceOf(error)) return error.inner+ return { unexpectedError: String(error) }+ }+ return { unexpectedSuccess: true }+ })++ expect(deleteAttempts).toBe(1)+ expect(result).toEqual({+ operation: "create template",+ status: 422,+ body: templateFailure,+ })+ })++})diff --git a/libs/fleet/scripts/generate-sdk-bindings.sh b/libs/fleet/scripts/generate-sdk-bindings.shindex 60525066f5..1dc67ab141 100755--- a/libs/fleet/scripts/generate-sdk-bindings.sh+++ b/libs/fleet/scripts/generate-sdk-bindings.sh@@ -844,8 +844,8 @@ def replace_buffer(match):text, buffer_replacements = re.subn(buffer_pattern, replace_buffer, text)if buffer_replacements != 21:raise SystemExit(f"expected 21 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)) != 2:- raise SystemExit("expected two synchronous Ruby SDK builder build calls")+if len(re.findall(r"result = FleetSdk\.rust_call_with_error\(SdkBuildError,:uniffi_[a-z0-9_]*builder_build,", text)) != 6:+ raise SystemExit("expected six synchronous Ruby SDK builder build calls")void_pattern = r"(?m)^(\s*)FleetSdk\.rust_call_with_error\(([^,]+),:([a-z0-9_]+),(.*)\)$"def replace_void(match):diff --git a/libs/fleet/scripts/test-generate-sdk-bindings.sh b/libs/fleet/scripts/test-generate-sdk-bindings.shindex 4fc9fb560a..3999e783e7 100755--- a/libs/fleet/scripts/test-generate-sdk-bindings.sh+++ b/libs/fleet/scripts/test-generate-sdk-bindings.sh@@ -347,14 +347,28 @@ ruby_sdk_source="$bindings_dir/ruby/cyclops_sdk/sdk.rb"ruby_schema_source="$bindings_dir/ruby/cyclops_sdk/schema.rb"node_sdk_source="$bindings_dir/ts-uniffi/fleet_sdk.ts"browser_sdk_source="$bindings_dir/ts-uniffi-browser/ts/fleet_sdk.ts"+browser_schema_source="$bindings_dir/ts-uniffi-browser/ts/cyclops_sdk_schema.ts"go_sdk_source="$bindings_dir/go-uniffi/fleet_sdk/fleet_sdk.go"-for separate_binding in "$node_sdk_source" "$browser_sdk_source" "$go_sdk_source"; do+for separate_binding in "$node_sdk_source" "$go_sdk_source"; doif grep -Fq -- "VmTemplateBuilder" "$separate_binding" || grep -Fq -- "CreatePoolRequestBuilder" "$separate_binding"; then- fail "separately generated Go/TypeScript binding unexpectedly contains authoritative builders: $separate_binding"+ fail "separately generated Go/Node binding unexpectedly contains authoritative builders: $separate_binding"fidone+for browser_builder in \+ VmTemplateBuilder \+ WarmPoolAutoscalingBuilder \+ CreatePoolRequestBuilder \+ CyclopsTokenProviderConfigurationBuilder \+ CreateClaimRequestBuilder \+ CreateUserApiKeyRequestBuilder \+ TemplateBuilder; do+ if ! grep -Fq -- "class $browser_builder" "$browser_schema_source" && \+ ! grep -Fq -- "class $browser_builder" "$browser_sdk_source"; then+ fail "Browser/WASM bindings omit $browser_builder"+ fi+donegrep -Fq -- "class VmTemplateBuilder" "$python_schema_source" || fail "Python bindings omit VmTemplateBuilder"grep -Fq -- "class CreatePoolRequestBuilder" "$python_sdk_source" || fail "Python bindings omit CreatePoolRequestBuilder"grep -Fq -- "open class VmTemplateBuilder" "$kotlin_schema_source" || fail "Kotlin bindings omit VmTemplateBuilder"diff --git a/libs/fleet/sdk-bindings/README.md b/libs/fleet/sdk-bindings/README.mdindex c9e347b8a0..23ac169a7d 100644--- a/libs/fleet/sdk-bindings/README.md+++ b/libs/fleet/sdk-bindings/README.md@@ -9,25 +9,20 @@ four-language binding surface; separate UniFFI snapshots are described below.### Separately generated targets-`go-uniffi`, `ts-uniffi` (Node.js), and `ts-uniffi-browser` are checked-in-compatibility snapshots produced by `uniffi-bindgen-go` and-`uniffi-bindgen-react-native`, not outputs of `generate-sdk-bindings.sh`. They-consume the same Rust cdylib, whose UniFFI metadata includes the builder-objects, but their checked-in sources are not owned or drift-checked by this-testbed. The Go and Node.js snapshots are not regenerated here. Browser/WASM-packaging runs UBRN generation during its build, but no committed-source drift-or builder contract verifies that generated surface. The checked-in separate-snapshots therefore retain direct record constructors and do not currently-advertise `UniffiBuilder` companions.--This is a binding-pipeline adoption gap, not a Rust or UniFFI metadata-limitation. Adding builders to the Go, Node.js, or browser/WASM public-contracts requires separately regenerating where applicable and-validating each third-party generator, cross-component converter layer,-packaging path, checked-in scope, and runtime API. Until that work lands,-"authoritative generated builder targets" in this document means only Python,-Kotlin, Swift, and Ruby; do not infer builder availability for the separate-snapshots or from browser build-time generation alone.+`go-uniffi` and `ts-uniffi` (Node.js) are checked-in compatibility snapshots+produced by `uniffi-bindgen-go` and `uniffi-bindgen-react-native`, not outputs+of `generate-sdk-bindings.sh`. They retain direct record constructors and do+not advertise builders.++`ts-uniffi-browser` (Browser/WASM) regenerates from Rust metadata during its+build, commits its TypeScript record modules, and verifies that generated+surface with an executable WASM builder artifact contract. Browser/WASM is an+advertised generated builder target alongside Python, Kotlin, Swift, and Ruby.++Go and Node.js remain separate compatibility snapshots. Adding builders to+their public contracts requires separately regenerating and validating each+third-party generator, cross-component converter layer, packaging path,+checked-in scope, and runtime API.## Source of truth and compatibilitydiff --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 991e0fb155..c7499c61c0 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@@ -752,6 +752,14 @@ internal object IntegrityCheckingUniffiLib {): Shortexternal 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_name(+ ): Short+ external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool(+ ): Short+ external fun uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec(+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_build(): Shortexternal fun uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_namespace(@@ -766,6 +774,34 @@ internal object IntegrityCheckingUniffiLib {): Shortexternal 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_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(+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect(): Shortexternal fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_browser_with_access_token(@@ -780,12 +816,20 @@ internal object IntegrityCheckingUniffiLib {): Shortexternal fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_with_native_http_client(): Short+ external fun uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new(+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new(): Shortexternal fun uniffi_cyclops_sdk_checksum_constructor_createtemplaterequestbuilder_new(): Short+ external fun uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new(+ ): Shortexternal 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_templatebuilder_new(+ ): Shortexternal fun ffi_cyclops_sdk_uniffi_contract_version(): Int@@ -887,6 +931,20 @@ external fun uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(`vtable`: Uni): Unitexternal fun uniffi_cyclops_sdk_fn_method_httpclient_execute(`ptr`: Long,`request`: RustBuffer.ByValue,): Long+external fun uniffi_cyclops_sdk_fn_clone_createclaimrequestbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_free_createclaimrequestbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Unit+external fun uniffi_cyclops_sdk_fn_constructor_createclaimrequestbuilder_new(uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_build(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,+): RustBuffer.ByValue+external fun uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_name(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_pool(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_spec(`ptr`: Long,`value`: RustBufferClaimSpec.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Longexternal fun uniffi_cyclops_sdk_fn_clone_createpoolrequestbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,): Longexternal fun uniffi_cyclops_sdk_fn_free_createpoolrequestbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,@@ -913,12 +971,58 @@ external fun uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_namespace): Longexternal fun uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_spec(`ptr`: Long,`value`: RustBufferOSGymSandboxTemplateSpec.ByValue,uniffi_out_err: UniffiRustCallStatus,): Long+external fun uniffi_cyclops_sdk_fn_clone_createuserapikeyrequestbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_free_createuserapikeyrequestbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Unit+external fun uniffi_cyclops_sdk_fn_constructor_createuserapikeyrequestbuilder_new(uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_build(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,+): RustBuffer.ByValue+external fun uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_name(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_scope(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Longexternal fun uniffi_cyclops_sdk_fn_clone_cyclopscredentials(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,): Longexternal fun uniffi_cyclops_sdk_fn_free_cyclopscredentials(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,): Unitexternal fun uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(`clientId`: RustBuffer.ByValue,`clientSecret`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,): Long+external fun uniffi_cyclops_sdk_fn_clone_cyclopstokenproviderconfigurationbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_free_cyclopstokenproviderconfigurationbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Unit+external fun uniffi_cyclops_sdk_fn_constructor_cyclopstokenproviderconfigurationbuilder_new(uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_base_url(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_build(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,+): RustBuffer.ByValue+external fun uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms(`ptr`: Long,`value`: Long,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit(`ptr`: Long,`value`: Int,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms(`ptr`: Long,`value`: Long,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit(`ptr`: Long,`value`: Int,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_clone_templatebuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_free_templatebuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Unit+external fun uniffi_cyclops_sdk_fn_constructor_templatebuilder_new(uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_templatebuilder_api_version(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_templatebuilder_build(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,+): RustBuffer.ByValue+external fun uniffi_cyclops_sdk_fn_method_templatebuilder_kind(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_templatebuilder_metadata(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_fn_method_templatebuilder_spec(`ptr`: Long,`value`: RustBufferOSGymSandboxTemplateSpec.ByValue,uniffi_out_err: UniffiRustCallStatus,+): Longexternal fun ffi_cyclops_sdk_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus,): RustBuffer.ByValueexternal fun ffi_cyclops_sdk_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus,@@ -1113,6 +1217,18 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_checksum_method_httpclient_execute() != 38803.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build() != 10518.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name() != 19762.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool() != 7405.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec() != 28263.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_build() != 60558.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}@@ -1134,6 +1250,48 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_spec() != 29902.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build() != 18677.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name() != 53365.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope() != 26616.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url() != 48016.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build() != 28182.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms() != 50054.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit() != 7533.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms() != 16373.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit() != 6865.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version() != 65471.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_templatebuilder_build() != 2046.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_templatebuilder_kind() != 14122.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata() != 25572.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_method_templatebuilder_spec() != 43128.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() != 54404.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}@@ -1155,15 +1313,27 @@ 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_createclaimrequestbuilder_new() != 10967.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new() != 33658.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}if (lib.uniffi_cyclops_sdk_checksum_constructor_createtemplaterequestbuilder_new() != 6787.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new() != 47741.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() != 25746.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new() != 43069.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new() != 19815.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }}/**@@ -2081,18 +2251,20 @@ public object FfiConverterTypeAccessTokenProvider: FfiConverter<AccessTokenProvi//-public interface CreatePoolRequestBuilderInterface {+public interface CreateClaimRequestBuilderInterface {- fun `build`(): CreatePoolRequest+ fun `build`(): CreateClaimRequest- fun `namespace`(`value`: kotlin.String): CreatePoolRequestBuilder+ fun `name`(`value`: kotlin.String): CreateClaimRequestBuilder- fun `spec`(`value`: OsGymSandboxWarmPoolSpec): CreatePoolRequestBuilder+ fun `pool`(`value`: Pool): CreateClaimRequestBuilder++ fun `spec`(`value`: ClaimSpec): CreateClaimRequestBuildercompanion object}-open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolRequestBuilderInterface+open class CreateClaimRequestBuilder: Disposable, AutoCloseable, CreateClaimRequestBuilderInterface{@Suppress("UNUSED_PARAMETER")@@ -2119,7 +2291,7 @@ open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolRequesconstructor() :this(UniffiWithHandle,uniffiRustCall() { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_constructor_createpoolrequestbuilder_new(+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_createclaimrequestbuilder_new(_status)}@@ -2179,7 +2351,7 @@ open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolRequesreturn;}uniffiRustCall { status ->- UniffiLib.uniffi_cyclops_sdk_fn_free_createpoolrequestbuilder(handle, status)+ UniffiLib.uniffi_cyclops_sdk_fn_free_createclaimrequestbuilder(handle, status)}}}@@ -2192,16 +2364,16 @@ open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolRequesthrow InternalException("uniffiCloneHandle() called on NoHandle object");}return uniffiRustCall() { status ->- UniffiLib.uniffi_cyclops_sdk_fn_clone_createpoolrequestbuilder(handle, status)+ UniffiLib.uniffi_cyclops_sdk_fn_clone_createclaimrequestbuilder(handle, status)}}- @Throws(SdkBuildException::class)override fun `build`(): CreatePoolRequest {- return FfiConverterTypeCreatePoolRequest.lift(+ @Throws(SdkBuildException::class)override fun `build`(): CreateClaimRequest {+ return FfiConverterTypeCreateClaimRequest.lift(callWithHandle {uniffiRustCallWithError(SdkBuildException) { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_build(+ UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_build(it,_status)}@@ -2210,11 +2382,11 @@ open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolReques}- override fun `namespace`(`value`: kotlin.String): CreatePoolRequestBuilder {- return FfiConverterTypeCreatePoolRequestBuilder.lift(+ override fun `name`(`value`: kotlin.String): CreateClaimRequestBuilder {+ return FfiConverterTypeCreateClaimRequestBuilder.lift(callWithHandle {uniffiRustCall() { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_namespace(+ UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_name(it,FfiConverterString.lower(`value`),_status)}@@ -2223,13 +2395,26 @@ open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolReques}- override fun `spec`(`value`: OsGymSandboxWarmPoolSpec): CreatePoolRequestBuilder {- return FfiConverterTypeCreatePoolRequestBuilder.lift(+ override fun `pool`(`value`: Pool): CreateClaimRequestBuilder {+ return FfiConverterTypeCreateClaimRequestBuilder.lift(callWithHandle {uniffiRustCall() { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_spec(+ UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_pool(it,- FfiConverterTypeOSGymSandboxWarmPoolSpec.lower(`value`),_status)+ FfiConverterTypePool.lower(`value`),_status)+}+ }+ )+ }+++ override fun `spec`(`value`: ClaimSpec): CreateClaimRequestBuilder {+ return FfiConverterTypeCreateClaimRequestBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_spec(+ it,+ FfiConverterTypeClaimSpec.lower(`value`),_status)}})@@ -2254,22 +2439,22 @@ open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolReques/*** @suppress*/-public object FfiConverterTypeCreatePoolRequestBuilder: FfiConverter<CreatePoolRequestBuilder, Long> {- override fun lower(value: CreatePoolRequestBuilder): Long {+public object FfiConverterTypeCreateClaimRequestBuilder: FfiConverter<CreateClaimRequestBuilder, Long> {+ override fun lower(value: CreateClaimRequestBuilder): Long {return value.uniffiCloneHandle()}- override fun lift(value: Long): CreatePoolRequestBuilder {- return CreatePoolRequestBuilder(UniffiWithHandle, value)+ override fun lift(value: Long): CreateClaimRequestBuilder {+ return CreateClaimRequestBuilder(UniffiWithHandle, value)}- override fun read(buf: ByteBuffer): CreatePoolRequestBuilder {+ override fun read(buf: ByteBuffer): CreateClaimRequestBuilder {return lift(buf.getLong())}- override fun allocationSize(value: CreatePoolRequestBuilder) = 8UL+ override fun allocationSize(value: CreateClaimRequestBuilder) = 8UL- override fun write(value: CreatePoolRequestBuilder, buf: ByteBuffer) {+ override fun write(value: CreateClaimRequestBuilder, buf: ByteBuffer) {buf.putLong(lower(value))}}@@ -2370,20 +2555,18 @@ public object FfiConverterTypeCreatePoolRequestBuilder: FfiConverter<CreatePoolR//-public interface CreateTemplateRequestBuilderInterface {-- fun `build`(): CreateTemplateRequest+public interface CreatePoolRequestBuilderInterface {- fun `name`(`value`: kotlin.String): CreateTemplateRequestBuilder+ fun `build`(): CreatePoolRequest- fun `namespace`(`value`: kotlin.String): CreateTemplateRequestBuilder+ fun `namespace`(`value`: kotlin.String): CreatePoolRequestBuilder- fun `spec`(`value`: OsGymSandboxTemplateSpec): CreateTemplateRequestBuilder+ fun `spec`(`value`: OsGymSandboxWarmPoolSpec): CreatePoolRequestBuildercompanion object}-open class CreateTemplateRequestBuilder: Disposable, AutoCloseable, CreateTemplateRequestBuilderInterface+open class CreatePoolRequestBuilder: Disposable, AutoCloseable, CreatePoolRequestBuilderInterface{@Suppress("UNUSED_PARAMETER")@@ -2410,7 +2593,7 @@ open class CreateTemplateRequestBuilder: Disposable, AutoCloseable, CreateTemplaconstructor() :this(UniffiWithHandle,uniffiRustCall() { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_constructor_createtemplaterequestbuilder_new(+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_createpoolrequestbuilder_new(_status)}@@ -2470,7 +2653,7 @@ open class CreateTemplateRequestBuilder: Disposable, AutoCloseable, CreateTemplareturn;}uniffiRustCall { status ->- UniffiLib.uniffi_cyclops_sdk_fn_free_createtemplaterequestbuilder(handle, status)+ UniffiLib.uniffi_cyclops_sdk_fn_free_createpoolrequestbuilder(handle, status)}}}@@ -2483,16 +2666,16 @@ open class CreateTemplateRequestBuilder: Disposable, AutoCloseable, CreateTemplathrow InternalException("uniffiCloneHandle() called on NoHandle object");}return uniffiRustCall() { status ->- UniffiLib.uniffi_cyclops_sdk_fn_clone_createtemplaterequestbuilder(handle, status)+ UniffiLib.uniffi_cyclops_sdk_fn_clone_createpoolrequestbuilder(handle, status)}}- @Throws(SdkBuildException::class)override fun `build`(): CreateTemplateRequest {- return FfiConverterTypeCreateTemplateRequest.lift(+ @Throws(SdkBuildException::class)override fun `build`(): CreatePoolRequest {+ return FfiConverterTypeCreatePoolRequest.lift(callWithHandle {uniffiRustCallWithError(SdkBuildException) { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_build(+ UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_build(it,_status)}@@ -2501,24 +2684,11 @@ open class CreateTemplateRequestBuilder: Disposable, AutoCloseable, CreateTempla}- override fun `name`(`value`: kotlin.String): CreateTemplateRequestBuilder {- return FfiConverterTypeCreateTemplateRequestBuilder.lift(- callWithHandle {- uniffiRustCall() { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_name(- it,- FfiConverterString.lower(`value`),_status)-}- }- )- }--- override fun `namespace`(`value`: kotlin.String): CreateTemplateRequestBuilder {- return FfiConverterTypeCreateTemplateRequestBuilder.lift(+ override fun `namespace`(`value`: kotlin.String): CreatePoolRequestBuilder {+ return FfiConverterTypeCreatePoolRequestBuilder.lift(callWithHandle {uniffiRustCall() { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_namespace(+ UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_namespace(it,FfiConverterString.lower(`value`),_status)}@@ -2527,13 +2697,13 @@ open class CreateTemplateRequestBuilder: Disposable, AutoCloseable, CreateTempla}- override fun `spec`(`value`: OsGymSandboxTemplateSpec): CreateTemplateRequestBuilder {- return FfiConverterTypeCreateTemplateRequestBuilder.lift(+ override fun `spec`(`value`: OsGymSandboxWarmPoolSpec): CreatePoolRequestBuilder {+ return FfiConverterTypeCreatePoolRequestBuilder.lift(callWithHandle {uniffiRustCall() { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_spec(+ UniffiLib.uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_spec(it,- FfiConverterTypeOSGymSandboxTemplateSpec.lower(`value`),_status)+ FfiConverterTypeOSGymSandboxWarmPoolSpec.lower(`value`),_status)}})@@ -2558,22 +2728,22 @@ open class CreateTemplateRequestBuilder: Disposable, AutoCloseable, CreateTempla/*** @suppress*/-public object FfiConverterTypeCreateTemplateRequestBuilder: FfiConverter<CreateTemplateRequestBuilder, Long> {- override fun lower(value: CreateTemplateRequestBuilder): Long {+public object FfiConverterTypeCreatePoolRequestBuilder: FfiConverter<CreatePoolRequestBuilder, Long> {+ override fun lower(value: CreatePoolRequestBuilder): Long {return value.uniffiCloneHandle()}- override fun lift(value: Long): CreateTemplateRequestBuilder {- return CreateTemplateRequestBuilder(UniffiWithHandle, value)+ override fun lift(value: Long): CreatePoolRequestBuilder {+ return CreatePoolRequestBuilder(UniffiWithHandle, value)}- override fun read(buf: ByteBuffer): CreateTemplateRequestBuilder {+ override fun read(buf: ByteBuffer): CreatePoolRequestBuilder {return lift(buf.getLong())}- override fun allocationSize(value: CreateTemplateRequestBuilder) = 8UL+ override fun allocationSize(value: CreatePoolRequestBuilder) = 8UL- override fun write(value: CreateTemplateRequestBuilder, buf: ByteBuffer) {+ override fun write(value: CreatePoolRequestBuilder, buf: ByteBuffer) {buf.putLong(lower(value))}}@@ -2674,66 +2844,20 @@ public object FfiConverterTypeCreateTemplateRequestBuilder: FfiConverter<CreateT//-public interface CyclopsClientInterface {-- suspend fun `createClaim`(`request`: CreateClaimRequest): Claim-- suspend fun `deleteClaim`(`claim`: Claim)-- suspend fun `getClaim`(`claim`: Claim): Claim-- suspend fun `listClaims`(`namespace`: kotlin.String): List<Claim>-- /**- * Push the claim's `spec.lifecycle.shutdownTime` forward. That absolute- * expiry is the only liveness input the pool operator's claim reaper- * honors, so a holder that outlives its current lease must renew before- * the deadline passes or the bound sandbox is deleted underneath it.- * Deliberately narrower than a claim update: nothing else on the claim- * can be mutated through the SDK.- */- suspend fun `renewClaim`(`claim`: Claim, `shutdownTime`: kotlin.String): Claim-- suspend fun `waitClaim`(`claim`: Claim): Sandbox-- suspend fun `listNamespaces`(): List<Namespace>-- suspend fun `createPool`(`request`: CreatePoolRequest): Pool-- suspend fun `deletePool`(`pool`: Pool)-- suspend fun `getPool`(`name`: kotlin.String): Pool-- suspend fun `listPools`(`namespace`: kotlin.String): List<Pool>-- suspend fun `reconcilePool`(`request`: CreatePoolRequest): Pool-- suspend fun `updatePool`(`pool`: Pool): Pool-- suspend fun `serviceRequest`(`sandbox`: Sandbox, `service`: kotlin.String, `path`: kotlin.String, `request`: HttpRequest): HttpResponse-- suspend fun `createTemplate`(`request`: CreateTemplateRequest): Template-- suspend fun `deleteTemplate`(`template`: Template)-- suspend fun `getTemplate`(`namespace`: kotlin.String, `name`: kotlin.String): Template-- suspend fun `listTemplates`(`namespace`: kotlin.String): List<Template>-- suspend fun `reconcileTemplate`(`request`: CreateTemplateRequest): Template+public interface CreateTemplateRequestBuilderInterface {- suspend fun `updateTemplate`(`template`: Template): Template+ fun `build`(): CreateTemplateRequest- suspend fun `createUserApiKey`(`request`: CreateUserApiKeyRequest): NewUserApiKey+ fun `name`(`value`: kotlin.String): CreateTemplateRequestBuilder- suspend fun `deleteUserApiKey`(`id`: kotlin.String)+ fun `namespace`(`value`: kotlin.String): CreateTemplateRequestBuilder- suspend fun `listUserApiKeys`(): List<UserApiKey>+ fun `spec`(`value`: OsGymSandboxTemplateSpec): CreateTemplateRequestBuildercompanion object}-open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterface+open class CreateTemplateRequestBuilder: Disposable, AutoCloseable, CreateTemplateRequestBuilderInterface{@Suppress("UNUSED_PARAMETER")@@ -2757,8 +2881,16 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacethis.handle = 0this.cleanable = null}-- protected val handle: Long+ constructor() :+ this(UniffiWithHandle,+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_createtemplaterequestbuilder_new(++ _status)+}+ )++ protected val handle: Longprotected val cleanable: UniffiCleaner.Cleanable?private val wasDestroyed = AtomicBoolean(false)@@ -2812,7 +2944,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacereturn;}uniffiRustCall { status ->- UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopsclient(handle, status)+ UniffiLib.uniffi_cyclops_sdk_fn_free_createtemplaterequestbuilder(handle, status)}}}@@ -2825,237 +2957,1016 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacethrow InternalException("uniffiCloneHandle() called on NoHandle object");}return uniffiRustCall() { status ->- UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopsclient(handle, status)+ UniffiLib.uniffi_cyclops_sdk_fn_clone_createtemplaterequestbuilder(handle, status)}}- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `createClaim`(`request`: CreateClaimRequest) : Claim {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(- uniffiHandle,- FfiConverterTypeCreateClaimRequest.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- { FfiConverterTypeClaim.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,+ @Throws(SdkBuildException::class)override fun `build`(): CreateTemplateRequest {+ return FfiConverterTypeCreateTemplateRequest.lift(+ callWithHandle {+ uniffiRustCallWithError(SdkBuildException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_build(+ it,+ _status)+}+ })}- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `deleteClaim`(`claim`: Claim) {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(- uniffiHandle,- FfiConverterTypeClaim.lower(`claim`),- )- },- { 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,+ override fun `name`(`value`: kotlin.String): CreateTemplateRequestBuilder {+ return FfiConverterTypeCreateTemplateRequestBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_name(+ it,+ FfiConverterString.lower(`value`),_status)+}+ })}- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `getClaim`(`claim`: Claim) : Claim {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(- uniffiHandle,- FfiConverterTypeClaim.lower(`claim`),- )- },- { 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- { FfiConverterTypeClaim.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,+ override fun `namespace`(`value`: kotlin.String): CreateTemplateRequestBuilder {+ return FfiConverterTypeCreateTemplateRequestBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_namespace(+ it,+ FfiConverterString.lower(`value`),_status)+}+ })}- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `listClaims`(`namespace`: kotlin.String) : List<Claim> {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(- uniffiHandle,- FfiConverterString.lower(`namespace`),- )- },- { 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- { FfiConverterSequenceTypeClaim.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,+ override fun `spec`(`value`: OsGymSandboxTemplateSpec): CreateTemplateRequestBuilder {+ return FfiConverterTypeCreateTemplateRequestBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_spec(+ it,+ FfiConverterTypeOSGymSandboxTemplateSpec.lower(`value`),_status)+}+ })}- /**- * Push the claim's `spec.lifecycle.shutdownTime` forward. That absolute- * expiry is the only liveness input the pool operator's claim reaper- * honors, so a holder that outlives its current lease must renew before- * the deadline passes or the bound sandbox is deleted underneath it.- * Deliberately narrower than a claim update: nothing else on the claim- * can be mutated through the SDK.- */- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `renewClaim`(`claim`: Claim, `shutdownTime`: kotlin.String) : Claim {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_renew_claim(- uniffiHandle,- FfiConverterTypeClaim.lower(`claim`),FfiConverterString.lower(`shutdownTime`),- )- },- { 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- { FfiConverterTypeClaim.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )- }- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `waitClaim`(`claim`: Claim) : Sandbox {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(- uniffiHandle,- FfiConverterTypeClaim.lower(`claim`),- )- },- { 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- { FfiConverterTypeSandbox.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )- }- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `listNamespaces`() : List<Namespace> {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_namespaces(- uniffiHandle,- )- },- { 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- { FfiConverterSequenceTypeNamespace.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )- }- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `createPool`(`request`: CreatePoolRequest) : Pool {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(- uniffiHandle,- FfiConverterTypeCreatePoolRequest.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- { FfiConverterTypePool.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )- }+ /**+ * @suppress+ */+ companion object+}- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `deletePool`(`pool`: Pool) {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(- uniffiHandle,- FfiConverterTypePool.lower(`pool`),- )- },- { 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,- )+/**+ * @suppress+ */+public object FfiConverterTypeCreateTemplateRequestBuilder: FfiConverter<CreateTemplateRequestBuilder, Long> {+ override fun lower(value: CreateTemplateRequestBuilder): Long {+ return value.uniffiCloneHandle()}+ override fun lift(value: Long): CreateTemplateRequestBuilder {+ return CreateTemplateRequestBuilder(UniffiWithHandle, value)+ }- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `getPool`(`name`: kotlin.String) : Pool {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(- uniffiHandle,- FfiConverterString.lower(`name`),- )- },- { 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- { FfiConverterTypePool.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )+ override fun read(buf: ByteBuffer): CreateTemplateRequestBuilder {+ return lift(buf.getLong())}+ override fun allocationSize(value: CreateTemplateRequestBuilder) = 8UL- @Throws(SdkException::class)+ override fun write(value: CreateTemplateRequestBuilder, 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 CreateUserApiKeyRequestBuilderInterface {++ fun `build`(): CreateUserApiKeyRequest++ fun `name`(`value`: kotlin.String): CreateUserApiKeyRequestBuilder++ fun `scope`(`value`: List<kotlin.String>): CreateUserApiKeyRequestBuilder++ companion object+}++open class CreateUserApiKeyRequestBuilder: Disposable, AutoCloseable, CreateUserApiKeyRequestBuilderInterface+{++ @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_createuserapikeyrequestbuilder_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_createuserapikeyrequestbuilder(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_createuserapikeyrequestbuilder(handle, status)+ }+ }+++ @Throws(SdkBuildException::class)override fun `build`(): CreateUserApiKeyRequest {+ return FfiConverterTypeCreateUserApiKeyRequest.lift(+ callWithHandle {+ uniffiRustCallWithError(SdkBuildException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_build(+ it,+ _status)+}+ }+ )+ }+++ override fun `name`(`value`: kotlin.String): CreateUserApiKeyRequestBuilder {+ return FfiConverterTypeCreateUserApiKeyRequestBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_name(+ it,+ FfiConverterString.lower(`value`),_status)+}+ }+ )+ }+++ override fun `scope`(`value`: List<kotlin.String>): CreateUserApiKeyRequestBuilder {+ return FfiConverterTypeCreateUserApiKeyRequestBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_scope(+ it,+ FfiConverterSequenceString.lower(`value`),_status)+}+ }+ )+ }++++++++++ /**+ * @suppress+ */+ companion object++}+++/**+ * @suppress+ */+public object FfiConverterTypeCreateUserApiKeyRequestBuilder: FfiConverter<CreateUserApiKeyRequestBuilder, Long> {+ override fun lower(value: CreateUserApiKeyRequestBuilder): Long {+ return value.uniffiCloneHandle()+ }++ override fun lift(value: Long): CreateUserApiKeyRequestBuilder {+ return CreateUserApiKeyRequestBuilder(UniffiWithHandle, value)+ }++ override fun read(buf: ByteBuffer): CreateUserApiKeyRequestBuilder {+ return lift(buf.getLong())+ }++ override fun allocationSize(value: CreateUserApiKeyRequestBuilder) = 8UL++ override fun write(value: CreateUserApiKeyRequestBuilder, 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 CyclopsClientInterface {++ suspend fun `createClaim`(`request`: CreateClaimRequest): Claim++ suspend fun `deleteClaim`(`claim`: Claim)++ suspend fun `getClaim`(`claim`: Claim): Claim++ suspend fun `listClaims`(`namespace`: kotlin.String): List<Claim>++ /**+ * Push the claim's `spec.lifecycle.shutdownTime` forward. That absolute+ * expiry is the only liveness input the pool operator's claim reaper+ * honors, so a holder that outlives its current lease must renew before+ * the deadline passes or the bound sandbox is deleted underneath it.+ * Deliberately narrower than a claim update: nothing else on the claim+ * can be mutated through the SDK.+ */+ suspend fun `renewClaim`(`claim`: Claim, `shutdownTime`: kotlin.String): Claim++ suspend fun `waitClaim`(`claim`: Claim): Sandbox++ suspend fun `listNamespaces`(): List<Namespace>++ suspend fun `createPool`(`request`: CreatePoolRequest): Pool++ suspend fun `deletePool`(`pool`: Pool)++ suspend fun `getPool`(`name`: kotlin.String): Pool++ suspend fun `listPools`(`namespace`: kotlin.String): List<Pool>++ suspend fun `reconcilePool`(`request`: CreatePoolRequest): Pool++ suspend fun `updatePool`(`pool`: Pool): Pool++ suspend fun `serviceRequest`(`sandbox`: Sandbox, `service`: kotlin.String, `path`: kotlin.String, `request`: HttpRequest): HttpResponse++ suspend fun `createTemplate`(`request`: CreateTemplateRequest): Template++ suspend fun `deleteTemplate`(`template`: Template)++ suspend fun `getTemplate`(`namespace`: kotlin.String, `name`: kotlin.String): Template++ suspend fun `listTemplates`(`namespace`: kotlin.String): List<Template>++ suspend fun `reconcileTemplate`(`request`: CreateTemplateRequest): Template++ suspend fun `updateTemplate`(`template`: Template): Template++ suspend fun `createUserApiKey`(`request`: CreateUserApiKeyRequest): NewUserApiKey++ suspend fun `deleteUserApiKey`(`id`: kotlin.String)++ suspend fun `listUserApiKeys`(): List<UserApiKey>++ companion object+}++open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterface+{++ @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+ }++ 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_cyclopsclient(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_cyclopsclient(handle, status)+ }+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `createClaim`(`request`: CreateClaimRequest) : Claim {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(+ uniffiHandle,+ FfiConverterTypeCreateClaimRequest.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+ { FfiConverterTypeClaim.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `deleteClaim`(`claim`: Claim) {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(+ uniffiHandle,+ FfiConverterTypeClaim.lower(`claim`),+ )+ },+ { 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,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `getClaim`(`claim`: Claim) : Claim {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(+ uniffiHandle,+ FfiConverterTypeClaim.lower(`claim`),+ )+ },+ { 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+ { FfiConverterTypeClaim.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `listClaims`(`namespace`: kotlin.String) : List<Claim> {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(+ uniffiHandle,+ FfiConverterString.lower(`namespace`),+ )+ },+ { 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+ { FfiConverterSequenceTypeClaim.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ /**+ * Push the claim's `spec.lifecycle.shutdownTime` forward. That absolute+ * expiry is the only liveness input the pool operator's claim reaper+ * honors, so a holder that outlives its current lease must renew before+ * the deadline passes or the bound sandbox is deleted underneath it.+ * Deliberately narrower than a claim update: nothing else on the claim+ * can be mutated through the SDK.+ */+ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `renewClaim`(`claim`: Claim, `shutdownTime`: kotlin.String) : Claim {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_renew_claim(+ uniffiHandle,+ FfiConverterTypeClaim.lower(`claim`),FfiConverterString.lower(`shutdownTime`),+ )+ },+ { 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+ { FfiConverterTypeClaim.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `waitClaim`(`claim`: Claim) : Sandbox {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(+ uniffiHandle,+ FfiConverterTypeClaim.lower(`claim`),+ )+ },+ { 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+ { FfiConverterTypeSandbox.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `listNamespaces`() : List<Namespace> {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_namespaces(+ uniffiHandle,++ )+ },+ { 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+ { FfiConverterSequenceTypeNamespace.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `createPool`(`request`: CreatePoolRequest) : Pool {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(+ uniffiHandle,+ FfiConverterTypeCreatePoolRequest.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+ { FfiConverterTypePool.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `deletePool`(`pool`: Pool) {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(+ uniffiHandle,+ FfiConverterTypePool.lower(`pool`),+ )+ },+ { 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,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `getPool`(`name`: kotlin.String) : Pool {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(+ uniffiHandle,+ FfiConverterString.lower(`name`),+ )+ },+ { 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+ { FfiConverterTypePool.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `listPools`(`namespace`: kotlin.String) : List<Pool> {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(+ uniffiHandle,+ FfiConverterString.lower(`namespace`),+ )+ },+ { 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+ { FfiConverterSequenceTypePool.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `reconcilePool`(`request`: CreatePoolRequest) : Pool {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_reconcile_pool(+ uniffiHandle,+ FfiConverterTypeCreatePoolRequest.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+ { FfiConverterTypePool.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `updatePool`(`pool`: Pool) : Pool {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(+ uniffiHandle,+ FfiConverterTypePool.lower(`pool`),+ )+ },+ { 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+ { FfiConverterTypePool.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 {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(+ uniffiHandle,+ FfiConverterTypeSandbox.lower(`sandbox`),FfiConverterString.lower(`service`),FfiConverterString.lower(`path`),FfiConverterTypeHttpRequest.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+ { FfiConverterTypeHttpResponse.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `createTemplate`(`request`: CreateTemplateRequest) : Template {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_template(+ uniffiHandle,+ FfiConverterTypeCreateTemplateRequest.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+ { FfiConverterTypeTemplate.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `listPools`(`namespace`: kotlin.String) : List<Pool> {+ override suspend fun `deleteTemplate`(`template`: Template) {return uniffiRustCallAsync(callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_template(+ uniffiHandle,+ FfiConverterTypeTemplate.lower(`template`),+ )+ },+ { 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,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `getTemplate`(`namespace`: kotlin.String, `name`: kotlin.String) : Template {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_template(+ uniffiHandle,+ FfiConverterString.lower(`namespace`),FfiConverterString.lower(`name`),+ )+ },+ { 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+ { FfiConverterTypeTemplate.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `listTemplates`(`namespace`: kotlin.String) : List<Template> {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_templates(uniffiHandle,FfiConverterString.lower(`namespace`),)@@ -3064,359 +3975,788 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterface{ 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- { FfiConverterSequenceTypePool.lift(it) },+ { FfiConverterSequenceTypeTemplate.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `reconcileTemplate`(`request`: CreateTemplateRequest) : Template {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_reconcile_template(+ uniffiHandle,+ FfiConverterTypeCreateTemplateRequest.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+ { FfiConverterTypeTemplate.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `updateTemplate`(`template`: Template) : Template {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_template(+ uniffiHandle,+ FfiConverterTypeTemplate.lower(`template`),+ )+ },+ { 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+ { FfiConverterTypeTemplate.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `createUserApiKey`(`request`: CreateUserApiKeyRequest) : NewUserApiKey {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_user_api_key(+ uniffiHandle,+ FfiConverterTypeCreateUserApiKeyRequest.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+ { FfiConverterTypeNewUserApiKey.lift(it) },+ // Error FFI converter+ SdkException.ErrorHandler,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `deleteUserApiKey`(`id`: kotlin.String) {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_user_api_key(+ uniffiHandle,+ FfiConverterString.lower(`id`),+ )+ },+ { 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,+ )+ }+++ @Throws(SdkException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `listUserApiKeys`() : List<UserApiKey> {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_user_api_keys(+ uniffiHandle,++ )+ },+ { 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+ { FfiConverterSequenceTypeUserApiKey.lift(it) },// Error FFI converterSdkException.ErrorHandler,)}- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `reconcilePool`(`request`: CreatePoolRequest) : Pool {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_reconcile_pool(- uniffiHandle,- FfiConverterTypeCreatePoolRequest.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- { FfiConverterTypePool.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )++++++ companion object {++ @Throws(SdkException::class) fun `connect`(`configuration`: CyclopsConfiguration, `httpClient`: HttpClient): CyclopsClient {+ return FfiConverterTypeCyclopsClient.lift(+ uniffiRustCallWithError(SdkException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(++ FfiConverterTypeCyclopsConfiguration.lower(`configuration`),FfiConverterTypeHttpClient.lower(`httpClient`),_status)+}+ )+ }++++ @Throws(SdkException::class) fun `connectBrowserWithAccessToken`(`configuration`: CyclopsTokenProviderConfiguration, `accessToken`: kotlin.String): CyclopsClient {+ return FfiConverterTypeCyclopsClient.lift(+ uniffiRustCallWithError(SdkException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_browser_with_access_token(++ FfiConverterTypeCyclopsTokenProviderConfiguration.lower(`configuration`),FfiConverterString.lower(`accessToken`),_status)+}+ )+ }++++ @Throws(SdkException::class) fun `connectWithAccessToken`(`configuration`: CyclopsTokenProviderConfiguration, `accessToken`: kotlin.String, `httpClient`: HttpClient): CyclopsClient {+ return FfiConverterTypeCyclopsClient.lift(+ uniffiRustCallWithError(SdkException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_access_token(++ FfiConverterTypeCyclopsTokenProviderConfiguration.lower(`configuration`),FfiConverterString.lower(`accessToken`),FfiConverterTypeHttpClient.lower(`httpClient`),_status)+}+ )+ }++++ @Throws(SdkException::class) fun `connectWithAccessTokenAndNativeHttpClient`(`configuration`: CyclopsTokenProviderConfiguration, `accessToken`: kotlin.String): CyclopsClient {+ return FfiConverterTypeCyclopsClient.lift(+ uniffiRustCallWithError(SdkException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_access_token_and_native_http_client(++ FfiConverterTypeCyclopsTokenProviderConfiguration.lower(`configuration`),FfiConverterString.lower(`accessToken`),_status)+}+ )+ }++++ @Throws(SdkException::class) fun `connectWithAccessTokenProvider`(`configuration`: CyclopsTokenProviderConfiguration, `tokenProvider`: AccessTokenProvider, `httpClient`: HttpClient): CyclopsClient {+ return FfiConverterTypeCyclopsClient.lift(+ uniffiRustCallWithError(SdkException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_access_token_provider(++ FfiConverterTypeCyclopsTokenProviderConfiguration.lower(`configuration`),FfiConverterTypeAccessTokenProvider.lower(`tokenProvider`),FfiConverterTypeHttpClient.lower(`httpClient`),_status)+}+ )+ }++++ @Throws(SdkException::class) fun `connectWithAccessTokenProviderAndNativeHttpClient`(`configuration`: CyclopsTokenProviderConfiguration, `tokenProvider`: AccessTokenProvider): CyclopsClient {+ return FfiConverterTypeCyclopsClient.lift(+ uniffiRustCallWithError(SdkException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_access_token_provider_and_native_http_client(++ FfiConverterTypeCyclopsTokenProviderConfiguration.lower(`configuration`),FfiConverterTypeAccessTokenProvider.lower(`tokenProvider`),_status)+}+ )+ }++++ @Throws(SdkException::class) fun `connectWithNativeHttpClient`(`configuration`: CyclopsConfiguration): CyclopsClient {+ return FfiConverterTypeCyclopsClient.lift(+ uniffiRustCallWithError(SdkException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_native_http_client(++ FfiConverterTypeCyclopsConfiguration.lower(`configuration`),_status)+}+ )+ }++++ }++}+++/**+ * @suppress+ */+public object FfiConverterTypeCyclopsClient: FfiConverter<CyclopsClient, Long> {+ override fun lower(value: CyclopsClient): Long {+ return value.uniffiCloneHandle()+ }++ override fun lift(value: Long): CyclopsClient {+ return CyclopsClient(UniffiWithHandle, value)+ }++ override fun read(buf: ByteBuffer): CyclopsClient {+ return lift(buf.getLong())}+ override fun allocationSize(value: CyclopsClient) = 8UL- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `updatePool`(`pool`: Pool) : Pool {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(- uniffiHandle,- FfiConverterTypePool.lower(`pool`),- )- },- { 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- { FfiConverterTypePool.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )+ override fun write(value: CyclopsClient, buf: ByteBuffer) {+ buf.putLong(lower(value))}+}- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `serviceRequest`(`sandbox`: Sandbox, `service`: kotlin.String, `path`: kotlin.String, `request`: HttpRequest) : HttpResponse {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(- uniffiHandle,- FfiConverterTypeSandbox.lower(`sandbox`),FfiConverterString.lower(`service`),FfiConverterString.lower(`path`),FfiConverterTypeHttpRequest.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- { FfiConverterTypeHttpResponse.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,+// 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 CyclopsCredentialsInterface {++ companion object+}++open class CyclopsCredentials: Disposable, AutoCloseable, CyclopsCredentialsInterface+{++ @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(`clientId`: kotlin.String, `clientSecret`: kotlin.String) :+ this(UniffiWithHandle,+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(++ FfiConverterString.lower(`clientId`),FfiConverterString.lower(`clientSecret`),_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_cyclopscredentials(handle, status)+ }+ }}-- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `createTemplate`(`request`: CreateTemplateRequest) : Template {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_template(- uniffiHandle,- FfiConverterTypeCreateTemplateRequest.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- { FfiConverterTypeTemplate.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )+ /**+ * @suppress+ */+ fun uniffiCloneHandle(): Long {+ if (handle == 0.toLong()) {+ throw InternalException("uniffiCloneHandle() called on NoHandle object");+ }+ return uniffiRustCall() { status ->+ UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopscredentials(handle, status)+ }}- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `deleteTemplate`(`template`: Template) {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_template(- uniffiHandle,- FfiConverterTypeTemplate.lower(`template`),- )- },- { 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,- )- }- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `getTemplate`(`namespace`: kotlin.String, `name`: kotlin.String) : Template {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_template(- uniffiHandle,- FfiConverterString.lower(`namespace`),FfiConverterString.lower(`name`),- )- },- { 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- { FfiConverterTypeTemplate.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )- }- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `listTemplates`(`namespace`: kotlin.String) : List<Template> {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_templates(- uniffiHandle,- FfiConverterString.lower(`namespace`),- )- },- { 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- { FfiConverterSequenceTypeTemplate.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )- }+ /**+ * @suppress+ */+ companion object- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `reconcileTemplate`(`request`: CreateTemplateRequest) : Template {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_reconcile_template(- uniffiHandle,- FfiConverterTypeCreateTemplateRequest.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- { FfiConverterTypeTemplate.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )+}+++/**+ * @suppress+ */+public object FfiConverterTypeCyclopsCredentials: FfiConverter<CyclopsCredentials, Long> {+ override fun lower(value: CyclopsCredentials): Long {+ return value.uniffiCloneHandle()}+ override fun lift(value: Long): CyclopsCredentials {+ return CyclopsCredentials(UniffiWithHandle, value)+ }- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `updateTemplate`(`template`: Template) : Template {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_template(- uniffiHandle,- FfiConverterTypeTemplate.lower(`template`),- )- },- { 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- { FfiConverterTypeTemplate.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )+ override fun read(buf: ByteBuffer): CyclopsCredentials {+ return lift(buf.getLong())}+ override fun allocationSize(value: CyclopsCredentials) = 8UL- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `createUserApiKey`(`request`: CreateUserApiKeyRequest) : NewUserApiKey {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_user_api_key(- uniffiHandle,- FfiConverterTypeCreateUserApiKeyRequest.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- { FfiConverterTypeNewUserApiKey.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )+ override fun write(value: CyclopsCredentials, buf: ByteBuffer) {+ buf.putLong(lower(value))}+}- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `deleteUserApiKey`(`id`: kotlin.String) {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_user_api_key(- uniffiHandle,- FfiConverterString.lower(`id`),- )- },- { 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 },+// 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+//- // Error FFI converter- SdkException.ErrorHandler,- )- }+public interface CyclopsTokenProviderConfigurationBuilderInterface {- @Throws(SdkException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `listUserApiKeys`() : List<UserApiKey> {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_user_api_keys(- uniffiHandle,+ fun `baseUrl`(`value`: kotlin.String): CyclopsTokenProviderConfigurationBuilder- )- },- { 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- { FfiConverterSequenceTypeUserApiKey.lift(it) },- // Error FFI converter- SdkException.ErrorHandler,- )- }+ fun `build`(): CyclopsTokenProviderConfiguration+ fun `claimPollIntervalMs`(`value`: kotlin.ULong): CyclopsTokenProviderConfigurationBuilder+ fun `claimPollLimit`(`value`: kotlin.UInt): CyclopsTokenProviderConfigurationBuilder+ fun `poolPollIntervalMs`(`value`: kotlin.ULong): CyclopsTokenProviderConfigurationBuilder+ fun `poolPollLimit`(`value`: kotlin.UInt): CyclopsTokenProviderConfigurationBuilder+ companion object+}+open class CyclopsTokenProviderConfigurationBuilder: Disposable, AutoCloseable, CyclopsTokenProviderConfigurationBuilderInterface+{- companion object {+ @Suppress("UNUSED_PARAMETER")+ /**+ * @suppress+ */+ constructor(withHandle: UniffiWithHandle, handle: Long) {+ this.handle = handle+ this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle))+ }- @Throws(SdkException::class) fun `connect`(`configuration`: CyclopsConfiguration, `httpClient`: HttpClient): CyclopsClient {- return FfiConverterTypeCyclopsClient.lift(- uniffiRustCallWithError(SdkException) { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(+ /**+ * @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_cyclopstokenproviderconfigurationbuilder_new(- FfiConverterTypeCyclopsConfiguration.lower(`configuration`),FfiConverterTypeHttpClient.lower(`httpClient`),_status)+ _status)})- }+ protected val handle: Long+ protected val cleanable: UniffiCleaner.Cleanable?+ private val wasDestroyed = AtomicBoolean(false)+ private val callCounter = AtomicLong(1)- @Throws(SdkException::class) fun `connectBrowserWithAccessToken`(`configuration`: CyclopsTokenProviderConfiguration, `accessToken`: kotlin.String): CyclopsClient {- return FfiConverterTypeCyclopsClient.lift(- uniffiRustCallWithError(SdkException) { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_browser_with_access_token(+ 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()+ }+ }+ }- FfiConverterTypeCyclopsTokenProviderConfiguration.lower(`configuration`),FfiConverterString.lower(`accessToken`),_status)-}- )+ @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_cyclopstokenproviderconfigurationbuilder(handle, status)+ }+ }+ }- @Throws(SdkException::class) fun `connectWithAccessToken`(`configuration`: CyclopsTokenProviderConfiguration, `accessToken`: kotlin.String, `httpClient`: HttpClient): CyclopsClient {- return FfiConverterTypeCyclopsClient.lift(- uniffiRustCallWithError(SdkException) { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_access_token(+ /**+ * @suppress+ */+ fun uniffiCloneHandle(): Long {+ if (handle == 0.toLong()) {+ throw InternalException("uniffiCloneHandle() called on NoHandle object");+ }+ return uniffiRustCall() { status ->+ UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopstokenproviderconfigurationbuilder(handle, status)+ }+ }- FfiConverterTypeCyclopsTokenProviderConfiguration.lower(`configuration`),FfiConverterString.lower(`accessToken`),FfiConverterTypeHttpClient.lower(`httpClient`),_status)+ override fun `baseUrl`(`value`: kotlin.String): CyclopsTokenProviderConfigurationBuilder {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_base_url(+ it,+ FfiConverterString.lower(`value`),_status)}+ })}- @Throws(SdkException::class) fun `connectWithAccessTokenAndNativeHttpClient`(`configuration`: CyclopsTokenProviderConfiguration, `accessToken`: kotlin.String): CyclopsClient {- return FfiConverterTypeCyclopsClient.lift(- uniffiRustCallWithError(SdkException) { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_access_token_and_native_http_client(-- FfiConverterTypeCyclopsTokenProviderConfiguration.lower(`configuration`),FfiConverterString.lower(`accessToken`),_status)+ @Throws(SdkBuildException::class)override fun `build`(): CyclopsTokenProviderConfiguration {+ return FfiConverterTypeCyclopsTokenProviderConfiguration.lift(+ callWithHandle {+ uniffiRustCallWithError(SdkBuildException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_build(+ it,+ _status)}+ })}+ override fun `claimPollIntervalMs`(`value`: kotlin.ULong): CyclopsTokenProviderConfigurationBuilder {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms(+ it,+ FfiConverterULong.lower(`value`),_status)+}+ }+ )+ }- @Throws(SdkException::class) fun `connectWithAccessTokenProvider`(`configuration`: CyclopsTokenProviderConfiguration, `tokenProvider`: AccessTokenProvider, `httpClient`: HttpClient): CyclopsClient {- return FfiConverterTypeCyclopsClient.lift(- uniffiRustCallWithError(SdkException) { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_access_token_provider(- FfiConverterTypeCyclopsTokenProviderConfiguration.lower(`configuration`),FfiConverterTypeAccessTokenProvider.lower(`tokenProvider`),FfiConverterTypeHttpClient.lower(`httpClient`),_status)+ override fun `claimPollLimit`(`value`: kotlin.UInt): CyclopsTokenProviderConfigurationBuilder {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit(+ it,+ FfiConverterUInt.lower(`value`),_status)}+ })}+ override fun `poolPollIntervalMs`(`value`: kotlin.ULong): CyclopsTokenProviderConfigurationBuilder {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms(+ it,+ FfiConverterULong.lower(`value`),_status)+}+ }+ )+ }- @Throws(SdkException::class) fun `connectWithAccessTokenProviderAndNativeHttpClient`(`configuration`: CyclopsTokenProviderConfiguration, `tokenProvider`: AccessTokenProvider): CyclopsClient {- return FfiConverterTypeCyclopsClient.lift(- uniffiRustCallWithError(SdkException) { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_access_token_provider_and_native_http_client(- FfiConverterTypeCyclopsTokenProviderConfiguration.lower(`configuration`),FfiConverterTypeAccessTokenProvider.lower(`tokenProvider`),_status)+ override fun `poolPollLimit`(`value`: kotlin.UInt): CyclopsTokenProviderConfigurationBuilder {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit(+ it,+ FfiConverterUInt.lower(`value`),_status)}+ })}- @Throws(SdkException::class) fun `connectWithNativeHttpClient`(`configuration`: CyclopsConfiguration): CyclopsClient {- return FfiConverterTypeCyclopsClient.lift(- uniffiRustCallWithError(SdkException) { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_native_http_client(- FfiConverterTypeCyclopsConfiguration.lower(`configuration`),_status)-}- )- }- }+++ /**+ * @suppress+ */+ companion object}@@ -3424,22 +4764,22 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterface/*** @suppress*/-public object FfiConverterTypeCyclopsClient: FfiConverter<CyclopsClient, Long> {- override fun lower(value: CyclopsClient): Long {+public object FfiConverterTypeCyclopsTokenProviderConfigurationBuilder: FfiConverter<CyclopsTokenProviderConfigurationBuilder, Long> {+ override fun lower(value: CyclopsTokenProviderConfigurationBuilder): Long {return value.uniffiCloneHandle()}- override fun lift(value: Long): CyclopsClient {- return CyclopsClient(UniffiWithHandle, value)+ override fun lift(value: Long): CyclopsTokenProviderConfigurationBuilder {+ return CyclopsTokenProviderConfigurationBuilder(UniffiWithHandle, value)}- override fun read(buf: ByteBuffer): CyclopsClient {+ override fun read(buf: ByteBuffer): CyclopsTokenProviderConfigurationBuilder {return lift(buf.getLong())}- override fun allocationSize(value: CyclopsClient) = 8UL+ override fun allocationSize(value: CyclopsTokenProviderConfigurationBuilder) = 8UL- override fun write(value: CyclopsClient, buf: ByteBuffer) {+ override fun write(value: CyclopsTokenProviderConfigurationBuilder, buf: ByteBuffer) {buf.putLong(lower(value))}}@@ -3540,12 +4880,14 @@ public object FfiConverterTypeCyclopsClient: FfiConverter<CyclopsClient, Long> {//-public interface CyclopsCredentialsInterface {+public interface HttpClient {++ suspend fun `execute`(`request`: HttpRequest): HttpResponsecompanion object}-open class CyclopsCredentials: Disposable, AutoCloseable, CyclopsCredentialsInterface+open class HttpClientImpl: Disposable, AutoCloseable, HttpClient{@Suppress("UNUSED_PARAMETER")@@ -3569,14 +4911,6 @@ open class CyclopsCredentials: Disposable, AutoCloseable, CyclopsCredentialsIntethis.handle = 0this.cleanable = null}- constructor(`clientId`: kotlin.String, `clientSecret`: kotlin.String) :- this(UniffiWithHandle,- uniffiRustCall() { _status ->- UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(-- FfiConverterString.lower(`clientId`),FfiConverterString.lower(`clientSecret`),_status)-}- )protected val handle: Longprotected val cleanable: UniffiCleaner.Cleanable?@@ -3632,7 +4966,7 @@ open class CyclopsCredentials: Disposable, AutoCloseable, CyclopsCredentialsIntereturn;}uniffiRustCall { status ->- UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopscredentials(handle, status)+ UniffiLib.uniffi_cyclops_sdk_fn_free_httpclient(handle, status)}}}@@ -3645,11 +4979,32 @@ open class CyclopsCredentials: Disposable, AutoCloseable, CyclopsCredentialsIntethrow InternalException("uniffiCloneHandle() called on NoHandle object");}return uniffiRustCall() { status ->- UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopscredentials(handle, status)+ UniffiLib.uniffi_cyclops_sdk_fn_clone_httpclient(handle, status)}}+ @Throws(HttpException::class)+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")+ override suspend fun `execute`(`request`: HttpRequest) : HttpResponse {+ return uniffiRustCallAsync(+ callWithHandle { uniffiHandle ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_httpclient_execute(+ uniffiHandle,+ FfiConverterTypeHttpRequest.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+ { FfiConverterTypeHttpResponse.lift(it) },+ // Error FFI converter+ HttpException.ErrorHandler,+ )+ }++@@ -3664,25 +5019,103 @@ open class CyclopsCredentials: Disposable, AutoCloseable, CyclopsCredentialsInte}++// Put the implementation in an object so we don't pollute the top-level namespace+internal object uniffiCallbackInterfaceHttpClient {+ internal object `execute`: UniffiCallbackInterfaceHttpClientMethod0 {+ override fun callback(`uniffiHandle`: Long,`request`: RustBuffer.ByValue,`uniffiFutureCallback`: UniffiForeignFutureCompleteRustBuffer,`uniffiCallbackData`: Long,`uniffiOutDroppedCallback`: UniffiForeignFutureDroppedCallbackStruct,) {+ val uniffiObj = FfiConverterTypeHttpClient.handleMap.get(uniffiHandle)+ val makeCall = suspend { ->+ uniffiObj.`execute`(+ FfiConverterTypeHttpRequest.lift(`request`),+ )+ }+ val uniffiHandleSuccess = { returnValue: HttpResponse ->+ val uniffiResult = UniffiForeignFutureResultRustBuffer.UniffiByValue(+ FfiConverterTypeHttpResponse.lower(returnValue),+ UniffiRustCallStatus.ByValue()+ )+ uniffiResult.write()+ uniffiFutureCallback.callback(uniffiCallbackData, uniffiResult)+ }+ val uniffiHandleError = { callStatus: UniffiRustCallStatus.ByValue ->+ uniffiFutureCallback.callback(+ uniffiCallbackData,+ UniffiForeignFutureResultRustBuffer.UniffiByValue(+ RustBuffer.ByValue(),+ callStatus,+ ),+ )+ }+ uniffiTraitInterfaceCallAsyncWithError(+ makeCall,+ uniffiHandleSuccess,+ uniffiHandleError,+ { e: HttpException -> FfiConverterTypeHttpError.lower(e) },+ uniffiOutDroppedCallback+ )+ }+ }++ internal object uniffiFree: UniffiCallbackInterfaceFree {+ override fun callback(handle: Long) {+ FfiConverterTypeHttpClient.handleMap.remove(handle)+ }+ }++ internal object uniffiClone: UniffiCallbackInterfaceClone {+ override fun callback(handle: Long): Long {+ return FfiConverterTypeHttpClient.handleMap.clone(handle)+ }+ }++ internal var vtable = UniffiVTableCallbackInterfaceHttpClient.UniffiByValue(+ uniffiFree,+ uniffiClone,+ `execute`,+ )++ // Registers the foreign callback with the Rust side.+ // This method is generated for each callback interface.+ internal fun register(lib: UniffiLib) {+ lib.uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(vtable)+ }+}+/*** @suppress*/-public object FfiConverterTypeCyclopsCredentials: FfiConverter<CyclopsCredentials, Long> {- override fun lower(value: CyclopsCredentials): Long {- return value.uniffiCloneHandle()+public object FfiConverterTypeHttpClient: FfiConverter<HttpClient, Long> {+ internal val handleMap = UniffiHandleMap<HttpClient>()++ override fun lower(value: HttpClient): Long {+ if (value is HttpClientImpl) {+ // Rust-implemented object. Clone the handle and return it+ return value.uniffiCloneHandle()+ } else {+ // Kotlin object, generate a new vtable handle and return that.+ return handleMap.insert(value)+ }}- override fun lift(value: Long): CyclopsCredentials {- return CyclopsCredentials(UniffiWithHandle, value)+ override fun lift(value: Long): HttpClient {+ if ((value and 1.toLong()) == 0.toLong()) {+ // Rust-generated handle, construct a new class that uses the handle to implement the+ // interface+ return HttpClientImpl(UniffiWithHandle, value)+ } else {+ // Kotlin-generated handle, get the object from the handle map+ return handleMap.remove(value)+ }}- override fun read(buf: ByteBuffer): CyclopsCredentials {+ override fun read(buf: ByteBuffer): HttpClient {return lift(buf.getLong())}- override fun allocationSize(value: CyclopsCredentials) = 8UL+ override fun allocationSize(value: HttpClient) = 8UL- override fun write(value: CyclopsCredentials, buf: ByteBuffer) {+ override fun write(value: HttpClient, buf: ByteBuffer) {buf.putLong(lower(value))}}@@ -3783,14 +5216,22 @@ public object FfiConverterTypeCyclopsCredentials: FfiConverter<CyclopsCredential//-public interface HttpClient {+public interface TemplateBuilderInterface {- suspend fun `execute`(`request`: HttpRequest): HttpResponse+ fun `apiVersion`(`value`: kotlin.String): TemplateBuilder++ fun `build`(): Template++ fun `kind`(`value`: kotlin.String): TemplateBuilder++ fun `metadata`(`value`: ResourceMetadata): TemplateBuilder++ fun `spec`(`value`: OsGymSandboxTemplateSpec): TemplateBuildercompanion object}-open class HttpClientImpl: Disposable, AutoCloseable, HttpClient+open class TemplateBuilder: Disposable, AutoCloseable, TemplateBuilderInterface{@Suppress("UNUSED_PARAMETER")@@ -3814,6 +5255,14 @@ open class HttpClientImpl: Disposable, AutoCloseable, HttpClientthis.handle = 0this.cleanable = null}+ constructor() :+ this(UniffiWithHandle,+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_constructor_templatebuilder_new(++ _status)+}+ )protected val handle: Longprotected val cleanable: UniffiCleaner.Cleanable?@@ -3869,7 +5318,7 @@ open class HttpClientImpl: Disposable, AutoCloseable, HttpClientreturn;}uniffiRustCall { status ->- UniffiLib.uniffi_cyclops_sdk_fn_free_httpclient(handle, status)+ UniffiLib.uniffi_cyclops_sdk_fn_free_templatebuilder(handle, status)}}}@@ -3882,143 +5331,110 @@ open class HttpClientImpl: Disposable, AutoCloseable, HttpClientthrow InternalException("uniffiCloneHandle() called on NoHandle object");}return uniffiRustCall() { status ->- UniffiLib.uniffi_cyclops_sdk_fn_clone_httpclient(handle, status)+ UniffiLib.uniffi_cyclops_sdk_fn_clone_templatebuilder(handle, status)}}-- @Throws(HttpException::class)- @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")- override suspend fun `execute`(`request`: HttpRequest) : HttpResponse {- return uniffiRustCallAsync(- callWithHandle { uniffiHandle ->- UniffiLib.uniffi_cyclops_sdk_fn_method_httpclient_execute(- uniffiHandle,- FfiConverterTypeHttpRequest.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- { FfiConverterTypeHttpResponse.lift(it) },- // Error FFI converter- HttpException.ErrorHandler,+ override fun `apiVersion`(`value`: kotlin.String): TemplateBuilder {+ return FfiConverterTypeTemplateBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_api_version(+ it,+ FfiConverterString.lower(`value`),_status)+}+ })}+ @Throws(SdkBuildException::class)override fun `build`(): Template {+ return FfiConverterTypeTemplate.lift(+ callWithHandle {+ uniffiRustCallWithError(SdkBuildException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_build(+ it,+ _status)+}+ }+ )+ }+ override fun `kind`(`value`: kotlin.String): TemplateBuilder {+ return FfiConverterTypeTemplateBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_kind(+ it,+ FfiConverterString.lower(`value`),_status)+}+ }+ )+ }+ override fun `metadata`(`value`: ResourceMetadata): TemplateBuilder {+ return FfiConverterTypeTemplateBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_metadata(+ it,+ FfiConverterTypeResourceMetadata.lower(`value`),_status)+}+ }+ )+ }- /**- * @suppress- */- companion object+ override fun `spec`(`value`: OsGymSandboxTemplateSpec): TemplateBuilder {+ return FfiConverterTypeTemplateBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_spec(+ it,+ FfiConverterTypeOSGymSandboxTemplateSpec.lower(`value`),_status)}+ }+ )+ }-// Put the implementation in an object so we don't pollute the top-level namespace-internal object uniffiCallbackInterfaceHttpClient {- internal object `execute`: UniffiCallbackInterfaceHttpClientMethod0 {- override fun callback(`uniffiHandle`: Long,`request`: RustBuffer.ByValue,`uniffiFutureCallback`: UniffiForeignFutureCompleteRustBuffer,`uniffiCallbackData`: Long,`uniffiOutDroppedCallback`: UniffiForeignFutureDroppedCallbackStruct,) {- val uniffiObj = FfiConverterTypeHttpClient.handleMap.get(uniffiHandle)- val makeCall = suspend { ->- uniffiObj.`execute`(- FfiConverterTypeHttpRequest.lift(`request`),- )- }- val uniffiHandleSuccess = { returnValue: HttpResponse ->- val uniffiResult = UniffiForeignFutureResultRustBuffer.UniffiByValue(- FfiConverterTypeHttpResponse.lower(returnValue),- UniffiRustCallStatus.ByValue()- )- uniffiResult.write()- uniffiFutureCallback.callback(uniffiCallbackData, uniffiResult)- }- val uniffiHandleError = { callStatus: UniffiRustCallStatus.ByValue ->- uniffiFutureCallback.callback(- uniffiCallbackData,- UniffiForeignFutureResultRustBuffer.UniffiByValue(- RustBuffer.ByValue(),- callStatus,- ),- )- }- uniffiTraitInterfaceCallAsyncWithError(- makeCall,- uniffiHandleSuccess,- uniffiHandleError,- { e: HttpException -> FfiConverterTypeHttpError.lower(e) },- uniffiOutDroppedCallback- )- }- }- internal object uniffiFree: UniffiCallbackInterfaceFree {- override fun callback(handle: Long) {- FfiConverterTypeHttpClient.handleMap.remove(handle)- }- }- internal object uniffiClone: UniffiCallbackInterfaceClone {- override fun callback(handle: Long): Long {- return FfiConverterTypeHttpClient.handleMap.clone(handle)- }- }- internal var vtable = UniffiVTableCallbackInterfaceHttpClient.UniffiByValue(- uniffiFree,- uniffiClone,- `execute`,- )- // Registers the foreign callback with the Rust side.- // This method is generated for each callback interface.- internal fun register(lib: UniffiLib) {- lib.uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(vtable)- }+++ /**+ * @suppress+ */+ companion object+}+/*** @suppress*/-public object FfiConverterTypeHttpClient: FfiConverter<HttpClient, Long> {- internal val handleMap = UniffiHandleMap<HttpClient>()-- override fun lower(value: HttpClient): Long {- if (value is HttpClientImpl) {- // Rust-implemented object. Clone the handle and return it- return value.uniffiCloneHandle()- } else {- // Kotlin object, generate a new vtable handle and return that.- return handleMap.insert(value)- }+public object FfiConverterTypeTemplateBuilder: FfiConverter<TemplateBuilder, Long> {+ override fun lower(value: TemplateBuilder): Long {+ return value.uniffiCloneHandle()}- override fun lift(value: Long): HttpClient {- if ((value and 1.toLong()) == 0.toLong()) {- // Rust-generated handle, construct a new class that uses the handle to implement the- // interface- return HttpClientImpl(UniffiWithHandle, value)- } else {- // Kotlin-generated handle, get the object from the handle map- return handleMap.remove(value)- }+ override fun lift(value: Long): TemplateBuilder {+ return TemplateBuilder(UniffiWithHandle, value)}- override fun read(buf: ByteBuffer): HttpClient {+ override fun read(buf: ByteBuffer): TemplateBuilder {return lift(buf.getLong())}- override fun allocationSize(value: HttpClient) = 8UL+ override fun allocationSize(value: TemplateBuilder) = 8UL- override fun write(value: HttpClient, buf: ByteBuffer) {+ override fun write(value: TemplateBuilder, buf: ByteBuffer) {buf.putLong(lower(value))}}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 1f2d68e873..fb649e67ea 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@@ -692,6 +692,14 @@ internal object IntegrityCheckingUniffiLib {): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref(): Short+ external fun uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build(+ ): Short+ external fun uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size(+ ): Short+ external fun uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size(+ ): Short+ external fun uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size(+ ): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_constructor_sandboxservicebuilder_new(): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_constructor_sandboxtemplaterefbuilder_new(@@ -704,6 +712,8 @@ internal object IntegrityCheckingUniffiLib {): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxwarmpoolspecbuilder_new(): Short+ external fun uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new(+ ): Shortexternal fun ffi_cyclops_sdk_schema_uniffi_contract_version(): Int@@ -814,6 +824,20 @@ external fun uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder): Longexternal fun uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref(`ptr`: Long,`value`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,): Long+external fun uniffi_cyclops_sdk_schema_fn_clone_warmpoolautoscalingbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_schema_fn_free_warmpoolautoscalingbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,+): Unit+external fun uniffi_cyclops_sdk_schema_fn_constructor_warmpoolautoscalingbuilder_new(uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,+): RustBuffer.ByValue+external fun uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size(`ptr`: Long,`value`: Int,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size(`ptr`: Long,`value`: Int,uniffi_out_err: UniffiRustCallStatus,+): Long+external fun uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size(`ptr`: Long,`value`: Int,uniffi_out_err: UniffiRustCallStatus,+): Longexternal fun ffi_cyclops_sdk_schema_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus,): RustBuffer.ByValueexternal fun ffi_cyclops_sdk_schema_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus,@@ -1017,6 +1041,18 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref() != 7198.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build() != 17132.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size() != 56913.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size() != 18359.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }+ if (lib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size() != 46153.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }if (lib.uniffi_cyclops_sdk_schema_checksum_constructor_sandboxservicebuilder_new() != 21082.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}@@ -1035,6 +1071,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {if (lib.uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxwarmpoolspecbuilder_new() != 26063.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}+ if (lib.uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new() != 25769.toShort()) {+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ }}/**@@ -3204,6 +3243,310 @@ public object FfiConverterTypeVmTemplateBuilder: FfiConverter<VmTemplateBuilder,}+// 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 WarmPoolAutoscalingBuilderInterface {++ fun `build`(): WarmPoolAutoscaling++ fun `initialPoolSize`(`value`: kotlin.UInt): WarmPoolAutoscalingBuilder++ fun `maxPoolSize`(`value`: kotlin.UInt): WarmPoolAutoscalingBuilder++ fun `minPoolSize`(`value`: kotlin.UInt): WarmPoolAutoscalingBuilder++ companion object+}++open class WarmPoolAutoscalingBuilder: Disposable, AutoCloseable, WarmPoolAutoscalingBuilderInterface+{++ @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_schema_fn_constructor_warmpoolautoscalingbuilder_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_schema_fn_free_warmpoolautoscalingbuilder(handle, status)+ }+ }+ }++ /**+ * @suppress+ */+ fun uniffiCloneHandle(): Long {+ if (handle == 0.toLong()) {+ throw InternalException("uniffiCloneHandle() called on NoHandle object");+ }+ return uniffiRustCall() { status ->+ UniffiLib.uniffi_cyclops_sdk_schema_fn_clone_warmpoolautoscalingbuilder(handle, status)+ }+ }+++ @Throws(SchemaBuildException::class)override fun `build`(): WarmPoolAutoscaling {+ return FfiConverterTypeWarmPoolAutoscaling.lift(+ callWithHandle {+ uniffiRustCallWithError(SchemaBuildException) { _status ->+ UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build(+ it,+ _status)+}+ }+ )+ }+++ override fun `initialPoolSize`(`value`: kotlin.UInt): WarmPoolAutoscalingBuilder {+ return FfiConverterTypeWarmPoolAutoscalingBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size(+ it,+ FfiConverterUInt.lower(`value`),_status)+}+ }+ )+ }+++ override fun `maxPoolSize`(`value`: kotlin.UInt): WarmPoolAutoscalingBuilder {+ return FfiConverterTypeWarmPoolAutoscalingBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size(+ it,+ FfiConverterUInt.lower(`value`),_status)+}+ }+ )+ }+++ override fun `minPoolSize`(`value`: kotlin.UInt): WarmPoolAutoscalingBuilder {+ return FfiConverterTypeWarmPoolAutoscalingBuilder.lift(+ callWithHandle {+ uniffiRustCall() { _status ->+ UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size(+ it,+ FfiConverterUInt.lower(`value`),_status)+}+ }+ )+ }++++++++++ /**+ * @suppress+ */+ companion object++}+++/**+ * @suppress+ */+public object FfiConverterTypeWarmPoolAutoscalingBuilder: FfiConverter<WarmPoolAutoscalingBuilder, Long> {+ override fun lower(value: WarmPoolAutoscalingBuilder): Long {+ return value.uniffiCloneHandle()+ }++ override fun lift(value: Long): WarmPoolAutoscalingBuilder {+ return WarmPoolAutoscalingBuilder(UniffiWithHandle, value)+ }++ override fun read(buf: ByteBuffer): WarmPoolAutoscalingBuilder {+ return lift(buf.getLong())+ }++ override fun allocationSize(value: WarmPoolAutoscalingBuilder) = 8UL++ override fun write(value: WarmPoolAutoscalingBuilder, buf: ByteBuffer) {+ buf.putLong(lower(value))+ }+}++data class ClaimLifecycle (var `shutdownTime`: kotlin.String?diff --git a/libs/fleet/sdk-bindings/kotlin/tests/TestBuilders.kt b/libs/fleet/sdk-bindings/kotlin/tests/TestBuilders.ktindex 576a8555c7..d0a20d3945 100644--- a/libs/fleet/sdk-bindings/kotlin/tests/TestBuilders.kt+++ b/libs/fleet/sdk-bindings/kotlin/tests/TestBuilders.kt@@ -1,7 +1,11 @@+import ai.cua.cyclops.sdk.CreateClaimRequestBuilderimport ai.cua.cyclops.sdk.CreatePoolRequestBuilderimport ai.cua.cyclops.sdk.CreateTemplateRequestimport ai.cua.cyclops.sdk.CreateTemplateRequestBuilder+import ai.cua.cyclops.sdk.CreateUserApiKeyRequestBuilder+import ai.cua.cyclops.sdk.CyclopsTokenProviderConfigurationBuilderimport ai.cua.cyclops.sdk.SdkBuildException+import ai.cua.cyclops.sdk.TemplateBuilderimport ai.cua.cyclops.sdk.schema.OsGymSandboxTemplateSpecimport ai.cua.cyclops.sdk.schema.OsGymSandboxTemplateSpecBuilderimport ai.cua.cyclops.sdk.schema.SandboxService@@ -10,6 +14,7 @@ import ai.cua.cyclops.sdk.schema.SandboxTemplateRefimport ai.cua.cyclops.sdk.schema.SchemaBuildExceptionimport ai.cua.cyclops.sdk.schema.VmTemplateimport ai.cua.cyclops.sdk.schema.VmTemplateBuilder+import ai.cua.cyclops.sdk.schema.WarmPoolAutoscalingBuilderfun main() {val service: SandboxService = SandboxServiceBuilder()@@ -52,4 +57,27 @@ fun main() {val legacy = SandboxTemplateRef(name = "legacy")check(legacy::class == SandboxTemplateRef::class)check(legacy.name == "legacy")++ val configuration = CyclopsTokenProviderConfigurationBuilder()+ .baseUrl("https://api.example.test")+ .poolPollIntervalMs(5000uL)+ .poolPollLimit(120u)+ .claimPollIntervalMs(5000uL)+ .claimPollLimit(120u)+ .build()+ val userKey = CreateUserApiKeyRequestBuilder()+ .name("automation")+ .scope(emptyList())+ .build()+ val autoscaling = WarmPoolAutoscalingBuilder()+ .minPoolSize(1u)+ .initialPoolSize(2u)+ .maxPoolSize(5u)+ .build()++ check(configuration.poolPollIntervalMs == 5000uL)+ check(userKey.scope.isEmpty())+ check(autoscaling.maxPoolSize == 5u)+ check(runCatching { TemplateBuilder().build() }.exceptionOrNull() is SdkBuildException.MissingRequiredField)+ check(runCatching { CreateClaimRequestBuilder().build() }.exceptionOrNull() is SdkBuildException.MissingRequiredField)}diff --git a/libs/fleet/sdk-bindings/python/fleet_sdk/_schema.py b/libs/fleet/sdk-bindings/python/fleet_sdk/_schema.pyindex bb461d2bff..b71fe04637 100644--- a/libs/fleet/sdk-bindings/python/fleet_sdk/_schema.py+++ b/libs/fleet/sdk-bindings/python/fleet_sdk/_schema.py@@ -546,6 +546,16 @@ 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_tolerations() != 1632:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new() != 25769:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build() != 17132:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size() != 56913:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size() != 18359:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size() != 46153:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")# A ctypes library to expose the extern-C FFI definitions.# This is an implementation detail which will be called internally by the public API.@@ -869,6 +879,16 @@ _UniffiLib.uniffi_cyclops_sdk_schema_fn_free_vmtemplatebuilder.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_schema_fn_free_vmtemplatebuilder.restype = None+_UniffiLib.uniffi_cyclops_sdk_schema_fn_clone_warmpoolautoscalingbuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_clone_warmpoolautoscalingbuilder.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_schema_fn_free_warmpoolautoscalingbuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_free_warmpoolautoscalingbuilder.restype = None_UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_osgymsandboxtemplatespecbuilder_new.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)@@ -1056,6 +1076,33 @@ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_tolerations.argctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_tolerations.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_warmpoolautoscalingbuilder_new.argtypes = (+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_warmpoolautoscalingbuilder_new.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build.restype = _UniffiRustBuffer+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size.argtypes = (+ ctypes.c_uint64,+ ctypes.c_uint32,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size.argtypes = (+ ctypes.c_uint64,+ ctypes.c_uint32,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size.argtypes = (+ ctypes.c_uint64,+ ctypes.c_uint32,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size.restype = ctypes.c_uint64_UniffiLib.ffi_cyclops_sdk_schema_uniffi_contract_version.argtypes = ()_UniffiLib.ffi_cyclops_sdk_schema_uniffi_contract_version.restype = ctypes.c_uint32@@ -1161,6 +1208,21 @@ _UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_services._UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_tolerations.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_tolerations.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size.restype = ctypes.c_uint16_uniffi_check_contract_api_version(_UniffiLib)# _uniffi_check_api_checksums(_UniffiLib)@@ -3659,6 +3721,137 @@ class _UniffiFfiConverterTypeVmTemplateBuilder:def write(cls, value: VmTemplateBuilder, buf: _UniffiRustBuffer):buf.write_u64(cls.lower(value))++class WarmPoolAutoscalingBuilderProtocol(typing.Protocol):++ def build(self, ) -> WarmPoolAutoscaling:+ raise NotImplementedError+ def initial_pool_size(self, value: int) -> WarmPoolAutoscalingBuilder:+ raise NotImplementedError+ def max_pool_size(self, value: int) -> WarmPoolAutoscalingBuilder:+ raise NotImplementedError+ def min_pool_size(self, value: int) -> WarmPoolAutoscalingBuilder:+ raise NotImplementedError++class WarmPoolAutoscalingBuilder(WarmPoolAutoscalingBuilderProtocol):++ _handle: ctypes.c_uint64+ def __init__(self, ):+ _uniffi_lowered_args = (+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeWarmPoolAutoscalingBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_warmpoolautoscalingbuilder_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_schema_fn_free_warmpoolautoscalingbuilder, handle)++ def _uniffi_clone_handle(self):+ return _uniffi_rust_call(_UniffiLib.uniffi_cyclops_sdk_schema_fn_clone_warmpoolautoscalingbuilder, 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, ) -> WarmPoolAutoscaling:+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeWarmPoolAutoscaling.lift+ _uniffi_error_converter = _UniffiFfiConverterTypeSchemaBuildError+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def initial_pool_size(self, value: int) -> WarmPoolAutoscalingBuilder:++ _UniffiFfiConverterUInt32.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterUInt32.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeWarmPoolAutoscalingBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def max_pool_size(self, value: int) -> WarmPoolAutoscalingBuilder:++ _UniffiFfiConverterUInt32.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterUInt32.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeWarmPoolAutoscalingBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def min_pool_size(self, value: int) -> WarmPoolAutoscalingBuilder:++ _UniffiFfiConverterUInt32.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterUInt32.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeWarmPoolAutoscalingBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)++++++class _UniffiFfiConverterTypeWarmPoolAutoscalingBuilder:+ @staticmethod+ def lift(value: int) -> WarmPoolAutoscalingBuilder:+ return WarmPoolAutoscalingBuilder._uniffi_make_instance(value)++ @staticmethod+ def check_lower(value: WarmPoolAutoscalingBuilder):+ if not isinstance(value, WarmPoolAutoscalingBuilder):+ raise TypeError("Expected WarmPoolAutoscalingBuilder instance, {} found".format(type(value).__name__))++ @staticmethod+ def lower(value: WarmPoolAutoscalingBuilder) -> ctypes.c_uint64:+ return value._uniffi_clone_handle()++ @classmethod+ def read(cls, buf: _UniffiRustBuffer) -> WarmPoolAutoscalingBuilder:+ ptr = buf.read_u64()+ if ptr == 0:+ raise InternalError("Raw handle value was null")+ return cls.lift(ptr)++ @classmethod+ def write(cls, value: WarmPoolAutoscalingBuilder, buf: _UniffiRustBuffer):+ buf.write_u64(cls.lower(value))+class _UniffiFfiConverterUInt8(_UniffiConverterPrimitiveInt):CLASS_NAME = "u8"VALUE_MIN = 0@@ -3707,4 +3900,6 @@ __all__ = ["SandboxTemplateRefBuilderProtocol","VmTemplateBuilder","VmTemplateBuilderProtocol",+ "WarmPoolAutoscalingBuilder",+ "WarmPoolAutoscalingBuilderProtocol",]diff --git a/libs/fleet/sdk-bindings/python/fleet_sdk/_sdk.py b/libs/fleet/sdk-bindings/python/fleet_sdk/_sdk.pyindex 48009c6f35..f8bb3d5ee4 100644--- a/libs/fleet/sdk-bindings/python/fleet_sdk/_sdk.py+++ b/libs/fleet/sdk-bindings/python/fleet_sdk/_sdk.py@@ -482,6 +482,16 @@ def _uniffi_check_contract_api_version(lib):def _uniffi_check_api_checksums(lib):if lib.uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token() != 1180:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new() != 10967:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build() != 10518:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name() != 19762:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool() != 7405:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec() != 28263:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new() != 33658:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_build() != 60558:@@ -500,6 +510,14 @@ 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_createtemplaterequestbuilder_spec() != 29902:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new() != 47741:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build() != 18677:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name() != 53365:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope() != 26616:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() != 54404:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect_browser_with_access_token() != 55589:@@ -562,8 +580,34 @@ def _uniffi_check_api_checksums(lib):raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() != 25746:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new() != 43069:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url() != 48016:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build() != 28182:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms() != 50054:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit() != 7533:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms() != 16373:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit() != 6865:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")if lib.uniffi_cyclops_sdk_checksum_method_httpclient_execute() != 38803:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new() != 19815:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version() != 65471:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_templatebuilder_build() != 2046:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_templatebuilder_kind() != 14122:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata() != 25572:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")+ if lib.uniffi_cyclops_sdk_checksum_method_templatebuilder_spec() != 43128:+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")# A ctypes library to expose the extern-C FFI definitions.# This is an implementation detail which will be called internally by the public API.@@ -837,6 +881,16 @@ _UniffiLib.uniffi_cyclops_sdk_fn_free_accesstokenprovider.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_fn_free_accesstokenprovider.restype = None+_UniffiLib.uniffi_cyclops_sdk_fn_clone_createclaimrequestbuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_clone_createclaimrequestbuilder.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_free_createclaimrequestbuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_free_createclaimrequestbuilder.restype = None_UniffiLib.uniffi_cyclops_sdk_fn_clone_createpoolrequestbuilder.argtypes = (ctypes.c_uint64,ctypes.POINTER(_UniffiRustCallStatus),@@ -857,6 +911,16 @@ _UniffiLib.uniffi_cyclops_sdk_fn_free_createtemplaterequestbuilder.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_fn_free_createtemplaterequestbuilder.restype = None+_UniffiLib.uniffi_cyclops_sdk_fn_clone_createuserapikeyrequestbuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_clone_createuserapikeyrequestbuilder.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_free_createuserapikeyrequestbuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_free_createuserapikeyrequestbuilder.restype = None_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopsclient.argtypes = (ctypes.c_uint64,ctypes.POINTER(_UniffiRustCallStatus),@@ -877,6 +941,16 @@ _UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopscredentials.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopscredentials.restype = None+_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopstokenproviderconfigurationbuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopstokenproviderconfigurationbuilder.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopstokenproviderconfigurationbuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopstokenproviderconfigurationbuilder.restype = None_UniffiLib.uniffi_cyclops_sdk_fn_clone_httpclient.argtypes = (ctypes.c_uint64,ctypes.POINTER(_UniffiRustCallStatus),@@ -887,6 +961,16 @@ _UniffiLib.uniffi_cyclops_sdk_fn_free_httpclient.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_fn_free_httpclient.restype = None+_UniffiLib.uniffi_cyclops_sdk_fn_clone_templatebuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_clone_templatebuilder.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_free_templatebuilder.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_free_templatebuilder.restype = Noneclass _UniffiForeignFutureResultRustBuffer(ctypes.Structure):_fields_ = [("return_value", _UniffiRustBuffer),@@ -931,6 +1015,33 @@ _UniffiLib.uniffi_cyclops_sdk_fn_method_accesstokenprovider_get_access_token.argctypes.c_int8,)_UniffiLib.uniffi_cyclops_sdk_fn_method_accesstokenprovider_get_access_token.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_createclaimrequestbuilder_new.argtypes = (+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_createclaimrequestbuilder_new.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_build.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_build.restype = _UniffiRustBuffer+_UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_name.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_name.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_pool.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_pool.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_spec.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_spec.restype = ctypes.c_uint64_UniffiLib.uniffi_cyclops_sdk_fn_constructor_createpoolrequestbuilder_new.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)@@ -979,6 +1090,27 @@ _UniffiLib.uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_spec.argtypctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_spec.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_createuserapikeyrequestbuilder_new.argtypes = (+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_createuserapikeyrequestbuilder_new.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_build.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_build.restype = _UniffiRustBuffer+_UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_name.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_name.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_scope.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_scope.restype = ctypes.c_uint64_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect.argtypes = (_UniffiRustBuffer,ctypes.c_uint64,@@ -1146,17 +1278,104 @@ _UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopstokenproviderconfigurationbuilder_new.argtypes = (+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopstokenproviderconfigurationbuilder_new.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_base_url.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_base_url.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_build.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_build.restype = _UniffiRustBuffer+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms.argtypes = (+ ctypes.c_uint64,+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit.argtypes = (+ ctypes.c_uint64,+ ctypes.c_uint32,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms.argtypes = (+ ctypes.c_uint64,+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit.argtypes = (+ ctypes.c_uint64,+ ctypes.c_uint32,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit.restype = ctypes.c_uint64_UniffiLib.uniffi_cyclops_sdk_fn_method_httpclient_execute.argtypes = (ctypes.c_uint64,_UniffiRustBuffer,)_UniffiLib.uniffi_cyclops_sdk_fn_method_httpclient_execute.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_templatebuilder_new.argtypes = (+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_templatebuilder_new.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_api_version.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_api_version.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_build.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_build.restype = _UniffiRustBuffer+_UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_kind.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_kind.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_metadata.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_metadata.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_spec.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_spec.restype = ctypes.c_uint64_UniffiLib.ffi_cyclops_sdk_uniffi_contract_version.argtypes = ()_UniffiLib.ffi_cyclops_sdk_uniffi_contract_version.restype = ctypes.c_uint32_UniffiLib.uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new.restype = ctypes.c_uint16@@ -1184,6 +1403,18 @@ _UniffiLib.uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_names_UniffiLib.uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_spec.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_spec.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect.restype = ctypes.c_uint16@@ -1277,9 +1508,48 @@ _UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim.restype =_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit.restype = ctypes.c_uint16_UniffiLib.uniffi_cyclops_sdk_checksum_method_httpclient_execute.argtypes = ()_UniffiLib.uniffi_cyclops_sdk_checksum_method_httpclient_execute.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_templatebuilder_build.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_templatebuilder_build.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_templatebuilder_kind.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_templatebuilder_kind.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_templatebuilder_spec.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_templatebuilder_spec.restype = ctypes.c_uint16_uniffi_check_contract_api_version(_UniffiLib)# _uniffi_check_api_checksums(_UniffiLib)@@ -3236,6 +3506,137 @@ class _UniffiFfiConverterTypeAccessTokenProvider:buf.write_u64(cls.lower(value))+class CreateClaimRequestBuilderProtocol(typing.Protocol):++ def build(self, ) -> CreateClaimRequest:+ raise NotImplementedError+ def name(self, value: str) -> CreateClaimRequestBuilder:+ raise NotImplementedError+ def pool(self, value: Pool) -> CreateClaimRequestBuilder:+ raise NotImplementedError+ def spec(self, value: fleet_sdk.ClaimSpec) -> CreateClaimRequestBuilder:+ raise NotImplementedError++class CreateClaimRequestBuilder(CreateClaimRequestBuilderProtocol):++ _handle: ctypes.c_uint64+ def __init__(self, ):+ _uniffi_lowered_args = (+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateClaimRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_constructor_createclaimrequestbuilder_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_createclaimrequestbuilder, handle)++ def _uniffi_clone_handle(self):+ return _uniffi_rust_call(_UniffiLib.uniffi_cyclops_sdk_fn_clone_createclaimrequestbuilder, 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, ) -> CreateClaimRequest:+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateClaimRequest.lift+ _uniffi_error_converter = _UniffiFfiConverterTypeSdkBuildError+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_build,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def name(self, value: str) -> CreateClaimRequestBuilder:++ _UniffiFfiConverterString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateClaimRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_name,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def pool(self, value: Pool) -> CreateClaimRequestBuilder:++ _UniffiFfiConverterTypePool.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterTypePool.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateClaimRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_pool,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def spec(self, value: fleet_sdk.ClaimSpec) -> CreateClaimRequestBuilder:++ fleet_sdk._UniffiFfiConverterTypeClaimSpec.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ fleet_sdk._UniffiFfiConverterTypeClaimSpec.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateClaimRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_spec,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)++++++class _UniffiFfiConverterTypeCreateClaimRequestBuilder:+ @staticmethod+ def lift(value: int) -> CreateClaimRequestBuilder:+ return CreateClaimRequestBuilder._uniffi_make_instance(value)++ @staticmethod+ def check_lower(value: CreateClaimRequestBuilder):+ if not isinstance(value, CreateClaimRequestBuilder):+ raise TypeError("Expected CreateClaimRequestBuilder instance, {} found".format(type(value).__name__))++ @staticmethod+ def lower(value: CreateClaimRequestBuilder) -> ctypes.c_uint64:+ return value._uniffi_clone_handle()++ @classmethod+ def read(cls, buf: _UniffiRustBuffer) -> CreateClaimRequestBuilder:+ ptr = buf.read_u64()+ if ptr == 0:+ raise InternalError("Raw handle value was null")+ return cls.lift(ptr)++ @classmethod+ def write(cls, value: CreateClaimRequestBuilder, buf: _UniffiRustBuffer):+ buf.write_u64(cls.lower(value))++class CreatePoolRequestBuilderProtocol(typing.Protocol):def build(self, ) -> CreatePoolRequest:@@ -3480,26 +3881,140 @@ class _UniffiFfiConverterTypeCreateTemplateRequestBuilder:def write(cls, value: CreateTemplateRequestBuilder, buf: _UniffiRustBuffer):buf.write_u64(cls.lower(value))-class _UniffiFfiConverterSequenceTypeClaim(_UniffiConverterRustBuffer):- @classmethod- def check_lower(cls, value):- for item in value:- _UniffiFfiConverterTypeClaim.check_lower(item)-- @classmethod- def write(cls, value, buf):- items = len(value)- buf.write_i32(items)- for item in value:- _UniffiFfiConverterTypeClaim.write(item, buf)- @classmethod- def read(cls, buf):- count = buf.read_i32()- if count < 0:- raise InternalError("Unexpected negative sequence length")+class CreateUserApiKeyRequestBuilderProtocol(typing.Protocol):- return [+ def build(self, ) -> CreateUserApiKeyRequest:+ raise NotImplementedError+ def name(self, value: str) -> CreateUserApiKeyRequestBuilder:+ raise NotImplementedError+ def scope(self, value: typing.List[str]) -> CreateUserApiKeyRequestBuilder:+ raise NotImplementedError++class CreateUserApiKeyRequestBuilder(CreateUserApiKeyRequestBuilderProtocol):++ _handle: ctypes.c_uint64+ def __init__(self, ):+ _uniffi_lowered_args = (+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateUserApiKeyRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_constructor_createuserapikeyrequestbuilder_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_createuserapikeyrequestbuilder, handle)++ def _uniffi_clone_handle(self):+ return _uniffi_rust_call(_UniffiLib.uniffi_cyclops_sdk_fn_clone_createuserapikeyrequestbuilder, 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, ) -> CreateUserApiKeyRequest:+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateUserApiKeyRequest.lift+ _uniffi_error_converter = _UniffiFfiConverterTypeSdkBuildError+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_build,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def name(self, value: str) -> CreateUserApiKeyRequestBuilder:++ _UniffiFfiConverterString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateUserApiKeyRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_name,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def scope(self, value: typing.List[str]) -> CreateUserApiKeyRequestBuilder:++ _UniffiFfiConverterSequenceString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterSequenceString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCreateUserApiKeyRequestBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_scope,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)++++++class _UniffiFfiConverterTypeCreateUserApiKeyRequestBuilder:+ @staticmethod+ def lift(value: int) -> CreateUserApiKeyRequestBuilder:+ return CreateUserApiKeyRequestBuilder._uniffi_make_instance(value)++ @staticmethod+ def check_lower(value: CreateUserApiKeyRequestBuilder):+ if not isinstance(value, CreateUserApiKeyRequestBuilder):+ raise TypeError("Expected CreateUserApiKeyRequestBuilder instance, {} found".format(type(value).__name__))++ @staticmethod+ def lower(value: CreateUserApiKeyRequestBuilder) -> ctypes.c_uint64:+ return value._uniffi_clone_handle()++ @classmethod+ def read(cls, buf: _UniffiRustBuffer) -> CreateUserApiKeyRequestBuilder:+ ptr = buf.read_u64()+ if ptr == 0:+ raise InternalError("Raw handle value was null")+ return cls.lift(ptr)++ @classmethod+ def write(cls, value: CreateUserApiKeyRequestBuilder, buf: _UniffiRustBuffer):+ buf.write_u64(cls.lower(value))++class _UniffiFfiConverterSequenceTypeClaim(_UniffiConverterRustBuffer):+ @classmethod+ def check_lower(cls, value):+ for item in value:+ _UniffiFfiConverterTypeClaim.check_lower(item)++ @classmethod+ def write(cls, value, buf):+ items = len(value)+ buf.write_i32(items)+ for item in value:+ _UniffiFfiConverterTypeClaim.write(item, buf)++ @classmethod+ def read(cls, buf):+ count = buf.read_i32()+ if count < 0:+ raise InternalError("Unexpected negative sequence length")++ return [_UniffiFfiConverterTypeClaim.read(buf) for i in range(count)]@@ -4245,6 +4760,171 @@ class _UniffiFfiConverterTypeCyclopsClient:buf.write_u64(cls.lower(value))+class CyclopsTokenProviderConfigurationBuilderProtocol(typing.Protocol):++ def base_url(self, value: str) -> CyclopsTokenProviderConfigurationBuilder:+ raise NotImplementedError+ def build(self, ) -> CyclopsTokenProviderConfiguration:+ raise NotImplementedError+ def claim_poll_interval_ms(self, value: int) -> CyclopsTokenProviderConfigurationBuilder:+ raise NotImplementedError+ def claim_poll_limit(self, value: int) -> CyclopsTokenProviderConfigurationBuilder:+ raise NotImplementedError+ def pool_poll_interval_ms(self, value: int) -> CyclopsTokenProviderConfigurationBuilder:+ raise NotImplementedError+ def pool_poll_limit(self, value: int) -> CyclopsTokenProviderConfigurationBuilder:+ raise NotImplementedError++class CyclopsTokenProviderConfigurationBuilder(CyclopsTokenProviderConfigurationBuilderProtocol):++ _handle: ctypes.c_uint64+ def __init__(self, ):+ _uniffi_lowered_args = (+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopstokenproviderconfigurationbuilder_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_cyclopstokenproviderconfigurationbuilder, handle)++ def _uniffi_clone_handle(self):+ return _uniffi_rust_call(_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopstokenproviderconfigurationbuilder, 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 base_url(self, value: str) -> CyclopsTokenProviderConfigurationBuilder:++ _UniffiFfiConverterString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_base_url,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def build(self, ) -> CyclopsTokenProviderConfiguration:+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCyclopsTokenProviderConfiguration.lift+ _uniffi_error_converter = _UniffiFfiConverterTypeSdkBuildError+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_build,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def claim_poll_interval_ms(self, value: int) -> CyclopsTokenProviderConfigurationBuilder:++ _UniffiFfiConverterUInt64.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterUInt64.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def claim_poll_limit(self, value: int) -> CyclopsTokenProviderConfigurationBuilder:++ _UniffiFfiConverterUInt32.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterUInt32.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def pool_poll_interval_ms(self, value: int) -> CyclopsTokenProviderConfigurationBuilder:++ _UniffiFfiConverterUInt64.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterUInt64.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def pool_poll_limit(self, value: int) -> CyclopsTokenProviderConfigurationBuilder:++ _UniffiFfiConverterUInt32.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterUInt32.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)++++++class _UniffiFfiConverterTypeCyclopsTokenProviderConfigurationBuilder:+ @staticmethod+ def lift(value: int) -> CyclopsTokenProviderConfigurationBuilder:+ return CyclopsTokenProviderConfigurationBuilder._uniffi_make_instance(value)++ @staticmethod+ def check_lower(value: CyclopsTokenProviderConfigurationBuilder):+ if not isinstance(value, CyclopsTokenProviderConfigurationBuilder):+ raise TypeError("Expected CyclopsTokenProviderConfigurationBuilder instance, {} found".format(type(value).__name__))++ @staticmethod+ def lower(value: CyclopsTokenProviderConfigurationBuilder) -> ctypes.c_uint64:+ return value._uniffi_clone_handle()++ @classmethod+ def read(cls, buf: _UniffiRustBuffer) -> CyclopsTokenProviderConfigurationBuilder:+ ptr = buf.read_u64()+ if ptr == 0:+ raise InternalError("Raw handle value was null")+ return cls.lift(ptr)++ @classmethod+ def write(cls, value: CyclopsTokenProviderConfigurationBuilder, buf: _UniffiRustBuffer):+ buf.write_u64(cls.lower(value))++class HttpClient():async def execute(self, request: HttpRequest) -> HttpResponse:@@ -4394,6 +5074,154 @@ class _UniffiFfiConverterTypeHttpClient:def write(cls, value: HttpClient, buf: _UniffiRustBuffer):buf.write_u64(cls.lower(value))++class TemplateBuilderProtocol(typing.Protocol):++ def api_version(self, value: str) -> TemplateBuilder:+ raise NotImplementedError+ def build(self, ) -> Template:+ raise NotImplementedError+ def kind(self, value: str) -> TemplateBuilder:+ raise NotImplementedError+ def metadata(self, value: ResourceMetadata) -> TemplateBuilder:+ raise NotImplementedError+ def spec(self, value: fleet_sdk.OsGymSandboxTemplateSpec) -> TemplateBuilder:+ raise NotImplementedError++class TemplateBuilder(TemplateBuilderProtocol):++ _handle: ctypes.c_uint64+ def __init__(self, ):+ _uniffi_lowered_args = (+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeTemplateBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_constructor_templatebuilder_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_templatebuilder, handle)++ def _uniffi_clone_handle(self):+ return _uniffi_rust_call(_UniffiLib.uniffi_cyclops_sdk_fn_clone_templatebuilder, 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 api_version(self, value: str) -> TemplateBuilder:++ _UniffiFfiConverterString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeTemplateBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_api_version,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def build(self, ) -> Template:+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeTemplate.lift+ _uniffi_error_converter = _UniffiFfiConverterTypeSdkBuildError+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_build,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def kind(self, value: str) -> TemplateBuilder:++ _UniffiFfiConverterString.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterString.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeTemplateBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_kind,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def metadata(self, value: ResourceMetadata) -> TemplateBuilder:++ _UniffiFfiConverterTypeResourceMetadata.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ _UniffiFfiConverterTypeResourceMetadata.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeTemplateBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_metadata,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)+ def spec(self, value: fleet_sdk.OsGymSandboxTemplateSpec) -> TemplateBuilder:++ fleet_sdk._UniffiFfiConverterTypeOSGymSandboxTemplateSpec.check_lower(value)+ _uniffi_lowered_args = (+ self._uniffi_clone_handle(),+ fleet_sdk._UniffiFfiConverterTypeOSGymSandboxTemplateSpec.lower(value),+ )+ _uniffi_lift_return = _UniffiFfiConverterTypeTemplateBuilder.lift+ _uniffi_error_converter = None+ _uniffi_ffi_result = _uniffi_rust_call_with_error(+ _uniffi_error_converter,+ _UniffiLib.uniffi_cyclops_sdk_fn_method_templatebuilder_spec,+ *_uniffi_lowered_args,+ )+ return _uniffi_lift_return(_uniffi_ffi_result)++++++class _UniffiFfiConverterTypeTemplateBuilder:+ @staticmethod+ def lift(value: int) -> TemplateBuilder:+ return TemplateBuilder._uniffi_make_instance(value)++ @staticmethod+ def check_lower(value: TemplateBuilder):+ if not isinstance(value, TemplateBuilder):+ raise TypeError("Expected TemplateBuilder instance, {} found".format(type(value).__name__))++ @staticmethod+ def lower(value: TemplateBuilder) -> ctypes.c_uint64:+ return value._uniffi_clone_handle()++ @classmethod+ def read(cls, buf: _UniffiRustBuffer) -> TemplateBuilder:+ ptr = buf.read_u64()+ if ptr == 0:+ raise InternalError("Raw handle value was null")+ return cls.lift(ptr)++ @classmethod+ def write(cls, value: TemplateBuilder, buf: _UniffiRustBuffer):+ buf.write_u64(cls.lower(value))+class _UniffiFfiConverterUInt8(_UniffiConverterPrimitiveInt):CLASS_NAME = "u8"VALUE_MIN = 0@@ -4434,12 +5262,20 @@ __all__ = ["CyclopsCredentialsProtocol","AccessTokenProviderImpl","AccessTokenProvider",+ "CreateClaimRequestBuilder",+ "CreateClaimRequestBuilderProtocol","CreatePoolRequestBuilder","CreatePoolRequestBuilderProtocol","CreateTemplateRequestBuilder","CreateTemplateRequestBuilderProtocol",+ "CreateUserApiKeyRequestBuilder",+ "CreateUserApiKeyRequestBuilderProtocol","CyclopsClient","CyclopsClientProtocol",+ "CyclopsTokenProviderConfigurationBuilder",+ "CyclopsTokenProviderConfigurationBuilderProtocol","HttpClientImpl","HttpClient",+ "TemplateBuilder",+ "TemplateBuilderProtocol",]diff --git a/libs/fleet/sdk-bindings/python/tests/test_builders.py b/libs/fleet/sdk-bindings/python/tests/test_builders.pyindex f24e0c028b..f3bab3e5d5 100644--- a/libs/fleet/sdk-bindings/python/tests/test_builders.py+++ b/libs/fleet/sdk-bindings/python/tests/test_builders.py@@ -60,6 +60,38 @@ class GeneratedBuilderTest(unittest.TestCase):self.assertIs(type(reference), fleet_sdk.SandboxTemplateRef)self.assertEqual(reference.name, "legacy")+ def test_remaining_frontend_builders_are_generated(self):+ configuration = (+ fleet_sdk.CyclopsTokenProviderConfigurationBuilder()+ .base_url("https://api.example.test")+ .pool_poll_interval_ms(5000)+ .pool_poll_limit(120)+ .claim_poll_interval_ms(5000)+ .claim_poll_limit(120)+ .build()+ )+ user_key = (+ fleet_sdk.CreateUserApiKeyRequestBuilder()+ .name("automation")+ .scope([])+ .build()+ )+ autoscaling = (+ fleet_sdk.WarmPoolAutoscalingBuilder()+ .min_pool_size(1)+ .initial_pool_size(2)+ .max_pool_size(5)+ .build()+ )++ self.assertEqual(configuration.pool_poll_interval_ms, 5000)+ self.assertEqual(user_key.scope, [])+ self.assertEqual(autoscaling.max_pool_size, 5)+ with self.assertRaises(fleet_sdk.SdkBuildError.MissingRequiredField):+ fleet_sdk.TemplateBuilder().build()+ with self.assertRaises(fleet_sdk.SdkBuildError.MissingRequiredField):+ fleet_sdk.CreateClaimRequestBuilder().build()+if __name__ == "__main__":unittest.main()diff --git a/libs/fleet/sdk-bindings/ruby/cyclops_sdk.rb b/libs/fleet/sdk-bindings/ruby/cyclops_sdk.rbindex 57e59be796..533436ed05 100644--- a/libs/fleet/sdk-bindings/ruby/cyclops_sdk.rb+++ b/libs/fleet/sdk-bindings/ruby/cyclops_sdk.rb@@ -6,6 +6,7 @@ module FleetSdkconst_set(name, CyclopsSdkSchema.const_get(name)) unless const_defined?(name, false)endSCHEMA_ALLOC_METHODS = %i[+ alloc_from_TypeClaimSpecalloc_from_TypeOSGymSandboxTemplateSpecalloc_from_TypeOSGymSandboxWarmPoolSpec].freezediff --git a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rb b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rbindex 23aa9526f3..09876d4db7 100644--- a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rb+++ b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rb@@ -1094,6 +1094,13 @@ class RustBufferStreamreturn VmTemplateBuilder.uniffi_allocate(handle)end+ # The Object type WarmPoolAutoscalingBuilder.++ def readTypeWarmPoolAutoscalingBuilder+ handle = unpack_from 8, 'Q>'+ return WarmPoolAutoscalingBuilder.uniffi_allocate(handle)+ end+# The Record type ClaimLifecycle.def readTypeClaimLifecycle@@ -1802,6 +1809,13 @@ class RustBufferBuilderpack_into(8, 'Q>', handle)end+ # The Object type WarmPoolAutoscalingBuilder.++ def write_TypeWarmPoolAutoscalingBuilder(obj)+ handle = WarmPoolAutoscalingBuilder.uniffi_lower obj+ pack_into(8, 'Q>', handle)+ end+# The Record type ClaimLifecycle.def write_TypeClaimLifecycle(v)@@ -2512,6 +2526,27 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref,[:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64+ attach_function :uniffi_cyclops_sdk_schema_fn_clone_warmpoolautoscalingbuilder,+ [:uint64, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_schema_fn_free_warmpoolautoscalingbuilder,+ [:uint64, RustCallStatus.by_ref],+ :void+ attach_function :uniffi_cyclops_sdk_schema_fn_constructor_warmpoolautoscalingbuilder_new,+ [RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build,+ [:uint64, RustCallStatus.by_ref],+ RustBuffer.by_value+ attach_function :uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size,+ [:uint64, :uint32, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size,+ [:uint64, :uint32, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size,+ [:uint64, :uint32, RustCallStatus.by_ref],+ :uint64attach_function :ffi_cyclops_sdk_schema_rustbuffer_alloc,[:uint64, RustCallStatus.by_ref],RustBuffer.by_value@@ -2608,6 +2643,18 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_schema_checksum_constructor_sandboxservicebuilder_new,[RustCallStatus.by_ref],:uint16@@ -2626,6 +2673,9 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxwarmpoolspecbuilder_new,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new,+ [RustCallStatus.by_ref],+ :uint16attach_function :ffi_cyclops_sdk_schema_uniffi_contract_version,[RustCallStatus.by_ref],:uint32@@ -3593,6 +3643,81 @@ endreturn OSGymSandboxWarmPoolSpecBuilder.uniffi_allocate(result)end+end++ class WarmPoolAutoscalingBuilder++ # 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|+ CyclopsSdkSchema.rust_call(+ :uniffi_cyclops_sdk_schema_fn_free_warmpoolautoscalingbuilder,+ 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 WarmPoolAutoscalingBuilder instance, got #{inst}"+ end+ end++ def uniffi_clone_handle()+ return CyclopsSdkSchema.rust_call(+ :uniffi_cyclops_sdk_schema_fn_clone_warmpoolautoscalingbuilder,+ @handle+ )+ end++ def self.uniffi_lower(inst)+ return inst.uniffi_clone_handle()+ end+ def initialize()+ handle = CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_constructor_warmpoolautoscalingbuilder_new,)+ @handle = handle+ ObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id))+ end++++ def build()+ result = CyclopsSdkSchema.rust_call_with_error(SchemaBuildError,:uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build,uniffi_clone_handle(),)+ return result.consumeIntoTypeWarmPoolAutoscaling+ end+ def initial_pool_size(value)+ value = CyclopsSdkSchema::uniffi_in_range(value, "u32", 0, 2**32)++ result = CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size,uniffi_clone_handle(),value)+ return WarmPoolAutoscalingBuilder.uniffi_allocate(result)+ end+ def max_pool_size(value)+ value = CyclopsSdkSchema::uniffi_in_range(value, "u32", 0, 2**32)++ result = CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size,uniffi_clone_handle(),value)+ return WarmPoolAutoscalingBuilder.uniffi_allocate(result)+ end+ def min_pool_size(value)+ value = CyclopsSdkSchema::uniffi_in_range(value, "u32", 0, 2**32)++ result = CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size,uniffi_clone_handle(),value)+ return WarmPoolAutoscalingBuilder.uniffi_allocate(result)+ end+endenddiff --git a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rb b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rbindex 0ed5920ffc..9ea28681cf 100644--- a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rb+++ b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rb@@ -932,6 +932,13 @@ class RustBufferStreamreturn AccessTokenProvider.uniffi_allocate(handle)end+ # The Object type CreateClaimRequestBuilder.++ def readTypeCreateClaimRequestBuilder+ handle = unpack_from 8, 'Q>'+ return CreateClaimRequestBuilder.uniffi_allocate(handle)+ end+# The Object type CreatePoolRequestBuilder.def readTypeCreatePoolRequestBuilder@@ -946,6 +953,13 @@ class RustBufferStreamreturn CreateTemplateRequestBuilder.uniffi_allocate(handle)end+ # The Object type CreateUserApiKeyRequestBuilder.++ def readTypeCreateUserApiKeyRequestBuilder+ handle = unpack_from 8, 'Q>'+ return CreateUserApiKeyRequestBuilder.uniffi_allocate(handle)+ end+# The Object type CyclopsClient.def readTypeCyclopsClient@@ -960,6 +974,13 @@ class RustBufferStreamreturn CyclopsCredentials.uniffi_allocate(handle)end+ # The Object type CyclopsTokenProviderConfigurationBuilder.++ def readTypeCyclopsTokenProviderConfigurationBuilder+ handle = unpack_from 8, 'Q>'+ return CyclopsTokenProviderConfigurationBuilder.uniffi_allocate(handle)+ end+# The Object type HttpClient.def readTypeHttpClient@@ -967,6 +988,13 @@ class RustBufferStreamreturn HttpClient.uniffi_allocate(handle)end+ # The Object type TemplateBuilder.++ def readTypeTemplateBuilder+ handle = unpack_from 8, 'Q>'+ return TemplateBuilder.uniffi_allocate(handle)+ end+# The Record type Claim.def readTypeClaim@@ -1571,6 +1599,13 @@ class RustBufferBuilderpack_into(8, 'Q>', handle)end+ # The Object type CreateClaimRequestBuilder.++ def write_TypeCreateClaimRequestBuilder(obj)+ handle = CreateClaimRequestBuilder.uniffi_lower obj+ pack_into(8, 'Q>', handle)+ end+# The Object type CreatePoolRequestBuilder.def write_TypeCreatePoolRequestBuilder(obj)@@ -1585,6 +1620,13 @@ class RustBufferBuilderpack_into(8, 'Q>', handle)end+ # The Object type CreateUserApiKeyRequestBuilder.++ def write_TypeCreateUserApiKeyRequestBuilder(obj)+ handle = CreateUserApiKeyRequestBuilder.uniffi_lower obj+ pack_into(8, 'Q>', handle)+ end+# The Object type CyclopsClient.def write_TypeCyclopsClient(obj)@@ -1599,6 +1641,13 @@ class RustBufferBuilderpack_into(8, 'Q>', handle)end+ # The Object type CyclopsTokenProviderConfigurationBuilder.++ def write_TypeCyclopsTokenProviderConfigurationBuilder(obj)+ handle = CyclopsTokenProviderConfigurationBuilder.uniffi_lower obj+ pack_into(8, 'Q>', handle)+ end+# The Object type HttpClient.def write_TypeHttpClient(obj)@@ -1606,6 +1655,13 @@ class RustBufferBuilderpack_into(8, 'Q>', handle)end+ # The Object type TemplateBuilder.++ def write_TypeTemplateBuilder(obj)+ handle = TemplateBuilder.uniffi_lower obj+ pack_into(8, 'Q>', handle)+ end+# The Record type Claim.def write_TypeClaim(v)@@ -2522,6 +2578,27 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_fn_method_httpclient_execute,[:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64+ attach_function :uniffi_cyclops_sdk_fn_clone_createclaimrequestbuilder,+ [:uint64, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_free_createclaimrequestbuilder,+ [:uint64, RustCallStatus.by_ref],+ :void+ attach_function :uniffi_cyclops_sdk_fn_constructor_createclaimrequestbuilder_new,+ [RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_build,+ [:uint64, RustCallStatus.by_ref],+ RustBuffer.by_value+ attach_function :uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_name,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_pool,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_spec,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64attach_function :uniffi_cyclops_sdk_fn_clone_createpoolrequestbuilder,[:uint64, RustCallStatus.by_ref],:uint64@@ -2561,6 +2638,24 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_spec,[:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64+ attach_function :uniffi_cyclops_sdk_fn_clone_createuserapikeyrequestbuilder,+ [:uint64, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_free_createuserapikeyrequestbuilder,+ [:uint64, RustCallStatus.by_ref],+ :void+ attach_function :uniffi_cyclops_sdk_fn_constructor_createuserapikeyrequestbuilder_new,+ [RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_build,+ [:uint64, RustCallStatus.by_ref],+ RustBuffer.by_value+ attach_function :uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_name,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_scope,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64attach_function :uniffi_cyclops_sdk_fn_clone_cyclopscredentials,[:uint64, RustCallStatus.by_ref],:uint64@@ -2570,6 +2665,57 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new,[RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],:uint64+ attach_function :uniffi_cyclops_sdk_fn_clone_cyclopstokenproviderconfigurationbuilder,+ [:uint64, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_free_cyclopstokenproviderconfigurationbuilder,+ [:uint64, RustCallStatus.by_ref],+ :void+ attach_function :uniffi_cyclops_sdk_fn_constructor_cyclopstokenproviderconfigurationbuilder_new,+ [RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_base_url,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_build,+ [:uint64, RustCallStatus.by_ref],+ RustBuffer.by_value+ attach_function :uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms,+ [:uint64, :uint64, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit,+ [:uint64, :uint32, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms,+ [:uint64, :uint64, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit,+ [:uint64, :uint32, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_clone_templatebuilder,+ [:uint64, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_free_templatebuilder,+ [:uint64, RustCallStatus.by_ref],+ :void+ attach_function :uniffi_cyclops_sdk_fn_constructor_templatebuilder_new,+ [RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_templatebuilder_api_version,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_templatebuilder_build,+ [:uint64, RustCallStatus.by_ref],+ RustBuffer.by_value+ attach_function :uniffi_cyclops_sdk_fn_method_templatebuilder_kind,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_templatebuilder_metadata,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64+ attach_function :uniffi_cyclops_sdk_fn_method_templatebuilder_spec,+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],+ :uint64attach_function :ffi_cyclops_sdk_rustbuffer_alloc,[:uint64, RustCallStatus.by_ref],RustBuffer.by_value@@ -2657,6 +2803,18 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_checksum_method_httpclient_execute,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_build,[RustCallStatus.by_ref],:uint16@@ -2678,6 +2836,48 @@ module UniFFILibattach_function :uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_spec,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_templatebuilder_build,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_templatebuilder_kind,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_method_templatebuilder_spec,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect,[RustCallStatus.by_ref],:uint16@@ -2699,15 +2899,27 @@ 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_createclaimrequestbuilder_new,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new,[RustCallStatus.by_ref],:uint16attach_function :uniffi_cyclops_sdk_checksum_constructor_createtemplaterequestbuilder_new,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new,+ [RustCallStatus.by_ref],+ :uint16attach_function :uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new,[RustCallStatus.by_ref],:uint16+ attach_function :uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new,+ [RustCallStatus.by_ref],+ :uint16+ attach_function :uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new,+ [RustCallStatus.by_ref],+ :uint16attach_function :ffi_cyclops_sdk_uniffi_contract_version,[RustCallStatus.by_ref],:uint32@@ -3686,6 +3898,81 @@ endreturn result.consumeIntoTypeHttpResponseend+end++ class CreateClaimRequestBuilder++ # 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_createclaimrequestbuilder,+ 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 CreateClaimRequestBuilder instance, got #{inst}"+ end+ end++ def uniffi_clone_handle()+ return FleetSdk.rust_call(+ :uniffi_cyclops_sdk_fn_clone_createclaimrequestbuilder,+ @handle+ )+ end++ def self.uniffi_lower(inst)+ return inst.uniffi_clone_handle()+ end+ def initialize()+ handle = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_constructor_createclaimrequestbuilder_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_createclaimrequestbuilder_build,uniffi_clone_handle(),)+ return result.consumeIntoTypeCreateClaimRequest+ end+ def name(value)+ value = FleetSdk::uniffi_utf8(value)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_name,uniffi_clone_handle(),RustBuffer.allocFromString(value))+ return CreateClaimRequestBuilder.uniffi_allocate(result)+ end+ def pool(value)+ value = value+ RustBuffer.check_lower_TypePool(value)+ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_pool,uniffi_clone_handle(),RustBuffer.alloc_from_TypePool(value))+ return CreateClaimRequestBuilder.uniffi_allocate(result)+ end+ def spec(value)+ value = value+ RustBuffer.check_lower_TypeClaimSpec(value)+ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_spec,uniffi_clone_handle(),RustBuffer.alloc_from_TypeClaimSpec(value))+ return CreateClaimRequestBuilder.uniffi_allocate(result)+ end+endclass CreatePoolRequestBuilder@@ -3830,6 +4117,75 @@ endreturn CreateTemplateRequestBuilder.uniffi_allocate(result)end+end++ class CreateUserApiKeyRequestBuilder++ # 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_createuserapikeyrequestbuilder,+ 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 CreateUserApiKeyRequestBuilder instance, got #{inst}"+ end+ end++ def uniffi_clone_handle()+ return FleetSdk.rust_call(+ :uniffi_cyclops_sdk_fn_clone_createuserapikeyrequestbuilder,+ @handle+ )+ end++ def self.uniffi_lower(inst)+ return inst.uniffi_clone_handle()+ end+ def initialize()+ handle = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_constructor_createuserapikeyrequestbuilder_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_createuserapikeyrequestbuilder_build,uniffi_clone_handle(),)+ return result.consumeIntoTypeCreateUserApiKeyRequest+ end+ def name(value)+ value = FleetSdk::uniffi_utf8(value)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_name,uniffi_clone_handle(),RustBuffer.allocFromString(value))+ return CreateUserApiKeyRequestBuilder.uniffi_allocate(result)+ end+ def scope(value)+ value = value.map { |v| FleetSdk::uniffi_utf8(v) }+ RustBuffer.check_lower_Sequencestring(value)+ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_scope,uniffi_clone_handle(),RustBuffer.alloc_from_Sequencestring(value))+ return CreateUserApiKeyRequestBuilder.uniffi_allocate(result)+ end+endmodule UniffiCallbackInterfaceHttpClient@@ -3921,6 +4277,174 @@ end+end++ class CyclopsTokenProviderConfigurationBuilder++ # 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_cyclopstokenproviderconfigurationbuilder,+ 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 CyclopsTokenProviderConfigurationBuilder instance, got #{inst}"+ end+ end++ def uniffi_clone_handle()+ return FleetSdk.rust_call(+ :uniffi_cyclops_sdk_fn_clone_cyclopstokenproviderconfigurationbuilder,+ @handle+ )+ end++ def self.uniffi_lower(inst)+ return inst.uniffi_clone_handle()+ end+ def initialize()+ handle = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_constructor_cyclopstokenproviderconfigurationbuilder_new,)+ @handle = handle+ ObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id))+ end++++ def base_url(value)+ value = FleetSdk::uniffi_utf8(value)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_base_url,uniffi_clone_handle(),RustBuffer.allocFromString(value))+ return CyclopsTokenProviderConfigurationBuilder.uniffi_allocate(result)+ end+ def build()+ result = FleetSdk.rust_call_with_error(SdkBuildError,:uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_build,uniffi_clone_handle(),)+ return result.consumeIntoTypeCyclopsTokenProviderConfiguration+ end+ def claim_poll_interval_ms(value)+ value = FleetSdk::uniffi_in_range(value, "u64", 0, 2**64)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms,uniffi_clone_handle(),value)+ return CyclopsTokenProviderConfigurationBuilder.uniffi_allocate(result)+ end+ def claim_poll_limit(value)+ value = FleetSdk::uniffi_in_range(value, "u32", 0, 2**32)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit,uniffi_clone_handle(),value)+ return CyclopsTokenProviderConfigurationBuilder.uniffi_allocate(result)+ end+ def pool_poll_interval_ms(value)+ value = FleetSdk::uniffi_in_range(value, "u64", 0, 2**64)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms,uniffi_clone_handle(),value)+ return CyclopsTokenProviderConfigurationBuilder.uniffi_allocate(result)+ end+ def pool_poll_limit(value)+ value = FleetSdk::uniffi_in_range(value, "u32", 0, 2**32)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit,uniffi_clone_handle(),value)+ return CyclopsTokenProviderConfigurationBuilder.uniffi_allocate(result)+ end++end++ class TemplateBuilder++ # 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_templatebuilder,+ 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 TemplateBuilder instance, got #{inst}"+ end+ end++ def uniffi_clone_handle()+ return FleetSdk.rust_call(+ :uniffi_cyclops_sdk_fn_clone_templatebuilder,+ @handle+ )+ end++ def self.uniffi_lower(inst)+ return inst.uniffi_clone_handle()+ end+ def initialize()+ handle = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_constructor_templatebuilder_new,)+ @handle = handle+ ObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id))+ end++++ def api_version(value)+ value = FleetSdk::uniffi_utf8(value)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_templatebuilder_api_version,uniffi_clone_handle(),RustBuffer.allocFromString(value))+ return TemplateBuilder.uniffi_allocate(result)+ end+ def build()+ result = FleetSdk.rust_call_with_error(SdkBuildError,:uniffi_cyclops_sdk_fn_method_templatebuilder_build,uniffi_clone_handle(),)+ return result.consumeIntoTypeTemplate+ end+ def kind(value)+ value = FleetSdk::uniffi_utf8(value)++ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_templatebuilder_kind,uniffi_clone_handle(),RustBuffer.allocFromString(value))+ return TemplateBuilder.uniffi_allocate(result)+ end+ def metadata(value)+ value = value+ RustBuffer.check_lower_TypeResourceMetadata(value)+ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_templatebuilder_metadata,uniffi_clone_handle(),RustBuffer.alloc_from_TypeResourceMetadata(value))+ return TemplateBuilder.uniffi_allocate(result)+ end+ def spec(value)+ value = value+ RustBuffer.check_lower_TypeOSGymSandboxTemplateSpec(value)+ result = FleetSdk.rust_call(:uniffi_cyclops_sdk_fn_method_templatebuilder_spec,uniffi_clone_handle(),RustBuffer.alloc_from_TypeOSGymSandboxTemplateSpec(value))+ return TemplateBuilder.uniffi_allocate(result)+ end+endenddiff --git a/libs/fleet/sdk-bindings/ruby/tests/test_builders.rb b/libs/fleet/sdk-bindings/ruby/tests/test_builders.rbindex 3a93dc1f8b..821dee49a4 100644--- a/libs/fleet/sdk-bindings/ruby/tests/test_builders.rb+++ b/libs/fleet/sdk-bindings/ruby/tests/test_builders.rb@@ -16,3 +16,26 @@ rescue FleetSdk::SchemaBuildError::MissingRequiredField => errorendlegacy = FleetSdk::SandboxTemplateRef.new(name: 'legacy')raise 'legacy constructor changed' unless legacy.name == 'legacy'+configuration = FleetSdk::CyclopsTokenProviderConfigurationBuilder.new+ .base_url('https://api.example.test')+ .pool_poll_interval_ms(5000)+ .pool_poll_limit(120)+ .claim_poll_interval_ms(5000)+ .claim_poll_limit(120)+ .build+user_key = FleetSdk::CreateUserApiKeyRequestBuilder.new.name('automation').scope([]).build+autoscaling = FleetSdk::WarmPoolAutoscalingBuilder.new+ .min_pool_size(1).initial_pool_size(2).max_pool_size(5).build+raise 'wrong polling value' unless configuration.pool_poll_interval_ms == 5000+raise 'scope default changed' unless user_key.scope.empty?+raise 'wrong autoscaling maximum' unless autoscaling.max_pool_size == 5+begin+ FleetSdk::TemplateBuilder.new.build+ raise 'missing Template field did not fail'+rescue FleetSdk::SdkBuildError::MissingRequiredField+end+begin+ FleetSdk::CreateClaimRequestBuilder.new.build+ raise 'missing claim pool did not fail'+rescue FleetSdk::SdkBuildError::MissingRequiredField+enddiff --git a/libs/fleet/sdk-bindings/swift/CyclopsSdk.swift b/libs/fleet/sdk-bindings/swift/CyclopsSdk.swiftindex 687513ac9e..3ecbc01f69 100644--- a/libs/fleet/sdk-bindings/swift/CyclopsSdk.swift+++ b/libs/fleet/sdk-bindings/swift/CyclopsSdk.swift@@ -770,6 +770,162 @@ public func FfiConverterTypeAccessTokenProvider_lower(_ value: AccessTokenProvid+public protocol CreateClaimRequestBuilderProtocol: AnyObject, Sendable {++ func build() throws -> CreateClaimRequest++ func name(value: String) -> CreateClaimRequestBuilder++ func pool(value: Pool) -> CreateClaimRequestBuilder++ func spec(value: ClaimSpec) -> CreateClaimRequestBuilder++}+open class CreateClaimRequestBuilder: CreateClaimRequestBuilderProtocol, @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_createclaimrequestbuilder(self.handle, $0) }+ }+public convenience init() {+ let handle =+ try! rustCall() {+ uniffi_cyclops_sdk_fn_constructor_createclaimrequestbuilder_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_createclaimrequestbuilder(handle, $0) }+ }+++++open func build()throws -> CreateClaimRequest {+ return try FfiConverterTypeCreateClaimRequest_lift(try rustCallWithError(FfiConverterTypeSdkBuildError_lift) {+ uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_build(+ self.uniffiCloneHandle(),$0+ )+})+}++open func name(value: String) -> CreateClaimRequestBuilder {+ return try! FfiConverterTypeCreateClaimRequestBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_name(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(value),$0+ )+})+}++open func pool(value: Pool) -> CreateClaimRequestBuilder {+ return try! FfiConverterTypeCreateClaimRequestBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_pool(+ self.uniffiCloneHandle(),+ FfiConverterTypePool_lower(value),$0+ )+})+}++open func spec(value: ClaimSpec) -> CreateClaimRequestBuilder {+ return try! FfiConverterTypeCreateClaimRequestBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_spec(+ self.uniffiCloneHandle(),+ FfiConverterTypeClaimSpec_lower(value),$0+ )+})+}++++}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeCreateClaimRequestBuilder: FfiConverter {+ typealias FfiType = UInt64+ typealias SwiftType = CreateClaimRequestBuilder++ public static func lift(_ handle: UInt64) throws -> CreateClaimRequestBuilder {+ return CreateClaimRequestBuilder(unsafeFromHandle: handle)+ }++ public static func lower(_ value: CreateClaimRequestBuilder) -> UInt64 {+ return value.uniffiCloneHandle()+ }++ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CreateClaimRequestBuilder {+ let handle: UInt64 = try readInt(&buf)+ return try lift(handle)+ }++ public static func write(_ value: CreateClaimRequestBuilder, into buf: inout [UInt8]) {+ writeInt(&buf, lower(value))+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeCreateClaimRequestBuilder_lift(_ handle: UInt64) throws -> CreateClaimRequestBuilder {+ return try FfiConverterTypeCreateClaimRequestBuilder.lift(handle)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeCreateClaimRequestBuilder_lower(_ value: CreateClaimRequestBuilder) -> UInt64 {+ return FfiConverterTypeCreateClaimRequestBuilder.lower(value)+}++++++public protocol CreatePoolRequestBuilderProtocol: AnyObject, Sendable {func build() throws -> CreatePoolRequest@@ -1071,6 +1227,151 @@ public func FfiConverterTypeCreateTemplateRequestBuilder_lower(_ value: CreateTe+public protocol CreateUserApiKeyRequestBuilderProtocol: AnyObject, Sendable {++ func build() throws -> CreateUserApiKeyRequest++ func name(value: String) -> CreateUserApiKeyRequestBuilder++ func scope(value: [String]) -> CreateUserApiKeyRequestBuilder++}+open class CreateUserApiKeyRequestBuilder: CreateUserApiKeyRequestBuilderProtocol, @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_createuserapikeyrequestbuilder(self.handle, $0) }+ }+public convenience init() {+ let handle =+ try! rustCall() {+ uniffi_cyclops_sdk_fn_constructor_createuserapikeyrequestbuilder_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_createuserapikeyrequestbuilder(handle, $0) }+ }+++++open func build()throws -> CreateUserApiKeyRequest {+ return try FfiConverterTypeCreateUserApiKeyRequest_lift(try rustCallWithError(FfiConverterTypeSdkBuildError_lift) {+ uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_build(+ self.uniffiCloneHandle(),$0+ )+})+}++open func name(value: String) -> CreateUserApiKeyRequestBuilder {+ return try! FfiConverterTypeCreateUserApiKeyRequestBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_name(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(value),$0+ )+})+}++open func scope(value: [String]) -> CreateUserApiKeyRequestBuilder {+ return try! FfiConverterTypeCreateUserApiKeyRequestBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_scope(+ self.uniffiCloneHandle(),+ FfiConverterSequenceString.lower(value),$0+ )+})+}++++}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeCreateUserApiKeyRequestBuilder: FfiConverter {+ typealias FfiType = UInt64+ typealias SwiftType = CreateUserApiKeyRequestBuilder++ public static func lift(_ handle: UInt64) throws -> CreateUserApiKeyRequestBuilder {+ return CreateUserApiKeyRequestBuilder(unsafeFromHandle: handle)+ }++ public static func lower(_ value: CreateUserApiKeyRequestBuilder) -> UInt64 {+ return value.uniffiCloneHandle()+ }++ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CreateUserApiKeyRequestBuilder {+ let handle: UInt64 = try readInt(&buf)+ return try lift(handle)+ }++ public static func write(_ value: CreateUserApiKeyRequestBuilder, into buf: inout [UInt8]) {+ writeInt(&buf, lower(value))+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeCreateUserApiKeyRequestBuilder_lift(_ handle: UInt64) throws -> CreateUserApiKeyRequestBuilder {+ return try FfiConverterTypeCreateUserApiKeyRequestBuilder.lift(handle)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeCreateUserApiKeyRequestBuilder_lower(_ value: CreateUserApiKeyRequestBuilder) -> UInt64 {+ return FfiConverterTypeCreateUserApiKeyRequestBuilder.lower(value)+}++++++public protocol CyclopsClientProtocol: AnyObject, Sendable {func createClaim(request: CreateClaimRequest) async throws -> Claim@@ -1652,24 +1953,139 @@ open func listUserApiKeys()async throws -> [UserApiKey] {#if swift(>=5.8)@_documentation(visibility: private)#endif-public struct FfiConverterTypeCyclopsClient: FfiConverter {+public struct FfiConverterTypeCyclopsClient: FfiConverter {+ typealias FfiType = UInt64+ typealias SwiftType = CyclopsClient++ public static func lift(_ handle: UInt64) throws -> CyclopsClient {+ return CyclopsClient(unsafeFromHandle: handle)+ }++ public static func lower(_ value: CyclopsClient) -> UInt64 {+ return value.uniffiCloneHandle()+ }++ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CyclopsClient {+ let handle: UInt64 = try readInt(&buf)+ return try lift(handle)+ }++ public static func write(_ value: CyclopsClient, into buf: inout [UInt8]) {+ writeInt(&buf, lower(value))+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeCyclopsClient_lift(_ handle: UInt64) throws -> CyclopsClient {+ return try FfiConverterTypeCyclopsClient.lift(handle)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeCyclopsClient_lower(_ value: CyclopsClient) -> UInt64 {+ return FfiConverterTypeCyclopsClient.lower(value)+}+++++++public protocol CyclopsCredentialsProtocol: AnyObject, Sendable {++}+open class CyclopsCredentials: CyclopsCredentialsProtocol, @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_cyclopscredentials(self.handle, $0) }+ }+public convenience init(clientId: String, clientSecret: String) {+ let handle =+ try! rustCall() {+ uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(+ FfiConverterString.lower(clientId),+ FfiConverterString.lower(clientSecret),$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_cyclopscredentials(handle, $0) }+ }+++++++}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeCyclopsCredentials: FfiConverter {typealias FfiType = UInt64- typealias SwiftType = CyclopsClient+ typealias SwiftType = CyclopsCredentials- public static func lift(_ handle: UInt64) throws -> CyclopsClient {- return CyclopsClient(unsafeFromHandle: handle)+ public static func lift(_ handle: UInt64) throws -> CyclopsCredentials {+ return CyclopsCredentials(unsafeFromHandle: handle)}- public static func lower(_ value: CyclopsClient) -> UInt64 {+ public static func lower(_ value: CyclopsCredentials) -> UInt64 {return value.uniffiCloneHandle()}- public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CyclopsClient {+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CyclopsCredentials {let handle: UInt64 = try readInt(&buf)return try lift(handle)}- public static func write(_ value: CyclopsClient, into buf: inout [UInt8]) {+ public static func write(_ value: CyclopsCredentials, into buf: inout [UInt8]) {writeInt(&buf, lower(value))}}@@ -1678,15 +2094,15 @@ public struct FfiConverterTypeCyclopsClient: FfiConverter {#if swift(>=5.8)@_documentation(visibility: private)#endif-public func FfiConverterTypeCyclopsClient_lift(_ handle: UInt64) throws -> CyclopsClient {- return try FfiConverterTypeCyclopsClient.lift(handle)+public func FfiConverterTypeCyclopsCredentials_lift(_ handle: UInt64) throws -> CyclopsCredentials {+ return try FfiConverterTypeCyclopsCredentials.lift(handle)}#if swift(>=5.8)@_documentation(visibility: private)#endif-public func FfiConverterTypeCyclopsClient_lower(_ value: CyclopsClient) -> UInt64 {- return FfiConverterTypeCyclopsClient.lower(value)+public func FfiConverterTypeCyclopsCredentials_lower(_ value: CyclopsCredentials) -> UInt64 {+ return FfiConverterTypeCyclopsCredentials.lower(value)}@@ -1694,10 +2110,22 @@ public func FfiConverterTypeCyclopsClient_lower(_ value: CyclopsClient) -> UInt6-public protocol CyclopsCredentialsProtocol: AnyObject, Sendable {+public protocol CyclopsTokenProviderConfigurationBuilderProtocol: AnyObject, Sendable {++ func baseUrl(value: String) -> CyclopsTokenProviderConfigurationBuilder++ func build() throws -> CyclopsTokenProviderConfiguration++ func claimPollIntervalMs(value: UInt64) -> CyclopsTokenProviderConfigurationBuilder++ func claimPollLimit(value: UInt32) -> CyclopsTokenProviderConfigurationBuilder++ func poolPollIntervalMs(value: UInt64) -> CyclopsTokenProviderConfigurationBuilder++ func poolPollLimit(value: UInt32) -> CyclopsTokenProviderConfigurationBuilder}-open class CyclopsCredentials: CyclopsCredentialsProtocol, @unchecked Sendable {+open class CyclopsTokenProviderConfigurationBuilder: CyclopsTokenProviderConfigurationBuilderProtocol, @unchecked Sendable {fileprivate let handle: UInt64/// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly.@@ -1734,14 +2162,12 @@ open class CyclopsCredentials: CyclopsCredentialsProtocol, @unchecked Sendable {@_documentation(visibility: private)#endifpublic func uniffiCloneHandle() -> UInt64 {- return try! rustCall { uniffi_cyclops_sdk_fn_clone_cyclopscredentials(self.handle, $0) }+ return try! rustCall { uniffi_cyclops_sdk_fn_clone_cyclopstokenproviderconfigurationbuilder(self.handle, $0) }}-public convenience init(clientId: String, clientSecret: String) {+public convenience init() {let handle =try! rustCall() {- uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(- FfiConverterString.lower(clientId),- FfiConverterString.lower(clientSecret),$0+ uniffi_cyclops_sdk_fn_constructor_cyclopstokenproviderconfigurationbuilder_new($0)}self.init(unsafeFromHandle: handle)@@ -1753,12 +2179,65 @@ public convenience init(clientId: String, clientSecret: String) {return}- try! rustCall { uniffi_cyclops_sdk_fn_free_cyclopscredentials(handle, $0) }+ try! rustCall { uniffi_cyclops_sdk_fn_free_cyclopstokenproviderconfigurationbuilder(handle, $0) }}+open func baseUrl(value: String) -> CyclopsTokenProviderConfigurationBuilder {+ return try! FfiConverterTypeCyclopsTokenProviderConfigurationBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_base_url(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(value),$0+ )+})+}++open func build()throws -> CyclopsTokenProviderConfiguration {+ return try FfiConverterTypeCyclopsTokenProviderConfiguration_lift(try rustCallWithError(FfiConverterTypeSdkBuildError_lift) {+ uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_build(+ self.uniffiCloneHandle(),$0+ )+})+}++open func claimPollIntervalMs(value: UInt64) -> CyclopsTokenProviderConfigurationBuilder {+ return try! FfiConverterTypeCyclopsTokenProviderConfigurationBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms(+ self.uniffiCloneHandle(),+ FfiConverterUInt64.lower(value),$0+ )+})+}++open func claimPollLimit(value: UInt32) -> CyclopsTokenProviderConfigurationBuilder {+ return try! FfiConverterTypeCyclopsTokenProviderConfigurationBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit(+ self.uniffiCloneHandle(),+ FfiConverterUInt32.lower(value),$0+ )+})+}++open func poolPollIntervalMs(value: UInt64) -> CyclopsTokenProviderConfigurationBuilder {+ return try! FfiConverterTypeCyclopsTokenProviderConfigurationBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms(+ self.uniffiCloneHandle(),+ FfiConverterUInt64.lower(value),$0+ )+})+}++open func poolPollLimit(value: UInt32) -> CyclopsTokenProviderConfigurationBuilder {+ return try! FfiConverterTypeCyclopsTokenProviderConfigurationBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit(+ self.uniffiCloneHandle(),+ FfiConverterUInt32.lower(value),$0+ )+})+}+}@@ -1767,24 +2246,24 @@ public convenience init(clientId: String, clientSecret: String) {#if swift(>=5.8)@_documentation(visibility: private)#endif-public struct FfiConverterTypeCyclopsCredentials: FfiConverter {+public struct FfiConverterTypeCyclopsTokenProviderConfigurationBuilder: FfiConverter {typealias FfiType = UInt64- typealias SwiftType = CyclopsCredentials+ typealias SwiftType = CyclopsTokenProviderConfigurationBuilder- public static func lift(_ handle: UInt64) throws -> CyclopsCredentials {- return CyclopsCredentials(unsafeFromHandle: handle)+ public static func lift(_ handle: UInt64) throws -> CyclopsTokenProviderConfigurationBuilder {+ return CyclopsTokenProviderConfigurationBuilder(unsafeFromHandle: handle)}- public static func lower(_ value: CyclopsCredentials) -> UInt64 {+ public static func lower(_ value: CyclopsTokenProviderConfigurationBuilder) -> UInt64 {return value.uniffiCloneHandle()}- public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CyclopsCredentials {+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CyclopsTokenProviderConfigurationBuilder {let handle: UInt64 = try readInt(&buf)return try lift(handle)}- public static func write(_ value: CyclopsCredentials, into buf: inout [UInt8]) {+ public static func write(_ value: CyclopsTokenProviderConfigurationBuilder, into buf: inout [UInt8]) {writeInt(&buf, lower(value))}}@@ -1793,15 +2272,15 @@ public struct FfiConverterTypeCyclopsCredentials: FfiConverter {#if swift(>=5.8)@_documentation(visibility: private)#endif-public func FfiConverterTypeCyclopsCredentials_lift(_ handle: UInt64) throws -> CyclopsCredentials {- return try FfiConverterTypeCyclopsCredentials.lift(handle)+public func FfiConverterTypeCyclopsTokenProviderConfigurationBuilder_lift(_ handle: UInt64) throws -> CyclopsTokenProviderConfigurationBuilder {+ return try FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(handle)}#if swift(>=5.8)@_documentation(visibility: private)#endif-public func FfiConverterTypeCyclopsCredentials_lower(_ value: CyclopsCredentials) -> UInt64 {- return FfiConverterTypeCyclopsCredentials.lower(value)+public func FfiConverterTypeCyclopsTokenProviderConfigurationBuilder_lower(_ value: CyclopsTokenProviderConfigurationBuilder) -> UInt64 {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lower(value)}@@ -2021,6 +2500,173 @@ public func FfiConverterTypeHttpClient_lower(_ value: HttpClient) -> UInt64 {+++public protocol TemplateBuilderProtocol: AnyObject, Sendable {++ func apiVersion(value: String) -> TemplateBuilder++ func build() throws -> Template++ func kind(value: String) -> TemplateBuilder++ func metadata(value: ResourceMetadata) -> TemplateBuilder++ func spec(value: OsGymSandboxTemplateSpec) -> TemplateBuilder++}+open class TemplateBuilder: TemplateBuilderProtocol, @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_templatebuilder(self.handle, $0) }+ }+public convenience init() {+ let handle =+ try! rustCall() {+ uniffi_cyclops_sdk_fn_constructor_templatebuilder_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_templatebuilder(handle, $0) }+ }+++++open func apiVersion(value: String) -> TemplateBuilder {+ return try! FfiConverterTypeTemplateBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_templatebuilder_api_version(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(value),$0+ )+})+}++open func build()throws -> Template {+ return try FfiConverterTypeTemplate_lift(try rustCallWithError(FfiConverterTypeSdkBuildError_lift) {+ uniffi_cyclops_sdk_fn_method_templatebuilder_build(+ self.uniffiCloneHandle(),$0+ )+})+}++open func kind(value: String) -> TemplateBuilder {+ return try! FfiConverterTypeTemplateBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_templatebuilder_kind(+ self.uniffiCloneHandle(),+ FfiConverterString.lower(value),$0+ )+})+}++open func metadata(value: ResourceMetadata) -> TemplateBuilder {+ return try! FfiConverterTypeTemplateBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_templatebuilder_metadata(+ self.uniffiCloneHandle(),+ FfiConverterTypeResourceMetadata_lower(value),$0+ )+})+}++open func spec(value: OsGymSandboxTemplateSpec) -> TemplateBuilder {+ return try! FfiConverterTypeTemplateBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_fn_method_templatebuilder_spec(+ self.uniffiCloneHandle(),+ FfiConverterTypeOSGymSandboxTemplateSpec_lower(value),$0+ )+})+}++++}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeTemplateBuilder: FfiConverter {+ typealias FfiType = UInt64+ typealias SwiftType = TemplateBuilder++ public static func lift(_ handle: UInt64) throws -> TemplateBuilder {+ return TemplateBuilder(unsafeFromHandle: handle)+ }++ public static func lower(_ value: TemplateBuilder) -> UInt64 {+ return value.uniffiCloneHandle()+ }++ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TemplateBuilder {+ let handle: UInt64 = try readInt(&buf)+ return try lift(handle)+ }++ public static func write(_ value: TemplateBuilder, into buf: inout [UInt8]) {+ writeInt(&buf, lower(value))+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeTemplateBuilder_lift(_ handle: UInt64) throws -> TemplateBuilder {+ return try FfiConverterTypeTemplateBuilder.lift(handle)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeTemplateBuilder_lower(_ value: TemplateBuilder) -> UInt64 {+ return FfiConverterTypeTemplateBuilder.lower(value)+}++++public struct Claim: Equatable, Hashable {public var apiVersion: Stringpublic var kind: String@@ -4058,6 +4704,18 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_checksum_method_httpclient_execute() != 38803) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build() != 10518) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name() != 19762) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool() != 7405) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec() != 28263) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_build() != 60558) {return InitializationResult.apiChecksumMismatch}@@ -4079,6 +4737,48 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_spec() != 29902) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build() != 18677) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name() != 53365) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope() != 26616) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url() != 48016) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build() != 28182) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms() != 50054) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit() != 7533) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms() != 16373) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit() != 6865) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version() != 65471) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_templatebuilder_build() != 2046) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_templatebuilder_kind() != 14122) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata() != 25572) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_method_templatebuilder_spec() != 43128) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() != 54404) {return InitializationResult.apiChecksumMismatch}@@ -4100,15 +4800,27 @@ 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_createclaimrequestbuilder_new() != 10967) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new() != 33658) {return InitializationResult.apiChecksumMismatch}if (uniffi_cyclops_sdk_checksum_constructor_createtemplaterequestbuilder_new() != 6787) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new() != 47741) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() != 25746) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new() != 43069) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new() != 19815) {+ return InitializationResult.apiChecksumMismatch+ }uniffiCallbackInitAccessTokenProvider()uniffiCallbackInitHttpClient()diff --git a/libs/fleet/sdk-bindings/swift/CyclopsSdkFFI.h b/libs/fleet/sdk-bindings/swift/CyclopsSdkFFI.hindex fa97dea28b..ed59a62d35 100644--- a/libs/fleet/sdk-bindings/swift/CyclopsSdkFFI.h+++ b/libs/fleet/sdk-bindings/swift/CyclopsSdkFFI.h@@ -473,6 +473,42 @@ void uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(const UniffiVTableCaluint64_t uniffi_cyclops_sdk_fn_method_httpclient_execute(uint64_t ptr, RustBuffer request);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CREATECLAIMREQUESTBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CREATECLAIMREQUESTBUILDER+uint64_t uniffi_cyclops_sdk_fn_clone_createclaimrequestbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CREATECLAIMREQUESTBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CREATECLAIMREQUESTBUILDER+void uniffi_cyclops_sdk_fn_free_createclaimrequestbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CREATECLAIMREQUESTBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CREATECLAIMREQUESTBUILDER_NEW+uint64_t uniffi_cyclops_sdk_fn_constructor_createclaimrequestbuilder_new(RustCallStatus *_Nonnull out_status++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATECLAIMREQUESTBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATECLAIMREQUESTBUILDER_BUILD+RustBuffer uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_build(uint64_t ptr, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATECLAIMREQUESTBUILDER_NAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATECLAIMREQUESTBUILDER_NAME+uint64_t uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_name(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATECLAIMREQUESTBUILDER_POOL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATECLAIMREQUESTBUILDER_POOL+uint64_t uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_pool(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATECLAIMREQUESTBUILDER_SPEC+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATECLAIMREQUESTBUILDER_SPEC+uint64_t uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_spec(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CREATEPOOLREQUESTBUILDER#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CREATEPOOLREQUESTBUILDERuint64_t uniffi_cyclops_sdk_fn_clone_createpoolrequestbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status@@ -540,6 +576,37 @@ uint64_t uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_namespace(uinuint64_t uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_spec(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CREATEUSERAPIKEYREQUESTBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CREATEUSERAPIKEYREQUESTBUILDER+uint64_t uniffi_cyclops_sdk_fn_clone_createuserapikeyrequestbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CREATEUSERAPIKEYREQUESTBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CREATEUSERAPIKEYREQUESTBUILDER+void uniffi_cyclops_sdk_fn_free_createuserapikeyrequestbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CREATEUSERAPIKEYREQUESTBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CREATEUSERAPIKEYREQUESTBUILDER_NEW+uint64_t uniffi_cyclops_sdk_fn_constructor_createuserapikeyrequestbuilder_new(RustCallStatus *_Nonnull out_status++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_BUILD+RustBuffer uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_build(uint64_t ptr, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_NAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_NAME+uint64_t uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_name(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_SCOPE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_SCOPE+uint64_t uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_scope(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CYCLOPSCREDENTIALS#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CYCLOPSCREDENTIALSuint64_t uniffi_cyclops_sdk_fn_clone_cyclopscredentials(uint64_t handle, RustCallStatus *_Nonnull out_status@@ -555,6 +622,93 @@ void uniffi_cyclops_sdk_fn_free_cyclopscredentials(uint64_t handle, RustCallStatuint64_t uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(RustBuffer client_id, RustBuffer client_secret, RustCallStatus *_Nonnull out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER+uint64_t uniffi_cyclops_sdk_fn_clone_cyclopstokenproviderconfigurationbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER+void uniffi_cyclops_sdk_fn_free_cyclopstokenproviderconfigurationbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_NEW+uint64_t uniffi_cyclops_sdk_fn_constructor_cyclopstokenproviderconfigurationbuilder_new(RustCallStatus *_Nonnull out_status++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_BASE_URL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_BASE_URL+uint64_t uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_base_url(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_BUILD+RustBuffer uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_build(uint64_t ptr, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_CLAIM_POLL_INTERVAL_MS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_CLAIM_POLL_INTERVAL_MS+uint64_t uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms(uint64_t ptr, uint64_t value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_CLAIM_POLL_LIMIT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_CLAIM_POLL_LIMIT+uint64_t uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit(uint64_t ptr, uint32_t value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_POOL_POLL_INTERVAL_MS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_POOL_POLL_INTERVAL_MS+uint64_t uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms(uint64_t ptr, uint64_t value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_POOL_POLL_LIMIT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_POOL_POLL_LIMIT+uint64_t uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit(uint64_t ptr, uint32_t value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_TEMPLATEBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_TEMPLATEBUILDER+uint64_t uniffi_cyclops_sdk_fn_clone_templatebuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_TEMPLATEBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_TEMPLATEBUILDER+void uniffi_cyclops_sdk_fn_free_templatebuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_TEMPLATEBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_TEMPLATEBUILDER_NEW+uint64_t uniffi_cyclops_sdk_fn_constructor_templatebuilder_new(RustCallStatus *_Nonnull out_status++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_TEMPLATEBUILDER_API_VERSION+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_TEMPLATEBUILDER_API_VERSION+uint64_t uniffi_cyclops_sdk_fn_method_templatebuilder_api_version(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_TEMPLATEBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_TEMPLATEBUILDER_BUILD+RustBuffer uniffi_cyclops_sdk_fn_method_templatebuilder_build(uint64_t ptr, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_TEMPLATEBUILDER_KIND+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_TEMPLATEBUILDER_KIND+uint64_t uniffi_cyclops_sdk_fn_method_templatebuilder_kind(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_TEMPLATEBUILDER_METADATA+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_TEMPLATEBUILDER_METADATA+uint64_t uniffi_cyclops_sdk_fn_method_templatebuilder_metadata(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_TEMPLATEBUILDER_SPEC+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_TEMPLATEBUILDER_SPEC+uint64_t uniffi_cyclops_sdk_fn_method_templatebuilder_spec(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUSTBUFFER_ALLOC#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUSTBUFFER_ALLOCRustBuffer ffi_cyclops_sdk_rustbuffer_alloc(uint64_t size, RustCallStatus *_Nonnull out_status@@ -963,6 +1117,30 @@ uint16_t uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_HTTPCLIENT_EXECUTEuint16_t uniffi_cyclops_sdk_checksum_method_httpclient_execute(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATECLAIMREQUESTBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATECLAIMREQUESTBUILDER_BUILD+uint16_t uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATECLAIMREQUESTBUILDER_NAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATECLAIMREQUESTBUILDER_NAME+uint16_t uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATECLAIMREQUESTBUILDER_POOL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATECLAIMREQUESTBUILDER_POOL+uint16_t uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATECLAIMREQUESTBUILDER_SPEC+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATECLAIMREQUESTBUILDER_SPEC+uint16_t uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEPOOLREQUESTBUILDER_BUILD@@ -1005,6 +1183,90 @@ uint16_t uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_namespa#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATETEMPLATEREQUESTBUILDER_SPECuint16_t uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_spec(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_BUILD+uint16_t uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_NAME+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_NAME+uint16_t uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_SCOPE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CREATEUSERAPIKEYREQUESTBUILDER_SCOPE+uint16_t uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_BASE_URL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_BASE_URL+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_BUILD+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_CLAIM_POLL_INTERVAL_MS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_CLAIM_POLL_INTERVAL_MS+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_CLAIM_POLL_LIMIT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_CLAIM_POLL_LIMIT+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_POOL_POLL_INTERVAL_MS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_POOL_POLL_INTERVAL_MS+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_POOL_POLL_LIMIT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_POOL_POLL_LIMIT+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_TEMPLATEBUILDER_API_VERSION+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_TEMPLATEBUILDER_API_VERSION+uint16_t uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_TEMPLATEBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_TEMPLATEBUILDER_BUILD+uint16_t uniffi_cyclops_sdk_checksum_method_templatebuilder_build(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_TEMPLATEBUILDER_KIND+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_TEMPLATEBUILDER_KIND+uint16_t uniffi_cyclops_sdk_checksum_method_templatebuilder_kind(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_TEMPLATEBUILDER_METADATA+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_TEMPLATEBUILDER_METADATA+uint16_t uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_TEMPLATEBUILDER_SPEC+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_TEMPLATEBUILDER_SPEC+uint16_t uniffi_cyclops_sdk_checksum_method_templatebuilder_spec(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSCLIENT_CONNECT@@ -1047,6 +1309,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_CREATECLAIMREQUESTBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATECLAIMREQUESTBUILDER_NEW+uint16_t uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATEPOOLREQUESTBUILDER_NEW@@ -1059,12 +1327,30 @@ uint16_t uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new(vo#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATETEMPLATEREQUESTBUILDER_NEWuint16_t uniffi_cyclops_sdk_checksum_constructor_createtemplaterequestbuilder_new(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATEUSERAPIKEYREQUESTBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CREATEUSERAPIKEYREQUESTBUILDER_NEW+uint16_t uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSCREDENTIALS_NEW#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSCREDENTIALS_NEWuint16_t uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSTOKENPROVIDERCONFIGURATIONBUILDER_NEW+uint16_t uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_TEMPLATEBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_TEMPLATEBUILDER_NEW+uint16_t uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new(void+);#endif#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_UNIFFI_CONTRACT_VERSIONdiff --git a/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swift b/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swiftindex 81ea8233f9..970a794ff8 100644--- a/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swift+++ b/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swift@@ -1495,6 +1495,162 @@ public func FfiConverterTypeVmTemplateBuilder_lower(_ value: VmTemplateBuilder)+++public protocol WarmPoolAutoscalingBuilderProtocol: AnyObject, Sendable {++ func build() throws -> WarmPoolAutoscaling++ func initialPoolSize(value: UInt32) -> WarmPoolAutoscalingBuilder++ func maxPoolSize(value: UInt32) -> WarmPoolAutoscalingBuilder++ func minPoolSize(value: UInt32) -> WarmPoolAutoscalingBuilder++}+open class WarmPoolAutoscalingBuilder: WarmPoolAutoscalingBuilderProtocol, @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_schema_fn_clone_warmpoolautoscalingbuilder(self.handle, $0) }+ }+public convenience init() {+ let handle =+ try! rustCall() {+ uniffi_cyclops_sdk_schema_fn_constructor_warmpoolautoscalingbuilder_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_schema_fn_free_warmpoolautoscalingbuilder(handle, $0) }+ }+++++open func build()throws -> WarmPoolAutoscaling {+ return try FfiConverterTypeWarmPoolAutoscaling_lift(try rustCallWithError(FfiConverterTypeSchemaBuildError_lift) {+ uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build(+ self.uniffiCloneHandle(),$0+ )+})+}++open func initialPoolSize(value: UInt32) -> WarmPoolAutoscalingBuilder {+ return try! FfiConverterTypeWarmPoolAutoscalingBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size(+ self.uniffiCloneHandle(),+ FfiConverterUInt32.lower(value),$0+ )+})+}++open func maxPoolSize(value: UInt32) -> WarmPoolAutoscalingBuilder {+ return try! FfiConverterTypeWarmPoolAutoscalingBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size(+ self.uniffiCloneHandle(),+ FfiConverterUInt32.lower(value),$0+ )+})+}++open func minPoolSize(value: UInt32) -> WarmPoolAutoscalingBuilder {+ return try! FfiConverterTypeWarmPoolAutoscalingBuilder_lift(try! rustCall() {+ uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size(+ self.uniffiCloneHandle(),+ FfiConverterUInt32.lower(value),$0+ )+})+}++++}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeWarmPoolAutoscalingBuilder: FfiConverter {+ typealias FfiType = UInt64+ typealias SwiftType = WarmPoolAutoscalingBuilder++ public static func lift(_ handle: UInt64) throws -> WarmPoolAutoscalingBuilder {+ return WarmPoolAutoscalingBuilder(unsafeFromHandle: handle)+ }++ public static func lower(_ value: WarmPoolAutoscalingBuilder) -> UInt64 {+ return value.uniffiCloneHandle()+ }++ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WarmPoolAutoscalingBuilder {+ let handle: UInt64 = try readInt(&buf)+ return try lift(handle)+ }++ public static func write(_ value: WarmPoolAutoscalingBuilder, into buf: inout [UInt8]) {+ writeInt(&buf, lower(value))+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeWarmPoolAutoscalingBuilder_lift(_ handle: UInt64) throws -> WarmPoolAutoscalingBuilder {+ return try FfiConverterTypeWarmPoolAutoscalingBuilder.lift(handle)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeWarmPoolAutoscalingBuilder_lower(_ value: WarmPoolAutoscalingBuilder) -> UInt64 {+ return FfiConverterTypeWarmPoolAutoscalingBuilder.lower(value)+}++++public struct ClaimLifecycle: Equatable, Hashable {public var shutdownTime: String?public var shutdownPolicy: String?@@ -3485,6 +3641,18 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref() != 7198) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build() != 17132) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size() != 56913) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size() != 18359) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size() != 46153) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cyclops_sdk_schema_checksum_constructor_sandboxservicebuilder_new() != 21082) {return InitializationResult.apiChecksumMismatch}@@ -3503,6 +3671,9 @@ private let initializationResult: InitializationResult = {if (uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxwarmpoolspecbuilder_new() != 26063) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new() != 25769) {+ return InitializationResult.apiChecksumMismatch+ }return InitializationResult.ok}()diff --git a/libs/fleet/sdk-bindings/swift/CyclopsSdkSchemaFFI.h b/libs/fleet/sdk-bindings/swift/CyclopsSdkSchemaFFI.hindex e8fbe1ba45..787fa7fd88 100644--- a/libs/fleet/sdk-bindings/swift/CyclopsSdkSchemaFFI.h+++ b/libs/fleet/sdk-bindings/swift/CyclopsSdkSchemaFFI.h@@ -478,6 +478,42 @@ uint64_t uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_repuint64_t uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref(uint64_t ptr, RustBuffer value, RustCallStatus *_Nonnull out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_CLONE_WARMPOOLAUTOSCALINGBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_CLONE_WARMPOOLAUTOSCALINGBUILDER+uint64_t uniffi_cyclops_sdk_schema_fn_clone_warmpoolautoscalingbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_FREE_WARMPOOLAUTOSCALINGBUILDER+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_FREE_WARMPOOLAUTOSCALINGBUILDER+void uniffi_cyclops_sdk_schema_fn_free_warmpoolautoscalingbuilder(uint64_t handle, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_CONSTRUCTOR_WARMPOOLAUTOSCALINGBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_CONSTRUCTOR_WARMPOOLAUTOSCALINGBUILDER_NEW+uint64_t uniffi_cyclops_sdk_schema_fn_constructor_warmpoolautoscalingbuilder_new(RustCallStatus *_Nonnull out_status++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_WARMPOOLAUTOSCALINGBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_WARMPOOLAUTOSCALINGBUILDER_BUILD+RustBuffer uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build(uint64_t ptr, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_WARMPOOLAUTOSCALINGBUILDER_INITIAL_POOL_SIZE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_WARMPOOLAUTOSCALINGBUILDER_INITIAL_POOL_SIZE+uint64_t uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size(uint64_t ptr, uint32_t value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_WARMPOOLAUTOSCALINGBUILDER_MAX_POOL_SIZE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_WARMPOOLAUTOSCALINGBUILDER_MAX_POOL_SIZE+uint64_t uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size(uint64_t ptr, uint32_t value, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_WARMPOOLAUTOSCALINGBUILDER_MIN_POOL_SIZE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_WARMPOOLAUTOSCALINGBUILDER_MIN_POOL_SIZE+uint64_t uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size(uint64_t ptr, uint32_t value, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUSTBUFFER_ALLOC#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUSTBUFFER_ALLOCRustBuffer ffi_cyclops_sdk_schema_rustbuffer_alloc(uint64_t size, RustCallStatus *_Nonnull out_status@@ -904,6 +940,30 @@ uint16_t uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuild#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_OSGYMSANDBOXWARMPOOLSPECBUILDER_SANDBOX_TEMPLATE_REFuint16_t uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_WARMPOOLAUTOSCALINGBUILDER_BUILD+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_WARMPOOLAUTOSCALINGBUILDER_BUILD+uint16_t uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_WARMPOOLAUTOSCALINGBUILDER_INITIAL_POOL_SIZE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_WARMPOOLAUTOSCALINGBUILDER_INITIAL_POOL_SIZE+uint16_t uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_WARMPOOLAUTOSCALINGBUILDER_MAX_POOL_SIZE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_WARMPOOLAUTOSCALINGBUILDER_MAX_POOL_SIZE+uint16_t uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_WARMPOOLAUTOSCALINGBUILDER_MIN_POOL_SIZE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_WARMPOOLAUTOSCALINGBUILDER_MIN_POOL_SIZE+uint16_t uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_CONSTRUCTOR_SANDBOXSERVICEBUILDER_NEW@@ -940,6 +1000,12 @@ uint16_t uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxtemplatespec#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_CONSTRUCTOR_OSGYMSANDBOXWARMPOOLSPECBUILDER_NEWuint16_t uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxwarmpoolspecbuilder_new(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_CONSTRUCTOR_WARMPOOLAUTOSCALINGBUILDER_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_CONSTRUCTOR_WARMPOOLAUTOSCALINGBUILDER_NEW+uint16_t uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new(void+);#endif#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_UNIFFI_CONTRACT_VERSIONdiff --git a/libs/fleet/sdk-bindings/swift/tests/TestBuilders.swift b/libs/fleet/sdk-bindings/swift/tests/TestBuilders.swiftindex 9508c3395f..19bd690a90 100644--- a/libs/fleet/sdk-bindings/swift/tests/TestBuilders.swift+++ b/libs/fleet/sdk-bindings/swift/tests/TestBuilders.swift@@ -36,5 +36,36 @@ import Foundationlet legacy = SandboxTemplateRef(name: "legacy")precondition(legacy.name == "legacy")++ let configuration = try CyclopsTokenProviderConfigurationBuilder()+ .baseUrl(value: "https://api.example.test")+ .poolPollIntervalMs(value: 5000)+ .poolPollLimit(value: 120)+ .claimPollIntervalMs(value: 5000)+ .claimPollLimit(value: 120)+ .build()+ let userKey = try CreateUserApiKeyRequestBuilder()+ .name(value: "automation")+ .scope(value: [])+ .build()+ let autoscaling = try WarmPoolAutoscalingBuilder()+ .minPoolSize(value: 1)+ .initialPoolSize(value: 2)+ .maxPoolSize(value: 5)+ .build()++ precondition(configuration.poolPollIntervalMs == 5000)+ precondition(userKey.scope.isEmpty)+ precondition(autoscaling.maxPoolSize == 5)+ do {+ _ = try TemplateBuilder().build()+ fatalError("missing Template field did not fail")+ } catch SdkBuildError.MissingRequiredField(_, _) {+ }+ do {+ _ = try CreateClaimRequestBuilder().build()+ fatalError("missing claim pool did not fail")+ } catch SdkBuildError.MissingRequiredField(_, _) {+ }}}diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/browser.ts b/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/browser.tsindex f023201f98..27de02d5c6 100644--- a/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/browser.ts+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/browser.ts@@ -1,11 +1,27 @@import {+ CreateClaimRequestBuilder,+ CreatePoolRequestBuilder,+ CreateTemplateRequestBuilder,+ CreateUserApiKeyRequestBuilder,CyclopsClient,+ CyclopsTokenProviderConfigurationBuilder,+ OsGymSandboxTemplateSpecBuilder,+ OsGymSandboxWarmPoolSpecBuilder,+ SandboxServiceBuilder,+ SandboxTemplateRefBuilder,+ SchemaBuildError,+ SdkBuildError,+ TemplateBuilder,+ VmTemplateBuilder,+ WarmPoolAutoscalingBuilder,uniffiInitAsync,type Claim,+ type OsGymSandboxTemplateSpec,+ type OsGymSandboxWarmPoolSpec,type Pool,type Template,+ type VmTemplateBuilderLike,} from "../ts/index.web"-import type { OsGymSandboxTemplateSpec, OsGymSandboxWarmPoolSpec } from "../ts/cyclops_sdk_schema"declare global {interface Window {@@ -26,14 +42,124 @@ const servicePath = "/health"const output = document.querySelector<HTMLPreElement>("#output")!const runButton = document.querySelector<HTMLButtonElement>("#run")!const sdkReady = document.querySelector<HTMLElement>("[data-testid=sdk-ready]")!+const builderReady = document.querySelector<HTMLElement>("[data-testid=builder-ready]")!const lifecycleStatus = document.querySelector<HTMLElement>("[data-testid=lifecycle-status]")!+function verifyBuilderContract(): void {+ const configuration = new CyclopsTokenProviderConfigurationBuilder()+ .baseUrl("https://api.example.test")+ .poolPollIntervalMs(5_000n)+ .poolPollLimit(120)+ .claimPollIntervalMs(5_000n)+ .claimPollLimit(120)+ .build()+ const userKey = new CreateUserApiKeyRequestBuilder()+ .name("automation")+ .scope([])+ .build()+ const autoscaling = new WarmPoolAutoscalingBuilder()+ .minPoolSize(1)+ .initialPoolSize(2)+ .maxPoolSize(5)+ .build()+ const vm = new VmTemplateBuilder()+ .containerDiskImage("image")+ .build()+ const templateSpec = new OsGymSandboxTemplateSpecBuilder()+ .vmTemplate(vm)+ .build()+ const metadata = {+ namespace: "default",+ name: "template",+ }+ const template = new TemplateBuilder()+ .apiVersion("osgym.cua.ai/v1alpha1")+ .kind("OSGymSandboxTemplate")+ .metadata(metadata)+ .spec(templateSpec)+ .build()+ const templateRef = new SandboxTemplateRefBuilder()+ .name("template")+ .build()+ const poolSpec = new OsGymSandboxWarmPoolSpecBuilder()+ .replicas(1)+ .sandboxTemplateRef(templateRef)+ .build()+ const pool = {+ apiVersion: "osgym.cua.ai/v1alpha1",+ kind: "OSGymSandboxWarmPool",+ metadata: { namespace: "default", name: "default" },+ spec: poolSpec,+ }+ const claim = new CreateClaimRequestBuilder().pool(pool).build()+ const service = new SandboxServiceBuilder()+ .name("mcp")+ .targetPort(3000)+ .build()+ const poolRequest = new CreatePoolRequestBuilder()+ .namespace("default")+ .spec(poolSpec)+ .build()+ const templateRequest = new CreateTemplateRequestBuilder()+ .namespace("default")+ .name("template")+ .spec(templateSpec)+ .build()++ try {+ new CreateClaimRequestBuilder().build()+ throw new Error("incomplete SDK builder unexpectedly succeeded")+ } catch (error) {+ if (+ !SdkBuildError.MissingRequiredField.instanceOf(error) ||+ error.inner.recordType !== "CreateClaimRequest" ||+ error.inner.field !== "pool"+ ) {+ throw error+ }+ }++ try {+ new VmTemplateBuilder().build()+ throw new Error("incomplete schema builder unexpectedly succeeded")+ } catch (error) {+ if (+ !SchemaBuildError.MissingRequiredField.instanceOf(error) ||+ error.inner.recordType !== "VmTemplate" ||+ error.inner.field !== "container_disk_image"+ ) {+ throw error+ }+ }++ if (+ configuration.poolPollLimit !== 120 ||+ userKey.scope.length !== 0 ||+ autoscaling.maxPoolSize !== 5 ||+ template.metadata.name !== "template" ||+ claim.name !== undefined ||+ service.targetPort !== 3000 ||+ poolRequest.namespace !== "default" ||+ templateRequest.name !== "template"+ ) {+ throw new Error("generated browser builder contract returned unexpected records")+ }+}+const sdkInitialization = uniffiInitAsync().then(() => {sdkReady.textContent = "ready"+ try {+ verifyBuilderContract()+ builderReady.textContent = "ready"+ } catch (error) {+ builderReady.textContent = "failed"+ throw error+ }},(error) => {sdkReady.textContent = "failed"+ builderReady.textContent = "failed"log("SDK initialization failed:", error instanceof Error ? error.message : String(error))throw error},@@ -71,37 +197,48 @@ function runtimeConfig(): BrowserRuntimeConfig {return config}-function makeTemplateSpec(image: string, imagePullSecret?: string): OsGymSandboxTemplateSpec {- return {- vmTemplate: {- containerDiskImage: image,- cpuCores: 4,- memory: "4Gi",- imagePullSecret,- services: [{ name: serviceName, targetPort: 3000 }],- },- }+function makeTemplateSpec(+ image: string,+ imagePullSecret?: string,+): OsGymSandboxTemplateSpec {+ const service = new SandboxServiceBuilder()+ .name(serviceName)+ .targetPort(3000)+ .build()+ let vmBuilder: VmTemplateBuilderLike = new VmTemplateBuilder()+ .containerDiskImage(image)+ .cpuCores(4)+ .memory("4Gi")+ .services([service])+ if (imagePullSecret) vmBuilder = vmBuilder.imagePullSecret(imagePullSecret)+ return new OsGymSandboxTemplateSpecBuilder()+ .vmTemplate(vmBuilder.build())+ .build()}function makePoolSpec(namespace: string): OsGymSandboxWarmPoolSpec {- return {- replicas: 1,- sandboxTemplateRef: { name: `${namespace}-template` },- }+ const reference = new SandboxTemplateRefBuilder()+ .name(`${namespace}-template`)+ .build()+ return new OsGymSandboxWarmPoolSpecBuilder()+ .replicas(1)+ .sandboxTemplateRef(reference)+ .build()}async function runLifecycle(): Promise<void> {await sdkInitializationconst config = runtimeConfig()log("[auth] Supplying runner access token to SDK client.")+ const clientConfiguration = new CyclopsTokenProviderConfigurationBuilder()+ .baseUrl(config.baseUrl)+ .poolPollIntervalMs(5_000n)+ .poolPollLimit(120)+ .claimPollIntervalMs(5_000n)+ .claimPollLimit(120)+ .build()const client = CyclopsClient.connectBrowserWithAccessToken(- {- baseUrl: config.baseUrl,- poolPollIntervalMs: 5_000n,- poolPollLimit: 120,- claimPollIntervalMs: 5_000n,- claimPollLimit: 120,- },+ clientConfiguration,config.accessToken,)log("[auth] SDK client connected.")@@ -111,18 +248,26 @@ async function runLifecycle(): Promise<void> {let claim: Claim | undefinedtry {log("[1/5] Creating pool and template...")- pool = await client.createPool({- namespace: config.namespace,- spec: makePoolSpec(config.namespace),- })- template = await client.createTemplate({- namespace: config.namespace,- name: `${config.namespace}-template`,- spec: makeTemplateSpec(config.image, config.imagePullSecret),- })+ const poolSpec = makePoolSpec(config.namespace)+ pool = await client.createPool(+ new CreatePoolRequestBuilder()+ .namespace(config.namespace)+ .spec(poolSpec)+ .build(),+ )+ const templateSpec = makeTemplateSpec(config.image, config.imagePullSecret)+ template = await client.createTemplate(+ new CreateTemplateRequestBuilder()+ .namespace(config.namespace)+ .name(`${config.namespace}-template`)+ .spec(templateSpec)+ .build(),+ )log("[2/5] Creating claim...")- claim = await client.createClaim({ pool })+ claim = await client.createClaim(+ new CreateClaimRequestBuilder().pool(pool).build(),+ )log("[3/5] Waiting for claim to bind a sandbox...")const sandbox = await client.waitClaim(claim)diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/index.html b/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/index.htmlindex 878e2f8a86..1694e46211 100644--- a/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/index.html+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/index.html@@ -14,6 +14,7 @@<h1>Cyclops browser lifecycle</h1><p>This development-only page receives a short-lived access token from its test runner; it never accepts a client secret.</p><p>SDK initialization: <span data-testid="sdk-ready">initializing</span></p>+ <p>Builder contract: <span data-testid="builder-ready">checking</span></p><p>Lifecycle status: <span data-testid="lifecycle-status">idle</span></p><button id="run" type="button">Run Lifecycle</button><pre id="output" aria-live="polite">Ready.</pre>diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/tests/browser-artifact.spec.ts b/libs/fleet/sdk-bindings/ts-uniffi-browser/tests/browser-artifact.spec.tsindex eb4093321c..5b197f0443 100644--- a/libs/fleet/sdk-bindings/ts-uniffi-browser/tests/browser-artifact.spec.ts+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/tests/browser-artifact.spec.ts@@ -17,4 +17,5 @@ test("loads the Vite bundle backed by the generated WASM SDK artifact", async ({await page.goto("/")await expect(page.getByTestId("sdk-ready")).toHaveText("ready")+ await expect(page.getByTestId("builder-ready")).toHaveText("ready")})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 8e91fdc62d..1082c1d6c4 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@@ -1303,6 +1303,1483 @@ const FfiConverterTypeJsonValueError = (() => {return new FFIConverter();})();+// Error type: SchemaBuildError+export enum SchemaBuildError_Tags {+ MissingRequiredField = "MissingRequiredField",+}+export const SchemaBuildError = (() => {+ type MissingRequiredField__interface = {+ tag: SchemaBuildError_Tags.MissingRequiredField;+ inner: Readonly<{ recordType: string; field: string }>;+ };+ class MissingRequiredField_+ extends UniffiError+ implements MissingRequiredField__interface+ {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SchemaBuildError";+ readonly tag = SchemaBuildError_Tags.MissingRequiredField;+ readonly inner: Readonly<{ recordType: string; field: string }>;+ constructor(inner: { recordType: string; field: string }) {+ super("SchemaBuildError", "MissingRequiredField");++ this.inner = Object.freeze(inner);+ }+ static new(inner: {+ recordType: string;+ field: string;+ }): MissingRequiredField_ {+ return new MissingRequiredField_(inner);+ }++ static instanceOf(obj: any): obj is MissingRequiredField_ {+ return obj.tag === SchemaBuildError_Tags.MissingRequiredField;+ }+ static hasInner(obj: any): obj is MissingRequiredField_ {+ return MissingRequiredField_.instanceOf(obj);+ }++ static getInner(+ obj: MissingRequiredField_,+ ): Readonly<{ recordType: string; field: string }> {+ return obj.inner;+ }+ }++ function instanceOf(obj: any): obj is SchemaBuildError {+ return obj[uniffiTypeNameSymbol] === "SchemaBuildError";+ }++ return Object.freeze({+ instanceOf,+ MissingRequiredField: MissingRequiredField_,+ });+})();+export type SchemaBuildError = InstanceType<+ (typeof SchemaBuildError)["MissingRequiredField"]+>;++// FfiConverter for enum SchemaBuildError+const FfiConverterTypeSchemaBuildError = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = SchemaBuildError;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1:+ return new SchemaBuildError.MissingRequiredField({+ recordType: FfiConverterString.read(from),+ field: FfiConverterString.read(from),+ });+ default:+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value.tag) {+ case SchemaBuildError_Tags.MissingRequiredField: {+ ordinalConverter.write(1, into);+ const inner = value.inner;+ FfiConverterString.write(inner.recordType, into);+ FfiConverterString.write(inner.field, into);+ return;+ }+ default:+ // Throwing from here means that SchemaBuildError_Tags hasn't matched an ordinal.+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ allocationSize(value: TypeName): number {+ switch (value.tag) {+ case SchemaBuildError_Tags.MissingRequiredField: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(1);+ size += FfiConverterString.allocationSize(inner.recordType);+ size += FfiConverterString.allocationSize(inner.field);+ return size;+ }+ default:+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ }+ return new FFIConverter();+})();++export interface OsGymSandboxTemplateSpecBuilderLike {+ build() /*throws*/ : OsGymSandboxTemplateSpec;+ vmTemplate(value: VmTemplate): OsGymSandboxTemplateSpecBuilderLike;+}+/**+ * @deprecated Use `OsGymSandboxTemplateSpecBuilderLike` instead.+ */+export type OsGymSandboxTemplateSpecBuilderInterface =+ OsGymSandboxTemplateSpecBuilderLike;++export class OsGymSandboxTemplateSpecBuilder+ extends UniffiAbstractObject+ implements OsGymSandboxTemplateSpecBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "OsGymSandboxTemplateSpecBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_osgymsandboxtemplatespecbuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.bless(pointer);+ }++ build(): OsGymSandboxTemplateSpec /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeOSGymSandboxTemplateSpec.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(+ FfiConverterTypeSchemaBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxtemplatespecbuilder_build(+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.clonePointer(+ this,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ vmTemplate(value: VmTemplate): OsGymSandboxTemplateSpecBuilderLike {+ return FfiConverterTypeOSGymSandboxTemplateSpecBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxtemplatespecbuilder_vm_template(+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterTypeVmTemplate.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer =+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.pointer(this);+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.freePointer(+ pointer,+ );+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is OsGymSandboxTemplateSpecBuilder {+ return uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.isConcreteType(+ obj_,+ );+ }+}++const uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory: UniffiObjectFactory<OsGymSandboxTemplateSpecBuilderLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.freePointer(+ heldValue,+ );+ })+ : null;++ return {+ create(pointer: UniffiHandle): OsGymSandboxTemplateSpecBuilderLike {+ const instance = Object.create(+ OsGymSandboxTemplateSpecBuilder.prototype,+ );+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "OsGymSandboxTemplateSpecBuilder";+ 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_: OsGymSandboxTemplateSpecBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: OsGymSandboxTemplateSpecBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_osgymsandboxtemplatespecbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_osgymsandboxtemplatespecbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is OsGymSandboxTemplateSpecBuilderLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "OsGymSandboxTemplateSpecBuilder"+ );+ },+ };+ })();+const FfiConverterTypeOSGymSandboxTemplateSpecBuilder = new FfiConverterObject(+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory,+);++export interface OsGymSandboxWarmPoolSpecBuilderLike {+ autoscaling(value: WarmPoolAutoscaling): OsGymSandboxWarmPoolSpecBuilderLike;+ build() /*throws*/ : OsGymSandboxWarmPoolSpec;+ replicas(value: number): OsGymSandboxWarmPoolSpecBuilderLike;+ sandboxTemplateRef(+ value: SandboxTemplateRef,+ ): OsGymSandboxWarmPoolSpecBuilderLike;+}+/**+ * @deprecated Use `OsGymSandboxWarmPoolSpecBuilderLike` instead.+ */+export type OsGymSandboxWarmPoolSpecBuilderInterface =+ OsGymSandboxWarmPoolSpecBuilderLike;++export class OsGymSandboxWarmPoolSpecBuilder+ extends UniffiAbstractObject+ implements OsGymSandboxWarmPoolSpecBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "OsGymSandboxWarmPoolSpecBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_osgymsandboxwarmpoolspecbuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.bless(pointer);+ }++ autoscaling(value: WarmPoolAutoscaling): OsGymSandboxWarmPoolSpecBuilderLike {+ return FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_autoscaling(+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterTypeWarmPoolAutoscaling.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ build(): OsGymSandboxWarmPoolSpec /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeOSGymSandboxWarmPoolSpec.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(+ FfiConverterTypeSchemaBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_build(+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(+ this,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ replicas(value: number): OsGymSandboxWarmPoolSpecBuilderLike {+ return FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_replicas(+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ sandboxTemplateRef(+ value: SandboxTemplateRef,+ ): OsGymSandboxWarmPoolSpecBuilderLike {+ return FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref(+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterTypeSandboxTemplateRef.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer =+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.pointer(this);+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.freePointer(+ pointer,+ );+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is OsGymSandboxWarmPoolSpecBuilder {+ return uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.isConcreteType(+ obj_,+ );+ }+}++const uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory: UniffiObjectFactory<OsGymSandboxWarmPoolSpecBuilderLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.freePointer(+ heldValue,+ );+ })+ : null;++ return {+ create(pointer: UniffiHandle): OsGymSandboxWarmPoolSpecBuilderLike {+ const instance = Object.create(+ OsGymSandboxWarmPoolSpecBuilder.prototype,+ );+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "OsGymSandboxWarmPoolSpecBuilder";+ 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_: OsGymSandboxWarmPoolSpecBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: OsGymSandboxWarmPoolSpecBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_osgymsandboxwarmpoolspecbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_osgymsandboxwarmpoolspecbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is OsGymSandboxWarmPoolSpecBuilderLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "OsGymSandboxWarmPoolSpecBuilder"+ );+ },+ };+ })();+const FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder = new FfiConverterObject(+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory,+);++export interface SandboxServiceBuilderLike {+ build() /*throws*/ : SandboxService;+ name(value: string): SandboxServiceBuilderLike;+ protocol(value: ServiceProtocol): SandboxServiceBuilderLike;+ targetPort(value: number): SandboxServiceBuilderLike;+}+/**+ * @deprecated Use `SandboxServiceBuilderLike` instead.+ */+export type SandboxServiceBuilderInterface = SandboxServiceBuilderLike;++export class SandboxServiceBuilder+ extends UniffiAbstractObject+ implements SandboxServiceBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "SandboxServiceBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_sandboxservicebuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeSandboxServiceBuilderObjectFactory.bless(pointer);+ }++ build(): SandboxService /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeSandboxService.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(+ FfiConverterTypeSchemaBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxservicebuilder_build(+ uniffiTypeSandboxServiceBuilderObjectFactory.clonePointer(this),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ name(value: string): SandboxServiceBuilderLike {+ return FfiConverterTypeSandboxServiceBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxservicebuilder_name(+ uniffiTypeSandboxServiceBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ protocol(value: ServiceProtocol): SandboxServiceBuilderLike {+ return FfiConverterTypeSandboxServiceBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxservicebuilder_protocol(+ uniffiTypeSandboxServiceBuilderObjectFactory.clonePointer(this),+ FfiConverterTypeServiceProtocol.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ targetPort(value: number): SandboxServiceBuilderLike {+ return FfiConverterTypeSandboxServiceBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxservicebuilder_target_port(+ uniffiTypeSandboxServiceBuilderObjectFactory.clonePointer(this),+ FfiConverterUInt16.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer =+ uniffiTypeSandboxServiceBuilderObjectFactory.pointer(this);+ uniffiTypeSandboxServiceBuilderObjectFactory.freePointer(pointer);+ uniffiTypeSandboxServiceBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is SandboxServiceBuilder {+ return uniffiTypeSandboxServiceBuilderObjectFactory.isConcreteType(obj_);+ }+}++const uniffiTypeSandboxServiceBuilderObjectFactory: UniffiObjectFactory<SandboxServiceBuilderLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeSandboxServiceBuilderObjectFactory.freePointer(heldValue);+ })+ : null;++ return {+ create(pointer: UniffiHandle): SandboxServiceBuilderLike {+ const instance = Object.create(SandboxServiceBuilder.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "SandboxServiceBuilder";+ 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_: SandboxServiceBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: SandboxServiceBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_sandboxservicebuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_sandboxservicebuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is SandboxServiceBuilderLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "SandboxServiceBuilder"+ );+ },+ };+ })();+const FfiConverterTypeSandboxServiceBuilder = new FfiConverterObject(+ uniffiTypeSandboxServiceBuilderObjectFactory,+);++export interface SandboxTemplateRefBuilderLike {+ build() /*throws*/ : SandboxTemplateRef;+ name(value: string): SandboxTemplateRefBuilderLike;+}+/**+ * @deprecated Use `SandboxTemplateRefBuilderLike` instead.+ */+export type SandboxTemplateRefBuilderInterface = SandboxTemplateRefBuilderLike;++export class SandboxTemplateRefBuilder+ extends UniffiAbstractObject+ implements SandboxTemplateRefBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "SandboxTemplateRefBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_sandboxtemplaterefbuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.bless(pointer);+ }++ build(): SandboxTemplateRef /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeSandboxTemplateRef.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(+ FfiConverterTypeSchemaBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxtemplaterefbuilder_build(+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.clonePointer(this),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ name(value: string): SandboxTemplateRefBuilderLike {+ return FfiConverterTypeSandboxTemplateRefBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxtemplaterefbuilder_name(+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.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 =+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.pointer(this);+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.freePointer(pointer);+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is SandboxTemplateRefBuilder {+ return uniffiTypeSandboxTemplateRefBuilderObjectFactory.isConcreteType(+ obj_,+ );+ }+}++const uniffiTypeSandboxTemplateRefBuilderObjectFactory: UniffiObjectFactory<SandboxTemplateRefBuilderLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.freePointer(+ heldValue,+ );+ })+ : null;++ return {+ create(pointer: UniffiHandle): SandboxTemplateRefBuilderLike {+ const instance = Object.create(SandboxTemplateRefBuilder.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "SandboxTemplateRefBuilder";+ 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_: SandboxTemplateRefBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: SandboxTemplateRefBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_sandboxtemplaterefbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_sandboxtemplaterefbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is SandboxTemplateRefBuilderLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "SandboxTemplateRefBuilder"+ );+ },+ };+ })();+const FfiConverterTypeSandboxTemplateRefBuilder = new FfiConverterObject(+ uniffiTypeSandboxTemplateRefBuilderObjectFactory,+);++export interface VmTemplateBuilderLike {+ build() /*throws*/ : VmTemplate;+ command(value: Array<string>): VmTemplateBuilderLike;+ containerDiskImage(value: string): VmTemplateBuilderLike;+ cpuCores(value: number): VmTemplateBuilderLike;+ firmware(value: Firmware): VmTemplateBuilderLike;+ imagePullPolicy(value: ImagePullPolicy): VmTemplateBuilderLike;+ imagePullSecret(value: string): VmTemplateBuilderLike;+ memory(value: string): VmTemplateBuilderLike;+ nodeSelector(value: Map<string, string>): VmTemplateBuilderLike;+ oidc(value: OidcConfig): VmTemplateBuilderLike;+ probes(value: PreservedJsonLike): VmTemplateBuilderLike;+ runtime(value: RuntimeKind): VmTemplateBuilderLike;+ runtimeClassName(value: string): VmTemplateBuilderLike;+ services(value: Array<SandboxService>): VmTemplateBuilderLike;+ tolerations(value: Array<PreservedJsonLike>): VmTemplateBuilderLike;+}+/**+ * @deprecated Use `VmTemplateBuilderLike` instead.+ */+export type VmTemplateBuilderInterface = VmTemplateBuilderLike;++export class VmTemplateBuilder+ extends UniffiAbstractObject+ implements VmTemplateBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "VmTemplateBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeVmTemplateBuilderObjectFactory.bless(pointer);+ }++ build(): VmTemplate /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeVmTemplate.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(+ FfiConverterTypeSchemaBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ command(value: Array<string>): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_command(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterSequenceString.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ containerDiskImage(value: string): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_container_disk_image(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ cpuCores(value: number): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ firmware(value: Firmware): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterTypeFirmware.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ imagePullPolicy(value: ImagePullPolicy): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_image_pull_policy(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterTypeImagePullPolicy.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ imagePullSecret(value: string): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_image_pull_secret(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ memory(value: string): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_memory(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ nodeSelector(value: Map<string, string>): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_node_selector(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterMapStringString.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ oidc(value: OidcConfig): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_oidc(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterTypeOidcConfig.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ probes(value: PreservedJsonLike): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterTypePreservedJson.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ runtime(value: RuntimeKind): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterTypeRuntimeKind.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ runtimeClassName(value: string): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime_class_name(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ services(value: Array<SandboxService>): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_services(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterSequenceTypeSandboxService.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ tolerations(value: Array<PreservedJsonLike>): VmTemplateBuilderLike {+ return FfiConverterTypeVmTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_tolerations(+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterSequenceTypePreservedJson.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer = uniffiTypeVmTemplateBuilderObjectFactory.pointer(this);+ uniffiTypeVmTemplateBuilderObjectFactory.freePointer(pointer);+ uniffiTypeVmTemplateBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is VmTemplateBuilder {+ return uniffiTypeVmTemplateBuilderObjectFactory.isConcreteType(obj_);+ }+}++const uniffiTypeVmTemplateBuilderObjectFactory: UniffiObjectFactory<VmTemplateBuilderLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeVmTemplateBuilderObjectFactory.freePointer(heldValue);+ })+ : null;++ return {+ create(pointer: UniffiHandle): VmTemplateBuilderLike {+ const instance = Object.create(VmTemplateBuilder.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "VmTemplateBuilder";+ 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_: VmTemplateBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: VmTemplateBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_vmtemplatebuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_vmtemplatebuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is VmTemplateBuilderLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "VmTemplateBuilder"+ );+ },+ };+ })();+const FfiConverterTypeVmTemplateBuilder = new FfiConverterObject(+ uniffiTypeVmTemplateBuilderObjectFactory,+);++export interface WarmPoolAutoscalingBuilderLike {+ build() /*throws*/ : WarmPoolAutoscaling;+ initialPoolSize(value: number): WarmPoolAutoscalingBuilderLike;+ maxPoolSize(value: number): WarmPoolAutoscalingBuilderLike;+ minPoolSize(value: number): WarmPoolAutoscalingBuilderLike;+}+/**+ * @deprecated Use `WarmPoolAutoscalingBuilderLike` instead.+ */+export type WarmPoolAutoscalingBuilderInterface =+ WarmPoolAutoscalingBuilderLike;++export class WarmPoolAutoscalingBuilder+ extends UniffiAbstractObject+ implements WarmPoolAutoscalingBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "WarmPoolAutoscalingBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_warmpoolautoscalingbuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.bless(pointer);+ }++ build(): WarmPoolAutoscaling /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeWarmPoolAutoscaling.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(+ FfiConverterTypeSchemaBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build(+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.clonePointer(+ this,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ initialPoolSize(value: number): WarmPoolAutoscalingBuilderLike {+ return FfiConverterTypeWarmPoolAutoscalingBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size(+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ maxPoolSize(value: number): WarmPoolAutoscalingBuilderLike {+ return FfiConverterTypeWarmPoolAutoscalingBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size(+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ minPoolSize(value: number): WarmPoolAutoscalingBuilderLike {+ return FfiConverterTypeWarmPoolAutoscalingBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size(+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer =+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.pointer(this);+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.freePointer(pointer);+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is WarmPoolAutoscalingBuilder {+ return uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.isConcreteType(+ obj_,+ );+ }+}++const uniffiTypeWarmPoolAutoscalingBuilderObjectFactory: UniffiObjectFactory<WarmPoolAutoscalingBuilderLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.freePointer(+ heldValue,+ );+ })+ : null;++ return {+ create(pointer: UniffiHandle): WarmPoolAutoscalingBuilderLike {+ const instance = Object.create(WarmPoolAutoscalingBuilder.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "WarmPoolAutoscalingBuilder";+ 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_: WarmPoolAutoscalingBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: WarmPoolAutoscalingBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_warmpoolautoscalingbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_warmpoolautoscalingbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is WarmPoolAutoscalingBuilderLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "WarmPoolAutoscalingBuilder"+ );+ },+ };+ })();+const FfiConverterTypeWarmPoolAutoscalingBuilder = new FfiConverterObject(+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory,+);+// FfiConverter for string | undefinedconst FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);@@ -1425,6 +2902,70 @@ function uniffiEnsureInitialized() {bindingsContractVersion,);}+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxtemplatespecbuilder_new() !==+ 22071+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxtemplatespecbuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxtemplatespecbuilder_build() !==+ 53928+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxtemplatespecbuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxtemplatespecbuilder_vm_template() !==+ 6610+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxtemplatespecbuilder_vm_template",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxwarmpoolspecbuilder_new() !==+ 26063+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxwarmpoolspecbuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_autoscaling() !==+ 44912+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_autoscaling",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_build() !==+ 5682+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_replicas() !==+ 50438+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_replicas",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref() !==+ 7198+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref",+ );+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() !==24064@@ -1441,6 +2982,238 @@ function uniffiEnsureInitialized() {"uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json",);}+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_sandboxservicebuilder_new() !==+ 21082+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_constructor_sandboxservicebuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_build() !==+ 62919+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_name() !==+ 62417+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_name",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_protocol() !==+ 10309+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_protocol",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_target_port() !==+ 61462+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_target_port",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_sandboxtemplaterefbuilder_new() !==+ 4748+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_constructor_sandboxtemplaterefbuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_build() !==+ 46569+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name() !==+ 1803+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name",+ );+ }+ 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_build() !==+ 17867+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_command() !==+ 20371+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_command",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_container_disk_image() !==+ 49021+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_container_disk_image",+ );+ }+ 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_firmware() !==+ 33926+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_policy() !==+ 41828+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_policy",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_secret() !==+ 40154+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_secret",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_memory() !==+ 55615+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_memory",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_node_selector() !==+ 45280+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_node_selector",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_oidc() !==+ 27280+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_oidc",+ );+ }+ 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_runtime() !==+ 63375+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime_class_name() !==+ 25466+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime_class_name",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_services() !==+ 14113+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_services",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_tolerations() !==+ 1632+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_tolerations",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new() !==+ 25769+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build() !==+ 17132+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size() !==+ 56913+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size() !==+ 18359+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size() !==+ 46153+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size",+ );+ }}export default Object.freeze({@@ -1457,15 +3230,22 @@ export default Object.freeze({FfiConverterTypeOSGymSandboxSpec,FfiConverterTypeOSGymSandboxStatus,FfiConverterTypeOSGymSandboxTemplateSpec,+ FfiConverterTypeOSGymSandboxTemplateSpecBuilder,FfiConverterTypeOSGymSandboxWarmPoolSpec,+ FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder,FfiConverterTypeOSGymSandboxWarmPoolStatus,FfiConverterTypeOidcConfig,FfiConverterTypePreservedJson,FfiConverterTypeRuntimeKind,FfiConverterTypeSandboxService,+ FfiConverterTypeSandboxServiceBuilder,FfiConverterTypeSandboxTemplateRef,+ FfiConverterTypeSandboxTemplateRefBuilder,+ FfiConverterTypeSchemaBuildError,FfiConverterTypeServiceProtocol,FfiConverterTypeVmTemplate,+ FfiConverterTypeVmTemplateBuilder,FfiConverterTypeWarmPoolAutoscaling,+ FfiConverterTypeWarmPoolAutoscalingBuilder,},});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 8a9f152b57..3e7fa25061 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@@ -1337,6 +1337,112 @@ const FfiConverterTypeHttpError = (() => {return new FFIConverter();})();+// Error type: SdkBuildError+export enum SdkBuildError_Tags {+ MissingRequiredField = "MissingRequiredField",+}+export const SdkBuildError = (() => {+ type MissingRequiredField__interface = {+ tag: SdkBuildError_Tags.MissingRequiredField;+ inner: Readonly<{ recordType: string; field: string }>;+ };+ class MissingRequiredField_+ extends UniffiError+ implements MissingRequiredField__interface+ {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkBuildError";+ readonly tag = SdkBuildError_Tags.MissingRequiredField;+ readonly inner: Readonly<{ recordType: string; field: string }>;+ constructor(inner: { recordType: string; field: string }) {+ super("SdkBuildError", "MissingRequiredField");++ this.inner = Object.freeze(inner);+ }+ static new(inner: {+ recordType: string;+ field: string;+ }): MissingRequiredField_ {+ return new MissingRequiredField_(inner);+ }++ static instanceOf(obj: any): obj is MissingRequiredField_ {+ return obj.tag === SdkBuildError_Tags.MissingRequiredField;+ }+ static hasInner(obj: any): obj is MissingRequiredField_ {+ return MissingRequiredField_.instanceOf(obj);+ }++ static getInner(+ obj: MissingRequiredField_,+ ): Readonly<{ recordType: string; field: string }> {+ return obj.inner;+ }+ }++ function instanceOf(obj: any): obj is SdkBuildError {+ return obj[uniffiTypeNameSymbol] === "SdkBuildError";+ }++ return Object.freeze({+ instanceOf,+ MissingRequiredField: MissingRequiredField_,+ });+})();+export type SdkBuildError = InstanceType<+ (typeof SdkBuildError)["MissingRequiredField"]+>;++// FfiConverter for enum SdkBuildError+const FfiConverterTypeSdkBuildError = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = SdkBuildError;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1:+ return new SdkBuildError.MissingRequiredField({+ recordType: FfiConverterString.read(from),+ field: FfiConverterString.read(from),+ });+ default:+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value.tag) {+ case SdkBuildError_Tags.MissingRequiredField: {+ ordinalConverter.write(1, into);+ const inner = value.inner;+ FfiConverterString.write(inner.recordType, into);+ FfiConverterString.write(inner.field, into);+ return;+ }+ default:+ // Throwing from here means that SdkBuildError_Tags hasn't matched an ordinal.+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ allocationSize(value: TypeName): number {+ switch (value.tag) {+ case SdkBuildError_Tags.MissingRequiredField: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(1);+ size += FfiConverterString.allocationSize(inner.recordType);+ size += FfiConverterString.allocationSize(inner.field);+ return size;+ }+ default:+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ }+ return new FFIConverter();+})();+// Error type: SdkErrorexport enum SdkError_Tags {Configuration = "Configuration",@@ -2161,150 +2267,54 @@ const uniffiCallbackInterfaceAccessTokenProvider: {},};-export interface CyclopsClientLike {- createClaim(- request: CreateClaimRequest,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Claim>;- createPool(- request: CreatePoolRequest,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Pool>;- createTemplate(- request: CreateTemplateRequest,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Template>;- createUserApiKey(- request: CreateUserApiKeyRequest,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<NewUserApiKey>;- deleteClaim(- claim: Claim,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<void>;- deletePool(- pool: Pool,- 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>;- getPool(- name: string,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Pool>;- getTemplate(- namespace: string,- name: string,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Template>;- listClaims(- namespace: string,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Array<Claim>>;- listNamespaces(asyncOpts_?: {- signal: AbortSignal;- }) /*throws*/ : Promise<Array<Namespace>>;- listPools(- namespace: string,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Array<Pool>>;- listTemplates(- namespace: string,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Array<Template>>;- listUserApiKeys(asyncOpts_?: {- signal: AbortSignal;- }) /*throws*/ : Promise<Array<UserApiKey>>;- reconcilePool(- request: CreatePoolRequest,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Pool>;- reconcileTemplate(- request: CreateTemplateRequest,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Template>;- /**- * Push the claim's `spec.lifecycle.shutdownTime` forward. That absolute- * expiry is the only liveness input the pool operator's claim reaper- * honors, so a holder that outlives its current lease must renew before- * the deadline passes or the bound sandbox is deleted underneath it.- * Deliberately narrower than a claim update: nothing else on the claim- * can be mutated through the SDK.- */- renewClaim(- claim: Claim,- shutdownTime: string,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Claim>;- serviceRequest(- sandbox: Sandbox,- service: string,- path: string,- request: HttpRequest,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<HttpResponse>;- updatePool(- pool: Pool,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Pool>;- updateTemplate(- template: Template,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Template>;- waitClaim(- claim: Claim,- asyncOpts_?: { signal: AbortSignal },- ) /*throws*/ : Promise<Sandbox>;+export interface CreateClaimRequestBuilderLike {+ build() /*throws*/ : CreateClaimRequest;+ name(value: string): CreateClaimRequestBuilderLike;+ pool(value: Pool): CreateClaimRequestBuilderLike;+ spec(value: ClaimSpec): CreateClaimRequestBuilderLike;}/**- * @deprecated Use `CyclopsClientLike` instead.+ * @deprecated Use `CreateClaimRequestBuilderLike` instead.*/-export type CyclopsClientInterface = CyclopsClientLike;+export type CreateClaimRequestBuilderInterface = CreateClaimRequestBuilderLike;-export class CyclopsClient+export class CreateClaimRequestBuilderextends UniffiAbstractObject- implements CyclopsClientLike+ implements CreateClaimRequestBuilderLike{- readonly [uniffiTypeNameSymbol] = "CyclopsClient";+ readonly [uniffiTypeNameSymbol] = "CreateClaimRequestBuilder";readonly [destructorGuardSymbol]: UniffiGcObject;readonly [pointerLiteralSymbol]: UniffiHandle;- // No primary constructor declared for this class.- private constructor(pointer: UniffiHandle) {+ constructor() {super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_createclaimrequestbuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );this[pointerLiteralSymbol] = pointer;this[destructorGuardSymbol] =- uniffiTypeCyclopsClientObjectFactory.bless(pointer);+ uniffiTypeCreateClaimRequestBuilderObjectFactory.bless(pointer);}- static connect(- configuration: CyclopsConfiguration,- httpClient: HttpClient,- ): CyclopsClientLike /*throws*/ {- return FfiConverterTypeCyclopsClient.lift(+ build(): CreateClaimRequest /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeCreateClaimRequest.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(uniffiCaller.rustCallWithError(- /*liftError:*/ FfiConverterTypeSdkError.lift.bind(- FfiConverterTypeSdkError,+ /*liftError:*/ FfiConverterTypeSdkBuildError.lift.bind(+ FfiConverterTypeSdkBuildError,),/*caller:*/ (callStatus) => {- return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(- FfiConverterTypeCyclopsConfiguration.lower(- configuration,- nativeModule().rustbuffer_alloc,- ),- FfiConverterTypeHttpClient.lower(- httpClient,- nativeModule().rustbuffer_alloc,- ),+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_build(+ uniffiTypeCreateClaimRequestBuilderObjectFactory.clonePointer(this),callStatus,);},@@ -2313,25 +2323,13 @@ export class CyclopsClient);}- static connectBrowserWithAccessToken(- configuration: CyclopsTokenProviderConfiguration,- accessToken: string,- ): CyclopsClientLike /*throws*/ {- return FfiConverterTypeCyclopsClient.lift(- uniffiCaller.rustCallWithError(- /*liftError:*/ FfiConverterTypeSdkError.lift.bind(- FfiConverterTypeSdkError,- ),+ name(value: string): CreateClaimRequestBuilderLike {+ return FfiConverterTypeCreateClaimRequestBuilder.lift(+ uniffiCaller.rustCall(/*caller:*/ (callStatus) => {- return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_browser_with_access_token(- FfiConverterTypeCyclopsTokenProviderConfiguration.lower(- configuration,- nativeModule().rustbuffer_alloc,- ),- FfiConverterString.lower(- accessToken,- nativeModule().rustbuffer_alloc,- ),+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_name(+ uniffiTypeCreateClaimRequestBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),callStatus,);},@@ -2340,28 +2338,29 @@ export class CyclopsClient);}- static connectWithAccessToken(- configuration: CyclopsTokenProviderConfiguration,- accessToken: string,- httpClient: HttpClient,- ): CyclopsClientLike /*throws*/ {- return FfiConverterTypeCyclopsClient.lift(- uniffiCaller.rustCallWithError(- /*liftError:*/ FfiConverterTypeSdkError.lift.bind(- FfiConverterTypeSdkError,- ),+ pool(value: Pool): CreateClaimRequestBuilderLike {+ return FfiConverterTypeCreateClaimRequestBuilder.lift(+ uniffiCaller.rustCall(/*caller:*/ (callStatus) => {- return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_access_token(- FfiConverterTypeCyclopsTokenProviderConfiguration.lower(- configuration,- nativeModule().rustbuffer_alloc,- ),- FfiConverterString.lower(- accessToken,- nativeModule().rustbuffer_alloc,- ),- FfiConverterTypeHttpClient.lower(- httpClient,+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_pool(+ uniffiTypeCreateClaimRequestBuilderObjectFactory.clonePointer(this),+ FfiConverterTypePool.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ spec(value: ClaimSpec): CreateClaimRequestBuilderLike {+ return FfiConverterTypeCreateClaimRequestBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createclaimrequestbuilder_spec(+ uniffiTypeCreateClaimRequestBuilderObjectFactory.clonePointer(this),+ FfiConverterTypeClaimSpec.lower(+ value,nativeModule().rustbuffer_alloc,),callStatus,@@ -2372,10 +2371,911 @@ export class CyclopsClient);}- static connectWithAccessTokenAndNativeHttpClient(- configuration: CyclopsTokenProviderConfiguration,- accessToken: string,- ): CyclopsClientLike /*throws*/ {+ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer =+ uniffiTypeCreateClaimRequestBuilderObjectFactory.pointer(this);+ uniffiTypeCreateClaimRequestBuilderObjectFactory.freePointer(pointer);+ uniffiTypeCreateClaimRequestBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is CreateClaimRequestBuilder {+ return uniffiTypeCreateClaimRequestBuilderObjectFactory.isConcreteType(+ obj_,+ );+ }+}++const uniffiTypeCreateClaimRequestBuilderObjectFactory: UniffiObjectFactory<CreateClaimRequestBuilderLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeCreateClaimRequestBuilderObjectFactory.freePointer(+ heldValue,+ );+ })+ : null;++ return {+ create(pointer: UniffiHandle): CreateClaimRequestBuilderLike {+ const instance = Object.create(CreateClaimRequestBuilder.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "CreateClaimRequestBuilder";+ 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_: CreateClaimRequestBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: CreateClaimRequestBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_createclaimrequestbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_createclaimrequestbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is CreateClaimRequestBuilderLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "CreateClaimRequestBuilder"+ );+ },+ };+ })();+const FfiConverterTypeCreateClaimRequestBuilder = new FfiConverterObject(+ uniffiTypeCreateClaimRequestBuilderObjectFactory,+);++export interface CreatePoolRequestBuilderLike {+ build() /*throws*/ : CreatePoolRequest;+ namespace(value: string): CreatePoolRequestBuilderLike;+ spec(value: OsGymSandboxWarmPoolSpec): CreatePoolRequestBuilderLike;+}+/**+ * @deprecated Use `CreatePoolRequestBuilderLike` instead.+ */+export type CreatePoolRequestBuilderInterface = CreatePoolRequestBuilderLike;++export class CreatePoolRequestBuilder+ extends UniffiAbstractObject+ implements CreatePoolRequestBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "CreatePoolRequestBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_createpoolrequestbuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeCreatePoolRequestBuilderObjectFactory.bless(pointer);+ }++ build(): CreatePoolRequest /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeCreatePoolRequest.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSdkBuildError.lift.bind(+ FfiConverterTypeSdkBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_build(+ uniffiTypeCreatePoolRequestBuilderObjectFactory.clonePointer(this),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ namespace(value: string): CreatePoolRequestBuilderLike {+ return FfiConverterTypeCreatePoolRequestBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_namespace(+ uniffiTypeCreatePoolRequestBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ spec(value: OsGymSandboxWarmPoolSpec): CreatePoolRequestBuilderLike {+ return FfiConverterTypeCreatePoolRequestBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createpoolrequestbuilder_spec(+ uniffiTypeCreatePoolRequestBuilderObjectFactory.clonePointer(this),+ FfiConverterTypeOSGymSandboxWarmPoolSpec.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer =+ uniffiTypeCreatePoolRequestBuilderObjectFactory.pointer(this);+ uniffiTypeCreatePoolRequestBuilderObjectFactory.freePointer(pointer);+ uniffiTypeCreatePoolRequestBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is CreatePoolRequestBuilder {+ return uniffiTypeCreatePoolRequestBuilderObjectFactory.isConcreteType(obj_);+ }+}++const uniffiTypeCreatePoolRequestBuilderObjectFactory: UniffiObjectFactory<CreatePoolRequestBuilderLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeCreatePoolRequestBuilderObjectFactory.freePointer(+ heldValue,+ );+ })+ : null;++ return {+ create(pointer: UniffiHandle): CreatePoolRequestBuilderLike {+ const instance = Object.create(CreatePoolRequestBuilder.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "CreatePoolRequestBuilder";+ 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_: CreatePoolRequestBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: CreatePoolRequestBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_createpoolrequestbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_createpoolrequestbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is CreatePoolRequestBuilderLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "CreatePoolRequestBuilder"+ );+ },+ };+ })();+const FfiConverterTypeCreatePoolRequestBuilder = new FfiConverterObject(+ uniffiTypeCreatePoolRequestBuilderObjectFactory,+);++export interface CreateTemplateRequestBuilderLike {+ build() /*throws*/ : CreateTemplateRequest;+ name(value: string): CreateTemplateRequestBuilderLike;+ namespace(value: string): CreateTemplateRequestBuilderLike;+ spec(value: OsGymSandboxTemplateSpec): CreateTemplateRequestBuilderLike;+}+/**+ * @deprecated Use `CreateTemplateRequestBuilderLike` instead.+ */+export type CreateTemplateRequestBuilderInterface =+ CreateTemplateRequestBuilderLike;++export class CreateTemplateRequestBuilder+ extends UniffiAbstractObject+ implements CreateTemplateRequestBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "CreateTemplateRequestBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_createtemplaterequestbuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeCreateTemplateRequestBuilderObjectFactory.bless(pointer);+ }++ build(): CreateTemplateRequest /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeCreateTemplateRequest.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSdkBuildError.lift.bind(+ FfiConverterTypeSdkBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_build(+ uniffiTypeCreateTemplateRequestBuilderObjectFactory.clonePointer(+ this,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ name(value: string): CreateTemplateRequestBuilderLike {+ return FfiConverterTypeCreateTemplateRequestBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_name(+ uniffiTypeCreateTemplateRequestBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ namespace(value: string): CreateTemplateRequestBuilderLike {+ return FfiConverterTypeCreateTemplateRequestBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_namespace(+ uniffiTypeCreateTemplateRequestBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ spec(value: OsGymSandboxTemplateSpec): CreateTemplateRequestBuilderLike {+ return FfiConverterTypeCreateTemplateRequestBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createtemplaterequestbuilder_spec(+ uniffiTypeCreateTemplateRequestBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterTypeOSGymSandboxTemplateSpec.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer =+ uniffiTypeCreateTemplateRequestBuilderObjectFactory.pointer(this);+ uniffiTypeCreateTemplateRequestBuilderObjectFactory.freePointer(pointer);+ uniffiTypeCreateTemplateRequestBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is CreateTemplateRequestBuilder {+ return uniffiTypeCreateTemplateRequestBuilderObjectFactory.isConcreteType(+ obj_,+ );+ }+}++const uniffiTypeCreateTemplateRequestBuilderObjectFactory: UniffiObjectFactory<CreateTemplateRequestBuilderLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeCreateTemplateRequestBuilderObjectFactory.freePointer(+ heldValue,+ );+ })+ : null;++ return {+ create(pointer: UniffiHandle): CreateTemplateRequestBuilderLike {+ const instance = Object.create(CreateTemplateRequestBuilder.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "CreateTemplateRequestBuilder";+ 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_: CreateTemplateRequestBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: CreateTemplateRequestBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_createtemplaterequestbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_createtemplaterequestbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is CreateTemplateRequestBuilderLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "CreateTemplateRequestBuilder"+ );+ },+ };+ })();+const FfiConverterTypeCreateTemplateRequestBuilder = new FfiConverterObject(+ uniffiTypeCreateTemplateRequestBuilderObjectFactory,+);++export interface CreateUserApiKeyRequestBuilderLike {+ build() /*throws*/ : CreateUserApiKeyRequest;+ name(value: string): CreateUserApiKeyRequestBuilderLike;+ scope(value: Array<string>): CreateUserApiKeyRequestBuilderLike;+}+/**+ * @deprecated Use `CreateUserApiKeyRequestBuilderLike` instead.+ */+export type CreateUserApiKeyRequestBuilderInterface =+ CreateUserApiKeyRequestBuilderLike;++export class CreateUserApiKeyRequestBuilder+ extends UniffiAbstractObject+ implements CreateUserApiKeyRequestBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "CreateUserApiKeyRequestBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_createuserapikeyrequestbuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory.bless(pointer);+ }++ build(): CreateUserApiKeyRequest /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeCreateUserApiKeyRequest.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSdkBuildError.lift.bind(+ FfiConverterTypeSdkBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_build(+ uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory.clonePointer(+ this,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ name(value: string): CreateUserApiKeyRequestBuilderLike {+ return FfiConverterTypeCreateUserApiKeyRequestBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_name(+ uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ scope(value: Array<string>): CreateUserApiKeyRequestBuilderLike {+ return FfiConverterTypeCreateUserApiKeyRequestBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_createuserapikeyrequestbuilder_scope(+ uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterSequenceString.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer =+ uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory.pointer(this);+ uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory.freePointer(+ pointer,+ );+ uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is CreateUserApiKeyRequestBuilder {+ return uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory.isConcreteType(+ obj_,+ );+ }+}++const uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory: UniffiObjectFactory<CreateUserApiKeyRequestBuilderLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory.freePointer(+ heldValue,+ );+ })+ : null;++ return {+ create(pointer: UniffiHandle): CreateUserApiKeyRequestBuilderLike {+ const instance = Object.create(+ CreateUserApiKeyRequestBuilder.prototype,+ );+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "CreateUserApiKeyRequestBuilder";+ 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_: CreateUserApiKeyRequestBuilderLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: CreateUserApiKeyRequestBuilderLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_createuserapikeyrequestbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_createuserapikeyrequestbuilder(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is CreateUserApiKeyRequestBuilderLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "CreateUserApiKeyRequestBuilder"+ );+ },+ };+ })();+const FfiConverterTypeCreateUserApiKeyRequestBuilder = new FfiConverterObject(+ uniffiTypeCreateUserApiKeyRequestBuilderObjectFactory,+);++export interface CyclopsClientLike {+ createClaim(+ request: CreateClaimRequest,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Claim>;+ createPool(+ request: CreatePoolRequest,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Pool>;+ createTemplate(+ request: CreateTemplateRequest,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Template>;+ createUserApiKey(+ request: CreateUserApiKeyRequest,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<NewUserApiKey>;+ deleteClaim(+ claim: Claim,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<void>;+ deletePool(+ pool: Pool,+ 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>;+ getPool(+ name: string,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Pool>;+ getTemplate(+ namespace: string,+ name: string,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Template>;+ listClaims(+ namespace: string,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Array<Claim>>;+ listNamespaces(asyncOpts_?: {+ signal: AbortSignal;+ }) /*throws*/ : Promise<Array<Namespace>>;+ listPools(+ namespace: string,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Array<Pool>>;+ listTemplates(+ namespace: string,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Array<Template>>;+ listUserApiKeys(asyncOpts_?: {+ signal: AbortSignal;+ }) /*throws*/ : Promise<Array<UserApiKey>>;+ reconcilePool(+ request: CreatePoolRequest,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Pool>;+ reconcileTemplate(+ request: CreateTemplateRequest,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Template>;+ /**+ * Push the claim's `spec.lifecycle.shutdownTime` forward. That absolute+ * expiry is the only liveness input the pool operator's claim reaper+ * honors, so a holder that outlives its current lease must renew before+ * the deadline passes or the bound sandbox is deleted underneath it.+ * Deliberately narrower than a claim update: nothing else on the claim+ * can be mutated through the SDK.+ */+ renewClaim(+ claim: Claim,+ shutdownTime: string,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Claim>;+ serviceRequest(+ sandbox: Sandbox,+ service: string,+ path: string,+ request: HttpRequest,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<HttpResponse>;+ updatePool(+ pool: Pool,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Pool>;+ updateTemplate(+ template: Template,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Template>;+ waitClaim(+ claim: Claim,+ asyncOpts_?: { signal: AbortSignal },+ ) /*throws*/ : Promise<Sandbox>;+}+/**+ * @deprecated Use `CyclopsClientLike` instead.+ */+export type CyclopsClientInterface = CyclopsClientLike;++export class CyclopsClient+ extends UniffiAbstractObject+ implements CyclopsClientLike+{+ readonly [uniffiTypeNameSymbol] = "CyclopsClient";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ // No primary constructor declared for this class.+ private constructor(pointer: UniffiHandle) {+ super();+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeCyclopsClientObjectFactory.bless(pointer);+ }++ static connect(+ configuration: CyclopsConfiguration,+ httpClient: HttpClient,+ ): CyclopsClientLike /*throws*/ {+ return FfiConverterTypeCyclopsClient.lift(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSdkError.lift.bind(+ FfiConverterTypeSdkError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(+ FfiConverterTypeCyclopsConfiguration.lower(+ configuration,+ nativeModule().rustbuffer_alloc,+ ),+ FfiConverterTypeHttpClient.lower(+ httpClient,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ static connectBrowserWithAccessToken(+ configuration: CyclopsTokenProviderConfiguration,+ accessToken: string,+ ): CyclopsClientLike /*throws*/ {+ return FfiConverterTypeCyclopsClient.lift(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSdkError.lift.bind(+ FfiConverterTypeSdkError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_browser_with_access_token(+ FfiConverterTypeCyclopsTokenProviderConfiguration.lower(+ configuration,+ nativeModule().rustbuffer_alloc,+ ),+ FfiConverterString.lower(+ accessToken,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ static connectWithAccessToken(+ configuration: CyclopsTokenProviderConfiguration,+ accessToken: string,+ httpClient: HttpClient,+ ): CyclopsClientLike /*throws*/ {+ return FfiConverterTypeCyclopsClient.lift(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSdkError.lift.bind(+ FfiConverterTypeSdkError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect_with_access_token(+ FfiConverterTypeCyclopsTokenProviderConfiguration.lower(+ configuration,+ nativeModule().rustbuffer_alloc,+ ),+ FfiConverterString.lower(+ accessToken,+ nativeModule().rustbuffer_alloc,+ ),+ FfiConverterTypeHttpClient.lower(+ httpClient,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ static connectWithAccessTokenAndNativeHttpClient(+ configuration: CyclopsTokenProviderConfiguration,+ accessToken: string,+ ): CyclopsClientLike /*throws*/ {return FfiConverterTypeCyclopsClient.lift(uniffiCaller.rustCallWithError(/*liftError:*/ FfiConverterTypeSdkError.lift.bind(@@ -3313,27 +4213,294 @@ export class CyclopsClient}}- static instanceOf(obj_: any): obj_ is CyclopsClient {- return uniffiTypeCyclopsClientObjectFactory.isConcreteType(obj_);+ static instanceOf(obj_: any): obj_ is CyclopsClient {+ return uniffiTypeCyclopsClientObjectFactory.isConcreteType(obj_);+ }+}++const uniffiTypeCyclopsClientObjectFactory: UniffiObjectFactory<CyclopsClientLike> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeCyclopsClientObjectFactory.freePointer(heldValue);+ })+ : null;++ return {+ create(pointer: UniffiHandle): CyclopsClientLike {+ const instance = Object.create(CyclopsClient.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "CyclopsClient";+ 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_: CyclopsClientLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: CyclopsClientLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_cyclopsclient(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_cyclopsclient(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is CyclopsClientLike {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "CyclopsClient"+ );+ },+ };+ })();+const FfiConverterTypeCyclopsClient = new FfiConverterObject(+ uniffiTypeCyclopsClientObjectFactory,+);++export interface CyclopsTokenProviderConfigurationBuilderLike {+ baseUrl(value: string): CyclopsTokenProviderConfigurationBuilderLike;+ build() /*throws*/ : CyclopsTokenProviderConfiguration;+ claimPollIntervalMs(+ value: bigint,+ ): CyclopsTokenProviderConfigurationBuilderLike;+ claimPollLimit(value: number): CyclopsTokenProviderConfigurationBuilderLike;+ poolPollIntervalMs(+ value: bigint,+ ): CyclopsTokenProviderConfigurationBuilderLike;+ poolPollLimit(value: number): CyclopsTokenProviderConfigurationBuilderLike;+}+/**+ * @deprecated Use `CyclopsTokenProviderConfigurationBuilderLike` instead.+ */+export type CyclopsTokenProviderConfigurationBuilderInterface =+ CyclopsTokenProviderConfigurationBuilderLike;++export class CyclopsTokenProviderConfigurationBuilder+ extends UniffiAbstractObject+ implements CyclopsTokenProviderConfigurationBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "CyclopsTokenProviderConfigurationBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_cyclopstokenproviderconfigurationbuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.bless(+ pointer,+ );+ }++ baseUrl(value: string): CyclopsTokenProviderConfigurationBuilderLike {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_base_url(+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ build(): CyclopsTokenProviderConfiguration /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeCyclopsTokenProviderConfiguration.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSdkBuildError.lift.bind(+ FfiConverterTypeSdkBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_build(+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.clonePointer(+ this,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ claimPollIntervalMs(+ value: bigint,+ ): CyclopsTokenProviderConfigurationBuilderLike {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms(+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterUInt64.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ claimPollLimit(value: number): CyclopsTokenProviderConfigurationBuilderLike {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit(+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ poolPollIntervalMs(+ value: bigint,+ ): CyclopsTokenProviderConfigurationBuilderLike {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms(+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterUInt64.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ poolPollLimit(value: number): CyclopsTokenProviderConfigurationBuilderLike {+ return FfiConverterTypeCyclopsTokenProviderConfigurationBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit(+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.clonePointer(+ this,+ ),+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer =+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.pointer(+ this,+ );+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.freePointer(+ pointer,+ );+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.unbless(+ ptr,+ );+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(+ obj_: any,+ ): obj_ is CyclopsTokenProviderConfigurationBuilder {+ return uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.isConcreteType(+ obj_,+ );}}-const uniffiTypeCyclopsClientObjectFactory: UniffiObjectFactory<CyclopsClientLike> =+const uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory: UniffiObjectFactory<CyclopsTokenProviderConfigurationBuilderLike> =(() => {/// <reference lib="es2021" />const registry =typeof FinalizationRegistry !== "undefined"? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {- uniffiTypeCyclopsClientObjectFactory.freePointer(heldValue);+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory.freePointer(+ heldValue,+ );}): null;return {- create(pointer: UniffiHandle): CyclopsClientLike {- const instance = Object.create(CyclopsClient.prototype);+ create(+ pointer: UniffiHandle,+ ): CyclopsTokenProviderConfigurationBuilderLike {+ const instance = Object.create(+ CyclopsTokenProviderConfigurationBuilder.prototype,+ );instance[pointerLiteralSymbol] = pointer;instance[destructorGuardSymbol] = this.bless(pointer);- instance[uniffiTypeNameSymbol] = "CyclopsClient";+ instance[uniffiTypeNameSymbol] =+ "CyclopsTokenProviderConfigurationBuilder";return instance;},@@ -3354,18 +4521,22 @@ const uniffiTypeCyclopsClientObjectFactory: UniffiObjectFactory<CyclopsClientLik}},- pointer(obj_: CyclopsClientLike): UniffiHandle {+ pointer(+ obj_: CyclopsTokenProviderConfigurationBuilderLike,+ ): UniffiHandle {if ((obj_ as any)[destructorGuardSymbol] === undefined) {throw new UniffiInternalError.UnexpectedNullPointer();}return (obj_ as any)[pointerLiteralSymbol];},- clonePointer(obj_: CyclopsClientLike): UniffiHandle {+ clonePointer(+ obj_: CyclopsTokenProviderConfigurationBuilderLike,+ ): UniffiHandle {const pointer = this.pointer(obj_);return uniffiCaller.rustCall(/*caller:*/ (callStatus) =>- nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_cyclopsclient(+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_cyclopstokenproviderconfigurationbuilder(pointer,callStatus,),@@ -3376,7 +4547,7 @@ const uniffiTypeCyclopsClientObjectFactory: UniffiObjectFactory<CyclopsClientLikfreePointer(pointer: UniffiHandle): void {uniffiCaller.rustCall(/*caller:*/ (callStatus) =>- nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_cyclopsclient(+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_cyclopstokenproviderconfigurationbuilder(pointer,callStatus,),@@ -3384,17 +4555,21 @@ const uniffiTypeCyclopsClientObjectFactory: UniffiObjectFactory<CyclopsClientLik);},- isConcreteType(obj_: any): obj_ is CyclopsClientLike {+ isConcreteType(+ obj_: any,+ ): obj_ is CyclopsTokenProviderConfigurationBuilderLike {return (obj_[destructorGuardSymbol] &&- obj_[uniffiTypeNameSymbol] === "CyclopsClient"+ obj_[uniffiTypeNameSymbol] ===+ "CyclopsTokenProviderConfigurationBuilder");},};})();-const FfiConverterTypeCyclopsClient = new FfiConverterObject(- uniffiTypeCyclopsClientObjectFactory,-);+const FfiConverterTypeCyclopsTokenProviderConfigurationBuilder =+ new FfiConverterObject(+ uniffiTypeCyclopsTokenProviderConfigurationBuilderObjectFactory,+ );export interface HttpClient {execute(@@ -3457,34 +4632,325 @@ export class HttpClientImpl extends UniffiAbstractObject implements HttpClient {uniffiDestroy(): void {const ptr = (this as any)[destructorGuardSymbol];if (ptr !== undefined) {- const pointer = uniffiTypeHttpClientImplObjectFactory.pointer(this);- uniffiTypeHttpClientImplObjectFactory.freePointer(pointer);- uniffiTypeHttpClientImplObjectFactory.unbless(ptr);+ const pointer = uniffiTypeHttpClientImplObjectFactory.pointer(this);+ uniffiTypeHttpClientImplObjectFactory.freePointer(pointer);+ uniffiTypeHttpClientImplObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is HttpClientImpl {+ return uniffiTypeHttpClientImplObjectFactory.isConcreteType(obj_);+ }+}++const uniffiTypeHttpClientImplObjectFactory: UniffiObjectFactory<HttpClient> =+ (() => {+ /// <reference lib="es2021" />+ const registry =+ typeof FinalizationRegistry !== "undefined"+ ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeHttpClientImplObjectFactory.freePointer(heldValue);+ })+ : null;++ return {+ create(pointer: UniffiHandle): HttpClient {+ const instance = Object.create(HttpClientImpl.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "HttpClientImpl";+ 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_: HttpClient): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: HttpClient): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_httpclient(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) =>+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_httpclient(+ pointer,+ callStatus,+ ),+ /*liftString:*/ FfiConverterString.lift,+ );+ },++ isConcreteType(obj_: any): obj_ is HttpClient {+ return (+ obj_[destructorGuardSymbol] &&+ obj_[uniffiTypeNameSymbol] === "HttpClientImpl"+ );+ },+ };+ })();+const FfiConverterTypeHttpClient = new FfiConverterObjectWithCallbacks(+ uniffiTypeHttpClientImplObjectFactory,+);++// Add a vtable for the callbacks that go in HttpClient.++// Put the implementation in a struct so we don't pollute the top-level namespace+const uniffiCallbackInterfaceHttpClient: { vtable: any; register: () => void } =+ {+ // Create the VTable using a series of closures.+ // ts automatically converts these into C callback functions.+ vtable: {+ execute: (+ uniffiHandle: bigint,+ request: Uint8Array,+ uniffiFutureCallback: UniffiForeignFutureCompleterustBuffer,+ uniffiCallbackData: bigint,+ ) => {+ const uniffiMakeCall = async (+ signal: AbortSignal,+ ): Promise<HttpResponse> => {+ const jsCallback = FfiConverterTypeHttpClient.lift(uniffiHandle);+ return await jsCallback.execute(+ FfiConverterTypeHttpRequest.lift(request),+ { signal },+ );+ };+ const uniffiHandleSuccess = (returnValue: HttpResponse) => {+ uniffiFutureCallback.call(+ uniffiFutureCallback,+ uniffiCallbackData,+ /* UniffiForeignFutureResultRustBuffer */ {+ return_value: FfiConverterTypeHttpResponse.lower(+ returnValue,+ nativeModule().rustbuffer_alloc,+ ),+ call_status: uniffiCaller.createCallStatus(),+ },+ );+ };+ const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {+ uniffiFutureCallback.call(+ uniffiFutureCallback,+ uniffiCallbackData,+ /* UniffiForeignFutureResultRustBuffer */ {+ return_value: /*empty*/ new Uint8Array(0),+ // TODO create callstatus with error.+ call_status: uniffiCaller.createErrorStatus(code, errorBuf),+ },+ );+ };+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(+ /*makeCall:*/ uniffiMakeCall,+ /*handleSuccess:*/ uniffiHandleSuccess,+ /*handleError:*/ uniffiHandleError,+ /*isErrorType:*/ HttpError.instanceOf,+ /*lowerError:*/ FfiConverterTypeHttpError.lower.bind(+ FfiConverterTypeHttpError,+ ),+ /*lowerString:*/ FfiConverterString.lower.bind(FfiConverterString),+ /*alloc:*/ nativeModule().rustbuffer_alloc,+ );+ return uniffiForeignFuture;+ },+ uniffi_free: (uniffiHandle: UniffiHandle): void => {+ // this will throw a stale handle error if the handle isn't found.+ FfiConverterTypeHttpClient.drop(uniffiHandle);+ },+ uniffi_clone: (uniffiHandle: UniffiHandle): UniffiHandle => {+ return FfiConverterTypeHttpClient.clone(uniffiHandle);+ },+ },+ register: () => {+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(+ uniffiCallbackInterfaceHttpClient.vtable,+ );+ },+ };++export interface TemplateBuilderLike {+ apiVersion(value: string): TemplateBuilderLike;+ build() /*throws*/ : Template;+ kind(value: string): TemplateBuilderLike;+ metadata(value: ResourceMetadata): TemplateBuilderLike;+ spec(value: OsGymSandboxTemplateSpec): TemplateBuilderLike;+}+/**+ * @deprecated Use `TemplateBuilderLike` instead.+ */+export type TemplateBuilderInterface = TemplateBuilderLike;++export class TemplateBuilder+ extends UniffiAbstractObject+ implements TemplateBuilderLike+{+ readonly [uniffiTypeNameSymbol] = "TemplateBuilder";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor() {+ super();+ const pointer = uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_templatebuilder_new(+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] =+ uniffiTypeTemplateBuilderObjectFactory.bless(pointer);+ }++ apiVersion(value: string): TemplateBuilderLike {+ return FfiConverterTypeTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_templatebuilder_api_version(+ uniffiTypeTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ build(): Template /*throws*/ {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterTypeTemplate.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(+ uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeSdkBuildError.lift.bind(+ FfiConverterTypeSdkBuildError,+ ),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_templatebuilder_build(+ uniffiTypeTemplateBuilderObjectFactory.clonePointer(this),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ kind(value: string): TemplateBuilderLike {+ return FfiConverterTypeTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_templatebuilder_kind(+ uniffiTypeTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ metadata(value: ResourceMetadata): TemplateBuilderLike {+ return FfiConverterTypeTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_templatebuilder_metadata(+ uniffiTypeTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterTypeResourceMetadata.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ spec(value: OsGymSandboxTemplateSpec): TemplateBuilderLike {+ return FfiConverterTypeTemplateBuilder.lift(+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_templatebuilder_spec(+ uniffiTypeTemplateBuilderObjectFactory.clonePointer(this),+ FfiConverterTypeOSGymSandboxTemplateSpec.lower(+ value,+ nativeModule().rustbuffer_alloc,+ ),+ callStatus,+ );+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ),+ );+ }++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer = uniffiTypeTemplateBuilderObjectFactory.pointer(this);+ uniffiTypeTemplateBuilderObjectFactory.freePointer(pointer);+ uniffiTypeTemplateBuilderObjectFactory.unbless(ptr);delete (this as any)[destructorGuardSymbol];}}- static instanceOf(obj_: any): obj_ is HttpClientImpl {- return uniffiTypeHttpClientImplObjectFactory.isConcreteType(obj_);+ static instanceOf(obj_: any): obj_ is TemplateBuilder {+ return uniffiTypeTemplateBuilderObjectFactory.isConcreteType(obj_);}}-const uniffiTypeHttpClientImplObjectFactory: UniffiObjectFactory<HttpClient> =+const uniffiTypeTemplateBuilderObjectFactory: UniffiObjectFactory<TemplateBuilderLike> =(() => {/// <reference lib="es2021" />const registry =typeof FinalizationRegistry !== "undefined"? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {- uniffiTypeHttpClientImplObjectFactory.freePointer(heldValue);+ uniffiTypeTemplateBuilderObjectFactory.freePointer(heldValue);}): null;return {- create(pointer: UniffiHandle): HttpClient {- const instance = Object.create(HttpClientImpl.prototype);+ create(pointer: UniffiHandle): TemplateBuilderLike {+ const instance = Object.create(TemplateBuilder.prototype);instance[pointerLiteralSymbol] = pointer;instance[destructorGuardSymbol] = this.bless(pointer);- instance[uniffiTypeNameSymbol] = "HttpClientImpl";+ instance[uniffiTypeNameSymbol] = "TemplateBuilder";return instance;},@@ -3505,18 +4971,18 @@ const uniffiTypeHttpClientImplObjectFactory: UniffiObjectFactory<HttpClient> =}},- pointer(obj_: HttpClient): UniffiHandle {+ pointer(obj_: TemplateBuilderLike): UniffiHandle {if ((obj_ as any)[destructorGuardSymbol] === undefined) {throw new UniffiInternalError.UnexpectedNullPointer();}return (obj_ as any)[pointerLiteralSymbol];},- clonePointer(obj_: HttpClient): UniffiHandle {+ clonePointer(obj_: TemplateBuilderLike): UniffiHandle {const pointer = this.pointer(obj_);return uniffiCaller.rustCall(/*caller:*/ (callStatus) =>- nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_httpclient(+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_templatebuilder(pointer,callStatus,),@@ -3527,7 +4993,7 @@ const uniffiTypeHttpClientImplObjectFactory: UniffiObjectFactory<HttpClient> =freePointer(pointer: UniffiHandle): void {uniffiCaller.rustCall(/*caller:*/ (callStatus) =>- nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_httpclient(+ nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_templatebuilder(pointer,callStatus,),@@ -3535,93 +5001,18 @@ const uniffiTypeHttpClientImplObjectFactory: UniffiObjectFactory<HttpClient> =);},- isConcreteType(obj_: any): obj_ is HttpClient {+ isConcreteType(obj_: any): obj_ is TemplateBuilderLike {return (obj_[destructorGuardSymbol] &&- obj_[uniffiTypeNameSymbol] === "HttpClientImpl"+ obj_[uniffiTypeNameSymbol] === "TemplateBuilder");},};})();-const FfiConverterTypeHttpClient = new FfiConverterObjectWithCallbacks(- uniffiTypeHttpClientImplObjectFactory,+const FfiConverterTypeTemplateBuilder = new FfiConverterObject(+ uniffiTypeTemplateBuilderObjectFactory,);-// Add a vtable for the callbacks that go in HttpClient.--// Put the implementation in a struct so we don't pollute the top-level namespace-const uniffiCallbackInterfaceHttpClient: { vtable: any; register: () => void } =- {- // Create the VTable using a series of closures.- // ts automatically converts these into C callback functions.- vtable: {- execute: (- uniffiHandle: bigint,- request: Uint8Array,- uniffiFutureCallback: UniffiForeignFutureCompleterustBuffer,- uniffiCallbackData: bigint,- ) => {- const uniffiMakeCall = async (- signal: AbortSignal,- ): Promise<HttpResponse> => {- const jsCallback = FfiConverterTypeHttpClient.lift(uniffiHandle);- return await jsCallback.execute(- FfiConverterTypeHttpRequest.lift(request),- { signal },- );- };- const uniffiHandleSuccess = (returnValue: HttpResponse) => {- uniffiFutureCallback.call(- uniffiFutureCallback,- uniffiCallbackData,- /* UniffiForeignFutureResultRustBuffer */ {- return_value: FfiConverterTypeHttpResponse.lower(- returnValue,- nativeModule().rustbuffer_alloc,- ),- call_status: uniffiCaller.createCallStatus(),- },- );- };- const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {- uniffiFutureCallback.call(- uniffiFutureCallback,- uniffiCallbackData,- /* UniffiForeignFutureResultRustBuffer */ {- return_value: /*empty*/ new Uint8Array(0),- // TODO create callstatus with error.- call_status: uniffiCaller.createErrorStatus(code, errorBuf),- },- );- };- const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(- /*makeCall:*/ uniffiMakeCall,- /*handleSuccess:*/ uniffiHandleSuccess,- /*handleError:*/ uniffiHandleError,- /*isErrorType:*/ HttpError.instanceOf,- /*lowerError:*/ FfiConverterTypeHttpError.lower.bind(- FfiConverterTypeHttpError,- ),- /*lowerString:*/ FfiConverterString.lower.bind(FfiConverterString),- /*alloc:*/ nativeModule().rustbuffer_alloc,- );- return uniffiForeignFuture;- },- uniffi_free: (uniffiHandle: UniffiHandle): void => {- // this will throw a stale handle error if the handle isn't found.- FfiConverterTypeHttpClient.drop(uniffiHandle);- },- uniffi_clone: (uniffiHandle: UniffiHandle): UniffiHandle => {- return FfiConverterTypeHttpClient.clone(uniffiHandle);- },- },- register: () => {- nativeModule().ubrn_uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(- uniffiCallbackInterfaceHttpClient.vtable,- );- },- };-// FfiConverter for Map<string, string>const FfiConverterMapStringString = new FfiConverterMap(FfiConverterString,@@ -3717,6 +5108,150 @@ function uniffiEnsureInitialized() {"uniffi_cyclops_sdk_checksum_method_accesstokenprovider_get_access_token",);}+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new() !==+ 10967+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_constructor_createclaimrequestbuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build() !==+ 10518+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name() !==+ 19762+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_name",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool() !==+ 7405+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_pool",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec() !==+ 28263+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createclaimrequestbuilder_spec",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new() !==+ 33658+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_constructor_createpoolrequestbuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_build() !==+ 60558+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_namespace() !==+ 18934+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createpoolrequestbuilder_namespace",+ );+ }+ 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_createtemplaterequestbuilder_new() !==+ 6787+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_constructor_createtemplaterequestbuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_build() !==+ 46749+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_name() !==+ 38970+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_name",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_namespace() !==+ 38181+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_namespace",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_spec() !==+ 29902+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createtemplaterequestbuilder_spec",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new() !==+ 47741+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_constructor_createuserapikeyrequestbuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build() !==+ 18677+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name() !==+ 53365+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_name",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope() !==+ 26616+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_createuserapikeyrequestbuilder_scope",+ );+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() !==54404@@ -3965,6 +5500,62 @@ function uniffiEnsureInitialized() {"uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new",);}+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new() !==+ 43069+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_constructor_cyclopstokenproviderconfigurationbuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url() !==+ 48016+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_base_url",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build() !==+ 28182+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms() !==+ 50054+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_interval_ms",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit() !==+ 7533+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_claim_poll_limit",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms() !==+ 16373+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_interval_ms",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit() !==+ 6865+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_cyclopstokenproviderconfigurationbuilder_pool_poll_limit",+ );+ }if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_httpclient_execute() !==38803@@ -3973,6 +5564,54 @@ function uniffiEnsureInitialized() {"uniffi_cyclops_sdk_checksum_method_httpclient_execute",);}+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new() !==+ 19815+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_constructor_templatebuilder_new",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version() !==+ 65471+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_templatebuilder_api_version",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_templatebuilder_build() !==+ 2046+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_templatebuilder_build",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_templatebuilder_kind() !==+ 14122+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_templatebuilder_kind",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata() !==+ 25572+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_templatebuilder_metadata",+ );+ }+ if (+ nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_templatebuilder_spec() !==+ 43128+ ) {+ throw new UniffiInternalError.ApiChecksumMismatch(+ "uniffi_cyclops_sdk_checksum_method_templatebuilder_spec",+ );+ }uniffiCallbackInterfaceAccessTokenProvider.register();uniffiCallbackInterfaceHttpClient.register();@@ -3985,13 +5624,18 @@ export default Object.freeze({FfiConverterTypeAccessTokenProviderError,FfiConverterTypeClaim,FfiConverterTypeCreateClaimRequest,+ FfiConverterTypeCreateClaimRequestBuilder,FfiConverterTypeCreatePoolRequest,+ FfiConverterTypeCreatePoolRequestBuilder,FfiConverterTypeCreateTemplateRequest,+ FfiConverterTypeCreateTemplateRequestBuilder,FfiConverterTypeCreateUserApiKeyRequest,+ FfiConverterTypeCreateUserApiKeyRequestBuilder,FfiConverterTypeCyclopsClient,FfiConverterTypeCyclopsConfiguration,FfiConverterTypeCyclopsCredentials,FfiConverterTypeCyclopsTokenProviderConfiguration,+ FfiConverterTypeCyclopsTokenProviderConfigurationBuilder,FfiConverterTypeHttpClient,FfiConverterTypeHttpError,FfiConverterTypeHttpHeader,@@ -4002,8 +5646,10 @@ export default Object.freeze({FfiConverterTypePool,FfiConverterTypeResourceMetadata,FfiConverterTypeSandbox,+ FfiConverterTypeSdkBuildError,FfiConverterTypeSdkError,FfiConverterTypeTemplate,+ FfiConverterTypeTemplateBuilder,FfiConverterTypeUserApiKey,},});diff --git a/libs/fleet/sdk-schema/src/lib.rs b/libs/fleet/sdk-schema/src/lib.rsindex 369abfd912..1d69ff8db0 100644--- a/libs/fleet/sdk-schema/src/lib.rs+++ b/libs/fleet/sdk-schema/src/lib.rs@@ -21,7 +21,7 @@ pub use sandbox::{};pub use warmpool::{OSGymSandboxWarmPool, OSGymSandboxWarmPoolSpec, OSGymSandboxWarmPoolSpecBuilder,- OSGymSandboxWarmPoolStatus, WarmPoolAutoscaling,+ OSGymSandboxWarmPoolStatus, WarmPoolAutoscaling, WarmPoolAutoscalingBuilder,};uniffi::setup_scaffolding!("cyclops_sdk_schema");diff --git a/libs/fleet/sdk-schema/src/warmpool.rs b/libs/fleet/sdk-schema/src/warmpool.rsindex ea53e7118f..7187aa9032 100644--- a/libs/fleet/sdk-schema/src/warmpool.rs+++ b/libs/fleet/sdk-schema/src/warmpool.rs@@ -27,7 +27,17 @@ fn sandbox_template_ref_schema(_: &mut schemars::SchemaGenerator) -> schemars::S})}-#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema, uniffi::Record)]+#[derive(+ Clone,+ Debug,+ PartialEq,+ Serialize,+ Deserialize,+ JsonSchema,+ uniffi::Record,+ uniffi_builder_derive::UniffiBuilder,+)]+#[uniffi_builder(crate::SchemaBuildError)]#[serde(rename_all = "camelCase")]pub struct WarmPoolAutoscaling {#[schemars(diff --git a/libs/fleet/sdk-schema/tests/uniffi_builder.rs b/libs/fleet/sdk-schema/tests/uniffi_builder.rsindex 064e1108be..1642a7c42c 100644--- a/libs/fleet/sdk-schema/tests/uniffi_builder.rs+++ b/libs/fleet/sdk-schema/tests/uniffi_builder.rs@@ -2,6 +2,7 @@ use cyclops_sdk_schema::{OSGymSandboxTemplateSpec, OSGymSandboxTemplateSpecBuilder, OSGymSandboxWarmPoolSpec,OSGymSandboxWarmPoolSpecBuilder, SandboxService, SandboxServiceBuilder, SandboxTemplateRef,SandboxTemplateRefBuilder, SchemaBuildError, VmTemplate, VmTemplateBuilder,+ WarmPoolAutoscaling, WarmPoolAutoscalingBuilder,};#[test]@@ -80,3 +81,26 @@ fn builder_setters_preserve_prior_versions() {"registry.example/second:latest");}++#[test]+fn autoscaling_builder_supports_empty_and_immutable_optional_values() {+ let base = WarmPoolAutoscalingBuilder::new();+ let configured = base.min_pool_size(1).initial_pool_size(2).max_pool_size(5);++ assert_eq!(+ base.build().unwrap(),+ WarmPoolAutoscaling {+ min_pool_size: None,+ initial_pool_size: None,+ max_pool_size: None,+ }+ );+ assert_eq!(+ configured.build().unwrap(),+ WarmPoolAutoscaling {+ min_pool_size: Some(1),+ initial_pool_size: Some(2),+ max_pool_size: Some(5),+ }+ );+}diff --git a/libs/fleet/sdk/src/lib.rs b/libs/fleet/sdk/src/lib.rsindex db9e31172f..7b525c4ab6 100644--- a/libs/fleet/sdk/src/lib.rs+++ b/libs/fleet/sdk/src/lib.rs@@ -18,10 +18,12 @@ pub use error::{pub use routes::validate_dns_label;pub use transport::{AccessTokenProvider, HttpClient};pub use types::{- Claim, CreateClaimRequest, CreatePoolRequest, CreatePoolRequestBuilder, CreateTemplateRequest,- CreateTemplateRequestBuilder, CreateUserApiKeyRequest, CyclopsConfiguration,- CyclopsCredentials, CyclopsTokenProviderConfiguration, HttpHeader, HttpRequest, HttpResponse,- Namespace, NewUserApiKey, Pool, ResourceMetadata, Sandbox, Template, UserApiKey,+ Claim, CreateClaimRequest, CreateClaimRequestBuilder, CreatePoolRequest,+ CreatePoolRequestBuilder, CreateTemplateRequest, CreateTemplateRequestBuilder,+ CreateUserApiKeyRequest, CreateUserApiKeyRequestBuilder, CyclopsConfiguration,+ CyclopsCredentials, CyclopsTokenProviderConfiguration,+ CyclopsTokenProviderConfigurationBuilder, HttpHeader, HttpRequest, HttpResponse, Namespace,+ NewUserApiKey, Pool, ResourceMetadata, Sandbox, Template, TemplateBuilder, UserApiKey,};uniffi::setup_scaffolding!("fleet_sdk");diff --git a/libs/fleet/sdk/src/types.rs b/libs/fleet/sdk/src/types.rsindex 2bf33f55b0..f152ba6325 100644--- a/libs/fleet/sdk/src/types.rs+++ b/libs/fleet/sdk/src/types.rs@@ -70,7 +70,8 @@ impl CyclopsConfiguration {}}-#[derive(Clone, Debug, uniffi::Record)]+#[derive(Clone, Debug, uniffi::Record, uniffi_builder_derive::UniffiBuilder)]+#[uniffi_builder(crate::SdkBuildError)]pub struct CyclopsTokenProviderConfiguration {pub base_url: String,pub pool_poll_interval_ms: u64,@@ -165,7 +166,17 @@ whereOption::<Vec<String>>::deserialize(deserializer).map(Option::unwrap_or_default)}-#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, uniffi::Record)]+#[derive(+ Clone,+ Debug,+ PartialEq,+ Eq,+ Serialize,+ Deserialize,+ uniffi::Record,+ uniffi_builder_derive::UniffiBuilder,+)]+#[uniffi_builder(crate::SdkBuildError)]pub struct CreateUserApiKeyRequest {pub name: String,pub scope: Vec<String>,@@ -208,7 +219,10 @@ impl PartialEq for CreatePoolRequest {/// The `osgym.cua.ai/v1alpha1 OSGymSandboxTemplate` CR verbatim. Warm pools/// and claims reference one by name via `spec.sandboxTemplateRef.name`.-#[derive(Clone, Debug, Serialize, Deserialize, uniffi::Record)]+#[derive(+ Clone, Debug, Serialize, Deserialize, uniffi::Record, uniffi_builder_derive::UniffiBuilder,+)]+#[uniffi_builder(crate::SdkBuildError)]#[serde(rename_all = "camelCase")]pub struct Template {pub api_version: String,@@ -244,7 +258,10 @@ impl PartialEq for CreateTemplateRequest {}}-#[derive(Clone, Debug, Serialize, Deserialize, uniffi::Record)]+#[derive(+ Clone, Debug, Serialize, Deserialize, uniffi::Record, uniffi_builder_derive::UniffiBuilder,+)]+#[uniffi_builder(crate::SdkBuildError)]pub struct CreateClaimRequest {pub pool: Pool,pub spec: Option<ClaimSpec>,diff --git a/libs/fleet/sdk/tests/uniffi_builder.rs b/libs/fleet/sdk/tests/uniffi_builder.rsindex 9f3144ed35..a57cbbb3be 100644--- a/libs/fleet/sdk/tests/uniffi_builder.rs+++ b/libs/fleet/sdk/tests/uniffi_builder.rs@@ -1,6 +1,8 @@use cyclops_sdk::{- CreatePoolRequest, CreatePoolRequestBuilder, CreateTemplateRequest,- CreateTemplateRequestBuilder, SdkBuildError,+ CreateClaimRequestBuilder, CreatePoolRequest, CreatePoolRequestBuilder, CreateTemplateRequest,+ CreateTemplateRequestBuilder, CreateUserApiKeyRequestBuilder,+ CyclopsTokenProviderConfigurationBuilder, Pool, ResourceMetadata, SdkBuildError,+ TemplateBuilder,};use cyclops_sdk_schema::{OSGymSandboxTemplateSpecBuilder, OSGymSandboxWarmPoolSpecBuilder, SandboxTemplateRefBuilder,@@ -57,3 +59,103 @@ fn request_required_fields_use_stable_error() {if record_type == "CreatePoolRequest" && field == "namespace"));}++#[test]+fn builders_cover_remaining_frontend_sdk_records() {+ let configuration = CyclopsTokenProviderConfigurationBuilder::new()+ .base_url("https://api.example.test".into())+ .pool_poll_interval_ms(5_000)+ .pool_poll_limit(120)+ .claim_poll_interval_ms(5_000)+ .claim_poll_limit(120)+ .build()+ .unwrap();+ let user_key = CreateUserApiKeyRequestBuilder::new()+ .name("automation".into())+ .scope(Vec::new())+ .build()+ .unwrap();+ let template_spec = OSGymSandboxTemplateSpecBuilder::new()+ .vm_template(+ VmTemplateBuilder::new()+ .container_disk_image("image".into())+ .build()+ .unwrap(),+ )+ .build()+ .unwrap();+ let pool_spec = OSGymSandboxWarmPoolSpecBuilder::new()+ .replicas(1)+ .sandbox_template_ref(+ SandboxTemplateRefBuilder::new()+ .name("template".into())+ .build()+ .unwrap(),+ )+ .build()+ .unwrap();+ let metadata = ResourceMetadata {+ namespace: "default".into(),+ name: "template".into(),+ labels: None,+ creation_timestamp: None,+ };+ let template = TemplateBuilder::new()+ .api_version("osgym.cua.ai/v1alpha1".into())+ .kind("OSGymSandboxTemplate".into())+ .metadata(metadata.clone())+ .spec(template_spec)+ .build()+ .unwrap();+ let pool = Pool {+ api_version: "osgym.cua.ai/v1alpha1".into(),+ kind: "OSGymSandboxWarmPool".into(),+ metadata,+ spec: pool_spec,+ status: None,+ };+ let claim = CreateClaimRequestBuilder::new().pool(pool).build().unwrap();++ assert_eq!(configuration.pool_poll_interval_ms, 5_000);+ assert_eq!(configuration.claim_poll_limit, 120);+ assert_eq!(user_key.scope, Vec::<String>::new());+ assert_eq!(template.metadata.name, "template");+ assert!(claim.spec.is_none());+ assert!(claim.name.is_none());+}++#[test]+fn remaining_sdk_builders_use_stable_required_field_errors() {+ for (error, record_type, field) in [+ (+ CyclopsTokenProviderConfigurationBuilder::new()+ .build()+ .unwrap_err(),+ "CyclopsTokenProviderConfiguration",+ "base_url",+ ),+ (+ CreateUserApiKeyRequestBuilder::new().build().unwrap_err(),+ "CreateUserApiKeyRequest",+ "name",+ ),+ (+ TemplateBuilder::new().build().unwrap_err(),+ "Template",+ "api_version",+ ),+ (+ CreateClaimRequestBuilder::new().build().unwrap_err(),+ "CreateClaimRequest",+ "pool",+ ),+ ] {+ assert!(matches!(+ error,+ SdkBuildError::MissingRequiredField {+ record_type: actual_record,+ field: actual_field,+ } if actual_record == record_type && actual_field == field+ ));+ }+}diff --git a/libs/fleet/src/sdk/claims.ts b/libs/fleet/src/sdk/claims.tsindex e243a60924..21233e648c 100644--- a/libs/fleet/src/sdk/claims.ts+++ b/libs/fleet/src/sdk/claims.ts@@ -1,7 +1,17 @@-import type { Claim as SdkClaim, CyclopsClient } from "./generated"+import {+ CreateClaimRequestBuilder,+ type Claim as SdkClaim,+ type CreateClaimRequest,+ type CyclopsClient,+ type Pool,+} from "./generated"import { withClient } from "./client"import type { Claim } from "./models"+export function buildClaimRequest(pool: Pool): CreateClaimRequest {+ return new CreateClaimRequestBuilder().pool(pool).build()+}+function claimModel(claim: SdkClaim): Claim {return {name: claim.metadata.name,@@ -39,7 +49,7 @@ export async function createClaim(namespace: string, poolName: string): Promise<if (pool.metadata.namespace !== namespace) {throw new Error(`Pool ${poolName} belongs to namespace ${pool.metadata.namespace}`)}- return claimModel(await client.createClaim({ pool }))+ return claimModel(await client.createClaim(buildClaimRequest(pool)))})}diff --git a/libs/fleet/src/sdk/client.ts b/libs/fleet/src/sdk/client.tsindex d3d06e8dcb..45057011d1 100644--- a/libs/fleet/src/sdk/client.ts+++ b/libs/fleet/src/sdk/client.ts@@ -1,5 +1,10 @@import { getToken } from "../auth/keycloak"-import { CyclopsClient, uniffiInitAsync } from "./generated"+import {+ CyclopsClient,+ CyclopsTokenProviderConfigurationBuilder,+ uniffiInitAsync,+ type CyclopsTokenProviderConfiguration,+} from "./generated"const sdkInitialization = uniffiInitAsync()@@ -7,6 +12,16 @@ function baseUrl(): string {return window.location.origin}+export function buildClientConfiguration(): CyclopsTokenProviderConfiguration {+ return new CyclopsTokenProviderConfigurationBuilder()+ .baseUrl(baseUrl())+ .poolPollIntervalMs(5_000n)+ .poolPollLimit(120)+ .claimPollIntervalMs(5_000n)+ .claimPollLimit(120)+ .build()+}+export async function withClient<T>(operation: (client: CyclopsClient) => Promise<T>,): Promise<T> {@@ -15,13 +30,7 @@ export async function withClient<T>(if (!token) throw new Error("Authentication token is unavailable")const client = CyclopsClient.connectBrowserWithAccessToken(- {- baseUrl: baseUrl(),- poolPollIntervalMs: 5_000n,- poolPollLimit: 120,- claimPollIntervalMs: 5_000n,- claimPollLimit: 120,- },+ buildClientConfiguration(),token,) as CyclopsClienttry {diff --git a/libs/fleet/src/sdk/pools.ts b/libs/fleet/src/sdk/pools.tsindex c672f53d59..4a5c1f0bf5 100644--- a/libs/fleet/src/sdk/pools.ts+++ b/libs/fleet/src/sdk/pools.ts@@ -1,11 +1,28 @@import {+ CreatePoolRequestBuilder,+ CreateTemplateRequestBuilder,Firmware,+ OsGymSandboxTemplateSpecBuilder,+ OsGymSandboxWarmPoolSpecBuilder,PreservedJson,+ SandboxServiceBuilder,+ SandboxTemplateRefBuilder,ServiceProtocol,+ TemplateBuilder,+ VmTemplateBuilder,+ WarmPoolAutoscalingBuilder,+ type CreatePoolRequest,+ type CreateTemplateRequest,type CyclopsClient,type Namespace,+ type OsGymSandboxWarmPoolSpecBuilderLike,type Pool,+ type SandboxService,type Template,+ type VmTemplate,+ type VmTemplateBuilderLike,+ type WarmPoolAutoscaling,+ type WarmPoolAutoscalingBuilderLike,} from "./generated"import { withClient } from "./client"import { deriveWarmPoolPhase } from "./status"@@ -112,12 +129,130 @@ export async function getPool(namespace: string, name: string): Promise<PoolData})}-function sdkServices(services: PoolService[] | undefined) {- return services?.map(service => ({- name: service.name,- targetPort: service.targetPort,- protocol: sdkProtocol(service.protocol),- }))+export function buildSdkServices(+ services: PoolService[] | undefined,+): SandboxService[] | undefined {+ return services?.map(service =>+ new SandboxServiceBuilder()+ .name(service.name)+ .targetPort(service.targetPort)+ .protocol(sdkProtocol(service.protocol))+ .build(),+ )+}++function buildAutoscaling(+ values: PoolTemplateConfig["autoscaling"],+): WarmPoolAutoscaling | undefined {+ if (!values) return undefined++ let builder: WarmPoolAutoscalingBuilderLike =+ new WarmPoolAutoscalingBuilder()+ if (values.minPoolSize !== undefined) {+ builder = builder.minPoolSize(values.minPoolSize)+ }+ if (values.initialPoolSize !== undefined) {+ builder = builder.initialPoolSize(values.initialPoolSize)+ }+ if (values.maxPoolSize !== undefined) {+ builder = builder.maxPoolSize(values.maxPoolSize)+ }+ return builder.build()+}++export function buildPoolRequest(+ namespace: string,+ templateName: string,+ values: PoolTemplateConfig,+): CreatePoolRequest {+ const reference = new SandboxTemplateRefBuilder()+ .name(templateName)+ .build()+ let specBuilder: OsGymSandboxWarmPoolSpecBuilderLike =+ new OsGymSandboxWarmPoolSpecBuilder()+ .replicas(values.replicas)+ .sandboxTemplateRef(reference)+ const autoscaling = buildAutoscaling(values.autoscaling)+ if (autoscaling) specBuilder = specBuilder.autoscaling(autoscaling)++ return new CreatePoolRequestBuilder()+ .namespace(namespace)+ .spec(specBuilder.build())+ .build()+}++export function buildTemplateRequest(+ namespace: string,+ templateName: string,+ values: PoolTemplateConfig,+): CreateTemplateRequest {+ let vmBuilder: VmTemplateBuilderLike = new VmTemplateBuilder()+ .containerDiskImage(values.ociImage)+ .imagePullSecret("ecr-credentials")+ .cpuCores(values.cpu)+ .memory(values.ram)+ if (values.firmware === "efi") vmBuilder = vmBuilder.firmware(Firmware.Efi)+ if (values.probes) {+ vmBuilder = vmBuilder.probes(+ PreservedJson.fromJson(JSON.stringify(values.probes)),+ )+ }+ const services = buildSdkServices(values.services)+ if (services) vmBuilder = vmBuilder.services(services)++ const spec = new OsGymSandboxTemplateSpecBuilder()+ .vmTemplate(vmBuilder.build())+ .build()+ return new CreateTemplateRequestBuilder()+ .namespace(namespace)+ .name(templateName)+ .spec(spec)+ .build()+}++function seedVmTemplateBuilder(vm: VmTemplate): VmTemplateBuilderLike {+ let builder: VmTemplateBuilderLike = new VmTemplateBuilder()+ .containerDiskImage(vm.containerDiskImage)+ if (vm.command !== undefined) builder = builder.command(vm.command)+ if (vm.runtime !== undefined) builder = builder.runtime(vm.runtime)+ if (vm.runtimeClassName !== undefined) {+ builder = builder.runtimeClassName(vm.runtimeClassName)+ }+ if (vm.nodeSelector !== undefined) {+ builder = builder.nodeSelector(vm.nodeSelector)+ }+ if (vm.tolerations !== undefined) builder = builder.tolerations(vm.tolerations)+ if (vm.imagePullPolicy !== undefined) {+ builder = builder.imagePullPolicy(vm.imagePullPolicy)+ }+ if (vm.imagePullSecret !== undefined) {+ builder = builder.imagePullSecret(vm.imagePullSecret)+ }+ if (vm.cpuCores !== undefined) builder = builder.cpuCores(vm.cpuCores)+ if (vm.memory !== undefined) builder = builder.memory(vm.memory)+ if (vm.firmware !== undefined) builder = builder.firmware(vm.firmware)+ 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)+ return builder+}++export function rebuildTemplateWithServices(+ template: Template,+ services: PoolService[],+): Template {+ const vmTemplate = seedVmTemplateBuilder(template.spec.vmTemplate)+ .services(buildSdkServices(services) ?? [])+ .build()+ const spec = new OsGymSandboxTemplateSpecBuilder()+ .vmTemplate(vmTemplate)+ .build()+ return new TemplateBuilder()+ .apiVersion(template.apiVersion)+ .kind(template.kind)+ .metadata(template.metadata)+ .spec(spec)+ .build()}export async function createPool(@@ -126,32 +261,13 @@ export async function createPool(): Promise<PoolData> {return withClient(async client => {const templateName = `${name}-template`- const pool = await client.createPool({- namespace: name,- spec: {- replicas: values.replicas,- sandboxTemplateRef: { name: templateName },- autoscaling: values.autoscaling,- },- })+ const pool = await client.createPool(+ buildPoolRequest(name, templateName, values),+ )try {- const template = await client.createTemplate({- namespace: name,- name: templateName,- spec: {- vmTemplate: {- containerDiskImage: values.ociImage,- imagePullSecret: "ecr-credentials",- cpuCores: values.cpu,- memory: values.ram,- firmware: values.firmware === "efi" ? Firmware.Efi : undefined,- probes: values.probes- ? PreservedJson.fromJson(JSON.stringify(values.probes))- : undefined,- services: sdkServices(values.services),- },- },- })+ const template = await client.createTemplate(+ buildTemplateRequest(name, templateName, values),+ )return poolData(pool, template)} catch (error) {await client.deletePool(pool).catch(() => undefined)@@ -167,8 +283,7 @@ export async function updatePoolServices(): Promise<void> {await withClient(async client => {const { template } = await getPoolWith(client, namespace, name)- template.spec.vmTemplate.services = sdkServices(services)- await client.updateTemplate(template)+ await client.updateTemplate(rebuildTemplateWithServices(template, services))})}diff --git a/libs/fleet/src/sdk/userKeys.ts b/libs/fleet/src/sdk/userKeys.tsindex a3ed421512..5c8f85580e 100644--- a/libs/fleet/src/sdk/userKeys.ts+++ b/libs/fleet/src/sdk/userKeys.ts@@ -1,8 +1,23 @@-import type { NewUserApiKey, UserApiKey } from "./generated"+import {+ CreateUserApiKeyRequestBuilder,+ type CreateUserApiKeyRequest,+ type NewUserApiKey,+ type UserApiKey,+} from "./generated"import { withClient } from "./client"export type { NewUserApiKey, UserApiKey } from "./generated"+export function buildUserApiKeyRequest(+ name: string,+ scope?: string[],+): CreateUserApiKeyRequest {+ return new CreateUserApiKeyRequestBuilder()+ .name(name)+ .scope(scope ?? [])+ .build()+}+export async function listUserKeys(): Promise<UserApiKey[]> {return withClient(client => client.listUserApiKeys())}@@ -11,9 +26,7 @@ export async function createUserKey(name: string,scope?: string[],): Promise<NewUserApiKey> {- return withClient(client =>- client.createUserApiKey({ name, scope: scope ?? [] }),- )+ return withClient(client => client.createUserApiKey(buildUserApiKeyRequest(name, scope)))}export async function deleteUserKey(id: string): Promise<void> {