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(sdk): add Go and TypeScript UniFFI bindings (#5942)
r33drichardsc2ba0b5e94d0
diff --git a/libs/fleet/Cargo.lock b/libs/fleet/Cargo.lockindex 28a6b66719..454c726f46 100644--- a/libs/fleet/Cargo.lock+++ b/libs/fleet/Cargo.lock@@ -16,11 +16,11 @@ checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"[[package]]name = "askama"-version = "0.16.0"+version = "0.14.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f1bf825125edd887a019d0a3a837dcc5499a68b0d034cc3eb594070c3e18addc"+checksum = "f75363874b771be265f4ffe307ca705ef6f3baa19011c149da8674a87f1b75c4"dependencies = [- "askama_macros",+ "askama_derive","itoa","percent-encoding","serde",@@ -29,13 +29,12 @@ dependencies = [[[package]]name = "askama_derive"-version = "0.16.0"+version = "0.14.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "e1c7065972a130eafa84215f21352ae15b4a7393da48c1f5e103904490736738"+checksum = "129397200fe83088e8a68407a8e2b1f826cf0086b21ccdb866a722c8bcd3a94f"dependencies = ["askama_parser","basic-toml",- "glob","memchr","proc-macro2","quote",@@ -45,26 +44,16 @@ dependencies = ["syn 2.0.119",]-[[package]]-name = "askama_macros"-version = "0.16.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "0e23b1d2c4bd39a41971f6124cef4cc6fd0540913ecb90919b69ab3bbe44ae1a"-dependencies = [- "askama_derive",-]-[[package]]name = "askama_parser"-version = "0.16.0"+version = "0.14.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "7db09fde9143e7ac4513358fb32ee32847125b63b18ea715afd487956da715da"+checksum = "d6ab5630b3d5eaf232620167977f95eb51f3432fc76852328774afbd242d4358"dependencies = [- "rustc-hash",+ "memchr","serde","serde_derive",- "unicode-ident",- "winnow",+ "winnow 0.7.15",][[package]]@@ -128,19 +117,18 @@ dependencies = [[[package]]name = "cargo-platform"-version = "0.3.3"+version = "0.1.9"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "dd0061da739915fae12ea00e16397555ed4371a6bb285431aab930f61b0aa4ba"+checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"dependencies = ["serde",- "serde_core",][[package]]name = "cargo_metadata"-version = "0.23.1"+version = "0.19.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9"+checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba"dependencies = ["camino","cargo-platform",@@ -372,9 +360,9 @@ dependencies = [[[package]]name = "fs-err"-version = "3.3.1"+version = "2.11.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b91aa448ca50d7e79433bdf3ee8d99215430d2ec02ade5aefab2a073a1822e8a"+checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41"dependencies = ["autocfg",]@@ -1128,9 +1116,9 @@ dependencies = [[[package]]name = "toml"-version = "1.1.3+spec-1.1.0"+version = "0.9.12+spec-1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "53c96ecdfa941c8fc4fcaed14f99ada8ebed502eef533015095a07e3301d4c3c"+checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"dependencies = ["indexmap","serde_core",@@ -1138,14 +1126,14 @@ dependencies = ["toml_datetime","toml_parser","toml_writer",- "winnow",+ "winnow 0.7.15",][[package]]name = "toml_datetime"-version = "1.1.1+spec-1.1.0"+version = "0.7.5+spec-1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"+checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"dependencies = ["serde_core",]@@ -1156,7 +1144,7 @@ version = "1.1.2+spec-1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526"dependencies = [- "winnow",+ "winnow 1.0.4",][[package]]@@ -1173,9 +1161,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"[[package]]name = "uniffi"-version = "0.32.0"+version = "0.31.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "a782a48d72cfd7a2d65cfc7c691dbf5375c43104b3c195f7eccc716dcc3540c8"+checksum = "b8c6dec3fc6645f71a16a3fa9ff57991028153bd194ca97f4b55e610c73ce66a"dependencies = ["anyhow","camino",@@ -1189,9 +1177,9 @@ dependencies = [[[package]]name = "uniffi_bindgen"-version = "0.32.0"+version = "0.31.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "533b0312c73e3b54eb78a4b257ceae390962dd4767995778309a74644643f9ac"+checksum = "4ed0150801958d4825da56a41c71f000a457ac3a4613fa9647df78ac4b6b6881"dependencies = ["anyhow","askama",@@ -1215,9 +1203,9 @@ dependencies = [[[package]]name = "uniffi_core"-version = "0.32.0"+version = "0.31.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8e32e261c5b0dfaba6488f536e71957dddd6b1a498ac7eb791bee56b60a086be"+checksum = "b0ef62e69762fbb9386dcb6c87cd3dd05d525fa8a3a579a290892e60ddbda47e"dependencies = ["anyhow","bytes",@@ -1227,9 +1215,9 @@ dependencies = [[[package]]name = "uniffi_internal_macros"-version = "0.32.0"+version = "0.31.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "84ae78069a5e6772ef694fd5bdb628532c88d2c2f0e7142bf6a384636eadb1af"+checksum = "98f51ebca0d9a4b2aa6c644d5ede45c56f73906b96403c08a1985e75ccb64a01"dependencies = ["anyhow","indexmap",@@ -1240,9 +1228,9 @@ dependencies = [[[package]]name = "uniffi_macros"-version = "0.32.0"+version = "0.31.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "330be6770532e86320df31f54c70bb0be67588594e8e77fa56e9083a3fed5d0d"+checksum = "db9d12529f1223d014fd501e5f29ca0884d15d6ed5ddddd9f506e55350327dc3"dependencies = ["camino","fs-err",@@ -1257,9 +1245,9 @@ dependencies = [[[package]]name = "uniffi_meta"-version = "0.32.0"+version = "0.31.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "78de021f5547e56ab16c665a49d67d4fd3d31e77422f7739a2e9359d328cd9e7"+checksum = "9df6d413db2827c68588f8149d30d49b71d540d46539e435b23a7f7dbd4d4f86"dependencies = ["anyhow","siphasher",@@ -1269,9 +1257,9 @@ dependencies = [[[package]]name = "uniffi_pipeline"-version = "0.32.0"+version = "0.31.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "3f8201bb1907ed8a42d80e11cbc25c8a033e7a31c3cff1d911f56eedb81d4948"+checksum = "a806dddc8208f22efd7e95a5cdf88ed43d0f3271e8f63b47e757a8bbdb43b63a"dependencies = ["anyhow","heck",@@ -1282,9 +1270,9 @@ dependencies = [[[package]]name = "uniffi_udl"-version = "0.32.0"+version = "0.31.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "a6e57996bc58009cc29bf04845d627ae313c2547b87171c1c349d6c51a1656c0"+checksum = "0d1a7339539bf6f6fa3e9b534dece13f778bda2d54b1a6d4e40b4d6090ac26e7"dependencies = ["anyhow","textwrap",@@ -1342,13 +1330,19 @@ dependencies = [[[package]]name = "winnow"-version = "1.0.4"+version = "0.7.15"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"+checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"dependencies = ["memchr",]+[[package]]+name = "winnow"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"+[[package]]name = "writeable"version = "0.6.3"diff --git a/libs/fleet/Cargo.toml b/libs/fleet/Cargo.tomlindex db14fb737c..58067aa6cc 100644--- a/libs/fleet/Cargo.toml+++ b/libs/fleet/Cargo.toml@@ -19,5 +19,5 @@ serde_json = "1.0"serde_yaml = "0.9"thiserror = "2.0"tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "sync"] }-uniffi = "0.32.0"+uniffi = "=0.31.0"url = "2.5"diff --git a/libs/fleet/scripts/cleanup-live-sdk-example.sh b/libs/fleet/scripts/cleanup-live-sdk-example.shindex f650f72ed2..5330a2bf84 100755--- a/libs/fleet/scripts/cleanup-live-sdk-example.sh+++ b/libs/fleet/scripts/cleanup-live-sdk-example.sh@@ -33,7 +33,7 @@ delete_collection() {[[ -n "$name" ]] && delete_url "$collection/$name"done < <(jq -r '.items[]?.metadata.name' "$body_file");;- 404) ;;+ 403|404) ;;*) echo "Failed to list $collection: HTTP $status" >&2; cleanup_failed=1 ;;esacrm -f "$body_file"diff --git a/libs/fleet/scripts/generate-sdk-bindings.sh b/libs/fleet/scripts/generate-sdk-bindings.shindex 8a2293da4d..68a5d88107 100755--- a/libs/fleet/scripts/generate-sdk-bindings.sh+++ b/libs/fleet/scripts/generate-sdk-bindings.sh@@ -154,7 +154,11 @@ write_ruby_facade() {ruby_defined_method_names "$schema_file" "$method_prefix" > "$schema_definitions"comm -23 "$references" "$definitions" > "$missing"unresolved="$temporary_output/ruby-$method_prefix-unresolved"- comm -23 "$missing" "$schema_definitions" > "$unresolved"+ case "$method_prefix" in+ check_lower) sed "s/OsGym/OSGym/g" "$missing" > "$temporary_output/ruby-$method_prefix-normalized-external" ;;+ *) cp "$missing" "$temporary_output/ruby-$method_prefix-normalized-external" ;;+ esac+ comm -23 "$temporary_output/ruby-$method_prefix-normalized-external" "$schema_definitions" > "$unresolved"if [ -s "$unresolved" ]; thenecho "error: generated Ruby SDK references methods missing from schema: $method_prefix" >&2cat "$unresolved" >&2@@ -181,7 +185,7 @@ RUBY_FACADE_HEADERSCHEMA_CHECK_LOWER_METHODS.each do |method_name|RustBuffer.define_singleton_method(method_name) do |value|- schema_rust_buffer.public_send(method_name, value)+ schema_rust_buffer.public_send(method_name.to_s.gsub("OsGym", "OSGym"), value)endend@@ -582,7 +586,7 @@ generated_root="$temporary_output/generated"mkdir -p "$raw_output" "$generated_root/python/cyclops_sdk" "$generated_root/kotlin" \"$generated_root/swift" "$generated_root/ruby/cyclops_sdk""$cargo_bin" run --locked --manifest-path "$workspace" -p cyclops-sdk-bindgen --target "$host_triple" -- \- generate --library "$library" --config "$bindings_dir/uniffi.toml" \+ generate --library "$library" \--language python --language kotlin --language swift --language ruby \--out-dir "$raw_output" --no-format@@ -604,6 +608,36 @@ cat "$generated_root/swift/CyclopsSdkFFI.modulemap" "$generated_root/swift/Cyclomv "$raw_output/cyclops_sdk.rb" "$generated_root/ruby/cyclops_sdk/sdk.rb"mv "$raw_output/cyclops_sdk_schema.rb" "$generated_root/ruby/cyclops_sdk/schema.rb"+# UniFFI 0.31.0 emits `OsGym` in cross-crate Ruby helper references while the+# schema component exports `OSGym`; normalize the generated helper calls.+sed -i.bak "s/check_lower_TypeOsGym/check_lower_TypeOSGym/g" "$generated_root/ruby/cyclops_sdk/sdk.rb"+rm "$generated_root/ruby/cyclops_sdk/sdk.rb.bak"+# UniFFI 0.31.0 lowers a foreign callback interface as an object clone. Ruby+# callback implementations have no Rust handle, so avoid cloning nil handles.+python3 - "$generated_root/ruby/cyclops_sdk/sdk.rb" <<'PYTHON_RUBY_PATCH'+import pathlib+import sys+path = pathlib.Path(sys.argv[1])+text = path.read_text()+old = """ def uniffi_clone_handle()+ return CyclopsSdk.rust_call(+ :uniffi_cyclops_sdk_fn_clone_httpclient,+ @handle+ )+ end+"""+new = """ def uniffi_clone_handle()+ return 0 if @handle.nil?+ return CyclopsSdk.rust_call(+ :uniffi_cyclops_sdk_fn_clone_httpclient,+ @handle+ )+ end+"""+if old not in text:+ raise SystemExit("expected HttpClient clone method not found")+path.write_text(text.replace(old, new, 1))+PYTHON_RUBY_PATCHwrite_ruby_facade \"$generated_root/ruby/cyclops_sdk/sdk.rb" \"$generated_root/ruby/cyclops_sdk/schema.rb" \diff --git a/libs/fleet/scripts/test-cleanup-live-sdk-example.sh b/libs/fleet/scripts/test-cleanup-live-sdk-example.shindex 987496a71e..2afedabab4 100755--- a/libs/fleet/scripts/test-cleanup-live-sdk-example.sh+++ b/libs/fleet/scripts/test-cleanup-live-sdk-example.sh@@ -33,11 +33,16 @@ if [[ "$method" == DELETE ]]; thenexit 0ficase "$url" in- */osgymsandboxclaims)- printf '{"items":[{"metadata":{"name":"claim-a"}}]}' > "$output_file"- ;;- */osgymworkspacepools)- printf '{"items":[{"metadata":{"name":"pool-a"}}]}' > "$output_file"+ */osgymsandboxclaims|*/osgymworkspacepools)+ if [[ "${CLEANUP_LIST_STATUS:-200}" != 200 ]]; then+ printf '%s' "$CLEANUP_LIST_STATUS"+ exit 0+ fi+ if [[ "$url" == */osgymsandboxclaims ]]; then+ printf '{"items":[{"metadata":{"name":"claim-a"}}]}' > "$output_file"+ else+ printf '{"items":[{"metadata":{"name":"pool-a"}}]}' > "$output_file"+ fi;;*)printf '{"items":[]}' > "$output_file"@@ -68,3 +73,15 @@ EXPECTEDdiff -u "$temporary/expected.log" "$CLEANUP_TEST_LOG"printf 'live SDK cleanup regression checks passed.\n'++: > "$CLEANUP_TEST_LOG"+export CLEANUP_LIST_STATUS=403+"$repo_root/cyclops-cs/scripts/cleanup-live-sdk-example.sh"+unset CLEANUP_LIST_STATUS+cat > "$temporary/forbidden-expected.log" <<'FORBIDDEN_EXPECTED'+POST https://auth.example/protocol/openid-connect/token+GET https://run.example/api/k8s/apis/osgym.cua.ai/v1alpha1/namespaces/sdk-example-python-1-1/osgymsandboxclaims+GET https://run.example/api/k8s/apis/cua.ai/v1/namespaces/sdk-example-python-1-1/osgymworkspacepools+DELETE https://run.example/api/namespaces/sdk-example-python-1-1+FORBIDDEN_EXPECTED+diff -u "$temporary/forbidden-expected.log" "$CLEANUP_TEST_LOG"diff --git a/libs/fleet/sdk-bindings/go-uniffi/README.md b/libs/fleet/sdk-bindings/go-uniffi/README.mdnew file mode 100644index 0000000000..6d51670209--- /dev/null+++ b/libs/fleet/sdk-bindings/go-uniffi/README.md@@ -0,0 +1,6 @@+# Cyclops Go UniFFI bindings++Generated with `uniffi-bindgen-go v0.7.1+v0.31.0`. Build consumers with the+Cyclops Rust cdylib available to cgo, for example:++`CGO_LDFLAGS='-L/path/to -lcyclops_sdk' LD_LIBRARY_PATH=/path/to go test ./...`diff --git a/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk/compile_test.go b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk/compile_test.gonew file mode 100644index 0000000000..d9e8b85ed7--- /dev/null+++ b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk/compile_test.go@@ -0,0 +1,7 @@+package cyclops_sdk++import "testing"++func TestGeneratedSdkCompiles(t *testing.T) {+ var _ func(CyclopsConfiguration, HttpClient) (*CyclopsClient, error) = CyclopsClientConnect+}diff --git a/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk/cyclops_sdk.go b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk/cyclops_sdk.gonew file mode 100644index 0000000000..7b2902bcae--- /dev/null+++ b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk/cyclops_sdk.go@@ -0,0 +1,3131 @@+package cyclops_sdk++// #include <cyclops_sdk.h>+import "C"++import (+ "bytes"+ "encoding/binary"+ "errors"+ "fmt"+ "github.com/trycua/cloud/cyclops-cs/sdk-bindings/go-uniffi/cyclops_sdk_schema"+ "io"+ "math"+ "reflect"+ "runtime"+ "runtime/cgo"+ "sync"+ "sync/atomic"+ "unsafe"+)++// This is needed, because as of go 1.24+// type RustBuffer C.RustBuffer cannot have methods,+// RustBuffer is treated as non-local type+type GoRustBuffer struct {+ inner C.RustBuffer+}++type RustBufferI interface {+ AsReader() *bytes.Reader+ Free()+ ToGoBytes() []byte+ Data() unsafe.Pointer+ Len() uint64+ Capacity() uint64+}++// C.RustBuffer fields exposed as an interface so they can be accessed in different Go packages.+// See https://github.com/golang/go/issues/13467+type ExternalCRustBuffer interface {+ Data() unsafe.Pointer+ Len() uint64+ Capacity() uint64+}++func RustBufferFromC(b C.RustBuffer) ExternalCRustBuffer {+ return GoRustBuffer{+ inner: b,+ }+}++func CFromRustBuffer(b ExternalCRustBuffer) C.RustBuffer {+ return C.RustBuffer{+ capacity: C.uint64_t(b.Capacity()),+ len: C.uint64_t(b.Len()),+ data: (*C.uchar)(b.Data()),+ }+}++func RustBufferFromExternal(b ExternalCRustBuffer) GoRustBuffer {+ return GoRustBuffer{+ inner: C.RustBuffer{+ capacity: C.uint64_t(b.Capacity()),+ len: C.uint64_t(b.Len()),+ data: (*C.uchar)(b.Data()),+ },+ }+}++func (cb GoRustBuffer) Capacity() uint64 {+ return uint64(cb.inner.capacity)+}++func (cb GoRustBuffer) Len() uint64 {+ return uint64(cb.inner.len)+}++func (cb GoRustBuffer) Data() unsafe.Pointer {+ return unsafe.Pointer(cb.inner.data)+}++func (cb GoRustBuffer) AsReader() *bytes.Reader {+ b := unsafe.Slice((*byte)(cb.inner.data), C.uint64_t(cb.inner.len))+ return bytes.NewReader(b)+}++func (cb GoRustBuffer) Free() {+ rustCall(func(status *C.RustCallStatus) bool {+ C.ffi_cyclops_sdk_rustbuffer_free(cb.inner, status)+ return false+ })+}++func (cb GoRustBuffer) ToGoBytes() []byte {+ return C.GoBytes(unsafe.Pointer(cb.inner.data), C.int(cb.inner.len))+}++func stringToRustBuffer(str string) C.RustBuffer {+ return bytesToRustBuffer([]byte(str))+}++func bytesToRustBuffer(b []byte) C.RustBuffer {+ if len(b) == 0 {+ return C.RustBuffer{}+ }+ // We can pass the pointer along here, as it is pinned+ // for the duration of this call+ foreign := C.ForeignBytes{+ len: C.int(len(b)),+ data: (*C.uchar)(unsafe.Pointer(&b[0])),+ }++ return rustCall(func(status *C.RustCallStatus) C.RustBuffer {+ return C.ffi_cyclops_sdk_rustbuffer_from_bytes(foreign, status)+ })+}++type BufLifter[GoType any] interface {+ Lift(value RustBufferI) GoType+}++type BufLowerer[GoType any] interface {+ Lower(value GoType) C.RustBuffer+}++type BufReader[GoType any] interface {+ Read(reader io.Reader) GoType+}++type BufWriter[GoType any] interface {+ Write(writer io.Writer, value GoType)+}++func LowerIntoRustBuffer[GoType any](bufWriter BufWriter[GoType], value GoType) C.RustBuffer {+ // This might be not the most efficient way but it does not require knowing allocation size+ // beforehand+ var buffer bytes.Buffer+ bufWriter.Write(&buffer, value)++ bytes, err := io.ReadAll(&buffer)+ if err != nil {+ panic(fmt.Errorf("reading written data: %w", err))+ }+ return bytesToRustBuffer(bytes)+}++func LiftFromRustBuffer[GoType any](bufReader BufReader[GoType], rbuf RustBufferI) GoType {+ defer rbuf.Free()+ reader := rbuf.AsReader()+ item := bufReader.Read(reader)+ if reader.Len() > 0 {+ // TODO: Remove this+ leftover, _ := io.ReadAll(reader)+ panic(fmt.Errorf("Junk remaining in buffer after lifting: %s", string(leftover)))+ }+ return item+}++func rustCallWithError[E any, U any](converter BufReader[E], callback func(*C.RustCallStatus) U) (U, E) {+ var status C.RustCallStatus+ returnValue := callback(&status)+ err := checkCallStatus(converter, status)+ return returnValue, err+}++func checkCallStatus[E any](converter BufReader[E], status C.RustCallStatus) E {+ switch status.code {+ case 0:+ var zero E+ return zero+ case 1:+ return LiftFromRustBuffer(converter, GoRustBuffer{inner: status.errorBuf})+ case 2:+ // when the rust code sees a panic, it tries to construct a rustBuffer+ // with the message. but if that code panics, then it just sends back+ // an empty buffer.+ if status.errorBuf.len > 0 {+ panic(fmt.Errorf("%s", FfiConverterStringINSTANCE.Lift(GoRustBuffer{inner: status.errorBuf})))+ } else {+ panic(fmt.Errorf("Rust panicked while handling Rust panic"))+ }+ default:+ panic(fmt.Errorf("unknown status code: %d", status.code))+ }+}++func checkCallStatusUnknown(status C.RustCallStatus) error {+ switch status.code {+ case 0:+ return nil+ case 1:+ panic(fmt.Errorf("function not returning an error returned an error"))+ case 2:+ // when the rust code sees a panic, it tries to construct a C.RustBuffer+ // with the message. but if that code panics, then it just sends back+ // an empty buffer.+ if status.errorBuf.len > 0 {+ panic(fmt.Errorf("%s", FfiConverterStringINSTANCE.Lift(GoRustBuffer{+ inner: status.errorBuf,+ })))+ } else {+ panic(fmt.Errorf("Rust panicked while handling Rust panic"))+ }+ default:+ return fmt.Errorf("unknown status code: %d", status.code)+ }+}++func rustCall[U any](callback func(*C.RustCallStatus) U) U {+ returnValue, err := rustCallWithError[error](nil, callback)+ if err != nil {+ panic(err)+ }+ return returnValue+}++type NativeError interface {+ AsError() error+}++func writeInt8(writer io.Writer, value int8) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeUint8(writer io.Writer, value uint8) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeInt16(writer io.Writer, value int16) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeUint16(writer io.Writer, value uint16) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeInt32(writer io.Writer, value int32) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeUint32(writer io.Writer, value uint32) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeInt64(writer io.Writer, value int64) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeUint64(writer io.Writer, value uint64) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeFloat32(writer io.Writer, value float32) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeFloat64(writer io.Writer, value float64) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func readInt8(reader io.Reader) int8 {+ var result int8+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readUint8(reader io.Reader) uint8 {+ var result uint8+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readInt16(reader io.Reader) int16 {+ var result int16+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readUint16(reader io.Reader) uint16 {+ var result uint16+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readInt32(reader io.Reader) int32 {+ var result int32+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readUint32(reader io.Reader) uint32 {+ var result uint32+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readInt64(reader io.Reader) int64 {+ var result int64+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readUint64(reader io.Reader) uint64 {+ var result uint64+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readFloat32(reader io.Reader) float32 {+ var result float32+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readFloat64(reader io.Reader) float64 {+ var result float64+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func init() {++ FfiConverterHttpClientINSTANCE.register()+ uniffiCheckChecksums()+}++func uniffiCheckChecksums() {+ // Get the bindings contract version from our ComponentInterface+ bindingsContractVersion := 30+ // Get the scaffolding contract version by calling the into the dylib+ scaffoldingContractVersion := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint32_t {+ return C.ffi_cyclops_sdk_uniffi_contract_version()+ })+ if bindingsContractVersion != int(scaffoldingContractVersion) {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: UniFFI contract version mismatch")+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim()+ })+ if checksum != 23330 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim()+ })+ if checksum != 20460 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim()+ })+ if checksum != 17760 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims()+ })+ if checksum != 7802 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim()+ })+ if checksum != 18984 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool()+ })+ if checksum != 48557 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool()+ })+ if checksum != 31235 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool()+ })+ if checksum != 43327 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools()+ })+ if checksum != 27984 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool()+ })+ if checksum != 17695 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request()+ })+ if checksum != 46699 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_method_httpclient_execute()+ })+ if checksum != 38803 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_method_httpclient_execute: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect()+ })+ if checksum != 54404 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new()+ })+ if checksum != 25746 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk: uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new: UniFFI API checksum mismatch")+ }+ }+}++type FfiConverterUint16 struct{}++var FfiConverterUint16INSTANCE = FfiConverterUint16{}++func (FfiConverterUint16) Lower(value uint16) C.uint16_t {+ return C.uint16_t(value)+}++func (FfiConverterUint16) Write(writer io.Writer, value uint16) {+ writeUint16(writer, value)+}++func (FfiConverterUint16) Lift(value C.uint16_t) uint16 {+ return uint16(value)+}++func (FfiConverterUint16) Read(reader io.Reader) uint16 {+ return readUint16(reader)+}++type FfiDestroyerUint16 struct{}++func (FfiDestroyerUint16) Destroy(_ uint16) {}++type FfiConverterUint32 struct{}++var FfiConverterUint32INSTANCE = FfiConverterUint32{}++func (FfiConverterUint32) Lower(value uint32) C.uint32_t {+ return C.uint32_t(value)+}++func (FfiConverterUint32) Write(writer io.Writer, value uint32) {+ writeUint32(writer, value)+}++func (FfiConverterUint32) Lift(value C.uint32_t) uint32 {+ return uint32(value)+}++func (FfiConverterUint32) Read(reader io.Reader) uint32 {+ return readUint32(reader)+}++type FfiDestroyerUint32 struct{}++func (FfiDestroyerUint32) Destroy(_ uint32) {}++type FfiConverterUint64 struct{}++var FfiConverterUint64INSTANCE = FfiConverterUint64{}++func (FfiConverterUint64) Lower(value uint64) C.uint64_t {+ return C.uint64_t(value)+}++func (FfiConverterUint64) Write(writer io.Writer, value uint64) {+ writeUint64(writer, value)+}++func (FfiConverterUint64) Lift(value C.uint64_t) uint64 {+ return uint64(value)+}++func (FfiConverterUint64) Read(reader io.Reader) uint64 {+ return readUint64(reader)+}++type FfiDestroyerUint64 struct{}++func (FfiDestroyerUint64) Destroy(_ uint64) {}++type FfiConverterString struct{}++var FfiConverterStringINSTANCE = FfiConverterString{}++func (FfiConverterString) Lift(rb RustBufferI) string {+ defer rb.Free()+ reader := rb.AsReader()+ b, err := io.ReadAll(reader)+ if err != nil {+ panic(fmt.Errorf("reading reader: %w", err))+ }+ return string(b)+}++func (FfiConverterString) Read(reader io.Reader) string {+ length := readInt32(reader)+ buffer := make([]byte, length)+ read_length, err := reader.Read(buffer)+ if err != nil && err != io.EOF {+ panic(err)+ }+ if read_length != int(length) {+ panic(fmt.Errorf("bad read length when reading string, expected %d, read %d", length, read_length))+ }+ return string(buffer)+}++func (FfiConverterString) Lower(value string) C.RustBuffer {+ return stringToRustBuffer(value)+}++func (c FfiConverterString) LowerExternal(value string) ExternalCRustBuffer {+ return RustBufferFromC(stringToRustBuffer(value))+}++func (FfiConverterString) Write(writer io.Writer, value string) {+ if len(value) > math.MaxInt32 {+ panic("String is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ write_length, err := io.WriteString(writer, value)+ if err != nil {+ panic(err)+ }+ if write_length != len(value) {+ panic(fmt.Errorf("bad write length when writing string, expected %d, written %d", len(value), write_length))+ }+}++type FfiDestroyerString struct{}++func (FfiDestroyerString) Destroy(_ string) {}++type FfiConverterBytes struct{}++var FfiConverterBytesINSTANCE = FfiConverterBytes{}++func (c FfiConverterBytes) Lower(value []byte) C.RustBuffer {+ return LowerIntoRustBuffer[[]byte](c, value)+}++func (c FfiConverterBytes) LowerExternal(value []byte) ExternalCRustBuffer {+ return RustBufferFromC(c.Lower(value))+}++func (c FfiConverterBytes) Write(writer io.Writer, value []byte) {+ if len(value) > math.MaxInt32 {+ panic("[]byte is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ write_length, err := writer.Write(value)+ if err != nil {+ panic(err)+ }+ if write_length != len(value) {+ panic(fmt.Errorf("bad write length when writing []byte, expected %d, written %d", len(value), write_length))+ }+}++func (c FfiConverterBytes) Lift(rb RustBufferI) []byte {+ return LiftFromRustBuffer[[]byte](c, rb)+}++func (c FfiConverterBytes) Read(reader io.Reader) []byte {+ length := readInt32(reader)+ buffer := make([]byte, length)+ read_length, err := reader.Read(buffer)+ if err != nil && err != io.EOF {+ panic(err)+ }+ if read_length != int(length) {+ panic(fmt.Errorf("bad read length when reading []byte, expected %d, read %d", length, read_length))+ }+ return buffer+}++type FfiDestroyerBytes struct{}++func (FfiDestroyerBytes) Destroy(_ []byte) {}++// Below is an implementation of synchronization requirements outlined in the link.+// https://github.com/mozilla/uniffi-rs/blob/0dc031132d9493ca812c3af6e7dd60ad2ea95bf0/uniffi_bindgen/src/bindings/kotlin/templates/ObjectRuntime.kt#L31++type FfiObject struct {+ handle C.uint64_t+ callCounter atomic.Int64+ cloneFunction func(C.uint64_t, *C.RustCallStatus) C.uint64_t+ freeFunction func(C.uint64_t, *C.RustCallStatus)+ destroyed atomic.Bool+}++func newFfiObject(+ handle C.uint64_t,+ cloneFunction func(C.uint64_t, *C.RustCallStatus) C.uint64_t,+ freeFunction func(C.uint64_t, *C.RustCallStatus),+) FfiObject {+ return FfiObject{+ handle: handle,+ cloneFunction: cloneFunction,+ freeFunction: freeFunction,+ }+}++func (ffiObject *FfiObject) incrementPointer(debugName string) C.uint64_t {+ for {+ counter := ffiObject.callCounter.Load()+ if counter <= -1 {+ panic(fmt.Errorf("%v object has already been destroyed", debugName))+ }+ if counter == math.MaxInt64 {+ panic(fmt.Errorf("%v object call counter would overflow", debugName))+ }+ if ffiObject.callCounter.CompareAndSwap(counter, counter+1) {+ break+ }+ }++ return rustCall(func(status *C.RustCallStatus) C.uint64_t {+ return ffiObject.cloneFunction(ffiObject.handle, status)+ })+}++func (ffiObject *FfiObject) decrementPointer() {+ if ffiObject.callCounter.Add(-1) == -1 {+ ffiObject.freeRustArcPtr()+ }+}++func (ffiObject *FfiObject) destroy() {+ if ffiObject.destroyed.CompareAndSwap(false, true) {+ if ffiObject.callCounter.Add(-1) == -1 {+ ffiObject.freeRustArcPtr()+ }+ }+}++func (ffiObject *FfiObject) freeRustArcPtr() {+ if ffiObject.handle == 0 {+ return+ }+ rustCall(func(status *C.RustCallStatus) int32 {+ ffiObject.freeFunction(ffiObject.handle, status)+ return 0+ })+}++type CyclopsClientInterface interface {+ CreateClaim(request CreateClaimRequest) (Claim, error)+ DeleteClaim(claim Claim) error+ GetClaim(claim Claim) (Claim, error)+ ListClaims(namespace string) ([]Claim, error)+ WaitClaim(claim Claim) (Sandbox, error)+ CreatePool(request CreatePoolRequest) (Pool, error)+ DeletePool(pool Pool) error+ GetPool(pool Pool) (Pool, error)+ ListPools(namespace string) ([]Pool, error)+ UpdatePool(pool Pool) (Pool, error)+ ServiceRequest(sandbox Sandbox, service string, path string, request HttpRequest) (HttpResponse, error)+}+type CyclopsClient struct {+ ffiObject FfiObject+}++func CyclopsClientConnect(configuration CyclopsConfiguration, httpClient HttpClient) (*CyclopsClient, error) {+ _uniffiRV, _uniffiErr := rustCallWithError[*SdkError](FfiConverterSdkError{}, func(_uniffiStatus *C.RustCallStatus) C.uint64_t {+ return C.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(FfiConverterCyclopsConfigurationINSTANCE.Lower(configuration), FfiConverterHttpClientINSTANCE.Lower(httpClient), _uniffiStatus)+ })+ if _uniffiErr != nil {+ var _uniffiDefaultValue *CyclopsClient+ return _uniffiDefaultValue, _uniffiErr+ } else {+ return FfiConverterCyclopsClientINSTANCE.Lift(_uniffiRV), nil+ }+}++func (_self *CyclopsClient) CreateClaim(request CreateClaimRequest) (Claim, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) Claim {+ return FfiConverterClaimINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(+ _pointer, FfiConverterCreateClaimRequestINSTANCE.Lower(request)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}++func (_self *CyclopsClient) DeleteClaim(claim Claim) error {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ _, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) struct{} {+ C.ffi_cyclops_sdk_rust_future_complete_void(handle, status)+ return struct{}{}+ },+ // liftFn+ func(_ struct{}) struct{} { return struct{}{} },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(+ _pointer, FfiConverterClaimINSTANCE.Lower(claim)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_void(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_void(handle)+ },+ )++ if err == nil {+ return nil+ }++ return err+}++func (_self *CyclopsClient) GetClaim(claim Claim) (Claim, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) Claim {+ return FfiConverterClaimINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(+ _pointer, FfiConverterClaimINSTANCE.Lower(claim)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}++func (_self *CyclopsClient) ListClaims(namespace string) ([]Claim, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) []Claim {+ return FfiConverterSequenceClaimINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(+ _pointer, FfiConverterStringINSTANCE.Lower(namespace)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}++func (_self *CyclopsClient) WaitClaim(claim Claim) (Sandbox, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) Sandbox {+ return FfiConverterSandboxINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(+ _pointer, FfiConverterClaimINSTANCE.Lower(claim)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}++func (_self *CyclopsClient) CreatePool(request CreatePoolRequest) (Pool, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) Pool {+ return FfiConverterPoolINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(+ _pointer, FfiConverterCreatePoolRequestINSTANCE.Lower(request)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}++func (_self *CyclopsClient) DeletePool(pool Pool) error {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ _, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) struct{} {+ C.ffi_cyclops_sdk_rust_future_complete_void(handle, status)+ return struct{}{}+ },+ // liftFn+ func(_ struct{}) struct{} { return struct{}{} },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(+ _pointer, FfiConverterPoolINSTANCE.Lower(pool)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_void(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_void(handle)+ },+ )++ if err == nil {+ return nil+ }++ return err+}++func (_self *CyclopsClient) GetPool(pool Pool) (Pool, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) Pool {+ return FfiConverterPoolINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(+ _pointer, FfiConverterPoolINSTANCE.Lower(pool)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}++func (_self *CyclopsClient) ListPools(namespace string) ([]Pool, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) []Pool {+ return FfiConverterSequencePoolINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(+ _pointer, FfiConverterStringINSTANCE.Lower(namespace)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}++func (_self *CyclopsClient) UpdatePool(pool Pool) (Pool, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) Pool {+ return FfiConverterPoolINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(+ _pointer, FfiConverterPoolINSTANCE.Lower(pool)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}++func (_self *CyclopsClient) ServiceRequest(sandbox Sandbox, service string, path string, request HttpRequest) (HttpResponse, error) {+ _pointer := _self.ffiObject.incrementPointer("*CyclopsClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*SdkError](+ FfiConverterSdkErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) HttpResponse {+ return FfiConverterHttpResponseINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(+ _pointer, FfiConverterSandboxINSTANCE.Lower(sandbox), FfiConverterStringINSTANCE.Lower(service), FfiConverterStringINSTANCE.Lower(path), FfiConverterHttpRequestINSTANCE.Lower(request)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}+func (object *CyclopsClient) Destroy() {+ runtime.SetFinalizer(object, nil)+ object.ffiObject.destroy()+}++type FfiConverterCyclopsClient struct{}++var FfiConverterCyclopsClientINSTANCE = FfiConverterCyclopsClient{}++func (c FfiConverterCyclopsClient) Lift(handle C.uint64_t) *CyclopsClient {+ result := &CyclopsClient{+ newFfiObject(+ handle,+ func(handle C.uint64_t, status *C.RustCallStatus) C.uint64_t {+ return C.uniffi_cyclops_sdk_fn_clone_cyclopsclient(handle, status)+ },+ func(handle C.uint64_t, status *C.RustCallStatus) {+ C.uniffi_cyclops_sdk_fn_free_cyclopsclient(handle, status)+ },+ ),+ }+ runtime.SetFinalizer(result, (*CyclopsClient).Destroy)+ return result+}++func (c FfiConverterCyclopsClient) Read(reader io.Reader) *CyclopsClient {+ return c.Lift(C.uint64_t(readUint64(reader)))+}++func (c FfiConverterCyclopsClient) Lower(value *CyclopsClient) C.uint64_t {+ // TODO: this is bad - all synchronization from ObjectRuntime.go is discarded here,+ // because the handle will be decremented immediately after this function returns,+ // and someone will be left holding onto a non-locked handle.+ handle := value.ffiObject.incrementPointer("*CyclopsClient")+ defer value.ffiObject.decrementPointer()+ return handle+}++func (c FfiConverterCyclopsClient) Write(writer io.Writer, value *CyclopsClient) {+ writeUint64(writer, uint64(c.Lower(value)))+}++func LiftFromExternalCyclopsClient(handle uint64) *CyclopsClient {+ return FfiConverterCyclopsClientINSTANCE.Lift(C.uint64_t(handle))+}++func LowerToExternalCyclopsClient(value *CyclopsClient) uint64 {+ return uint64(FfiConverterCyclopsClientINSTANCE.Lower(value))+}++type FfiDestroyerCyclopsClient struct{}++func (_ FfiDestroyerCyclopsClient) Destroy(value *CyclopsClient) {+ value.Destroy()+}++type CyclopsCredentialsInterface interface {+}+type CyclopsCredentials struct {+ ffiObject FfiObject+}++func NewCyclopsCredentials(clientId string, clientSecret string) *CyclopsCredentials {+ return FfiConverterCyclopsCredentialsINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint64_t {+ return C.uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(FfiConverterStringINSTANCE.Lower(clientId), FfiConverterStringINSTANCE.Lower(clientSecret), _uniffiStatus)+ }))+}++func (object *CyclopsCredentials) Destroy() {+ runtime.SetFinalizer(object, nil)+ object.ffiObject.destroy()+}++type FfiConverterCyclopsCredentials struct{}++var FfiConverterCyclopsCredentialsINSTANCE = FfiConverterCyclopsCredentials{}++func (c FfiConverterCyclopsCredentials) Lift(handle C.uint64_t) *CyclopsCredentials {+ result := &CyclopsCredentials{+ newFfiObject(+ handle,+ func(handle C.uint64_t, status *C.RustCallStatus) C.uint64_t {+ return C.uniffi_cyclops_sdk_fn_clone_cyclopscredentials(handle, status)+ },+ func(handle C.uint64_t, status *C.RustCallStatus) {+ C.uniffi_cyclops_sdk_fn_free_cyclopscredentials(handle, status)+ },+ ),+ }+ runtime.SetFinalizer(result, (*CyclopsCredentials).Destroy)+ return result+}++func (c FfiConverterCyclopsCredentials) Read(reader io.Reader) *CyclopsCredentials {+ return c.Lift(C.uint64_t(readUint64(reader)))+}++func (c FfiConverterCyclopsCredentials) Lower(value *CyclopsCredentials) C.uint64_t {+ // TODO: this is bad - all synchronization from ObjectRuntime.go is discarded here,+ // because the handle will be decremented immediately after this function returns,+ // and someone will be left holding onto a non-locked handle.+ handle := value.ffiObject.incrementPointer("*CyclopsCredentials")+ defer value.ffiObject.decrementPointer()+ return handle+}++func (c FfiConverterCyclopsCredentials) Write(writer io.Writer, value *CyclopsCredentials) {+ writeUint64(writer, uint64(c.Lower(value)))+}++func LiftFromExternalCyclopsCredentials(handle uint64) *CyclopsCredentials {+ return FfiConverterCyclopsCredentialsINSTANCE.Lift(C.uint64_t(handle))+}++func LowerToExternalCyclopsCredentials(value *CyclopsCredentials) uint64 {+ return uint64(FfiConverterCyclopsCredentialsINSTANCE.Lower(value))+}++type FfiDestroyerCyclopsCredentials struct{}++func (_ FfiDestroyerCyclopsCredentials) Destroy(value *CyclopsCredentials) {+ value.Destroy()+}++type HttpClient interface {+ Execute(request HttpRequest) (HttpResponse, error)+}+type HttpClientImpl struct {+ ffiObject FfiObject+}++func (_self *HttpClientImpl) Execute(request HttpRequest) (HttpResponse, error) {+ _pointer := _self.ffiObject.incrementPointer("HttpClient")+ defer _self.ffiObject.decrementPointer()+ res, err := uniffiRustCallAsync[*HttpError](+ FfiConverterHttpErrorINSTANCE,+ // completeFn+ func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {+ res := C.ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle, status)+ return GoRustBuffer{+ inner: res,+ }+ },+ // liftFn+ func(ffi RustBufferI) HttpResponse {+ return FfiConverterHttpResponseINSTANCE.Lift(ffi)+ },+ C.uniffi_cyclops_sdk_fn_method_httpclient_execute(+ _pointer, FfiConverterHttpRequestINSTANCE.Lower(request)),+ // pollFn+ func(handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle, continuation, data)+ },+ // freeFn+ func(handle C.uint64_t) {+ C.ffi_cyclops_sdk_rust_future_free_rust_buffer(handle)+ },+ )++ if err == nil {+ return res, nil+ }++ return res, err+}+func (object *HttpClientImpl) Destroy() {+ runtime.SetFinalizer(object, nil)+ object.ffiObject.destroy()+}++type FfiConverterHttpClient struct {+ handleMap *concurrentHandleMap[HttpClient]+}++var FfiConverterHttpClientINSTANCE = FfiConverterHttpClient{+ handleMap: newConcurrentHandleMap[HttpClient](),+}++func (c FfiConverterHttpClient) Lift(handle C.uint64_t) HttpClient {+ if uint64(handle)&1 == 0 {+ // Rust-generated handle (even), construct a new object wrapping the handle+ result := &HttpClientImpl{+ newFfiObject(+ handle,+ func(handle C.uint64_t, status *C.RustCallStatus) C.uint64_t {+ return C.uniffi_cyclops_sdk_fn_clone_httpclient(handle, status)+ },+ func(handle C.uint64_t, status *C.RustCallStatus) {+ C.uniffi_cyclops_sdk_fn_free_httpclient(handle, status)+ },+ ),+ }+ runtime.SetFinalizer(result, (*HttpClientImpl).Destroy)+ return result+ } else {+ // Go-generated handle (odd), retrieve from the handle map+ val, ok := c.handleMap.tryGet(uint64(handle))+ if !ok {+ panic(fmt.Errorf("no callback in handle map: %d", handle))+ }+ c.handleMap.remove(uint64(handle))+ return val+ }+}++func (c FfiConverterHttpClient) Read(reader io.Reader) HttpClient {+ return c.Lift(C.uint64_t(readUint64(reader)))+}++func (c FfiConverterHttpClient) Lower(value HttpClient) C.uint64_t {+ // TODO: this is bad - all synchronization from ObjectRuntime.go is discarded here,+ // because the handle will be decremented immediately after this function returns,+ // and someone will be left holding onto a non-locked handle.+ if val, ok := value.(*HttpClientImpl); ok {+ // Rust-backed object, clone the handle+ handle := val.ffiObject.incrementPointer("HttpClient")+ defer val.ffiObject.decrementPointer()+ return handle+ } else {+ // Go-backed object, insert into handle map+ return C.uint64_t(c.handleMap.insert(value))+ }+}++func (c FfiConverterHttpClient) Write(writer io.Writer, value HttpClient) {+ writeUint64(writer, uint64(c.Lower(value)))+}++func LiftFromExternalHttpClient(handle uint64) HttpClient {+ return FfiConverterHttpClientINSTANCE.Lift(C.uint64_t(handle))+}++func LowerToExternalHttpClient(value HttpClient) uint64 {+ return uint64(FfiConverterHttpClientINSTANCE.Lower(value))+}++type FfiDestroyerHttpClient struct{}++func (_ FfiDestroyerHttpClient) Destroy(value HttpClient) {+ if val, ok := value.(*HttpClientImpl); ok {+ val.Destroy()+ }+}++type uniffiCallbackResult C.int8_t++const (+ uniffiIdxCallbackFree uniffiCallbackResult = 0+ uniffiCallbackResultSuccess uniffiCallbackResult = 0+ uniffiCallbackResultError uniffiCallbackResult = 1+ uniffiCallbackUnexpectedResultError uniffiCallbackResult = 2+ uniffiCallbackCancelled uniffiCallbackResult = 3+)++type concurrentHandleMap[T any] struct {+ handles map[uint64]T+ currentHandle uint64+ lock sync.RWMutex+}++func newConcurrentHandleMap[T any]() *concurrentHandleMap[T] {+ return &concurrentHandleMap[T]{+ handles: map[uint64]T{},+ currentHandle: 1,+ }+}++func (cm *concurrentHandleMap[T]) insert(obj T) uint64 {+ cm.lock.Lock()+ defer cm.lock.Unlock()++ handle := cm.currentHandle+ cm.currentHandle = cm.currentHandle + 2+ cm.handles[handle] = obj+ return handle+}++func (cm *concurrentHandleMap[T]) remove(handle uint64) {+ cm.lock.Lock()+ defer cm.lock.Unlock()++ delete(cm.handles, handle)+}++func (cm *concurrentHandleMap[T]) tryGet(handle uint64) (T, bool) {+ cm.lock.RLock()+ defer cm.lock.RUnlock()++ val, ok := cm.handles[handle]+ return val, ok+}++//export cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientMethod0+func cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientMethod0(uniffiHandle C.uint64_t, request C.RustBuffer, uniffiFutureCallback C.UniffiForeignFutureCompleteRustBuffer, uniffiCallbackData C.uint64_t, uniffiOutDroppedCallback *C.UniffiForeignFutureDroppedCallbackStruct) {+ handle := uint64(uniffiHandle)+ uniffiObj, ok := FfiConverterHttpClientINSTANCE.handleMap.tryGet(handle)+ if !ok {+ panic(fmt.Errorf("no callback in handle map: %d", handle))+ }++ result := make(chan C.UniffiForeignFutureResultRustBuffer, 1)+ cancel := make(chan struct{}, 1)+ guardHandle := cgo.NewHandle(cancel)+ *uniffiOutDroppedCallback = C.UniffiForeignFutureDroppedCallbackStruct{+ handle: C.uint64_t(guardHandle),+ free: C.UniffiForeignFutureDroppedCallback(C.cyclops_sdk_uniffiFreeGorutine),+ }++ // Wait for compleation or cancel+ go func() {+ select {+ case <-cancel:+ case res := <-result:+ C.call_UniffiForeignFutureCompleteRustBuffer(uniffiFutureCallback, uniffiCallbackData, res)+ }+ }()++ // Eval callback asynchroniously+ go func() {+ asyncResult := &C.UniffiForeignFutureResultRustBuffer{}+ uniffiOutReturn := &asyncResult.returnValue+ callStatus := &asyncResult.callStatus+ defer func() {+ result <- *asyncResult+ }()++ res, err :=+ uniffiObj.Execute(+ FfiConverterHttpRequestINSTANCE.Lift(GoRustBuffer{+ inner: request,+ }),+ )++ if err != nil {+ var actualError *HttpError+ if errors.As(err, &actualError) {+ *callStatus = C.RustCallStatus{+ code: C.int8_t(uniffiCallbackResultError),+ errorBuf: FfiConverterHttpErrorINSTANCE.Lower(actualError),+ }+ } else {+ *callStatus = C.RustCallStatus{+ code: C.int8_t(uniffiCallbackUnexpectedResultError),+ }+ }+ return+ }++ *uniffiOutReturn = FfiConverterHttpResponseINSTANCE.Lower(res)+ }()+}++var UniffiVTableCallbackInterfaceHttpClientINSTANCE = C.UniffiVTableCallbackInterfaceHttpClient{+ uniffiFree: (C.UniffiCallbackInterfaceFree)(C.cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientFree),+ uniffiClone: (C.UniffiCallbackInterfaceClone)(C.cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientClone),+ execute: (C.UniffiCallbackInterfaceHttpClientMethod0)(C.cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientMethod0),+}++//export cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientFree+func cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientFree(handle C.uint64_t) {+ FfiConverterHttpClientINSTANCE.handleMap.remove(uint64(handle))+}++//export cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientClone+func cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientClone(handle C.uint64_t) C.uint64_t {+ val, ok := FfiConverterHttpClientINSTANCE.handleMap.tryGet(uint64(handle))+ if !ok {+ panic(fmt.Errorf("no callback in handle map: %d", handle))+ }+ return C.uint64_t(FfiConverterHttpClientINSTANCE.handleMap.insert(val))+}++func (c FfiConverterHttpClient) register() {+ C.uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(&UniffiVTableCallbackInterfaceHttpClientINSTANCE)+}++type Claim struct {+ ApiVersion string+ Kind string+ Metadata ResourceMetadata+ Spec cyclops_sdk_schema.ClaimSpec+ Status *cyclops_sdk_schema.OsGymSandboxClaimStatus+}++func (r *Claim) Destroy() {+ FfiDestroyerString{}.Destroy(r.ApiVersion)+ FfiDestroyerString{}.Destroy(r.Kind)+ FfiDestroyerResourceMetadata{}.Destroy(r.Metadata)+ cyclops_sdk_schema.FfiDestroyerClaimSpec{}.Destroy(r.Spec)+ FfiDestroyerOptionalOsGymSandboxClaimStatus{}.Destroy(r.Status)+}++type FfiConverterClaim struct{}++var FfiConverterClaimINSTANCE = FfiConverterClaim{}++func (c FfiConverterClaim) Lift(rb RustBufferI) Claim {+ return LiftFromRustBuffer[Claim](c, rb)+}++func (c FfiConverterClaim) Read(reader io.Reader) Claim {+ return Claim{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterResourceMetadataINSTANCE.Read(reader),+ cyclops_sdk_schema.FfiConverterClaimSpecINSTANCE.Read(reader),+ FfiConverterOptionalOsGymSandboxClaimStatusINSTANCE.Read(reader),+ }+}++func (c FfiConverterClaim) Lower(value Claim) C.RustBuffer {+ return LowerIntoRustBuffer[Claim](c, value)+}++func (c FfiConverterClaim) LowerExternal(value Claim) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[Claim](c, value))+}++func (c FfiConverterClaim) Write(writer io.Writer, value Claim) {+ FfiConverterStringINSTANCE.Write(writer, value.ApiVersion)+ FfiConverterStringINSTANCE.Write(writer, value.Kind)+ FfiConverterResourceMetadataINSTANCE.Write(writer, value.Metadata)+ cyclops_sdk_schema.FfiConverterClaimSpecINSTANCE.Write(writer, value.Spec)+ FfiConverterOptionalOsGymSandboxClaimStatusINSTANCE.Write(writer, value.Status)+}++type FfiDestroyerClaim struct{}++func (_ FfiDestroyerClaim) Destroy(value Claim) {+ value.Destroy()+}++type CreateClaimRequest struct {+ Pool Pool+ Spec *cyclops_sdk_schema.ClaimSpec+}++func (r *CreateClaimRequest) Destroy() {+ FfiDestroyerPool{}.Destroy(r.Pool)+ FfiDestroyerOptionalClaimSpec{}.Destroy(r.Spec)+}++type FfiConverterCreateClaimRequest struct{}++var FfiConverterCreateClaimRequestINSTANCE = FfiConverterCreateClaimRequest{}++func (c FfiConverterCreateClaimRequest) Lift(rb RustBufferI) CreateClaimRequest {+ return LiftFromRustBuffer[CreateClaimRequest](c, rb)+}++func (c FfiConverterCreateClaimRequest) Read(reader io.Reader) CreateClaimRequest {+ return CreateClaimRequest{+ FfiConverterPoolINSTANCE.Read(reader),+ FfiConverterOptionalClaimSpecINSTANCE.Read(reader),+ }+}++func (c FfiConverterCreateClaimRequest) Lower(value CreateClaimRequest) C.RustBuffer {+ return LowerIntoRustBuffer[CreateClaimRequest](c, value)+}++func (c FfiConverterCreateClaimRequest) LowerExternal(value CreateClaimRequest) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[CreateClaimRequest](c, value))+}++func (c FfiConverterCreateClaimRequest) Write(writer io.Writer, value CreateClaimRequest) {+ FfiConverterPoolINSTANCE.Write(writer, value.Pool)+ FfiConverterOptionalClaimSpecINSTANCE.Write(writer, value.Spec)+}++type FfiDestroyerCreateClaimRequest struct{}++func (_ FfiDestroyerCreateClaimRequest) Destroy(value CreateClaimRequest) {+ value.Destroy()+}++type CreatePoolRequest struct {+ Namespace string+ Spec cyclops_sdk_schema.PoolSpec+}++func (r *CreatePoolRequest) Destroy() {+ FfiDestroyerString{}.Destroy(r.Namespace)+ cyclops_sdk_schema.FfiDestroyerPoolSpec{}.Destroy(r.Spec)+}++type FfiConverterCreatePoolRequest struct{}++var FfiConverterCreatePoolRequestINSTANCE = FfiConverterCreatePoolRequest{}++func (c FfiConverterCreatePoolRequest) Lift(rb RustBufferI) CreatePoolRequest {+ return LiftFromRustBuffer[CreatePoolRequest](c, rb)+}++func (c FfiConverterCreatePoolRequest) Read(reader io.Reader) CreatePoolRequest {+ return CreatePoolRequest{+ FfiConverterStringINSTANCE.Read(reader),+ cyclops_sdk_schema.FfiConverterPoolSpecINSTANCE.Read(reader),+ }+}++func (c FfiConverterCreatePoolRequest) Lower(value CreatePoolRequest) C.RustBuffer {+ return LowerIntoRustBuffer[CreatePoolRequest](c, value)+}++func (c FfiConverterCreatePoolRequest) LowerExternal(value CreatePoolRequest) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[CreatePoolRequest](c, value))+}++func (c FfiConverterCreatePoolRequest) Write(writer io.Writer, value CreatePoolRequest) {+ FfiConverterStringINSTANCE.Write(writer, value.Namespace)+ cyclops_sdk_schema.FfiConverterPoolSpecINSTANCE.Write(writer, value.Spec)+}++type FfiDestroyerCreatePoolRequest struct{}++func (_ FfiDestroyerCreatePoolRequest) Destroy(value CreatePoolRequest) {+ value.Destroy()+}++type CyclopsConfiguration struct {+ BaseUrl string+ TokenUrl string+ Credentials *CyclopsCredentials+ PoolPollIntervalMs uint64+ PoolPollLimit uint32+ ClaimPollIntervalMs uint64+ ClaimPollLimit uint32+}++func (r *CyclopsConfiguration) Destroy() {+ FfiDestroyerString{}.Destroy(r.BaseUrl)+ FfiDestroyerString{}.Destroy(r.TokenUrl)+ FfiDestroyerCyclopsCredentials{}.Destroy(r.Credentials)+ FfiDestroyerUint64{}.Destroy(r.PoolPollIntervalMs)+ FfiDestroyerUint32{}.Destroy(r.PoolPollLimit)+ FfiDestroyerUint64{}.Destroy(r.ClaimPollIntervalMs)+ FfiDestroyerUint32{}.Destroy(r.ClaimPollLimit)+}++type FfiConverterCyclopsConfiguration struct{}++var FfiConverterCyclopsConfigurationINSTANCE = FfiConverterCyclopsConfiguration{}++func (c FfiConverterCyclopsConfiguration) Lift(rb RustBufferI) CyclopsConfiguration {+ return LiftFromRustBuffer[CyclopsConfiguration](c, rb)+}++func (c FfiConverterCyclopsConfiguration) Read(reader io.Reader) CyclopsConfiguration {+ return CyclopsConfiguration{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterCyclopsCredentialsINSTANCE.Read(reader),+ FfiConverterUint64INSTANCE.Read(reader),+ FfiConverterUint32INSTANCE.Read(reader),+ FfiConverterUint64INSTANCE.Read(reader),+ FfiConverterUint32INSTANCE.Read(reader),+ }+}++func (c FfiConverterCyclopsConfiguration) Lower(value CyclopsConfiguration) C.RustBuffer {+ return LowerIntoRustBuffer[CyclopsConfiguration](c, value)+}++func (c FfiConverterCyclopsConfiguration) LowerExternal(value CyclopsConfiguration) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[CyclopsConfiguration](c, value))+}++func (c FfiConverterCyclopsConfiguration) Write(writer io.Writer, value CyclopsConfiguration) {+ FfiConverterStringINSTANCE.Write(writer, value.BaseUrl)+ FfiConverterStringINSTANCE.Write(writer, value.TokenUrl)+ FfiConverterCyclopsCredentialsINSTANCE.Write(writer, value.Credentials)+ FfiConverterUint64INSTANCE.Write(writer, value.PoolPollIntervalMs)+ FfiConverterUint32INSTANCE.Write(writer, value.PoolPollLimit)+ FfiConverterUint64INSTANCE.Write(writer, value.ClaimPollIntervalMs)+ FfiConverterUint32INSTANCE.Write(writer, value.ClaimPollLimit)+}++type FfiDestroyerCyclopsConfiguration struct{}++func (_ FfiDestroyerCyclopsConfiguration) Destroy(value CyclopsConfiguration) {+ value.Destroy()+}++type HttpHeader struct {+ Name string+ Value string+}++func (r *HttpHeader) Destroy() {+ FfiDestroyerString{}.Destroy(r.Name)+ FfiDestroyerString{}.Destroy(r.Value)+}++type FfiConverterHttpHeader struct{}++var FfiConverterHttpHeaderINSTANCE = FfiConverterHttpHeader{}++func (c FfiConverterHttpHeader) Lift(rb RustBufferI) HttpHeader {+ return LiftFromRustBuffer[HttpHeader](c, rb)+}++func (c FfiConverterHttpHeader) Read(reader io.Reader) HttpHeader {+ return HttpHeader{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterHttpHeader) Lower(value HttpHeader) C.RustBuffer {+ return LowerIntoRustBuffer[HttpHeader](c, value)+}++func (c FfiConverterHttpHeader) LowerExternal(value HttpHeader) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[HttpHeader](c, value))+}++func (c FfiConverterHttpHeader) Write(writer io.Writer, value HttpHeader) {+ FfiConverterStringINSTANCE.Write(writer, value.Name)+ FfiConverterStringINSTANCE.Write(writer, value.Value)+}++type FfiDestroyerHttpHeader struct{}++func (_ FfiDestroyerHttpHeader) Destroy(value HttpHeader) {+ value.Destroy()+}++type HttpRequest struct {+ Method string+ Url string+ Headers []HttpHeader+ Body *[]byte+}++func (r *HttpRequest) Destroy() {+ FfiDestroyerString{}.Destroy(r.Method)+ FfiDestroyerString{}.Destroy(r.Url)+ FfiDestroyerSequenceHttpHeader{}.Destroy(r.Headers)+ FfiDestroyerOptionalBytes{}.Destroy(r.Body)+}++type FfiConverterHttpRequest struct{}++var FfiConverterHttpRequestINSTANCE = FfiConverterHttpRequest{}++func (c FfiConverterHttpRequest) Lift(rb RustBufferI) HttpRequest {+ return LiftFromRustBuffer[HttpRequest](c, rb)+}++func (c FfiConverterHttpRequest) Read(reader io.Reader) HttpRequest {+ return HttpRequest{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterSequenceHttpHeaderINSTANCE.Read(reader),+ FfiConverterOptionalBytesINSTANCE.Read(reader),+ }+}++func (c FfiConverterHttpRequest) Lower(value HttpRequest) C.RustBuffer {+ return LowerIntoRustBuffer[HttpRequest](c, value)+}++func (c FfiConverterHttpRequest) LowerExternal(value HttpRequest) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[HttpRequest](c, value))+}++func (c FfiConverterHttpRequest) Write(writer io.Writer, value HttpRequest) {+ FfiConverterStringINSTANCE.Write(writer, value.Method)+ FfiConverterStringINSTANCE.Write(writer, value.Url)+ FfiConverterSequenceHttpHeaderINSTANCE.Write(writer, value.Headers)+ FfiConverterOptionalBytesINSTANCE.Write(writer, value.Body)+}++type FfiDestroyerHttpRequest struct{}++func (_ FfiDestroyerHttpRequest) Destroy(value HttpRequest) {+ value.Destroy()+}++type HttpResponse struct {+ Status uint16+ Headers []HttpHeader+ Body []byte+}++func (r *HttpResponse) Destroy() {+ FfiDestroyerUint16{}.Destroy(r.Status)+ FfiDestroyerSequenceHttpHeader{}.Destroy(r.Headers)+ FfiDestroyerBytes{}.Destroy(r.Body)+}++type FfiConverterHttpResponse struct{}++var FfiConverterHttpResponseINSTANCE = FfiConverterHttpResponse{}++func (c FfiConverterHttpResponse) Lift(rb RustBufferI) HttpResponse {+ return LiftFromRustBuffer[HttpResponse](c, rb)+}++func (c FfiConverterHttpResponse) Read(reader io.Reader) HttpResponse {+ return HttpResponse{+ FfiConverterUint16INSTANCE.Read(reader),+ FfiConverterSequenceHttpHeaderINSTANCE.Read(reader),+ FfiConverterBytesINSTANCE.Read(reader),+ }+}++func (c FfiConverterHttpResponse) Lower(value HttpResponse) C.RustBuffer {+ return LowerIntoRustBuffer[HttpResponse](c, value)+}++func (c FfiConverterHttpResponse) LowerExternal(value HttpResponse) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[HttpResponse](c, value))+}++func (c FfiConverterHttpResponse) Write(writer io.Writer, value HttpResponse) {+ FfiConverterUint16INSTANCE.Write(writer, value.Status)+ FfiConverterSequenceHttpHeaderINSTANCE.Write(writer, value.Headers)+ FfiConverterBytesINSTANCE.Write(writer, value.Body)+}++type FfiDestroyerHttpResponse struct{}++func (_ FfiDestroyerHttpResponse) Destroy(value HttpResponse) {+ value.Destroy()+}++// UniFFI cannot emit aliases for external record types. Generated bindings use+// `OSGymWorkspacePoolStatus` and `OSGymSandboxClaimStatus` from cyclops_sdk_schema.+type Pool struct {+ ApiVersion string+ Kind string+ Metadata ResourceMetadata+ Spec cyclops_sdk_schema.PoolSpec+ Status *cyclops_sdk_schema.OsGymWorkspacePoolStatus+}++func (r *Pool) Destroy() {+ FfiDestroyerString{}.Destroy(r.ApiVersion)+ FfiDestroyerString{}.Destroy(r.Kind)+ FfiDestroyerResourceMetadata{}.Destroy(r.Metadata)+ cyclops_sdk_schema.FfiDestroyerPoolSpec{}.Destroy(r.Spec)+ FfiDestroyerOptionalOsGymWorkspacePoolStatus{}.Destroy(r.Status)+}++type FfiConverterPool struct{}++var FfiConverterPoolINSTANCE = FfiConverterPool{}++func (c FfiConverterPool) Lift(rb RustBufferI) Pool {+ return LiftFromRustBuffer[Pool](c, rb)+}++func (c FfiConverterPool) Read(reader io.Reader) Pool {+ return Pool{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterResourceMetadataINSTANCE.Read(reader),+ cyclops_sdk_schema.FfiConverterPoolSpecINSTANCE.Read(reader),+ FfiConverterOptionalOsGymWorkspacePoolStatusINSTANCE.Read(reader),+ }+}++func (c FfiConverterPool) Lower(value Pool) C.RustBuffer {+ return LowerIntoRustBuffer[Pool](c, value)+}++func (c FfiConverterPool) LowerExternal(value Pool) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[Pool](c, value))+}++func (c FfiConverterPool) Write(writer io.Writer, value Pool) {+ FfiConverterStringINSTANCE.Write(writer, value.ApiVersion)+ FfiConverterStringINSTANCE.Write(writer, value.Kind)+ FfiConverterResourceMetadataINSTANCE.Write(writer, value.Metadata)+ cyclops_sdk_schema.FfiConverterPoolSpecINSTANCE.Write(writer, value.Spec)+ FfiConverterOptionalOsGymWorkspacePoolStatusINSTANCE.Write(writer, value.Status)+}++type FfiDestroyerPool struct{}++func (_ FfiDestroyerPool) Destroy(value Pool) {+ value.Destroy()+}++type ResourceMetadata struct {+ Namespace string+ Name string+ Labels *map[string]string+}++func (r *ResourceMetadata) Destroy() {+ FfiDestroyerString{}.Destroy(r.Namespace)+ FfiDestroyerString{}.Destroy(r.Name)+ FfiDestroyerOptionalMapStringString{}.Destroy(r.Labels)+}++type FfiConverterResourceMetadata struct{}++var FfiConverterResourceMetadataINSTANCE = FfiConverterResourceMetadata{}++func (c FfiConverterResourceMetadata) Lift(rb RustBufferI) ResourceMetadata {+ return LiftFromRustBuffer[ResourceMetadata](c, rb)+}++func (c FfiConverterResourceMetadata) Read(reader io.Reader) ResourceMetadata {+ return ResourceMetadata{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterOptionalMapStringStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterResourceMetadata) Lower(value ResourceMetadata) C.RustBuffer {+ return LowerIntoRustBuffer[ResourceMetadata](c, value)+}++func (c FfiConverterResourceMetadata) LowerExternal(value ResourceMetadata) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[ResourceMetadata](c, value))+}++func (c FfiConverterResourceMetadata) Write(writer io.Writer, value ResourceMetadata) {+ FfiConverterStringINSTANCE.Write(writer, value.Namespace)+ FfiConverterStringINSTANCE.Write(writer, value.Name)+ FfiConverterOptionalMapStringStringINSTANCE.Write(writer, value.Labels)+}++type FfiDestroyerResourceMetadata struct{}++func (_ FfiDestroyerResourceMetadata) Destroy(value ResourceMetadata) {+ value.Destroy()+}++type Sandbox struct {+ Namespace string+ Claim string+ Name string+ Services []string+}++func (r *Sandbox) Destroy() {+ FfiDestroyerString{}.Destroy(r.Namespace)+ FfiDestroyerString{}.Destroy(r.Claim)+ FfiDestroyerString{}.Destroy(r.Name)+ FfiDestroyerSequenceString{}.Destroy(r.Services)+}++type FfiConverterSandbox struct{}++var FfiConverterSandboxINSTANCE = FfiConverterSandbox{}++func (c FfiConverterSandbox) Lift(rb RustBufferI) Sandbox {+ return LiftFromRustBuffer[Sandbox](c, rb)+}++func (c FfiConverterSandbox) Read(reader io.Reader) Sandbox {+ return Sandbox{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterSequenceStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterSandbox) Lower(value Sandbox) C.RustBuffer {+ return LowerIntoRustBuffer[Sandbox](c, value)+}++func (c FfiConverterSandbox) LowerExternal(value Sandbox) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[Sandbox](c, value))+}++func (c FfiConverterSandbox) Write(writer io.Writer, value Sandbox) {+ FfiConverterStringINSTANCE.Write(writer, value.Namespace)+ FfiConverterStringINSTANCE.Write(writer, value.Claim)+ FfiConverterStringINSTANCE.Write(writer, value.Name)+ FfiConverterSequenceStringINSTANCE.Write(writer, value.Services)+}++type FfiDestroyerSandbox struct{}++func (_ FfiDestroyerSandbox) Destroy(value Sandbox) {+ value.Destroy()+}++type HttpError struct {+ err error+}++// Convenience method to turn *HttpError into error+// Avoiding treating nil pointer as non nil error interface+func (err *HttpError) AsError() error {+ if err == nil {+ return nil+ } else {+ return err+ }+}++func (err HttpError) Error() string {+ return fmt.Sprintf("HttpError: %s", err.err.Error())+}++func (err HttpError) Unwrap() error {+ return err.err+}++// Err* are used for checking error type with `errors.Is`+var ErrHttpErrorTransport = fmt.Errorf("HttpErrorTransport")++// Variant structs+type HttpErrorTransport struct {+ Reason string+}++func NewHttpErrorTransport(+ reason string,+) *HttpError {+ return &HttpError{err: &HttpErrorTransport{+ Reason: reason}}+}++func (e HttpErrorTransport) destroy() {+ FfiDestroyerString{}.Destroy(e.Reason)+}++func (err HttpErrorTransport) Error() string {+ return fmt.Sprint("Transport",+ ": ",++ "Reason=",+ err.Reason,+ )+}++func (self HttpErrorTransport) Is(target error) bool {+ return target == ErrHttpErrorTransport+}++type FfiConverterHttpError struct{}++var FfiConverterHttpErrorINSTANCE = FfiConverterHttpError{}++func (c FfiConverterHttpError) Lift(eb RustBufferI) *HttpError {+ return LiftFromRustBuffer[*HttpError](c, eb)+}++func (c FfiConverterHttpError) Lower(value *HttpError) C.RustBuffer {+ return LowerIntoRustBuffer[*HttpError](c, value)+}++func (c FfiConverterHttpError) LowerExternal(value *HttpError) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*HttpError](c, value))+}++func (c FfiConverterHttpError) Read(reader io.Reader) *HttpError {+ errorID := readUint32(reader)++ switch errorID {+ case 1:+ return &HttpError{&HttpErrorTransport{+ Reason: FfiConverterStringINSTANCE.Read(reader),+ }}+ default:+ panic(fmt.Sprintf("Unknown error code %d in FfiConverterHttpError.Read()", errorID))+ }+}++func (c FfiConverterHttpError) Write(writer io.Writer, value *HttpError) {+ switch variantValue := value.err.(type) {+ case *HttpErrorTransport:+ writeInt32(writer, 1)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Reason)+ default:+ _ = variantValue+ panic(fmt.Sprintf("invalid error value `%v` in FfiConverterHttpError.Write", value))+ }+}++type FfiDestroyerHttpError struct{}++func (_ FfiDestroyerHttpError) Destroy(value *HttpError) {+ switch variantValue := value.err.(type) {+ case HttpErrorTransport:+ variantValue.destroy()+ default:+ _ = variantValue+ panic(fmt.Sprintf("invalid error value `%v` in FfiDestroyerHttpError.Destroy", value))+ }+}++type SdkError struct {+ err error+}++// Convenience method to turn *SdkError into error+// Avoiding treating nil pointer as non nil error interface+func (err *SdkError) AsError() error {+ if err == nil {+ return nil+ } else {+ return err+ }+}++func (err SdkError) Error() string {+ return fmt.Sprintf("SdkError: %s", err.err.Error())+}++func (err SdkError) Unwrap() error {+ return err.err+}++// Err* are used for checking error type with `errors.Is`+var ErrSdkErrorConfiguration = fmt.Errorf("SdkErrorConfiguration")+var ErrSdkErrorInvalidResourceName = fmt.Errorf("SdkErrorInvalidResourceName")+var ErrSdkErrorTransport = fmt.Errorf("SdkErrorTransport")+var ErrSdkErrorToken = fmt.Errorf("SdkErrorToken")+var ErrSdkErrorBody = fmt.Errorf("SdkErrorBody")+var ErrSdkErrorStatus = fmt.Errorf("SdkErrorStatus")+var ErrSdkErrorUnknownService = fmt.Errorf("SdkErrorUnknownService")+var ErrSdkErrorInvalidServicePath = fmt.Errorf("SdkErrorInvalidServicePath")+var ErrSdkErrorClaimFailed = fmt.Errorf("SdkErrorClaimFailed")+var ErrSdkErrorClaimTimeout = fmt.Errorf("SdkErrorClaimTimeout")++// Variant structs+type SdkErrorConfiguration struct {+ Reason string+}++func NewSdkErrorConfiguration(+ reason string,+) *SdkError {+ return &SdkError{err: &SdkErrorConfiguration{+ Reason: reason}}+}++func (e SdkErrorConfiguration) destroy() {+ FfiDestroyerString{}.Destroy(e.Reason)+}++func (err SdkErrorConfiguration) Error() string {+ return fmt.Sprint("Configuration",+ ": ",++ "Reason=",+ err.Reason,+ )+}++func (self SdkErrorConfiguration) Is(target error) bool {+ return target == ErrSdkErrorConfiguration+}++type SdkErrorInvalidResourceName struct {+ Field string+ Value string+ Reason string+}++func NewSdkErrorInvalidResourceName(+ field string,+ value string,+ reason string,+) *SdkError {+ return &SdkError{err: &SdkErrorInvalidResourceName{+ Field: field,+ Value: value,+ Reason: reason}}+}++func (e SdkErrorInvalidResourceName) destroy() {+ FfiDestroyerString{}.Destroy(e.Field)+ FfiDestroyerString{}.Destroy(e.Value)+ FfiDestroyerString{}.Destroy(e.Reason)+}++func (err SdkErrorInvalidResourceName) Error() string {+ return fmt.Sprint("InvalidResourceName",+ ": ",++ "Field=",+ err.Field,+ ", ",+ "Value=",+ err.Value,+ ", ",+ "Reason=",+ err.Reason,+ )+}++func (self SdkErrorInvalidResourceName) Is(target error) bool {+ return target == ErrSdkErrorInvalidResourceName+}++type SdkErrorTransport struct {+ Reason string+}++func NewSdkErrorTransport(+ reason string,+) *SdkError {+ return &SdkError{err: &SdkErrorTransport{+ Reason: reason}}+}++func (e SdkErrorTransport) destroy() {+ FfiDestroyerString{}.Destroy(e.Reason)+}++func (err SdkErrorTransport) Error() string {+ return fmt.Sprint("Transport",+ ": ",++ "Reason=",+ err.Reason,+ )+}++func (self SdkErrorTransport) Is(target error) bool {+ return target == ErrSdkErrorTransport+}++type SdkErrorToken struct {+ Reason string+}++func NewSdkErrorToken(+ reason string,+) *SdkError {+ return &SdkError{err: &SdkErrorToken{+ Reason: reason}}+}++func (e SdkErrorToken) destroy() {+ FfiDestroyerString{}.Destroy(e.Reason)+}++func (err SdkErrorToken) Error() string {+ return fmt.Sprint("Token",+ ": ",++ "Reason=",+ err.Reason,+ )+}++func (self SdkErrorToken) Is(target error) bool {+ return target == ErrSdkErrorToken+}++type SdkErrorBody struct {+ Reason string+}++func NewSdkErrorBody(+ reason string,+) *SdkError {+ return &SdkError{err: &SdkErrorBody{+ Reason: reason}}+}++func (e SdkErrorBody) destroy() {+ FfiDestroyerString{}.Destroy(e.Reason)+}++func (err SdkErrorBody) Error() string {+ return fmt.Sprint("Body",+ ": ",++ "Reason=",+ err.Reason,+ )+}++func (self SdkErrorBody) Is(target error) bool {+ return target == ErrSdkErrorBody+}++type SdkErrorStatus struct {+ Operation string+ Status uint16+ Body string+}++func NewSdkErrorStatus(+ operation string,+ status uint16,+ body string,+) *SdkError {+ return &SdkError{err: &SdkErrorStatus{+ Operation: operation,+ Status: status,+ Body: body}}+}++func (e SdkErrorStatus) destroy() {+ FfiDestroyerString{}.Destroy(e.Operation)+ FfiDestroyerUint16{}.Destroy(e.Status)+ FfiDestroyerString{}.Destroy(e.Body)+}++func (err SdkErrorStatus) Error() string {+ return fmt.Sprint("Status",+ ": ",++ "Operation=",+ err.Operation,+ ", ",+ "Status=",+ err.Status,+ ", ",+ "Body=",+ err.Body,+ )+}++func (self SdkErrorStatus) Is(target error) bool {+ return target == ErrSdkErrorStatus+}++type SdkErrorUnknownService struct {+ Requested string+ Available []string+}++func NewSdkErrorUnknownService(+ requested string,+ available []string,+) *SdkError {+ return &SdkError{err: &SdkErrorUnknownService{+ Requested: requested,+ Available: available}}+}++func (e SdkErrorUnknownService) destroy() {+ FfiDestroyerString{}.Destroy(e.Requested)+ FfiDestroyerSequenceString{}.Destroy(e.Available)+}++func (err SdkErrorUnknownService) Error() string {+ return fmt.Sprint("UnknownService",+ ": ",++ "Requested=",+ err.Requested,+ ", ",+ "Available=",+ err.Available,+ )+}++func (self SdkErrorUnknownService) Is(target error) bool {+ return target == ErrSdkErrorUnknownService+}++type SdkErrorInvalidServicePath struct {+ Path string+}++func NewSdkErrorInvalidServicePath(+ path string,+) *SdkError {+ return &SdkError{err: &SdkErrorInvalidServicePath{+ Path: path}}+}++func (e SdkErrorInvalidServicePath) destroy() {+ FfiDestroyerString{}.Destroy(e.Path)+}++func (err SdkErrorInvalidServicePath) Error() string {+ return fmt.Sprint("InvalidServicePath",+ ": ",++ "Path=",+ err.Path,+ )+}++func (self SdkErrorInvalidServicePath) Is(target error) bool {+ return target == ErrSdkErrorInvalidServicePath+}++type SdkErrorClaimFailed struct {+ Phase string+ Status string+}++func NewSdkErrorClaimFailed(+ phase string,+ status string,+) *SdkError {+ return &SdkError{err: &SdkErrorClaimFailed{+ Phase: phase,+ Status: status}}+}++func (e SdkErrorClaimFailed) destroy() {+ FfiDestroyerString{}.Destroy(e.Phase)+ FfiDestroyerString{}.Destroy(e.Status)+}++func (err SdkErrorClaimFailed) Error() string {+ return fmt.Sprint("ClaimFailed",+ ": ",++ "Phase=",+ err.Phase,+ ", ",+ "Status=",+ err.Status,+ )+}++func (self SdkErrorClaimFailed) Is(target error) bool {+ return target == ErrSdkErrorClaimFailed+}++type SdkErrorClaimTimeout struct {+}++func NewSdkErrorClaimTimeout() *SdkError {+ return &SdkError{err: &SdkErrorClaimTimeout{}}+}++func (e SdkErrorClaimTimeout) destroy() {+}++func (err SdkErrorClaimTimeout) Error() string {+ return fmt.Sprint("ClaimTimeout")+}++func (self SdkErrorClaimTimeout) Is(target error) bool {+ return target == ErrSdkErrorClaimTimeout+}++type FfiConverterSdkError struct{}++var FfiConverterSdkErrorINSTANCE = FfiConverterSdkError{}++func (c FfiConverterSdkError) Lift(eb RustBufferI) *SdkError {+ return LiftFromRustBuffer[*SdkError](c, eb)+}++func (c FfiConverterSdkError) Lower(value *SdkError) C.RustBuffer {+ return LowerIntoRustBuffer[*SdkError](c, value)+}++func (c FfiConverterSdkError) LowerExternal(value *SdkError) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*SdkError](c, value))+}++func (c FfiConverterSdkError) Read(reader io.Reader) *SdkError {+ errorID := readUint32(reader)++ switch errorID {+ case 1:+ return &SdkError{&SdkErrorConfiguration{+ Reason: FfiConverterStringINSTANCE.Read(reader),+ }}+ case 2:+ return &SdkError{&SdkErrorInvalidResourceName{+ Field: FfiConverterStringINSTANCE.Read(reader),+ Value: FfiConverterStringINSTANCE.Read(reader),+ Reason: FfiConverterStringINSTANCE.Read(reader),+ }}+ case 3:+ return &SdkError{&SdkErrorTransport{+ Reason: FfiConverterStringINSTANCE.Read(reader),+ }}+ case 4:+ return &SdkError{&SdkErrorToken{+ Reason: FfiConverterStringINSTANCE.Read(reader),+ }}+ case 5:+ return &SdkError{&SdkErrorBody{+ Reason: FfiConverterStringINSTANCE.Read(reader),+ }}+ case 6:+ return &SdkError{&SdkErrorStatus{+ Operation: FfiConverterStringINSTANCE.Read(reader),+ Status: FfiConverterUint16INSTANCE.Read(reader),+ Body: FfiConverterStringINSTANCE.Read(reader),+ }}+ case 7:+ return &SdkError{&SdkErrorUnknownService{+ Requested: FfiConverterStringINSTANCE.Read(reader),+ Available: FfiConverterSequenceStringINSTANCE.Read(reader),+ }}+ case 8:+ return &SdkError{&SdkErrorInvalidServicePath{+ Path: FfiConverterStringINSTANCE.Read(reader),+ }}+ case 9:+ return &SdkError{&SdkErrorClaimFailed{+ Phase: FfiConverterStringINSTANCE.Read(reader),+ Status: FfiConverterStringINSTANCE.Read(reader),+ }}+ case 10:+ return &SdkError{&SdkErrorClaimTimeout{}}+ default:+ panic(fmt.Sprintf("Unknown error code %d in FfiConverterSdkError.Read()", errorID))+ }+}++func (c FfiConverterSdkError) Write(writer io.Writer, value *SdkError) {+ switch variantValue := value.err.(type) {+ case *SdkErrorConfiguration:+ writeInt32(writer, 1)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Reason)+ case *SdkErrorInvalidResourceName:+ writeInt32(writer, 2)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Field)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Value)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Reason)+ case *SdkErrorTransport:+ writeInt32(writer, 3)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Reason)+ case *SdkErrorToken:+ writeInt32(writer, 4)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Reason)+ case *SdkErrorBody:+ writeInt32(writer, 5)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Reason)+ case *SdkErrorStatus:+ writeInt32(writer, 6)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Operation)+ FfiConverterUint16INSTANCE.Write(writer, variantValue.Status)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Body)+ case *SdkErrorUnknownService:+ writeInt32(writer, 7)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Requested)+ FfiConverterSequenceStringINSTANCE.Write(writer, variantValue.Available)+ case *SdkErrorInvalidServicePath:+ writeInt32(writer, 8)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Path)+ case *SdkErrorClaimFailed:+ writeInt32(writer, 9)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Phase)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Status)+ case *SdkErrorClaimTimeout:+ writeInt32(writer, 10)+ default:+ _ = variantValue+ panic(fmt.Sprintf("invalid error value `%v` in FfiConverterSdkError.Write", value))+ }+}++type FfiDestroyerSdkError struct{}++func (_ FfiDestroyerSdkError) Destroy(value *SdkError) {+ switch variantValue := value.err.(type) {+ case SdkErrorConfiguration:+ variantValue.destroy()+ case SdkErrorInvalidResourceName:+ variantValue.destroy()+ case SdkErrorTransport:+ variantValue.destroy()+ case SdkErrorToken:+ variantValue.destroy()+ case SdkErrorBody:+ variantValue.destroy()+ case SdkErrorStatus:+ variantValue.destroy()+ case SdkErrorUnknownService:+ variantValue.destroy()+ case SdkErrorInvalidServicePath:+ variantValue.destroy()+ case SdkErrorClaimFailed:+ variantValue.destroy()+ case SdkErrorClaimTimeout:+ variantValue.destroy()+ default:+ _ = variantValue+ panic(fmt.Sprintf("invalid error value `%v` in FfiDestroyerSdkError.Destroy", value))+ }+}++type FfiConverterOptionalBytes struct{}++var FfiConverterOptionalBytesINSTANCE = FfiConverterOptionalBytes{}++func (c FfiConverterOptionalBytes) Lift(rb RustBufferI) *[]byte {+ return LiftFromRustBuffer[*[]byte](c, rb)+}++func (_ FfiConverterOptionalBytes) Read(reader io.Reader) *[]byte {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterBytesINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalBytes) Lower(value *[]byte) C.RustBuffer {+ return LowerIntoRustBuffer[*[]byte](c, value)+}++func (c FfiConverterOptionalBytes) LowerExternal(value *[]byte) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*[]byte](c, value))+}++func (_ FfiConverterOptionalBytes) Write(writer io.Writer, value *[]byte) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterBytesINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalBytes struct{}++func (_ FfiDestroyerOptionalBytes) Destroy(value *[]byte) {+ if value != nil {+ FfiDestroyerBytes{}.Destroy(*value)+ }+}++type FfiConverterOptionalClaimSpec struct{}++var FfiConverterOptionalClaimSpecINSTANCE = FfiConverterOptionalClaimSpec{}++func (c FfiConverterOptionalClaimSpec) Lift(rb RustBufferI) *cyclops_sdk_schema.ClaimSpec {+ return LiftFromRustBuffer[*cyclops_sdk_schema.ClaimSpec](c, rb)+}++func (_ FfiConverterOptionalClaimSpec) Read(reader io.Reader) *cyclops_sdk_schema.ClaimSpec {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := cyclops_sdk_schema.FfiConverterClaimSpecINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalClaimSpec) Lower(value *cyclops_sdk_schema.ClaimSpec) C.RustBuffer {+ return LowerIntoRustBuffer[*cyclops_sdk_schema.ClaimSpec](c, value)+}++func (c FfiConverterOptionalClaimSpec) LowerExternal(value *cyclops_sdk_schema.ClaimSpec) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*cyclops_sdk_schema.ClaimSpec](c, value))+}++func (_ FfiConverterOptionalClaimSpec) Write(writer io.Writer, value *cyclops_sdk_schema.ClaimSpec) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ cyclops_sdk_schema.FfiConverterClaimSpecINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalClaimSpec struct{}++func (_ FfiDestroyerOptionalClaimSpec) Destroy(value *cyclops_sdk_schema.ClaimSpec) {+ if value != nil {+ cyclops_sdk_schema.FfiDestroyerClaimSpec{}.Destroy(*value)+ }+}++type FfiConverterOptionalOsGymSandboxClaimStatus struct{}++var FfiConverterOptionalOsGymSandboxClaimStatusINSTANCE = FfiConverterOptionalOsGymSandboxClaimStatus{}++func (c FfiConverterOptionalOsGymSandboxClaimStatus) Lift(rb RustBufferI) *cyclops_sdk_schema.OsGymSandboxClaimStatus {+ return LiftFromRustBuffer[*cyclops_sdk_schema.OsGymSandboxClaimStatus](c, rb)+}++func (_ FfiConverterOptionalOsGymSandboxClaimStatus) Read(reader io.Reader) *cyclops_sdk_schema.OsGymSandboxClaimStatus {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := cyclops_sdk_schema.FfiConverterOsGymSandboxClaimStatusINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalOsGymSandboxClaimStatus) Lower(value *cyclops_sdk_schema.OsGymSandboxClaimStatus) C.RustBuffer {+ return LowerIntoRustBuffer[*cyclops_sdk_schema.OsGymSandboxClaimStatus](c, value)+}++func (c FfiConverterOptionalOsGymSandboxClaimStatus) LowerExternal(value *cyclops_sdk_schema.OsGymSandboxClaimStatus) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*cyclops_sdk_schema.OsGymSandboxClaimStatus](c, value))+}++func (_ FfiConverterOptionalOsGymSandboxClaimStatus) Write(writer io.Writer, value *cyclops_sdk_schema.OsGymSandboxClaimStatus) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ cyclops_sdk_schema.FfiConverterOsGymSandboxClaimStatusINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalOsGymSandboxClaimStatus struct{}++func (_ FfiDestroyerOptionalOsGymSandboxClaimStatus) Destroy(value *cyclops_sdk_schema.OsGymSandboxClaimStatus) {+ if value != nil {+ cyclops_sdk_schema.FfiDestroyerOsGymSandboxClaimStatus{}.Destroy(*value)+ }+}++type FfiConverterOptionalOsGymWorkspacePoolStatus struct{}++var FfiConverterOptionalOsGymWorkspacePoolStatusINSTANCE = FfiConverterOptionalOsGymWorkspacePoolStatus{}++func (c FfiConverterOptionalOsGymWorkspacePoolStatus) Lift(rb RustBufferI) *cyclops_sdk_schema.OsGymWorkspacePoolStatus {+ return LiftFromRustBuffer[*cyclops_sdk_schema.OsGymWorkspacePoolStatus](c, rb)+}++func (_ FfiConverterOptionalOsGymWorkspacePoolStatus) Read(reader io.Reader) *cyclops_sdk_schema.OsGymWorkspacePoolStatus {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := cyclops_sdk_schema.FfiConverterOsGymWorkspacePoolStatusINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalOsGymWorkspacePoolStatus) Lower(value *cyclops_sdk_schema.OsGymWorkspacePoolStatus) C.RustBuffer {+ return LowerIntoRustBuffer[*cyclops_sdk_schema.OsGymWorkspacePoolStatus](c, value)+}++func (c FfiConverterOptionalOsGymWorkspacePoolStatus) LowerExternal(value *cyclops_sdk_schema.OsGymWorkspacePoolStatus) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*cyclops_sdk_schema.OsGymWorkspacePoolStatus](c, value))+}++func (_ FfiConverterOptionalOsGymWorkspacePoolStatus) Write(writer io.Writer, value *cyclops_sdk_schema.OsGymWorkspacePoolStatus) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ cyclops_sdk_schema.FfiConverterOsGymWorkspacePoolStatusINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalOsGymWorkspacePoolStatus struct{}++func (_ FfiDestroyerOptionalOsGymWorkspacePoolStatus) Destroy(value *cyclops_sdk_schema.OsGymWorkspacePoolStatus) {+ if value != nil {+ cyclops_sdk_schema.FfiDestroyerOsGymWorkspacePoolStatus{}.Destroy(*value)+ }+}++type FfiConverterOptionalMapStringString struct{}++var FfiConverterOptionalMapStringStringINSTANCE = FfiConverterOptionalMapStringString{}++func (c FfiConverterOptionalMapStringString) Lift(rb RustBufferI) *map[string]string {+ return LiftFromRustBuffer[*map[string]string](c, rb)+}++func (_ FfiConverterOptionalMapStringString) Read(reader io.Reader) *map[string]string {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterMapStringStringINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalMapStringString) Lower(value *map[string]string) C.RustBuffer {+ return LowerIntoRustBuffer[*map[string]string](c, value)+}++func (c FfiConverterOptionalMapStringString) LowerExternal(value *map[string]string) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*map[string]string](c, value))+}++func (_ FfiConverterOptionalMapStringString) Write(writer io.Writer, value *map[string]string) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterMapStringStringINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalMapStringString struct{}++func (_ FfiDestroyerOptionalMapStringString) Destroy(value *map[string]string) {+ if value != nil {+ FfiDestroyerMapStringString{}.Destroy(*value)+ }+}++type FfiConverterSequenceString struct{}++var FfiConverterSequenceStringINSTANCE = FfiConverterSequenceString{}++func (c FfiConverterSequenceString) Lift(rb RustBufferI) []string {+ return LiftFromRustBuffer[[]string](c, rb)+}++func (c FfiConverterSequenceString) Read(reader io.Reader) []string {+ length := readInt32(reader)+ if length == 0 {+ return nil+ }+ result := make([]string, 0, length)+ for i := int32(0); i < length; i++ {+ result = append(result, FfiConverterStringINSTANCE.Read(reader))+ }+ return result+}++func (c FfiConverterSequenceString) Lower(value []string) C.RustBuffer {+ return LowerIntoRustBuffer[[]string](c, value)+}++func (c FfiConverterSequenceString) LowerExternal(value []string) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[[]string](c, value))+}++func (c FfiConverterSequenceString) Write(writer io.Writer, value []string) {+ if len(value) > math.MaxInt32 {+ panic("[]string is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ for _, item := range value {+ FfiConverterStringINSTANCE.Write(writer, item)+ }+}++type FfiDestroyerSequenceString struct{}++func (FfiDestroyerSequenceString) Destroy(sequence []string) {+ for _, value := range sequence {+ FfiDestroyerString{}.Destroy(value)+ }+}++type FfiConverterSequenceClaim struct{}++var FfiConverterSequenceClaimINSTANCE = FfiConverterSequenceClaim{}++func (c FfiConverterSequenceClaim) Lift(rb RustBufferI) []Claim {+ return LiftFromRustBuffer[[]Claim](c, rb)+}++func (c FfiConverterSequenceClaim) Read(reader io.Reader) []Claim {+ length := readInt32(reader)+ if length == 0 {+ return nil+ }+ result := make([]Claim, 0, length)+ for i := int32(0); i < length; i++ {+ result = append(result, FfiConverterClaimINSTANCE.Read(reader))+ }+ return result+}++func (c FfiConverterSequenceClaim) Lower(value []Claim) C.RustBuffer {+ return LowerIntoRustBuffer[[]Claim](c, value)+}++func (c FfiConverterSequenceClaim) LowerExternal(value []Claim) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[[]Claim](c, value))+}++func (c FfiConverterSequenceClaim) Write(writer io.Writer, value []Claim) {+ if len(value) > math.MaxInt32 {+ panic("[]Claim is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ for _, item := range value {+ FfiConverterClaimINSTANCE.Write(writer, item)+ }+}++type FfiDestroyerSequenceClaim struct{}++func (FfiDestroyerSequenceClaim) Destroy(sequence []Claim) {+ for _, value := range sequence {+ FfiDestroyerClaim{}.Destroy(value)+ }+}++type FfiConverterSequenceHttpHeader struct{}++var FfiConverterSequenceHttpHeaderINSTANCE = FfiConverterSequenceHttpHeader{}++func (c FfiConverterSequenceHttpHeader) Lift(rb RustBufferI) []HttpHeader {+ return LiftFromRustBuffer[[]HttpHeader](c, rb)+}++func (c FfiConverterSequenceHttpHeader) Read(reader io.Reader) []HttpHeader {+ length := readInt32(reader)+ if length == 0 {+ return nil+ }+ result := make([]HttpHeader, 0, length)+ for i := int32(0); i < length; i++ {+ result = append(result, FfiConverterHttpHeaderINSTANCE.Read(reader))+ }+ return result+}++func (c FfiConverterSequenceHttpHeader) Lower(value []HttpHeader) C.RustBuffer {+ return LowerIntoRustBuffer[[]HttpHeader](c, value)+}++func (c FfiConverterSequenceHttpHeader) LowerExternal(value []HttpHeader) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[[]HttpHeader](c, value))+}++func (c FfiConverterSequenceHttpHeader) Write(writer io.Writer, value []HttpHeader) {+ if len(value) > math.MaxInt32 {+ panic("[]HttpHeader is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ for _, item := range value {+ FfiConverterHttpHeaderINSTANCE.Write(writer, item)+ }+}++type FfiDestroyerSequenceHttpHeader struct{}++func (FfiDestroyerSequenceHttpHeader) Destroy(sequence []HttpHeader) {+ for _, value := range sequence {+ FfiDestroyerHttpHeader{}.Destroy(value)+ }+}++type FfiConverterSequencePool struct{}++var FfiConverterSequencePoolINSTANCE = FfiConverterSequencePool{}++func (c FfiConverterSequencePool) Lift(rb RustBufferI) []Pool {+ return LiftFromRustBuffer[[]Pool](c, rb)+}++func (c FfiConverterSequencePool) Read(reader io.Reader) []Pool {+ length := readInt32(reader)+ if length == 0 {+ return nil+ }+ result := make([]Pool, 0, length)+ for i := int32(0); i < length; i++ {+ result = append(result, FfiConverterPoolINSTANCE.Read(reader))+ }+ return result+}++func (c FfiConverterSequencePool) Lower(value []Pool) C.RustBuffer {+ return LowerIntoRustBuffer[[]Pool](c, value)+}++func (c FfiConverterSequencePool) LowerExternal(value []Pool) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[[]Pool](c, value))+}++func (c FfiConverterSequencePool) Write(writer io.Writer, value []Pool) {+ if len(value) > math.MaxInt32 {+ panic("[]Pool is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ for _, item := range value {+ FfiConverterPoolINSTANCE.Write(writer, item)+ }+}++type FfiDestroyerSequencePool struct{}++func (FfiDestroyerSequencePool) Destroy(sequence []Pool) {+ for _, value := range sequence {+ FfiDestroyerPool{}.Destroy(value)+ }+}++type FfiConverterMapStringString struct{}++var FfiConverterMapStringStringINSTANCE = FfiConverterMapStringString{}++func (c FfiConverterMapStringString) Lift(rb RustBufferI) map[string]string {+ return LiftFromRustBuffer[map[string]string](c, rb)+}++func (_ FfiConverterMapStringString) Read(reader io.Reader) map[string]string {+ result := make(map[string]string)+ length := readInt32(reader)+ for i := int32(0); i < length; i++ {+ key := FfiConverterStringINSTANCE.Read(reader)+ value := FfiConverterStringINSTANCE.Read(reader)+ result[key] = value+ }+ return result+}++func (c FfiConverterMapStringString) Lower(value map[string]string) C.RustBuffer {+ return LowerIntoRustBuffer[map[string]string](c, value)+}++func (c FfiConverterMapStringString) LowerExternal(value map[string]string) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[map[string]string](c, value))+}++func (_ FfiConverterMapStringString) Write(writer io.Writer, mapValue map[string]string) {+ if len(mapValue) > math.MaxInt32 {+ panic("map[string]string is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(mapValue)))+ for key, value := range mapValue {+ FfiConverterStringINSTANCE.Write(writer, key)+ FfiConverterStringINSTANCE.Write(writer, value)+ }+}++type FfiDestroyerMapStringString struct{}++func (_ FfiDestroyerMapStringString) Destroy(mapValue map[string]string) {+ for key, value := range mapValue {+ FfiDestroyerString{}.Destroy(key)+ FfiDestroyerString{}.Destroy(value)+ }+}++const (+ uniffiRustFuturePollReady int8 = 0+ uniffiRustFuturePollMaybeReady int8 = 1+)++type rustFuturePollFunc func(C.uint64_t, C.UniffiRustFutureContinuationCallback, C.uint64_t)+type rustFutureCompleteFunc[T any] func(C.uint64_t, *C.RustCallStatus) T+type rustFutureFreeFunc func(C.uint64_t)++//export cyclops_sdk_uniffiFutureContinuationCallback+func cyclops_sdk_uniffiFutureContinuationCallback(data C.uint64_t, pollResult C.int8_t) {+ h := cgo.Handle(uintptr(data))+ waiter := h.Value().(chan int8)+ waiter <- int8(pollResult)+}++func uniffiRustCallAsync[E any, T any, F any](+ errConverter BufReader[E],+ completeFunc rustFutureCompleteFunc[F],+ liftFunc func(F) T,+ rustFuture C.uint64_t,+ pollFunc rustFuturePollFunc,+ freeFunc rustFutureFreeFunc,+) (T, E) {+ defer freeFunc(rustFuture)++ pollResult := int8(-1)+ waiter := make(chan int8, 1)++ chanHandle := cgo.NewHandle(waiter)+ defer chanHandle.Delete()++ for pollResult != uniffiRustFuturePollReady {+ pollFunc(+ rustFuture,+ (C.UniffiRustFutureContinuationCallback)(C.cyclops_sdk_uniffiFutureContinuationCallback),+ C.uint64_t(chanHandle),+ )+ pollResult = <-waiter+ }++ var goValue T+ ffiValue, err := rustCallWithError(errConverter, func(status *C.RustCallStatus) F {+ return completeFunc(rustFuture, status)+ })+ if value := reflect.ValueOf(err); value.IsValid() && !value.IsZero() {+ return goValue, err+ }+ return liftFunc(ffiValue), err+}++//export cyclops_sdk_uniffiFreeGorutine+func cyclops_sdk_uniffiFreeGorutine(data C.uint64_t) {+ handle := cgo.Handle(uintptr(data))+ defer handle.Delete()++ guard := handle.Value().(chan struct{})+ guard <- struct{}{}+}diff --git a/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk/cyclops_sdk.h b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk/cyclops_sdk.hnew file mode 100644index 0000000000..482c861925--- /dev/null+++ b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk/cyclops_sdk.h@@ -0,0 +1,857 @@+++// This file was autogenerated by some hot garbage in the `uniffi` crate.+// Trust me, you don't want to mess with it!++++#include <stdbool.h>+#include <stdint.h>++// The following structs are used to implement the lowest level+// of the FFI, and thus useful to multiple uniffied crates.+// We ensure they are declared exactly once, with a header guard, UNIFFI_SHARED_H.+#ifdef UNIFFI_SHARED_H+ // We also try to prevent mixing versions of shared uniffi header structs.+ // If you add anything to the #else block, you must increment the version suffix in UNIFFI_SHARED_HEADER_V6+ #ifndef UNIFFI_SHARED_HEADER_V6+ #error Combining helper code from multiple versions of uniffi is not supported+ #endif // ndef UNIFFI_SHARED_HEADER_V6+#else+#define UNIFFI_SHARED_H+#define UNIFFI_SHARED_HEADER_V6+// ⚠️ Attention: If you change this #else block (ending in `#endif // def UNIFFI_SHARED_H`) you *must* ⚠️+// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V6 in this file. ⚠️++typedef struct RustBuffer {+ uint64_t capacity;+ uint64_t len;+ uint8_t *data;+} RustBuffer;++typedef struct ForeignBytes {+ int32_t len;+ const uint8_t *data;+} ForeignBytes;++// Error definitions+typedef struct RustCallStatus {+ int8_t code;+ RustBuffer errorBuf;+} RustCallStatus;++#endif // UNIFFI_SHARED_H+++#ifndef UNIFFI_FFIDEF_RUST_FUTURE_CONTINUATION_CALLBACK+#define UNIFFI_FFIDEF_RUST_FUTURE_CONTINUATION_CALLBACK+typedef void (*UniffiRustFutureContinuationCallback)(uint64_t data, int8_t poll_result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiRustFutureContinuationCallback(+ UniffiRustFutureContinuationCallback cb, uint64_t data, int8_t poll_result)+{+ return cb(data, poll_result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_DROPPED_CALLBACK+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_DROPPED_CALLBACK+typedef void (*UniffiForeignFutureDroppedCallback)(uint64_t handle);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureDroppedCallback(+ UniffiForeignFutureDroppedCallback cb, uint64_t handle)+{+ return cb(handle);+}+++#endif+#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_FREE+#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_FREE+typedef void (*UniffiCallbackInterfaceFree)(uint64_t handle);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiCallbackInterfaceFree(+ UniffiCallbackInterfaceFree cb, uint64_t handle)+{+ return cb(handle);+}+++#endif+#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_CLONE+#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_CLONE+typedef uint64_t (*UniffiCallbackInterfaceClone)(uint64_t handle);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static uint64_t call_UniffiCallbackInterfaceClone(+ UniffiCallbackInterfaceClone cb, uint64_t handle)+{+ return cb(handle);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_DROPPED_CALLBACK_STRUCT+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_DROPPED_CALLBACK_STRUCT+typedef struct UniffiForeignFutureDroppedCallbackStruct {+ uint64_t handle;+ UniffiForeignFutureDroppedCallback free;+} UniffiForeignFutureDroppedCallbackStruct;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U8+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U8+typedef struct UniffiForeignFutureResultU8 {+ uint8_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultU8;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U8+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U8+typedef void (*UniffiForeignFutureCompleteU8)(uint64_t callback_data, UniffiForeignFutureResultU8 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteU8(+ UniffiForeignFutureCompleteU8 cb, uint64_t callback_data, UniffiForeignFutureResultU8 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I8+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I8+typedef struct UniffiForeignFutureResultI8 {+ int8_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultI8;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I8+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I8+typedef void (*UniffiForeignFutureCompleteI8)(uint64_t callback_data, UniffiForeignFutureResultI8 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteI8(+ UniffiForeignFutureCompleteI8 cb, uint64_t callback_data, UniffiForeignFutureResultI8 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U16+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U16+typedef struct UniffiForeignFutureResultU16 {+ uint16_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultU16;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U16+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U16+typedef void (*UniffiForeignFutureCompleteU16)(uint64_t callback_data, UniffiForeignFutureResultU16 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteU16(+ UniffiForeignFutureCompleteU16 cb, uint64_t callback_data, UniffiForeignFutureResultU16 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I16+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I16+typedef struct UniffiForeignFutureResultI16 {+ int16_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultI16;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I16+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I16+typedef void (*UniffiForeignFutureCompleteI16)(uint64_t callback_data, UniffiForeignFutureResultI16 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteI16(+ UniffiForeignFutureCompleteI16 cb, uint64_t callback_data, UniffiForeignFutureResultI16 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U32+typedef struct UniffiForeignFutureResultU32 {+ uint32_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultU32;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U32+typedef void (*UniffiForeignFutureCompleteU32)(uint64_t callback_data, UniffiForeignFutureResultU32 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteU32(+ UniffiForeignFutureCompleteU32 cb, uint64_t callback_data, UniffiForeignFutureResultU32 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I32+typedef struct UniffiForeignFutureResultI32 {+ int32_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultI32;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I32+typedef void (*UniffiForeignFutureCompleteI32)(uint64_t callback_data, UniffiForeignFutureResultI32 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteI32(+ UniffiForeignFutureCompleteI32 cb, uint64_t callback_data, UniffiForeignFutureResultI32 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U64+typedef struct UniffiForeignFutureResultU64 {+ uint64_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultU64;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U64+typedef void (*UniffiForeignFutureCompleteU64)(uint64_t callback_data, UniffiForeignFutureResultU64 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteU64(+ UniffiForeignFutureCompleteU64 cb, uint64_t callback_data, UniffiForeignFutureResultU64 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I64+typedef struct UniffiForeignFutureResultI64 {+ int64_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultI64;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I64+typedef void (*UniffiForeignFutureCompleteI64)(uint64_t callback_data, UniffiForeignFutureResultI64 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteI64(+ UniffiForeignFutureCompleteI64 cb, uint64_t callback_data, UniffiForeignFutureResultI64 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_F32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_F32+typedef struct UniffiForeignFutureResultF32 {+ float returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultF32;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F32+typedef void (*UniffiForeignFutureCompleteF32)(uint64_t callback_data, UniffiForeignFutureResultF32 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteF32(+ UniffiForeignFutureCompleteF32 cb, uint64_t callback_data, UniffiForeignFutureResultF32 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_F64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_F64+typedef struct UniffiForeignFutureResultF64 {+ double returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultF64;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F64+typedef void (*UniffiForeignFutureCompleteF64)(uint64_t callback_data, UniffiForeignFutureResultF64 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteF64(+ UniffiForeignFutureCompleteF64 cb, uint64_t callback_data, UniffiForeignFutureResultF64 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_RUST_BUFFER+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_RUST_BUFFER+typedef struct UniffiForeignFutureResultRustBuffer {+ RustBuffer returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultRustBuffer;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER+typedef void (*UniffiForeignFutureCompleteRustBuffer)(uint64_t callback_data, UniffiForeignFutureResultRustBuffer result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteRustBuffer(+ UniffiForeignFutureCompleteRustBuffer cb, uint64_t callback_data, UniffiForeignFutureResultRustBuffer result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_VOID+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_VOID+typedef struct UniffiForeignFutureResultVoid {+ RustCallStatus callStatus;+} UniffiForeignFutureResultVoid;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_VOID+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_VOID+typedef void (*UniffiForeignFutureCompleteVoid)(uint64_t callback_data, UniffiForeignFutureResultVoid result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteVoid(+ UniffiForeignFutureCompleteVoid cb, uint64_t callback_data, UniffiForeignFutureResultVoid result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_HTTP_CLIENT_METHOD0+#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_HTTP_CLIENT_METHOD0+typedef void (*UniffiCallbackInterfaceHttpClientMethod0)(uint64_t uniffi_handle, RustBuffer request, UniffiForeignFutureCompleteRustBuffer uniffi_future_callback, uint64_t uniffi_callback_data, UniffiForeignFutureDroppedCallbackStruct* uniffi_out_dropped_callback);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiCallbackInterfaceHttpClientMethod0(+ UniffiCallbackInterfaceHttpClientMethod0 cb, uint64_t uniffi_handle, RustBuffer request, UniffiForeignFutureCompleteRustBuffer uniffi_future_callback, uint64_t uniffi_callback_data, UniffiForeignFutureDroppedCallbackStruct* uniffi_out_dropped_callback)+{+ return cb(uniffi_handle, request, uniffi_future_callback, uniffi_callback_data, uniffi_out_dropped_callback);+}+++#endif+#ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_HTTP_CLIENT+#define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_HTTP_CLIENT+typedef struct UniffiVTableCallbackInterfaceHttpClient {+ UniffiCallbackInterfaceFree uniffiFree;+ UniffiCallbackInterfaceClone uniffiClone;+ UniffiCallbackInterfaceHttpClientMethod0 execute;+} UniffiVTableCallbackInterfaceHttpClient;++#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CYCLOPSCLIENT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CYCLOPSCLIENT+uint64_t uniffi_cyclops_sdk_fn_clone_cyclopsclient(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CYCLOPSCLIENT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CYCLOPSCLIENT+void uniffi_cyclops_sdk_fn_free_cyclopsclient(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CYCLOPSCLIENT_CONNECT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CYCLOPSCLIENT_CONNECT+uint64_t uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(RustBuffer configuration, uint64_t http_client, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_CREATE_CLAIM+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_CREATE_CLAIM+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(uint64_t ptr, RustBuffer request+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_DELETE_CLAIM+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_DELETE_CLAIM+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(uint64_t ptr, RustBuffer claim+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_GET_CLAIM+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_GET_CLAIM+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(uint64_t ptr, RustBuffer claim+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_LIST_CLAIMS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_LIST_CLAIMS+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(uint64_t ptr, RustBuffer namespace+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_WAIT_CLAIM+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_WAIT_CLAIM+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(uint64_t ptr, RustBuffer claim+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_CREATE_POOL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_CREATE_POOL+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(uint64_t ptr, RustBuffer request+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_DELETE_POOL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_DELETE_POOL+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(uint64_t ptr, RustBuffer pool+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_GET_POOL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_GET_POOL+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(uint64_t ptr, RustBuffer pool+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_LIST_POOLS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_LIST_POOLS+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(uint64_t ptr, RustBuffer namespace+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_UPDATE_POOL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_UPDATE_POOL+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(uint64_t ptr, RustBuffer pool+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_SERVICE_REQUEST+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_CYCLOPSCLIENT_SERVICE_REQUEST+uint64_t uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(uint64_t ptr, RustBuffer sandbox, RustBuffer service, RustBuffer path, RustBuffer request+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_HTTPCLIENT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_HTTPCLIENT+uint64_t uniffi_cyclops_sdk_fn_clone_httpclient(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_HTTPCLIENT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_HTTPCLIENT+void uniffi_cyclops_sdk_fn_free_httpclient(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_INIT_CALLBACK_VTABLE_HTTPCLIENT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_INIT_CALLBACK_VTABLE_HTTPCLIENT+void uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(UniffiVTableCallbackInterfaceHttpClient* vtable+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_HTTPCLIENT_EXECUTE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_METHOD_HTTPCLIENT_EXECUTE+uint64_t uniffi_cyclops_sdk_fn_method_httpclient_execute(uint64_t ptr, RustBuffer request+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CYCLOPSCREDENTIALS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CLONE_CYCLOPSCREDENTIALS+uint64_t uniffi_cyclops_sdk_fn_clone_cyclopscredentials(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CYCLOPSCREDENTIALS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_FREE_CYCLOPSCREDENTIALS+void uniffi_cyclops_sdk_fn_free_cyclopscredentials(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CYCLOPSCREDENTIALS_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_FN_CONSTRUCTOR_CYCLOPSCREDENTIALS_NEW+uint64_t uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(RustBuffer client_id, RustBuffer client_secret, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUSTBUFFER_ALLOC+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUSTBUFFER_ALLOC+RustBuffer ffi_cyclops_sdk_rustbuffer_alloc(uint64_t size, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUSTBUFFER_FROM_BYTES+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUSTBUFFER_FROM_BYTES+RustBuffer ffi_cyclops_sdk_rustbuffer_from_bytes(ForeignBytes bytes, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUSTBUFFER_FREE+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUSTBUFFER_FREE+void ffi_cyclops_sdk_rustbuffer_free(RustBuffer buf, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUSTBUFFER_RESERVE+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUSTBUFFER_RESERVE+RustBuffer ffi_cyclops_sdk_rustbuffer_reserve(RustBuffer buf, uint64_t additional, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_U8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_U8+void ffi_cyclops_sdk_rust_future_poll_u8(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_U8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_U8+void ffi_cyclops_sdk_rust_future_cancel_u8(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_U8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_U8+void ffi_cyclops_sdk_rust_future_free_u8(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_U8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_U8+uint8_t ffi_cyclops_sdk_rust_future_complete_u8(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_I8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_I8+void ffi_cyclops_sdk_rust_future_poll_i8(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_I8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_I8+void ffi_cyclops_sdk_rust_future_cancel_i8(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_I8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_I8+void ffi_cyclops_sdk_rust_future_free_i8(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_I8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_I8+int8_t ffi_cyclops_sdk_rust_future_complete_i8(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_U16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_U16+void ffi_cyclops_sdk_rust_future_poll_u16(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_U16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_U16+void ffi_cyclops_sdk_rust_future_cancel_u16(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_U16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_U16+void ffi_cyclops_sdk_rust_future_free_u16(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_U16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_U16+uint16_t ffi_cyclops_sdk_rust_future_complete_u16(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_I16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_I16+void ffi_cyclops_sdk_rust_future_poll_i16(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_I16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_I16+void ffi_cyclops_sdk_rust_future_cancel_i16(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_I16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_I16+void ffi_cyclops_sdk_rust_future_free_i16(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_I16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_I16+int16_t ffi_cyclops_sdk_rust_future_complete_i16(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_U32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_U32+void ffi_cyclops_sdk_rust_future_poll_u32(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_U32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_U32+void ffi_cyclops_sdk_rust_future_cancel_u32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_U32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_U32+void ffi_cyclops_sdk_rust_future_free_u32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_U32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_U32+uint32_t ffi_cyclops_sdk_rust_future_complete_u32(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_I32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_I32+void ffi_cyclops_sdk_rust_future_poll_i32(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_I32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_I32+void ffi_cyclops_sdk_rust_future_cancel_i32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_I32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_I32+void ffi_cyclops_sdk_rust_future_free_i32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_I32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_I32+int32_t ffi_cyclops_sdk_rust_future_complete_i32(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_U64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_U64+void ffi_cyclops_sdk_rust_future_poll_u64(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_U64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_U64+void ffi_cyclops_sdk_rust_future_cancel_u64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_U64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_U64+void ffi_cyclops_sdk_rust_future_free_u64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_U64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_U64+uint64_t ffi_cyclops_sdk_rust_future_complete_u64(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_I64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_I64+void ffi_cyclops_sdk_rust_future_poll_i64(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_I64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_I64+void ffi_cyclops_sdk_rust_future_cancel_i64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_I64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_I64+void ffi_cyclops_sdk_rust_future_free_i64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_I64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_I64+int64_t ffi_cyclops_sdk_rust_future_complete_i64(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_F32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_F32+void ffi_cyclops_sdk_rust_future_poll_f32(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_F32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_F32+void ffi_cyclops_sdk_rust_future_cancel_f32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_F32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_F32+void ffi_cyclops_sdk_rust_future_free_f32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_F32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_F32+float ffi_cyclops_sdk_rust_future_complete_f32(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_F64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_F64+void ffi_cyclops_sdk_rust_future_poll_f64(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_F64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_F64+void ffi_cyclops_sdk_rust_future_cancel_f64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_F64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_F64+void ffi_cyclops_sdk_rust_future_free_f64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_F64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_F64+double ffi_cyclops_sdk_rust_future_complete_f64(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_RUST_BUFFER+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_RUST_BUFFER+void ffi_cyclops_sdk_rust_future_poll_rust_buffer(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_RUST_BUFFER+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_RUST_BUFFER+void ffi_cyclops_sdk_rust_future_cancel_rust_buffer(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_RUST_BUFFER+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_RUST_BUFFER+void ffi_cyclops_sdk_rust_future_free_rust_buffer(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_RUST_BUFFER+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_RUST_BUFFER+RustBuffer ffi_cyclops_sdk_rust_future_complete_rust_buffer(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_VOID+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_POLL_VOID+void ffi_cyclops_sdk_rust_future_poll_void(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_VOID+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_CANCEL_VOID+void ffi_cyclops_sdk_rust_future_cancel_void(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_VOID+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_FREE_VOID+void ffi_cyclops_sdk_rust_future_free_void(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_VOID+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_RUST_FUTURE_COMPLETE_VOID+void ffi_cyclops_sdk_rust_future_complete_void(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_CREATE_CLAIM+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_CREATE_CLAIM+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_DELETE_CLAIM+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_DELETE_CLAIM+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_GET_CLAIM+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_GET_CLAIM+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_LIST_CLAIMS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_LIST_CLAIMS+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_WAIT_CLAIM+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_WAIT_CLAIM+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_CREATE_POOL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_CREATE_POOL+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_DELETE_POOL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_DELETE_POOL+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_GET_POOL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_GET_POOL+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_LIST_POOLS+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_LIST_POOLS+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_UPDATE_POOL+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_UPDATE_POOL+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_SERVICE_REQUEST+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_CYCLOPSCLIENT_SERVICE_REQUEST+uint16_t uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_HTTPCLIENT_EXECUTE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_METHOD_HTTPCLIENT_EXECUTE+uint16_t uniffi_cyclops_sdk_checksum_method_httpclient_execute(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSCLIENT_CONNECT+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSCLIENT_CONNECT+uint16_t uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSCREDENTIALS_NEW+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_CHECKSUM_CONSTRUCTOR_CYCLOPSCREDENTIALS_NEW+uint16_t uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new(void++);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_UNIFFI_CONTRACT_VERSION+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_UNIFFI_CONTRACT_VERSION+uint32_t ffi_cyclops_sdk_uniffi_contract_version(void++);+#endif++ void cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientMethod0(uint64_t uniffi_handle, RustBuffer request, UniffiForeignFutureCompleteRustBuffer uniffi_future_callback, uint64_t uniffi_callback_data, UniffiForeignFutureDroppedCallbackStruct* uniffi_out_dropped_callback);+ void cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientFree(uint64_t handle);+uint64_t cyclops_sdk_transport_cgo_dispatchCallbackInterfaceHttpClientClone(uint64_t handle);++void cyclops_sdk_uniffiFutureContinuationCallback(uint64_t, int8_t);+void cyclops_sdk_uniffiFreeGorutine(uint64_t);diff --git a/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.go b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.gonew file mode 100644index 0000000000..1e6a0341b0--- /dev/null+++ b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.go@@ -0,0 +1,2868 @@+package cyclops_sdk_schema++// #include <cyclops_sdk_schema.h>+import "C"++import (+ "bytes"+ "encoding/binary"+ "fmt"+ "io"+ "math"+ "runtime"+ "sync/atomic"+ "unsafe"+)++// This is needed, because as of go 1.24+// type RustBuffer C.RustBuffer cannot have methods,+// RustBuffer is treated as non-local type+type GoRustBuffer struct {+ inner C.RustBuffer+}++type RustBufferI interface {+ AsReader() *bytes.Reader+ Free()+ ToGoBytes() []byte+ Data() unsafe.Pointer+ Len() uint64+ Capacity() uint64+}++// C.RustBuffer fields exposed as an interface so they can be accessed in different Go packages.+// See https://github.com/golang/go/issues/13467+type ExternalCRustBuffer interface {+ Data() unsafe.Pointer+ Len() uint64+ Capacity() uint64+}++func RustBufferFromC(b C.RustBuffer) ExternalCRustBuffer {+ return GoRustBuffer{+ inner: b,+ }+}++func CFromRustBuffer(b ExternalCRustBuffer) C.RustBuffer {+ return C.RustBuffer{+ capacity: C.uint64_t(b.Capacity()),+ len: C.uint64_t(b.Len()),+ data: (*C.uchar)(b.Data()),+ }+}++func RustBufferFromExternal(b ExternalCRustBuffer) GoRustBuffer {+ return GoRustBuffer{+ inner: C.RustBuffer{+ capacity: C.uint64_t(b.Capacity()),+ len: C.uint64_t(b.Len()),+ data: (*C.uchar)(b.Data()),+ },+ }+}++func (cb GoRustBuffer) Capacity() uint64 {+ return uint64(cb.inner.capacity)+}++func (cb GoRustBuffer) Len() uint64 {+ return uint64(cb.inner.len)+}++func (cb GoRustBuffer) Data() unsafe.Pointer {+ return unsafe.Pointer(cb.inner.data)+}++func (cb GoRustBuffer) AsReader() *bytes.Reader {+ b := unsafe.Slice((*byte)(cb.inner.data), C.uint64_t(cb.inner.len))+ return bytes.NewReader(b)+}++func (cb GoRustBuffer) Free() {+ rustCall(func(status *C.RustCallStatus) bool {+ C.ffi_cyclops_sdk_schema_rustbuffer_free(cb.inner, status)+ return false+ })+}++func (cb GoRustBuffer) ToGoBytes() []byte {+ return C.GoBytes(unsafe.Pointer(cb.inner.data), C.int(cb.inner.len))+}++func stringToRustBuffer(str string) C.RustBuffer {+ return bytesToRustBuffer([]byte(str))+}++func bytesToRustBuffer(b []byte) C.RustBuffer {+ if len(b) == 0 {+ return C.RustBuffer{}+ }+ // We can pass the pointer along here, as it is pinned+ // for the duration of this call+ foreign := C.ForeignBytes{+ len: C.int(len(b)),+ data: (*C.uchar)(unsafe.Pointer(&b[0])),+ }++ return rustCall(func(status *C.RustCallStatus) C.RustBuffer {+ return C.ffi_cyclops_sdk_schema_rustbuffer_from_bytes(foreign, status)+ })+}++type BufLifter[GoType any] interface {+ Lift(value RustBufferI) GoType+}++type BufLowerer[GoType any] interface {+ Lower(value GoType) C.RustBuffer+}++type BufReader[GoType any] interface {+ Read(reader io.Reader) GoType+}++type BufWriter[GoType any] interface {+ Write(writer io.Writer, value GoType)+}++func LowerIntoRustBuffer[GoType any](bufWriter BufWriter[GoType], value GoType) C.RustBuffer {+ // This might be not the most efficient way but it does not require knowing allocation size+ // beforehand+ var buffer bytes.Buffer+ bufWriter.Write(&buffer, value)++ bytes, err := io.ReadAll(&buffer)+ if err != nil {+ panic(fmt.Errorf("reading written data: %w", err))+ }+ return bytesToRustBuffer(bytes)+}++func LiftFromRustBuffer[GoType any](bufReader BufReader[GoType], rbuf RustBufferI) GoType {+ defer rbuf.Free()+ reader := rbuf.AsReader()+ item := bufReader.Read(reader)+ if reader.Len() > 0 {+ // TODO: Remove this+ leftover, _ := io.ReadAll(reader)+ panic(fmt.Errorf("Junk remaining in buffer after lifting: %s", string(leftover)))+ }+ return item+}++func rustCallWithError[E any, U any](converter BufReader[E], callback func(*C.RustCallStatus) U) (U, E) {+ var status C.RustCallStatus+ returnValue := callback(&status)+ err := checkCallStatus(converter, status)+ return returnValue, err+}++func checkCallStatus[E any](converter BufReader[E], status C.RustCallStatus) E {+ switch status.code {+ case 0:+ var zero E+ return zero+ case 1:+ return LiftFromRustBuffer(converter, GoRustBuffer{inner: status.errorBuf})+ case 2:+ // when the rust code sees a panic, it tries to construct a rustBuffer+ // with the message. but if that code panics, then it just sends back+ // an empty buffer.+ if status.errorBuf.len > 0 {+ panic(fmt.Errorf("%s", FfiConverterStringINSTANCE.Lift(GoRustBuffer{inner: status.errorBuf})))+ } else {+ panic(fmt.Errorf("Rust panicked while handling Rust panic"))+ }+ default:+ panic(fmt.Errorf("unknown status code: %d", status.code))+ }+}++func checkCallStatusUnknown(status C.RustCallStatus) error {+ switch status.code {+ case 0:+ return nil+ case 1:+ panic(fmt.Errorf("function not returning an error returned an error"))+ case 2:+ // when the rust code sees a panic, it tries to construct a C.RustBuffer+ // with the message. but if that code panics, then it just sends back+ // an empty buffer.+ if status.errorBuf.len > 0 {+ panic(fmt.Errorf("%s", FfiConverterStringINSTANCE.Lift(GoRustBuffer{+ inner: status.errorBuf,+ })))+ } else {+ panic(fmt.Errorf("Rust panicked while handling Rust panic"))+ }+ default:+ return fmt.Errorf("unknown status code: %d", status.code)+ }+}++func rustCall[U any](callback func(*C.RustCallStatus) U) U {+ returnValue, err := rustCallWithError[error](nil, callback)+ if err != nil {+ panic(err)+ }+ return returnValue+}++type NativeError interface {+ AsError() error+}++func writeInt8(writer io.Writer, value int8) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeUint8(writer io.Writer, value uint8) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeInt16(writer io.Writer, value int16) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeUint16(writer io.Writer, value uint16) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeInt32(writer io.Writer, value int32) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeUint32(writer io.Writer, value uint32) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeInt64(writer io.Writer, value int64) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeUint64(writer io.Writer, value uint64) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeFloat32(writer io.Writer, value float32) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func writeFloat64(writer io.Writer, value float64) {+ if err := binary.Write(writer, binary.BigEndian, value); err != nil {+ panic(err)+ }+}++func readInt8(reader io.Reader) int8 {+ var result int8+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readUint8(reader io.Reader) uint8 {+ var result uint8+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readInt16(reader io.Reader) int16 {+ var result int16+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readUint16(reader io.Reader) uint16 {+ var result uint16+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readInt32(reader io.Reader) int32 {+ var result int32+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readUint32(reader io.Reader) uint32 {+ var result uint32+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readInt64(reader io.Reader) int64 {+ var result int64+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readUint64(reader io.Reader) uint64 {+ var result uint64+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readFloat32(reader io.Reader) float32 {+ var result float32+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func readFloat64(reader io.Reader) float64 {+ var result float64+ if err := binary.Read(reader, binary.BigEndian, &result); err != nil {+ panic(err)+ }+ return result+}++func init() {++ uniffiCheckChecksums()+}++func uniffiCheckChecksums() {+ // Get the bindings contract version from our ComponentInterface+ bindingsContractVersion := 30+ // Get the scaffolding contract version by calling the into the dylib+ scaffoldingContractVersion := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint32_t {+ return C.ffi_cyclops_sdk_schema_uniffi_contract_version()+ })+ if bindingsContractVersion != int(scaffoldingContractVersion) {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk_schema: UniFFI contract version mismatch")+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json()+ })+ if checksum != 8252 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk_schema: uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json: UniFFI API checksum mismatch")+ }+ }+ {+ checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {+ return C.uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json()+ })+ if checksum != 24064 {+ // If this happens try cleaning and rebuilding your project+ panic("cyclops_sdk_schema: uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json: UniFFI API checksum mismatch")+ }+ }+}++type FfiConverterUint16 struct{}++var FfiConverterUint16INSTANCE = FfiConverterUint16{}++func (FfiConverterUint16) Lower(value uint16) C.uint16_t {+ return C.uint16_t(value)+}++func (FfiConverterUint16) Write(writer io.Writer, value uint16) {+ writeUint16(writer, value)+}++func (FfiConverterUint16) Lift(value C.uint16_t) uint16 {+ return uint16(value)+}++func (FfiConverterUint16) Read(reader io.Reader) uint16 {+ return readUint16(reader)+}++type FfiDestroyerUint16 struct{}++func (FfiDestroyerUint16) Destroy(_ uint16) {}++type FfiConverterUint32 struct{}++var FfiConverterUint32INSTANCE = FfiConverterUint32{}++func (FfiConverterUint32) Lower(value uint32) C.uint32_t {+ return C.uint32_t(value)+}++func (FfiConverterUint32) Write(writer io.Writer, value uint32) {+ writeUint32(writer, value)+}++func (FfiConverterUint32) Lift(value C.uint32_t) uint32 {+ return uint32(value)+}++func (FfiConverterUint32) Read(reader io.Reader) uint32 {+ return readUint32(reader)+}++type FfiDestroyerUint32 struct{}++func (FfiDestroyerUint32) Destroy(_ uint32) {}++type FfiConverterUint64 struct{}++var FfiConverterUint64INSTANCE = FfiConverterUint64{}++func (FfiConverterUint64) Lower(value uint64) C.uint64_t {+ return C.uint64_t(value)+}++func (FfiConverterUint64) Write(writer io.Writer, value uint64) {+ writeUint64(writer, value)+}++func (FfiConverterUint64) Lift(value C.uint64_t) uint64 {+ return uint64(value)+}++func (FfiConverterUint64) Read(reader io.Reader) uint64 {+ return readUint64(reader)+}++type FfiDestroyerUint64 struct{}++func (FfiDestroyerUint64) Destroy(_ uint64) {}++type FfiConverterBool struct{}++var FfiConverterBoolINSTANCE = FfiConverterBool{}++func (FfiConverterBool) Lower(value bool) C.int8_t {+ if value {+ return C.int8_t(1)+ }+ return C.int8_t(0)+}++func (FfiConverterBool) Write(writer io.Writer, value bool) {+ if value {+ writeInt8(writer, 1)+ } else {+ writeInt8(writer, 0)+ }+}++func (FfiConverterBool) Lift(value C.int8_t) bool {+ return value != 0+}++func (FfiConverterBool) Read(reader io.Reader) bool {+ return readInt8(reader) != 0+}++type FfiDestroyerBool struct{}++func (FfiDestroyerBool) Destroy(_ bool) {}++type FfiConverterString struct{}++var FfiConverterStringINSTANCE = FfiConverterString{}++func (FfiConverterString) Lift(rb RustBufferI) string {+ defer rb.Free()+ reader := rb.AsReader()+ b, err := io.ReadAll(reader)+ if err != nil {+ panic(fmt.Errorf("reading reader: %w", err))+ }+ return string(b)+}++func (FfiConverterString) Read(reader io.Reader) string {+ length := readInt32(reader)+ buffer := make([]byte, length)+ read_length, err := reader.Read(buffer)+ if err != nil && err != io.EOF {+ panic(err)+ }+ if read_length != int(length) {+ panic(fmt.Errorf("bad read length when reading string, expected %d, read %d", length, read_length))+ }+ return string(buffer)+}++func (FfiConverterString) Lower(value string) C.RustBuffer {+ return stringToRustBuffer(value)+}++func (c FfiConverterString) LowerExternal(value string) ExternalCRustBuffer {+ return RustBufferFromC(stringToRustBuffer(value))+}++func (FfiConverterString) Write(writer io.Writer, value string) {+ if len(value) > math.MaxInt32 {+ panic("String is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ write_length, err := io.WriteString(writer, value)+ if err != nil {+ panic(err)+ }+ if write_length != len(value) {+ panic(fmt.Errorf("bad write length when writing string, expected %d, written %d", len(value), write_length))+ }+}++type FfiDestroyerString struct{}++func (FfiDestroyerString) Destroy(_ string) {}++// Below is an implementation of synchronization requirements outlined in the link.+// https://github.com/mozilla/uniffi-rs/blob/0dc031132d9493ca812c3af6e7dd60ad2ea95bf0/uniffi_bindgen/src/bindings/kotlin/templates/ObjectRuntime.kt#L31++type FfiObject struct {+ handle C.uint64_t+ callCounter atomic.Int64+ cloneFunction func(C.uint64_t, *C.RustCallStatus) C.uint64_t+ freeFunction func(C.uint64_t, *C.RustCallStatus)+ destroyed atomic.Bool+}++func newFfiObject(+ handle C.uint64_t,+ cloneFunction func(C.uint64_t, *C.RustCallStatus) C.uint64_t,+ freeFunction func(C.uint64_t, *C.RustCallStatus),+) FfiObject {+ return FfiObject{+ handle: handle,+ cloneFunction: cloneFunction,+ freeFunction: freeFunction,+ }+}++func (ffiObject *FfiObject) incrementPointer(debugName string) C.uint64_t {+ for {+ counter := ffiObject.callCounter.Load()+ if counter <= -1 {+ panic(fmt.Errorf("%v object has already been destroyed", debugName))+ }+ if counter == math.MaxInt64 {+ panic(fmt.Errorf("%v object call counter would overflow", debugName))+ }+ if ffiObject.callCounter.CompareAndSwap(counter, counter+1) {+ break+ }+ }++ return rustCall(func(status *C.RustCallStatus) C.uint64_t {+ return ffiObject.cloneFunction(ffiObject.handle, status)+ })+}++func (ffiObject *FfiObject) decrementPointer() {+ if ffiObject.callCounter.Add(-1) == -1 {+ ffiObject.freeRustArcPtr()+ }+}++func (ffiObject *FfiObject) destroy() {+ if ffiObject.destroyed.CompareAndSwap(false, true) {+ if ffiObject.callCounter.Add(-1) == -1 {+ ffiObject.freeRustArcPtr()+ }+ }+}++func (ffiObject *FfiObject) freeRustArcPtr() {+ if ffiObject.handle == 0 {+ return+ }+ rustCall(func(status *C.RustCallStatus) int32 {+ ffiObject.freeFunction(ffiObject.handle, status)+ return 0+ })+}++type PreservedJsonInterface interface {+ ToJson() string+}+type PreservedJson struct {+ ffiObject FfiObject+}++func PreservedJsonFromJson(value string) (*PreservedJson, error) {+ _uniffiRV, _uniffiErr := rustCallWithError[*JsonValueError](FfiConverterJsonValueError{}, func(_uniffiStatus *C.RustCallStatus) C.uint64_t {+ return C.uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(FfiConverterStringINSTANCE.Lower(value), _uniffiStatus)+ })+ if _uniffiErr != nil {+ var _uniffiDefaultValue *PreservedJson+ return _uniffiDefaultValue, _uniffiErr+ } else {+ return FfiConverterPreservedJsonINSTANCE.Lift(_uniffiRV), nil+ }+}++func (_self *PreservedJson) ToJson() string {+ _pointer := _self.ffiObject.incrementPointer("*PreservedJson")+ defer _self.ffiObject.decrementPointer()+ return FfiConverterStringINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) RustBufferI {+ return GoRustBuffer{+ inner: C.uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json(+ _pointer, _uniffiStatus),+ }+ }))+}+func (object *PreservedJson) Destroy() {+ runtime.SetFinalizer(object, nil)+ object.ffiObject.destroy()+}++type FfiConverterPreservedJson struct{}++var FfiConverterPreservedJsonINSTANCE = FfiConverterPreservedJson{}++func (c FfiConverterPreservedJson) Lift(handle C.uint64_t) *PreservedJson {+ result := &PreservedJson{+ newFfiObject(+ handle,+ func(handle C.uint64_t, status *C.RustCallStatus) C.uint64_t {+ return C.uniffi_cyclops_sdk_schema_fn_clone_preservedjson(handle, status)+ },+ func(handle C.uint64_t, status *C.RustCallStatus) {+ C.uniffi_cyclops_sdk_schema_fn_free_preservedjson(handle, status)+ },+ ),+ }+ runtime.SetFinalizer(result, (*PreservedJson).Destroy)+ return result+}++func (c FfiConverterPreservedJson) Read(reader io.Reader) *PreservedJson {+ return c.Lift(C.uint64_t(readUint64(reader)))+}++func (c FfiConverterPreservedJson) Lower(value *PreservedJson) C.uint64_t {+ // TODO: this is bad - all synchronization from ObjectRuntime.go is discarded here,+ // because the handle will be decremented immediately after this function returns,+ // and someone will be left holding onto a non-locked handle.+ handle := value.ffiObject.incrementPointer("*PreservedJson")+ defer value.ffiObject.decrementPointer()+ return handle+}++func (c FfiConverterPreservedJson) Write(writer io.Writer, value *PreservedJson) {+ writeUint64(writer, uint64(c.Lower(value)))+}++func LiftFromExternalPreservedJson(handle uint64) *PreservedJson {+ return FfiConverterPreservedJsonINSTANCE.Lift(C.uint64_t(handle))+}++func LowerToExternalPreservedJson(value *PreservedJson) uint64 {+ return uint64(FfiConverterPreservedJsonINSTANCE.Lower(value))+}++type FfiDestroyerPreservedJson struct{}++func (_ FfiDestroyerPreservedJson) Destroy(value *PreservedJson) {+ value.Destroy()+}++type ClaimLifecycle struct {+ ShutdownTime *string+ ShutdownPolicy *string+ AutoRenew *bool+}++func (r *ClaimLifecycle) Destroy() {+ FfiDestroyerOptionalString{}.Destroy(r.ShutdownTime)+ FfiDestroyerOptionalString{}.Destroy(r.ShutdownPolicy)+ FfiDestroyerOptionalBool{}.Destroy(r.AutoRenew)+}++type FfiConverterClaimLifecycle struct{}++var FfiConverterClaimLifecycleINSTANCE = FfiConverterClaimLifecycle{}++func (c FfiConverterClaimLifecycle) Lift(rb RustBufferI) ClaimLifecycle {+ return LiftFromRustBuffer[ClaimLifecycle](c, rb)+}++func (c FfiConverterClaimLifecycle) Read(reader io.Reader) ClaimLifecycle {+ return ClaimLifecycle{+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalBoolINSTANCE.Read(reader),+ }+}++func (c FfiConverterClaimLifecycle) Lower(value ClaimLifecycle) C.RustBuffer {+ return LowerIntoRustBuffer[ClaimLifecycle](c, value)+}++func (c FfiConverterClaimLifecycle) LowerExternal(value ClaimLifecycle) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[ClaimLifecycle](c, value))+}++func (c FfiConverterClaimLifecycle) Write(writer io.Writer, value ClaimLifecycle) {+ FfiConverterOptionalStringINSTANCE.Write(writer, value.ShutdownTime)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.ShutdownPolicy)+ FfiConverterOptionalBoolINSTANCE.Write(writer, value.AutoRenew)+}++type FfiDestroyerClaimLifecycle struct{}++func (_ FfiDestroyerClaimLifecycle) Destroy(value ClaimLifecycle) {+ value.Destroy()+}++type ClaimSpec struct {+ SandboxTemplateRef SandboxTemplateRef+ Warmpool *string+ BindDeadline *uint32+ Lifecycle *ClaimLifecycle+}++func (r *ClaimSpec) Destroy() {+ FfiDestroyerSandboxTemplateRef{}.Destroy(r.SandboxTemplateRef)+ FfiDestroyerOptionalString{}.Destroy(r.Warmpool)+ FfiDestroyerOptionalUint32{}.Destroy(r.BindDeadline)+ FfiDestroyerOptionalClaimLifecycle{}.Destroy(r.Lifecycle)+}++type FfiConverterClaimSpec struct{}++var FfiConverterClaimSpecINSTANCE = FfiConverterClaimSpec{}++func (c FfiConverterClaimSpec) Lift(rb RustBufferI) ClaimSpec {+ return LiftFromRustBuffer[ClaimSpec](c, rb)+}++func (c FfiConverterClaimSpec) Read(reader io.Reader) ClaimSpec {+ return ClaimSpec{+ FfiConverterSandboxTemplateRefINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ FfiConverterOptionalClaimLifecycleINSTANCE.Read(reader),+ }+}++func (c FfiConverterClaimSpec) Lower(value ClaimSpec) C.RustBuffer {+ return LowerIntoRustBuffer[ClaimSpec](c, value)+}++func (c FfiConverterClaimSpec) LowerExternal(value ClaimSpec) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[ClaimSpec](c, value))+}++func (c FfiConverterClaimSpec) Write(writer io.Writer, value ClaimSpec) {+ FfiConverterSandboxTemplateRefINSTANCE.Write(writer, value.SandboxTemplateRef)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Warmpool)+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.BindDeadline)+ FfiConverterOptionalClaimLifecycleINSTANCE.Write(writer, value.Lifecycle)+}++type FfiDestroyerClaimSpec struct{}++func (_ FfiDestroyerClaimSpec) Destroy(value ClaimSpec) {+ value.Destroy()+}++type OsGymSandboxClaimCondition struct {+ Type *string+ Status *string+ Reason *string+ Message *string+ LastTransitionTime *string+}++func (r *OsGymSandboxClaimCondition) Destroy() {+ FfiDestroyerOptionalString{}.Destroy(r.Type)+ FfiDestroyerOptionalString{}.Destroy(r.Status)+ FfiDestroyerOptionalString{}.Destroy(r.Reason)+ FfiDestroyerOptionalString{}.Destroy(r.Message)+ FfiDestroyerOptionalString{}.Destroy(r.LastTransitionTime)+}++type FfiConverterOsGymSandboxClaimCondition struct{}++var FfiConverterOsGymSandboxClaimConditionINSTANCE = FfiConverterOsGymSandboxClaimCondition{}++func (c FfiConverterOsGymSandboxClaimCondition) Lift(rb RustBufferI) OsGymSandboxClaimCondition {+ return LiftFromRustBuffer[OsGymSandboxClaimCondition](c, rb)+}++func (c FfiConverterOsGymSandboxClaimCondition) Read(reader io.Reader) OsGymSandboxClaimCondition {+ return OsGymSandboxClaimCondition{+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterOsGymSandboxClaimCondition) Lower(value OsGymSandboxClaimCondition) C.RustBuffer {+ return LowerIntoRustBuffer[OsGymSandboxClaimCondition](c, value)+}++func (c FfiConverterOsGymSandboxClaimCondition) LowerExternal(value OsGymSandboxClaimCondition) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[OsGymSandboxClaimCondition](c, value))+}++func (c FfiConverterOsGymSandboxClaimCondition) Write(writer io.Writer, value OsGymSandboxClaimCondition) {+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Type)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Status)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Reason)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Message)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.LastTransitionTime)+}++type FfiDestroyerOsGymSandboxClaimCondition struct{}++func (_ FfiDestroyerOsGymSandboxClaimCondition) Destroy(value OsGymSandboxClaimCondition) {+ value.Destroy()+}++type OsGymSandboxClaimSandbox struct {+ Name *string+ Service *string+}++func (r *OsGymSandboxClaimSandbox) Destroy() {+ FfiDestroyerOptionalString{}.Destroy(r.Name)+ FfiDestroyerOptionalString{}.Destroy(r.Service)+}++type FfiConverterOsGymSandboxClaimSandbox struct{}++var FfiConverterOsGymSandboxClaimSandboxINSTANCE = FfiConverterOsGymSandboxClaimSandbox{}++func (c FfiConverterOsGymSandboxClaimSandbox) Lift(rb RustBufferI) OsGymSandboxClaimSandbox {+ return LiftFromRustBuffer[OsGymSandboxClaimSandbox](c, rb)+}++func (c FfiConverterOsGymSandboxClaimSandbox) Read(reader io.Reader) OsGymSandboxClaimSandbox {+ return OsGymSandboxClaimSandbox{+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterOsGymSandboxClaimSandbox) Lower(value OsGymSandboxClaimSandbox) C.RustBuffer {+ return LowerIntoRustBuffer[OsGymSandboxClaimSandbox](c, value)+}++func (c FfiConverterOsGymSandboxClaimSandbox) LowerExternal(value OsGymSandboxClaimSandbox) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[OsGymSandboxClaimSandbox](c, value))+}++func (c FfiConverterOsGymSandboxClaimSandbox) Write(writer io.Writer, value OsGymSandboxClaimSandbox) {+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Name)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Service)+}++type FfiDestroyerOsGymSandboxClaimSandbox struct{}++func (_ FfiDestroyerOsGymSandboxClaimSandbox) Destroy(value OsGymSandboxClaimSandbox) {+ value.Destroy()+}++type OsGymSandboxClaimStatus struct {+ Phase *string+ Conditions *[]OsGymSandboxClaimCondition+ Sandbox *OsGymSandboxClaimSandbox+}++func (r *OsGymSandboxClaimStatus) Destroy() {+ FfiDestroyerOptionalString{}.Destroy(r.Phase)+ FfiDestroyerOptionalSequenceOsGymSandboxClaimCondition{}.Destroy(r.Conditions)+ FfiDestroyerOptionalOsGymSandboxClaimSandbox{}.Destroy(r.Sandbox)+}++type FfiConverterOsGymSandboxClaimStatus struct{}++var FfiConverterOsGymSandboxClaimStatusINSTANCE = FfiConverterOsGymSandboxClaimStatus{}++func (c FfiConverterOsGymSandboxClaimStatus) Lift(rb RustBufferI) OsGymSandboxClaimStatus {+ return LiftFromRustBuffer[OsGymSandboxClaimStatus](c, rb)+}++func (c FfiConverterOsGymSandboxClaimStatus) Read(reader io.Reader) OsGymSandboxClaimStatus {+ return OsGymSandboxClaimStatus{+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalSequenceOsGymSandboxClaimConditionINSTANCE.Read(reader),+ FfiConverterOptionalOsGymSandboxClaimSandboxINSTANCE.Read(reader),+ }+}++func (c FfiConverterOsGymSandboxClaimStatus) Lower(value OsGymSandboxClaimStatus) C.RustBuffer {+ return LowerIntoRustBuffer[OsGymSandboxClaimStatus](c, value)+}++func (c FfiConverterOsGymSandboxClaimStatus) LowerExternal(value OsGymSandboxClaimStatus) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[OsGymSandboxClaimStatus](c, value))+}++func (c FfiConverterOsGymSandboxClaimStatus) Write(writer io.Writer, value OsGymSandboxClaimStatus) {+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Phase)+ FfiConverterOptionalSequenceOsGymSandboxClaimConditionINSTANCE.Write(writer, value.Conditions)+ FfiConverterOptionalOsGymSandboxClaimSandboxINSTANCE.Write(writer, value.Sandbox)+}++type FfiDestroyerOsGymSandboxClaimStatus struct{}++func (_ FfiDestroyerOsGymSandboxClaimStatus) Destroy(value OsGymSandboxClaimStatus) {+ value.Destroy()+}++type OsGymSandboxSpec struct {+ VmTemplate VmTemplate+}++func (r *OsGymSandboxSpec) Destroy() {+ FfiDestroyerVmTemplate{}.Destroy(r.VmTemplate)+}++type FfiConverterOsGymSandboxSpec struct{}++var FfiConverterOsGymSandboxSpecINSTANCE = FfiConverterOsGymSandboxSpec{}++func (c FfiConverterOsGymSandboxSpec) Lift(rb RustBufferI) OsGymSandboxSpec {+ return LiftFromRustBuffer[OsGymSandboxSpec](c, rb)+}++func (c FfiConverterOsGymSandboxSpec) Read(reader io.Reader) OsGymSandboxSpec {+ return OsGymSandboxSpec{+ FfiConverterVmTemplateINSTANCE.Read(reader),+ }+}++func (c FfiConverterOsGymSandboxSpec) Lower(value OsGymSandboxSpec) C.RustBuffer {+ return LowerIntoRustBuffer[OsGymSandboxSpec](c, value)+}++func (c FfiConverterOsGymSandboxSpec) LowerExternal(value OsGymSandboxSpec) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[OsGymSandboxSpec](c, value))+}++func (c FfiConverterOsGymSandboxSpec) Write(writer io.Writer, value OsGymSandboxSpec) {+ FfiConverterVmTemplateINSTANCE.Write(writer, value.VmTemplate)+}++type FfiDestroyerOsGymSandboxSpec struct{}++func (_ FfiDestroyerOsGymSandboxSpec) Destroy(value OsGymSandboxSpec) {+ value.Destroy()+}++type OsGymSandboxStatus struct {+ Phase *string+ Runtime *string+ Ready *bool+ VmName *string+ Service *string+ Message *string+ ResetIssuedAt *string+ ResetVmiUid *string+}++func (r *OsGymSandboxStatus) Destroy() {+ FfiDestroyerOptionalString{}.Destroy(r.Phase)+ FfiDestroyerOptionalString{}.Destroy(r.Runtime)+ FfiDestroyerOptionalBool{}.Destroy(r.Ready)+ FfiDestroyerOptionalString{}.Destroy(r.VmName)+ FfiDestroyerOptionalString{}.Destroy(r.Service)+ FfiDestroyerOptionalString{}.Destroy(r.Message)+ FfiDestroyerOptionalString{}.Destroy(r.ResetIssuedAt)+ FfiDestroyerOptionalString{}.Destroy(r.ResetVmiUid)+}++type FfiConverterOsGymSandboxStatus struct{}++var FfiConverterOsGymSandboxStatusINSTANCE = FfiConverterOsGymSandboxStatus{}++func (c FfiConverterOsGymSandboxStatus) Lift(rb RustBufferI) OsGymSandboxStatus {+ return LiftFromRustBuffer[OsGymSandboxStatus](c, rb)+}++func (c FfiConverterOsGymSandboxStatus) Read(reader io.Reader) OsGymSandboxStatus {+ return OsGymSandboxStatus{+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalBoolINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterOsGymSandboxStatus) Lower(value OsGymSandboxStatus) C.RustBuffer {+ return LowerIntoRustBuffer[OsGymSandboxStatus](c, value)+}++func (c FfiConverterOsGymSandboxStatus) LowerExternal(value OsGymSandboxStatus) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[OsGymSandboxStatus](c, value))+}++func (c FfiConverterOsGymSandboxStatus) Write(writer io.Writer, value OsGymSandboxStatus) {+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Phase)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Runtime)+ FfiConverterOptionalBoolINSTANCE.Write(writer, value.Ready)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.VmName)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Service)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Message)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.ResetIssuedAt)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.ResetVmiUid)+}++type FfiDestroyerOsGymSandboxStatus struct{}++func (_ FfiDestroyerOsGymSandboxStatus) Destroy(value OsGymSandboxStatus) {+ value.Destroy()+}++type OsGymSandboxTemplateSpec struct {+ VmTemplate VmTemplate+}++func (r *OsGymSandboxTemplateSpec) Destroy() {+ FfiDestroyerVmTemplate{}.Destroy(r.VmTemplate)+}++type FfiConverterOsGymSandboxTemplateSpec struct{}++var FfiConverterOsGymSandboxTemplateSpecINSTANCE = FfiConverterOsGymSandboxTemplateSpec{}++func (c FfiConverterOsGymSandboxTemplateSpec) Lift(rb RustBufferI) OsGymSandboxTemplateSpec {+ return LiftFromRustBuffer[OsGymSandboxTemplateSpec](c, rb)+}++func (c FfiConverterOsGymSandboxTemplateSpec) Read(reader io.Reader) OsGymSandboxTemplateSpec {+ return OsGymSandboxTemplateSpec{+ FfiConverterVmTemplateINSTANCE.Read(reader),+ }+}++func (c FfiConverterOsGymSandboxTemplateSpec) Lower(value OsGymSandboxTemplateSpec) C.RustBuffer {+ return LowerIntoRustBuffer[OsGymSandboxTemplateSpec](c, value)+}++func (c FfiConverterOsGymSandboxTemplateSpec) LowerExternal(value OsGymSandboxTemplateSpec) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[OsGymSandboxTemplateSpec](c, value))+}++func (c FfiConverterOsGymSandboxTemplateSpec) Write(writer io.Writer, value OsGymSandboxTemplateSpec) {+ FfiConverterVmTemplateINSTANCE.Write(writer, value.VmTemplate)+}++type FfiDestroyerOsGymSandboxTemplateSpec struct{}++func (_ FfiDestroyerOsGymSandboxTemplateSpec) Destroy(value OsGymSandboxTemplateSpec) {+ value.Destroy()+}++type OsGymSandboxWarmPoolSpec struct {+ Replicas uint32+ SandboxTemplateRef SandboxTemplateRef+ Autoscaling *WarmPoolAutoscaling+}++func (r *OsGymSandboxWarmPoolSpec) Destroy() {+ FfiDestroyerUint32{}.Destroy(r.Replicas)+ FfiDestroyerSandboxTemplateRef{}.Destroy(r.SandboxTemplateRef)+ FfiDestroyerOptionalWarmPoolAutoscaling{}.Destroy(r.Autoscaling)+}++type FfiConverterOsGymSandboxWarmPoolSpec struct{}++var FfiConverterOsGymSandboxWarmPoolSpecINSTANCE = FfiConverterOsGymSandboxWarmPoolSpec{}++func (c FfiConverterOsGymSandboxWarmPoolSpec) Lift(rb RustBufferI) OsGymSandboxWarmPoolSpec {+ return LiftFromRustBuffer[OsGymSandboxWarmPoolSpec](c, rb)+}++func (c FfiConverterOsGymSandboxWarmPoolSpec) Read(reader io.Reader) OsGymSandboxWarmPoolSpec {+ return OsGymSandboxWarmPoolSpec{+ FfiConverterUint32INSTANCE.Read(reader),+ FfiConverterSandboxTemplateRefINSTANCE.Read(reader),+ FfiConverterOptionalWarmPoolAutoscalingINSTANCE.Read(reader),+ }+}++func (c FfiConverterOsGymSandboxWarmPoolSpec) Lower(value OsGymSandboxWarmPoolSpec) C.RustBuffer {+ return LowerIntoRustBuffer[OsGymSandboxWarmPoolSpec](c, value)+}++func (c FfiConverterOsGymSandboxWarmPoolSpec) LowerExternal(value OsGymSandboxWarmPoolSpec) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[OsGymSandboxWarmPoolSpec](c, value))+}++func (c FfiConverterOsGymSandboxWarmPoolSpec) Write(writer io.Writer, value OsGymSandboxWarmPoolSpec) {+ FfiConverterUint32INSTANCE.Write(writer, value.Replicas)+ FfiConverterSandboxTemplateRefINSTANCE.Write(writer, value.SandboxTemplateRef)+ FfiConverterOptionalWarmPoolAutoscalingINSTANCE.Write(writer, value.Autoscaling)+}++type FfiDestroyerOsGymSandboxWarmPoolSpec struct{}++func (_ FfiDestroyerOsGymSandboxWarmPoolSpec) Destroy(value OsGymSandboxWarmPoolSpec) {+ value.Destroy()+}++type OsGymSandboxWarmPoolStatus struct {+ Replicas *uint32+ ReadyReplicas *uint32+ Selector *string+}++func (r *OsGymSandboxWarmPoolStatus) Destroy() {+ FfiDestroyerOptionalUint32{}.Destroy(r.Replicas)+ FfiDestroyerOptionalUint32{}.Destroy(r.ReadyReplicas)+ FfiDestroyerOptionalString{}.Destroy(r.Selector)+}++type FfiConverterOsGymSandboxWarmPoolStatus struct{}++var FfiConverterOsGymSandboxWarmPoolStatusINSTANCE = FfiConverterOsGymSandboxWarmPoolStatus{}++func (c FfiConverterOsGymSandboxWarmPoolStatus) Lift(rb RustBufferI) OsGymSandboxWarmPoolStatus {+ return LiftFromRustBuffer[OsGymSandboxWarmPoolStatus](c, rb)+}++func (c FfiConverterOsGymSandboxWarmPoolStatus) Read(reader io.Reader) OsGymSandboxWarmPoolStatus {+ return OsGymSandboxWarmPoolStatus{+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterOsGymSandboxWarmPoolStatus) Lower(value OsGymSandboxWarmPoolStatus) C.RustBuffer {+ return LowerIntoRustBuffer[OsGymSandboxWarmPoolStatus](c, value)+}++func (c FfiConverterOsGymSandboxWarmPoolStatus) LowerExternal(value OsGymSandboxWarmPoolStatus) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[OsGymSandboxWarmPoolStatus](c, value))+}++func (c FfiConverterOsGymSandboxWarmPoolStatus) Write(writer io.Writer, value OsGymSandboxWarmPoolStatus) {+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.Replicas)+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.ReadyReplicas)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Selector)+}++type FfiDestroyerOsGymSandboxWarmPoolStatus struct{}++func (_ FfiDestroyerOsGymSandboxWarmPoolStatus) Destroy(value OsGymSandboxWarmPoolStatus) {+ value.Destroy()+}++type OsGymWorkspacePoolStatus struct {+ Phase *string+ TotalCount *uint32+ AvailableCount *uint32+ ClaimedCount *uint32+}++func (r *OsGymWorkspacePoolStatus) Destroy() {+ FfiDestroyerOptionalString{}.Destroy(r.Phase)+ FfiDestroyerOptionalUint32{}.Destroy(r.TotalCount)+ FfiDestroyerOptionalUint32{}.Destroy(r.AvailableCount)+ FfiDestroyerOptionalUint32{}.Destroy(r.ClaimedCount)+}++type FfiConverterOsGymWorkspacePoolStatus struct{}++var FfiConverterOsGymWorkspacePoolStatusINSTANCE = FfiConverterOsGymWorkspacePoolStatus{}++func (c FfiConverterOsGymWorkspacePoolStatus) Lift(rb RustBufferI) OsGymWorkspacePoolStatus {+ return LiftFromRustBuffer[OsGymWorkspacePoolStatus](c, rb)+}++func (c FfiConverterOsGymWorkspacePoolStatus) Read(reader io.Reader) OsGymWorkspacePoolStatus {+ return OsGymWorkspacePoolStatus{+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ }+}++func (c FfiConverterOsGymWorkspacePoolStatus) Lower(value OsGymWorkspacePoolStatus) C.RustBuffer {+ return LowerIntoRustBuffer[OsGymWorkspacePoolStatus](c, value)+}++func (c FfiConverterOsGymWorkspacePoolStatus) LowerExternal(value OsGymWorkspacePoolStatus) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[OsGymWorkspacePoolStatus](c, value))+}++func (c FfiConverterOsGymWorkspacePoolStatus) Write(writer io.Writer, value OsGymWorkspacePoolStatus) {+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Phase)+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.TotalCount)+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.AvailableCount)+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.ClaimedCount)+}++type FfiDestroyerOsGymWorkspacePoolStatus struct{}++func (_ FfiDestroyerOsGymWorkspacePoolStatus) Destroy(value OsGymWorkspacePoolStatus) {+ value.Destroy()+}++type OidcConfig struct {+ CredentialsSecret string+ TokenUrl string+ AwsRoleArn *string+ AwsRegion *string+ RefreshIntervalSeconds *uint32+}++func (r *OidcConfig) Destroy() {+ FfiDestroyerString{}.Destroy(r.CredentialsSecret)+ FfiDestroyerString{}.Destroy(r.TokenUrl)+ FfiDestroyerOptionalString{}.Destroy(r.AwsRoleArn)+ FfiDestroyerOptionalString{}.Destroy(r.AwsRegion)+ FfiDestroyerOptionalUint32{}.Destroy(r.RefreshIntervalSeconds)+}++type FfiConverterOidcConfig struct{}++var FfiConverterOidcConfigINSTANCE = FfiConverterOidcConfig{}++func (c FfiConverterOidcConfig) Lift(rb RustBufferI) OidcConfig {+ return LiftFromRustBuffer[OidcConfig](c, rb)+}++func (c FfiConverterOidcConfig) Read(reader io.Reader) OidcConfig {+ return OidcConfig{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ }+}++func (c FfiConverterOidcConfig) Lower(value OidcConfig) C.RustBuffer {+ return LowerIntoRustBuffer[OidcConfig](c, value)+}++func (c FfiConverterOidcConfig) LowerExternal(value OidcConfig) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[OidcConfig](c, value))+}++func (c FfiConverterOidcConfig) Write(writer io.Writer, value OidcConfig) {+ FfiConverterStringINSTANCE.Write(writer, value.CredentialsSecret)+ FfiConverterStringINSTANCE.Write(writer, value.TokenUrl)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.AwsRoleArn)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.AwsRegion)+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.RefreshIntervalSeconds)+}++type FfiDestroyerOidcConfig struct{}++func (_ FfiDestroyerOidcConfig) Destroy(value OidcConfig) {+ value.Destroy()+}++type PoolSpec struct {+ Replicas uint32+ Template PoolTemplate+ Autoscaling *WarmPoolAutoscaling+ Services *[]SandboxService+}++func (r *PoolSpec) Destroy() {+ FfiDestroyerUint32{}.Destroy(r.Replicas)+ FfiDestroyerPoolTemplate{}.Destroy(r.Template)+ FfiDestroyerOptionalWarmPoolAutoscaling{}.Destroy(r.Autoscaling)+ FfiDestroyerOptionalSequenceSandboxService{}.Destroy(r.Services)+}+func (_self PoolSpec) Eq(other PoolSpec) bool {+ _selfBuf := FfiConverterPoolSpecINSTANCE.Lower(_self)+ return FfiConverterBoolINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) C.int8_t {+ return C.uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq(+ _selfBuf, FfiConverterPoolSpecINSTANCE.Lower(other), _uniffiStatus)+ }))+}+func (_self PoolSpec) Ne(other PoolSpec) bool {+ _selfBuf := FfiConverterPoolSpecINSTANCE.Lower(_self)+ return FfiConverterBoolINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) C.int8_t {+ return C.uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_ne(+ _selfBuf, FfiConverterPoolSpecINSTANCE.Lower(other), _uniffiStatus)+ }))+}+func (_self PoolSpec) Hash() uint64 {+ _selfBuf := FfiConverterPoolSpecINSTANCE.Lower(_self)+ return FfiConverterUint64INSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint64_t {+ return C.uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash(+ _selfBuf, _uniffiStatus)+ }))+}++type FfiConverterPoolSpec struct{}++var FfiConverterPoolSpecINSTANCE = FfiConverterPoolSpec{}++func (c FfiConverterPoolSpec) Lift(rb RustBufferI) PoolSpec {+ return LiftFromRustBuffer[PoolSpec](c, rb)+}++func (c FfiConverterPoolSpec) Read(reader io.Reader) PoolSpec {+ return PoolSpec{+ FfiConverterUint32INSTANCE.Read(reader),+ FfiConverterPoolTemplateINSTANCE.Read(reader),+ FfiConverterOptionalWarmPoolAutoscalingINSTANCE.Read(reader),+ FfiConverterOptionalSequenceSandboxServiceINSTANCE.Read(reader),+ }+}++func (c FfiConverterPoolSpec) Lower(value PoolSpec) C.RustBuffer {+ return LowerIntoRustBuffer[PoolSpec](c, value)+}++func (c FfiConverterPoolSpec) LowerExternal(value PoolSpec) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[PoolSpec](c, value))+}++func (c FfiConverterPoolSpec) Write(writer io.Writer, value PoolSpec) {+ FfiConverterUint32INSTANCE.Write(writer, value.Replicas)+ FfiConverterPoolTemplateINSTANCE.Write(writer, value.Template)+ FfiConverterOptionalWarmPoolAutoscalingINSTANCE.Write(writer, value.Autoscaling)+ FfiConverterOptionalSequenceSandboxServiceINSTANCE.Write(writer, value.Services)+}++type FfiDestroyerPoolSpec struct{}++func (_ FfiDestroyerPoolSpec) Destroy(value PoolSpec) {+ value.Destroy()+}++type PoolTemplate struct {+ Runtime *RuntimeKind+ RuntimeClassName *string+ NodeSelector *map[string]string+ Tolerations *[]*PreservedJson+ Command *[]string+ ContainerDiskImage string+ ImagePullSecret *string+ CpuCores *uint32+ Memory *string+ Firmware *Firmware+ Probes **PreservedJson+ Oidc *OidcConfig+}++func (r *PoolTemplate) Destroy() {+ FfiDestroyerOptionalRuntimeKind{}.Destroy(r.Runtime)+ FfiDestroyerOptionalString{}.Destroy(r.RuntimeClassName)+ FfiDestroyerOptionalMapStringString{}.Destroy(r.NodeSelector)+ FfiDestroyerOptionalSequencePreservedJson{}.Destroy(r.Tolerations)+ FfiDestroyerOptionalSequenceString{}.Destroy(r.Command)+ FfiDestroyerString{}.Destroy(r.ContainerDiskImage)+ FfiDestroyerOptionalString{}.Destroy(r.ImagePullSecret)+ FfiDestroyerOptionalUint32{}.Destroy(r.CpuCores)+ FfiDestroyerOptionalString{}.Destroy(r.Memory)+ FfiDestroyerOptionalFirmware{}.Destroy(r.Firmware)+ FfiDestroyerOptionalPreservedJson{}.Destroy(r.Probes)+ FfiDestroyerOptionalOidcConfig{}.Destroy(r.Oidc)+}++type FfiConverterPoolTemplate struct{}++var FfiConverterPoolTemplateINSTANCE = FfiConverterPoolTemplate{}++func (c FfiConverterPoolTemplate) Lift(rb RustBufferI) PoolTemplate {+ return LiftFromRustBuffer[PoolTemplate](c, rb)+}++func (c FfiConverterPoolTemplate) Read(reader io.Reader) PoolTemplate {+ return PoolTemplate{+ FfiConverterOptionalRuntimeKindINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalMapStringStringINSTANCE.Read(reader),+ FfiConverterOptionalSequencePreservedJsonINSTANCE.Read(reader),+ FfiConverterOptionalSequenceStringINSTANCE.Read(reader),+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalFirmwareINSTANCE.Read(reader),+ FfiConverterOptionalPreservedJsonINSTANCE.Read(reader),+ FfiConverterOptionalOidcConfigINSTANCE.Read(reader),+ }+}++func (c FfiConverterPoolTemplate) Lower(value PoolTemplate) C.RustBuffer {+ return LowerIntoRustBuffer[PoolTemplate](c, value)+}++func (c FfiConverterPoolTemplate) LowerExternal(value PoolTemplate) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[PoolTemplate](c, value))+}++func (c FfiConverterPoolTemplate) Write(writer io.Writer, value PoolTemplate) {+ FfiConverterOptionalRuntimeKindINSTANCE.Write(writer, value.Runtime)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.RuntimeClassName)+ FfiConverterOptionalMapStringStringINSTANCE.Write(writer, value.NodeSelector)+ FfiConverterOptionalSequencePreservedJsonINSTANCE.Write(writer, value.Tolerations)+ FfiConverterOptionalSequenceStringINSTANCE.Write(writer, value.Command)+ FfiConverterStringINSTANCE.Write(writer, value.ContainerDiskImage)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.ImagePullSecret)+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.CpuCores)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Memory)+ FfiConverterOptionalFirmwareINSTANCE.Write(writer, value.Firmware)+ FfiConverterOptionalPreservedJsonINSTANCE.Write(writer, value.Probes)+ FfiConverterOptionalOidcConfigINSTANCE.Write(writer, value.Oidc)+}++type FfiDestroyerPoolTemplate struct{}++func (_ FfiDestroyerPoolTemplate) Destroy(value PoolTemplate) {+ value.Destroy()+}++type SandboxService struct {+ Name string+ TargetPort uint16+ Protocol *ServiceProtocol+}++func (r *SandboxService) Destroy() {+ FfiDestroyerString{}.Destroy(r.Name)+ FfiDestroyerUint16{}.Destroy(r.TargetPort)+ FfiDestroyerOptionalServiceProtocol{}.Destroy(r.Protocol)+}++type FfiConverterSandboxService struct{}++var FfiConverterSandboxServiceINSTANCE = FfiConverterSandboxService{}++func (c FfiConverterSandboxService) Lift(rb RustBufferI) SandboxService {+ return LiftFromRustBuffer[SandboxService](c, rb)+}++func (c FfiConverterSandboxService) Read(reader io.Reader) SandboxService {+ return SandboxService{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterUint16INSTANCE.Read(reader),+ FfiConverterOptionalServiceProtocolINSTANCE.Read(reader),+ }+}++func (c FfiConverterSandboxService) Lower(value SandboxService) C.RustBuffer {+ return LowerIntoRustBuffer[SandboxService](c, value)+}++func (c FfiConverterSandboxService) LowerExternal(value SandboxService) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[SandboxService](c, value))+}++func (c FfiConverterSandboxService) Write(writer io.Writer, value SandboxService) {+ FfiConverterStringINSTANCE.Write(writer, value.Name)+ FfiConverterUint16INSTANCE.Write(writer, value.TargetPort)+ FfiConverterOptionalServiceProtocolINSTANCE.Write(writer, value.Protocol)+}++type FfiDestroyerSandboxService struct{}++func (_ FfiDestroyerSandboxService) Destroy(value SandboxService) {+ value.Destroy()+}++type SandboxTemplateRef struct {+ Name string+}++func (r *SandboxTemplateRef) Destroy() {+ FfiDestroyerString{}.Destroy(r.Name)+}++type FfiConverterSandboxTemplateRef struct{}++var FfiConverterSandboxTemplateRefINSTANCE = FfiConverterSandboxTemplateRef{}++func (c FfiConverterSandboxTemplateRef) Lift(rb RustBufferI) SandboxTemplateRef {+ return LiftFromRustBuffer[SandboxTemplateRef](c, rb)+}++func (c FfiConverterSandboxTemplateRef) Read(reader io.Reader) SandboxTemplateRef {+ return SandboxTemplateRef{+ FfiConverterStringINSTANCE.Read(reader),+ }+}++func (c FfiConverterSandboxTemplateRef) Lower(value SandboxTemplateRef) C.RustBuffer {+ return LowerIntoRustBuffer[SandboxTemplateRef](c, value)+}++func (c FfiConverterSandboxTemplateRef) LowerExternal(value SandboxTemplateRef) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[SandboxTemplateRef](c, value))+}++func (c FfiConverterSandboxTemplateRef) Write(writer io.Writer, value SandboxTemplateRef) {+ FfiConverterStringINSTANCE.Write(writer, value.Name)+}++type FfiDestroyerSandboxTemplateRef struct{}++func (_ FfiDestroyerSandboxTemplateRef) Destroy(value SandboxTemplateRef) {+ value.Destroy()+}++type VmTemplate struct {+ ContainerDiskImage string+ Command *[]string+ Runtime *RuntimeKind+ RuntimeClassName *string+ NodeSelector *map[string]string+ Tolerations *[]*PreservedJson+ ImagePullPolicy *ImagePullPolicy+ ImagePullSecret *string+ CpuCores *uint32+ Memory *string+ Firmware *Firmware+ Probes **PreservedJson+ Services *[]SandboxService+ Oidc *OidcConfig+}++func (r *VmTemplate) Destroy() {+ FfiDestroyerString{}.Destroy(r.ContainerDiskImage)+ FfiDestroyerOptionalSequenceString{}.Destroy(r.Command)+ FfiDestroyerOptionalRuntimeKind{}.Destroy(r.Runtime)+ FfiDestroyerOptionalString{}.Destroy(r.RuntimeClassName)+ FfiDestroyerOptionalMapStringString{}.Destroy(r.NodeSelector)+ FfiDestroyerOptionalSequencePreservedJson{}.Destroy(r.Tolerations)+ FfiDestroyerOptionalImagePullPolicy{}.Destroy(r.ImagePullPolicy)+ FfiDestroyerOptionalString{}.Destroy(r.ImagePullSecret)+ FfiDestroyerOptionalUint32{}.Destroy(r.CpuCores)+ FfiDestroyerOptionalString{}.Destroy(r.Memory)+ FfiDestroyerOptionalFirmware{}.Destroy(r.Firmware)+ FfiDestroyerOptionalPreservedJson{}.Destroy(r.Probes)+ FfiDestroyerOptionalSequenceSandboxService{}.Destroy(r.Services)+ FfiDestroyerOptionalOidcConfig{}.Destroy(r.Oidc)+}++type FfiConverterVmTemplate struct{}++var FfiConverterVmTemplateINSTANCE = FfiConverterVmTemplate{}++func (c FfiConverterVmTemplate) Lift(rb RustBufferI) VmTemplate {+ return LiftFromRustBuffer[VmTemplate](c, rb)+}++func (c FfiConverterVmTemplate) Read(reader io.Reader) VmTemplate {+ return VmTemplate{+ FfiConverterStringINSTANCE.Read(reader),+ FfiConverterOptionalSequenceStringINSTANCE.Read(reader),+ FfiConverterOptionalRuntimeKindINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalMapStringStringINSTANCE.Read(reader),+ FfiConverterOptionalSequencePreservedJsonINSTANCE.Read(reader),+ FfiConverterOptionalImagePullPolicyINSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ FfiConverterOptionalStringINSTANCE.Read(reader),+ FfiConverterOptionalFirmwareINSTANCE.Read(reader),+ FfiConverterOptionalPreservedJsonINSTANCE.Read(reader),+ FfiConverterOptionalSequenceSandboxServiceINSTANCE.Read(reader),+ FfiConverterOptionalOidcConfigINSTANCE.Read(reader),+ }+}++func (c FfiConverterVmTemplate) Lower(value VmTemplate) C.RustBuffer {+ return LowerIntoRustBuffer[VmTemplate](c, value)+}++func (c FfiConverterVmTemplate) LowerExternal(value VmTemplate) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[VmTemplate](c, value))+}++func (c FfiConverterVmTemplate) Write(writer io.Writer, value VmTemplate) {+ FfiConverterStringINSTANCE.Write(writer, value.ContainerDiskImage)+ FfiConverterOptionalSequenceStringINSTANCE.Write(writer, value.Command)+ FfiConverterOptionalRuntimeKindINSTANCE.Write(writer, value.Runtime)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.RuntimeClassName)+ FfiConverterOptionalMapStringStringINSTANCE.Write(writer, value.NodeSelector)+ FfiConverterOptionalSequencePreservedJsonINSTANCE.Write(writer, value.Tolerations)+ FfiConverterOptionalImagePullPolicyINSTANCE.Write(writer, value.ImagePullPolicy)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.ImagePullSecret)+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.CpuCores)+ FfiConverterOptionalStringINSTANCE.Write(writer, value.Memory)+ FfiConverterOptionalFirmwareINSTANCE.Write(writer, value.Firmware)+ FfiConverterOptionalPreservedJsonINSTANCE.Write(writer, value.Probes)+ FfiConverterOptionalSequenceSandboxServiceINSTANCE.Write(writer, value.Services)+ FfiConverterOptionalOidcConfigINSTANCE.Write(writer, value.Oidc)+}++type FfiDestroyerVmTemplate struct{}++func (_ FfiDestroyerVmTemplate) Destroy(value VmTemplate) {+ value.Destroy()+}++type WarmPoolAutoscaling struct {+ MinPoolSize *uint32+ InitialPoolSize *uint32+ MaxPoolSize *uint32+}++func (r *WarmPoolAutoscaling) Destroy() {+ FfiDestroyerOptionalUint32{}.Destroy(r.MinPoolSize)+ FfiDestroyerOptionalUint32{}.Destroy(r.InitialPoolSize)+ FfiDestroyerOptionalUint32{}.Destroy(r.MaxPoolSize)+}++type FfiConverterWarmPoolAutoscaling struct{}++var FfiConverterWarmPoolAutoscalingINSTANCE = FfiConverterWarmPoolAutoscaling{}++func (c FfiConverterWarmPoolAutoscaling) Lift(rb RustBufferI) WarmPoolAutoscaling {+ return LiftFromRustBuffer[WarmPoolAutoscaling](c, rb)+}++func (c FfiConverterWarmPoolAutoscaling) Read(reader io.Reader) WarmPoolAutoscaling {+ return WarmPoolAutoscaling{+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ FfiConverterOptionalUint32INSTANCE.Read(reader),+ }+}++func (c FfiConverterWarmPoolAutoscaling) Lower(value WarmPoolAutoscaling) C.RustBuffer {+ return LowerIntoRustBuffer[WarmPoolAutoscaling](c, value)+}++func (c FfiConverterWarmPoolAutoscaling) LowerExternal(value WarmPoolAutoscaling) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[WarmPoolAutoscaling](c, value))+}++func (c FfiConverterWarmPoolAutoscaling) Write(writer io.Writer, value WarmPoolAutoscaling) {+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.MinPoolSize)+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.InitialPoolSize)+ FfiConverterOptionalUint32INSTANCE.Write(writer, value.MaxPoolSize)+}++type FfiDestroyerWarmPoolAutoscaling struct{}++func (_ FfiDestroyerWarmPoolAutoscaling) Destroy(value WarmPoolAutoscaling) {+ value.Destroy()+}++type Firmware uint++const (+ FirmwareBios Firmware = 1+ FirmwareEfi Firmware = 2+)++type FfiConverterFirmware struct{}++var FfiConverterFirmwareINSTANCE = FfiConverterFirmware{}++func (c FfiConverterFirmware) Lift(rb RustBufferI) Firmware {+ return LiftFromRustBuffer[Firmware](c, rb)+}++func (c FfiConverterFirmware) Lower(value Firmware) C.RustBuffer {+ return LowerIntoRustBuffer[Firmware](c, value)+}++func (c FfiConverterFirmware) LowerExternal(value Firmware) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[Firmware](c, value))+}+func (FfiConverterFirmware) Read(reader io.Reader) Firmware {+ id := readInt32(reader)+ return Firmware(id)+}++func (FfiConverterFirmware) Write(writer io.Writer, value Firmware) {+ writeInt32(writer, int32(value))+}++type FfiDestroyerFirmware struct{}++func (_ FfiDestroyerFirmware) Destroy(value Firmware) {+}++type ImagePullPolicy uint++const (+ ImagePullPolicyAlways ImagePullPolicy = 1+ ImagePullPolicyIfNotPresent ImagePullPolicy = 2+ ImagePullPolicyNever ImagePullPolicy = 3+)++type FfiConverterImagePullPolicy struct{}++var FfiConverterImagePullPolicyINSTANCE = FfiConverterImagePullPolicy{}++func (c FfiConverterImagePullPolicy) Lift(rb RustBufferI) ImagePullPolicy {+ return LiftFromRustBuffer[ImagePullPolicy](c, rb)+}++func (c FfiConverterImagePullPolicy) Lower(value ImagePullPolicy) C.RustBuffer {+ return LowerIntoRustBuffer[ImagePullPolicy](c, value)+}++func (c FfiConverterImagePullPolicy) LowerExternal(value ImagePullPolicy) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[ImagePullPolicy](c, value))+}+func (FfiConverterImagePullPolicy) Read(reader io.Reader) ImagePullPolicy {+ id := readInt32(reader)+ return ImagePullPolicy(id)+}++func (FfiConverterImagePullPolicy) Write(writer io.Writer, value ImagePullPolicy) {+ writeInt32(writer, int32(value))+}++type FfiDestroyerImagePullPolicy struct{}++func (_ FfiDestroyerImagePullPolicy) Destroy(value ImagePullPolicy) {+}++type JsonValueError struct {+ err error+}++// Convenience method to turn *JsonValueError into error+// Avoiding treating nil pointer as non nil error interface+func (err *JsonValueError) AsError() error {+ if err == nil {+ return nil+ } else {+ return err+ }+}++func (err JsonValueError) Error() string {+ return fmt.Sprintf("JsonValueError: %s", err.err.Error())+}++func (err JsonValueError) Unwrap() error {+ return err.err+}++// Err* are used for checking error type with `errors.Is`+var ErrJsonValueErrorInvalid = fmt.Errorf("JsonValueErrorInvalid")++// Variant structs+type JsonValueErrorInvalid struct {+ Reason string+}++func NewJsonValueErrorInvalid(+ reason string,+) *JsonValueError {+ return &JsonValueError{err: &JsonValueErrorInvalid{+ Reason: reason}}+}++func (e JsonValueErrorInvalid) destroy() {+ FfiDestroyerString{}.Destroy(e.Reason)+}++func (err JsonValueErrorInvalid) Error() string {+ return fmt.Sprint("Invalid",+ ": ",++ "Reason=",+ err.Reason,+ )+}++func (self JsonValueErrorInvalid) Is(target error) bool {+ return target == ErrJsonValueErrorInvalid+}++type FfiConverterJsonValueError struct{}++var FfiConverterJsonValueErrorINSTANCE = FfiConverterJsonValueError{}++func (c FfiConverterJsonValueError) Lift(eb RustBufferI) *JsonValueError {+ return LiftFromRustBuffer[*JsonValueError](c, eb)+}++func (c FfiConverterJsonValueError) Lower(value *JsonValueError) C.RustBuffer {+ return LowerIntoRustBuffer[*JsonValueError](c, value)+}++func (c FfiConverterJsonValueError) LowerExternal(value *JsonValueError) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*JsonValueError](c, value))+}++func (c FfiConverterJsonValueError) Read(reader io.Reader) *JsonValueError {+ errorID := readUint32(reader)++ switch errorID {+ case 1:+ return &JsonValueError{&JsonValueErrorInvalid{+ Reason: FfiConverterStringINSTANCE.Read(reader),+ }}+ default:+ panic(fmt.Sprintf("Unknown error code %d in FfiConverterJsonValueError.Read()", errorID))+ }+}++func (c FfiConverterJsonValueError) Write(writer io.Writer, value *JsonValueError) {+ switch variantValue := value.err.(type) {+ case *JsonValueErrorInvalid:+ writeInt32(writer, 1)+ FfiConverterStringINSTANCE.Write(writer, variantValue.Reason)+ default:+ _ = variantValue+ panic(fmt.Sprintf("invalid error value `%v` in FfiConverterJsonValueError.Write", value))+ }+}++type FfiDestroyerJsonValueError struct{}++func (_ FfiDestroyerJsonValueError) Destroy(value *JsonValueError) {+ switch variantValue := value.err.(type) {+ case JsonValueErrorInvalid:+ variantValue.destroy()+ default:+ _ = variantValue+ panic(fmt.Sprintf("invalid error value `%v` in FfiDestroyerJsonValueError.Destroy", value))+ }+}++type RuntimeKind uint++const (+ RuntimeKindKubevirt RuntimeKind = 1+ RuntimeKindMacos RuntimeKind = 2+ RuntimeKindGvisor RuntimeKind = 3+)++type FfiConverterRuntimeKind struct{}++var FfiConverterRuntimeKindINSTANCE = FfiConverterRuntimeKind{}++func (c FfiConverterRuntimeKind) Lift(rb RustBufferI) RuntimeKind {+ return LiftFromRustBuffer[RuntimeKind](c, rb)+}++func (c FfiConverterRuntimeKind) Lower(value RuntimeKind) C.RustBuffer {+ return LowerIntoRustBuffer[RuntimeKind](c, value)+}++func (c FfiConverterRuntimeKind) LowerExternal(value RuntimeKind) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[RuntimeKind](c, value))+}+func (FfiConverterRuntimeKind) Read(reader io.Reader) RuntimeKind {+ id := readInt32(reader)+ return RuntimeKind(id)+}++func (FfiConverterRuntimeKind) Write(writer io.Writer, value RuntimeKind) {+ writeInt32(writer, int32(value))+}++type FfiDestroyerRuntimeKind struct{}++func (_ FfiDestroyerRuntimeKind) Destroy(value RuntimeKind) {+}++type ServiceProtocol uint++const (+ ServiceProtocolTcp ServiceProtocol = 1+ ServiceProtocolUdp ServiceProtocol = 2+)++type FfiConverterServiceProtocol struct{}++var FfiConverterServiceProtocolINSTANCE = FfiConverterServiceProtocol{}++func (c FfiConverterServiceProtocol) Lift(rb RustBufferI) ServiceProtocol {+ return LiftFromRustBuffer[ServiceProtocol](c, rb)+}++func (c FfiConverterServiceProtocol) Lower(value ServiceProtocol) C.RustBuffer {+ return LowerIntoRustBuffer[ServiceProtocol](c, value)+}++func (c FfiConverterServiceProtocol) LowerExternal(value ServiceProtocol) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[ServiceProtocol](c, value))+}+func (FfiConverterServiceProtocol) Read(reader io.Reader) ServiceProtocol {+ id := readInt32(reader)+ return ServiceProtocol(id)+}++func (FfiConverterServiceProtocol) Write(writer io.Writer, value ServiceProtocol) {+ writeInt32(writer, int32(value))+}++type FfiDestroyerServiceProtocol struct{}++func (_ FfiDestroyerServiceProtocol) Destroy(value ServiceProtocol) {+}++type FfiConverterOptionalUint32 struct{}++var FfiConverterOptionalUint32INSTANCE = FfiConverterOptionalUint32{}++func (c FfiConverterOptionalUint32) Lift(rb RustBufferI) *uint32 {+ return LiftFromRustBuffer[*uint32](c, rb)+}++func (_ FfiConverterOptionalUint32) Read(reader io.Reader) *uint32 {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterUint32INSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalUint32) Lower(value *uint32) C.RustBuffer {+ return LowerIntoRustBuffer[*uint32](c, value)+}++func (c FfiConverterOptionalUint32) LowerExternal(value *uint32) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*uint32](c, value))+}++func (_ FfiConverterOptionalUint32) Write(writer io.Writer, value *uint32) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterUint32INSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalUint32 struct{}++func (_ FfiDestroyerOptionalUint32) Destroy(value *uint32) {+ if value != nil {+ FfiDestroyerUint32{}.Destroy(*value)+ }+}++type FfiConverterOptionalBool struct{}++var FfiConverterOptionalBoolINSTANCE = FfiConverterOptionalBool{}++func (c FfiConverterOptionalBool) Lift(rb RustBufferI) *bool {+ return LiftFromRustBuffer[*bool](c, rb)+}++func (_ FfiConverterOptionalBool) Read(reader io.Reader) *bool {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterBoolINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalBool) Lower(value *bool) C.RustBuffer {+ return LowerIntoRustBuffer[*bool](c, value)+}++func (c FfiConverterOptionalBool) LowerExternal(value *bool) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*bool](c, value))+}++func (_ FfiConverterOptionalBool) Write(writer io.Writer, value *bool) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterBoolINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalBool struct{}++func (_ FfiDestroyerOptionalBool) Destroy(value *bool) {+ if value != nil {+ FfiDestroyerBool{}.Destroy(*value)+ }+}++type FfiConverterOptionalString struct{}++var FfiConverterOptionalStringINSTANCE = FfiConverterOptionalString{}++func (c FfiConverterOptionalString) Lift(rb RustBufferI) *string {+ return LiftFromRustBuffer[*string](c, rb)+}++func (_ FfiConverterOptionalString) Read(reader io.Reader) *string {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterStringINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalString) Lower(value *string) C.RustBuffer {+ return LowerIntoRustBuffer[*string](c, value)+}++func (c FfiConverterOptionalString) LowerExternal(value *string) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*string](c, value))+}++func (_ FfiConverterOptionalString) Write(writer io.Writer, value *string) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterStringINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalString struct{}++func (_ FfiDestroyerOptionalString) Destroy(value *string) {+ if value != nil {+ FfiDestroyerString{}.Destroy(*value)+ }+}++type FfiConverterOptionalPreservedJson struct{}++var FfiConverterOptionalPreservedJsonINSTANCE = FfiConverterOptionalPreservedJson{}++func (c FfiConverterOptionalPreservedJson) Lift(rb RustBufferI) **PreservedJson {+ return LiftFromRustBuffer[**PreservedJson](c, rb)+}++func (_ FfiConverterOptionalPreservedJson) Read(reader io.Reader) **PreservedJson {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterPreservedJsonINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalPreservedJson) Lower(value **PreservedJson) C.RustBuffer {+ return LowerIntoRustBuffer[**PreservedJson](c, value)+}++func (c FfiConverterOptionalPreservedJson) LowerExternal(value **PreservedJson) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[**PreservedJson](c, value))+}++func (_ FfiConverterOptionalPreservedJson) Write(writer io.Writer, value **PreservedJson) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterPreservedJsonINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalPreservedJson struct{}++func (_ FfiDestroyerOptionalPreservedJson) Destroy(value **PreservedJson) {+ if value != nil {+ FfiDestroyerPreservedJson{}.Destroy(*value)+ }+}++type FfiConverterOptionalClaimLifecycle struct{}++var FfiConverterOptionalClaimLifecycleINSTANCE = FfiConverterOptionalClaimLifecycle{}++func (c FfiConverterOptionalClaimLifecycle) Lift(rb RustBufferI) *ClaimLifecycle {+ return LiftFromRustBuffer[*ClaimLifecycle](c, rb)+}++func (_ FfiConverterOptionalClaimLifecycle) Read(reader io.Reader) *ClaimLifecycle {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterClaimLifecycleINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalClaimLifecycle) Lower(value *ClaimLifecycle) C.RustBuffer {+ return LowerIntoRustBuffer[*ClaimLifecycle](c, value)+}++func (c FfiConverterOptionalClaimLifecycle) LowerExternal(value *ClaimLifecycle) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*ClaimLifecycle](c, value))+}++func (_ FfiConverterOptionalClaimLifecycle) Write(writer io.Writer, value *ClaimLifecycle) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterClaimLifecycleINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalClaimLifecycle struct{}++func (_ FfiDestroyerOptionalClaimLifecycle) Destroy(value *ClaimLifecycle) {+ if value != nil {+ FfiDestroyerClaimLifecycle{}.Destroy(*value)+ }+}++type FfiConverterOptionalOsGymSandboxClaimSandbox struct{}++var FfiConverterOptionalOsGymSandboxClaimSandboxINSTANCE = FfiConverterOptionalOsGymSandboxClaimSandbox{}++func (c FfiConverterOptionalOsGymSandboxClaimSandbox) Lift(rb RustBufferI) *OsGymSandboxClaimSandbox {+ return LiftFromRustBuffer[*OsGymSandboxClaimSandbox](c, rb)+}++func (_ FfiConverterOptionalOsGymSandboxClaimSandbox) Read(reader io.Reader) *OsGymSandboxClaimSandbox {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterOsGymSandboxClaimSandboxINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalOsGymSandboxClaimSandbox) Lower(value *OsGymSandboxClaimSandbox) C.RustBuffer {+ return LowerIntoRustBuffer[*OsGymSandboxClaimSandbox](c, value)+}++func (c FfiConverterOptionalOsGymSandboxClaimSandbox) LowerExternal(value *OsGymSandboxClaimSandbox) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*OsGymSandboxClaimSandbox](c, value))+}++func (_ FfiConverterOptionalOsGymSandboxClaimSandbox) Write(writer io.Writer, value *OsGymSandboxClaimSandbox) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterOsGymSandboxClaimSandboxINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalOsGymSandboxClaimSandbox struct{}++func (_ FfiDestroyerOptionalOsGymSandboxClaimSandbox) Destroy(value *OsGymSandboxClaimSandbox) {+ if value != nil {+ FfiDestroyerOsGymSandboxClaimSandbox{}.Destroy(*value)+ }+}++type FfiConverterOptionalOidcConfig struct{}++var FfiConverterOptionalOidcConfigINSTANCE = FfiConverterOptionalOidcConfig{}++func (c FfiConverterOptionalOidcConfig) Lift(rb RustBufferI) *OidcConfig {+ return LiftFromRustBuffer[*OidcConfig](c, rb)+}++func (_ FfiConverterOptionalOidcConfig) Read(reader io.Reader) *OidcConfig {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterOidcConfigINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalOidcConfig) Lower(value *OidcConfig) C.RustBuffer {+ return LowerIntoRustBuffer[*OidcConfig](c, value)+}++func (c FfiConverterOptionalOidcConfig) LowerExternal(value *OidcConfig) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*OidcConfig](c, value))+}++func (_ FfiConverterOptionalOidcConfig) Write(writer io.Writer, value *OidcConfig) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterOidcConfigINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalOidcConfig struct{}++func (_ FfiDestroyerOptionalOidcConfig) Destroy(value *OidcConfig) {+ if value != nil {+ FfiDestroyerOidcConfig{}.Destroy(*value)+ }+}++type FfiConverterOptionalWarmPoolAutoscaling struct{}++var FfiConverterOptionalWarmPoolAutoscalingINSTANCE = FfiConverterOptionalWarmPoolAutoscaling{}++func (c FfiConverterOptionalWarmPoolAutoscaling) Lift(rb RustBufferI) *WarmPoolAutoscaling {+ return LiftFromRustBuffer[*WarmPoolAutoscaling](c, rb)+}++func (_ FfiConverterOptionalWarmPoolAutoscaling) Read(reader io.Reader) *WarmPoolAutoscaling {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterWarmPoolAutoscalingINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalWarmPoolAutoscaling) Lower(value *WarmPoolAutoscaling) C.RustBuffer {+ return LowerIntoRustBuffer[*WarmPoolAutoscaling](c, value)+}++func (c FfiConverterOptionalWarmPoolAutoscaling) LowerExternal(value *WarmPoolAutoscaling) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*WarmPoolAutoscaling](c, value))+}++func (_ FfiConverterOptionalWarmPoolAutoscaling) Write(writer io.Writer, value *WarmPoolAutoscaling) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterWarmPoolAutoscalingINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalWarmPoolAutoscaling struct{}++func (_ FfiDestroyerOptionalWarmPoolAutoscaling) Destroy(value *WarmPoolAutoscaling) {+ if value != nil {+ FfiDestroyerWarmPoolAutoscaling{}.Destroy(*value)+ }+}++type FfiConverterOptionalFirmware struct{}++var FfiConverterOptionalFirmwareINSTANCE = FfiConverterOptionalFirmware{}++func (c FfiConverterOptionalFirmware) Lift(rb RustBufferI) *Firmware {+ return LiftFromRustBuffer[*Firmware](c, rb)+}++func (_ FfiConverterOptionalFirmware) Read(reader io.Reader) *Firmware {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterFirmwareINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalFirmware) Lower(value *Firmware) C.RustBuffer {+ return LowerIntoRustBuffer[*Firmware](c, value)+}++func (c FfiConverterOptionalFirmware) LowerExternal(value *Firmware) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*Firmware](c, value))+}++func (_ FfiConverterOptionalFirmware) Write(writer io.Writer, value *Firmware) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterFirmwareINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalFirmware struct{}++func (_ FfiDestroyerOptionalFirmware) Destroy(value *Firmware) {+ if value != nil {+ FfiDestroyerFirmware{}.Destroy(*value)+ }+}++type FfiConverterOptionalImagePullPolicy struct{}++var FfiConverterOptionalImagePullPolicyINSTANCE = FfiConverterOptionalImagePullPolicy{}++func (c FfiConverterOptionalImagePullPolicy) Lift(rb RustBufferI) *ImagePullPolicy {+ return LiftFromRustBuffer[*ImagePullPolicy](c, rb)+}++func (_ FfiConverterOptionalImagePullPolicy) Read(reader io.Reader) *ImagePullPolicy {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterImagePullPolicyINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalImagePullPolicy) Lower(value *ImagePullPolicy) C.RustBuffer {+ return LowerIntoRustBuffer[*ImagePullPolicy](c, value)+}++func (c FfiConverterOptionalImagePullPolicy) LowerExternal(value *ImagePullPolicy) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*ImagePullPolicy](c, value))+}++func (_ FfiConverterOptionalImagePullPolicy) Write(writer io.Writer, value *ImagePullPolicy) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterImagePullPolicyINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalImagePullPolicy struct{}++func (_ FfiDestroyerOptionalImagePullPolicy) Destroy(value *ImagePullPolicy) {+ if value != nil {+ FfiDestroyerImagePullPolicy{}.Destroy(*value)+ }+}++type FfiConverterOptionalRuntimeKind struct{}++var FfiConverterOptionalRuntimeKindINSTANCE = FfiConverterOptionalRuntimeKind{}++func (c FfiConverterOptionalRuntimeKind) Lift(rb RustBufferI) *RuntimeKind {+ return LiftFromRustBuffer[*RuntimeKind](c, rb)+}++func (_ FfiConverterOptionalRuntimeKind) Read(reader io.Reader) *RuntimeKind {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterRuntimeKindINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalRuntimeKind) Lower(value *RuntimeKind) C.RustBuffer {+ return LowerIntoRustBuffer[*RuntimeKind](c, value)+}++func (c FfiConverterOptionalRuntimeKind) LowerExternal(value *RuntimeKind) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*RuntimeKind](c, value))+}++func (_ FfiConverterOptionalRuntimeKind) Write(writer io.Writer, value *RuntimeKind) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterRuntimeKindINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalRuntimeKind struct{}++func (_ FfiDestroyerOptionalRuntimeKind) Destroy(value *RuntimeKind) {+ if value != nil {+ FfiDestroyerRuntimeKind{}.Destroy(*value)+ }+}++type FfiConverterOptionalServiceProtocol struct{}++var FfiConverterOptionalServiceProtocolINSTANCE = FfiConverterOptionalServiceProtocol{}++func (c FfiConverterOptionalServiceProtocol) Lift(rb RustBufferI) *ServiceProtocol {+ return LiftFromRustBuffer[*ServiceProtocol](c, rb)+}++func (_ FfiConverterOptionalServiceProtocol) Read(reader io.Reader) *ServiceProtocol {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterServiceProtocolINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalServiceProtocol) Lower(value *ServiceProtocol) C.RustBuffer {+ return LowerIntoRustBuffer[*ServiceProtocol](c, value)+}++func (c FfiConverterOptionalServiceProtocol) LowerExternal(value *ServiceProtocol) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*ServiceProtocol](c, value))+}++func (_ FfiConverterOptionalServiceProtocol) Write(writer io.Writer, value *ServiceProtocol) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterServiceProtocolINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalServiceProtocol struct{}++func (_ FfiDestroyerOptionalServiceProtocol) Destroy(value *ServiceProtocol) {+ if value != nil {+ FfiDestroyerServiceProtocol{}.Destroy(*value)+ }+}++type FfiConverterOptionalSequenceString struct{}++var FfiConverterOptionalSequenceStringINSTANCE = FfiConverterOptionalSequenceString{}++func (c FfiConverterOptionalSequenceString) Lift(rb RustBufferI) *[]string {+ return LiftFromRustBuffer[*[]string](c, rb)+}++func (_ FfiConverterOptionalSequenceString) Read(reader io.Reader) *[]string {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterSequenceStringINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalSequenceString) Lower(value *[]string) C.RustBuffer {+ return LowerIntoRustBuffer[*[]string](c, value)+}++func (c FfiConverterOptionalSequenceString) LowerExternal(value *[]string) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*[]string](c, value))+}++func (_ FfiConverterOptionalSequenceString) Write(writer io.Writer, value *[]string) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterSequenceStringINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalSequenceString struct{}++func (_ FfiDestroyerOptionalSequenceString) Destroy(value *[]string) {+ if value != nil {+ FfiDestroyerSequenceString{}.Destroy(*value)+ }+}++type FfiConverterOptionalSequencePreservedJson struct{}++var FfiConverterOptionalSequencePreservedJsonINSTANCE = FfiConverterOptionalSequencePreservedJson{}++func (c FfiConverterOptionalSequencePreservedJson) Lift(rb RustBufferI) *[]*PreservedJson {+ return LiftFromRustBuffer[*[]*PreservedJson](c, rb)+}++func (_ FfiConverterOptionalSequencePreservedJson) Read(reader io.Reader) *[]*PreservedJson {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterSequencePreservedJsonINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalSequencePreservedJson) Lower(value *[]*PreservedJson) C.RustBuffer {+ return LowerIntoRustBuffer[*[]*PreservedJson](c, value)+}++func (c FfiConverterOptionalSequencePreservedJson) LowerExternal(value *[]*PreservedJson) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*[]*PreservedJson](c, value))+}++func (_ FfiConverterOptionalSequencePreservedJson) Write(writer io.Writer, value *[]*PreservedJson) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterSequencePreservedJsonINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalSequencePreservedJson struct{}++func (_ FfiDestroyerOptionalSequencePreservedJson) Destroy(value *[]*PreservedJson) {+ if value != nil {+ FfiDestroyerSequencePreservedJson{}.Destroy(*value)+ }+}++type FfiConverterOptionalSequenceOsGymSandboxClaimCondition struct{}++var FfiConverterOptionalSequenceOsGymSandboxClaimConditionINSTANCE = FfiConverterOptionalSequenceOsGymSandboxClaimCondition{}++func (c FfiConverterOptionalSequenceOsGymSandboxClaimCondition) Lift(rb RustBufferI) *[]OsGymSandboxClaimCondition {+ return LiftFromRustBuffer[*[]OsGymSandboxClaimCondition](c, rb)+}++func (_ FfiConverterOptionalSequenceOsGymSandboxClaimCondition) Read(reader io.Reader) *[]OsGymSandboxClaimCondition {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterSequenceOsGymSandboxClaimConditionINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalSequenceOsGymSandboxClaimCondition) Lower(value *[]OsGymSandboxClaimCondition) C.RustBuffer {+ return LowerIntoRustBuffer[*[]OsGymSandboxClaimCondition](c, value)+}++func (c FfiConverterOptionalSequenceOsGymSandboxClaimCondition) LowerExternal(value *[]OsGymSandboxClaimCondition) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*[]OsGymSandboxClaimCondition](c, value))+}++func (_ FfiConverterOptionalSequenceOsGymSandboxClaimCondition) Write(writer io.Writer, value *[]OsGymSandboxClaimCondition) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterSequenceOsGymSandboxClaimConditionINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalSequenceOsGymSandboxClaimCondition struct{}++func (_ FfiDestroyerOptionalSequenceOsGymSandboxClaimCondition) Destroy(value *[]OsGymSandboxClaimCondition) {+ if value != nil {+ FfiDestroyerSequenceOsGymSandboxClaimCondition{}.Destroy(*value)+ }+}++type FfiConverterOptionalSequenceSandboxService struct{}++var FfiConverterOptionalSequenceSandboxServiceINSTANCE = FfiConverterOptionalSequenceSandboxService{}++func (c FfiConverterOptionalSequenceSandboxService) Lift(rb RustBufferI) *[]SandboxService {+ return LiftFromRustBuffer[*[]SandboxService](c, rb)+}++func (_ FfiConverterOptionalSequenceSandboxService) Read(reader io.Reader) *[]SandboxService {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterSequenceSandboxServiceINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalSequenceSandboxService) Lower(value *[]SandboxService) C.RustBuffer {+ return LowerIntoRustBuffer[*[]SandboxService](c, value)+}++func (c FfiConverterOptionalSequenceSandboxService) LowerExternal(value *[]SandboxService) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*[]SandboxService](c, value))+}++func (_ FfiConverterOptionalSequenceSandboxService) Write(writer io.Writer, value *[]SandboxService) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterSequenceSandboxServiceINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalSequenceSandboxService struct{}++func (_ FfiDestroyerOptionalSequenceSandboxService) Destroy(value *[]SandboxService) {+ if value != nil {+ FfiDestroyerSequenceSandboxService{}.Destroy(*value)+ }+}++type FfiConverterOptionalMapStringString struct{}++var FfiConverterOptionalMapStringStringINSTANCE = FfiConverterOptionalMapStringString{}++func (c FfiConverterOptionalMapStringString) Lift(rb RustBufferI) *map[string]string {+ return LiftFromRustBuffer[*map[string]string](c, rb)+}++func (_ FfiConverterOptionalMapStringString) Read(reader io.Reader) *map[string]string {+ if readInt8(reader) == 0 {+ return nil+ }+ temp := FfiConverterMapStringStringINSTANCE.Read(reader)+ return &temp+}++func (c FfiConverterOptionalMapStringString) Lower(value *map[string]string) C.RustBuffer {+ return LowerIntoRustBuffer[*map[string]string](c, value)+}++func (c FfiConverterOptionalMapStringString) LowerExternal(value *map[string]string) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[*map[string]string](c, value))+}++func (_ FfiConverterOptionalMapStringString) Write(writer io.Writer, value *map[string]string) {+ if value == nil {+ writeInt8(writer, 0)+ } else {+ writeInt8(writer, 1)+ FfiConverterMapStringStringINSTANCE.Write(writer, *value)+ }+}++type FfiDestroyerOptionalMapStringString struct{}++func (_ FfiDestroyerOptionalMapStringString) Destroy(value *map[string]string) {+ if value != nil {+ FfiDestroyerMapStringString{}.Destroy(*value)+ }+}++type FfiConverterSequenceString struct{}++var FfiConverterSequenceStringINSTANCE = FfiConverterSequenceString{}++func (c FfiConverterSequenceString) Lift(rb RustBufferI) []string {+ return LiftFromRustBuffer[[]string](c, rb)+}++func (c FfiConverterSequenceString) Read(reader io.Reader) []string {+ length := readInt32(reader)+ if length == 0 {+ return nil+ }+ result := make([]string, 0, length)+ for i := int32(0); i < length; i++ {+ result = append(result, FfiConverterStringINSTANCE.Read(reader))+ }+ return result+}++func (c FfiConverterSequenceString) Lower(value []string) C.RustBuffer {+ return LowerIntoRustBuffer[[]string](c, value)+}++func (c FfiConverterSequenceString) LowerExternal(value []string) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[[]string](c, value))+}++func (c FfiConverterSequenceString) Write(writer io.Writer, value []string) {+ if len(value) > math.MaxInt32 {+ panic("[]string is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ for _, item := range value {+ FfiConverterStringINSTANCE.Write(writer, item)+ }+}++type FfiDestroyerSequenceString struct{}++func (FfiDestroyerSequenceString) Destroy(sequence []string) {+ for _, value := range sequence {+ FfiDestroyerString{}.Destroy(value)+ }+}++type FfiConverterSequencePreservedJson struct{}++var FfiConverterSequencePreservedJsonINSTANCE = FfiConverterSequencePreservedJson{}++func (c FfiConverterSequencePreservedJson) Lift(rb RustBufferI) []*PreservedJson {+ return LiftFromRustBuffer[[]*PreservedJson](c, rb)+}++func (c FfiConverterSequencePreservedJson) Read(reader io.Reader) []*PreservedJson {+ length := readInt32(reader)+ if length == 0 {+ return nil+ }+ result := make([]*PreservedJson, 0, length)+ for i := int32(0); i < length; i++ {+ result = append(result, FfiConverterPreservedJsonINSTANCE.Read(reader))+ }+ return result+}++func (c FfiConverterSequencePreservedJson) Lower(value []*PreservedJson) C.RustBuffer {+ return LowerIntoRustBuffer[[]*PreservedJson](c, value)+}++func (c FfiConverterSequencePreservedJson) LowerExternal(value []*PreservedJson) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[[]*PreservedJson](c, value))+}++func (c FfiConverterSequencePreservedJson) Write(writer io.Writer, value []*PreservedJson) {+ if len(value) > math.MaxInt32 {+ panic("[]*PreservedJson is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ for _, item := range value {+ FfiConverterPreservedJsonINSTANCE.Write(writer, item)+ }+}++type FfiDestroyerSequencePreservedJson struct{}++func (FfiDestroyerSequencePreservedJson) Destroy(sequence []*PreservedJson) {+ for _, value := range sequence {+ FfiDestroyerPreservedJson{}.Destroy(value)+ }+}++type FfiConverterSequenceOsGymSandboxClaimCondition struct{}++var FfiConverterSequenceOsGymSandboxClaimConditionINSTANCE = FfiConverterSequenceOsGymSandboxClaimCondition{}++func (c FfiConverterSequenceOsGymSandboxClaimCondition) Lift(rb RustBufferI) []OsGymSandboxClaimCondition {+ return LiftFromRustBuffer[[]OsGymSandboxClaimCondition](c, rb)+}++func (c FfiConverterSequenceOsGymSandboxClaimCondition) Read(reader io.Reader) []OsGymSandboxClaimCondition {+ length := readInt32(reader)+ if length == 0 {+ return nil+ }+ result := make([]OsGymSandboxClaimCondition, 0, length)+ for i := int32(0); i < length; i++ {+ result = append(result, FfiConverterOsGymSandboxClaimConditionINSTANCE.Read(reader))+ }+ return result+}++func (c FfiConverterSequenceOsGymSandboxClaimCondition) Lower(value []OsGymSandboxClaimCondition) C.RustBuffer {+ return LowerIntoRustBuffer[[]OsGymSandboxClaimCondition](c, value)+}++func (c FfiConverterSequenceOsGymSandboxClaimCondition) LowerExternal(value []OsGymSandboxClaimCondition) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[[]OsGymSandboxClaimCondition](c, value))+}++func (c FfiConverterSequenceOsGymSandboxClaimCondition) Write(writer io.Writer, value []OsGymSandboxClaimCondition) {+ if len(value) > math.MaxInt32 {+ panic("[]OsGymSandboxClaimCondition is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ for _, item := range value {+ FfiConverterOsGymSandboxClaimConditionINSTANCE.Write(writer, item)+ }+}++type FfiDestroyerSequenceOsGymSandboxClaimCondition struct{}++func (FfiDestroyerSequenceOsGymSandboxClaimCondition) Destroy(sequence []OsGymSandboxClaimCondition) {+ for _, value := range sequence {+ FfiDestroyerOsGymSandboxClaimCondition{}.Destroy(value)+ }+}++type FfiConverterSequenceSandboxService struct{}++var FfiConverterSequenceSandboxServiceINSTANCE = FfiConverterSequenceSandboxService{}++func (c FfiConverterSequenceSandboxService) Lift(rb RustBufferI) []SandboxService {+ return LiftFromRustBuffer[[]SandboxService](c, rb)+}++func (c FfiConverterSequenceSandboxService) Read(reader io.Reader) []SandboxService {+ length := readInt32(reader)+ if length == 0 {+ return nil+ }+ result := make([]SandboxService, 0, length)+ for i := int32(0); i < length; i++ {+ result = append(result, FfiConverterSandboxServiceINSTANCE.Read(reader))+ }+ return result+}++func (c FfiConverterSequenceSandboxService) Lower(value []SandboxService) C.RustBuffer {+ return LowerIntoRustBuffer[[]SandboxService](c, value)+}++func (c FfiConverterSequenceSandboxService) LowerExternal(value []SandboxService) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[[]SandboxService](c, value))+}++func (c FfiConverterSequenceSandboxService) Write(writer io.Writer, value []SandboxService) {+ if len(value) > math.MaxInt32 {+ panic("[]SandboxService is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(value)))+ for _, item := range value {+ FfiConverterSandboxServiceINSTANCE.Write(writer, item)+ }+}++type FfiDestroyerSequenceSandboxService struct{}++func (FfiDestroyerSequenceSandboxService) Destroy(sequence []SandboxService) {+ for _, value := range sequence {+ FfiDestroyerSandboxService{}.Destroy(value)+ }+}++type FfiConverterMapStringString struct{}++var FfiConverterMapStringStringINSTANCE = FfiConverterMapStringString{}++func (c FfiConverterMapStringString) Lift(rb RustBufferI) map[string]string {+ return LiftFromRustBuffer[map[string]string](c, rb)+}++func (_ FfiConverterMapStringString) Read(reader io.Reader) map[string]string {+ result := make(map[string]string)+ length := readInt32(reader)+ for i := int32(0); i < length; i++ {+ key := FfiConverterStringINSTANCE.Read(reader)+ value := FfiConverterStringINSTANCE.Read(reader)+ result[key] = value+ }+ return result+}++func (c FfiConverterMapStringString) Lower(value map[string]string) C.RustBuffer {+ return LowerIntoRustBuffer[map[string]string](c, value)+}++func (c FfiConverterMapStringString) LowerExternal(value map[string]string) ExternalCRustBuffer {+ return RustBufferFromC(LowerIntoRustBuffer[map[string]string](c, value))+}++func (_ FfiConverterMapStringString) Write(writer io.Writer, mapValue map[string]string) {+ if len(mapValue) > math.MaxInt32 {+ panic("map[string]string is too large to fit into Int32")+ }++ writeInt32(writer, int32(len(mapValue)))+ for key, value := range mapValue {+ FfiConverterStringINSTANCE.Write(writer, key)+ FfiConverterStringINSTANCE.Write(writer, value)+ }+}++type FfiDestroyerMapStringString struct{}++func (_ FfiDestroyerMapStringString) Destroy(mapValue map[string]string) {+ for key, value := range mapValue {+ FfiDestroyerString{}.Destroy(key)+ FfiDestroyerString{}.Destroy(value)+ }+}diff --git a/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.h b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.hnew file mode 100644index 0000000000..69857cfd60--- /dev/null+++ b/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema/cyclops_sdk_schema.h@@ -0,0 +1,686 @@+++// This file was autogenerated by some hot garbage in the `uniffi` crate.+// Trust me, you don't want to mess with it!++++#include <stdbool.h>+#include <stdint.h>++// The following structs are used to implement the lowest level+// of the FFI, and thus useful to multiple uniffied crates.+// We ensure they are declared exactly once, with a header guard, UNIFFI_SHARED_H.+#ifdef UNIFFI_SHARED_H+ // We also try to prevent mixing versions of shared uniffi header structs.+ // If you add anything to the #else block, you must increment the version suffix in UNIFFI_SHARED_HEADER_V6+ #ifndef UNIFFI_SHARED_HEADER_V6+ #error Combining helper code from multiple versions of uniffi is not supported+ #endif // ndef UNIFFI_SHARED_HEADER_V6+#else+#define UNIFFI_SHARED_H+#define UNIFFI_SHARED_HEADER_V6+// ⚠️ Attention: If you change this #else block (ending in `#endif // def UNIFFI_SHARED_H`) you *must* ⚠️+// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V6 in this file. ⚠️++typedef struct RustBuffer {+ uint64_t capacity;+ uint64_t len;+ uint8_t *data;+} RustBuffer;++typedef struct ForeignBytes {+ int32_t len;+ const uint8_t *data;+} ForeignBytes;++// Error definitions+typedef struct RustCallStatus {+ int8_t code;+ RustBuffer errorBuf;+} RustCallStatus;++#endif // UNIFFI_SHARED_H+++#ifndef UNIFFI_FFIDEF_RUST_FUTURE_CONTINUATION_CALLBACK+#define UNIFFI_FFIDEF_RUST_FUTURE_CONTINUATION_CALLBACK+typedef void (*UniffiRustFutureContinuationCallback)(uint64_t data, int8_t poll_result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiRustFutureContinuationCallback(+ UniffiRustFutureContinuationCallback cb, uint64_t data, int8_t poll_result)+{+ return cb(data, poll_result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_DROPPED_CALLBACK+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_DROPPED_CALLBACK+typedef void (*UniffiForeignFutureDroppedCallback)(uint64_t handle);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureDroppedCallback(+ UniffiForeignFutureDroppedCallback cb, uint64_t handle)+{+ return cb(handle);+}+++#endif+#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_FREE+#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_FREE+typedef void (*UniffiCallbackInterfaceFree)(uint64_t handle);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiCallbackInterfaceFree(+ UniffiCallbackInterfaceFree cb, uint64_t handle)+{+ return cb(handle);+}+++#endif+#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_CLONE+#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_CLONE+typedef uint64_t (*UniffiCallbackInterfaceClone)(uint64_t handle);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static uint64_t call_UniffiCallbackInterfaceClone(+ UniffiCallbackInterfaceClone cb, uint64_t handle)+{+ return cb(handle);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_DROPPED_CALLBACK_STRUCT+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_DROPPED_CALLBACK_STRUCT+typedef struct UniffiForeignFutureDroppedCallbackStruct {+ uint64_t handle;+ UniffiForeignFutureDroppedCallback free;+} UniffiForeignFutureDroppedCallbackStruct;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U8+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U8+typedef struct UniffiForeignFutureResultU8 {+ uint8_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultU8;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U8+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U8+typedef void (*UniffiForeignFutureCompleteU8)(uint64_t callback_data, UniffiForeignFutureResultU8 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteU8(+ UniffiForeignFutureCompleteU8 cb, uint64_t callback_data, UniffiForeignFutureResultU8 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I8+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I8+typedef struct UniffiForeignFutureResultI8 {+ int8_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultI8;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I8+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I8+typedef void (*UniffiForeignFutureCompleteI8)(uint64_t callback_data, UniffiForeignFutureResultI8 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteI8(+ UniffiForeignFutureCompleteI8 cb, uint64_t callback_data, UniffiForeignFutureResultI8 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U16+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U16+typedef struct UniffiForeignFutureResultU16 {+ uint16_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultU16;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U16+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U16+typedef void (*UniffiForeignFutureCompleteU16)(uint64_t callback_data, UniffiForeignFutureResultU16 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteU16(+ UniffiForeignFutureCompleteU16 cb, uint64_t callback_data, UniffiForeignFutureResultU16 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I16+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I16+typedef struct UniffiForeignFutureResultI16 {+ int16_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultI16;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I16+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I16+typedef void (*UniffiForeignFutureCompleteI16)(uint64_t callback_data, UniffiForeignFutureResultI16 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteI16(+ UniffiForeignFutureCompleteI16 cb, uint64_t callback_data, UniffiForeignFutureResultI16 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U32+typedef struct UniffiForeignFutureResultU32 {+ uint32_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultU32;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U32+typedef void (*UniffiForeignFutureCompleteU32)(uint64_t callback_data, UniffiForeignFutureResultU32 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteU32(+ UniffiForeignFutureCompleteU32 cb, uint64_t callback_data, UniffiForeignFutureResultU32 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I32+typedef struct UniffiForeignFutureResultI32 {+ int32_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultI32;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I32+typedef void (*UniffiForeignFutureCompleteI32)(uint64_t callback_data, UniffiForeignFutureResultI32 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteI32(+ UniffiForeignFutureCompleteI32 cb, uint64_t callback_data, UniffiForeignFutureResultI32 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_U64+typedef struct UniffiForeignFutureResultU64 {+ uint64_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultU64;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U64+typedef void (*UniffiForeignFutureCompleteU64)(uint64_t callback_data, UniffiForeignFutureResultU64 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteU64(+ UniffiForeignFutureCompleteU64 cb, uint64_t callback_data, UniffiForeignFutureResultU64 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_I64+typedef struct UniffiForeignFutureResultI64 {+ int64_t returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultI64;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I64+typedef void (*UniffiForeignFutureCompleteI64)(uint64_t callback_data, UniffiForeignFutureResultI64 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteI64(+ UniffiForeignFutureCompleteI64 cb, uint64_t callback_data, UniffiForeignFutureResultI64 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_F32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_F32+typedef struct UniffiForeignFutureResultF32 {+ float returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultF32;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F32+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F32+typedef void (*UniffiForeignFutureCompleteF32)(uint64_t callback_data, UniffiForeignFutureResultF32 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteF32(+ UniffiForeignFutureCompleteF32 cb, uint64_t callback_data, UniffiForeignFutureResultF32 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_F64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_F64+typedef struct UniffiForeignFutureResultF64 {+ double returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultF64;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F64+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F64+typedef void (*UniffiForeignFutureCompleteF64)(uint64_t callback_data, UniffiForeignFutureResultF64 result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteF64(+ UniffiForeignFutureCompleteF64 cb, uint64_t callback_data, UniffiForeignFutureResultF64 result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_RUST_BUFFER+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_RUST_BUFFER+typedef struct UniffiForeignFutureResultRustBuffer {+ RustBuffer returnValue;+ RustCallStatus callStatus;+} UniffiForeignFutureResultRustBuffer;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER+typedef void (*UniffiForeignFutureCompleteRustBuffer)(uint64_t callback_data, UniffiForeignFutureResultRustBuffer result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteRustBuffer(+ UniffiForeignFutureCompleteRustBuffer cb, uint64_t callback_data, UniffiForeignFutureResultRustBuffer result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_VOID+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_RESULT_VOID+typedef struct UniffiForeignFutureResultVoid {+ RustCallStatus callStatus;+} UniffiForeignFutureResultVoid;++#endif+#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_VOID+#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_VOID+typedef void (*UniffiForeignFutureCompleteVoid)(uint64_t callback_data, UniffiForeignFutureResultVoid result);++// Making function static workaround:+// https://github.com/golang/go/issues/11263+static void call_UniffiForeignFutureCompleteVoid(+ UniffiForeignFutureCompleteVoid cb, uint64_t callback_data, UniffiForeignFutureResultVoid result)+{+ return cb(callback_data, result);+}+++#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_CLONE_PRESERVEDJSON+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_CLONE_PRESERVEDJSON+uint64_t uniffi_cyclops_sdk_schema_fn_clone_preservedjson(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_FREE_PRESERVEDJSON+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_FREE_PRESERVEDJSON+void uniffi_cyclops_sdk_schema_fn_free_preservedjson(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_CONSTRUCTOR_PRESERVEDJSON_FROM_JSON+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_CONSTRUCTOR_PRESERVEDJSON_FROM_JSON+uint64_t uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(RustBuffer value, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_PRESERVEDJSON_TO_JSON+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_PRESERVEDJSON_TO_JSON+RustBuffer uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json(uint64_t ptr, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_POOLSPEC_UNIFFI_TRAIT_EQ_EQ+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_POOLSPEC_UNIFFI_TRAIT_EQ_EQ+int8_t uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq(RustBuffer ptr, RustBuffer other, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_POOLSPEC_UNIFFI_TRAIT_EQ_NE+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_POOLSPEC_UNIFFI_TRAIT_EQ_NE+int8_t uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_ne(RustBuffer ptr, RustBuffer other, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_POOLSPEC_UNIFFI_TRAIT_HASH+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_FN_METHOD_POOLSPEC_UNIFFI_TRAIT_HASH+uint64_t uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash(RustBuffer ptr, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUSTBUFFER_ALLOC+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUSTBUFFER_ALLOC+RustBuffer ffi_cyclops_sdk_schema_rustbuffer_alloc(uint64_t size, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUSTBUFFER_FROM_BYTES+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUSTBUFFER_FROM_BYTES+RustBuffer ffi_cyclops_sdk_schema_rustbuffer_from_bytes(ForeignBytes bytes, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUSTBUFFER_FREE+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUSTBUFFER_FREE+void ffi_cyclops_sdk_schema_rustbuffer_free(RustBuffer buf, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUSTBUFFER_RESERVE+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUSTBUFFER_RESERVE+RustBuffer ffi_cyclops_sdk_schema_rustbuffer_reserve(RustBuffer buf, uint64_t additional, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_U8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_U8+void ffi_cyclops_sdk_schema_rust_future_poll_u8(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_U8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_U8+void ffi_cyclops_sdk_schema_rust_future_cancel_u8(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_U8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_U8+void ffi_cyclops_sdk_schema_rust_future_free_u8(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_U8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_U8+uint8_t ffi_cyclops_sdk_schema_rust_future_complete_u8(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_I8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_I8+void ffi_cyclops_sdk_schema_rust_future_poll_i8(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_I8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_I8+void ffi_cyclops_sdk_schema_rust_future_cancel_i8(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_I8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_I8+void ffi_cyclops_sdk_schema_rust_future_free_i8(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_I8+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_I8+int8_t ffi_cyclops_sdk_schema_rust_future_complete_i8(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_U16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_U16+void ffi_cyclops_sdk_schema_rust_future_poll_u16(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_U16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_U16+void ffi_cyclops_sdk_schema_rust_future_cancel_u16(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_U16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_U16+void ffi_cyclops_sdk_schema_rust_future_free_u16(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_U16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_U16+uint16_t ffi_cyclops_sdk_schema_rust_future_complete_u16(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_I16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_I16+void ffi_cyclops_sdk_schema_rust_future_poll_i16(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_I16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_I16+void ffi_cyclops_sdk_schema_rust_future_cancel_i16(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_I16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_I16+void ffi_cyclops_sdk_schema_rust_future_free_i16(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_I16+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_I16+int16_t ffi_cyclops_sdk_schema_rust_future_complete_i16(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_U32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_U32+void ffi_cyclops_sdk_schema_rust_future_poll_u32(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_U32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_U32+void ffi_cyclops_sdk_schema_rust_future_cancel_u32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_U32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_U32+void ffi_cyclops_sdk_schema_rust_future_free_u32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_U32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_U32+uint32_t ffi_cyclops_sdk_schema_rust_future_complete_u32(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_I32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_I32+void ffi_cyclops_sdk_schema_rust_future_poll_i32(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_I32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_I32+void ffi_cyclops_sdk_schema_rust_future_cancel_i32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_I32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_I32+void ffi_cyclops_sdk_schema_rust_future_free_i32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_I32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_I32+int32_t ffi_cyclops_sdk_schema_rust_future_complete_i32(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_U64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_U64+void ffi_cyclops_sdk_schema_rust_future_poll_u64(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_U64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_U64+void ffi_cyclops_sdk_schema_rust_future_cancel_u64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_U64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_U64+void ffi_cyclops_sdk_schema_rust_future_free_u64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_U64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_U64+uint64_t ffi_cyclops_sdk_schema_rust_future_complete_u64(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_I64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_I64+void ffi_cyclops_sdk_schema_rust_future_poll_i64(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_I64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_I64+void ffi_cyclops_sdk_schema_rust_future_cancel_i64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_I64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_I64+void ffi_cyclops_sdk_schema_rust_future_free_i64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_I64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_I64+int64_t ffi_cyclops_sdk_schema_rust_future_complete_i64(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_F32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_F32+void ffi_cyclops_sdk_schema_rust_future_poll_f32(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_F32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_F32+void ffi_cyclops_sdk_schema_rust_future_cancel_f32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_F32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_F32+void ffi_cyclops_sdk_schema_rust_future_free_f32(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_F32+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_F32+float ffi_cyclops_sdk_schema_rust_future_complete_f32(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_F64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_F64+void ffi_cyclops_sdk_schema_rust_future_poll_f64(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_F64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_F64+void ffi_cyclops_sdk_schema_rust_future_cancel_f64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_F64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_F64+void ffi_cyclops_sdk_schema_rust_future_free_f64(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_F64+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_F64+double ffi_cyclops_sdk_schema_rust_future_complete_f64(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_RUST_BUFFER+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_RUST_BUFFER+void ffi_cyclops_sdk_schema_rust_future_poll_rust_buffer(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_RUST_BUFFER+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_RUST_BUFFER+void ffi_cyclops_sdk_schema_rust_future_cancel_rust_buffer(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_RUST_BUFFER+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_RUST_BUFFER+void ffi_cyclops_sdk_schema_rust_future_free_rust_buffer(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_RUST_BUFFER+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_RUST_BUFFER+RustBuffer ffi_cyclops_sdk_schema_rust_future_complete_rust_buffer(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_VOID+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_POLL_VOID+void ffi_cyclops_sdk_schema_rust_future_poll_void(uint64_t handle, UniffiRustFutureContinuationCallback callback, uint64_t callback_data+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_VOID+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_CANCEL_VOID+void ffi_cyclops_sdk_schema_rust_future_cancel_void(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_VOID+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_FREE_VOID+void ffi_cyclops_sdk_schema_rust_future_free_void(uint64_t handle+);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_VOID+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_RUST_FUTURE_COMPLETE_VOID+void ffi_cyclops_sdk_schema_rust_future_complete_void(uint64_t handle, RustCallStatus *out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_PRESERVEDJSON_TO_JSON+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_METHOD_PRESERVEDJSON_TO_JSON+uint16_t uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_CONSTRUCTOR_PRESERVEDJSON_FROM_JSON+#define UNIFFI_FFIDEF_UNIFFI_CYCLOPS_SDK_SCHEMA_CHECKSUM_CONSTRUCTOR_PRESERVEDJSON_FROM_JSON+uint16_t uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json(void++);+#endif+#ifndef UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_UNIFFI_CONTRACT_VERSION+#define UNIFFI_FFIDEF_FFI_CYCLOPS_SDK_SCHEMA_UNIFFI_CONTRACT_VERSION+uint32_t ffi_cyclops_sdk_schema_uniffi_contract_version(void++);+#endif+diff --git a/libs/fleet/sdk-bindings/go-uniffi/examples/README.md b/libs/fleet/sdk-bindings/go-uniffi/examples/README.mdnew file mode 100644index 0000000000..287c223bcf--- /dev/null+++ b/libs/fleet/sdk-bindings/go-uniffi/examples/README.md@@ -0,0 +1,39 @@+# Go live lifecycle example++This example creates a one-replica pool, creates a claim for that pool, waits+for a sandbox, calls its `mcp` service at `GET /health`, then deletes the claim+and pool. It is excluded from normal package builds with `//go:build ignore`.++## Prerequisites++- Go 1.22 or newer.+- A built `libcyclops_sdk` cdylib visible to cgo. See the parent binding README+ for `CGO_LDFLAGS` and runtime-loader examples.+- An image exposing an MCP service on port `3000` that responds to `GET /health`.++## Configuration++| Variable | Required | Description |+| --- | --- | --- |+| `CYCLOPS_BASE_URL` | Yes | Cyclops control-plane base URL. |+| `CYCLOPS_TOKEN_URL` | Yes | OAuth token endpoint. |+| `CYCLOPS_CLIENT_ID` | Yes | OAuth client ID. |+| `CYCLOPS_CLIENT_SECRET` | Yes | OAuth client secret. |+| `CYCLOPS_NAMESPACE` | Yes | Namespace where resources are created. |+| `CYCLOPS_IMAGE` | Yes | Container-disk image for the pool template. |+| `CYCLOPS_IMAGE_PULL_SECRET` | No | Kubernetes image-pull secret name. |++```bash+export CYCLOPS_BASE_URL="https://cyclops.example"+export CYCLOPS_TOKEN_URL="https://auth.example/oauth/token"+export CYCLOPS_CLIENT_ID="example-client"+export CYCLOPS_CLIENT_SECRET="replace-me"+export CYCLOPS_NAMESPACE="default"+export CYCLOPS_IMAGE="registry.example/cyclops-mcp:latest"++cd cyclops-cs/sdk-bindings/go-uniffi/examples+CGO_LDFLAGS='-L/path/to/native -lcyclops_sdk' LD_LIBRARY_PATH=/path/to/native go run main.go+```++The example always attempts to delete resources it created, including after a+failed wait or service request. Delete resources manually if termination prevents cleanup.diff --git a/libs/fleet/sdk-bindings/go-uniffi/examples/main.go b/libs/fleet/sdk-bindings/go-uniffi/examples/main.gonew file mode 100644index 0000000000..87bb38020c--- /dev/null+++ b/libs/fleet/sdk-bindings/go-uniffi/examples/main.go@@ -0,0 +1,136 @@+//go:build ignore++package main++import (+ "bytes"+ "fmt"+ "io"+ "net/http"+ "os"++ "github.com/trycua/cloud/cyclops-cs/sdk-bindings/go-uniffi/cyclops_sdk"+ "github.com/trycua/cloud/cyclops-cs/sdk-bindings/go-uniffi/cyclops_sdk_schema"+)++const (+ serviceName = "mcp"+ servicePath = "/health"+)++type netHTTPClient struct{ client *http.Client }++func (c netHTTPClient) Execute(request cyclops_sdk.HttpRequest) (cyclops_sdk.HttpResponse, error) {+ var body io.Reader+ if request.Body != nil {+ body = bytes.NewReader(*request.Body)+ }+ nativeRequest, err := http.NewRequest(request.Method, request.Url, body)+ if err != nil {+ return cyclops_sdk.HttpResponse{}, err+ }+ for _, header := range request.Headers {+ nativeRequest.Header.Add(header.Name, header.Value)+ }+ nativeResponse, err := c.client.Do(nativeRequest)+ if err != nil {+ return cyclops_sdk.HttpResponse{}, err+ }+ defer nativeResponse.Body.Close()+ responseBody, err := io.ReadAll(nativeResponse.Body)+ if err != nil {+ return cyclops_sdk.HttpResponse{}, err+ }+ headers := make([]cyclops_sdk.HttpHeader, 0, len(nativeResponse.Header))+ for name, values := range nativeResponse.Header {+ for _, value := range values {+ headers = append(headers, cyclops_sdk.HttpHeader{Name: name, Value: value})+ }+ }+ return cyclops_sdk.HttpResponse{Status: uint16(nativeResponse.StatusCode), Headers: headers, Body: responseBody}, nil+}++func main() {+ if err := run(); err != nil {+ fmt.Fprintf(os.Stderr, "Lifecycle failed: %v\n", err)+ os.Exit(1)+ }+}++func run() error {+ baseURL := requiredEnv("CYCLOPS_BASE_URL")+ tokenURL := requiredEnv("CYCLOPS_TOKEN_URL")+ clientID := requiredEnv("CYCLOPS_CLIENT_ID")+ clientSecret := requiredEnv("CYCLOPS_CLIENT_SECRET")+ namespace := requiredEnv("CYCLOPS_NAMESPACE")+ image := requiredEnv("CYCLOPS_IMAGE")+ if baseURL == "" || tokenURL == "" || clientID == "" || clientSecret == "" || namespace == "" || image == "" {+ return fmt.Errorf("set all required CYCLOPS_* environment variables; see README.md")+ }++ credentials := cyclops_sdk.NewCyclopsCredentials(clientID, clientSecret)+ client, err := cyclops_sdk.CyclopsClientConnect(cyclops_sdk.CyclopsConfiguration{+ BaseUrl: baseURL, TokenUrl: tokenURL, Credentials: credentials,+ PoolPollIntervalMs: 5000, PoolPollLimit: 100,+ ClaimPollIntervalMs: 5000, ClaimPollLimit: 120,+ }, netHTTPClient{client: &http.Client{}})+ if err != nil {+ return fmt.Errorf("connect client: %w", err)+ }+ defer client.Destroy()++ var pool *cyclops_sdk.Pool+ var claim *cyclops_sdk.Claim+ defer func() {+ if claim != nil {+ fmt.Println("[cleanup] Deleting claim...")+ if err := client.DeleteClaim(*claim); err != nil {+ fmt.Fprintf(os.Stderr, "cleanup claim failed: %v\n", err)+ }+ }+ if pool != nil {+ fmt.Println("[cleanup] Deleting pool...")+ if err := client.DeletePool(*pool); err != nil {+ fmt.Fprintf(os.Stderr, "cleanup pool failed: %v\n", err)+ }+ }+ }()++ fmt.Println("[1/5] Creating pool...")+ cpuCores := uint32(4)+ memory := "4Gi"+ poolSpec := cyclops_sdk_schema.PoolSpec{Replicas: 1, Template: cyclops_sdk_schema.PoolTemplate{ContainerDiskImage: image, CpuCores: &cpuCores, Memory: &memory}}+ if imagePullSecret := os.Getenv("CYCLOPS_IMAGE_PULL_SECRET"); imagePullSecret != "" {+ poolSpec.Template.ImagePullSecret = &imagePullSecret+ }+ services := []cyclops_sdk_schema.SandboxService{{Name: serviceName, TargetPort: 3000}}+ poolSpec.Services = &services+ createdPool, err := client.CreatePool(cyclops_sdk.CreatePoolRequest{Namespace: namespace, Spec: poolSpec})+ if err != nil { return fmt.Errorf("create pool: %w", err) }+ pool = &createdPool+ fmt.Printf("Pool: %+v\n", *pool)++ fmt.Println("[2/5] Creating claim...")+ createdClaim, err := client.CreateClaim(cyclops_sdk.CreateClaimRequest{Pool: *pool})+ if err != nil { return fmt.Errorf("create claim: %w", err) }+ claim = &createdClaim+ fmt.Printf("Claim: %+v\n", *claim)++ fmt.Println("[3/5] Waiting for claim to bind a sandbox...")+ sandbox, err := client.WaitClaim(*claim)+ if err != nil { return fmt.Errorf("wait for claim: %w", err) }+ fmt.Printf("Sandbox: %+v\n", sandbox)++ fmt.Println("[4/5] Calling the sandbox service...")+ response, err := client.ServiceRequest(sandbox, serviceName, servicePath, cyclops_sdk.HttpRequest{Method: http.MethodGet, Url: "https://ignored.invalid" + servicePath, Headers: []cyclops_sdk.HttpHeader{}})+ if err != nil { return fmt.Errorf("service request: %w", err) }+ fmt.Printf("Service response: status=%d body=%q\n", response.Status, response.Body)+ fmt.Println("[5/5] Lifecycle completed; cleanup will now run.")+ return nil+}++func requiredEnv(name string) string {+ value := os.Getenv(name)+ if value == "" { fmt.Fprintf(os.Stderr, "missing required environment variable: %s\n", name) }+ return value+}diff --git a/libs/fleet/sdk-bindings/go-uniffi/go.mod b/libs/fleet/sdk-bindings/go-uniffi/go.modnew file mode 100644index 0000000000..9dad783da6--- /dev/null+++ b/libs/fleet/sdk-bindings/go-uniffi/go.mod@@ -0,0 +1,3 @@+module github.com/trycua/cloud/cyclops-cs/sdk-bindings/go-uniffi++go 1.22diff --git a/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/cyclops_sdk.kt b/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/cyclops_sdk.ktindex b7b5d42b51..1097a60bff 100644--- a/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/cyclops_sdk.kt+++ b/libs/fleet/sdk-bindings/kotlin/ai/cua/cyclops/sdk/cyclops_sdk.kt@@ -118,43 +118,6 @@ internal open class ForeignBytes : Structure() {class ByValue : ForeignBytes(), Structure.ByValue}--// Converter for `&[u8]` / `[ByRef] bytes` arguments.-//-// Only `lower` is valid — zero-copy byte buffers only flow foreign -> Rust,-// and only in argument position. `lift`, `read`, `write`, and-// `allocationSize` have no sound implementation here and all panic at-// runtime. The `FfiConverter` interface is implemented so that the-// compiler enforces the full method set (rather than relying on eyeball).-//-// The provided `ByteBuffer` MUST be direct — only direct buffers have a-// stable native address that JNA can expose via `getDirectBufferPointer`.-// The returned `ForeignBytes.ByValue` is only valid for the duration of-// the FFI call; the Rust side treats it as a borrow.-internal object FfiConverterByRefBytes : FfiConverter<java.nio.ByteBuffer, ForeignBytes.ByValue> {- override fun lower(value: java.nio.ByteBuffer): ForeignBytes.ByValue {- require(value.isDirect) { "UniFFI zero-copy &[u8] requires a direct ByteBuffer. Use ByteBuffer.allocateDirect()." }- val remaining = value.remaining()- val fb = ForeignBytes.ByValue()- fb.len = remaining- // Zero-length direct buffers: skip getDirectBufferPointer (platform-variable behavior)- // and pass null. The Rust side treats (null, 0) as &[].- fb.data = if (remaining == 0) null else com.sun.jna.Native.getDirectBufferPointer(value)- return fb- }-- override fun lift(value: ForeignBytes.ByValue): java.nio.ByteBuffer =- error("ByRef bytes cannot be lifted: zero-copy &[u8] only flows foreign->Rust")-- override fun read(buf: java.nio.ByteBuffer): java.nio.ByteBuffer =- error("ByRef bytes cannot be read from a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")-- override fun write(value: java.nio.ByteBuffer, buf: java.nio.ByteBuffer): Unit =- error("ByRef bytes cannot be written to a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")-- override fun allocationSize(value: java.nio.ByteBuffer): ULong =- error("ByRef bytes have no RustBuffer allocation size: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")-}/*** The FfiConverter interface handles converter types to and from the FFI*@@ -715,33 +678,33 @@ internal object IntegrityCheckingUniffiLib {uniffiCheckApiChecksums(this)}external fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_method_httpclient_execute(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new(- ): Int+ ): Shortexternal fun ffi_cyclops_sdk_uniffi_contract_version(): Int@@ -819,7 +782,7 @@ internal object UniffiLib {external fun ffi_cyclops_sdk_rust_future_free_u8(`handle`: Long,): Unitexternal fun ffi_cyclops_sdk_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,- ): Int+ ): Byteexternal fun ffi_cyclops_sdk_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,): Unitexternal fun ffi_cyclops_sdk_rust_future_cancel_i8(`handle`: Long,@@ -835,7 +798,7 @@ internal object UniffiLib {external fun ffi_cyclops_sdk_rust_future_free_u16(`handle`: Long,): Unitexternal fun ffi_cyclops_sdk_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,- ): Int+ ): Shortexternal fun ffi_cyclops_sdk_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,): Unitexternal fun ffi_cyclops_sdk_rust_future_cancel_i16(`handle`: Long,@@ -923,46 +886,46 @@ private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) {}@Suppress("UNUSED_PARAMETER")private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim() != 51021) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim() != 23330.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim() != 50650) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim() != 20460.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim() != 55182) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim() != 17760.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims() != 26952) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims() != 7802.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim() != 53385) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim() != 18984.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() != 31472) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() != 48557.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() != 9252) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() != 31235.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool() != 44001) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool() != 43327.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() != 25465) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() != 27984.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() != 39705) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() != 17695.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() != 4680) {+ if (lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() != 46699.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_method_httpclient_execute() != 11556) {+ 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_constructor_cyclopsclient_connect() != 48439) {+ if (lib.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() != 54404.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() != 56420) {+ if (lib.uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() != 25746.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}}@@ -1290,10 +1253,6 @@ public object FfiConverterUShort: FfiConverter<UShort, Short> {return value.toUShort()}- fun lift(value: Int): UShort {- return value.toUShort()- }-override fun read(buf: ByteBuffer): UShort {return lift(buf.getShort())}@@ -1585,11 +1544,6 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfaceprivate val wasDestroyed = AtomicBoolean(false)private val callCounter = AtomicLong(1)- /**- * Whether the current object has been destroyed and its reference is gone in the Rust side.- */- val uniffiIsDestroyed: Boolean get() = wasDestroyed.get()-override fun destroy() {// Only allow a single call to this method.// TODO: maybe we should log a warning if called more than once?@@ -1663,8 +1617,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(uniffiHandle,-- FfiConverterTypeCreateClaimRequest.lower(`request`),+ FfiConverterTypeCreateClaimRequest.lower(`request`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },@@ -1685,8 +1638,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(uniffiHandle,-- FfiConverterTypeClaim.lower(`claim`),+ FfiConverterTypeClaim.lower(`claim`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_void(future, callback, continuation) },@@ -1708,8 +1660,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(uniffiHandle,-- FfiConverterTypeClaim.lower(`claim`),+ FfiConverterTypeClaim.lower(`claim`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },@@ -1730,8 +1681,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(uniffiHandle,-- FfiConverterString.lower(`namespace`),+ FfiConverterString.lower(`namespace`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },@@ -1752,8 +1702,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(uniffiHandle,-- FfiConverterTypeClaim.lower(`claim`),+ FfiConverterTypeClaim.lower(`claim`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },@@ -1774,8 +1723,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(uniffiHandle,-- FfiConverterTypeCreatePoolRequest.lower(`request`),+ FfiConverterTypeCreatePoolRequest.lower(`request`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },@@ -1796,8 +1744,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(uniffiHandle,-- FfiConverterTypePool.lower(`pool`),+ FfiConverterTypePool.lower(`pool`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_void(future, callback, continuation) },@@ -1819,8 +1766,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(uniffiHandle,-- FfiConverterTypePool.lower(`pool`),+ FfiConverterTypePool.lower(`pool`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },@@ -1841,8 +1787,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(uniffiHandle,-- FfiConverterString.lower(`namespace`),+ FfiConverterString.lower(`namespace`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },@@ -1863,8 +1808,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(uniffiHandle,-- FfiConverterTypePool.lower(`pool`),+ FfiConverterTypePool.lower(`pool`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },@@ -1885,11 +1829,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfacecallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(uniffiHandle,-- FfiConverterTypeSandbox.lower(`sandbox`),- FfiConverterString.lower(`service`),- FfiConverterString.lower(`path`),- FfiConverterTypeHttpRequest.lower(`request`),+ 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) },@@ -1915,9 +1855,7 @@ open class CyclopsClient: Disposable, AutoCloseable, CyclopsClientInterfaceuniffiRustCallWithError(SdkException) { _status ->UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(-- FfiConverterTypeCyclopsConfiguration.lower(`configuration`),- FfiConverterTypeHttpClient.lower(`httpClient`),_status)+ FfiConverterTypeCyclopsConfiguration.lower(`configuration`),FfiConverterTypeHttpClient.lower(`httpClient`),_status)})}@@ -2082,9 +2020,7 @@ open class CyclopsCredentials: Disposable, AutoCloseable, CyclopsCredentialsInteuniffiRustCall() { _status ->UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(-- FfiConverterString.lower(`clientId`),- FfiConverterString.lower(`clientSecret`),_status)+ FfiConverterString.lower(`clientId`),FfiConverterString.lower(`clientSecret`),_status)})@@ -2094,11 +2030,6 @@ open class CyclopsCredentials: Disposable, AutoCloseable, CyclopsCredentialsInteprivate val wasDestroyed = AtomicBoolean(false)private val callCounter = AtomicLong(1)- /**- * Whether the current object has been destroyed and its reference is gone in the Rust side.- */- val uniffiIsDestroyed: Boolean get() = wasDestroyed.get()-override fun destroy() {// Only allow a single call to this method.// TODO: maybe we should log a warning if called more than once?@@ -2336,11 +2267,6 @@ open class HttpClientImpl: Disposable, AutoCloseable, HttpClientprivate val wasDestroyed = AtomicBoolean(false)private val callCounter = AtomicLong(1)- /**- * Whether the current object has been destroyed and its reference is gone in the Rust side.- */- val uniffiIsDestroyed: Boolean get() = wasDestroyed.get()-override fun destroy() {// Only allow a single call to this method.// TODO: maybe we should log a warning if called more than once?@@ -2414,8 +2340,7 @@ open class HttpClientImpl: Disposable, AutoCloseable, HttpClientcallWithHandle { uniffiHandle ->UniffiLib.uniffi_cyclops_sdk_fn_method_httpclient_execute(uniffiHandle,-- FfiConverterTypeHttpRequest.lower(`request`),+ FfiConverterTypeHttpRequest.lower(`request`),)},{ future, callback, continuation -> UniffiLib.ffi_cyclops_sdk_rust_future_poll_rust_buffer(future, callback, continuation) },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 73a4a8787c..ca6d9139cc 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@@ -99,43 +99,6 @@ internal open class ForeignBytes : Structure() {class ByValue : ForeignBytes(), Structure.ByValue}--// Converter for `&[u8]` / `[ByRef] bytes` arguments.-//-// Only `lower` is valid — zero-copy byte buffers only flow foreign -> Rust,-// and only in argument position. `lift`, `read`, `write`, and-// `allocationSize` have no sound implementation here and all panic at-// runtime. The `FfiConverter` interface is implemented so that the-// compiler enforces the full method set (rather than relying on eyeball).-//-// The provided `ByteBuffer` MUST be direct — only direct buffers have a-// stable native address that JNA can expose via `getDirectBufferPointer`.-// The returned `ForeignBytes.ByValue` is only valid for the duration of-// the FFI call; the Rust side treats it as a borrow.-internal object FfiConverterByRefBytes : FfiConverter<java.nio.ByteBuffer, ForeignBytes.ByValue> {- override fun lower(value: java.nio.ByteBuffer): ForeignBytes.ByValue {- require(value.isDirect) { "UniFFI zero-copy &[u8] requires a direct ByteBuffer. Use ByteBuffer.allocateDirect()." }- val remaining = value.remaining()- val fb = ForeignBytes.ByValue()- fb.len = remaining- // Zero-length direct buffers: skip getDirectBufferPointer (platform-variable behavior)- // and pass null. The Rust side treats (null, 0) as &[].- fb.data = if (remaining == 0) null else com.sun.jna.Native.getDirectBufferPointer(value)- return fb- }-- override fun lift(value: ForeignBytes.ByValue): java.nio.ByteBuffer =- error("ByRef bytes cannot be lifted: zero-copy &[u8] only flows foreign->Rust")-- override fun read(buf: java.nio.ByteBuffer): java.nio.ByteBuffer =- error("ByRef bytes cannot be read from a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")-- override fun write(value: java.nio.ByteBuffer, buf: java.nio.ByteBuffer): Unit =- error("ByRef bytes cannot be written to a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")-- override fun allocationSize(value: java.nio.ByteBuffer): ULong =- error("ByRef bytes have no RustBuffer allocation size: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")-}/*** The FfiConverter interface handles converter types to and from the FFI*@@ -674,9 +637,9 @@ internal object IntegrityCheckingUniffiLib {uniffiCheckApiChecksums(this)}external fun uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json(- ): Int+ ): Shortexternal fun uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json(- ): Int+ ): Shortexternal fun ffi_cyclops_sdk_schema_uniffi_contract_version(): Int@@ -724,7 +687,7 @@ internal object UniffiLib {external fun ffi_cyclops_sdk_schema_rust_future_free_u8(`handle`: Long,): Unitexternal fun ffi_cyclops_sdk_schema_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,- ): Int+ ): Byteexternal fun ffi_cyclops_sdk_schema_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,): Unitexternal fun ffi_cyclops_sdk_schema_rust_future_cancel_i8(`handle`: Long,@@ -740,7 +703,7 @@ internal object UniffiLib {external fun ffi_cyclops_sdk_schema_rust_future_free_u16(`handle`: Long,): Unitexternal fun ffi_cyclops_sdk_schema_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,- ): Int+ ): Shortexternal fun ffi_cyclops_sdk_schema_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,): Unitexternal fun ffi_cyclops_sdk_schema_rust_future_cancel_i16(`handle`: Long,@@ -828,10 +791,10 @@ private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) {}@Suppress("UNUSED_PARAMETER")private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {- if (lib.uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() != 675) {+ if (lib.uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() != 8252.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}- if (lib.uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() != 56364) {+ if (lib.uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() != 24064.toShort()) {throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")}}@@ -999,10 +962,6 @@ public object FfiConverterUShort: FfiConverter<UShort, Short> {return value.toUShort()}- fun lift(value: Int): UShort {- return value.toUShort()- }-override fun read(buf: ByteBuffer): UShort {return lift(buf.getShort())}@@ -1278,11 +1237,6 @@ open class PreservedJson: Disposable, AutoCloseable, PreservedJsonInterfaceprivate val wasDestroyed = AtomicBoolean(false)private val callCounter = AtomicLong(1)- /**- * Whether the current object has been destroyed and its reference is gone in the Rust side.- */- val uniffiIsDestroyed: Boolean get() = wasDestroyed.get()-override fun destroy() {// Only allow a single call to this method.// TODO: maybe we should log a warning if called more than once?@@ -1374,7 +1328,6 @@ open class PreservedJson: Disposable, AutoCloseable, PreservedJsonInterfaceuniffiRustCallWithError(JsonValueException) { _status ->UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(-FfiConverterString.lower(`value`),_status)})@@ -1994,7 +1947,6 @@ data class PoolSpec (return FfiConverterBoolean.lift(uniffiRustCall() { _status ->UniffiLib.uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq(FfiConverterTypePoolSpec.lower(this),-FfiConverterTypePoolSpec.lower(`other`),_status)})diff --git a/libs/fleet/sdk-bindings/python/cyclops_sdk/_schema.py b/libs/fleet/sdk-bindings/python/cyclops_sdk/_schema.pyindex 5121529208..263dce05e5 100644--- a/libs/fleet/sdk-bindings/python/cyclops_sdk/_schema.py+++ b/libs/fleet/sdk-bindings/python/cyclops_sdk/_schema.py@@ -32,8 +32,6 @@ import platform# Used for default argument values_DEFAULT = object() # type: typing.Any-import ctypes-import structclass _UniffiRustBuffer(ctypes.Structure):_fields_ = [@@ -115,49 +113,6 @@ class _UniffiForeignBytes(ctypes.Structure):return "_UniffiForeignBytes(len={}, data={})".format(self.len, self.data[0:self.len])-class _UniffiFfiConverterByRefBytes:- """Zero-copy converter for `&[u8]` / `[ByRef] bytes` arguments.-- Only `lower` and `check_lower` are valid — zero-copy byte buffers only- flow foreign -> Rust, and only in argument position. `lift`, `read`, and- `write` have no sound implementation here.-- CPython `bytes` objects are immutable and their internal buffer doesn't- move for the lifetime of the object; the caller must keep the source- `bytes` alive for the duration of the FFI call.- """-- @staticmethod- def check_lower(value):- # Tighter than `bytes-like`: `lower` uses `ctypes.c_char_p` which only- # accepts `bytes`/`None`, so fail fast with a matching check.- if not isinstance(value, bytes):- raise TypeError("a bytes object is required, not {!r}".format(type(value).__name__))-- @staticmethod- def lower(value):- fb = _UniffiForeignBytes()- if len(value) == 0:- fb.len = 0- fb.data = None- else:- fb.len = len(value)- fb.data = ctypes.cast(ctypes.c_char_p(value), ctypes.POINTER(ctypes.c_char))- return fb-- @staticmethod- def lift(value):- raise NotImplementedError("ByRef bytes cannot be lifted: zero-copy &[u8] only flows foreign->Rust")-- @staticmethod- def read(buf):- raise NotImplementedError("ByRef bytes cannot be read from a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")-- @staticmethod- def write(value, buf):- raise NotImplementedError("ByRef bytes cannot be written to a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")--class _UniffiRustBufferStream:"""Helper for structured reading of bytes from a _UniffiRustBuffer@@ -248,15 +203,14 @@ class _UniffiRustBufferBuilder:def _pack_into(self, size, format, value):with self._reserve(size):- packed = struct.pack(format, value)- if size > 0:- ctypes.memmove(ctypes.addressof(self.rbuf.data.contents) + self.rbuf.len, packed, size)+ # XXX TODO: I feel like I should be able to use `struct.pack_into` here but can't figure it out.+ for i, byte in enumerate(struct.pack(format, value)):+ self.rbuf.data[self.rbuf.len + i] = bytedef write(self, value):- length = len(value)- with self._reserve(length):- if length > 0:- ctypes.memmove(ctypes.addressof(self.rbuf.data.contents) + self.rbuf.len, value, length)+ with self._reserve(len(value)):+ for i, byte in enumerate(value):+ self.rbuf.data[self.rbuf.len + i] = bytedef write_i8(self, v):self._pack_into(1, ">b", v)@@ -524,9 +478,9 @@ def _uniffi_check_contract_api_version(lib):raise InternalError("UniFFI contract version mismatch: try cleaning and rebuilding your project")def _uniffi_check_api_checksums(lib):- if lib.uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() != 675:+ if lib.uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() != 24064:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() != 56364:+ if lib.uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() != 8252:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")# A ctypes library to expose the extern-C FFI definitions.@@ -554,25 +508,253 @@ _UniffiLib.ffi_cyclops_sdk_schema_rustbuffer_reserve.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.ffi_cyclops_sdk_schema_rustbuffer_reserve.restype = _UniffiRustBuffer-_UniffiLib.ffi_cyclops_sdk_schema_uniffi_contract_version.argtypes = (+_UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK = ctypes.CFUNCTYPE(None,ctypes.c_uint64,ctypes.c_int8,)-_UniffiLib.ffi_cyclops_sdk_schema_uniffi_contract_version.restype = ctypes.c_uint32-_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json.argtypes = (+_UNIFFI_FOREIGN_FUTURE_DROPPED_CALLBACK = ctypes.CFUNCTYPE(None,ctypes.c_uint64,)-_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json.argtypes = (+class _UniffiForeignFutureDroppedCallbackStruct(ctypes.Structure):+ _fields_ = [+ ("handle", ctypes.c_uint64),+ ("free", _UNIFFI_FOREIGN_FUTURE_DROPPED_CALLBACK),+ ]+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_u8.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,)-_UniffiLib.uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json.argtypes = (+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_u8.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_u8.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_u8.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_u8.argtypes = (ctypes.c_uint64,ctypes.POINTER(_UniffiRustCallStatus),)-_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json.restype = _UniffiRustBuffer-_UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json.argtypes = (- _UniffiRustBuffer,+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_u8.restype = ctypes.c_uint8+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_u8.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_u8.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_i8.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_i8.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_i8.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_i8.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_i8.argtypes = (+ ctypes.c_uint64,ctypes.POINTER(_UniffiRustCallStatus),)-_UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json.restype = ctypes.c_uint64+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_i8.restype = ctypes.c_int8+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_i8.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_i8.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_u16.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_u16.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_u16.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_u16.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_u16.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_u16.restype = ctypes.c_uint16+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_u16.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_u16.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_i16.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_i16.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_i16.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_i16.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_i16.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_i16.restype = ctypes.c_int16+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_i16.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_i16.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_u32.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_u32.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_u32.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_u32.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_u32.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_u32.restype = ctypes.c_uint32+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_u32.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_u32.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_i32.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_i32.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_i32.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_i32.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_i32.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_i32.restype = ctypes.c_int32+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_i32.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_i32.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_u64.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_u64.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_u64.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_u64.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_u64.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_u64.restype = ctypes.c_uint64+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_u64.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_u64.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_i64.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_i64.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_i64.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_i64.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_i64.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_i64.restype = ctypes.c_int64+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_i64.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_i64.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_f32.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_f32.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_f32.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_f32.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_f32.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_f32.restype = ctypes.c_float+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_f32.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_f32.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_f64.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_f64.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_f64.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_f64.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_f64.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_f64.restype = ctypes.c_double+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_f64.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_f64.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_rust_buffer.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_rust_buffer.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_rust_buffer.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_rust_buffer.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_rust_buffer.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_rust_buffer.restype = _UniffiRustBuffer+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_rust_buffer.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_rust_buffer.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_void.argtypes = (+ ctypes.c_uint64,+ _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_poll_void.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_void.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_cancel_void.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_void.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_complete_void.restype = None+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_void.argtypes = (+ ctypes.c_uint64,+)+_UniffiLib.ffi_cyclops_sdk_schema_rust_future_free_void.restype = None+_UniffiLib.uniffi_cyclops_sdk_schema_fn_clone_preservedjson.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_clone_preservedjson.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_schema_fn_free_preservedjson.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_schema_fn_free_preservedjson.restype = None_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq.argtypes = (_UniffiRustBuffer,_UniffiRustBuffer,@@ -590,16 +772,25 @@ _UniffiLib.uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash.argtypctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_schema_fn_clone_preservedjson.argtypes = (- ctypes.c_uint64,+_UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json.argtypes = (+ _UniffiRustBuffer,ctypes.POINTER(_UniffiRustCallStatus),)-_UniffiLib.uniffi_cyclops_sdk_schema_fn_clone_preservedjson.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_schema_fn_free_preservedjson.argtypes = (+_UniffiLib.uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json.argtypes = (ctypes.c_uint64,ctypes.POINTER(_UniffiRustCallStatus),)-_UniffiLib.uniffi_cyclops_sdk_schema_fn_free_preservedjson.restype = None+_UniffiLib.uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json.restype = _UniffiRustBuffer+_UniffiLib.ffi_cyclops_sdk_schema_uniffi_contract_version.argtypes = (+)+_UniffiLib.ffi_cyclops_sdk_schema_uniffi_contract_version.restype = ctypes.c_uint32+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json.restype = ctypes.c_uint16_uniffi_check_contract_api_version(_UniffiLib)# _uniffi_check_api_checksums(_UniffiLib)@@ -2511,6 +2702,19 @@ class _UniffiFfiConverterUInt64(_UniffiConverterPrimitiveInt):def write(value, buf):buf.write_u64(value)+class _UniffiFfiConverterUInt8(_UniffiConverterPrimitiveInt):+ CLASS_NAME = "u8"+ VALUE_MIN = 0+ VALUE_MAX = 2**8++ @staticmethod+ def read(buf):+ return buf.read_u8()++ @staticmethod+ def write(value, buf):+ buf.write_u8(value)+__all__ = ["InternalError","RuntimeKind",diff --git a/libs/fleet/sdk-bindings/python/cyclops_sdk/_sdk.py b/libs/fleet/sdk-bindings/python/cyclops_sdk/_sdk.pyindex 90a1e8728c..57b8d0bd63 100644--- a/libs/fleet/sdk-bindings/python/cyclops_sdk/_sdk.py+++ b/libs/fleet/sdk-bindings/python/cyclops_sdk/_sdk.py@@ -34,8 +34,6 @@ import cyclops_sdk# Used for default argument values_DEFAULT = object() # type: typing.Any-import ctypes-import structclass _UniffiRustBuffer(ctypes.Structure):_fields_ = [@@ -117,49 +115,6 @@ class _UniffiForeignBytes(ctypes.Structure):return "_UniffiForeignBytes(len={}, data={})".format(self.len, self.data[0:self.len])-class _UniffiFfiConverterByRefBytes:- """Zero-copy converter for `&[u8]` / `[ByRef] bytes` arguments.-- Only `lower` and `check_lower` are valid — zero-copy byte buffers only- flow foreign -> Rust, and only in argument position. `lift`, `read`, and- `write` have no sound implementation here.-- CPython `bytes` objects are immutable and their internal buffer doesn't- move for the lifetime of the object; the caller must keep the source- `bytes` alive for the duration of the FFI call.- """-- @staticmethod- def check_lower(value):- # Tighter than `bytes-like`: `lower` uses `ctypes.c_char_p` which only- # accepts `bytes`/`None`, so fail fast with a matching check.- if not isinstance(value, bytes):- raise TypeError("a bytes object is required, not {!r}".format(type(value).__name__))-- @staticmethod- def lower(value):- fb = _UniffiForeignBytes()- if len(value) == 0:- fb.len = 0- fb.data = None- else:- fb.len = len(value)- fb.data = ctypes.cast(ctypes.c_char_p(value), ctypes.POINTER(ctypes.c_char))- return fb-- @staticmethod- def lift(value):- raise NotImplementedError("ByRef bytes cannot be lifted: zero-copy &[u8] only flows foreign->Rust")-- @staticmethod- def read(buf):- raise NotImplementedError("ByRef bytes cannot be read from a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")-- @staticmethod- def write(value, buf):- raise NotImplementedError("ByRef bytes cannot be written to a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")--class _UniffiRustBufferStream:"""Helper for structured reading of bytes from a _UniffiRustBuffer@@ -250,15 +205,14 @@ class _UniffiRustBufferBuilder:def _pack_into(self, size, format, value):with self._reserve(size):- packed = struct.pack(format, value)- if size > 0:- ctypes.memmove(ctypes.addressof(self.rbuf.data.contents) + self.rbuf.len, packed, size)+ # XXX TODO: I feel like I should be able to use `struct.pack_into` here but can't figure it out.+ for i, byte in enumerate(struct.pack(format, value)):+ self.rbuf.data[self.rbuf.len + i] = bytedef write(self, value):- length = len(value)- with self._reserve(length):- if length > 0:- ctypes.memmove(ctypes.addressof(self.rbuf.data.contents) + self.rbuf.len, value, length)+ with self._reserve(len(value)):+ for i, byte in enumerate(value):+ self.rbuf.data[self.rbuf.len + i] = bytedef write_i8(self, v):self._pack_into(1, ">b", v)@@ -526,33 +480,33 @@ def _uniffi_check_contract_api_version(lib):raise InternalError("UniFFI contract version mismatch: try cleaning and rebuilding your project")def _uniffi_check_api_checksums(lib):- if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim() != 51021:+ 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_method_cyclopsclient_create_pool() != 31472:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim() != 23330:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim() != 50650:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() != 48557:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() != 9252:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim() != 20460:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim() != 55182:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() != 31235:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool() != 44001:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim() != 17760:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims() != 26952:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool() != 43327:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() != 25465:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims() != 7802:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() != 4680:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() != 27984:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() != 39705:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() != 46699:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim() != 53385:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() != 17695:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() != 48439:+ if lib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim() != 18984:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")- if lib.uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() != 56420:+ 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_method_httpclient_execute() != 11556:+ if lib.uniffi_cyclops_sdk_checksum_method_httpclient_execute() != 38803:raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")# A ctypes library to expose the extern-C FFI definitions.@@ -580,162 +534,7 @@ _UniffiLib.ffi_cyclops_sdk_rustbuffer_reserve.argtypes = (ctypes.POINTER(_UniffiRustCallStatus),)_UniffiLib.ffi_cyclops_sdk_rustbuffer_reserve.restype = _UniffiRustBuffer-_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_cyclopsclient_create_claim.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim.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-_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_method_httpclient_execute.argtypes = (-)-_UniffiLib.uniffi_cyclops_sdk_checksum_method_httpclient_execute.restype = ctypes.c_uint16-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,- _UniffiRustBuffer,- _UniffiRustBuffer,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim.argtypes = (- ctypes.c_uint64,- _UniffiRustBuffer,-)-_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect.argtypes = (- _UniffiRustBuffer,- ctypes.c_uint64,- ctypes.POINTER(_UniffiRustCallStatus),-)-_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new.argtypes = (- _UniffiRustBuffer,- _UniffiRustBuffer,- ctypes.POINTER(_UniffiRustCallStatus),-)-_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new.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_clone_cyclopsclient.argtypes = (- ctypes.c_uint64,- ctypes.POINTER(_UniffiRustCallStatus),-)-_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopsclient.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopsclient.argtypes = (- ctypes.c_uint64,- ctypes.POINTER(_UniffiRustCallStatus),-)-_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopsclient.restype = None-_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopscredentials.argtypes = (- ctypes.c_uint64,- ctypes.POINTER(_UniffiRustCallStatus),-)-_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopscredentials.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopscredentials.argtypes = (- ctypes.c_uint64,- ctypes.POINTER(_UniffiRustCallStatus),-)-_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopscredentials.restype = None-_UniffiLib.uniffi_cyclops_sdk_fn_clone_httpclient.argtypes = (- ctypes.c_uint64,- ctypes.POINTER(_UniffiRustCallStatus),-)-_UniffiLib.uniffi_cyclops_sdk_fn_clone_httpclient.restype = ctypes.c_uint64-_UniffiLib.uniffi_cyclops_sdk_fn_free_httpclient.argtypes = (- ctypes.c_uint64,- ctypes.POINTER(_UniffiRustCallStatus),-)-_UniffiLib.uniffi_cyclops_sdk_fn_free_httpclient.restype = None-class _UniffiForeignFutureResultRustBuffer(ctypes.Structure):- _fields_ = [- ("return_value", _UniffiRustBuffer),- ("call_status", _UniffiRustCallStatus),- ]-_UNIFFI_FOREIGN_FUTURE_COMPLETERUST_BUFFER = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureResultRustBuffer,+_UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK = ctypes.CFUNCTYPE(None,ctypes.c_uint64,ctypes.c_int8,)_UNIFFI_FOREIGN_FUTURE_DROPPED_CALLBACK = ctypes.CFUNCTYPE(None,ctypes.c_uint64,)@@ -744,24 +543,6 @@ class _UniffiForeignFutureDroppedCallbackStruct(ctypes.Structure):("handle", ctypes.c_uint64),("free", _UNIFFI_FOREIGN_FUTURE_DROPPED_CALLBACK),]-_UNIFFI_CALLBACK_INTERFACE_CYCLOPS_SDK_HTTP_CLIENT_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETERUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFutureDroppedCallbackStruct),-)-_UNIFFI_CALLBACK_INTERFACE_CLONE_CYCLOPS_SDK_HTTP_CLIENT = ctypes.CFUNCTYPE(ctypes.c_uint64,ctypes.c_uint64,-)-_UNIFFI_CALLBACK_INTERFACE_FREE_CYCLOPS_SDK_HTTP_CLIENT = ctypes.CFUNCTYPE(None,ctypes.c_uint64,-)-class _UniffiVTableCallbackInterfaceCyclopsSdkHttpClient(ctypes.Structure):- _fields_ = [- ("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE_CYCLOPS_SDK_HTTP_CLIENT),- ("uniffi_clone", _UNIFFI_CALLBACK_INTERFACE_CLONE_CYCLOPS_SDK_HTTP_CLIENT),- ("execute", _UNIFFI_CALLBACK_INTERFACE_CYCLOPS_SDK_HTTP_CLIENT_METHOD0),- ]-_UniffiLib.uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient.argtypes = (- ctypes.POINTER(_UniffiVTableCallbackInterfaceCyclopsSdkHttpClient),-)-_UniffiLib.uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient.restype = None-_UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK = ctypes.CFUNCTYPE(None,ctypes.c_uint64,ctypes.c_int8,-)_UniffiLib.ffi_cyclops_sdk_rust_future_poll_u8.argtypes = (ctypes.c_uint64,_UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK,@@ -990,6 +771,179 @@ _UniffiLib.ffi_cyclops_sdk_rust_future_free_void.argtypes = (ctypes.c_uint64,)_UniffiLib.ffi_cyclops_sdk_rust_future_free_void.restype = None+_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopsclient.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopsclient.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopsclient.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopsclient.restype = None+_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopscredentials.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_clone_cyclopscredentials.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopscredentials.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_free_cyclopscredentials.restype = None+_UniffiLib.uniffi_cyclops_sdk_fn_clone_httpclient.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_clone_httpclient.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_free_httpclient.argtypes = (+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_free_httpclient.restype = None+class _UniffiForeignFutureResultRustBuffer(ctypes.Structure):+ _fields_ = [+ ("return_value", _UniffiRustBuffer),+ ("call_status", _UniffiRustCallStatus),+ ]+_UNIFFI_FOREIGN_FUTURE_COMPLETERUST_BUFFER = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureResultRustBuffer,+)+_UNIFFI_CALLBACK_INTERFACE_CYCLOPS_SDK_HTTP_CLIENT_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETERUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFutureDroppedCallbackStruct),+)+_UNIFFI_CALLBACK_INTERFACE_CLONE_CYCLOPS_SDK_HTTP_CLIENT = ctypes.CFUNCTYPE(ctypes.c_uint64,ctypes.c_uint64,+)+_UNIFFI_CALLBACK_INTERFACE_FREE_CYCLOPS_SDK_HTTP_CLIENT = ctypes.CFUNCTYPE(None,ctypes.c_uint64,+)+class _UniffiVTableCallbackInterfaceCyclopsSdkHttpClient(ctypes.Structure):+ _fields_ = [+ ("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE_CYCLOPS_SDK_HTTP_CLIENT),+ ("uniffi_clone", _UNIFFI_CALLBACK_INTERFACE_CLONE_CYCLOPS_SDK_HTTP_CLIENT),+ ("execute", _UNIFFI_CALLBACK_INTERFACE_CYCLOPS_SDK_HTTP_CLIENT_METHOD0),+ ]+_UniffiLib.uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient.argtypes = (+ ctypes.POINTER(_UniffiVTableCallbackInterfaceCyclopsSdkHttpClient),+)+_UniffiLib.uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient.restype = None+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect.argtypes = (+ _UniffiRustBuffer,+ ctypes.c_uint64,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+ _UniffiRustBuffer,+ _UniffiRustBuffer,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim.argtypes = (+ ctypes.c_uint64,+ _UniffiRustBuffer,+)+_UniffiLib.uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim.restype = ctypes.c_uint64+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new.argtypes = (+ _UniffiRustBuffer,+ _UniffiRustBuffer,+ ctypes.POINTER(_UniffiRustCallStatus),+)+_UniffiLib.uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new.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.ffi_cyclops_sdk_uniffi_contract_version.argtypes = (+)+_UniffiLib.ffi_cyclops_sdk_uniffi_contract_version.restype = ctypes.c_uint32+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool.restype = ctypes.c_uint16+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim.restype = ctypes.c_uint16+_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_method_httpclient_execute.argtypes = (+)+_UniffiLib.uniffi_cyclops_sdk_checksum_method_httpclient_execute.restype = ctypes.c_uint16_uniffi_check_contract_api_version(_UniffiLib)# _uniffi_check_api_checksums(_UniffiLib)@@ -2772,6 +2726,19 @@ class _UniffiFfiConverterTypeHttpClient:def write(cls, value: HttpClient, buf: _UniffiRustBuffer):buf.write_u64(cls.lower(value))+class _UniffiFfiConverterUInt8(_UniffiConverterPrimitiveInt):+ CLASS_NAME = "u8"+ VALUE_MIN = 0+ VALUE_MAX = 2**8++ @staticmethod+ def read(buf):+ return buf.read_u8()++ @staticmethod+ def write(value, buf):+ buf.write_u8(value)+__all__ = ["InternalError","HttpError",diff --git a/libs/fleet/sdk-bindings/ruby/cyclops_sdk.rb b/libs/fleet/sdk-bindings/ruby/cyclops_sdk.rbindex 252b75e5c7..542f4369e0 100644--- a/libs/fleet/sdk-bindings/ruby/cyclops_sdk.rb+++ b/libs/fleet/sdk-bindings/ruby/cyclops_sdk.rb@@ -12,15 +12,11 @@ module CyclopsSdkcheck_lower_TypePoolSpec].freezeSCHEMA_READ_METHODS = %i[- read_TypeClaimSpec- read_TypeOSGymSandboxClaimStatus- read_TypeOSGymWorkspacePoolStatus- read_TypePoolSpec].freezeSCHEMA_WRITE_METHODS = %i[write_TypeClaimSpec- write_TypeOSGymSandboxClaimStatus- write_TypeOSGymWorkspacePoolStatus+ write_TypeOsGymSandboxClaimStatus+ write_TypeOsGymWorkspacePoolStatuswrite_TypePoolSpec].freeze@@ -29,7 +25,7 @@ module CyclopsSdkSCHEMA_CHECK_LOWER_METHODS.each do |method_name|RustBuffer.define_singleton_method(method_name) do |value|- schema_rust_buffer.public_send(method_name, value)+ schema_rust_buffer.public_send(method_name.to_s.gsub("OsGym", "OSGym"), value)endenddiff --git a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rb b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rbindex bd8721c1ca..a5f152f6e8 100644--- a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rb+++ b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/schema.rb@@ -14,7 +14,7 @@# helpers directly inline like we're doing here.require 'ffi'-require 'set'+module CyclopsSdkSchemadef self.uniffi_in_range(i, type_name, min, max)@@ -36,64 +36,21 @@ def self.uniffi_bytes(v)v.to_strend-# Callback return codes-UNIFFI_CALLBACK_SUCCESS = 0-UNIFFI_CALLBACK_ERROR = 1-UNIFFI_CALLBACK_UNEXPECTED_ERROR = 2--# Call a method on a callback interface object, catching and reporting errors-# to Rust via the call_status.-# If error_type is provided, known errors of that type are reported as UNIFFI_CALLBACK_ERROR;-# all other errors are reported as UNIFFI_CALLBACK_UNEXPECTED_ERROR.-def self.uniffi_trait_interface_call(call_status, make_call, write_return_value, error_type = nil, lower_error = nil)- begin- write_return_value.call make_call.call- rescue StandardError => e- buf = if !error_type.nil? && uniffi_is_error_type?(e, error_type)- call_status[:code] = UNIFFI_CALLBACK_ERROR- lower_error.call e- else- call_status[:code] = UNIFFI_CALLBACK_UNEXPECTED_ERROR- RustBuffer.alloc_from_string(e.inspect)- end-- error_buf = call_status[:error_buf]- error_buf[:capacity] = buf[:capacity]- error_buf[:len] = buf[:len]- error_buf[:data] = buf[:data]- end-end--# Check if an exception is a variant of the given error type.-# Error types in Ruby are either modules (non-flat enums) or classes (flat enums),-# with variant classes as constant within them.-def self.uniffi_is_error_type?(e, error_type)- # Object-as-error: error_type is a class itself (e.g. MyError < StandardError)- if error_type.is_a?(Class) && e.is_a?(error_type)- return true- end-- # Enum error: error_type is a module with class constants for each variant- error_type.constants.any? do |c|- klass = error_type.const_get c- klass.is_a?(Class) && e.is_a?(klass)- end-endclass RustBuffer < FFI::Structlayout :capacity, :uint64,:len, :uint64,:data, :pointerdef self.alloc(size)- return ::CyclopsSdkSchema.rust_call(:ffi_cyclops_sdk_schema_rustbuffer_alloc, size)+ return CyclopsSdkSchema.rust_call(:ffi_cyclops_sdk_schema_rustbuffer_alloc, size)enddef self.reserve(rbuf, additional)- return ::CyclopsSdkSchema.rust_call(:ffi_cyclops_sdk_schema_rustbuffer_reserve, rbuf, additional)+ return CyclopsSdkSchema.rust_call(:ffi_cyclops_sdk_schema_rustbuffer_reserve, rbuf, additional)enddef free- ::CyclopsSdkSchema.rust_call(:ffi_cyclops_sdk_schema_rustbuffer_free, self)+ CyclopsSdkSchema.rust_call(:ffi_cyclops_sdk_schema_rustbuffer_free, self)enddef capacity@@ -141,14 +98,14 @@ endfreeend# The primitive String type.- def self.alloc_from_string(value)+ def self.allocFromString(value)RustBuffer.allocWithBuilder do |builder|builder.write value.encode('utf-8')return builder.finalizeendend- def consume_into_string+ def consumeIntoStringconsumeWithStream do |stream|return stream.read(stream.remaining).force_encoding(Encoding::UTF_8)end@@ -169,9 +126,9 @@ endendend- def consume_into_TypeClaimLifecycle+ def consumeIntoTypeClaimLifecycleconsumeWithStream do |stream|- return stream.read_TypeClaimLifecycle+ return stream.readTypeClaimLifecycleendend@@ -191,9 +148,9 @@ endendend- def consume_into_TypeClaimSpec+ def consumeIntoTypeClaimSpecconsumeWithStream do |stream|- return stream.read_TypeClaimSpec+ return stream.readTypeClaimSpecendend@@ -214,9 +171,9 @@ endendend- def consume_into_TypeOSGymSandboxClaimCondition+ def consumeIntoTypeOSGymSandboxClaimConditionconsumeWithStream do |stream|- return stream.read_TypeOSGymSandboxClaimCondition+ return stream.readTypeOSGymSandboxClaimConditionendend@@ -234,9 +191,9 @@ endendend- def consume_into_TypeOSGymSandboxClaimSandbox+ def consumeIntoTypeOSGymSandboxClaimSandboxconsumeWithStream do |stream|- return stream.read_TypeOSGymSandboxClaimSandbox+ return stream.readTypeOSGymSandboxClaimSandboxendend@@ -244,8 +201,8 @@ enddef self.check_lower_TypeOSGymSandboxClaimStatus(v)RustBuffer.check_lower_Optionalstring(v.phase)- RustBuffer.check_lower_OptionalSequenceTypeOSGymSandboxClaimCondition(v.conditions)- RustBuffer.check_lower_OptionalTypeOSGymSandboxClaimSandbox(v.sandbox)+ RustBuffer.check_lower_OptionalSequenceTypeOsGymSandboxClaimCondition(v.conditions)+ RustBuffer.check_lower_OptionalTypeOsGymSandboxClaimSandbox(v.sandbox)enddef self.alloc_from_TypeOSGymSandboxClaimStatus(v)@@ -255,9 +212,9 @@ endendend- def consume_into_TypeOSGymSandboxClaimStatus+ def consumeIntoTypeOSGymSandboxClaimStatusconsumeWithStream do |stream|- return stream.read_TypeOSGymSandboxClaimStatus+ return stream.readTypeOSGymSandboxClaimStatusendend@@ -274,9 +231,9 @@ endendend- def consume_into_TypeOSGymSandboxSpec+ def consumeIntoTypeOSGymSandboxSpecconsumeWithStream do |stream|- return stream.read_TypeOSGymSandboxSpec+ return stream.readTypeOSGymSandboxSpecendend@@ -300,9 +257,9 @@ endendend- def consume_into_TypeOSGymSandboxStatus+ def consumeIntoTypeOSGymSandboxStatusconsumeWithStream do |stream|- return stream.read_TypeOSGymSandboxStatus+ return stream.readTypeOSGymSandboxStatusendend@@ -319,9 +276,9 @@ endendend- def consume_into_TypeOSGymSandboxTemplateSpec+ def consumeIntoTypeOSGymSandboxTemplateSpecconsumeWithStream do |stream|- return stream.read_TypeOSGymSandboxTemplateSpec+ return stream.readTypeOSGymSandboxTemplateSpecendend@@ -340,9 +297,9 @@ endendend- def consume_into_TypeOSGymSandboxWarmPoolSpec+ def consumeIntoTypeOSGymSandboxWarmPoolSpecconsumeWithStream do |stream|- return stream.read_TypeOSGymSandboxWarmPoolSpec+ return stream.readTypeOSGymSandboxWarmPoolSpecendend@@ -361,9 +318,9 @@ endendend- def consume_into_TypeOSGymSandboxWarmPoolStatus+ def consumeIntoTypeOSGymSandboxWarmPoolStatusconsumeWithStream do |stream|- return stream.read_TypeOSGymSandboxWarmPoolStatus+ return stream.readTypeOSGymSandboxWarmPoolStatusendend@@ -383,9 +340,9 @@ endendend- def consume_into_TypeOSGymWorkspacePoolStatus+ def consumeIntoTypeOSGymWorkspacePoolStatusconsumeWithStream do |stream|- return stream.read_TypeOSGymWorkspacePoolStatus+ return stream.readTypeOSGymWorkspacePoolStatusendend@@ -406,9 +363,9 @@ endendend- def consume_into_TypeOidcConfig+ def consumeIntoTypeOidcConfigconsumeWithStream do |stream|- return stream.read_TypeOidcConfig+ return stream.readTypeOidcConfigendend@@ -428,9 +385,9 @@ endendend- def consume_into_TypePoolSpec+ def consumeIntoTypePoolSpecconsumeWithStream do |stream|- return stream.read_TypePoolSpec+ return stream.readTypePoolSpecendend@@ -458,9 +415,9 @@ endendend- def consume_into_TypePoolTemplate+ def consumeIntoTypePoolTemplateconsumeWithStream do |stream|- return stream.read_TypePoolTemplate+ return stream.readTypePoolTemplateendend@@ -479,9 +436,9 @@ endendend- def consume_into_TypeSandboxService+ def consumeIntoTypeSandboxServiceconsumeWithStream do |stream|- return stream.read_TypeSandboxService+ return stream.readTypeSandboxServiceendend@@ -498,9 +455,9 @@ endendend- def consume_into_TypeSandboxTemplateRef+ def consumeIntoTypeSandboxTemplateRefconsumeWithStream do |stream|- return stream.read_TypeSandboxTemplateRef+ return stream.readTypeSandboxTemplateRefendend@@ -530,9 +487,9 @@ endendend- def consume_into_TypeVmTemplate+ def consumeIntoTypeVmTemplateconsumeWithStream do |stream|- return stream.read_TypeVmTemplate+ return stream.readTypeVmTemplateendend@@ -551,9 +508,9 @@ endendend- def consume_into_TypeWarmPoolAutoscaling+ def consumeIntoTypeWarmPoolAutoscalingconsumeWithStream do |stream|- return stream.read_TypeWarmPoolAutoscaling+ return stream.readTypeWarmPoolAutoscalingendend@@ -569,9 +526,9 @@ endendend- def consume_into_TypeFirmware+ def consumeIntoTypeFirmwareconsumeWithStream do |stream|- return stream.read_TypeFirmware+ return stream.readTypeFirmwareendend@@ -588,27 +545,13 @@ endendend- def consume_into_TypeImagePullPolicy+ def consumeIntoTypeImagePullPolicyconsumeWithStream do |stream|- return stream.read_TypeImagePullPolicy+ return stream.readTypeImagePullPolicyendend- # Error enum - generate alloc_from for callback error serialization- def self.alloc_from_TypeJsonValueError(v)- RustBuffer.allocWithBuilder do |builder|- builder.write_TypeJsonValueError(v)- return builder.finalize- end- end-- # Enum used as error - generate consume_into_ for use as a return value- def consume_into_TypeJsonValueError- consumeWithStream do |stream|- return stream.read_TypeJsonValueError- end- end# The Enum type RuntimeKind.@@ -623,9 +566,9 @@ endendend- def consume_into_TypeRuntimeKind+ def consumeIntoTypeRuntimeKindconsumeWithStream do |stream|- return stream.read_TypeRuntimeKind+ return stream.readTypeRuntimeKindendend@@ -642,9 +585,9 @@ endendend- def consume_into_TypeServiceProtocol+ def consumeIntoTypeServiceProtocolconsumeWithStream do |stream|- return stream.read_TypeServiceProtocol+ return stream.readTypeServiceProtocolendend@@ -652,7 +595,7 @@ end# The Optional<T> type for u32.def self.check_lower_Optionalu32(v)- if !v.nil?+ if not v.nil?endend@@ -664,16 +607,16 @@ endendend- def consume_into_Optionalu32+ def consumeIntoOptionalu32consumeWithStream do |stream|- return stream.read_Optionalu32+ return stream.readOptionalu32endend# The Optional<T> type for bool.def self.check_lower_Optionalbool(v)- if !v.nil?+ if not v.nil?endend@@ -685,16 +628,16 @@ endendend- def consume_into_Optionalbool+ def consumeIntoOptionalboolconsumeWithStream do |stream|- return stream.read_Optionalbool+ return stream.readOptionalboolendend# The Optional<T> type for string.def self.check_lower_Optionalstring(v)- if !v.nil?+ if not v.nil?endend@@ -706,16 +649,16 @@ endendend- def consume_into_Optionalstring+ def consumeIntoOptionalstringconsumeWithStream do |stream|- return stream.read_Optionalstring+ return stream.readOptionalstringendend# The Optional<T> type for TypePreservedJson.def self.check_lower_OptionalTypePreservedJson(v)- if !v.nil?+ if not v.nil?(PreservedJson.uniffi_check_lower v)endend@@ -727,16 +670,16 @@ endendend- def consume_into_OptionalTypePreservedJson+ def consumeIntoOptionalTypePreservedJsonconsumeWithStream do |stream|- return stream.read_OptionalTypePreservedJson+ return stream.readOptionalTypePreservedJsonendend# The Optional<T> type for TypeClaimLifecycle.def self.check_lower_OptionalTypeClaimLifecycle(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_TypeClaimLifecycle(v)endend@@ -748,17 +691,17 @@ endendend- def consume_into_OptionalTypeClaimLifecycle+ def consumeIntoOptionalTypeClaimLifecycleconsumeWithStream do |stream|- return stream.read_OptionalTypeClaimLifecycle+ return stream.readOptionalTypeClaimLifecycleendend# The Optional<T> type for TypeOSGymSandboxClaimSandbox.def self.check_lower_OptionalTypeOSGymSandboxClaimSandbox(v)- if !v.nil?- RustBuffer.check_lower_TypeOSGymSandboxClaimSandbox(v)+ if not v.nil?+ RustBuffer.check_lower_TypeOsGymSandboxClaimSandbox(v)endend@@ -769,16 +712,16 @@ endendend- def consume_into_OptionalTypeOSGymSandboxClaimSandbox+ def consumeIntoOptionalTypeOSGymSandboxClaimSandboxconsumeWithStream do |stream|- return stream.read_OptionalTypeOSGymSandboxClaimSandbox+ return stream.readOptionalTypeOSGymSandboxClaimSandboxendend# The Optional<T> type for TypeOidcConfig.def self.check_lower_OptionalTypeOidcConfig(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_TypeOidcConfig(v)endend@@ -790,16 +733,16 @@ endendend- def consume_into_OptionalTypeOidcConfig+ def consumeIntoOptionalTypeOidcConfigconsumeWithStream do |stream|- return stream.read_OptionalTypeOidcConfig+ return stream.readOptionalTypeOidcConfigendend# The Optional<T> type for TypeWarmPoolAutoscaling.def self.check_lower_OptionalTypeWarmPoolAutoscaling(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_TypeWarmPoolAutoscaling(v)endend@@ -811,16 +754,16 @@ endendend- def consume_into_OptionalTypeWarmPoolAutoscaling+ def consumeIntoOptionalTypeWarmPoolAutoscalingconsumeWithStream do |stream|- return stream.read_OptionalTypeWarmPoolAutoscaling+ return stream.readOptionalTypeWarmPoolAutoscalingendend# The Optional<T> type for TypeFirmware.def self.check_lower_OptionalTypeFirmware(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_TypeFirmware(v)endend@@ -832,16 +775,16 @@ endendend- def consume_into_OptionalTypeFirmware+ def consumeIntoOptionalTypeFirmwareconsumeWithStream do |stream|- return stream.read_OptionalTypeFirmware+ return stream.readOptionalTypeFirmwareendend# The Optional<T> type for TypeImagePullPolicy.def self.check_lower_OptionalTypeImagePullPolicy(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_TypeImagePullPolicy(v)endend@@ -853,16 +796,16 @@ endendend- def consume_into_OptionalTypeImagePullPolicy+ def consumeIntoOptionalTypeImagePullPolicyconsumeWithStream do |stream|- return stream.read_OptionalTypeImagePullPolicy+ return stream.readOptionalTypeImagePullPolicyendend# The Optional<T> type for TypeRuntimeKind.def self.check_lower_OptionalTypeRuntimeKind(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_TypeRuntimeKind(v)endend@@ -874,16 +817,16 @@ endendend- def consume_into_OptionalTypeRuntimeKind+ def consumeIntoOptionalTypeRuntimeKindconsumeWithStream do |stream|- return stream.read_OptionalTypeRuntimeKind+ return stream.readOptionalTypeRuntimeKindendend# The Optional<T> type for TypeServiceProtocol.def self.check_lower_OptionalTypeServiceProtocol(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_TypeServiceProtocol(v)endend@@ -895,16 +838,16 @@ endendend- def consume_into_OptionalTypeServiceProtocol+ def consumeIntoOptionalTypeServiceProtocolconsumeWithStream do |stream|- return stream.read_OptionalTypeServiceProtocol+ return stream.readOptionalTypeServiceProtocolendend# The Optional<T> type for Sequencestring.def self.check_lower_OptionalSequencestring(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_Sequencestring(v)endend@@ -916,16 +859,16 @@ endendend- def consume_into_OptionalSequencestring+ def consumeIntoOptionalSequencestringconsumeWithStream do |stream|- return stream.read_OptionalSequencestring+ return stream.readOptionalSequencestringendend# The Optional<T> type for SequenceTypePreservedJson.def self.check_lower_OptionalSequenceTypePreservedJson(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_SequenceTypePreservedJson(v)endend@@ -937,17 +880,17 @@ endendend- def consume_into_OptionalSequenceTypePreservedJson+ def consumeIntoOptionalSequenceTypePreservedJsonconsumeWithStream do |stream|- return stream.read_OptionalSequenceTypePreservedJson+ return stream.readOptionalSequenceTypePreservedJsonendend# The Optional<T> type for SequenceTypeOSGymSandboxClaimCondition.def self.check_lower_OptionalSequenceTypeOSGymSandboxClaimCondition(v)- if !v.nil?- RustBuffer.check_lower_SequenceTypeOSGymSandboxClaimCondition(v)+ if not v.nil?+ RustBuffer.check_lower_SequenceTypeOsGymSandboxClaimCondition(v)endend@@ -958,16 +901,16 @@ endendend- def consume_into_OptionalSequenceTypeOSGymSandboxClaimCondition+ def consumeIntoOptionalSequenceTypeOSGymSandboxClaimConditionconsumeWithStream do |stream|- return stream.read_OptionalSequenceTypeOSGymSandboxClaimCondition+ return stream.readOptionalSequenceTypeOSGymSandboxClaimConditionendend# The Optional<T> type for SequenceTypeSandboxService.def self.check_lower_OptionalSequenceTypeSandboxService(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_SequenceTypeSandboxService(v)endend@@ -979,16 +922,16 @@ endendend- def consume_into_OptionalSequenceTypeSandboxService+ def consumeIntoOptionalSequenceTypeSandboxServiceconsumeWithStream do |stream|- return stream.read_OptionalSequenceTypeSandboxService+ return stream.readOptionalSequenceTypeSandboxServiceendend# The Optional<T> type for MapStringString.def self.check_lower_OptionalMapStringString(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_MapStringString(v)endend@@ -1000,9 +943,9 @@ endendend- def consume_into_OptionalMapStringString+ def consumeIntoOptionalMapStringStringconsumeWithStream do |stream|- return stream.read_OptionalMapStringString+ return stream.readOptionalMapStringStringendend@@ -1021,9 +964,9 @@ endendend- def consume_into_Sequencestring+ def consumeIntoSequencestringconsumeWithStream do |stream|- return stream.read_Sequencestring+ return stream.readSequencestringendend@@ -1042,9 +985,9 @@ endendend- def consume_into_SequenceTypePreservedJson+ def consumeIntoSequenceTypePreservedJsonconsumeWithStream do |stream|- return stream.read_SequenceTypePreservedJson+ return stream.readSequenceTypePreservedJsonendend@@ -1052,7 +995,7 @@ enddef self.check_lower_SequenceTypeOSGymSandboxClaimCondition(v)v.each do |item|- RustBuffer.check_lower_TypeOSGymSandboxClaimCondition(item)+ RustBuffer.check_lower_TypeOsGymSandboxClaimCondition(item)endend@@ -1063,9 +1006,9 @@ endendend- def consume_into_SequenceTypeOSGymSandboxClaimCondition+ def consumeIntoSequenceTypeOSGymSandboxClaimConditionconsumeWithStream do |stream|- return stream.read_SequenceTypeOSGymSandboxClaimCondition+ return stream.readSequenceTypeOSGymSandboxClaimConditionendend@@ -1084,14 +1027,13 @@ endendend- def consume_into_SequenceTypeSandboxService+ def consumeIntoSequenceTypeSandboxServiceconsumeWithStream do |stream|- return stream.read_SequenceTypeSandboxService+ return stream.readSequenceTypeSandboxServiceendend-- # The Map<T> type for MapStringString.+ # The Map<T> type for string.def self.check_lower_MapStringString(v)v.each do |k, v|@@ -1107,9 +1049,9 @@ endendend- def consume_into_MapStringString+ def consumeIntoMapStringStringconsumeWithStream do |stream|- return stream.read_MapStringString+ return stream.readMapStringStringendendend@@ -1157,19 +1099,19 @@ class RustBufferStreamdataend- def read_u16+ def readU16unpack_from 2, 'S>'end- def read_u32+ def readU32unpack_from 4, 'L>'end- def read_u64+ def readU64unpack_from 8, 'Q>'end- def read_bool+ def readBoolv = unpack_from 1, 'c'return false if v == 0@@ -1178,7 +1120,7 @@ class RustBufferStreamraise InternalError, 'Unexpected byte for Boolean type'end- def read_string+ def readStringsize = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative string length' if size.negative?@@ -1188,213 +1130,213 @@ class RustBufferStream# The Object type PreservedJson.- def read_TypePreservedJson+ def readTypePreservedJsonhandle = unpack_from 8, 'Q>'- return PreservedJson.uniffi_lift(handle)+ return PreservedJson.uniffi_allocate(handle)end# The Record type ClaimLifecycle.- def read_TypeClaimLifecycle+ def readTypeClaimLifecycleClaimLifecycle.new(- shutdown_time: read_Optionalstring,- shutdown_policy: read_Optionalstring,- auto_renew: read_Optionalbool+ shutdown_time: readOptionalstring,+ shutdown_policy: readOptionalstring,+ auto_renew: readOptionalbool)end# The Record type ClaimSpec.- def read_TypeClaimSpec+ def readTypeClaimSpecClaimSpec.new(- sandbox_template_ref: read_TypeSandboxTemplateRef,- warmpool: read_Optionalstring,- bind_deadline: read_Optionalu32,- lifecycle: read_OptionalTypeClaimLifecycle+ sandbox_template_ref: readTypeSandboxTemplateRef,+ warmpool: readOptionalstring,+ bind_deadline: readOptionalu32,+ lifecycle: readOptionalTypeClaimLifecycle)end# The Record type OSGymSandboxClaimCondition.- def read_TypeOSGymSandboxClaimCondition+ def readTypeOsGymSandboxClaimConditionOsGymSandboxClaimCondition.new(- type: read_Optionalstring,- status: read_Optionalstring,- reason: read_Optionalstring,- message: read_Optionalstring,- last_transition_time: read_Optionalstring+ type: readOptionalstring,+ status: readOptionalstring,+ reason: readOptionalstring,+ message: readOptionalstring,+ last_transition_time: readOptionalstring)end# The Record type OSGymSandboxClaimSandbox.- def read_TypeOSGymSandboxClaimSandbox+ def readTypeOsGymSandboxClaimSandboxOsGymSandboxClaimSandbox.new(- name: read_Optionalstring,- service: read_Optionalstring+ name: readOptionalstring,+ service: readOptionalstring)end# The Record type OSGymSandboxClaimStatus.- def read_TypeOSGymSandboxClaimStatus+ def readTypeOsGymSandboxClaimStatusOsGymSandboxClaimStatus.new(- phase: read_Optionalstring,- conditions: read_OptionalSequenceTypeOSGymSandboxClaimCondition,- sandbox: read_OptionalTypeOSGymSandboxClaimSandbox+ phase: readOptionalstring,+ conditions: readOptionalSequenceTypeOsGymSandboxClaimCondition,+ sandbox: readOptionalTypeOsGymSandboxClaimSandbox)end# The Record type OSGymSandboxSpec.- def read_TypeOSGymSandboxSpec+ def readTypeOsGymSandboxSpecOsGymSandboxSpec.new(- vm_template: read_TypeVmTemplate+ vm_template: readTypeVmTemplate)end# The Record type OSGymSandboxStatus.- def read_TypeOSGymSandboxStatus+ def readTypeOsGymSandboxStatusOsGymSandboxStatus.new(- phase: read_Optionalstring,- runtime: read_Optionalstring,- ready: read_Optionalbool,- vm_name: read_Optionalstring,- service: read_Optionalstring,- message: read_Optionalstring,- reset_issued_at: read_Optionalstring,- reset_vmi_uid: read_Optionalstring+ phase: readOptionalstring,+ runtime: readOptionalstring,+ ready: readOptionalbool,+ vm_name: readOptionalstring,+ service: readOptionalstring,+ message: readOptionalstring,+ reset_issued_at: readOptionalstring,+ reset_vmi_uid: readOptionalstring)end# The Record type OSGymSandboxTemplateSpec.- def read_TypeOSGymSandboxTemplateSpec+ def readTypeOsGymSandboxTemplateSpecOsGymSandboxTemplateSpec.new(- vm_template: read_TypeVmTemplate+ vm_template: readTypeVmTemplate)end# The Record type OSGymSandboxWarmPoolSpec.- def read_TypeOSGymSandboxWarmPoolSpec+ def readTypeOsGymSandboxWarmPoolSpecOsGymSandboxWarmPoolSpec.new(- replicas: read_u32,- sandbox_template_ref: read_TypeSandboxTemplateRef,- autoscaling: read_OptionalTypeWarmPoolAutoscaling+ replicas: readU32,+ sandbox_template_ref: readTypeSandboxTemplateRef,+ autoscaling: readOptionalTypeWarmPoolAutoscaling)end# The Record type OSGymSandboxWarmPoolStatus.- def read_TypeOSGymSandboxWarmPoolStatus+ def readTypeOsGymSandboxWarmPoolStatusOsGymSandboxWarmPoolStatus.new(- replicas: read_Optionalu32,- ready_replicas: read_Optionalu32,- selector: read_Optionalstring+ replicas: readOptionalu32,+ ready_replicas: readOptionalu32,+ selector: readOptionalstring)end# The Record type OSGymWorkspacePoolStatus.- def read_TypeOSGymWorkspacePoolStatus+ def readTypeOsGymWorkspacePoolStatusOsGymWorkspacePoolStatus.new(- phase: read_Optionalstring,- total_count: read_Optionalu32,- available_count: read_Optionalu32,- claimed_count: read_Optionalu32+ phase: readOptionalstring,+ total_count: readOptionalu32,+ available_count: readOptionalu32,+ claimed_count: readOptionalu32)end# The Record type OidcConfig.- def read_TypeOidcConfig+ def readTypeOidcConfigOidcConfig.new(- credentials_secret: read_string,- token_url: read_string,- aws_role_arn: read_Optionalstring,- aws_region: read_Optionalstring,- refresh_interval_seconds: read_Optionalu32+ credentials_secret: readString,+ token_url: readString,+ aws_role_arn: readOptionalstring,+ aws_region: readOptionalstring,+ refresh_interval_seconds: readOptionalu32)end# The Record type PoolSpec.- def read_TypePoolSpec+ def readTypePoolSpecPoolSpec.new(- replicas: read_u32,- template: read_TypePoolTemplate,- autoscaling: read_OptionalTypeWarmPoolAutoscaling,- services: read_OptionalSequenceTypeSandboxService+ replicas: readU32,+ template: readTypePoolTemplate,+ autoscaling: readOptionalTypeWarmPoolAutoscaling,+ services: readOptionalSequenceTypeSandboxService)end# The Record type PoolTemplate.- def read_TypePoolTemplate+ def readTypePoolTemplatePoolTemplate.new(- runtime: read_OptionalTypeRuntimeKind,- runtime_class_name: read_Optionalstring,- node_selector: read_OptionalMapStringString,- tolerations: read_OptionalSequenceTypePreservedJson,- command: read_OptionalSequencestring,- container_disk_image: read_string,- image_pull_secret: read_Optionalstring,- cpu_cores: read_Optionalu32,- memory: read_Optionalstring,- firmware: read_OptionalTypeFirmware,- probes: read_OptionalTypePreservedJson,- oidc: read_OptionalTypeOidcConfig+ runtime: readOptionalTypeRuntimeKind,+ runtime_class_name: readOptionalstring,+ node_selector: readOptionalMapStringString,+ tolerations: readOptionalSequenceTypePreservedJson,+ command: readOptionalSequencestring,+ container_disk_image: readString,+ image_pull_secret: readOptionalstring,+ cpu_cores: readOptionalu32,+ memory: readOptionalstring,+ firmware: readOptionalTypeFirmware,+ probes: readOptionalTypePreservedJson,+ oidc: readOptionalTypeOidcConfig)end# The Record type SandboxService.- def read_TypeSandboxService+ def readTypeSandboxServiceSandboxService.new(- name: read_string,- target_port: read_u16,- protocol: read_OptionalTypeServiceProtocol+ name: readString,+ target_port: readU16,+ protocol: readOptionalTypeServiceProtocol)end# The Record type SandboxTemplateRef.- def read_TypeSandboxTemplateRef+ def readTypeSandboxTemplateRefSandboxTemplateRef.new(- name: read_string+ name: readString)end# The Record type VmTemplate.- def read_TypeVmTemplate+ def readTypeVmTemplateVmTemplate.new(- container_disk_image: read_string,- command: read_OptionalSequencestring,- runtime: read_OptionalTypeRuntimeKind,- runtime_class_name: read_Optionalstring,- node_selector: read_OptionalMapStringString,- tolerations: read_OptionalSequenceTypePreservedJson,- image_pull_policy: read_OptionalTypeImagePullPolicy,- image_pull_secret: read_Optionalstring,- cpu_cores: read_Optionalu32,- memory: read_Optionalstring,- firmware: read_OptionalTypeFirmware,- probes: read_OptionalTypePreservedJson,- services: read_OptionalSequenceTypeSandboxService,- oidc: read_OptionalTypeOidcConfig+ container_disk_image: readString,+ command: readOptionalSequencestring,+ runtime: readOptionalTypeRuntimeKind,+ runtime_class_name: readOptionalstring,+ node_selector: readOptionalMapStringString,+ tolerations: readOptionalSequenceTypePreservedJson,+ image_pull_policy: readOptionalTypeImagePullPolicy,+ image_pull_secret: readOptionalstring,+ cpu_cores: readOptionalu32,+ memory: readOptionalstring,+ firmware: readOptionalTypeFirmware,+ probes: readOptionalTypePreservedJson,+ services: readOptionalSequenceTypeSandboxService,+ oidc: readOptionalTypeOidcConfig)end# The Record type WarmPoolAutoscaling.- def read_TypeWarmPoolAutoscaling+ def readTypeWarmPoolAutoscalingWarmPoolAutoscaling.new(- min_pool_size: read_Optionalu32,- initial_pool_size: read_Optionalu32,- max_pool_size: read_Optionalu32+ min_pool_size: readOptionalu32,+ initial_pool_size: readOptionalu32,+ max_pool_size: readOptionalu32)end@@ -1402,7 +1344,7 @@ class RustBufferStream# The Enum type Firmware.- def read_TypeFirmware+ def readTypeFirmwarevariant = unpack_from 4, 'l>'if variant == 1@@ -1421,7 +1363,7 @@ class RustBufferStream# The Enum type ImagePullPolicy.- def read_TypeImagePullPolicy+ def readTypeImagePullPolicyvariant = unpack_from 4, 'l>'if variant == 1@@ -1445,12 +1387,12 @@ class RustBufferStream# The Error type JsonValueError- def read_TypeJsonValueError+ def readTypeJsonValueErrorvariant = unpack_from 4, 'l>'if variant == 1return JsonValueError::Invalid.new(- reason: read_string()+ readString())end@@ -1462,7 +1404,7 @@ class RustBufferStream# The Enum type RuntimeKind.- def read_TypeRuntimeKind+ def readTypeRuntimeKindvariant = unpack_from 4, 'l>'if variant == 1@@ -1484,7 +1426,7 @@ class RustBufferStream# The Enum type ServiceProtocol.- def read_TypeServiceProtocol+ def readTypeServiceProtocolvariant = unpack_from 4, 'l>'if variant == 1@@ -1499,256 +1441,239 @@ class RustBufferStream-# The Optional<T> type for u32.- def read_Optionalu32+ def readOptionalu32flag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_u32+ return readU32elseraise InternalError, 'Unexpected flag byte for Optionalu32'endend-# The Optional<T> type for bool.- def read_Optionalbool+ def readOptionalboolflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_bool+ return readBoolelseraise InternalError, 'Unexpected flag byte for Optionalbool'endend-# The Optional<T> type for string.- def read_Optionalstring+ def readOptionalstringflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_string+ return readStringelseraise InternalError, 'Unexpected flag byte for Optionalstring'endend-# The Optional<T> type for TypePreservedJson.- def read_OptionalTypePreservedJson+ def readOptionalTypePreservedJsonflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypePreservedJson+ return readTypePreservedJsonelseraise InternalError, 'Unexpected flag byte for OptionalTypePreservedJson'endend-# The Optional<T> type for TypeClaimLifecycle.- def read_OptionalTypeClaimLifecycle+ def readOptionalTypeClaimLifecycleflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeClaimLifecycle+ return readTypeClaimLifecycleelseraise InternalError, 'Unexpected flag byte for OptionalTypeClaimLifecycle'endend-# The Optional<T> type for TypeOSGymSandboxClaimSandbox.- def read_OptionalTypeOSGymSandboxClaimSandbox+ def readOptionalTypeOsGymSandboxClaimSandboxflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeOSGymSandboxClaimSandbox+ return readTypeOsGymSandboxClaimSandboxelse- raise InternalError, 'Unexpected flag byte for OptionalTypeOSGymSandboxClaimSandbox'+ raise InternalError, 'Unexpected flag byte for OptionalTypeOsGymSandboxClaimSandbox'endend-# The Optional<T> type for TypeOidcConfig.- def read_OptionalTypeOidcConfig+ def readOptionalTypeOidcConfigflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeOidcConfig+ return readTypeOidcConfigelseraise InternalError, 'Unexpected flag byte for OptionalTypeOidcConfig'endend-# The Optional<T> type for TypeWarmPoolAutoscaling.- def read_OptionalTypeWarmPoolAutoscaling+ def readOptionalTypeWarmPoolAutoscalingflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeWarmPoolAutoscaling+ return readTypeWarmPoolAutoscalingelseraise InternalError, 'Unexpected flag byte for OptionalTypeWarmPoolAutoscaling'endend-# The Optional<T> type for TypeFirmware.- def read_OptionalTypeFirmware+ def readOptionalTypeFirmwareflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeFirmware+ return readTypeFirmwareelseraise InternalError, 'Unexpected flag byte for OptionalTypeFirmware'endend-# The Optional<T> type for TypeImagePullPolicy.- def read_OptionalTypeImagePullPolicy+ def readOptionalTypeImagePullPolicyflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeImagePullPolicy+ return readTypeImagePullPolicyelseraise InternalError, 'Unexpected flag byte for OptionalTypeImagePullPolicy'endend-# The Optional<T> type for TypeRuntimeKind.- def read_OptionalTypeRuntimeKind+ def readOptionalTypeRuntimeKindflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeRuntimeKind+ return readTypeRuntimeKindelseraise InternalError, 'Unexpected flag byte for OptionalTypeRuntimeKind'endend-# The Optional<T> type for TypeServiceProtocol.- def read_OptionalTypeServiceProtocol+ def readOptionalTypeServiceProtocolflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeServiceProtocol+ return readTypeServiceProtocolelseraise InternalError, 'Unexpected flag byte for OptionalTypeServiceProtocol'endend-# The Optional<T> type for Sequencestring.- def read_OptionalSequencestring+ def readOptionalSequencestringflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_Sequencestring+ return readSequencestringelseraise InternalError, 'Unexpected flag byte for OptionalSequencestring'endend-# The Optional<T> type for SequenceTypePreservedJson.- def read_OptionalSequenceTypePreservedJson+ def readOptionalSequenceTypePreservedJsonflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_SequenceTypePreservedJson+ return readSequenceTypePreservedJsonelseraise InternalError, 'Unexpected flag byte for OptionalSequenceTypePreservedJson'endend-# The Optional<T> type for SequenceTypeOSGymSandboxClaimCondition.- def read_OptionalSequenceTypeOSGymSandboxClaimCondition+ def readOptionalSequenceTypeOsGymSandboxClaimConditionflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_SequenceTypeOSGymSandboxClaimCondition+ return readSequenceTypeOsGymSandboxClaimConditionelse- raise InternalError, 'Unexpected flag byte for OptionalSequenceTypeOSGymSandboxClaimCondition'+ raise InternalError, 'Unexpected flag byte for OptionalSequenceTypeOsGymSandboxClaimCondition'endend-# The Optional<T> type for SequenceTypeSandboxService.- def read_OptionalSequenceTypeSandboxService+ def readOptionalSequenceTypeSandboxServiceflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_SequenceTypeSandboxService+ return readSequenceTypeSandboxServiceelseraise InternalError, 'Unexpected flag byte for OptionalSequenceTypeSandboxService'endend-# The Optional<T> type for MapStringString.- def read_OptionalMapStringString+ def readOptionalMapStringStringflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_MapStringString+ return readMapStringStringelseraise InternalError, 'Unexpected flag byte for OptionalMapStringString'end@@ -1756,7 +1681,7 @@ class RustBufferStream# The Sequence<T> type for string.- def read_Sequencestring+ def readSequencestringcount = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative sequence length' if count.negative?@@ -1764,7 +1689,7 @@ class RustBufferStreamitems = []count.times do- items.append read_string+ items.append readStringenditems@@ -1772,7 +1697,7 @@ class RustBufferStream# The Sequence<T> type for TypePreservedJson.- def read_SequenceTypePreservedJson+ def readSequenceTypePreservedJsoncount = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative sequence length' if count.negative?@@ -1780,7 +1705,7 @@ class RustBufferStreamitems = []count.times do- items.append read_TypePreservedJson+ items.append readTypePreservedJsonenditems@@ -1788,7 +1713,7 @@ class RustBufferStream# The Sequence<T> type for TypeOSGymSandboxClaimCondition.- def read_SequenceTypeOSGymSandboxClaimCondition+ def readSequenceTypeOsGymSandboxClaimConditioncount = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative sequence length' if count.negative?@@ -1796,7 +1721,7 @@ class RustBufferStreamitems = []count.times do- items.append read_TypeOSGymSandboxClaimCondition+ items.append readTypeOsGymSandboxClaimConditionenditems@@ -1804,7 +1729,7 @@ class RustBufferStream# The Sequence<T> type for TypeSandboxService.- def read_SequenceTypeSandboxService+ def readSequenceTypeSandboxServicecount = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative sequence length' if count.negative?@@ -1812,29 +1737,27 @@ class RustBufferStreamitems = []count.times do- items.append read_TypeSandboxService+ items.append readTypeSandboxServiceenditemsend- # The Map<T> type for MapStringString.+ # The Map<T> type for string.- def read_MapStringString+ def readMapStringStringcount = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative map size' if count.negative?items = {}count.times do- key = read_string- items[key] = read_string+ key = readString+ items[key] = readStringenditemsend--def unpack_from(size, format)raise InternalError, 'read past end of rust buffer' if @offset + size > @rbuf.len@@ -1879,27 +1802,27 @@ class RustBufferBuilderendend- def write_u16(v)- v = ::CyclopsSdkSchema::uniffi_in_range(v, "u16", 0, 2**16)+ def write_U16(v)+ v = CyclopsSdkSchema::uniffi_in_range(v, "u16", 0, 2**16)pack_into(2, 'S>', v)end- def write_u32(v)- v = ::CyclopsSdkSchema::uniffi_in_range(v, "u32", 0, 2**32)+ def write_U32(v)+ v = CyclopsSdkSchema::uniffi_in_range(v, "u32", 0, 2**32)pack_into(4, 'L>', v)end- def write_u64(v)- v = ::CyclopsSdkSchema::uniffi_in_range(v, "u64", 0, 2**64)+ def write_U64(v)+ v = CyclopsSdkSchema::uniffi_in_range(v, "u64", 0, 2**64)pack_into(8, 'Q>', v)end- def write_bool(v)+ def write_Bool(v)pack_into(1, 'c', v ? 1 : 0)end- def write_string(v)- v = ::CyclopsSdkSchema::uniffi_utf8(v)+ def write_String(v)+ v = CyclopsSdkSchema::uniffi_utf8(v)pack_into 4, 'l>', v.bytes.sizewrite vend@@ -1930,7 +1853,7 @@ class RustBufferBuilder# The Record type OSGymSandboxClaimCondition.- def write_TypeOSGymSandboxClaimCondition(v)+ def write_TypeOsGymSandboxClaimCondition(v)self.write_Optionalstring(v.type)self.write_Optionalstring(v.status)self.write_Optionalstring(v.reason)@@ -1940,28 +1863,28 @@ class RustBufferBuilder# The Record type OSGymSandboxClaimSandbox.- def write_TypeOSGymSandboxClaimSandbox(v)+ def write_TypeOsGymSandboxClaimSandbox(v)self.write_Optionalstring(v.name)self.write_Optionalstring(v.service)end# The Record type OSGymSandboxClaimStatus.- def write_TypeOSGymSandboxClaimStatus(v)+ def write_TypeOsGymSandboxClaimStatus(v)self.write_Optionalstring(v.phase)- self.write_OptionalSequenceTypeOSGymSandboxClaimCondition(v.conditions)- self.write_OptionalTypeOSGymSandboxClaimSandbox(v.sandbox)+ self.write_OptionalSequenceTypeOsGymSandboxClaimCondition(v.conditions)+ self.write_OptionalTypeOsGymSandboxClaimSandbox(v.sandbox)end# The Record type OSGymSandboxSpec.- def write_TypeOSGymSandboxSpec(v)+ def write_TypeOsGymSandboxSpec(v)self.write_TypeVmTemplate(v.vm_template)end# The Record type OSGymSandboxStatus.- def write_TypeOSGymSandboxStatus(v)+ def write_TypeOsGymSandboxStatus(v)self.write_Optionalstring(v.phase)self.write_Optionalstring(v.runtime)self.write_Optionalbool(v.ready)@@ -1974,21 +1897,21 @@ class RustBufferBuilder# The Record type OSGymSandboxTemplateSpec.- def write_TypeOSGymSandboxTemplateSpec(v)+ def write_TypeOsGymSandboxTemplateSpec(v)self.write_TypeVmTemplate(v.vm_template)end# The Record type OSGymSandboxWarmPoolSpec.- def write_TypeOSGymSandboxWarmPoolSpec(v)- self.write_u32(v.replicas)+ def write_TypeOsGymSandboxWarmPoolSpec(v)+ self.write_U32(v.replicas)self.write_TypeSandboxTemplateRef(v.sandbox_template_ref)self.write_OptionalTypeWarmPoolAutoscaling(v.autoscaling)end# The Record type OSGymSandboxWarmPoolStatus.- def write_TypeOSGymSandboxWarmPoolStatus(v)+ def write_TypeOsGymSandboxWarmPoolStatus(v)self.write_Optionalu32(v.replicas)self.write_Optionalu32(v.ready_replicas)self.write_Optionalstring(v.selector)@@ -1996,7 +1919,7 @@ class RustBufferBuilder# The Record type OSGymWorkspacePoolStatus.- def write_TypeOSGymWorkspacePoolStatus(v)+ def write_TypeOsGymWorkspacePoolStatus(v)self.write_Optionalstring(v.phase)self.write_Optionalu32(v.total_count)self.write_Optionalu32(v.available_count)@@ -2006,8 +1929,8 @@ class RustBufferBuilder# The Record type OidcConfig.def write_TypeOidcConfig(v)- self.write_string(v.credentials_secret)- self.write_string(v.token_url)+ self.write_String(v.credentials_secret)+ self.write_String(v.token_url)self.write_Optionalstring(v.aws_role_arn)self.write_Optionalstring(v.aws_region)self.write_Optionalu32(v.refresh_interval_seconds)@@ -2016,7 +1939,7 @@ class RustBufferBuilder# The Record type PoolSpec.def write_TypePoolSpec(v)- self.write_u32(v.replicas)+ self.write_U32(v.replicas)self.write_TypePoolTemplate(v.template)self.write_OptionalTypeWarmPoolAutoscaling(v.autoscaling)self.write_OptionalSequenceTypeSandboxService(v.services)@@ -2030,7 +1953,7 @@ class RustBufferBuilderself.write_OptionalMapStringString(v.node_selector)self.write_OptionalSequenceTypePreservedJson(v.tolerations)self.write_OptionalSequencestring(v.command)- self.write_string(v.container_disk_image)+ self.write_String(v.container_disk_image)self.write_Optionalstring(v.image_pull_secret)self.write_Optionalu32(v.cpu_cores)self.write_Optionalstring(v.memory)@@ -2042,21 +1965,21 @@ class RustBufferBuilder# The Record type SandboxService.def write_TypeSandboxService(v)- self.write_string(v.name)- self.write_u16(v.target_port)+ self.write_String(v.name)+ self.write_U16(v.target_port)self.write_OptionalTypeServiceProtocol(v.protocol)end# The Record type SandboxTemplateRef.def write_TypeSandboxTemplateRef(v)- self.write_string(v.name)+ self.write_String(v.name)end# The Record type VmTemplate.def write_TypeVmTemplate(v)- self.write_string(v.container_disk_image)+ self.write_String(v.container_disk_image)self.write_OptionalSequencestring(v.command)self.write_OptionalTypeRuntimeKind(v.runtime)self.write_Optionalstring(v.runtime_class_name)@@ -2083,65 +2006,30 @@ class RustBufferBuilder# The Enum type Firmware.def write_TypeFirmware(v)- if v == Firmware::BIOS- pack_into(4, 'l>', 1)- end- if v == Firmware::EFI- pack_into(4, 'l>', 2)- end+ pack_into(4, 'l>', v)end# The Enum type ImagePullPolicy.def write_TypeImagePullPolicy(v)- if v == ImagePullPolicy::ALWAYS- pack_into(4, 'l>', 1)- end- if v == ImagePullPolicy::IF_NOT_PRESENT- pack_into(4, 'l>', 2)- end- if v == ImagePullPolicy::NEVER- pack_into(4, 'l>', 3)- end+ pack_into(4, 'l>', v)end- # The Error type JsonValueError - write for callback error returns.-- def write_TypeJsonValueError(v)- if v.is_a?(JsonValueError::Invalid)- pack_into 4, 'l>', 1- self.write_string(v.reason)- return- end- end# The Enum type RuntimeKind.def write_TypeRuntimeKind(v)- if v == RuntimeKind::KUBEVIRT- pack_into(4, 'l>', 1)- end- if v == RuntimeKind::MACOS- pack_into(4, 'l>', 2)- end- if v == RuntimeKind::GVISOR- pack_into(4, 'l>', 3)- end+ pack_into(4, 'l>', v)end# The Enum type ServiceProtocol.def write_TypeServiceProtocol(v)- if v == ServiceProtocol::TCP- pack_into(4, 'l>', 1)- end- if v == ServiceProtocol::UDP- pack_into(4, 'l>', 2)- end+ pack_into(4, 'l>', v)end@@ -2152,7 +2040,7 @@ class RustBufferBuilderpack_into(1, 'c', 0)elsepack_into(1, 'c', 1)- self.write_u32(v)+ self.write_U32(v)endend@@ -2163,7 +2051,7 @@ class RustBufferBuilderpack_into(1, 'c', 0)elsepack_into(1, 'c', 1)- self.write_bool(v)+ self.write_Bool(v)endend@@ -2174,7 +2062,7 @@ class RustBufferBuilderpack_into(1, 'c', 0)elsepack_into(1, 'c', 1)- self.write_string(v)+ self.write_String(v)endend@@ -2202,12 +2090,12 @@ class RustBufferBuilder# The Optional<T> type for TypeOSGymSandboxClaimSandbox.- def write_OptionalTypeOSGymSandboxClaimSandbox(v)+ def write_OptionalTypeOsGymSandboxClaimSandbox(v)if v.nil?pack_into(1, 'c', 0)elsepack_into(1, 'c', 1)- self.write_TypeOSGymSandboxClaimSandbox(v)+ self.write_TypeOsGymSandboxClaimSandbox(v)endend@@ -2301,12 +2189,12 @@ class RustBufferBuilder# The Optional<T> type for SequenceTypeOSGymSandboxClaimCondition.- def write_OptionalSequenceTypeOSGymSandboxClaimCondition(v)+ def write_OptionalSequenceTypeOsGymSandboxClaimCondition(v)if v.nil?pack_into(1, 'c', 0)elsepack_into(1, 'c', 1)- self.write_SequenceTypeOSGymSandboxClaimCondition(v)+ self.write_SequenceTypeOsGymSandboxClaimCondition(v)endend@@ -2338,7 +2226,7 @@ class RustBufferBuilderpack_into(4, 'l>', items.size)items.each do |item|- self.write_string(item)+ self.write_String(item)endend@@ -2354,11 +2242,11 @@ class RustBufferBuilder# The Sequence<T> type for TypeOSGymSandboxClaimCondition.- def write_SequenceTypeOSGymSandboxClaimCondition(items)+ def write_SequenceTypeOsGymSandboxClaimCondition(items)pack_into(4, 'l>', items.size)items.each do |item|- self.write_TypeOSGymSandboxClaimCondition(item)+ self.write_TypeOsGymSandboxClaimCondition(item)endend@@ -2372,19 +2260,17 @@ class RustBufferBuilderendend- # The Map<T> type for MapStringString.+ # The Map<T> type for string.def write_MapStringString(items)pack_into(4, 'l>', items.size)items.each do |k, v|- self.write_string(k)- self.write_string(v)+ write_String(k)+ self.write_String(v)endend--privatedef reserve(num_bytes)@@ -2436,20 +2322,16 @@ CALL_PANIC = 2module JsonValueErrorclass Invalid < StandardError- def initialize(reason:)-+ def initialize(reason)@reason = reason-super()- end-+ endattr_reader :reasondef to_s- "#{self.class.name}(reason=#{@reason.inspect})"-+ "#{self.class.name}(reason=#{@reason.inspect})"endend@@ -2458,7 +2340,13 @@ end# Map error modules to the RustBuffer method name that reads themERROR_MODULE_TO_READER_METHOD = {-JsonValueError => :read_TypeJsonValueError,++++++ JsonValueError => :readTypeJsonValueError,+}private_constant :ERROR_MODULE_TO_READER_METHOD, :CALL_SUCCESS, :CALL_ERROR, :CALL_PANIC,@@ -2466,8 +2354,7 @@ private_constant :ERROR_MODULE_TO_READER_METHOD, :CALL_SUCCESS, :CALL_ERROR, :CAdef self.consume_buffer_into_error(error_module, rust_buffer)rust_buffer.consumeWithStream do |stream|- reader_method = ERROR_MODULE_TO_READER_METHOD[error_module] ||- ERROR_MODULE_TO_READER_METHOD[error_module.name&.split('::')&.last]+ reader_method = ERROR_MODULE_TO_READER_METHOD[error_module]return stream.send(reader_method)endend@@ -2509,7 +2396,7 @@ def self.rust_call_with_error(error_module, fn_name, *args)# with the message. But if that code panics, then it just sends back# an empty buffer.if status.error_buf.len > 0- raise InternalError, status.error_buf.consume_into_string+ raise InternalError, status.error_buf.consumeIntoString()elseraise InternalError, "Rust panic"end@@ -2529,414 +2416,51 @@ module UniFFILibffi_lib 'cyclops_sdk'- # Define FFI callback types and structs (vtables, etc.)-- callback :RustFutureContinuationCallback,- [:uint64, :int8, ],- :void-- callback :ForeignFutureDroppedCallback,- [:uint64, ],- :void-- callback :CallbackInterfaceFree,- [:uint64, ],- :void-- callback :CallbackInterfaceClone,- [:uint64, ],- :uint64-- class ForeignFutureDroppedCallbackStruct < FFI::Struct- layout(- :handle, :uint64,- :free, :ForeignFutureDroppedCallback- )- end-- class ForeignFutureResultU8 < FFI::Struct- layout(- :return_value, :uint8,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteU8,- [:uint64, ForeignFutureResultU8.by_value, ],- :void-- class ForeignFutureResultI8 < FFI::Struct- layout(- :return_value, :int8,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteI8,- [:uint64, ForeignFutureResultI8.by_value, ],- :void-- class ForeignFutureResultU16 < FFI::Struct- layout(- :return_value, :uint16,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteU16,- [:uint64, ForeignFutureResultU16.by_value, ],- :void-- class ForeignFutureResultI16 < FFI::Struct- layout(- :return_value, :int16,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteI16,- [:uint64, ForeignFutureResultI16.by_value, ],- :void-- class ForeignFutureResultU32 < FFI::Struct- layout(- :return_value, :uint32,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteU32,- [:uint64, ForeignFutureResultU32.by_value, ],- :void-- class ForeignFutureResultI32 < FFI::Struct- layout(- :return_value, :int32,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteI32,- [:uint64, ForeignFutureResultI32.by_value, ],- :void-- class ForeignFutureResultU64 < FFI::Struct- layout(- :return_value, :uint64,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteU64,- [:uint64, ForeignFutureResultU64.by_value, ],- :void-- class ForeignFutureResultI64 < FFI::Struct- layout(- :return_value, :int64,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteI64,- [:uint64, ForeignFutureResultI64.by_value, ],- :void-- class ForeignFutureResultF32 < FFI::Struct- layout(- :return_value, :float,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteF32,- [:uint64, ForeignFutureResultF32.by_value, ],- :void-- class ForeignFutureResultF64 < FFI::Struct- layout(- :return_value, :double,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteF64,- [:uint64, ForeignFutureResultF64.by_value, ],- :void-- class ForeignFutureResultRustBuffer < FFI::Struct- layout(- :return_value, RustBuffer.by_value,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteRustBuffer,- [:uint64, ForeignFutureResultRustBuffer.by_value, ],- :void-- class ForeignFutureResultVoid < FFI::Struct- layout(- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteVoid,- [:uint64, ForeignFutureResultVoid.by_value, ],- :void-attach_function :uniffi_cyclops_sdk_schema_fn_clone_preservedjson,[:uint64, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_schema_fn_free_preservedjson,[:uint64, RustCallStatus.by_ref],:void-attach_function :uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json,[RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json,[:uint64, RustCallStatus.by_ref],RustBuffer.by_value-attach_function :uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq,[RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],:int8-attach_function :uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_ne,[RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],:int8-attach_function :uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash,[RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :ffi_cyclops_sdk_schema_rustbuffer_alloc,[:uint64, RustCallStatus.by_ref],RustBuffer.by_value-attach_function :ffi_cyclops_sdk_schema_rustbuffer_from_bytes,[ForeignBytes, RustCallStatus.by_ref],RustBuffer.by_value-attach_function :ffi_cyclops_sdk_schema_rustbuffer_free,[RustBuffer.by_value, RustCallStatus.by_ref],:void-attach_function :ffi_cyclops_sdk_schema_rustbuffer_reserve,[RustBuffer.by_value, :uint64, RustCallStatus.by_ref],RustBuffer.by_value-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_u8,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_u8,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_u8,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_u8,- [:uint64, RustCallStatus.by_ref],- :uint8-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_i8,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_i8,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_i8,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_i8,- [:uint64, RustCallStatus.by_ref],- :int8-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_u16,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_u16,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_u16,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_u16,- [:uint64, RustCallStatus.by_ref],- :uint16-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_i16,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_i16,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_i16,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_i16,- [:uint64, RustCallStatus.by_ref],- :int16-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_u32,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_u32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_u32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_u32,- [:uint64, RustCallStatus.by_ref],- :uint32-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_i32,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_i32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_i32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_i32,- [:uint64, RustCallStatus.by_ref],- :int32-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_u64,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_u64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_u64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_u64,- [:uint64, RustCallStatus.by_ref],- :uint64-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_i64,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_i64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_i64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_i64,- [:uint64, RustCallStatus.by_ref],- :int64-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_f32,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_f32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_f32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_f32,- [:uint64, RustCallStatus.by_ref],- :float-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_f64,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_f64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_f64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_f64,- [:uint64, RustCallStatus.by_ref],- :double-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_rust_buffer,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_rust_buffer,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_rust_buffer,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_rust_buffer,- [:uint64, RustCallStatus.by_ref],- RustBuffer.by_value-- attach_function :ffi_cyclops_sdk_schema_rust_future_poll_void,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_cancel_void,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_free_void,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_schema_rust_future_complete_void,- [:uint64, RustCallStatus.by_ref],- :void-attach_function :uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :ffi_cyclops_sdk_schema_uniffi_contract_version,- [],+ [RustCallStatus.by_ref],:uint32end- # Custom type definitions.-# Public interface members begin here.@@ -2944,8 +2468,8 @@ endclass Firmware- BIOS = 0- EFI = 1+ BIOS = 1+ EFI = 2end@@ -2955,9 +2479,9 @@ endclass ImagePullPolicy- ALWAYS = 0- IF_NOT_PRESENT = 1- NEVER = 2+ ALWAYS = 1+ IF_NOT_PRESENT = 2+ NEVER = 3end@@ -2967,9 +2491,9 @@ endclass RuntimeKind- KUBEVIRT = 0- MACOS = 1- GVISOR = 2+ KUBEVIRT = 1+ MACOS = 2+ GVISOR = 3end@@ -2979,8 +2503,8 @@ endclass ServiceProtocol- TCP = 0- UDP = 1+ TCP = 1+ UDP = 2end@@ -3010,7 +2534,6 @@ class ClaimLifecycletrueend-end# Record type ClaimSpec@@ -3040,7 +2563,6 @@ class ClaimSpectrueend-end# Record type OSGymSandboxClaimCondition@@ -3074,7 +2596,6 @@ class OsGymSandboxClaimConditiontrueend-end# Record type OSGymSandboxClaimSandbox@@ -3096,7 +2617,6 @@ class OsGymSandboxClaimSandboxtrueend-end# Record type OSGymSandboxClaimStatus@@ -3122,7 +2642,6 @@ class OsGymSandboxClaimStatustrueend-end# Record type OidcConfig@@ -3156,7 +2675,6 @@ class OidcConfigtrueend-end# Record type SandboxService@@ -3182,7 +2700,6 @@ class SandboxServicetrueend-end# Record type SandboxTemplateRef@@ -3200,7 +2717,6 @@ class SandboxTemplateReftrueend-end# Record type VmTemplate@@ -3270,7 +2786,6 @@ class VmTemplatetrueend-end# Record type OSGymSandboxSpec@@ -3288,7 +2803,6 @@ class OsGymSandboxSpectrueend-end# Record type OSGymSandboxStatus@@ -3334,7 +2848,6 @@ class OsGymSandboxStatustrueend-end# Record type OSGymSandboxTemplateSpec@@ -3352,7 +2865,6 @@ class OsGymSandboxTemplateSpectrueend-end# Record type OSGymSandboxWarmPoolSpec@@ -3378,7 +2890,6 @@ class OsGymSandboxWarmPoolSpectrueend-end# Record type OSGymSandboxWarmPoolStatus@@ -3404,7 +2915,6 @@ class OsGymSandboxWarmPoolStatustrueend-end# Record type WarmPoolAutoscaling@@ -3430,7 +2940,6 @@ class WarmPoolAutoscalingtrueend-end# Record type OSGymWorkspacePoolStatus@@ -3460,7 +2969,6 @@ class OsGymWorkspacePoolStatustrueend-end# Record type PoolSpec@@ -3474,28 +2982,22 @@ class PoolSpec@services = servicesend-# The Rust `Eq::eq` implementation.-def ==(other)- return false unless other.is_a?(self.class)- result = ::CyclopsSdkSchema.rust_call(- :uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq,- RustBuffer.alloc_from_TypePoolSpec(self),- RustBuffer.alloc_from_TypePoolSpec(other)- )- 1 == result-end-# The Rust `Hash::hash` implementation.-def hash- result = ::CyclopsSdkSchema.rust_call(- :uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash,- RustBuffer.alloc_from_TypePoolSpec(self)- )- result.to_i-end+ def ==(other)+ if @replicas != other.replicas+ return false+ end+ if @template != other.template+ return false+ end+ if @autoscaling != other.autoscaling+ return false+ end+ if @services != other.services+ return false+ end-def eql?(other)- self == other-end+ true+ endend# Record type PoolTemplate@@ -3557,7 +3059,6 @@ class PoolTemplatetrueend-end@@ -3580,23 +3081,24 @@ end# 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(+ CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_free_preservedjson,handle)endend+# 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 !inst.is_a? self+ if not inst.is_a? selfraise TypeError.new "Expected a PreservedJson instance, got #{inst}"endenddef uniffi_clone_handle()- return ::CyclopsSdkSchema.rust_call(+ return CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_clone_preservedjson,@handle)@@ -3606,28 +3108,21 @@ endreturn inst.uniffi_clone_handle()end- def self.uniffi_lift(handle)- uniffi_allocate handle- end--def self.from_json(value)- value = ::CyclopsSdkSchema::uniffi_utf8(value)+ value = CyclopsSdkSchema::uniffi_utf8(value)# Call the (fallible) function before creating any half-baked object instances.# Lightly yucky way to bypass the usual "initialize" logic# and just create a new instance with the required handle.- return uniffi_allocate(::CyclopsSdkSchema.rust_call_with_error(JsonValueError,:uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json,RustBuffer.alloc_from_string(value)))+ return uniffi_allocate(CyclopsSdkSchema.rust_call_with_error(JsonValueError,:uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json,RustBuffer.allocFromString(value)))enddef to_json()- result = ::CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json,uniffi_clone_handle(),)- return result.consume_into_string+ result = CyclopsSdkSchema.rust_call(:uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json,uniffi_clone_handle(),)+ return result.consumeIntoStringendend--enddiff --git a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rb b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rbindex dda4920bf2..f695afacb0 100644--- a/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rb+++ b/libs/fleet/sdk-bindings/ruby/cyclops_sdk/sdk.rb@@ -14,8 +14,7 @@# helpers directly inline like we're doing here.require 'ffi'-require 'set'-require 'monitor'+module CyclopsSdkdef self.uniffi_in_range(i, type_name, min, max)@@ -37,125 +36,21 @@ def self.uniffi_bytes(v)v.to_strend-# Callback return codes-UNIFFI_CALLBACK_SUCCESS = 0-UNIFFI_CALLBACK_ERROR = 1-UNIFFI_CALLBACK_UNEXPECTED_ERROR = 2--# Call a method on a callback interface object, catching and reporting errors-# to Rust via the call_status.-# If error_type is provided, known errors of that type are reported as UNIFFI_CALLBACK_ERROR;-# all other errors are reported as UNIFFI_CALLBACK_UNEXPECTED_ERROR.-def self.uniffi_trait_interface_call(call_status, make_call, write_return_value, error_type = nil, lower_error = nil)- begin- write_return_value.call make_call.call- rescue StandardError => e- buf = if !error_type.nil? && uniffi_is_error_type?(e, error_type)- call_status[:code] = UNIFFI_CALLBACK_ERROR- lower_error.call e- else- call_status[:code] = UNIFFI_CALLBACK_UNEXPECTED_ERROR- RustBuffer.alloc_from_string(e.inspect)- end-- error_buf = call_status[:error_buf]- error_buf[:capacity] = buf[:capacity]- error_buf[:len] = buf[:len]- error_buf[:data] = buf[:data]- end-end--# Check if an exception is a variant of the given error type.-# Error types in Ruby are either modules (non-flat enums) or classes (flat enums),-# with variant classes as constant within them.-def self.uniffi_is_error_type?(e, error_type)- # Object-as-error: error_type is a class itself (e.g. MyError < StandardError)- if error_type.is_a?(Class) && e.is_a?(error_type)- return true- end-- # Enum error: error_type is a module with class constants for each variant- error_type.constants.any? do |c|- klass = error_type.const_get c- klass.is_a?(Class) && e.is_a?(klass)- end-end- # A handle map for converting Ruby objects to/from integer handles.-#-# When passing callback interface or trait interface objects to Ruby, we store-# the Ruby object in this map and pass the integer handle to Rust. When Rust-# calls back, we look up the Ruby object by its handle.-#-# Ruby-created handles are always odd (staring at 1, incrementing by 2).-# Rust-created handles are always even. This convention lets us distinguish-# the source in lift/lower without extra metadata.---class UniffiHandleMap- def initialize- @lock = Monitor.new- @map = {}- @counter = 1 # Start at 1 (odd), increment by 2- end-- def insert(obj)- @lock.synchronize do- handle = @counter- @counter += 2- @map[handle] = obj- handle- end- end-- def get(handle)- @lock.synchronize do- obj = @map[handle]- raise InternalError, "UniffiHandleMap.get: invalid handle #{handle}" if obj.nil?- obj- end- end-- def clone_handle(handle)- @lock.synchronize do- obj = @map[handle]- raise InternalError, "UniffiHandleMap.clone_handle: invalid handle #{handle}" if obj.nil?- new_handle = @counter- @counter += 2- @map[new_handle] = obj- new_handle- end- end-- def remove(handle)- @lock.synchronize do- obj = @map.delete(handle)- raise InternalError, "UniffiHandleMap.remove: invalid handle #{handle}" if obj.nil?- obj- end- end-- # Used for testing/debugging purposes- def size- @lock.synchronize { @map.size }- end-end--private_constant :UniffiHandleMapclass RustBuffer < FFI::Structlayout :capacity, :uint64,:len, :uint64,:data, :pointerdef self.alloc(size)- return ::CyclopsSdk.rust_call(:ffi_cyclops_sdk_rustbuffer_alloc, size)+ return CyclopsSdk.rust_call(:ffi_cyclops_sdk_rustbuffer_alloc, size)enddef self.reserve(rbuf, additional)- return ::CyclopsSdk.rust_call(:ffi_cyclops_sdk_rustbuffer_reserve, rbuf, additional)+ return CyclopsSdk.rust_call(:ffi_cyclops_sdk_rustbuffer_reserve, rbuf, additional)enddef free- ::CyclopsSdk.rust_call(:ffi_cyclops_sdk_rustbuffer_free, self)+ CyclopsSdk.rust_call(:ffi_cyclops_sdk_rustbuffer_free, self)enddef capacity@@ -203,14 +98,14 @@ private_constant :UniffiHandleMapfreeend# The primitive String type.- def self.alloc_from_string(value)+ def self.allocFromString(value)RustBuffer.allocWithBuilder do |builder|builder.write value.encode('utf-8')return builder.finalizeendend- def consume_into_string+ def consumeIntoStringconsumeWithStream do |stream|return stream.read(stream.remaining).force_encoding(Encoding::UTF_8)end@@ -218,16 +113,16 @@ private_constant :UniffiHandleMap# The primitive Bytes type.- def self.alloc_from_bytes(value)+ def self.allocFromBytes(value)RustBuffer.allocWithBuilder do |builder|- builder.write_bytes(value)+ builder.write_Bytes(value)return builder.finalizeendend- def consume_into_bytes+ def consumeIntoBytesconsumeWithStream do |stream|- return stream.read_bytes+ return stream.readBytesendend@@ -238,7 +133,7 @@ private_constant :UniffiHandleMapRustBuffer.check_lower_TypeResourceMetadata(v.metadata)RustBuffer.check_lower_TypeClaimSpec(v.spec)- RustBuffer.check_lower_OptionalTypeOSGymSandboxClaimStatus(v.status)+ RustBuffer.check_lower_OptionalTypeOsGymSandboxClaimStatus(v.status)enddef self.alloc_from_TypeClaim(v)@@ -248,9 +143,9 @@ private_constant :UniffiHandleMapendend- def consume_into_TypeClaim+ def consumeIntoTypeClaimconsumeWithStream do |stream|- return stream.read_TypeClaim+ return stream.readTypeClaimendend@@ -268,9 +163,9 @@ private_constant :UniffiHandleMapendend- def consume_into_TypeCreateClaimRequest+ def consumeIntoTypeCreateClaimRequestconsumeWithStream do |stream|- return stream.read_TypeCreateClaimRequest+ return stream.readTypeCreateClaimRequestendend@@ -288,9 +183,9 @@ private_constant :UniffiHandleMapendend- def consume_into_TypeCreatePoolRequest+ def consumeIntoTypeCreatePoolRequestconsumeWithStream do |stream|- return stream.read_TypeCreatePoolRequest+ return stream.readTypeCreatePoolRequestendend@@ -313,9 +208,9 @@ private_constant :UniffiHandleMapendend- def consume_into_TypeCyclopsConfiguration+ def consumeIntoTypeCyclopsConfigurationconsumeWithStream do |stream|- return stream.read_TypeCyclopsConfiguration+ return stream.readTypeCyclopsConfigurationendend@@ -333,9 +228,9 @@ private_constant :UniffiHandleMapendend- def consume_into_TypeHttpHeader+ def consumeIntoTypeHttpHeaderconsumeWithStream do |stream|- return stream.read_TypeHttpHeader+ return stream.readTypeHttpHeaderendend@@ -355,9 +250,9 @@ private_constant :UniffiHandleMapendend- def consume_into_TypeHttpRequest+ def consumeIntoTypeHttpRequestconsumeWithStream do |stream|- return stream.read_TypeHttpRequest+ return stream.readTypeHttpRequestendend@@ -376,9 +271,9 @@ private_constant :UniffiHandleMapendend- def consume_into_TypeHttpResponse+ def consumeIntoTypeHttpResponseconsumeWithStream do |stream|- return stream.read_TypeHttpResponse+ return stream.readTypeHttpResponseendend@@ -389,7 +284,7 @@ private_constant :UniffiHandleMapRustBuffer.check_lower_TypeResourceMetadata(v.metadata)RustBuffer.check_lower_TypePoolSpec(v.spec)- RustBuffer.check_lower_OptionalTypeOSGymWorkspacePoolStatus(v.status)+ RustBuffer.check_lower_OptionalTypeOsGymWorkspacePoolStatus(v.status)enddef self.alloc_from_TypePool(v)@@ -399,9 +294,9 @@ private_constant :UniffiHandleMapendend- def consume_into_TypePool+ def consumeIntoTypePoolconsumeWithStream do |stream|- return stream.read_TypePool+ return stream.readTypePoolendend@@ -420,9 +315,9 @@ private_constant :UniffiHandleMapendend- def consume_into_TypeResourceMetadata+ def consumeIntoTypeResourceMetadataconsumeWithStream do |stream|- return stream.read_TypeResourceMetadata+ return stream.readTypeResourceMetadataendend@@ -442,48 +337,20 @@ private_constant :UniffiHandleMapendend- def consume_into_TypeSandbox+ def consumeIntoTypeSandboxconsumeWithStream do |stream|- return stream.read_TypeSandbox+ return stream.readTypeSandboxendend- # Error enum - generate alloc_from for callback error serialization- def self.alloc_from_TypeHttpError(v)- RustBuffer.allocWithBuilder do |builder|- builder.write_TypeHttpError(v)- return builder.finalize- end- end- # Enum used as error - generate consume_into_ for use as a return value- def consume_into_TypeHttpError- consumeWithStream do |stream|- return stream.read_TypeHttpError- end- end- # Error enum - generate alloc_from for callback error serialization- def self.alloc_from_TypeSdkError(v)- RustBuffer.allocWithBuilder do |builder|- builder.write_TypeSdkError(v)- return builder.finalize- end- end-- # Enum used as error - generate consume_into_ for use as a return value- def consume_into_TypeSdkError- consumeWithStream do |stream|- return stream.read_TypeSdkError- end- end-# The Optional<T> type for bytes.def self.check_lower_Optionalbytes(v)- if !v.nil?+ if not v.nil?endend@@ -495,16 +362,16 @@ private_constant :UniffiHandleMapendend- def consume_into_Optionalbytes+ def consumeIntoOptionalbytesconsumeWithStream do |stream|- return stream.read_Optionalbytes+ return stream.readOptionalbytesendend# The Optional<T> type for TypeClaimSpec.def self.check_lower_OptionalTypeClaimSpec(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_TypeClaimSpec(v)endend@@ -516,16 +383,16 @@ private_constant :UniffiHandleMapendend- def consume_into_OptionalTypeClaimSpec+ def consumeIntoOptionalTypeClaimSpecconsumeWithStream do |stream|- return stream.read_OptionalTypeClaimSpec+ return stream.readOptionalTypeClaimSpecendend# The Optional<T> type for TypeOSGymSandboxClaimStatus.def self.check_lower_OptionalTypeOSGymSandboxClaimStatus(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_TypeOSGymSandboxClaimStatus(v)endend@@ -537,16 +404,16 @@ private_constant :UniffiHandleMapendend- def consume_into_OptionalTypeOSGymSandboxClaimStatus+ def consumeIntoOptionalTypeOSGymSandboxClaimStatusconsumeWithStream do |stream|- return stream.read_OptionalTypeOSGymSandboxClaimStatus+ return stream.readOptionalTypeOSGymSandboxClaimStatusendend# The Optional<T> type for TypeOSGymWorkspacePoolStatus.def self.check_lower_OptionalTypeOSGymWorkspacePoolStatus(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_TypeOSGymWorkspacePoolStatus(v)endend@@ -558,16 +425,16 @@ private_constant :UniffiHandleMapendend- def consume_into_OptionalTypeOSGymWorkspacePoolStatus+ def consumeIntoOptionalTypeOSGymWorkspacePoolStatusconsumeWithStream do |stream|- return stream.read_OptionalTypeOSGymWorkspacePoolStatus+ return stream.readOptionalTypeOSGymWorkspacePoolStatusendend# The Optional<T> type for MapStringString.def self.check_lower_OptionalMapStringString(v)- if !v.nil?+ if not v.nil?RustBuffer.check_lower_MapStringString(v)endend@@ -579,9 +446,9 @@ private_constant :UniffiHandleMapendend- def consume_into_OptionalMapStringString+ def consumeIntoOptionalMapStringStringconsumeWithStream do |stream|- return stream.read_OptionalMapStringString+ return stream.readOptionalMapStringStringendend@@ -600,9 +467,9 @@ private_constant :UniffiHandleMapendend- def consume_into_Sequencestring+ def consumeIntoSequencestringconsumeWithStream do |stream|- return stream.read_Sequencestring+ return stream.readSequencestringendend@@ -621,9 +488,9 @@ private_constant :UniffiHandleMapendend- def consume_into_SequenceTypeClaim+ def consumeIntoSequenceTypeClaimconsumeWithStream do |stream|- return stream.read_SequenceTypeClaim+ return stream.readSequenceTypeClaimendend@@ -642,9 +509,9 @@ private_constant :UniffiHandleMapendend- def consume_into_SequenceTypeHttpHeader+ def consumeIntoSequenceTypeHttpHeaderconsumeWithStream do |stream|- return stream.read_SequenceTypeHttpHeader+ return stream.readSequenceTypeHttpHeaderendend@@ -663,14 +530,13 @@ private_constant :UniffiHandleMapendend- def consume_into_SequenceTypePool+ def consumeIntoSequenceTypePoolconsumeWithStream do |stream|- return stream.read_SequenceTypePool+ return stream.readSequenceTypePoolendend-- # The Map<T> type for MapStringString.+ # The Map<T> type for string.def self.check_lower_MapStringString(v)v.each do |k, v|@@ -686,9 +552,9 @@ private_constant :UniffiHandleMapendend- def consume_into_MapStringString+ def consumeIntoMapStringStringconsumeWithStream do |stream|- return stream.read_MapStringString+ return stream.readMapStringStringendendend@@ -736,19 +602,19 @@ class RustBufferStreamdataend- def read_u16+ def readU16unpack_from 2, 'S>'end- def read_u32+ def readU32unpack_from 4, 'L>'end- def read_u64+ def readU64unpack_from 8, 'Q>'end- def read_string+ def readStringsize = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative string length' if size.negative?@@ -756,7 +622,7 @@ class RustBufferStreamread(size).force_encoding(Encoding::UTF_8)end- def read_bytes+ def readBytessize = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative byte string length' if size.negative?@@ -766,129 +632,129 @@ class RustBufferStream# The Object type CyclopsClient.- def read_TypeCyclopsClient+ def readTypeCyclopsClienthandle = unpack_from 8, 'Q>'- return CyclopsClient.uniffi_lift(handle)+ return CyclopsClient.uniffi_allocate(handle)end# The Object type CyclopsCredentials.- def read_TypeCyclopsCredentials+ def readTypeCyclopsCredentialshandle = unpack_from 8, 'Q>'- return CyclopsCredentials.uniffi_lift(handle)+ return CyclopsCredentials.uniffi_allocate(handle)end# The Object type HttpClient.- def read_TypeHttpClient+ def readTypeHttpClienthandle = unpack_from 8, 'Q>'- return HttpClient.uniffi_lift(handle)+ return HttpClient.uniffi_allocate(handle)end# The Record type Claim.- def read_TypeClaim+ def readTypeClaimClaim.new(- api_version: read_string,- kind: read_string,- metadata: read_TypeResourceMetadata,- spec: read_TypeClaimSpec,- status: read_OptionalTypeOSGymSandboxClaimStatus+ api_version: readString,+ kind: readString,+ metadata: readTypeResourceMetadata,+ spec: readTypeClaimSpec,+ status: readOptionalTypeOsGymSandboxClaimStatus)end# The Record type CreateClaimRequest.- def read_TypeCreateClaimRequest+ def readTypeCreateClaimRequestCreateClaimRequest.new(- pool: read_TypePool,- spec: read_OptionalTypeClaimSpec+ pool: readTypePool,+ spec: readOptionalTypeClaimSpec)end# The Record type CreatePoolRequest.- def read_TypeCreatePoolRequest+ def readTypeCreatePoolRequestCreatePoolRequest.new(- namespace: read_string,- spec: read_TypePoolSpec+ namespace: readString,+ spec: readTypePoolSpec)end# The Record type CyclopsConfiguration.- def read_TypeCyclopsConfiguration+ def readTypeCyclopsConfigurationCyclopsConfiguration.new(- base_url: read_string,- token_url: read_string,- credentials: read_TypeCyclopsCredentials,- pool_poll_interval_ms: read_u64,- pool_poll_limit: read_u32,- claim_poll_interval_ms: read_u64,- claim_poll_limit: read_u32+ base_url: readString,+ token_url: readString,+ credentials: readTypeCyclopsCredentials,+ pool_poll_interval_ms: readU64,+ pool_poll_limit: readU32,+ claim_poll_interval_ms: readU64,+ claim_poll_limit: readU32)end# The Record type HttpHeader.- def read_TypeHttpHeader+ def readTypeHttpHeaderHttpHeader.new(- name: read_string,- value: read_string+ name: readString,+ value: readString)end# The Record type HttpRequest.- def read_TypeHttpRequest+ def readTypeHttpRequestHttpRequest.new(- method: read_string,- url: read_string,- headers: read_SequenceTypeHttpHeader,- body: read_Optionalbytes+ method: readString,+ url: readString,+ headers: readSequenceTypeHttpHeader,+ body: readOptionalbytes)end# The Record type HttpResponse.- def read_TypeHttpResponse+ def readTypeHttpResponseHttpResponse.new(- status: read_u16,- headers: read_SequenceTypeHttpHeader,- body: read_bytes+ status: readU16,+ headers: readSequenceTypeHttpHeader,+ body: readBytes)end# The Record type Pool.- def read_TypePool+ def readTypePoolPool.new(- api_version: read_string,- kind: read_string,- metadata: read_TypeResourceMetadata,- spec: read_TypePoolSpec,- status: read_OptionalTypeOSGymWorkspacePoolStatus+ api_version: readString,+ kind: readString,+ metadata: readTypeResourceMetadata,+ spec: readTypePoolSpec,+ status: readOptionalTypeOsGymWorkspacePoolStatus)end# The Record type ResourceMetadata.- def read_TypeResourceMetadata+ def readTypeResourceMetadataResourceMetadata.new(- namespace: read_string,- name: read_string,- labels: read_OptionalMapStringString+ namespace: readString,+ name: readString,+ labels: readOptionalMapStringString)end# The Record type Sandbox.- def read_TypeSandbox+ def readTypeSandboxSandbox.new(- namespace: read_string,- claim: read_string,- name: read_string,- services: read_Sequencestring+ namespace: readString,+ claim: readString,+ name: readString,+ services: readSequencestring)end@@ -898,12 +764,12 @@ class RustBufferStream# The Error type HttpError- def read_TypeHttpError+ def readTypeHttpErrorvariant = unpack_from 4, 'l>'if variant == 1return HttpError::Transport.new(- reason: read_string()+ readString())end@@ -917,58 +783,58 @@ class RustBufferStream# The Error type SdkError- def read_TypeSdkError+ def readTypeSdkErrorvariant = unpack_from 4, 'l>'if variant == 1return SdkError::Configuration.new(- reason: read_string()+ readString())endif variant == 2return SdkError::InvalidResourceName.new(- field: read_string(),- value: read_string(),- reason: read_string()+ readString(),+ readString(),+ readString())endif variant == 3return SdkError::Transport.new(- reason: read_string()+ readString())endif variant == 4return SdkError::Token.new(- reason: read_string()+ readString())endif variant == 5return SdkError::Body.new(- reason: read_string()+ readString())endif variant == 6return SdkError::Status.new(- operation: read_string(),- status: read_u16(),- body: read_string()+ readString(),+ readU16(),+ readString())endif variant == 7return SdkError::UnknownService.new(- requested: read_string(),- available: read_Sequencestring()+ readString(),+ readSequencestring())endif variant == 8return SdkError::InvalidServicePath.new(- path: read_string()+ readString())endif variant == 9return SdkError::ClaimFailed.new(- phase: read_string(),- status: read_string()+ readString(),+ readString())endif variant == 10@@ -979,76 +845,71 @@ class RustBufferStreamend-# The Optional<T> type for bytes.- def read_Optionalbytes+ def readOptionalbytesflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_bytes+ return readByteselseraise InternalError, 'Unexpected flag byte for Optionalbytes'endend-# The Optional<T> type for TypeClaimSpec.- def read_OptionalTypeClaimSpec+ def readOptionalTypeClaimSpecflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeClaimSpec+ return readTypeClaimSpecelseraise InternalError, 'Unexpected flag byte for OptionalTypeClaimSpec'endend-# The Optional<T> type for TypeOSGymSandboxClaimStatus.- def read_OptionalTypeOSGymSandboxClaimStatus+ def readOptionalTypeOsGymSandboxClaimStatusflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeOSGymSandboxClaimStatus+ return readTypeOsGymSandboxClaimStatuselse- raise InternalError, 'Unexpected flag byte for OptionalTypeOSGymSandboxClaimStatus'+ raise InternalError, 'Unexpected flag byte for OptionalTypeOsGymSandboxClaimStatus'endend-# The Optional<T> type for TypeOSGymWorkspacePoolStatus.- def read_OptionalTypeOSGymWorkspacePoolStatus+ def readOptionalTypeOsGymWorkspacePoolStatusflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_TypeOSGymWorkspacePoolStatus+ return readTypeOsGymWorkspacePoolStatuselse- raise InternalError, 'Unexpected flag byte for OptionalTypeOSGymWorkspacePoolStatus'+ raise InternalError, 'Unexpected flag byte for OptionalTypeOsGymWorkspacePoolStatus'endend-# The Optional<T> type for MapStringString.- def read_OptionalMapStringString+ def readOptionalMapStringStringflag = unpack_from 1, 'c'if flag == 0return nilelsif flag == 1- return read_MapStringString+ return readMapStringStringelseraise InternalError, 'Unexpected flag byte for OptionalMapStringString'end@@ -1056,7 +917,7 @@ class RustBufferStream# The Sequence<T> type for string.- def read_Sequencestring+ def readSequencestringcount = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative sequence length' if count.negative?@@ -1064,7 +925,7 @@ class RustBufferStreamitems = []count.times do- items.append read_string+ items.append readStringenditems@@ -1072,7 +933,7 @@ class RustBufferStream# The Sequence<T> type for TypeClaim.- def read_SequenceTypeClaim+ def readSequenceTypeClaimcount = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative sequence length' if count.negative?@@ -1080,7 +941,7 @@ class RustBufferStreamitems = []count.times do- items.append read_TypeClaim+ items.append readTypeClaimenditems@@ -1088,7 +949,7 @@ class RustBufferStream# The Sequence<T> type for TypeHttpHeader.- def read_SequenceTypeHttpHeader+ def readSequenceTypeHttpHeadercount = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative sequence length' if count.negative?@@ -1096,7 +957,7 @@ class RustBufferStreamitems = []count.times do- items.append read_TypeHttpHeader+ items.append readTypeHttpHeaderenditems@@ -1104,7 +965,7 @@ class RustBufferStream# The Sequence<T> type for TypePool.- def read_SequenceTypePool+ def readSequenceTypePoolcount = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative sequence length' if count.negative?@@ -1112,29 +973,27 @@ class RustBufferStreamitems = []count.times do- items.append read_TypePool+ items.append readTypePoolenditemsend- # The Map<T> type for MapStringString.+ # The Map<T> type for string.- def read_MapStringString+ def readMapStringStringcount = unpack_from 4, 'l>'raise InternalError, 'Unexpected negative map size' if count.negative?items = {}count.times do- key = read_string- items[key] = read_string+ key = readString+ items[key] = readStringenditemsend--def unpack_from(size, format)raise InternalError, 'read past end of rust buffer' if @offset + size > @rbuf.len@@ -1179,29 +1038,29 @@ class RustBufferBuilderendend- def write_u16(v)- v = ::CyclopsSdk::uniffi_in_range(v, "u16", 0, 2**16)+ def write_U16(v)+ v = CyclopsSdk::uniffi_in_range(v, "u16", 0, 2**16)pack_into(2, 'S>', v)end- def write_u32(v)- v = ::CyclopsSdk::uniffi_in_range(v, "u32", 0, 2**32)+ def write_U32(v)+ v = CyclopsSdk::uniffi_in_range(v, "u32", 0, 2**32)pack_into(4, 'L>', v)end- def write_u64(v)- v = ::CyclopsSdk::uniffi_in_range(v, "u64", 0, 2**64)+ def write_U64(v)+ v = CyclopsSdk::uniffi_in_range(v, "u64", 0, 2**64)pack_into(8, 'Q>', v)end- def write_string(v)- v = ::CyclopsSdk::uniffi_utf8(v)+ def write_String(v)+ v = CyclopsSdk::uniffi_utf8(v)pack_into 4, 'l>', v.bytes.sizewrite vend- def write_bytes(v)- v = ::CyclopsSdk::uniffi_bytes(v)+ def write_Bytes(v)+ v = CyclopsSdk::uniffi_bytes(v)pack_into 4, 'l>', v.bytes.sizewrite vend@@ -1230,11 +1089,11 @@ class RustBufferBuilder# The Record type Claim.def write_TypeClaim(v)- self.write_string(v.api_version)- self.write_string(v.kind)+ self.write_String(v.api_version)+ self.write_String(v.kind)self.write_TypeResourceMetadata(v.metadata)self.write_TypeClaimSpec(v.spec)- self.write_OptionalTypeOSGymSandboxClaimStatus(v.status)+ self.write_OptionalTypeOsGymSandboxClaimStatus(v.status)end# The Record type CreateClaimRequest.@@ -1247,34 +1106,34 @@ class RustBufferBuilder# The Record type CreatePoolRequest.def write_TypeCreatePoolRequest(v)- self.write_string(v.namespace)+ self.write_String(v.namespace)self.write_TypePoolSpec(v.spec)end# The Record type CyclopsConfiguration.def write_TypeCyclopsConfiguration(v)- self.write_string(v.base_url)- self.write_string(v.token_url)+ self.write_String(v.base_url)+ self.write_String(v.token_url)self.write_TypeCyclopsCredentials(v.credentials)- self.write_u64(v.pool_poll_interval_ms)- self.write_u32(v.pool_poll_limit)- self.write_u64(v.claim_poll_interval_ms)- self.write_u32(v.claim_poll_limit)+ self.write_U64(v.pool_poll_interval_ms)+ self.write_U32(v.pool_poll_limit)+ self.write_U64(v.claim_poll_interval_ms)+ self.write_U32(v.claim_poll_limit)end# The Record type HttpHeader.def write_TypeHttpHeader(v)- self.write_string(v.name)- self.write_string(v.value)+ self.write_String(v.name)+ self.write_String(v.value)end# The Record type HttpRequest.def write_TypeHttpRequest(v)- self.write_string(v.method)- self.write_string(v.url)+ self.write_String(v.method)+ self.write_String(v.url)self.write_SequenceTypeHttpHeader(v.headers)self.write_Optionalbytes(v.body)end@@ -1282,109 +1141,41 @@ class RustBufferBuilder# The Record type HttpResponse.def write_TypeHttpResponse(v)- self.write_u16(v.status)+ self.write_U16(v.status)self.write_SequenceTypeHttpHeader(v.headers)- self.write_bytes(v.body)+ self.write_Bytes(v.body)end# The Record type Pool.def write_TypePool(v)- self.write_string(v.api_version)- self.write_string(v.kind)+ self.write_String(v.api_version)+ self.write_String(v.kind)self.write_TypeResourceMetadata(v.metadata)self.write_TypePoolSpec(v.spec)- self.write_OptionalTypeOSGymWorkspacePoolStatus(v.status)+ self.write_OptionalTypeOsGymWorkspacePoolStatus(v.status)end# The Record type ResourceMetadata.def write_TypeResourceMetadata(v)- self.write_string(v.namespace)- self.write_string(v.name)+ self.write_String(v.namespace)+ self.write_String(v.name)self.write_OptionalMapStringString(v.labels)end# The Record type Sandbox.def write_TypeSandbox(v)- self.write_string(v.namespace)- self.write_string(v.claim)- self.write_string(v.name)+ self.write_String(v.namespace)+ self.write_String(v.claim)+ self.write_String(v.name)self.write_Sequencestring(v.services)end- # The Error type HttpError - write for callback error returns.- def write_TypeHttpError(v)- if v.is_a?(HttpError::Transport)- pack_into 4, 'l>', 1- self.write_string(v.reason)- return- end- end- # The Error type SdkError - write for callback error returns.-- def write_TypeSdkError(v)- if v.is_a?(SdkError::Configuration)- pack_into 4, 'l>', 1- self.write_string(v.reason)- return- end- if v.is_a?(SdkError::InvalidResourceName)- pack_into 4, 'l>', 2- self.write_string(v.field)- self.write_string(v.value)- self.write_string(v.reason)- return- end- if v.is_a?(SdkError::Transport)- pack_into 4, 'l>', 3- self.write_string(v.reason)- return- end- if v.is_a?(SdkError::Token)- pack_into 4, 'l>', 4- self.write_string(v.reason)- return- end- if v.is_a?(SdkError::Body)- pack_into 4, 'l>', 5- self.write_string(v.reason)- return- end- if v.is_a?(SdkError::Status)- pack_into 4, 'l>', 6- self.write_string(v.operation)- self.write_u16(v.status)- self.write_string(v.body)- return- end- if v.is_a?(SdkError::UnknownService)- pack_into 4, 'l>', 7- self.write_string(v.requested)- self.write_Sequencestring(v.available)- return- end- if v.is_a?(SdkError::InvalidServicePath)- pack_into 4, 'l>', 8- self.write_string(v.path)- return- end- if v.is_a?(SdkError::ClaimFailed)- pack_into 4, 'l>', 9- self.write_string(v.phase)- self.write_string(v.status)- return- end- if v.is_a?(SdkError::ClaimTimeout)- pack_into 4, 'l>', 10- return- end- end-# The Optional<T> type for bytes.@@ -1393,7 +1184,7 @@ class RustBufferBuilderpack_into(1, 'c', 0)elsepack_into(1, 'c', 1)- self.write_bytes(v)+ self.write_Bytes(v)endend@@ -1410,23 +1201,23 @@ class RustBufferBuilder# The Optional<T> type for TypeOSGymSandboxClaimStatus.- def write_OptionalTypeOSGymSandboxClaimStatus(v)+ def write_OptionalTypeOsGymSandboxClaimStatus(v)if v.nil?pack_into(1, 'c', 0)elsepack_into(1, 'c', 1)- self.write_TypeOSGymSandboxClaimStatus(v)+ self.write_TypeOsGymSandboxClaimStatus(v)endend# The Optional<T> type for TypeOSGymWorkspacePoolStatus.- def write_OptionalTypeOSGymWorkspacePoolStatus(v)+ def write_OptionalTypeOsGymWorkspacePoolStatus(v)if v.nil?pack_into(1, 'c', 0)elsepack_into(1, 'c', 1)- self.write_TypeOSGymWorkspacePoolStatus(v)+ self.write_TypeOsGymWorkspacePoolStatus(v)endend@@ -1447,7 +1238,7 @@ class RustBufferBuilderpack_into(4, 'l>', items.size)items.each do |item|- self.write_string(item)+ self.write_String(item)endend@@ -1481,19 +1272,17 @@ class RustBufferBuilderendend- # The Map<T> type for MapStringString.+ # The Map<T> type for string.def write_MapStringString(items)pack_into(4, 'l>', items.size)items.each do |k, v|- self.write_string(k)- self.write_string(v)+ write_String(k)+ self.write_String(v)endend--privatedef reserve(num_bytes)@@ -1541,20 +1330,16 @@ CALL_PANIC = 2module HttpErrorclass Transport < StandardError- def initialize(reason:)-+ def initialize(reason)@reason = reason-super()- end-+ endattr_reader :reasondef to_s- "#{self.class.name}(reason=#{@reason.inspect})"-+ "#{self.class.name}(reason=#{@reason.inspect})"endend@@ -1564,180 +1349,135 @@ endmodule SdkErrorclass Configuration < StandardError- def initialize(reason:)-+ def initialize(reason)@reason = reason-super()- end-+ endattr_reader :reasondef to_s- "#{self.class.name}(reason=#{@reason.inspect})"-+ "#{self.class.name}(reason=#{@reason.inspect})"endendclass InvalidResourceName < StandardError- def initialize(field:, value:, reason:)-+ def initialize(field, value, reason)@field = field-@value = value-@reason = reason-super()- end-+ endattr_reader :field, :value, :reasondef to_s- "#{self.class.name}(field=#{@field.inspect}, value=#{@value.inspect}, reason=#{@reason.inspect})"-+ "#{self.class.name}(field=#{@field.inspect}, value=#{@value.inspect}, reason=#{@reason.inspect})"endendclass Transport < StandardError- def initialize(reason:)-+ def initialize(reason)@reason = reason-super()- end-+ endattr_reader :reasondef to_s- "#{self.class.name}(reason=#{@reason.inspect})"-+ "#{self.class.name}(reason=#{@reason.inspect})"endendclass Token < StandardError- def initialize(reason:)-+ def initialize(reason)@reason = reason-super()- end-+ endattr_reader :reasondef to_s- "#{self.class.name}(reason=#{@reason.inspect})"-+ "#{self.class.name}(reason=#{@reason.inspect})"endendclass Body < StandardError- def initialize(reason:)-+ def initialize(reason)@reason = reason-super()- end-+ endattr_reader :reasondef to_s- "#{self.class.name}(reason=#{@reason.inspect})"-+ "#{self.class.name}(reason=#{@reason.inspect})"endendclass Status < StandardError- def initialize(operation:, status:, body:)-+ def initialize(operation, status, body)@operation = operation-@status = status-@body = body-super()- end-+ endattr_reader :operation, :status, :bodydef to_s- "#{self.class.name}(operation=#{@operation.inspect}, status=#{@status.inspect}, body=#{@body.inspect})"-+ "#{self.class.name}(operation=#{@operation.inspect}, status=#{@status.inspect}, body=#{@body.inspect})"endendclass UnknownService < StandardError- def initialize(requested:, available:)-+ def initialize(requested, available)@requested = requested-@available = available-super()- end-+ endattr_reader :requested, :availabledef to_s- "#{self.class.name}(requested=#{@requested.inspect}, available=#{@available.inspect})"-+ "#{self.class.name}(requested=#{@requested.inspect}, available=#{@available.inspect})"endendclass InvalidServicePath < StandardError- def initialize(path:)-+ def initialize(path)@path = path-super()- end-+ endattr_reader :pathdef to_s- "#{self.class.name}(path=#{@path.inspect})"-+ "#{self.class.name}(path=#{@path.inspect})"endendclass ClaimFailed < StandardError- def initialize(phase:, status:)-+ def initialize(phase, status)@phase = phase-@status = status-super()- end-+ endattr_reader :phase, :statusdef to_s- "#{self.class.name}(phase=#{@phase.inspect}, status=#{@status.inspect})"-+ "#{self.class.name}(phase=#{@phase.inspect}, status=#{@status.inspect})"endendclass ClaimTimeout < StandardErrordef initialize()-super()- end-+ enddef to_s- "#{self.class.name}()"-+ "#{self.class.name}()"endend@@ -1746,8 +1486,12 @@ end# Map error modules to the RustBuffer method name that reads themERROR_MODULE_TO_READER_METHOD = {-HttpError => :read_TypeHttpError,-SdkError => :read_TypeSdkError,++ HttpError => :readTypeHttpError,+++ SdkError => :readTypeSdkError,+}private_constant :ERROR_MODULE_TO_READER_METHOD, :CALL_SUCCESS, :CALL_ERROR, :CALL_PANIC,@@ -1755,8 +1499,7 @@ private_constant :ERROR_MODULE_TO_READER_METHOD, :CALL_SUCCESS, :CALL_ERROR, :CAdef self.consume_buffer_into_error(error_module, rust_buffer)rust_buffer.consumeWithStream do |stream|- reader_method = ERROR_MODULE_TO_READER_METHOD[error_module] ||- ERROR_MODULE_TO_READER_METHOD[error_module.name&.split('::')&.last]+ reader_method = ERROR_MODULE_TO_READER_METHOD[error_module]return stream.send(reader_method)endend@@ -1798,7 +1541,7 @@ def self.rust_call_with_error(error_module, fn_name, *args)# with the message. But if that code panics, then it just sends back# an empty buffer.if status.error_buf.len > 0- raise InternalError, status.error_buf.consume_into_string+ raise InternalError, status.error_buf.consumeIntoString()elseraise InternalError, "Rust panic"end@@ -1818,730 +1561,128 @@ module UniFFILibffi_lib 'cyclops_sdk'- # Define FFI callback types and structs (vtables, etc.)-- callback :RustFutureContinuationCallback,- [:uint64, :int8, ],- :void-- callback :ForeignFutureDroppedCallback,- [:uint64, ],- :void-- callback :CallbackInterfaceFree,- [:uint64, ],- :void-- callback :CallbackInterfaceClone,- [:uint64, ],- :uint64-- class ForeignFutureDroppedCallbackStruct < FFI::Struct- layout(- :handle, :uint64,- :free, :ForeignFutureDroppedCallback- )- end-- class ForeignFutureResultU8 < FFI::Struct- layout(- :return_value, :uint8,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteU8,- [:uint64, ForeignFutureResultU8.by_value, ],- :void-- class ForeignFutureResultI8 < FFI::Struct- layout(- :return_value, :int8,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteI8,- [:uint64, ForeignFutureResultI8.by_value, ],- :void-- class ForeignFutureResultU16 < FFI::Struct- layout(- :return_value, :uint16,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteU16,- [:uint64, ForeignFutureResultU16.by_value, ],- :void-- class ForeignFutureResultI16 < FFI::Struct- layout(- :return_value, :int16,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteI16,- [:uint64, ForeignFutureResultI16.by_value, ],- :void-- class ForeignFutureResultU32 < FFI::Struct- layout(- :return_value, :uint32,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteU32,- [:uint64, ForeignFutureResultU32.by_value, ],- :void-- class ForeignFutureResultI32 < FFI::Struct- layout(- :return_value, :int32,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteI32,- [:uint64, ForeignFutureResultI32.by_value, ],- :void-- class ForeignFutureResultU64 < FFI::Struct- layout(- :return_value, :uint64,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteU64,- [:uint64, ForeignFutureResultU64.by_value, ],- :void-- class ForeignFutureResultI64 < FFI::Struct- layout(- :return_value, :int64,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteI64,- [:uint64, ForeignFutureResultI64.by_value, ],- :void-- class ForeignFutureResultF32 < FFI::Struct- layout(- :return_value, :float,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteF32,- [:uint64, ForeignFutureResultF32.by_value, ],- :void-- class ForeignFutureResultF64 < FFI::Struct- layout(- :return_value, :double,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteF64,- [:uint64, ForeignFutureResultF64.by_value, ],- :void-- class ForeignFutureResultRustBuffer < FFI::Struct- layout(- :return_value, RustBuffer.by_value,- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteRustBuffer,- [:uint64, ForeignFutureResultRustBuffer.by_value, ],- :void-- class ForeignFutureResultVoid < FFI::Struct- layout(- :call_status, RustCallStatus- )- end-- callback :ForeignFutureCompleteVoid,- [:uint64, ForeignFutureResultVoid.by_value, ],- :void-- callback :CallbackInterfaceHttpClientMethod0,- [:uint64, RustBuffer.by_value, :ForeignFutureCompleteRustBuffer, :uint64, ForeignFutureDroppedCallbackStruct.by_ref, ],- :void-- class VTableCallbackInterfaceHttpClient < FFI::Struct- layout(- :uniffi_free, :CallbackInterfaceFree,- :uniffi_clone, :CallbackInterfaceClone,- :execute, :CallbackInterfaceHttpClientMethod0- )- end-attach_function :uniffi_cyclops_sdk_fn_clone_cyclopsclient,[:uint64, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_free_cyclopsclient,[:uint64, RustCallStatus.by_ref],:void-attach_function :uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect,[RustBuffer.by_value, :uint64, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request,- [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_clone_httpclient,[:uint64, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_free_httpclient,[:uint64, RustCallStatus.by_ref],:void-attach_function :uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient,- [VTableCallbackInterfaceHttpClient.by_ref, ],+ [:pointer, RustCallStatus.by_ref],:void-attach_function :uniffi_cyclops_sdk_fn_method_httpclient_execute,- [:uint64, RustBuffer.by_value, ],+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_clone_cyclopscredentials,[:uint64, RustCallStatus.by_ref],:uint64-attach_function :uniffi_cyclops_sdk_fn_free_cyclopscredentials,[:uint64, RustCallStatus.by_ref],:void-attach_function :uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new,[RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],:uint64-attach_function :ffi_cyclops_sdk_rustbuffer_alloc,[:uint64, RustCallStatus.by_ref],RustBuffer.by_value-attach_function :ffi_cyclops_sdk_rustbuffer_from_bytes,[ForeignBytes, RustCallStatus.by_ref],RustBuffer.by_value-attach_function :ffi_cyclops_sdk_rustbuffer_free,[RustBuffer.by_value, RustCallStatus.by_ref],:void-attach_function :ffi_cyclops_sdk_rustbuffer_reserve,[RustBuffer.by_value, :uint64, RustCallStatus.by_ref],RustBuffer.by_value-- attach_function :ffi_cyclops_sdk_rust_future_poll_u8,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_u8,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_u8,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_u8,- [:uint64, RustCallStatus.by_ref],- :uint8-- attach_function :ffi_cyclops_sdk_rust_future_poll_i8,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_i8,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_i8,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_i8,- [:uint64, RustCallStatus.by_ref],- :int8-- attach_function :ffi_cyclops_sdk_rust_future_poll_u16,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_u16,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_u16,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_u16,- [:uint64, RustCallStatus.by_ref],- :uint16-- attach_function :ffi_cyclops_sdk_rust_future_poll_i16,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_i16,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_i16,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_i16,- [:uint64, RustCallStatus.by_ref],- :int16-- attach_function :ffi_cyclops_sdk_rust_future_poll_u32,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_u32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_u32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_u32,- [:uint64, RustCallStatus.by_ref],- :uint32-- attach_function :ffi_cyclops_sdk_rust_future_poll_i32,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_i32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_i32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_i32,- [:uint64, RustCallStatus.by_ref],- :int32-- attach_function :ffi_cyclops_sdk_rust_future_poll_u64,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_u64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_u64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_u64,- [:uint64, RustCallStatus.by_ref],- :uint64-- attach_function :ffi_cyclops_sdk_rust_future_poll_i64,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_i64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_i64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_i64,- [:uint64, RustCallStatus.by_ref],- :int64-- attach_function :ffi_cyclops_sdk_rust_future_poll_f32,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_f32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_f32,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_f32,- [:uint64, RustCallStatus.by_ref],- :float-- attach_function :ffi_cyclops_sdk_rust_future_poll_f64,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_f64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_f64,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_f64,- [:uint64, RustCallStatus.by_ref],- :double-- attach_function :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_rust_buffer,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- [:uint64, RustCallStatus.by_ref],- RustBuffer.by_value-- attach_function :ffi_cyclops_sdk_rust_future_poll_void,- [:uint64, :RustFutureContinuationCallback, :uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_cancel_void,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_free_void,- [:uint64, ],- :void-- attach_function :ffi_cyclops_sdk_rust_future_complete_void,- [:uint64, RustCallStatus.by_ref],- :void-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_method_httpclient_execute,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new,- [],+ [RustCallStatus.by_ref],:uint16-attach_function :ffi_cyclops_sdk_uniffi_contract_version,- [],+ [RustCallStatus.by_ref],:uint32end- # RustFuture poll codes-UNIFFI_RUST_FUTURE_POLL_READY = 0-UNIFFI_RUST_FUTURE_POLL_WAKE = 1--# Handle map for storing write-end IO objects used by the continuation callbacks.-UNIFFI_ASYNC_HANDLE_MAP = UniffiHandleMap.new--# Continuation callback for async functions.-# Called by Rust when the future is ready to make progress.-# Writes the poll code to the pipe so the waiting thread/fiber can continue.-#-# Exceptions must never escape this Proc.-# Rust invokes it directly via FFI, so any unhandled Ruby exception would be caught-# by Ruby-FFI, which swallows it (prints a warning) and returns a garbage value to Rust.-# The poll code Rust receives would be invalid, causing the Ruby polling loop to-# never see POLL_READY and block forever.-UNIFFI_CONTINUATION_CALLBACK = Proc.new do |data, poll_code|- begin- wr = UNIFFI_ASYNC_HANDLE_MAP.get data-- # This can only be blocking if pipe if full. Rust will never try to call continuation- # callback more than once (so will not fill it up), hence this call should never block.- wr.putc poll_code- rescue Exception- # Swallow exception. A leak or a hang is better than a hard VM segfault.- end-end--# Poll a Rust future to completion.-#-# This works both with and without a Fiber::Scheduler:-# - Without scheduler: wait_readable blocks with a timeout, releasing the GVL-# so the callback can fire from foreign threads (works around MRI limitation-# where rb_thread_call_with_gvl cannot wake up threads in indefinite sleep).-# - With scheduler: wait_readable hooks into io_wait, yielding the fiber.-#-# cancel_fn is called in the ensure block when exception interrupts an in-flight poll.-# This guarantees Rust fires the continuation callback so the handle-map entry is released-# and the pipe is drained before we free the future.-def self.uniffi_rust_call_async(rust_future, poll_fn, cancel_fn, complete_fn, free_fn, lift_func, error_ffi_converter)- rd = wr = nil- handle = nil- poll_in_flight = false-- begin- rd, wr = IO.pipe- wr.sync = true # avoid buffering and delayed read for rd.wait_readable- handle = UNIFFI_ASYNC_HANDLE_MAP.insert wr-- loop do- poll_in_flight = true- UniFFILib.public_send(poll_fn, rust_future, UNIFFI_CONTINUATION_CALLBACK, handle)-- # Blocks until the continuation callback writes to the pipe.- # Releases the GVL so the callback can fire from foreign threads.- # With a Fiber::Scheduler, this hooks into io_wait for non-blocking concurrency.- rd.wait_readable- poll_code = rd.getbyte- poll_in_flight = false-- break if poll_code == UNIFFI_RUST_FUTURE_POLL_READY- end-- result = if error_ffi_converter.nil?- ::CyclopsSdk.rust_call(complete_fn, rust_future)- else- ::CyclopsSdk.rust_call_with_error(error_ffi_converter, complete_fn, rust_future)- end-- lift_func.call(result)- ensure- # Defer any further Thread#raise / Timeout during cleanup so all steps execute- # automatically. Without this, a second raise during wait_readable(0.5) would skip- # handle-map removal, pipe close, and free_fn - leaking FDs and Rust memory.- Thread.handle_interrupt(Exception => :never) do- if poll_in_flight- # An exception interrupted an in-flight poll. Cancel and drain the byte- # the continuation callback will write so we don't leak the pipe.- UniFFILib.public_send(cancel_fn, rust_future)- # rd.wait_readable may time out and return nil if the poll was never actually sent- # (raise landed between poll_in_flight=true and the FFI call).- if rd.wait_readable(0.5)- rd.getbyte- end- end-- # Remove handle first so any late-firing callback's `get` raises (swallowed by rescue).- UNIFFI_ASYNC_HANDLE_MAP.remove(handle) rescue nil if handle- rd&.close rescue nil- wr&.close rescue nil- UniFFILib.public_send(free_fn, rust_future)- end- end-end-# Exception raised when a foreign future is canceled.-class UniffiInternalCancelled < RuntimeError; end--# User callback that raises it will be considered a Rust-side cancellation.-private_constant :UniffiInternalCancelled--# Handle map for storing Threads executing foreign async callbacks.-UNIFFI_FOREIGN_FUTURE_HANDLE_MAP = UniffiHandleMap.new--# One-shot claim flag: the first caller to `claim!` wins; all subsequent callers-# are no-ops. Used to enforce the at-most-once contract on uniffi_future_callback.-class UniffiOnceFlag- def initialize- @mutex = Mutex.new- @claimed = false- end-- # Returns true if this caller won the race (first to claim), false otherwise.- def claim!- @mutex.synchronize do- first = !@claimed- @claimed = true- first- end- end-end--# Called by Rust when the foreign future is dropped (i.e. canceled or completed successfully).-# Raises UniffiInternalCancelled in the worker thread so make_call can exit early,-# but only if the thread hasn't already completed and claimed the once flag.-# Stored as a constant to prevent GC from collecting the Proc while Rust holds the pointer.-UNIFFI_FOREIGN_FUTURE_DROPPED_CALLBACK = Proc.new do |handle|- thread, once = UNIFFI_FOREIGN_FUTURE_HANDLE_MAP.remove handle- thread.raise(UniffiInternalCancelled, 'Future was canceled') if once.claim! && thread&.alive?-end--# Execute a foreign async callback method in a background thread.-# Enforces the at-most-once guarantee on handle_success / handle_error: whichever-# fires first (normal completion or Rust-side drop) suppresses the other.-def self.uniffi_trait_interface_call_async(make_call, uniffi_out_dropped_callback, handle_success, handle_error, error_type = nil, lower_error = nil)- once = UniffiOnceFlag.new-- thread = Thread.new do- begin- # Phase 1: run the user's async method.- # UniffiInternalCancelled exits silently. Other exceptions are forwarded as errors.- # handle_success is intentionally called outside this rescue so exceptions from it- # cannot re-enter handle_error (which would be a double-call on the Rust sender).- begin- result = make_call.call- rescue UniffiInternalCancelled- next- rescue Exception => e # We have to catch all errors to prevent Rust future from hanging forever.- next unless once.claim!-- if !error_type.nil? && ::CyclopsSdk.uniffi_is_error_type?(e, error_type)- handle_error.call(UNIFFI_CALLBACK_ERROR, lower_error.call(e))- else- handle_error.call(UNIFFI_CALLBACK_UNEXPECTED_ERROR, RustBuffer.alloc_from_string(e.inspect))- end- next- end-- # Phase 2: deliver the result to Rust. Skipped if dropped_callback already fired.- handle_success.call(result) if once.claim!- rescue UniffiInternalCancelled- # Thread#raise landed between phases or during Phase 2 - silently exit.- # Rust already dropped the future (that's why dropped_callback fired), so no response needed.- rescue Exception => e- # handle_success/handle_error/lower_error raised - send a generic error so Rust doesn't hang.- # once was already claimed, so only attempt this if we can still claim (e.g. lowering failed- # before handle_error was called due to short-circuit evaluation).- begin- handle_error.call(UNIFFI_CALLBACK_UNEXPECTED_ERROR, RustBuffer.alloc_from_string(e.inspect))- rescue Exception- # If even this fails, Rust will hang. Nothing more we can do.- end- end- end-- # Note: the thread may have already completed by this point, but that's safe.- # Rust cannot invoke dropped_callback until this function returns.- # possesses the ForeignFuture struct we're populating here.- handle = UNIFFI_FOREIGN_FUTURE_HANDLE_MAP.insert([thread, once])- uniffi_out_dropped_callback[:handle] = handle- uniffi_out_dropped_callback[:free] = UNIFFI_FOREIGN_FUTURE_DROPPED_CALLBACK-end- # Base class for callback interface FfiConverters.-# Stores Ruby callback objects in a handle map, and converts to/from integer handles.--class CallbackInterfaceFfiConverter- attr_reader :handle_map-- def initialize- @handle_map = UniffiHandleMap.new- end-- def lift(handle)- @handle_map.get handle- end-- def lower(cb)- @handle_map.insert cb- end-end--private_constant :CallbackInterfaceFfiConverter-- # Custom type definitions.# Public interface members begin here.@@ -2579,7 +1720,6 @@ class Claimtrueend-end# Record type CreateClaimRequest@@ -2601,7 +1741,6 @@ class CreateClaimRequesttrueend-end# Record type CreatePoolRequest@@ -2623,7 +1762,6 @@ class CreatePoolRequesttrueend-end# Record type CyclopsConfiguration@@ -2665,7 +1803,6 @@ class CyclopsConfigurationtrueend-end# Record type HttpHeader@@ -2687,7 +1824,6 @@ class HttpHeadertrueend-end# Record type HttpRequest@@ -2717,7 +1853,6 @@ class HttpRequesttrueend-end# Record type HttpResponse@@ -2743,7 +1878,6 @@ class HttpResponsetrueend-end# Record type Pool@@ -2777,7 +1911,6 @@ class Pooltrueend-end# Record type ResourceMetadata@@ -2803,7 +1936,6 @@ class ResourceMetadatatrueend-end# Record type Sandbox@@ -2833,7 +1965,6 @@ class Sandboxtrueend-end@@ -2856,23 +1987,24 @@ end# to the actual instance, only its underlying handle.def self.uniffi_define_finalizer_by_handle(handle, object_id)Proc.new do |_id|- ::CyclopsSdk.rust_call(+ CyclopsSdk.rust_call(:uniffi_cyclops_sdk_fn_free_cyclopsclient,handle)endend+# 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 !inst.is_a? self+ if not inst.is_a? selfraise TypeError.new "Expected a CyclopsClient instance, got #{inst}"endenddef uniffi_clone_handle()- return ::CyclopsSdk.rust_call(+ return CyclopsSdk.rust_call(:uniffi_cyclops_sdk_fn_clone_cyclopsclient,@handle)@@ -2882,11 +2014,6 @@ endreturn inst.uniffi_clone_handle()end- def self.uniffi_lift(handle)- uniffi_allocate handle- end--def self.connect(configuration, http_client)configuration = configurationRustBuffer.check_lower_TypeCyclopsConfiguration(configuration)@@ -2895,169 +2022,81 @@ end# Call the (fallible) function before creating any half-baked object instances.# Lightly yucky way to bypass the usual "initialize" logic# and just create a new instance with the required handle.- return uniffi_allocate(::CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect,RustBuffer.alloc_from_TypeCyclopsConfiguration(configuration),(HttpClient.uniffi_lower http_client)))+ return uniffi_allocate(CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect,RustBuffer.alloc_from_TypeCyclopsConfiguration(configuration),(HttpClient.uniffi_lower http_client)))end-def create_claim(request)request = requestRustBuffer.check_lower_TypeCreateClaimRequest(request)- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(uniffi_clone_handle(),RustBuffer.alloc_from_TypeCreateClaimRequest(request)),- :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- :ffi_cyclops_sdk_rust_future_free_rust_buffer,- Proc.new { |v| v.consume_into_TypeClaim },- SdkError- )+ result = CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim,uniffi_clone_handle(),RustBuffer.alloc_from_TypeCreateClaimRequest(request))+ return result.consumeIntoTypeClaimend-def delete_claim(claim)claim = claimRustBuffer.check_lower_TypeClaim(claim)- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(uniffi_clone_handle(),RustBuffer.alloc_from_TypeClaim(claim)),- :ffi_cyclops_sdk_rust_future_poll_void,- :ffi_cyclops_sdk_rust_future_cancel_void,- :ffi_cyclops_sdk_rust_future_complete_void,- :ffi_cyclops_sdk_rust_future_free_void,- Proc.new { |v| nil },- SdkError- )+ CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim,uniffi_clone_handle(),RustBuffer.alloc_from_TypeClaim(claim))enddef get_claim(claim)claim = claimRustBuffer.check_lower_TypeClaim(claim)- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(uniffi_clone_handle(),RustBuffer.alloc_from_TypeClaim(claim)),- :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- :ffi_cyclops_sdk_rust_future_free_rust_buffer,- Proc.new { |v| v.consume_into_TypeClaim },- SdkError- )+ result = CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim,uniffi_clone_handle(),RustBuffer.alloc_from_TypeClaim(claim))+ return result.consumeIntoTypeClaimend-def list_claims(namespace)- namespace = ::CyclopsSdk::uniffi_utf8(namespace)-- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(uniffi_clone_handle(),RustBuffer.alloc_from_string(namespace)),- :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- :ffi_cyclops_sdk_rust_future_free_rust_buffer,- Proc.new { |v| v.consume_into_SequenceTypeClaim },- SdkError- )- end+ namespace = CyclopsSdk::uniffi_utf8(namespace)+ result = CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims,uniffi_clone_handle(),RustBuffer.allocFromString(namespace))+ return result.consumeIntoSequenceTypeClaim+ enddef wait_claim(claim)claim = claimRustBuffer.check_lower_TypeClaim(claim)- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(uniffi_clone_handle(),RustBuffer.alloc_from_TypeClaim(claim)),- :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- :ffi_cyclops_sdk_rust_future_free_rust_buffer,- Proc.new { |v| v.consume_into_TypeSandbox },- SdkError- )+ result = CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim,uniffi_clone_handle(),RustBuffer.alloc_from_TypeClaim(claim))+ return result.consumeIntoTypeSandboxend-def create_pool(request)request = requestRustBuffer.check_lower_TypeCreatePoolRequest(request)- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(uniffi_clone_handle(),RustBuffer.alloc_from_TypeCreatePoolRequest(request)),- :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- :ffi_cyclops_sdk_rust_future_free_rust_buffer,- Proc.new { |v| v.consume_into_TypePool },- SdkError- )+ result = CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool,uniffi_clone_handle(),RustBuffer.alloc_from_TypeCreatePoolRequest(request))+ return result.consumeIntoTypePoolend-def delete_pool(pool)pool = poolRustBuffer.check_lower_TypePool(pool)- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(uniffi_clone_handle(),RustBuffer.alloc_from_TypePool(pool)),- :ffi_cyclops_sdk_rust_future_poll_void,- :ffi_cyclops_sdk_rust_future_cancel_void,- :ffi_cyclops_sdk_rust_future_complete_void,- :ffi_cyclops_sdk_rust_future_free_void,- Proc.new { |v| nil },- SdkError- )+ CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool,uniffi_clone_handle(),RustBuffer.alloc_from_TypePool(pool))enddef get_pool(pool)pool = poolRustBuffer.check_lower_TypePool(pool)- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(uniffi_clone_handle(),RustBuffer.alloc_from_TypePool(pool)),- :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- :ffi_cyclops_sdk_rust_future_free_rust_buffer,- Proc.new { |v| v.consume_into_TypePool },- SdkError- )+ result = CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool,uniffi_clone_handle(),RustBuffer.alloc_from_TypePool(pool))+ return result.consumeIntoTypePoolend-def list_pools(namespace)- namespace = ::CyclopsSdk::uniffi_utf8(namespace)-- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(uniffi_clone_handle(),RustBuffer.alloc_from_string(namespace)),- :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- :ffi_cyclops_sdk_rust_future_free_rust_buffer,- Proc.new { |v| v.consume_into_SequenceTypePool },- SdkError- )- end+ namespace = CyclopsSdk::uniffi_utf8(namespace)+ result = CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools,uniffi_clone_handle(),RustBuffer.allocFromString(namespace))+ return result.consumeIntoSequenceTypePool+ enddef update_pool(pool)pool = poolRustBuffer.check_lower_TypePool(pool)- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(uniffi_clone_handle(),RustBuffer.alloc_from_TypePool(pool)),- :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- :ffi_cyclops_sdk_rust_future_free_rust_buffer,- Proc.new { |v| v.consume_into_TypePool },- SdkError- )+ result = CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool,uniffi_clone_handle(),RustBuffer.alloc_from_TypePool(pool))+ return result.consumeIntoTypePoolend-def service_request(sandbox, service, path, request)sandbox = sandboxRustBuffer.check_lower_TypeSandbox(sandbox)- service = ::CyclopsSdk::uniffi_utf8(service)+ service = CyclopsSdk::uniffi_utf8(service)- path = ::CyclopsSdk::uniffi_utf8(path)+ path = CyclopsSdk::uniffi_utf8(path)request = requestRustBuffer.check_lower_TypeHttpRequest(request)- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(uniffi_clone_handle(),RustBuffer.alloc_from_TypeSandbox(sandbox),RustBuffer.alloc_from_string(service),RustBuffer.alloc_from_string(path),RustBuffer.alloc_from_TypeHttpRequest(request)),- :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- :ffi_cyclops_sdk_rust_future_free_rust_buffer,- Proc.new { |v| v.consume_into_TypeHttpResponse },- SdkError- )+ result = CyclopsSdk.rust_call_with_error(SdkError,:uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request,uniffi_clone_handle(),RustBuffer.alloc_from_TypeSandbox(sandbox),RustBuffer.allocFromString(service),RustBuffer.allocFromString(path),RustBuffer.alloc_from_TypeHttpRequest(request))+ return result.consumeIntoTypeHttpResponseendend@@ -3078,128 +2117,43 @@ end# to the actual instance, only its underlying handle.def self.uniffi_define_finalizer_by_handle(handle, object_id)Proc.new do |_id|- ::CyclopsSdk.rust_call(+ CyclopsSdk.rust_call(:uniffi_cyclops_sdk_fn_free_httpclient,handle)endend- # HandleMap for trait interface: stores Ruby-native objects keyed by odd handles.- @uniffi_handle_map = UniffiHandleMap.new- class << self- attr_reader :uniffi_handle_map- end-- # For trait interfaces: check that the object is either a Rust-backed instance or- # responds to the required interface methods.+ # 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 !inst.respond_to?(:execute)- raise TypeError.new "Expected a HttpClient instance or an object implementing the interface, got #{inst}"+ if not inst.is_a? self+ raise TypeError.new "Expected a HttpClient instance, got #{inst}"endend- def uniffi_clone_handle- return ::CyclopsSdk.rust_call(+ def uniffi_clone_handle()+ return 0 if @handle.nil?+ return CyclopsSdk.rust_call(:uniffi_cyclops_sdk_fn_clone_httpclient,@handle)end- # For trait interfaces: lowering distinguishes between Rust-backed and Ruby-native instances.def self.uniffi_lower(inst)- if inst.is_a?(self) && inst.instance_variable_defined?(:@handle)- inst.uniffi_clone_handle()- else- @uniffi_handle_map.insert(inst)- end- end-- # For trait interfaces: lifting distinguishes even handles (Rust) from odd handles (Ruby).- def self.uniffi_lift(handle)- if (handle & 1) == 0- uniffi_allocate handle- else- @uniffi_handle_map.remove handle- end+ return inst.uniffi_clone_handle()end-def execute(request)request = requestRustBuffer.check_lower_TypeHttpRequest(request)- ::CyclopsSdk.uniffi_rust_call_async(- UniFFILib.uniffi_cyclops_sdk_fn_method_httpclient_execute(uniffi_clone_handle(),RustBuffer.alloc_from_TypeHttpRequest(request)),- :ffi_cyclops_sdk_rust_future_poll_rust_buffer,- :ffi_cyclops_sdk_rust_future_cancel_rust_buffer,- :ffi_cyclops_sdk_rust_future_complete_rust_buffer,- :ffi_cyclops_sdk_rust_future_free_rust_buffer,- Proc.new { |v| v.consume_into_TypeHttpResponse },- HttpError- )- end--end---# Trait interface vtable implementation for HttpClient.-module UniffiCallbackInterfaceHttpClient- # Async callback method for execute- EXECUTE_CALLBACK = Proc.new do |uniffi_handle, request, uniffi_future_callback, uniffi_callback_data, uniffi_out_dropped_callback|- uniffi_obj = HttpClient.uniffi_handle_map.get(uniffi_handle)- make_call = Proc.new do- uniffi_obj.execute(- request.consume_into_TypeHttpRequest- )- end- handle_success = Proc.new do |return_value|- result_struct = UniFFILib::ForeignFutureResultRustBuffer.new- result_struct[:return_value] = RustBuffer.alloc_from_TypeHttpResponse(return_value)- result_struct[:call_status] = RustCallStatus.new- uniffi_future_callback.call(uniffi_callback_data, result_struct)- end- handle_error = Proc.new do |status_code, error_buf|- result_struct = UniFFILib::ForeignFutureResultRustBuffer.new- result_struct[:return_value] = RustBuffer.new-- error_status = RustCallStatus.new- error_status[:code] = status_code- error_status[:error_buf] = error_buf-- result_struct[:call_status] = error_status-- uniffi_future_callback.call(uniffi_callback_data, result_struct)- end- ::CyclopsSdk.uniffi_trait_interface_call_async(- make_call,- uniffi_out_dropped_callback,- handle_success,- handle_error,- HttpError,- Proc.new { |e| RustBuffer.alloc_from_TypeHttpError(e) }- )- end-- # Free callback: removes the handle from the map.- UNIFFI_FREE_CALLBACK = Proc.new do |uniffi_handle|- HttpClient.uniffi_handle_map.remove uniffi_handle+ result = CyclopsSdk.rust_call_with_error(HttpError,:uniffi_cyclops_sdk_fn_method_httpclient_execute,uniffi_clone_handle(),RustBuffer.alloc_from_TypeHttpRequest(request))+ return result.consumeIntoTypeHttpResponseend- # Clone callback: clones the handle in the map.- UNIFFI_CLONE_CALLBACK = Proc.new do |uniffi_handle|- HttpClient.uniffi_handle_map.clone_handle(uniffi_handle)- end-- # Create the VTable struct instance.- UNIFFI_VTABLE = UniFFILib::VTableCallbackInterfaceHttpClient.new- UNIFFI_VTABLE[:uniffi_free] = UNIFFI_FREE_CALLBACK- UNIFFI_VTABLE[:uniffi_clone] = UNIFFI_CLONE_CALLBACK- UNIFFI_VTABLE[:execute] = EXECUTE_CALLBACK-- # Register the VTable with Rust.- UniFFILib.uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(UNIFFI_VTABLE)endclass CyclopsCredentials@@ -3218,23 +2172,24 @@ end# to the actual instance, only its underlying handle.def self.uniffi_define_finalizer_by_handle(handle, object_id)Proc.new do |_id|- ::CyclopsSdk.rust_call(+ CyclopsSdk.rust_call(:uniffi_cyclops_sdk_fn_free_cyclopscredentials,handle)endend+# 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 !inst.is_a? self+ if not inst.is_a? selfraise TypeError.new "Expected a CyclopsCredentials instance, got #{inst}"endenddef uniffi_clone_handle()- return ::CyclopsSdk.rust_call(+ return CyclopsSdk.rust_call(:uniffi_cyclops_sdk_fn_clone_cyclopscredentials,@handle)@@ -3243,16 +2198,12 @@ enddef self.uniffi_lower(inst)return inst.uniffi_clone_handle()end-- def self.uniffi_lift(handle)- uniffi_allocate handle- enddef initialize(client_id, client_secret)- client_id = ::CyclopsSdk::uniffi_utf8(client_id)+ client_id = CyclopsSdk::uniffi_utf8(client_id)- client_secret = ::CyclopsSdk::uniffi_utf8(client_secret)+ client_secret = CyclopsSdk::uniffi_utf8(client_secret)- handle = ::CyclopsSdk.rust_call(:uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new,RustBuffer.alloc_from_string(client_id),RustBuffer.alloc_from_string(client_secret))+ handle = CyclopsSdk.rust_call(:uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new,RustBuffer.allocFromString(client_id),RustBuffer.allocFromString(client_secret))@handle = handleObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id))end@@ -3262,6 +2213,4 @@ endend--enddiff --git a/libs/fleet/sdk-bindings/swift/CyclopsSdk.swift b/libs/fleet/sdk-bindings/swift/CyclopsSdk.swiftindex c5c61c14a0..dfba3f6f70 100644--- a/libs/fleet/sdk-bindings/swift/CyclopsSdk.swift+++ b/libs/fleet/sdk-bindings/swift/CyclopsSdk.swift@@ -39,52 +39,6 @@ fileprivate extension ForeignBytes {init(bufferPointer: UnsafeBufferPointer<UInt8>) {self.init(len: Int32(bufferPointer.count), data: bufferPointer.baseAddress)}-- init(rawBufferPointer: UnsafeRawBufferPointer) {- self.init(- len: Int32(rawBufferPointer.count),- data: rawBufferPointer.baseAddress?.assumingMemoryBound(to: UInt8.self)- )- }-}--// Converter for `&[u8]` / `[ByRef] bytes` arguments.-//-// Conforms to `FfiConverter` so the compiler enforces the full converter-// method set. Only the scope-bound `lower(_:_body:)` overload is sound —-// zero-copy byte buffers only flow foreign -> Rust, and only in argument-// position. The four protocol-witness methods (`lift`, `lower`, `read`,-// `write`) `fatalError` at runtime if anyone reaches them.-//-// The scope-bound `lower` takes a closure because the `ForeignBytes`-// pointer is only guaranteed valid for the duration of-// `Data.withUnsafeBytes`. Callers must run the full FFI call inside-// the closure body.-fileprivate enum FfiConverterByRefBytes: FfiConverter {- typealias SwiftType = Data- typealias FfiType = ForeignBytes-- static func lower<R>(_ value: Data, _ body: (ForeignBytes) throws -> R) rethrows -> R {- return try value.withUnsafeBytes { rawBuf in- try body(ForeignBytes(rawBufferPointer: rawBuf))- }- }-- static func lower(_ value: Data) -> ForeignBytes {- fatalError("ByRef bytes cannot use the plain lower: returning ForeignBytes escapes the Data.withUnsafeBytes scope. Use the scope-bound lower(_:_body:) overload instead.")- }-- static func lift(_ value: ForeignBytes) throws -> Data {- fatalError("ByRef bytes cannot be lifted: zero-copy &[u8] only flows foreign->Rust")- }-- static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Data {- fatalError("ByRef bytes cannot be read from a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")- }-- static func write(_ value: Data, into buf: inout [UInt8]) {- fatalError("ByRef bytes cannot be written to a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")- }}// For every type used in the interface, we provide helper methods for conveniently@@ -531,11 +485,7 @@ fileprivate struct FfiConverterString: FfiConverter {return String()}let bytes = UnsafeBufferPointer<UInt8>(start: value.data!, count: Int(value.len))- // Use Swift's native UTF-8 decoder; `String(bytes:encoding:.utf8)` goes- // through Foundation's NSString and silently strips a leading U+FEFF BOM.- // Invalid UTF-8 substitutes U+FFFD instead of trapping (unreachable- // given Rust's `String` invariant).- return String(decoding: bytes, as: UTF8.self)+ return String(bytes: bytes, encoding: String.Encoding.utf8)!}public static func lower(_ value: String) -> RustBuffer {@@ -551,8 +501,7 @@ fileprivate struct FfiConverterString: FfiConverter {public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> String {let len: Int32 = try readInt(&buf)- // See `lift` above for why we avoid Foundation's NSString-backed decoder here.- return String(decoding: try readBytes(&buf, count: Int(len)), as: UTF8.self)+ return String(bytes: try readBytes(&buf, count: Int(len)), encoding: String.Encoding.utf8)!}public static func write(_ value: String, into buf: inout [UInt8]) {@@ -661,10 +610,9 @@ open class CyclopsClient: CyclopsClientProtocol, @unchecked Sendable {public static func connect(configuration: CyclopsConfiguration, httpClient: HttpClient)throws -> CyclopsClient {return try FfiConverterTypeCyclopsClient_lift(try rustCallWithError(FfiConverterTypeSdkError_lift) {- uniffiCallStatus inuniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(FfiConverterTypeCyclopsConfiguration_lower(configuration),- FfiConverterTypeHttpClient_lower(httpClient),uniffiCallStatus+ FfiConverterTypeHttpClient_lower(httpClient),$0)})}@@ -676,7 +624,8 @@ open func createClaim(request: CreateClaimRequest)async throws -> Claim {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(- self.uniffiCloneHandle(),FfiConverterTypeCreateClaimRequest_lower(request)+ self.uniffiCloneHandle(),+ FfiConverterTypeCreateClaimRequest_lower(request))},pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,@@ -692,7 +641,8 @@ open func deleteClaim(claim: Claim)async throws {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(- self.uniffiCloneHandle(),FfiConverterTypeClaim_lower(claim)+ self.uniffiCloneHandle(),+ FfiConverterTypeClaim_lower(claim))},pollFunc: ffi_cyclops_sdk_rust_future_poll_void,@@ -708,7 +658,8 @@ open func getClaim(claim: Claim)async throws -> Claim {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(- self.uniffiCloneHandle(),FfiConverterTypeClaim_lower(claim)+ self.uniffiCloneHandle(),+ FfiConverterTypeClaim_lower(claim))},pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,@@ -724,7 +675,8 @@ open func listClaims(namespace: String)async throws -> [Claim] {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(- self.uniffiCloneHandle(),FfiConverterString.lower(namespace)+ self.uniffiCloneHandle(),+ FfiConverterString.lower(namespace))},pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,@@ -740,7 +692,8 @@ open func waitClaim(claim: Claim)async throws -> Sandbox {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(- self.uniffiCloneHandle(),FfiConverterTypeClaim_lower(claim)+ self.uniffiCloneHandle(),+ FfiConverterTypeClaim_lower(claim))},pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,@@ -756,7 +709,8 @@ open func createPool(request: CreatePoolRequest)async throws -> Pool {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(- self.uniffiCloneHandle(),FfiConverterTypeCreatePoolRequest_lower(request)+ self.uniffiCloneHandle(),+ FfiConverterTypeCreatePoolRequest_lower(request))},pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,@@ -772,7 +726,8 @@ open func deletePool(pool: Pool)async throws {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(- self.uniffiCloneHandle(),FfiConverterTypePool_lower(pool)+ self.uniffiCloneHandle(),+ FfiConverterTypePool_lower(pool))},pollFunc: ffi_cyclops_sdk_rust_future_poll_void,@@ -788,7 +743,8 @@ open func getPool(pool: Pool)async throws -> Pool {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(- self.uniffiCloneHandle(),FfiConverterTypePool_lower(pool)+ self.uniffiCloneHandle(),+ FfiConverterTypePool_lower(pool))},pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,@@ -804,7 +760,8 @@ open func listPools(namespace: String)async throws -> [Pool] {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(- self.uniffiCloneHandle(),FfiConverterString.lower(namespace)+ self.uniffiCloneHandle(),+ FfiConverterString.lower(namespace))},pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,@@ -820,7 +777,8 @@ open func updatePool(pool: Pool)async throws -> Pool {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(- self.uniffiCloneHandle(),FfiConverterTypePool_lower(pool)+ self.uniffiCloneHandle(),+ FfiConverterTypePool_lower(pool))},pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,@@ -836,7 +794,8 @@ open func serviceRequest(sandbox: Sandbox, service: String, path: String, requestry await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(- self.uniffiCloneHandle(),FfiConverterTypeSandbox_lower(sandbox),FfiConverterString.lower(service),FfiConverterString.lower(path),FfiConverterTypeHttpRequest_lower(request)+ self.uniffiCloneHandle(),+ FfiConverterTypeSandbox_lower(sandbox),FfiConverterString.lower(service),FfiConverterString.lower(path),FfiConverterTypeHttpRequest_lower(request))},pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,@@ -942,10 +901,9 @@ open class CyclopsCredentials: CyclopsCredentialsProtocol, @unchecked Sendable {public convenience init(clientId: String, clientSecret: String) {let handle =try! rustCall() {- uniffiCallStatus inuniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(FfiConverterString.lower(clientId),- FfiConverterString.lower(clientSecret),uniffiCallStatus+ FfiConverterString.lower(clientSecret),$0)}self.init(unsafeFromHandle: handle)@@ -1076,7 +1034,8 @@ open func execute(request: HttpRequest)async throws -> HttpResponse {try await uniffiRustCallAsync(rustFutureFunc: {uniffi_cyclops_sdk_fn_method_httpclient_execute(- self.uniffiCloneHandle(),FfiConverterTypeHttpRequest_lower(request)+ self.uniffiCloneHandle(),+ FfiConverterTypeHttpRequest_lower(request))},pollFunc: ffi_cyclops_sdk_rust_future_poll_rust_buffer,@@ -1099,8 +1058,9 @@ fileprivate struct UniffiCallbackInterfaceHttpClient {// Create the VTable using a series of closures.// Swift automatically converts these into C callback functions.//- // Store the vtable directly.- static let vtable: UniffiVTableCallbackInterfaceHttpClient = UniffiVTableCallbackInterfaceHttpClient(+ // This creates 1-element array, since this seems to be the only way to construct a const+ // pointer that we can pass to the Rust code.+ static let vtable: [UniffiVTableCallbackInterfaceHttpClient] = [UniffiVTableCallbackInterfaceHttpClient(uniffiFree: { (uniffiHandle: UInt64) -> () indo {try FfiConverterTypeHttpClient.handleMap.remove(handle: uniffiHandle)@@ -1158,23 +1118,11 @@ fileprivate struct UniffiCallbackInterfaceHttpClient {droppedCallback: uniffiOutDroppedCallback)}- )-- // Rust stores this pointer for future callback invocations, so it must live- // for the process lifetime (not just for the init function call).- //- // `nonisolated(unsafe)` is needed under Swift 6 strict concurrency.- // This is safe because the pointee is initialized once during static init- // and never mutated by either side of the FFI. Its fields are C function pointers.- nonisolated(unsafe) static let vtablePtr: UnsafePointer<UniffiVTableCallbackInterfaceHttpClient> = {- let ptr = UnsafeMutablePointer<UniffiVTableCallbackInterfaceHttpClient>.allocate(capacity: 1)- ptr.initialize(to: vtable)- return UnsafePointer(ptr)- }()+ )]}private func uniffiCallbackInitHttpClient() {- uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(UniffiCallbackInterfaceHttpClient.vtablePtr)+ uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(UniffiCallbackInterfaceHttpClient.vtable)}#if swift(>=5.8)@@ -1847,8 +1795,7 @@ public func FfiConverterTypeSandbox_lower(_ value: Sandbox) -> RustBuffer {}-public-enum HttpError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError {+public enum HttpError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError {@@ -1922,8 +1869,7 @@ public func FfiConverterTypeHttpError_lower(_ value: HttpError) -> RustBuffer {}-public-enum SdkError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError {+public enum SdkError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError {@@ -2493,46 +2439,46 @@ private let initializationResult: InitializationResult = {if bindings_contract_version != scaffolding_contract_version {return InitializationResult.contractVersionMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim() != 51021) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim() != 23330) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim() != 50650) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim() != 20460) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim() != 55182) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim() != 17760) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims() != 26952) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims() != 7802) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim() != 53385) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim() != 18984) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() != 31472) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() != 48557) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() != 9252) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() != 31235) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool() != 44001) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool() != 43327) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() != 25465) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() != 27984) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() != 39705) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() != 17695) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() != 4680) {+ if (uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() != 46699) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_method_httpclient_execute() != 11556) {+ if (uniffi_cyclops_sdk_checksum_method_httpclient_execute() != 38803) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() != 48439) {+ if (uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() != 54404) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() != 56420) {+ if (uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() != 25746) {return InitializationResult.apiChecksumMismatch}diff --git a/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swift b/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swiftindex 6b35598ca5..47292463cf 100644--- a/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swift+++ b/libs/fleet/sdk-bindings/swift/CyclopsSdkSchema.swift@@ -39,52 +39,6 @@ fileprivate extension ForeignBytes {init(bufferPointer: UnsafeBufferPointer<UInt8>) {self.init(len: Int32(bufferPointer.count), data: bufferPointer.baseAddress)}-- init(rawBufferPointer: UnsafeRawBufferPointer) {- self.init(- len: Int32(rawBufferPointer.count),- data: rawBufferPointer.baseAddress?.assumingMemoryBound(to: UInt8.self)- )- }-}--// Converter for `&[u8]` / `[ByRef] bytes` arguments.-//-// Conforms to `FfiConverter` so the compiler enforces the full converter-// method set. Only the scope-bound `lower(_:_body:)` overload is sound —-// zero-copy byte buffers only flow foreign -> Rust, and only in argument-// position. The four protocol-witness methods (`lift`, `lower`, `read`,-// `write`) `fatalError` at runtime if anyone reaches them.-//-// The scope-bound `lower` takes a closure because the `ForeignBytes`-// pointer is only guaranteed valid for the duration of-// `Data.withUnsafeBytes`. Callers must run the full FFI call inside-// the closure body.-fileprivate enum FfiConverterByRefBytes: FfiConverter {- typealias SwiftType = Data- typealias FfiType = ForeignBytes-- static func lower<R>(_ value: Data, _ body: (ForeignBytes) throws -> R) rethrows -> R {- return try value.withUnsafeBytes { rawBuf in- try body(ForeignBytes(rawBufferPointer: rawBuf))- }- }-- static func lower(_ value: Data) -> ForeignBytes {- fatalError("ByRef bytes cannot use the plain lower: returning ForeignBytes escapes the Data.withUnsafeBytes scope. Use the scope-bound lower(_:_body:) overload instead.")- }-- static func lift(_ value: ForeignBytes) throws -> Data {- fatalError("ByRef bytes cannot be lifted: zero-copy &[u8] only flows foreign->Rust")- }-- static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Data {- fatalError("ByRef bytes cannot be read from a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")- }-- static func write(_ value: Data, into buf: inout [UInt8]) {- fatalError("ByRef bytes cannot be written to a buffer: zero-copy &[u8] is only supported in argument position, not nested in records/options/etc.")- }}// For every type used in the interface, we provide helper methods for conveniently@@ -549,11 +503,7 @@ fileprivate struct FfiConverterString: FfiConverter {return String()}let bytes = UnsafeBufferPointer<UInt8>(start: value.data!, count: Int(value.len))- // Use Swift's native UTF-8 decoder; `String(bytes:encoding:.utf8)` goes- // through Foundation's NSString and silently strips a leading U+FEFF BOM.- // Invalid UTF-8 substitutes U+FFFD instead of trapping (unreachable- // given Rust's `String` invariant).- return String(decoding: bytes, as: UTF8.self)+ return String(bytes: bytes, encoding: String.Encoding.utf8)!}public static func lower(_ value: String) -> RustBuffer {@@ -569,8 +519,7 @@ fileprivate struct FfiConverterString: FfiConverter {public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> String {let len: Int32 = try readInt(&buf)- // See `lift` above for why we avoid Foundation's NSString-backed decoder here.- return String(decoding: try readBytes(&buf, count: Int(len)), as: UTF8.self)+ return String(bytes: try readBytes(&buf, count: Int(len)), encoding: String.Encoding.utf8)!}public static func write(_ value: String, into buf: inout [UInt8]) {@@ -641,9 +590,8 @@ open class PreservedJson: PreservedJsonProtocol, @unchecked Sendable {public static func fromJson(value: String)throws -> PreservedJson {return try FfiConverterTypePreservedJson_lift(try rustCallWithError(FfiConverterTypeJsonValueError_lift) {- uniffiCallStatus inuniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(- FfiConverterString.lower(value),uniffiCallStatus+ FfiConverterString.lower(value),$0)})}@@ -652,9 +600,8 @@ public static func fromJson(value: String)throws -> PreservedJson {open func toJson() -> String {return try! FfiConverterString.lift(try! rustCall() {- uniffiCallStatus inuniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json(- self.uniffiCloneHandle(),uniffiCallStatus+ self.uniffiCloneHandle(),$0)})}@@ -1449,10 +1396,9 @@ public struct PoolSpec: Equatable, Hashable {public static func == (self: PoolSpec, other: PoolSpec) -> Bool {return try! FfiConverterBool.lift(try! rustCall() {- uniffiCallStatus inuniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq(FfiConverterTypePoolSpec_lower(self),- FfiConverterTypePoolSpec_lower(other),uniffiCallStatus+ FfiConverterTypePoolSpec_lower(other),$0)})@@ -1461,9 +1407,8 @@ public static func == (self: PoolSpec, other: PoolSpec) -> Bool {public func hash(into hasher: inout Hasher) {let val = try! FfiConverterUInt64.lift(try! rustCall() {- uniffiCallStatus inuniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash(- FfiConverterTypePoolSpec_lower(self),uniffiCallStatus+ FfiConverterTypePoolSpec_lower(self),$0)})@@ -1874,7 +1819,8 @@ public func FfiConverterTypeWarmPoolAutoscaling_lower(_ value: WarmPoolAutoscalireturn FfiConverterTypeWarmPoolAutoscaling.lower(value)}-+// Note that we don't yet support `indirect` for enums.+// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.public enum Firmware: Equatable, Hashable {@@ -1940,7 +1886,8 @@ public func FfiConverterTypeFirmware_lower(_ value: Firmware) -> RustBuffer {}-+// Note that we don't yet support `indirect` for enums.+// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.public enum ImagePullPolicy: Equatable, Hashable {@@ -2014,8 +1961,7 @@ public func FfiConverterTypeImagePullPolicy_lower(_ value: ImagePullPolicy) -> R-public-enum JsonValueError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError {+public enum JsonValueError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError {@@ -2088,7 +2034,8 @@ public func FfiConverterTypeJsonValueError_lower(_ value: JsonValueError) -> Rusreturn FfiConverterTypeJsonValueError.lower(value)}-+// Note that we don't yet support `indirect` for enums.+// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.public enum RuntimeKind: Equatable, Hashable {@@ -2161,7 +2108,8 @@ public func FfiConverterTypeRuntimeKind_lower(_ value: RuntimeKind) -> RustBuffe}-+// Note that we don't yet support `indirect` for enums.+// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.public enum ServiceProtocol: Equatable, Hashable {@@ -2776,10 +2724,10 @@ private let initializationResult: InitializationResult = {if bindings_contract_version != scaffolding_contract_version {return InitializationResult.contractVersionMismatch}- if (uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() != 675) {+ if (uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() != 8252) {return InitializationResult.apiChecksumMismatch}- if (uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() != 56364) {+ if (uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() != 24064) {return InitializationResult.apiChecksumMismatch}diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/cyclops_sdk_module.rs b/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/cyclops_sdk_module.rsnew file mode 100644index 0000000000..21a62cbe81--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/cyclops_sdk_module.rs@@ -0,0 +1,2005 @@+#[allow(unused_imports)]+use uniffi_runtime_javascript::{self as js, uniffi as u, IntoJs, IntoRust};+use wasm_bindgen::prelude::wasm_bindgen;+extern "C" {+ fn uniffi_cyclops_sdk_fn_clone_cyclopsclient(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_free_cyclopsclient(+ handle: u64,+ status_: &mut u::RustCallStatus,+ );+ fn uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(+ configuration: u::RustBuffer,+ http_client: u64,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(+ ptr: u64,+ request: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(+ ptr: u64,+ claim: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(+ ptr: u64,+ claim: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(+ ptr: u64,+ namespace: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(+ ptr: u64,+ claim: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(+ ptr: u64,+ request: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(+ ptr: u64,+ pool: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(+ ptr: u64,+ pool: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(+ ptr: u64,+ namespace: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(+ ptr: u64,+ pool: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(+ ptr: u64,+ sandbox: u::RustBuffer,+ service: u::RustBuffer,+ path: u::RustBuffer,+ request: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_clone_httpclient(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_free_httpclient(+ handle: u64,+ status_: &mut u::RustCallStatus,+ );+ fn uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(+ vtable: std::ptr::NonNull<v_table_callback_interface_http_client::VTableRs>,+ );+ fn uniffi_cyclops_sdk_fn_method_httpclient_execute(+ ptr: u64,+ request: u::RustBuffer,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_clone_cyclopscredentials(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_fn_free_cyclopscredentials(+ handle: u64,+ status_: &mut u::RustCallStatus,+ );+ fn uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(+ client_id: u::RustBuffer,+ client_secret: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn ffi_cyclops_sdk_rust_future_poll_u8(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_u8(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_u8(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_u8(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> u8;+ fn ffi_cyclops_sdk_rust_future_poll_i8(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_i8(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_i8(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_i8(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> i8;+ fn ffi_cyclops_sdk_rust_future_poll_u16(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_u16(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_u16(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_u16(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> u16;+ fn ffi_cyclops_sdk_rust_future_poll_i16(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_i16(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_i16(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_i16(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> i16;+ fn ffi_cyclops_sdk_rust_future_poll_u32(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_u32(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_u32(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_u32(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> u32;+ fn ffi_cyclops_sdk_rust_future_poll_i32(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_i32(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_i32(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_i32(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> i32;+ fn ffi_cyclops_sdk_rust_future_poll_u64(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_u64(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_u64(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_u64(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn ffi_cyclops_sdk_rust_future_poll_i64(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_i64(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_i64(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_i64(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> i64;+ fn ffi_cyclops_sdk_rust_future_poll_f32(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_f32(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_f32(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_f32(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> f32;+ fn ffi_cyclops_sdk_rust_future_poll_f64(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_f64(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_f64(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_f64(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> f64;+ fn ffi_cyclops_sdk_rust_future_poll_rust_buffer(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_rust_buffer(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_rust_buffer(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_rust_buffer(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> u::RustBuffer;+ fn ffi_cyclops_sdk_rust_future_poll_void(+ handle: u64,+ callback: rust_future_continuation_callback::FnSig,+ callback_data: u64,+ );+ fn ffi_cyclops_sdk_rust_future_cancel_void(handle: u64);+ fn ffi_cyclops_sdk_rust_future_free_void(handle: u64);+ fn ffi_cyclops_sdk_rust_future_complete_void(+ handle: u64,+ status_: &mut u::RustCallStatus,+ );+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() -> u16;+ fn uniffi_cyclops_sdk_checksum_method_httpclient_execute() -> u16;+ fn uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() -> u16;+ fn uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() -> u16;+ fn ffi_cyclops_sdk_uniffi_contract_version() -> u32;+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_clone_cyclopsclient(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_clone_cyclopsclient(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_free_cyclopsclient(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) {+ let mut u_status_ = u::RustCallStatus::default();+ unsafe {+ uniffi_cyclops_sdk_fn_free_cyclopsclient(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(+ configuration: js::ForeignBytes,+ http_client: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(+ u::RustBuffer::into_rust(configuration),+ u64::into_rust(http_client),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(+ ptr: js::Handle,+ request: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(request),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(+ ptr: js::Handle,+ claim: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(claim),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(+ ptr: js::Handle,+ claim: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(claim),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(+ ptr: js::Handle,+ namespace: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(namespace),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(+ ptr: js::Handle,+ claim: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(claim),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(+ ptr: js::Handle,+ request: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(request),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(+ ptr: js::Handle,+ pool: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(pool),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(+ ptr: js::Handle,+ pool: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(pool),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(+ ptr: js::Handle,+ namespace: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(namespace),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(+ ptr: js::Handle,+ pool: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(pool),+ )+ .into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(+ ptr: js::Handle,+ sandbox: js::ForeignBytes,+ service: js::ForeignBytes,+ path: js::ForeignBytes,+ request: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(sandbox),+ u::RustBuffer::into_rust(service),+ u::RustBuffer::into_rust(path),+ u::RustBuffer::into_rust(request),+ )+ .into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_clone_httpclient(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_clone_httpclient(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_free_httpclient(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) {+ let mut u_status_ = u::RustCallStatus::default();+ unsafe {+ uniffi_cyclops_sdk_fn_free_httpclient(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(+ vtable: v_table_callback_interface_http_client::VTableJs,+) {+ uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(+ std::ptr::NonNull::<+ v_table_callback_interface_http_client::VTableRs,+ >::into_rust(vtable),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_fn_method_httpclient_execute(+ ptr: js::Handle,+ request: js::ForeignBytes,+) -> js::Handle {+ uniffi_cyclops_sdk_fn_method_httpclient_execute(+ u64::into_rust(ptr),+ u::RustBuffer::into_rust(request),+ )+ .into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_clone_cyclopscredentials(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_clone_cyclopscredentials(+ u64::into_rust(handle),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_free_cyclopscredentials(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) {+ let mut u_status_ = u::RustCallStatus::default();+ unsafe {+ uniffi_cyclops_sdk_fn_free_cyclopscredentials(+ u64::into_rust(handle),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(+ client_id: js::ForeignBytes,+ client_secret: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(+ u::RustBuffer::into_rust(client_id),+ u::RustBuffer::into_rust(client_secret),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_u8(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_u8(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_u8(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_u8(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_u8(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_u8(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_u8(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::UInt8 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_u8(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_i8(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_i8(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_i8(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_i8(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_i8(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_i8(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_i8(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Int8 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_i8(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_u16(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_u16(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_u16(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_u16(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_u16(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_u16(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_u16(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::UInt16 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_u16(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_i16(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_i16(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_i16(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_i16(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_i16(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_i16(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_i16(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Int16 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_i16(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_u32(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_u32(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_u32(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_u32(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_u32(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_u32(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_u32(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::UInt32 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_u32(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_i32(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_i32(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_i32(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_i32(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_i32(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_i32(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_i32(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Int32 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_i32(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_u64(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_u64(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_u64(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_u64(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_u64(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_u64(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_u64(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::UInt64 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_u64(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_i64(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_i64(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_i64(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_i64(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_i64(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_i64(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_i64(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Int64 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_i64(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_f32(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_f32(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_f32(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_f32(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_f32(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_f32(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_f32(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Float32 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_f32(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_f64(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_f64(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_f64(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_f64(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_f64(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_f64(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_f64(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Float64 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_f64(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_rust_buffer(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_rust_buffer(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_rust_buffer(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::ForeignBytes {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ ffi_cyclops_sdk_rust_future_complete_rust_buffer(+ u64::into_rust(handle),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_poll_void(+ handle: js::Handle,+ callback: rust_future_continuation_callback::JsCallbackFnRustFutureContinuationCallback,+ callback_data: js::Handle,+) {+ ffi_cyclops_sdk_rust_future_poll_void(+ u64::into_rust(handle),+ rust_future_continuation_callback::FnSig::into_rust(callback),+ u64::into_rust(callback_data),+ );+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_cancel_void(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_cancel_void(u64::into_rust(handle));+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_rust_future_free_void(handle: js::Handle) {+ ffi_cyclops_sdk_rust_future_free_void(u64::into_rust(handle));+}+#[wasm_bindgen]+pub fn ubrn_ffi_cyclops_sdk_rust_future_complete_void(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) {+ let mut u_status_ = u::RustCallStatus::default();+ unsafe {+ ffi_cyclops_sdk_rust_future_complete_void(u64::into_rust(handle), &mut u_status_)+ };+ f_status_.copy_from(u_status_);+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_method_httpclient_execute() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_method_httpclient_execute().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() -> js::UInt16 {+ uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_uniffi_contract_version() -> js::UInt32 {+ ffi_cyclops_sdk_uniffi_contract_version().into_js()+}+mod foreign_future_result_i32 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::Int32;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: i32,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: i32::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_dropped_callback_struct {+ use super::*;+ use super::foreign_future_dropped_callback as method_free;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn handle(this: &VTableJs) -> js::UInt64;+ #[wasm_bindgen(method, getter)]+ fn free(+ this: &VTableJs,+ ) -> method_free::JsCallbackFnForeignFutureDroppedCallback;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ handle: u64,+ free: method_free::FnSig,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ handle: u64::into_rust(v_.handle()),+ free: method_free::FnSig::into_rust(v_.free()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_result_u8 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::UInt8;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: u8,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: u8::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_result_rust_buffer {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::ForeignBytes;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: u::RustBuffer,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: u::RustBuffer::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_result_void {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_result_u64 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::UInt64;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: u64,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: u64::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_result_i8 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::Int8;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: i8,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: i8::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_result_u16 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::UInt16;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: u16,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: u16::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_result_i16 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::Int16;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: i16,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: i16::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_result_f32 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::Float32;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: f32,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: f32::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_result_i64 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::Int64;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: i64,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: i64::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod foreign_future_result_f64 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::Float64;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: f64,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: f64::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+#[allow(non_snake_case)]+mod v_table_callback_interface_http_client__free {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ #[wasm_bindgen]+ pub type JsCallbackFnVTableCallbackInterfaceHttpClientFree;+ #[wasm_bindgen(method)]+ pub fn call(+ this_: &JsCallbackFnVTableCallbackInterfaceHttpClientFree,+ ctx_: &JsCallbackFnVTableCallbackInterfaceHttpClientFree,+ handle: js::UInt64,+ );+ }+ thread_local! {+ static CALLBACK : js::ForeignCell <+ JsCallbackFnVTableCallbackInterfaceHttpClientFree > = js::ForeignCell::new();+ }+ impl IntoRust<JsCallbackFnVTableCallbackInterfaceHttpClientFree> for FnSig {+ fn into_rust(+ callback: JsCallbackFnVTableCallbackInterfaceHttpClientFree,+ ) -> Self {+ CALLBACK.with(|cell| cell.set(callback));+ implementation+ }+ }+ pub(super) type FnSig = extern "C" fn(handle: u64);+ extern "C" fn implementation(handle: u64) {+ CALLBACK+ .with(|cell_| {+ cell_.with_value(|callback_| callback_.call(callback_, handle.into_js()))+ });+ }+}+#[allow(non_snake_case)]+mod v_table_callback_interface_http_client__clone {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ #[wasm_bindgen]+ pub type JsCallbackFnVTableCallbackInterfaceHttpClientClone;+ #[wasm_bindgen(method)]+ pub fn call(+ this_: &JsCallbackFnVTableCallbackInterfaceHttpClientClone,+ ctx_: &JsCallbackFnVTableCallbackInterfaceHttpClientClone,+ handle: js::UInt64,+ ) -> js::UInt64;+ }+ thread_local! {+ static CALLBACK : js::ForeignCell <+ JsCallbackFnVTableCallbackInterfaceHttpClientClone > = js::ForeignCell::new();+ }+ impl IntoRust<JsCallbackFnVTableCallbackInterfaceHttpClientClone> for FnSig {+ fn into_rust(+ callback: JsCallbackFnVTableCallbackInterfaceHttpClientClone,+ ) -> Self {+ CALLBACK.with(|cell| cell.set(callback));+ implementation+ }+ }+ pub(super) type FnSig = extern "C" fn(handle: u64) -> u64;+ extern "C" fn implementation(handle: u64) -> u64 {+ let uniffi_result_ = CALLBACK+ .with(|cell_| {+ cell_.with_value(|callback_| callback_.call(callback_, handle.into_js()))+ });+ u64::into_rust(uniffi_result_)+ }+}+mod v_table_callback_interface_http_client {+ use super::*;+ use super::v_table_callback_interface_http_client__free as method_uniffi_free;+ use super::v_table_callback_interface_http_client__clone as method_uniffi_clone;+ use super::callback_interface_http_client_method0 as method_execute;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn uniffi_free(+ this: &VTableJs,+ ) -> method_uniffi_free::JsCallbackFnVTableCallbackInterfaceHttpClientFree;+ #[wasm_bindgen(method, getter)]+ fn uniffi_clone(+ this: &VTableJs,+ ) -> method_uniffi_clone::JsCallbackFnVTableCallbackInterfaceHttpClientClone;+ #[wasm_bindgen(method, getter)]+ fn execute(+ this: &VTableJs,+ ) -> method_execute::JsCallbackFnCallbackInterfaceHttpClientMethod0;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ uniffi_free: method_uniffi_free::FnSig,+ uniffi_clone: method_uniffi_clone::FnSig,+ execute: method_execute::FnSig,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ uniffi_free: method_uniffi_free::FnSig::into_rust(v_.uniffi_free()),+ uniffi_clone: method_uniffi_clone::FnSig::into_rust(v_.uniffi_clone()),+ execute: method_execute::FnSig::into_rust(v_.execute()),+ }+ }+ }+}+mod foreign_future_result_u32 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ pub type VTableJs;+ #[wasm_bindgen(method, getter)]+ fn return_value(this: &VTableJs) -> js::UInt32;+ #[wasm_bindgen(method, getter)]+ fn call_status(this: &VTableJs) -> js::RustCallStatus;+ }+ #[repr(C)]+ pub(super) struct VTableRs {+ return_value: u32,+ call_status: u::RustCallStatus,+ }+ impl IntoRust<VTableJs> for VTableRs {+ fn into_rust(v_: VTableJs) -> Self {+ Self {+ return_value: u32::into_rust(v_.return_value()),+ call_status: u::RustCallStatus::into_rust(v_.call_status()),+ }+ }+ }+ impl VTableJs {+ #[allow(unused)]+ pub(super) fn copy_into_return(self, rust: &mut VTableRs) {+ *rust = <VTableRs>::into_rust(self);+ }+ }+}+mod rust_future_continuation_callback {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ #[wasm_bindgen]+ pub type JsCallbackFnRustFutureContinuationCallback;+ #[wasm_bindgen(method)]+ pub fn call(+ this_: &JsCallbackFnRustFutureContinuationCallback,+ ctx_: &JsCallbackFnRustFutureContinuationCallback,+ data: js::UInt64,+ poll_result: js::Int8,+ );+ }+ thread_local! {+ static CALLBACK : js::ForeignCell < JsCallbackFnRustFutureContinuationCallback >+ = js::ForeignCell::new();+ }+ impl IntoRust<JsCallbackFnRustFutureContinuationCallback> for FnSig {+ fn into_rust(callback: JsCallbackFnRustFutureContinuationCallback) -> Self {+ CALLBACK.with(|cell| cell.set(callback));+ implementation+ }+ }+ pub(super) type FnSig = extern "C" fn(data: u64, poll_result: i8);+ extern "C" fn implementation(data: u64, poll_result: i8) {+ CALLBACK+ .with(|cell_| {+ cell_+ .with_value(|callback_| {+ callback_.call(callback_, data.into_js(), poll_result.into_js())+ })+ });+ }+}+mod foreign_future_dropped_callback {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ #[wasm_bindgen]+ pub type JsCallbackFnForeignFutureDroppedCallback;+ #[wasm_bindgen(method)]+ pub fn call(+ this_: &JsCallbackFnForeignFutureDroppedCallback,+ ctx_: &JsCallbackFnForeignFutureDroppedCallback,+ handle: js::UInt64,+ );+ }+ thread_local! {+ static CALLBACK : js::ForeignCell < JsCallbackFnForeignFutureDroppedCallback > =+ js::ForeignCell::new();+ }+ impl IntoRust<JsCallbackFnForeignFutureDroppedCallback> for FnSig {+ fn into_rust(callback: JsCallbackFnForeignFutureDroppedCallback) -> Self {+ CALLBACK.with(|cell| cell.set(callback));+ implementation+ }+ }+ pub(super) type FnSig = extern "C" fn(handle: u64);+ extern "C" fn implementation(handle: u64) {+ CALLBACK+ .with(|cell_| {+ cell_.with_value(|callback_| callback_.call(callback_, handle.into_js()))+ });+ }+}+mod foreign_future_complete_u32 {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteU32)]+ pub struct JsCallbackFnForeignFutureCompleteU32 {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteU32 {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteU32)]+ impl JsCallbackFnForeignFutureCompleteU32 {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_u32::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_u32::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_u32::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteU32> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteU32 {+ JsCallbackFnForeignFutureCompleteU32::new(self)+ }+ }+}+mod foreign_future_complete_f32 {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteF32)]+ pub struct JsCallbackFnForeignFutureCompleteF32 {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteF32 {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteF32)]+ impl JsCallbackFnForeignFutureCompleteF32 {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_f32::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_f32::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_f32::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteF32> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteF32 {+ JsCallbackFnForeignFutureCompleteF32::new(self)+ }+ }+}+mod foreign_future_complete_u16 {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteU16)]+ pub struct JsCallbackFnForeignFutureCompleteU16 {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteU16 {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteU16)]+ impl JsCallbackFnForeignFutureCompleteU16 {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_u16::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_u16::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_u16::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteU16> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteU16 {+ JsCallbackFnForeignFutureCompleteU16::new(self)+ }+ }+}+mod foreign_future_complete_i32 {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteI32)]+ pub struct JsCallbackFnForeignFutureCompleteI32 {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteI32 {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteI32)]+ impl JsCallbackFnForeignFutureCompleteI32 {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_i32::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_i32::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_i32::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteI32> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteI32 {+ JsCallbackFnForeignFutureCompleteI32::new(self)+ }+ }+}+mod foreign_future_complete_u64 {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteU64)]+ pub struct JsCallbackFnForeignFutureCompleteU64 {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteU64 {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteU64)]+ impl JsCallbackFnForeignFutureCompleteU64 {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_u64::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_u64::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_u64::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteU64> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteU64 {+ JsCallbackFnForeignFutureCompleteU64::new(self)+ }+ }+}+mod foreign_future_complete_f64 {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteF64)]+ pub struct JsCallbackFnForeignFutureCompleteF64 {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteF64 {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteF64)]+ impl JsCallbackFnForeignFutureCompleteF64 {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_f64::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_f64::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_f64::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteF64> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteF64 {+ JsCallbackFnForeignFutureCompleteF64::new(self)+ }+ }+}+mod foreign_future_complete_i16 {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteI16)]+ pub struct JsCallbackFnForeignFutureCompleteI16 {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteI16 {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteI16)]+ impl JsCallbackFnForeignFutureCompleteI16 {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_i16::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_i16::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_i16::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteI16> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteI16 {+ JsCallbackFnForeignFutureCompleteI16::new(self)+ }+ }+}+mod foreign_future_complete_i8 {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteI8)]+ pub struct JsCallbackFnForeignFutureCompleteI8 {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteI8 {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteI8)]+ impl JsCallbackFnForeignFutureCompleteI8 {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_i8::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_i8::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_i8::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteI8> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteI8 {+ JsCallbackFnForeignFutureCompleteI8::new(self)+ }+ }+}+mod foreign_future_complete_rust_buffer {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteRustBuffer)]+ pub struct JsCallbackFnForeignFutureCompleteRustBuffer {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteRustBuffer {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteRustBuffer)]+ impl JsCallbackFnForeignFutureCompleteRustBuffer {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_rust_buffer::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_rust_buffer::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_rust_buffer::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteRustBuffer> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteRustBuffer {+ JsCallbackFnForeignFutureCompleteRustBuffer::new(self)+ }+ }+}+mod foreign_future_complete_u8 {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteU8)]+ pub struct JsCallbackFnForeignFutureCompleteU8 {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteU8 {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteU8)]+ impl JsCallbackFnForeignFutureCompleteU8 {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_u8::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_u8::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_u8::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteU8> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteU8 {+ JsCallbackFnForeignFutureCompleteU8::new(self)+ }+ }+}+mod callback_interface_http_client_method0 {+ use super::*;+ #[wasm_bindgen]+ extern "C" {+ #[wasm_bindgen]+ pub type JsCallbackFnCallbackInterfaceHttpClientMethod0;+ #[wasm_bindgen(method)]+ pub fn call(+ this_: &JsCallbackFnCallbackInterfaceHttpClientMethod0,+ ctx_: &JsCallbackFnCallbackInterfaceHttpClientMethod0,+ uniffi_handle: js::UInt64,+ request: js::ForeignBytes,+ uniffi_future_callback: foreign_future_complete_rust_buffer::JsCallbackFnForeignFutureCompleteRustBuffer,+ uniffi_callback_data: js::UInt64,+ ) -> foreign_future_dropped_callback_struct::VTableJs;+ }+ thread_local! {+ static CALLBACK : js::ForeignCell <+ JsCallbackFnCallbackInterfaceHttpClientMethod0 > = js::ForeignCell::new();+ }+ impl IntoRust<JsCallbackFnCallbackInterfaceHttpClientMethod0> for FnSig {+ fn into_rust(callback: JsCallbackFnCallbackInterfaceHttpClientMethod0) -> Self {+ CALLBACK.with(|cell| cell.set(callback));+ implementation+ }+ }+ pub(super) type FnSig = extern "C" fn(+ uniffi_handle: u64,+ request: u::RustBuffer,+ uniffi_future_callback: foreign_future_complete_rust_buffer::FnSig,+ uniffi_callback_data: u64,+ rs_return_: &mut foreign_future_dropped_callback_struct::VTableRs,+ );+ extern "C" fn implementation(+ uniffi_handle: u64,+ request: u::RustBuffer,+ uniffi_future_callback: foreign_future_complete_rust_buffer::FnSig,+ uniffi_callback_data: u64,+ rs_return_: &mut foreign_future_dropped_callback_struct::VTableRs,+ ) {+ let uniffi_result_ = CALLBACK+ .with(|cell_| {+ cell_+ .with_value(|callback_| {+ callback_+ .call(+ callback_,+ uniffi_handle.into_js(),+ request.into_js(),+ uniffi_future_callback.into_js(),+ uniffi_callback_data.into_js(),+ )+ })+ });+ uniffi_result_.copy_into_return(rs_return_);+ }+}+mod foreign_future_complete_void {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteVoid)]+ pub struct JsCallbackFnForeignFutureCompleteVoid {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteVoid {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteVoid)]+ impl JsCallbackFnForeignFutureCompleteVoid {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_void::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_void::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_void::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteVoid> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteVoid {+ JsCallbackFnForeignFutureCompleteVoid::new(self)+ }+ }+}+mod foreign_future_complete_i64 {+ use super::*;+ #[wasm_bindgen(js_name = ForeignFutureCompleteI64)]+ pub struct JsCallbackFnForeignFutureCompleteI64 {+ callback: FnSig,+ }+ impl JsCallbackFnForeignFutureCompleteI64 {+ fn new(callback: FnSig) -> Self {+ Self { callback }+ }+ }+ #[wasm_bindgen(js_class = ForeignFutureCompleteI64)]+ impl JsCallbackFnForeignFutureCompleteI64 {+ #[wasm_bindgen]+ pub fn call(+ &self,+ _ctx: &Self,+ callback_data: js::UInt64,+ result: foreign_future_result_i64::VTableJs,+ ) {+ (self+ .callback)(+ u64::into_rust(callback_data),+ foreign_future_result_i64::VTableRs::into_rust(result),+ )+ }+ }+ pub(super) type FnSig = extern "C" fn(+ callback_data: u64,+ result: foreign_future_result_i64::VTableRs,+ );+ impl IntoJs<JsCallbackFnForeignFutureCompleteI64> for FnSig {+ fn into_js(self) -> JsCallbackFnForeignFutureCompleteI64 {+ JsCallbackFnForeignFutureCompleteI64::new(self)+ }+ }+}diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/cyclops_sdk_schema_module.rs b/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/cyclops_sdk_schema_module.rsnew file mode 100644index 0000000000..81cb13db42--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/cpp/cyclops_sdk_schema_module.rs@@ -0,0 +1,158 @@+#[allow(unused_imports)]+use uniffi_runtime_javascript::{self as js, uniffi as u, IntoJs, IntoRust};+use wasm_bindgen::prelude::wasm_bindgen;+extern "C" {+ fn uniffi_cyclops_sdk_schema_fn_clone_preservedjson(+ handle: u64,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_schema_fn_free_preservedjson(+ handle: u64,+ status_: &mut u::RustCallStatus,+ );+ fn uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(+ value: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json(+ ptr: u64,+ status_: &mut u::RustCallStatus,+ ) -> u::RustBuffer;+ fn uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq(+ ptr: u::RustBuffer,+ other: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> i8;+ fn uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_ne(+ ptr: u::RustBuffer,+ other: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> i8;+ fn uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash(+ ptr: u::RustBuffer,+ status_: &mut u::RustCallStatus,+ ) -> u64;+ fn uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() -> u16;+ fn uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() -> u16;+ fn ffi_cyclops_sdk_schema_uniffi_contract_version() -> u32;+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_schema_fn_clone_preservedjson(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_schema_fn_clone_preservedjson(+ u64::into_rust(handle),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_schema_fn_free_preservedjson(+ handle: js::Handle,+ f_status_: &mut js::RustCallStatus,+) {+ let mut u_status_ = u::RustCallStatus::default();+ unsafe {+ uniffi_cyclops_sdk_schema_fn_free_preservedjson(+ u64::into_rust(handle),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(+ value: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Handle {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(+ u::RustBuffer::into_rust(value),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json(+ ptr: js::Handle,+ f_status_: &mut js::RustCallStatus,+) -> js::ForeignBytes {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json(+ u64::into_rust(ptr),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq(+ ptr: js::ForeignBytes,+ other: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Int8 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq(+ u::RustBuffer::into_rust(ptr),+ u::RustBuffer::into_rust(other),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_ne(+ ptr: js::ForeignBytes,+ other: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::Int8 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_ne(+ u::RustBuffer::into_rust(ptr),+ u::RustBuffer::into_rust(other),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub fn ubrn_uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash(+ ptr: js::ForeignBytes,+ f_status_: &mut js::RustCallStatus,+) -> js::UInt64 {+ let mut u_status_ = u::RustCallStatus::default();+ let value_ = unsafe {+ uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash(+ u::RustBuffer::into_rust(ptr),+ &mut u_status_,+ )+ };+ f_status_.copy_from(u_status_);+ value_.into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() -> js::UInt16 {+ uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() -> js::UInt16 {+ uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json().into_js()+}+#[wasm_bindgen]+pub unsafe fn ubrn_ffi_cyclops_sdk_schema_uniffi_contract_version() -> js::UInt32 {+ ffi_cyclops_sdk_schema_uniffi_contract_version().into_js()+}diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/README.md b/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/README.mdnew file mode 100644index 0000000000..c8bda37e6f--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/README.md@@ -0,0 +1,30 @@+# Browser live lifecycle example++This development-only page runs the same pool, claim, sandbox, service-request,+and cleanup lifecycle as the Node example. It uses browser `fetch` for the+UniFFI `HttpClient` callback.++## Security++The page accepts an OAuth client secret and the generated SDK passes it to the+token endpoint. Do not deploy this page with a production secret. Use a+development-only OAuth client, HTTPS, and a trusted origin with required CORS+policies for the control plane and token endpoint.++## Build prerequisite++The generated browser sources import `ts/wasm-bindgen/index.js`. That module is+emitted by the UniFFI React Native browser/WASM pipeline and is not checked into+this binding directory. Provide a project `ubrn.config.yaml` and run that WASM+build pipeline first so its crate and JS glue are generated beside `ts`.++After the WASM output exists, bundle `browser.ts` as an ESM browser entrypoint+to `examples/dist/browser.js` using the project's browser bundler. `index.html`+loads that compiled bundle rather than raw TypeScript.++## Serve and run++Serve this directory after bundling, for example with `npx serve .`, then open+the printed URL. Enter the settings, development OAuth client, image, and+namespace, then select **Run Lifecycle**. The example creates a one-replica pool+exposing `mcp` on port `3000`, sends `GET /health`, and cleans up its resources.diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/browser.ts b/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/browser.tsnew file mode 100644index 0000000000..7ec06a3214--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/browser.ts@@ -0,0 +1,121 @@+import {+ CyclopsClient,+ CyclopsCredentials,+ type Claim,+ type HttpClient,+ type HttpRequest,+ type HttpResponse,+ type Pool,+} from "../ts/cyclops_sdk";+import type { ClaimSpec, PoolSpec } from "../ts/cyclops_sdk_schema";++const serviceName = "mcp";+const servicePath = "/health";+const output = document.querySelector<HTMLPreElement>("#output")!;+const runButton = document.querySelector<HTMLButtonElement>("#run")!;+const form = document.querySelector<HTMLFormElement>("#config")!;++class FetchHttpClient implements HttpClient {+ async execute(request: HttpRequest): Promise<HttpResponse> {+ const response = await fetch(request.url, {+ method: request.method,+ headers: request.headers.map(({ name, value }) => [name, value]),+ body: request.body,+ });+ return {+ status: response.status,+ headers: [...response.headers].map(([name, value]) => ({ name, value })),+ body: await response.arrayBuffer(),+ };+ }+}++function log(message: string, value?: unknown): void {+ output.textContent += `\n${message}${value === undefined ? "" : ` ${JSON.stringify(value, null, 2)}`}`;+}++function values(): Record<string, string> {+ const data = new FormData(form);+ return Object.fromEntries([...data.entries()].map(([key, value]) => [key, String(value).trim()]));+}++function makePoolSpec(image: string, imagePullSecret: string): PoolSpec {+ return {+ replicas: 1,+ template: {+ // `containerDiskImage` is the only required template field. Production+ // pools should also set resource and scheduling requirements.+ containerDiskImage: image,+ imagePullSecret: imagePullSecret || undefined,+ },+ services: [{ name: serviceName, targetPort: 3000 }],+ };+}++async function runLifecycle(): Promise<void> {+ const config = values();+ const client = CyclopsClient.connect({+ baseUrl: config.baseUrl,+ tokenUrl: config.tokenUrl,+ credentials: new CyclopsCredentials(config.clientId, config.clientSecret),+ poolPollIntervalMs: 5000n,+ poolPollLimit: 100,+ claimPollIntervalMs: 2000n,+ claimPollLimit: 100,+ }, new FetchHttpClient());++ let pool: Pool | undefined;+ let claim: Claim | undefined;+ try {+ log("[1/8] Listing existing pools...");+ log("Pools:", await client.listPools(config.namespace));++ log("[2/8] Creating pool...");+ pool = await client.createPool({ namespace: config.namespace, spec: makePoolSpec(config.image, config.imagePullSecret) });+ log("Pool:", pool);++ log("[3/8] Listing pools after creation...");+ log("Pools:", await client.listPools(config.namespace));++ log("[4/8] Creating claim...");+ const spec: ClaimSpec = { sandboxTemplateRef: { name: pool.metadata.name } };+ claim = await client.createClaim({ pool, spec });+ log("Claim:", claim);++ log("[5/8] Listing claims...");+ log("Claims:", await client.listClaims(config.namespace));++ log("[6/8] Waiting for claim to bind a sandbox...");+ const sandbox = await client.waitClaim(claim);+ log("Sandbox:", sandbox);++ log("[7/8] Calling the sandbox service...");+ const response = await client.serviceRequest(sandbox, serviceName, servicePath, {+ method: "GET", url: `https://ignored.invalid${servicePath}`, headers: [],+ });+ log("Service response:", { status: response.status, body: new TextDecoder().decode(response.body) });+ log("[8/8] Lifecycle completed; cleanup will now run.");+ } finally {+ if (claim) {+ log("[cleanup] Deleting claim...");+ await client.deleteClaim(claim);+ }+ if (pool) {+ log("[cleanup] Deleting pool...");+ await client.deletePool(pool);+ }+ }+}++runButton.addEventListener("click", async () => {+ if (!form.reportValidity()) return;+ output.textContent = "Running...";+ runButton.disabled = true;+ try {+ await runLifecycle();+ } catch (error) {+ log("Lifecycle failed:", error instanceof Error ? error.message : String(error));+ } finally {+ runButton.disabled = false;+ }+});diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/index.html b/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/index.htmlnew file mode 100644index 0000000000..dcb1ca04f3--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/examples/index.html@@ -0,0 +1,32 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Cyclops Browser Lifecycle Example</title>+ <style>+ body { font: 16px/1.4 ui-monospace, monospace; margin: 2rem auto; max-width: 60rem; padding: 0 1rem; }+ form { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }+ label { display: grid; gap: .25rem; } input { font: inherit; padding: .4rem; }+ button { font: inherit; margin-top: 1rem; padding: .55rem .8rem; }+ pre { background: #111; color: #e8f5e9; min-height: 16rem; overflow: auto; padding: 1rem; white-space: pre-wrap; }+ </style>+ </head>+ <body>+ <h1>Cyclops browser lifecycle</h1>+ <p>This demonstration sends OAuth credentials from the browser. Use only a development-only client and trusted origin.</p>+ <form id="config">+ <label>Base URL <input name="baseUrl" placeholder="https://cyclops.example" required /></label>+ <label>Token URL <input name="tokenUrl" placeholder="https://auth.example/oauth/token" required /></label>+ <label>Client ID <input name="clientId" required /></label>+ <label>Client secret <input name="clientSecret" type="password" required /></label>+ <label>Namespace <input name="namespace" value="default" required /></label>+ <label>Container-disk image <input name="image" placeholder="registry.example/cyclops-mcp:latest" required /></label>+ <label>Image-pull secret <input name="imagePullSecret" /></label>+ </form>+ <button id="run" type="button">Run Lifecycle</button>+ <pre id="output" aria-live="polite">Ready.</pre>+ <!-- Source entrypoint: browser.ts; the WASM-aware bundler writes dist/browser.js. -->+ <script type="module" src="./dist/browser.js"></script>+ </body>+</html>diff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk-ffi.ts b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk-ffi.tsnew file mode 100644index 0000000000..44e0ea640a--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk-ffi.ts@@ -0,0 +1,27 @@+// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.+// Trust me, you don't want to mess with it!++/* tslint:disable */+/* eslint-disable */+// @ts-nocheck++// Structs and function types for calling back into Typescript from Rust.+export type UniffiRustFutureContinuationCallback = (data: bigint, pollResult: number) => void;+export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void;+export type UniffiForeignFutureDroppedCallbackStruct = {+ handle: bigint;+ free: UniffiForeignFutureDroppedCallback;+};+export type UniffiForeignFutureResultRustBuffer = {+ return_value: Uint8Array;+ call_status: UniffiRustCallStatus;+};+export type UniffiForeignFutureCompleterustBuffer = (callbackData: bigint, result: UniffiForeignFutureResultRustBuffer) => void;+type UniffiCallbackInterfaceCyclopsSdkHttpClientMethod0 = (uniffiHandle: bigint, request: Uint8Array, uniffiFutureCallback: UniffiForeignFutureCompleterustBuffer, uniffiCallbackData: bigint) => UniffiForeignFutureDroppedCallbackStruct;+type UniffiCallbackInterfaceCloneCyclopsSdkHttpClient = (handle: bigint) => UniffiResult<void>;+type UniffiCallbackInterfaceFreeCyclopsSdkHttpClient = (handle: bigint) => void;+export type UniffiVTableCallbackInterfaceCyclopsSdkHttpClient = {+ uniffi_free: UniffiCallbackInterfaceFreeCyclopsSdkHttpClient;+ uniffi_clone: UniffiCallbackInterfaceCloneCyclopsSdkHttpClient;+ execute: UniffiCallbackInterfaceCyclopsSdkHttpClientMethod0;+};\ No newline at end of filediff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk.ts b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk.tsnew file mode 100644index 0000000000..34c631a070--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk.ts@@ -0,0 +1,2037 @@+// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.+// Trust me, you don't want to mess with it!+/* tslint:disable */+/* eslint-disable */+// @ts-nocheck+import * as wasmBundle from "./wasm-bindgen/index.js";+import { type UniffiRustFutureContinuationCallback, type UniffiForeignFutureDroppedCallback, type UniffiForeignFutureDroppedCallbackStruct, type UniffiForeignFutureResultRustBuffer, type UniffiForeignFutureCompleterustBuffer, type UniffiVTableCallbackInterfaceCyclopsSdkHttpClient,+} from "./cyclops_sdk-ffi";+import { type ClaimSpec, type OsGymSandboxClaimStatus, type OsGymWorkspacePoolStatus, type PoolSpec,+} from "./cyclops_sdk_schema";+import { type FfiConverter, type UniffiByteArray, type UniffiGcObject, type UniffiHandle, type UniffiObjectFactory, type UniffiReferenceHolder, type UniffiRustCallStatus, AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterArrayBuffer, FfiConverterInt32, FfiConverterMap, FfiConverterObject, FfiConverterObjectWithCallbacks, FfiConverterOptional, FfiConverterUInt16, FfiConverterUInt32, FfiConverterUInt64, FfiConverterUInt8, RustBuffer, UniffiAbstractObject, UniffiError, UniffiInternalError, UniffiResult, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiRustCallAsync, uniffiTraitInterfaceCallAsyncWithError, uniffiTypeNameSymbol, variantOrdinalSymbol,+} from "@ubjs/core";+import uniffiCyclopsSdkSchemaModule from "./cyclops_sdk_schema";+const { FfiConverterTypeClaimSpec, FfiConverterTypeOSGymSandboxClaimStatus, FfiConverterTypeOSGymWorkspacePoolStatus, FfiConverterTypePoolSpec } = uniffiCyclopsSdkSchemaModule.converters;+// wasm1: wrap the wasm-bindgen namespace once so the codegen call sites can+// uniformly reference `nativeModule().rustbuffer_alloc` / `.rustbuffer_free`.+// For wasm1, RustBuffers are plain JS Uint8Arrays — no Rust-side allocation+// is involved, so alloc just hands back a fresh view and free is a no-op.+const _nativeModule = Object.assign({}, wasmBundle, {+ rustbuffer_alloc: (n: number): Uint8Array => new Uint8Array(n),+ rustbuffer_free: (_: Uint8Array): void => {},+});+const nativeModule = () => _nativeModule;+const uniffiCaller = new UniffiRustCaller(() => new wasmBundle.RustCallStatus());++const uniffiIsDebug =+ // @ts-ignore -- The process global might not be defined+ typeof process !== "object" ||+ // @ts-ignore -- The process global might not be defined+ process?.env?.NODE_ENV !== "production" ||+ false;++// Public interface members begin here.++const stringConverter = (() => {+ const encoder = new TextEncoder();+ const decoder = new TextDecoder();+ return {+ stringToBytes: (s: string) => encoder.encode(s),+ bytesToString: (ab: UniffiByteArray) => decoder.decode(ab),+ stringByteLength: (s: string) => encoder.encode(s).byteLength,+ writeStringIntoBuffer: (s: string, buf: any, offset: number): number => {+ const view = new Uint8Array(+ buf.arrayBuffer,+ offset,+ buf.arrayBuffer.byteLength - offset,+ );+ return encoder.encodeInto(s, view).written;+ },+ readStringFromBuffer: (buf: any, offset: number, length: number): string =>+ decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length)),+ };+})();+const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);++export type ResourceMetadata = {+ namespace: string,+ name: string,+ labels?: Map<string, string>+}++/**+ * Generated factory for {@link ResourceMetadata} record objects.+ */+export const ResourceMetadata = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<ResourceMetadata, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<ResourceMetadata>,+ });+})();++const FfiConverterTypeResourceMetadata = (() => {+ type TypeName = ResourceMetadata;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ namespace: FfiConverterString.read(from),+ name: FfiConverterString.read(from),+ labels: FfiConverterOptionalMapStringString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.namespace, into);+ FfiConverterString.write(value.name, into);+ FfiConverterOptionalMapStringString.write(value.labels, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.namespace) ++ FfiConverterString.allocationSize(value.name) ++ FfiConverterOptionalMapStringString.allocationSize(value.labels);++ }+ };+ return new FFIConverter();+})();++export type Claim = {+ apiVersion: string,+ kind: string,+ metadata: ResourceMetadata,+ spec: ClaimSpec,+ status?: OsGymSandboxClaimStatus+}++/**+ * Generated factory for {@link Claim} record objects.+ */+export const Claim = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<Claim, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<Claim>,+ });+})();++const FfiConverterTypeClaim = (() => {+ type TypeName = Claim;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ apiVersion: FfiConverterString.read(from),+ kind: FfiConverterString.read(from),+ metadata: FfiConverterTypeResourceMetadata.read(from),+ spec: FfiConverterTypeClaimSpec.read(from),+ status: FfiConverterOptionalTypeOSGymSandboxClaimStatus.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.apiVersion, into);+ FfiConverterString.write(value.kind, into);+ FfiConverterTypeResourceMetadata.write(value.metadata, into);+ FfiConverterTypeClaimSpec.write(value.spec, into);+ FfiConverterOptionalTypeOSGymSandboxClaimStatus.write(value.status, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.apiVersion) ++ FfiConverterString.allocationSize(value.kind) ++ FfiConverterTypeResourceMetadata.allocationSize(value.metadata) ++ FfiConverterTypeClaimSpec.allocationSize(value.spec) ++ FfiConverterOptionalTypeOSGymSandboxClaimStatus.allocationSize(value.status);++ }+ };+ return new FFIConverter();+})();++/**+ * UniFFI cannot emit aliases for external record types. Generated bindings use+ * `OSGymWorkspacePoolStatus` and `OSGymSandboxClaimStatus` from cyclops_sdk_schema.+ */+export type Pool = {+ apiVersion: string,+ kind: string,+ metadata: ResourceMetadata,+ spec: PoolSpec,+ status?: OsGymWorkspacePoolStatus+}++/**+ * Generated factory for {@link Pool} record objects.+ */+export const Pool = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<Pool, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<Pool>,+ });+})();++const FfiConverterTypePool = (() => {+ type TypeName = Pool;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ apiVersion: FfiConverterString.read(from),+ kind: FfiConverterString.read(from),+ metadata: FfiConverterTypeResourceMetadata.read(from),+ spec: FfiConverterTypePoolSpec.read(from),+ status: FfiConverterOptionalTypeOSGymWorkspacePoolStatus.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.apiVersion, into);+ FfiConverterString.write(value.kind, into);+ FfiConverterTypeResourceMetadata.write(value.metadata, into);+ FfiConverterTypePoolSpec.write(value.spec, into);+ FfiConverterOptionalTypeOSGymWorkspacePoolStatus.write(value.status, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.apiVersion) ++ FfiConverterString.allocationSize(value.kind) ++ FfiConverterTypeResourceMetadata.allocationSize(value.metadata) ++ FfiConverterTypePoolSpec.allocationSize(value.spec) ++ FfiConverterOptionalTypeOSGymWorkspacePoolStatus.allocationSize(value.status);++ }+ };+ return new FFIConverter();+})();++export type CreateClaimRequest = {+ pool: Pool,+ spec?: ClaimSpec+}++/**+ * Generated factory for {@link CreateClaimRequest} record objects.+ */+export const CreateClaimRequest = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<CreateClaimRequest, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<CreateClaimRequest>,+ });+})();++const FfiConverterTypeCreateClaimRequest = (() => {+ type TypeName = CreateClaimRequest;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ pool: FfiConverterTypePool.read(from),+ spec: FfiConverterOptionalTypeClaimSpec.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterTypePool.write(value.pool, into);+ FfiConverterOptionalTypeClaimSpec.write(value.spec, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterTypePool.allocationSize(value.pool) ++ FfiConverterOptionalTypeClaimSpec.allocationSize(value.spec);++ }+ };+ return new FFIConverter();+})();++export type CreatePoolRequest = {+ namespace: string,+ spec: PoolSpec+}++/**+ * Generated factory for {@link CreatePoolRequest} record objects.+ */+export const CreatePoolRequest = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<CreatePoolRequest, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<CreatePoolRequest>,+ });+})();++const FfiConverterTypeCreatePoolRequest = (() => {+ type TypeName = CreatePoolRequest;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ namespace: FfiConverterString.read(from),+ spec: FfiConverterTypePoolSpec.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.namespace, into);+ FfiConverterTypePoolSpec.write(value.spec, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.namespace) ++ FfiConverterTypePoolSpec.allocationSize(value.spec);++ }+ };+ return new FFIConverter();+})();++export interface CyclopsCredentialsLike {++}+/**+ * @deprecated Use `CyclopsCredentialsLike` instead.+ */+export type CyclopsCredentialsInterface = CyclopsCredentialsLike;+++export class CyclopsCredentials extends UniffiAbstractObject implements CyclopsCredentialsLike {++ readonly [uniffiTypeNameSymbol] = "CyclopsCredentials";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor(clientId: string, clientSecret: string) {+ super();+ const pointer =+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(+ FfiConverterString.lower(clientId, nativeModule().rustbuffer_alloc),+ FfiConverterString.lower(clientSecret, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] = uniffiTypeCyclopsCredentialsObjectFactory.bless(pointer);+ }++++++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer = uniffiTypeCyclopsCredentialsObjectFactory.pointer(this);+ uniffiTypeCyclopsCredentialsObjectFactory.freePointer(pointer);+ uniffiTypeCyclopsCredentialsObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is CyclopsCredentials {+ return uniffiTypeCyclopsCredentialsObjectFactory.isConcreteType(obj_);+ }+++}++const uniffiTypeCyclopsCredentialsObjectFactory: UniffiObjectFactory<CyclopsCredentialsLike> = (() => {++ /// <reference lib="es2021" />+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeCyclopsCredentialsObjectFactory.freePointer(heldValue);+ }) : null;++ return {+ create(pointer: UniffiHandle): CyclopsCredentialsLike {+ const instance = Object.create(CyclopsCredentials.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "CyclopsCredentials";+ 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_: CyclopsCredentialsLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: CyclopsCredentialsLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_fn_clone_cyclopscredentials(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_fn_free_cyclopscredentials(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ isConcreteType(obj_: any): obj_ is CyclopsCredentialsLike {+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "CyclopsCredentials";+ },+}})();+const FfiConverterTypeCyclopsCredentials = new FfiConverterObject(uniffiTypeCyclopsCredentialsObjectFactory);++export type CyclopsConfiguration = {+ baseUrl: string,+ tokenUrl: string,+ credentials: CyclopsCredentialsLike,+ poolPollIntervalMs: bigint,+ poolPollLimit: number,+ claimPollIntervalMs: bigint,+ claimPollLimit: number+}++/**+ * Generated factory for {@link CyclopsConfiguration} record objects.+ */+export const CyclopsConfiguration = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<CyclopsConfiguration, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<CyclopsConfiguration>,+ });+})();++const FfiConverterTypeCyclopsConfiguration = (() => {+ type TypeName = CyclopsConfiguration;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ baseUrl: FfiConverterString.read(from),+ tokenUrl: FfiConverterString.read(from),+ credentials: FfiConverterTypeCyclopsCredentials.read(from),+ poolPollIntervalMs: FfiConverterUInt64.read(from),+ poolPollLimit: FfiConverterUInt32.read(from),+ claimPollIntervalMs: FfiConverterUInt64.read(from),+ claimPollLimit: FfiConverterUInt32.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.baseUrl, into);+ FfiConverterString.write(value.tokenUrl, into);+ FfiConverterTypeCyclopsCredentials.write(value.credentials, into);+ FfiConverterUInt64.write(value.poolPollIntervalMs, into);+ FfiConverterUInt32.write(value.poolPollLimit, into);+ FfiConverterUInt64.write(value.claimPollIntervalMs, into);+ FfiConverterUInt32.write(value.claimPollLimit, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.baseUrl) ++ FfiConverterString.allocationSize(value.tokenUrl) ++ FfiConverterTypeCyclopsCredentials.allocationSize(value.credentials) ++ FfiConverterUInt64.allocationSize(value.poolPollIntervalMs) ++ FfiConverterUInt32.allocationSize(value.poolPollLimit) ++ FfiConverterUInt64.allocationSize(value.claimPollIntervalMs) ++ FfiConverterUInt32.allocationSize(value.claimPollLimit);++ }+ };+ return new FFIConverter();+})();++export type HttpHeader = {+ name: string,+ value: string+}++/**+ * Generated factory for {@link HttpHeader} record objects.+ */+export const HttpHeader = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<HttpHeader, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<HttpHeader>,+ });+})();++const FfiConverterTypeHttpHeader = (() => {+ type TypeName = HttpHeader;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ name: FfiConverterString.read(from),+ value: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.name, into);+ FfiConverterString.write(value.value, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.name) ++ FfiConverterString.allocationSize(value.value);++ }+ };+ return new FFIConverter();+})();++export type HttpRequest = {+ method: string,+ url: string,+ headers: Array<HttpHeader>,+ body?: ArrayBuffer+}++/**+ * Generated factory for {@link HttpRequest} record objects.+ */+export const HttpRequest = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<HttpRequest, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<HttpRequest>,+ });+})();++const FfiConverterTypeHttpRequest = (() => {+ type TypeName = HttpRequest;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ method: FfiConverterString.read(from),+ url: FfiConverterString.read(from),+ headers: FfiConverterSequenceTypeHttpHeader.read(from),+ body: FfiConverterOptionalBytes.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.method, into);+ FfiConverterString.write(value.url, into);+ FfiConverterSequenceTypeHttpHeader.write(value.headers, into);+ FfiConverterOptionalBytes.write(value.body, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.method) ++ FfiConverterString.allocationSize(value.url) ++ FfiConverterSequenceTypeHttpHeader.allocationSize(value.headers) ++ FfiConverterOptionalBytes.allocationSize(value.body);++ }+ };+ return new FFIConverter();+})();++export type HttpResponse = {+ status: number,+ headers: Array<HttpHeader>,+ body: ArrayBuffer+}++/**+ * Generated factory for {@link HttpResponse} record objects.+ */+export const HttpResponse = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<HttpResponse, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<HttpResponse>,+ });+})();++const FfiConverterTypeHttpResponse = (() => {+ type TypeName = HttpResponse;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ status: FfiConverterUInt16.read(from),+ headers: FfiConverterSequenceTypeHttpHeader.read(from),+ body: FfiConverterArrayBuffer.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterUInt16.write(value.status, into);+ FfiConverterSequenceTypeHttpHeader.write(value.headers, into);+ FfiConverterArrayBuffer.write(value.body, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterUInt16.allocationSize(value.status) ++ FfiConverterSequenceTypeHttpHeader.allocationSize(value.headers) ++ FfiConverterArrayBuffer.allocationSize(value.body);++ }+ };+ return new FFIConverter();+})();++export type Sandbox = {+ namespace: string,+ claim: string,+ name: string,+ services: Array<string>+}++/**+ * Generated factory for {@link Sandbox} record objects.+ */+export const Sandbox = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<Sandbox, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<Sandbox>,+ });+})();++const FfiConverterTypeSandbox = (() => {+ type TypeName = Sandbox;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ namespace: FfiConverterString.read(from),+ claim: FfiConverterString.read(from),+ name: FfiConverterString.read(from),+ services: FfiConverterSequenceString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.namespace, into);+ FfiConverterString.write(value.claim, into);+ FfiConverterString.write(value.name, into);+ FfiConverterSequenceString.write(value.services, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.namespace) ++ FfiConverterString.allocationSize(value.claim) ++ FfiConverterString.allocationSize(value.name) ++ FfiConverterSequenceString.allocationSize(value.services);++ }+ };+ return new FFIConverter();+})();+++// Error type: HttpError+export enum HttpError_Tags {+ Transport = "Transport"+}+export const HttpError = (() => {++ type Transport__interface = {+ tag: HttpError_Tags.Transport;+ inner:+Readonly<{reason: string}>+ };+ class Transport_ extends UniffiError implements Transport__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "HttpError";+ readonly tag = HttpError_Tags.Transport;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("HttpError", "Transport");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Transport_ {+ return new Transport_(inner);+ }++ static instanceOf(obj: any): obj is Transport_ {+ return obj.tag === HttpError_Tags.Transport;+ }+ static hasInner(obj: any): obj is Transport_ {+ return Transport_.instanceOf(obj);+ }++ static getInner(obj: Transport_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ function instanceOf(obj: any): obj is HttpError {+ return obj[uniffiTypeNameSymbol] === "HttpError";+ }++ return Object.freeze({+ instanceOf,+ Transport: Transport_+ });++})();+export type HttpError = InstanceType<+ typeof HttpError['Transport']+>;++// FfiConverter for enum HttpError+const FfiConverterTypeHttpError = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = HttpError;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return new HttpError.Transport({reason: FfiConverterString.read(from) });+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value.tag) {+ case HttpError_Tags.Transport: {+ ordinalConverter.write(1, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ default:+ // Throwing from here means that HttpError_Tags hasn't matched an ordinal.+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ allocationSize(value: TypeName): number {+ switch (value.tag) {+ case HttpError_Tags.Transport: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(1);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ }+ return new FFIConverter();+})();+++// Error type: SdkError+export enum SdkError_Tags {+ Configuration = "Configuration",+ InvalidResourceName = "InvalidResourceName",+ Transport = "Transport",+ Token = "Token",+ Body = "Body",+ Status = "Status",+ UnknownService = "UnknownService",+ InvalidServicePath = "InvalidServicePath",+ ClaimFailed = "ClaimFailed",+ ClaimTimeout = "ClaimTimeout"+}+export const SdkError = (() => {++ type Configuration__interface = {+ tag: SdkError_Tags.Configuration;+ inner:+Readonly<{reason: string}>+ };+ class Configuration_ extends UniffiError implements Configuration__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.Configuration;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("SdkError", "Configuration");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Configuration_ {+ return new Configuration_(inner);+ }++ static instanceOf(obj: any): obj is Configuration_ {+ return obj.tag === SdkError_Tags.Configuration;+ }+ static hasInner(obj: any): obj is Configuration_ {+ return Configuration_.instanceOf(obj);+ }++ static getInner(obj: Configuration_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ type InvalidResourceName__interface = {+ tag: SdkError_Tags.InvalidResourceName;+ inner:+Readonly<{field: string; value: string; reason: string}>+ };+ class InvalidResourceName_ extends UniffiError implements InvalidResourceName__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.InvalidResourceName;+ readonly inner:+Readonly<{field: string; value: string; reason: string}>;+ constructor(+inner: {field: string; value: string; reason: string }) {+ super("SdkError", "InvalidResourceName");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {field: string; value: string; reason: string }): InvalidResourceName_ {+ return new InvalidResourceName_(inner);+ }++ static instanceOf(obj: any): obj is InvalidResourceName_ {+ return obj.tag === SdkError_Tags.InvalidResourceName;+ }+ static hasInner(obj: any): obj is InvalidResourceName_ {+ return InvalidResourceName_.instanceOf(obj);+ }++ static getInner(obj: InvalidResourceName_):+Readonly<{field: string; value: string; reason: string}> {+ return obj.inner;+ }++ }++ type Transport__interface = {+ tag: SdkError_Tags.Transport;+ inner:+Readonly<{reason: string}>+ };+ class Transport_ extends UniffiError implements Transport__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.Transport;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("SdkError", "Transport");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Transport_ {+ return new Transport_(inner);+ }++ static instanceOf(obj: any): obj is Transport_ {+ return obj.tag === SdkError_Tags.Transport;+ }+ static hasInner(obj: any): obj is Transport_ {+ return Transport_.instanceOf(obj);+ }++ static getInner(obj: Transport_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ type Token__interface = {+ tag: SdkError_Tags.Token;+ inner:+Readonly<{reason: string}>+ };+ class Token_ extends UniffiError implements Token__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.Token;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("SdkError", "Token");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Token_ {+ return new Token_(inner);+ }++ static instanceOf(obj: any): obj is Token_ {+ return obj.tag === SdkError_Tags.Token;+ }+ static hasInner(obj: any): obj is Token_ {+ return Token_.instanceOf(obj);+ }++ static getInner(obj: Token_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ type Body__interface = {+ tag: SdkError_Tags.Body;+ inner:+Readonly<{reason: string}>+ };+ class Body_ extends UniffiError implements Body__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.Body;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("SdkError", "Body");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Body_ {+ return new Body_(inner);+ }++ static instanceOf(obj: any): obj is Body_ {+ return obj.tag === SdkError_Tags.Body;+ }+ static hasInner(obj: any): obj is Body_ {+ return Body_.instanceOf(obj);+ }++ static getInner(obj: Body_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ type Status__interface = {+ tag: SdkError_Tags.Status;+ inner:+Readonly<{operation: string; status: number; body: string}>+ };+ class Status_ extends UniffiError implements Status__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.Status;+ readonly inner:+Readonly<{operation: string; status: number; body: string}>;+ constructor(+inner: {operation: string; status: number; body: string }) {+ super("SdkError", "Status");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {operation: string; status: number; body: string }): Status_ {+ return new Status_(inner);+ }++ static instanceOf(obj: any): obj is Status_ {+ return obj.tag === SdkError_Tags.Status;+ }+ static hasInner(obj: any): obj is Status_ {+ return Status_.instanceOf(obj);+ }++ static getInner(obj: Status_):+Readonly<{operation: string; status: number; body: string}> {+ return obj.inner;+ }++ }++ type UnknownService__interface = {+ tag: SdkError_Tags.UnknownService;+ inner:+Readonly<{requested: string; available: Array<string>}>+ };+ class UnknownService_ extends UniffiError implements UnknownService__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.UnknownService;+ readonly inner:+Readonly<{requested: string; available: Array<string>}>;+ constructor(+inner: {requested: string; available: Array<string> }) {+ super("SdkError", "UnknownService");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {requested: string; available: Array<string> }): UnknownService_ {+ return new UnknownService_(inner);+ }++ static instanceOf(obj: any): obj is UnknownService_ {+ return obj.tag === SdkError_Tags.UnknownService;+ }+ static hasInner(obj: any): obj is UnknownService_ {+ return UnknownService_.instanceOf(obj);+ }++ static getInner(obj: UnknownService_):+Readonly<{requested: string; available: Array<string>}> {+ return obj.inner;+ }++ }++ type InvalidServicePath__interface = {+ tag: SdkError_Tags.InvalidServicePath;+ inner:+Readonly<{path: string}>+ };+ class InvalidServicePath_ extends UniffiError implements InvalidServicePath__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.InvalidServicePath;+ readonly inner:+Readonly<{path: string}>;+ constructor(+inner: {path: string }) {+ super("SdkError", "InvalidServicePath");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {path: string }): InvalidServicePath_ {+ return new InvalidServicePath_(inner);+ }++ static instanceOf(obj: any): obj is InvalidServicePath_ {+ return obj.tag === SdkError_Tags.InvalidServicePath;+ }+ static hasInner(obj: any): obj is InvalidServicePath_ {+ return InvalidServicePath_.instanceOf(obj);+ }++ static getInner(obj: InvalidServicePath_):+Readonly<{path: string}> {+ return obj.inner;+ }++ }++ type ClaimFailed__interface = {+ tag: SdkError_Tags.ClaimFailed;+ inner:+Readonly<{phase: string; status: string}>+ };+ class ClaimFailed_ extends UniffiError implements ClaimFailed__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.ClaimFailed;+ readonly inner:+Readonly<{phase: string; status: string}>;+ constructor(+inner: {phase: string; status: string }) {+ super("SdkError", "ClaimFailed");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {phase: string; status: string }): ClaimFailed_ {+ return new ClaimFailed_(inner);+ }++ static instanceOf(obj: any): obj is ClaimFailed_ {+ return obj.tag === SdkError_Tags.ClaimFailed;+ }+ static hasInner(obj: any): obj is ClaimFailed_ {+ return ClaimFailed_.instanceOf(obj);+ }++ static getInner(obj: ClaimFailed_):+Readonly<{phase: string; status: string}> {+ return obj.inner;+ }++ }++ type ClaimTimeout__interface = {+ tag: SdkError_Tags.ClaimTimeout+ };+ class ClaimTimeout_ extends UniffiError implements ClaimTimeout__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.ClaimTimeout;+ constructor() {+ super("SdkError", "ClaimTimeout");+ }++ static new(): ClaimTimeout_ {+ return new ClaimTimeout_();+ }++ static instanceOf(obj: any): obj is ClaimTimeout_ {+ return obj.tag === SdkError_Tags.ClaimTimeout;+ }+ static hasInner(obj: any): obj is ClaimTimeout_ {+ return false;+ }++ }++ function instanceOf(obj: any): obj is SdkError {+ return obj[uniffiTypeNameSymbol] === "SdkError";+ }++ return Object.freeze({+ instanceOf,+ Configuration: Configuration_,+ InvalidResourceName: InvalidResourceName_,+ Transport: Transport_,+ Token: Token_,+ Body: Body_,+ Status: Status_,+ UnknownService: UnknownService_,+ InvalidServicePath: InvalidServicePath_,+ ClaimFailed: ClaimFailed_,+ ClaimTimeout: ClaimTimeout_+ });++})();+export type SdkError = InstanceType<+ typeof SdkError['Configuration' | 'InvalidResourceName' | 'Transport' | 'Token' | 'Body' | 'Status' | 'UnknownService' | 'InvalidServicePath' | 'ClaimFailed' | 'ClaimTimeout']+>;++// FfiConverter for enum SdkError+const FfiConverterTypeSdkError = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = SdkError;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return new SdkError.Configuration({reason: FfiConverterString.read(from) });+ case 2: return new SdkError.InvalidResourceName({field: FfiConverterString.read(from), value: FfiConverterString.read(from), reason: FfiConverterString.read(from) });+ case 3: return new SdkError.Transport({reason: FfiConverterString.read(from) });+ case 4: return new SdkError.Token({reason: FfiConverterString.read(from) });+ case 5: return new SdkError.Body({reason: FfiConverterString.read(from) });+ case 6: return new SdkError.Status({operation: FfiConverterString.read(from), status: FfiConverterUInt16.read(from), body: FfiConverterString.read(from) });+ case 7: return new SdkError.UnknownService({requested: FfiConverterString.read(from), available: FfiConverterSequenceString.read(from) });+ case 8: return new SdkError.InvalidServicePath({path: FfiConverterString.read(from) });+ case 9: return new SdkError.ClaimFailed({phase: FfiConverterString.read(from), status: FfiConverterString.read(from) });+ case 10: return new SdkError.ClaimTimeout();+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value.tag) {+ case SdkError_Tags.Configuration: {+ ordinalConverter.write(1, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ case SdkError_Tags.InvalidResourceName: {+ ordinalConverter.write(2, into);+ const inner = value.inner;+ FfiConverterString.write(inner.field, into);+ FfiConverterString.write(inner.value, into);+ FfiConverterString.write(inner.reason, into);+ return;+ }+ case SdkError_Tags.Transport: {+ ordinalConverter.write(3, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ case SdkError_Tags.Token: {+ ordinalConverter.write(4, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ case SdkError_Tags.Body: {+ ordinalConverter.write(5, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ case SdkError_Tags.Status: {+ ordinalConverter.write(6, into);+ const inner = value.inner;+ FfiConverterString.write(inner.operation, into);+ FfiConverterUInt16.write(inner.status, into);+ FfiConverterString.write(inner.body, into);+ return;+ }+ case SdkError_Tags.UnknownService: {+ ordinalConverter.write(7, into);+ const inner = value.inner;+ FfiConverterString.write(inner.requested, into);+ FfiConverterSequenceString.write(inner.available, into);+ return;+ }+ case SdkError_Tags.InvalidServicePath: {+ ordinalConverter.write(8, into);+ const inner = value.inner;+ FfiConverterString.write(inner.path, into);+ return;+ }+ case SdkError_Tags.ClaimFailed: {+ ordinalConverter.write(9, into);+ const inner = value.inner;+ FfiConverterString.write(inner.phase, into);+ FfiConverterString.write(inner.status, into);+ return;+ }+ case SdkError_Tags.ClaimTimeout: {+ ordinalConverter.write(10, into);+ return;+ }+ default:+ // Throwing from here means that SdkError_Tags hasn't matched an ordinal.+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ allocationSize(value: TypeName): number {+ switch (value.tag) {+ case SdkError_Tags.Configuration: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(1);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ case SdkError_Tags.InvalidResourceName: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(2);+ size += FfiConverterString.allocationSize(inner.field);+ size += FfiConverterString.allocationSize(inner.value);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ case SdkError_Tags.Transport: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(3);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ case SdkError_Tags.Token: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(4);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ case SdkError_Tags.Body: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(5);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ case SdkError_Tags.Status: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(6);+ size += FfiConverterString.allocationSize(inner.operation);+ size += FfiConverterUInt16.allocationSize(inner.status);+ size += FfiConverterString.allocationSize(inner.body);+ return size;+ }+ case SdkError_Tags.UnknownService: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(7);+ size += FfiConverterString.allocationSize(inner.requested);+ size += FfiConverterSequenceString.allocationSize(inner.available);+ return size;+ }+ case SdkError_Tags.InvalidServicePath: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(8);+ size += FfiConverterString.allocationSize(inner.path);+ return size;+ }+ case SdkError_Tags.ClaimFailed: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(9);+ size += FfiConverterString.allocationSize(inner.phase);+ size += FfiConverterString.allocationSize(inner.status);+ return size;+ }+ case SdkError_Tags.ClaimTimeout: {+ return ordinalConverter.allocationSize(10);+ }+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ }+ return new FFIConverter();+})();++export interface CyclopsClientLike {++ createClaim(request: CreateClaimRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Claim>;+ createPool(request: CreatePoolRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Pool>;+ deleteClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;+ deletePool(pool: Pool, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;+ getClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Claim>;+ getPool(pool: Pool, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Pool>;+ listClaims(namespace: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Array<Claim>>;+ listPools(namespace: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Array<Pool>>;+ serviceRequest(sandbox: Sandbox, service: string, path: string, request: HttpRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<HttpResponse>;+ updatePool(pool: Pool, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Pool>;+ 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),+ ));+ }++++ async createClaim(request: CreateClaimRequest, asyncOpts_?: { signal: AbortSignal }): Promise<Claim> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeCreateClaimRequest.lower(request, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeClaim.lift.bind(FfiConverterTypeClaim),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }++ async createPool(request: CreatePoolRequest, asyncOpts_?: { signal: AbortSignal }): Promise<Pool> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeCreatePoolRequest.lower(request, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypePool.lift.bind(FfiConverterTypePool),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }++ async deleteClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeClaim.lower(claim, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_void,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_void,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_void,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_void,+ /*liftFunc:*/ (_v) => {},+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }++ async deletePool(pool: Pool, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypePool.lower(pool, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_void,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_void,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_void,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_void,+ /*liftFunc:*/ (_v) => {},+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }++ async getClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }): Promise<Claim> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeClaim.lower(claim, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeClaim.lift.bind(FfiConverterTypeClaim),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }++ async getPool(pool: Pool, asyncOpts_?: { signal: AbortSignal }): Promise<Pool> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypePool.lower(pool, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypePool.lift.bind(FfiConverterTypePool),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }++ async listClaims(namespace: string, asyncOpts_?: { signal: AbortSignal }): Promise<Array<Claim>> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterString.lower(namespace, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterSequenceTypeClaim.lift.bind(FfiConverterSequenceTypeClaim),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }++ async listPools(namespace: string, asyncOpts_?: { signal: AbortSignal }): Promise<Array<Pool>> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterString.lower(namespace, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterSequenceTypePool.lift.bind(FfiConverterSequenceTypePool),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }++ async serviceRequest(sandbox: Sandbox, service: string, path: string, request: HttpRequest, asyncOpts_?: { signal: AbortSignal }): Promise<HttpResponse> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeSandbox.lower(sandbox, nativeModule().rustbuffer_alloc),FfiConverterString.lower(service, nativeModule().rustbuffer_alloc),FfiConverterString.lower(path, nativeModule().rustbuffer_alloc),FfiConverterTypeHttpRequest.lower(request, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeHttpResponse.lift.bind(FfiConverterTypeHttpResponse),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }++ async updatePool(pool: Pool, asyncOpts_?: { signal: AbortSignal }): Promise<Pool> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypePool.lower(pool, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypePool.lift.bind(FfiConverterTypePool),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }++ async waitClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }): Promise<Sandbox> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeClaim.lower(claim, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeSandbox.lift.bind(FfiConverterTypeSandbox),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ }+++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer = uniffiTypeCyclopsClientObjectFactory.pointer(this);+ uniffiTypeCyclopsClientObjectFactory.freePointer(pointer);+ uniffiTypeCyclopsClientObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ 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 HttpClient {++ execute(request: HttpRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<HttpResponse>;+}+++export class HttpClientImpl extends UniffiAbstractObject implements HttpClient {++ readonly [uniffiTypeNameSymbol] = "HttpClientImpl";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ // No primary constructor declared for this class.+private constructor(pointer: UniffiHandle) {+ super();+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] = uniffiTypeHttpClientImplObjectFactory.bless(pointer);+}+++++ async execute(request: HttpRequest, asyncOpts_?: { signal: AbortSignal }): Promise<HttpResponse> /*throws*/ {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_fn_method_httpclient_execute(+ uniffiTypeHttpClientImplObjectFactory.clonePointer(this),FfiConverterTypeHttpRequest.lower(request, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ubrn_ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeHttpResponse.lift.bind(FfiConverterTypeHttpResponse),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeHttpError.lift.bind(FfiConverterTypeHttpError)+ );+ }+++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ 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+ );+ },+};++// FfiConverter for Map<string, string>+const FfiConverterMapStringString = new FfiConverterMap(FfiConverterString, FfiConverterString);++// FfiConverter for Map<string, string> | undefined+const FfiConverterOptionalMapStringString = new FfiConverterOptional(FfiConverterMapStringString);++// FfiConverter for OsGymSandboxClaimStatus | undefined+const FfiConverterOptionalTypeOSGymSandboxClaimStatus = new FfiConverterOptional(FfiConverterTypeOSGymSandboxClaimStatus);++// FfiConverter for OsGymWorkspacePoolStatus | undefined+const FfiConverterOptionalTypeOSGymWorkspacePoolStatus = new FfiConverterOptional(FfiConverterTypeOSGymWorkspacePoolStatus);++// FfiConverter for ClaimSpec | undefined+const FfiConverterOptionalTypeClaimSpec = new FfiConverterOptional(FfiConverterTypeClaimSpec);++// FfiConverter for Array<HttpHeader>+const FfiConverterSequenceTypeHttpHeader = new FfiConverterArray(FfiConverterTypeHttpHeader);++// FfiConverter for ArrayBuffer | undefined+const FfiConverterOptionalBytes = new FfiConverterOptional(FfiConverterArrayBuffer);++// FfiConverter for Array<string>+const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);++// FfiConverter for Array<Claim>+const FfiConverterSequenceTypeClaim = new FfiConverterArray(FfiConverterTypeClaim);++// FfiConverter for Array<Pool>+const FfiConverterSequenceTypePool = new FfiConverterArray(FfiConverterTypePool);+++/**+ * This should be called before anything else.+ *+ * It is likely that this is being done for you by the library's `index.ts`.+ *+ * It checks versions of uniffi between when the Rust scaffolding was generated+ * and when the bindings were generated.+ *+ * It also initializes the machinery to enable Rust to talk back to Javascript.+ */+function uniffiEnsureInitialized() {+ // Get the bindings contract version from our ComponentInterface+ const bindingsContractVersion = 30;+ // Get the scaffolding contract version by calling the into the dylib+ const scaffoldingContractVersion = nativeModule().ubrn_ffi_cyclops_sdk_uniffi_contract_version();+ if (bindingsContractVersion !== scaffoldingContractVersion) {+ throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() !== 54404) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim() !== 23330) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() !== 48557) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim() !== 20460) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() !== 31235) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim() !== 17760) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool() !== 43327) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims() !== 7802) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() !== 27984) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() !== 46699) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() !== 17695) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim() !== 18984) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() !== 25746) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_checksum_method_httpclient_execute() !== 38803) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_httpclient_execute");+ }++ uniffiCallbackInterfaceHttpClient.register();+ }++export default Object.freeze({+ initialize: uniffiEnsureInitialized,+ converters: {+ FfiConverterTypeClaim,+ FfiConverterTypeCreateClaimRequest,+ FfiConverterTypeCreatePoolRequest,+ FfiConverterTypeCyclopsClient,+ FfiConverterTypeCyclopsConfiguration,+ FfiConverterTypeCyclopsCredentials,+ FfiConverterTypeHttpClient,+ FfiConverterTypeHttpError,+ FfiConverterTypeHttpHeader,+ FfiConverterTypeHttpRequest,+ FfiConverterTypeHttpResponse,+ FfiConverterTypePool,+ FfiConverterTypeResourceMetadata,+ FfiConverterTypeSandbox,+ FfiConverterTypeSdkError,+ }+});\ No newline at end of filediff --git a/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk_schema-ffi.ts b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk_schema-ffi.tsnew file mode 100644index 0000000000..9641a3965d--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk_schema-ffi.ts@@ -0,0 +1,14 @@+// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.+// Trust me, you don't want to mess with it!++/* tslint:disable */+/* eslint-disable */+// @ts-nocheck++// Structs and function types for calling back into Typescript from Rust.+export type UniffiRustFutureContinuationCallback = (data: bigint, pollResult: number) => void;+export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void;+export type UniffiForeignFutureDroppedCallbackStruct = {+ handle: bigint;+ free: UniffiForeignFutureDroppedCallback;+};\ No newline at end of filediff --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.tsnew file mode 100644index 0000000000..416fa1fefc--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi-browser/ts/cyclops_sdk_schema.ts@@ -0,0 +1,1498 @@+// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.+// Trust me, you don't want to mess with it!+/* tslint:disable */+/* eslint-disable */+// @ts-nocheck+import * as wasmBundle from "./wasm-bindgen/index.js";+import { type UniffiRustFutureContinuationCallback, type UniffiForeignFutureDroppedCallback, type UniffiForeignFutureDroppedCallbackStruct,+} from "./cyclops_sdk_schema-ffi";+import { type FfiConverter, type UniffiByteArray, type UniffiGcObject, type UniffiHandle, type UniffiObjectFactory, AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterInt32, FfiConverterMap, FfiConverterObject, FfiConverterOptional, FfiConverterUInt16, FfiConverterUInt32, FfiConverterUInt64, FfiConverterUInt8, RustBuffer, UniffiAbstractObject, UniffiEnum, UniffiError, UniffiInternalError, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiTypeNameSymbol, variantOrdinalSymbol,+} from "@ubjs/core";+// wasm1: wrap the wasm-bindgen namespace once so the codegen call sites can+// uniformly reference `nativeModule().rustbuffer_alloc` / `.rustbuffer_free`.+// For wasm1, RustBuffers are plain JS Uint8Arrays — no Rust-side allocation+// is involved, so alloc just hands back a fresh view and free is a no-op.+const _nativeModule = Object.assign({}, wasmBundle, {+ rustbuffer_alloc: (n: number): Uint8Array => new Uint8Array(n),+ rustbuffer_free: (_: Uint8Array): void => {},+});+const nativeModule = () => _nativeModule;+const uniffiCaller = new UniffiRustCaller(() => new wasmBundle.RustCallStatus());++const uniffiIsDebug =+ // @ts-ignore -- The process global might not be defined+ typeof process !== "object" ||+ // @ts-ignore -- The process global might not be defined+ process?.env?.NODE_ENV !== "production" ||+ false;++// Public interface members begin here.++const stringConverter = (() => {+ const encoder = new TextEncoder();+ const decoder = new TextDecoder();+ return {+ stringToBytes: (s: string) => encoder.encode(s),+ bytesToString: (ab: UniffiByteArray) => decoder.decode(ab),+ stringByteLength: (s: string) => encoder.encode(s).byteLength,+ writeStringIntoBuffer: (s: string, buf: any, offset: number): number => {+ const view = new Uint8Array(+ buf.arrayBuffer,+ offset,+ buf.arrayBuffer.byteLength - offset,+ );+ return encoder.encodeInto(s, view).written;+ },+ readStringFromBuffer: (buf: any, offset: number, length: number): string =>+ decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length)),+ };+})();+const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);++export type ClaimLifecycle = {+ shutdownTime?: string,+ shutdownPolicy?: string,+ autoRenew?: boolean+}++/**+ * Generated factory for {@link ClaimLifecycle} record objects.+ */+export const ClaimLifecycle = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<ClaimLifecycle, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<ClaimLifecycle>,+ });+})();++const FfiConverterTypeClaimLifecycle = (() => {+ type TypeName = ClaimLifecycle;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ shutdownTime: FfiConverterOptionalString.read(from),+ shutdownPolicy: FfiConverterOptionalString.read(from),+ autoRenew: FfiConverterOptionalBoolean.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.shutdownTime, into);+ FfiConverterOptionalString.write(value.shutdownPolicy, into);+ FfiConverterOptionalBoolean.write(value.autoRenew, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.shutdownTime) ++ FfiConverterOptionalString.allocationSize(value.shutdownPolicy) ++ FfiConverterOptionalBoolean.allocationSize(value.autoRenew);++ }+ };+ return new FFIConverter();+})();++export type SandboxTemplateRef = {+ name: string+}++/**+ * Generated factory for {@link SandboxTemplateRef} record objects.+ */+export const SandboxTemplateRef = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<SandboxTemplateRef, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<SandboxTemplateRef>,+ });+})();++const FfiConverterTypeSandboxTemplateRef = (() => {+ type TypeName = SandboxTemplateRef;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ name: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.name, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.name);++ }+ };+ return new FFIConverter();+})();++export type ClaimSpec = {+ sandboxTemplateRef: SandboxTemplateRef,+ warmpool?: string,+ bindDeadline?: number,+ lifecycle?: ClaimLifecycle+}++/**+ * Generated factory for {@link ClaimSpec} record objects.+ */+export const ClaimSpec = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<ClaimSpec, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<ClaimSpec>,+ });+})();++const FfiConverterTypeClaimSpec = (() => {+ type TypeName = ClaimSpec;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ sandboxTemplateRef: FfiConverterTypeSandboxTemplateRef.read(from),+ warmpool: FfiConverterOptionalString.read(from),+ bindDeadline: FfiConverterOptionalUInt32.read(from),+ lifecycle: FfiConverterOptionalTypeClaimLifecycle.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterTypeSandboxTemplateRef.write(value.sandboxTemplateRef, into);+ FfiConverterOptionalString.write(value.warmpool, into);+ FfiConverterOptionalUInt32.write(value.bindDeadline, into);+ FfiConverterOptionalTypeClaimLifecycle.write(value.lifecycle, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterTypeSandboxTemplateRef.allocationSize(value.sandboxTemplateRef) ++ FfiConverterOptionalString.allocationSize(value.warmpool) ++ FfiConverterOptionalUInt32.allocationSize(value.bindDeadline) ++ FfiConverterOptionalTypeClaimLifecycle.allocationSize(value.lifecycle);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxClaimCondition = {+ type?: string,+ status?: string,+ reason?: string,+ message?: string,+ lastTransitionTime?: string+}++/**+ * Generated factory for {@link OsGymSandboxClaimCondition} record objects.+ */+export const OsGymSandboxClaimCondition = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxClaimCondition, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxClaimCondition>,+ });+})();++const FfiConverterTypeOSGymSandboxClaimCondition = (() => {+ type TypeName = OsGymSandboxClaimCondition;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ type: FfiConverterOptionalString.read(from),+ status: FfiConverterOptionalString.read(from),+ reason: FfiConverterOptionalString.read(from),+ message: FfiConverterOptionalString.read(from),+ lastTransitionTime: FfiConverterOptionalString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.type, into);+ FfiConverterOptionalString.write(value.status, into);+ FfiConverterOptionalString.write(value.reason, into);+ FfiConverterOptionalString.write(value.message, into);+ FfiConverterOptionalString.write(value.lastTransitionTime, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.type) ++ FfiConverterOptionalString.allocationSize(value.status) ++ FfiConverterOptionalString.allocationSize(value.reason) ++ FfiConverterOptionalString.allocationSize(value.message) ++ FfiConverterOptionalString.allocationSize(value.lastTransitionTime);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxClaimSandbox = {+ name?: string,+ service?: string+}++/**+ * Generated factory for {@link OsGymSandboxClaimSandbox} record objects.+ */+export const OsGymSandboxClaimSandbox = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxClaimSandbox, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxClaimSandbox>,+ });+})();++const FfiConverterTypeOSGymSandboxClaimSandbox = (() => {+ type TypeName = OsGymSandboxClaimSandbox;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ name: FfiConverterOptionalString.read(from),+ service: FfiConverterOptionalString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.name, into);+ FfiConverterOptionalString.write(value.service, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.name) ++ FfiConverterOptionalString.allocationSize(value.service);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxClaimStatus = {+ phase?: string,+ conditions?: Array<OsGymSandboxClaimCondition>,+ sandbox?: OsGymSandboxClaimSandbox+}++/**+ * Generated factory for {@link OsGymSandboxClaimStatus} record objects.+ */+export const OsGymSandboxClaimStatus = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxClaimStatus, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxClaimStatus>,+ });+})();++const FfiConverterTypeOSGymSandboxClaimStatus = (() => {+ type TypeName = OsGymSandboxClaimStatus;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ phase: FfiConverterOptionalString.read(from),+ conditions: FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition.read(from),+ sandbox: FfiConverterOptionalTypeOSGymSandboxClaimSandbox.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.phase, into);+ FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition.write(value.conditions, into);+ FfiConverterOptionalTypeOSGymSandboxClaimSandbox.write(value.sandbox, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.phase) ++ FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition.allocationSize(value.conditions) ++ FfiConverterOptionalTypeOSGymSandboxClaimSandbox.allocationSize(value.sandbox);++ }+ };+ return new FFIConverter();+})();++export enum RuntimeKind {+ Kubevirt,+ Macos,+ Gvisor+}++const FfiConverterTypeRuntimeKind = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = RuntimeKind;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return RuntimeKind.Kubevirt;+ case 2: return RuntimeKind.Macos;+ case 3: return RuntimeKind.Gvisor;+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value) {+ case RuntimeKind.Kubevirt: return ordinalConverter.write(1, into);+ case RuntimeKind.Macos: return ordinalConverter.write(2, into);+ case RuntimeKind.Gvisor: return ordinalConverter.write(3, into);+ }+ }+ allocationSize(value: TypeName): number {+ return ordinalConverter.allocationSize(0);+ }+ }+ return new FFIConverter();+})();++export interface PreservedJsonLike {++ toJson(): string;+}+/**+ * @deprecated Use `PreservedJsonLike` instead.+ */+export type PreservedJsonInterface = PreservedJsonLike;+++export class PreservedJson extends UniffiAbstractObject implements PreservedJsonLike {++ readonly [uniffiTypeNameSymbol] = "PreservedJson";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ // No primary constructor declared for this class.+private constructor(pointer: UniffiHandle) {+ super();+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] = uniffiTypePreservedJsonObjectFactory.bless(pointer);+}+++ static fromJson(value: string): PreservedJsonLike /*throws*/ {+ return FfiConverterTypePreservedJson.lift(uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeJsonValueError.lift.bind(FfiConverterTypeJsonValueError),+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }++++ toJson(): string {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterString.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json(+ uniffiTypePreservedJsonObjectFactory.clonePointer(this),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }+++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer = uniffiTypePreservedJsonObjectFactory.pointer(this);+ uniffiTypePreservedJsonObjectFactory.freePointer(pointer);+ uniffiTypePreservedJsonObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is PreservedJson {+ return uniffiTypePreservedJsonObjectFactory.isConcreteType(obj_);+ }+++}++const uniffiTypePreservedJsonObjectFactory: UniffiObjectFactory<PreservedJsonLike> = (() => {++ /// <reference lib="es2021" />+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypePreservedJsonObjectFactory.freePointer(heldValue);+ }) : null;++ return {+ create(pointer: UniffiHandle): PreservedJsonLike {+ const instance = Object.create(PreservedJson.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "PreservedJson";+ 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_: PreservedJsonLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: PreservedJsonLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_preservedjson(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_preservedjson(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ isConcreteType(obj_: any): obj_ is PreservedJsonLike {+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "PreservedJson";+ },+}})();+const FfiConverterTypePreservedJson = new FfiConverterObject(uniffiTypePreservedJsonObjectFactory);++export enum ImagePullPolicy {+ Always,+ IfNotPresent,+ Never+}++const FfiConverterTypeImagePullPolicy = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = ImagePullPolicy;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return ImagePullPolicy.Always;+ case 2: return ImagePullPolicy.IfNotPresent;+ case 3: return ImagePullPolicy.Never;+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value) {+ case ImagePullPolicy.Always: return ordinalConverter.write(1, into);+ case ImagePullPolicy.IfNotPresent: return ordinalConverter.write(2, into);+ case ImagePullPolicy.Never: return ordinalConverter.write(3, into);+ }+ }+ allocationSize(value: TypeName): number {+ return ordinalConverter.allocationSize(0);+ }+ }+ return new FFIConverter();+})();++export enum Firmware {+ Bios,+ Efi+}++const FfiConverterTypeFirmware = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = Firmware;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return Firmware.Bios;+ case 2: return Firmware.Efi;+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value) {+ case Firmware.Bios: return ordinalConverter.write(1, into);+ case Firmware.Efi: return ordinalConverter.write(2, into);+ }+ }+ allocationSize(value: TypeName): number {+ return ordinalConverter.allocationSize(0);+ }+ }+ return new FFIConverter();+})();++export enum ServiceProtocol {+ Tcp,+ Udp+}++const FfiConverterTypeServiceProtocol = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = ServiceProtocol;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return ServiceProtocol.Tcp;+ case 2: return ServiceProtocol.Udp;+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value) {+ case ServiceProtocol.Tcp: return ordinalConverter.write(1, into);+ case ServiceProtocol.Udp: return ordinalConverter.write(2, into);+ }+ }+ allocationSize(value: TypeName): number {+ return ordinalConverter.allocationSize(0);+ }+ }+ return new FFIConverter();+})();++export type SandboxService = {+ name: string,+ targetPort: number,+ protocol?: ServiceProtocol+}++/**+ * Generated factory for {@link SandboxService} record objects.+ */+export const SandboxService = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<SandboxService, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<SandboxService>,+ });+})();++const FfiConverterTypeSandboxService = (() => {+ type TypeName = SandboxService;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ name: FfiConverterString.read(from),+ targetPort: FfiConverterUInt16.read(from),+ protocol: FfiConverterOptionalTypeServiceProtocol.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.name, into);+ FfiConverterUInt16.write(value.targetPort, into);+ FfiConverterOptionalTypeServiceProtocol.write(value.protocol, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.name) ++ FfiConverterUInt16.allocationSize(value.targetPort) ++ FfiConverterOptionalTypeServiceProtocol.allocationSize(value.protocol);++ }+ };+ return new FFIConverter();+})();++export type OidcConfig = {+ credentialsSecret: string,+ tokenUrl: string,+ awsRoleArn?: string,+ awsRegion?: string,+ refreshIntervalSeconds?: number+}++/**+ * Generated factory for {@link OidcConfig} record objects.+ */+export const OidcConfig = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OidcConfig, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OidcConfig>,+ });+})();++const FfiConverterTypeOidcConfig = (() => {+ type TypeName = OidcConfig;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ credentialsSecret: FfiConverterString.read(from),+ tokenUrl: FfiConverterString.read(from),+ awsRoleArn: FfiConverterOptionalString.read(from),+ awsRegion: FfiConverterOptionalString.read(from),+ refreshIntervalSeconds: FfiConverterOptionalUInt32.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.credentialsSecret, into);+ FfiConverterString.write(value.tokenUrl, into);+ FfiConverterOptionalString.write(value.awsRoleArn, into);+ FfiConverterOptionalString.write(value.awsRegion, into);+ FfiConverterOptionalUInt32.write(value.refreshIntervalSeconds, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.credentialsSecret) ++ FfiConverterString.allocationSize(value.tokenUrl) ++ FfiConverterOptionalString.allocationSize(value.awsRoleArn) ++ FfiConverterOptionalString.allocationSize(value.awsRegion) ++ FfiConverterOptionalUInt32.allocationSize(value.refreshIntervalSeconds);++ }+ };+ return new FFIConverter();+})();++export type VmTemplate = {+ containerDiskImage: string,+ command?: Array<string>,+ runtime?: RuntimeKind,+ runtimeClassName?: string,+ nodeSelector?: Map<string, string>,+ tolerations?: Array<PreservedJsonLike>,+ imagePullPolicy?: ImagePullPolicy,+ imagePullSecret?: string,+ cpuCores?: number,+ memory?: string,+ firmware?: Firmware,+ probes?: PreservedJsonLike,+ services?: Array<SandboxService>,+ oidc?: OidcConfig+}++/**+ * Generated factory for {@link VmTemplate} record objects.+ */+export const VmTemplate = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<VmTemplate, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<VmTemplate>,+ });+})();++const FfiConverterTypeVmTemplate = (() => {+ type TypeName = VmTemplate;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ containerDiskImage: FfiConverterString.read(from),+ command: FfiConverterOptionalSequenceString.read(from),+ runtime: FfiConverterOptionalTypeRuntimeKind.read(from),+ runtimeClassName: FfiConverterOptionalString.read(from),+ nodeSelector: FfiConverterOptionalMapStringString.read(from),+ tolerations: FfiConverterOptionalSequenceTypePreservedJson.read(from),+ imagePullPolicy: FfiConverterOptionalTypeImagePullPolicy.read(from),+ imagePullSecret: FfiConverterOptionalString.read(from),+ cpuCores: FfiConverterOptionalUInt32.read(from),+ memory: FfiConverterOptionalString.read(from),+ firmware: FfiConverterOptionalTypeFirmware.read(from),+ probes: FfiConverterOptionalTypePreservedJson.read(from),+ services: FfiConverterOptionalSequenceTypeSandboxService.read(from),+ oidc: FfiConverterOptionalTypeOidcConfig.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.containerDiskImage, into);+ FfiConverterOptionalSequenceString.write(value.command, into);+ FfiConverterOptionalTypeRuntimeKind.write(value.runtime, into);+ FfiConverterOptionalString.write(value.runtimeClassName, into);+ FfiConverterOptionalMapStringString.write(value.nodeSelector, into);+ FfiConverterOptionalSequenceTypePreservedJson.write(value.tolerations, into);+ FfiConverterOptionalTypeImagePullPolicy.write(value.imagePullPolicy, into);+ FfiConverterOptionalString.write(value.imagePullSecret, into);+ FfiConverterOptionalUInt32.write(value.cpuCores, into);+ FfiConverterOptionalString.write(value.memory, into);+ FfiConverterOptionalTypeFirmware.write(value.firmware, into);+ FfiConverterOptionalTypePreservedJson.write(value.probes, into);+ FfiConverterOptionalSequenceTypeSandboxService.write(value.services, into);+ FfiConverterOptionalTypeOidcConfig.write(value.oidc, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.containerDiskImage) ++ FfiConverterOptionalSequenceString.allocationSize(value.command) ++ FfiConverterOptionalTypeRuntimeKind.allocationSize(value.runtime) ++ FfiConverterOptionalString.allocationSize(value.runtimeClassName) ++ FfiConverterOptionalMapStringString.allocationSize(value.nodeSelector) ++ FfiConverterOptionalSequenceTypePreservedJson.allocationSize(value.tolerations) ++ FfiConverterOptionalTypeImagePullPolicy.allocationSize(value.imagePullPolicy) ++ FfiConverterOptionalString.allocationSize(value.imagePullSecret) ++ FfiConverterOptionalUInt32.allocationSize(value.cpuCores) ++ FfiConverterOptionalString.allocationSize(value.memory) ++ FfiConverterOptionalTypeFirmware.allocationSize(value.firmware) ++ FfiConverterOptionalTypePreservedJson.allocationSize(value.probes) ++ FfiConverterOptionalSequenceTypeSandboxService.allocationSize(value.services) ++ FfiConverterOptionalTypeOidcConfig.allocationSize(value.oidc);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxSpec = {+ vmTemplate: VmTemplate+}++/**+ * Generated factory for {@link OsGymSandboxSpec} record objects.+ */+export const OsGymSandboxSpec = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxSpec, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxSpec>,+ });+})();++const FfiConverterTypeOSGymSandboxSpec = (() => {+ type TypeName = OsGymSandboxSpec;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ vmTemplate: FfiConverterTypeVmTemplate.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterTypeVmTemplate.write(value.vmTemplate, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterTypeVmTemplate.allocationSize(value.vmTemplate);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxStatus = {+ phase?: string,+ runtime?: string,+ ready?: boolean,+ vmName?: string,+ service?: string,+ message?: string,+ resetIssuedAt?: string,+ resetVmiUid?: string+}++/**+ * Generated factory for {@link OsGymSandboxStatus} record objects.+ */+export const OsGymSandboxStatus = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxStatus, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxStatus>,+ });+})();++const FfiConverterTypeOSGymSandboxStatus = (() => {+ type TypeName = OsGymSandboxStatus;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ phase: FfiConverterOptionalString.read(from),+ runtime: FfiConverterOptionalString.read(from),+ ready: FfiConverterOptionalBoolean.read(from),+ vmName: FfiConverterOptionalString.read(from),+ service: FfiConverterOptionalString.read(from),+ message: FfiConverterOptionalString.read(from),+ resetIssuedAt: FfiConverterOptionalString.read(from),+ resetVmiUid: FfiConverterOptionalString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.phase, into);+ FfiConverterOptionalString.write(value.runtime, into);+ FfiConverterOptionalBoolean.write(value.ready, into);+ FfiConverterOptionalString.write(value.vmName, into);+ FfiConverterOptionalString.write(value.service, into);+ FfiConverterOptionalString.write(value.message, into);+ FfiConverterOptionalString.write(value.resetIssuedAt, into);+ FfiConverterOptionalString.write(value.resetVmiUid, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.phase) ++ FfiConverterOptionalString.allocationSize(value.runtime) ++ FfiConverterOptionalBoolean.allocationSize(value.ready) ++ FfiConverterOptionalString.allocationSize(value.vmName) ++ FfiConverterOptionalString.allocationSize(value.service) ++ FfiConverterOptionalString.allocationSize(value.message) ++ FfiConverterOptionalString.allocationSize(value.resetIssuedAt) ++ FfiConverterOptionalString.allocationSize(value.resetVmiUid);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxTemplateSpec = {+ vmTemplate: VmTemplate+}++/**+ * Generated factory for {@link OsGymSandboxTemplateSpec} record objects.+ */+export const OsGymSandboxTemplateSpec = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxTemplateSpec, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxTemplateSpec>,+ });+})();++const FfiConverterTypeOSGymSandboxTemplateSpec = (() => {+ type TypeName = OsGymSandboxTemplateSpec;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ vmTemplate: FfiConverterTypeVmTemplate.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterTypeVmTemplate.write(value.vmTemplate, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterTypeVmTemplate.allocationSize(value.vmTemplate);++ }+ };+ return new FFIConverter();+})();++export type WarmPoolAutoscaling = {+ minPoolSize?: number,+ initialPoolSize?: number,+ maxPoolSize?: number+}++/**+ * Generated factory for {@link WarmPoolAutoscaling} record objects.+ */+export const WarmPoolAutoscaling = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<WarmPoolAutoscaling, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<WarmPoolAutoscaling>,+ });+})();++const FfiConverterTypeWarmPoolAutoscaling = (() => {+ type TypeName = WarmPoolAutoscaling;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ minPoolSize: FfiConverterOptionalUInt32.read(from),+ initialPoolSize: FfiConverterOptionalUInt32.read(from),+ maxPoolSize: FfiConverterOptionalUInt32.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalUInt32.write(value.minPoolSize, into);+ FfiConverterOptionalUInt32.write(value.initialPoolSize, into);+ FfiConverterOptionalUInt32.write(value.maxPoolSize, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalUInt32.allocationSize(value.minPoolSize) ++ FfiConverterOptionalUInt32.allocationSize(value.initialPoolSize) ++ FfiConverterOptionalUInt32.allocationSize(value.maxPoolSize);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxWarmPoolSpec = {+ replicas: number,+ sandboxTemplateRef: SandboxTemplateRef,+ autoscaling?: WarmPoolAutoscaling+}++/**+ * Generated factory for {@link OsGymSandboxWarmPoolSpec} record objects.+ */+export const OsGymSandboxWarmPoolSpec = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxWarmPoolSpec, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxWarmPoolSpec>,+ });+})();++const FfiConverterTypeOSGymSandboxWarmPoolSpec = (() => {+ type TypeName = OsGymSandboxWarmPoolSpec;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ replicas: FfiConverterUInt32.read(from),+ sandboxTemplateRef: FfiConverterTypeSandboxTemplateRef.read(from),+ autoscaling: FfiConverterOptionalTypeWarmPoolAutoscaling.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterUInt32.write(value.replicas, into);+ FfiConverterTypeSandboxTemplateRef.write(value.sandboxTemplateRef, into);+ FfiConverterOptionalTypeWarmPoolAutoscaling.write(value.autoscaling, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterUInt32.allocationSize(value.replicas) ++ FfiConverterTypeSandboxTemplateRef.allocationSize(value.sandboxTemplateRef) ++ FfiConverterOptionalTypeWarmPoolAutoscaling.allocationSize(value.autoscaling);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxWarmPoolStatus = {+ replicas?: number,+ readyReplicas?: number,+ selector?: string+}++/**+ * Generated factory for {@link OsGymSandboxWarmPoolStatus} record objects.+ */+export const OsGymSandboxWarmPoolStatus = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxWarmPoolStatus, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxWarmPoolStatus>,+ });+})();++const FfiConverterTypeOSGymSandboxWarmPoolStatus = (() => {+ type TypeName = OsGymSandboxWarmPoolStatus;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ replicas: FfiConverterOptionalUInt32.read(from),+ readyReplicas: FfiConverterOptionalUInt32.read(from),+ selector: FfiConverterOptionalString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalUInt32.write(value.replicas, into);+ FfiConverterOptionalUInt32.write(value.readyReplicas, into);+ FfiConverterOptionalString.write(value.selector, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalUInt32.allocationSize(value.replicas) ++ FfiConverterOptionalUInt32.allocationSize(value.readyReplicas) ++ FfiConverterOptionalString.allocationSize(value.selector);++ }+ };+ return new FFIConverter();+})();++export type OsGymWorkspacePoolStatus = {+ phase?: string,+ totalCount?: number,+ availableCount?: number,+ claimedCount?: number+}++/**+ * Generated factory for {@link OsGymWorkspacePoolStatus} record objects.+ */+export const OsGymWorkspacePoolStatus = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymWorkspacePoolStatus, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymWorkspacePoolStatus>,+ });+})();++const FfiConverterTypeOSGymWorkspacePoolStatus = (() => {+ type TypeName = OsGymWorkspacePoolStatus;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ phase: FfiConverterOptionalString.read(from),+ totalCount: FfiConverterOptionalUInt32.read(from),+ availableCount: FfiConverterOptionalUInt32.read(from),+ claimedCount: FfiConverterOptionalUInt32.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.phase, into);+ FfiConverterOptionalUInt32.write(value.totalCount, into);+ FfiConverterOptionalUInt32.write(value.availableCount, into);+ FfiConverterOptionalUInt32.write(value.claimedCount, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.phase) ++ FfiConverterOptionalUInt32.allocationSize(value.totalCount) ++ FfiConverterOptionalUInt32.allocationSize(value.availableCount) ++ FfiConverterOptionalUInt32.allocationSize(value.claimedCount);++ }+ };+ return new FFIConverter();+})();++export type PoolTemplate = {+ runtime?: RuntimeKind,+ runtimeClassName?: string,+ nodeSelector?: Map<string, string>,+ tolerations?: Array<PreservedJsonLike>,+ command?: Array<string>,+ containerDiskImage: string,+ imagePullSecret?: string,+ cpuCores?: number,+ memory?: string,+ firmware?: Firmware,+ probes?: PreservedJsonLike,+ oidc?: OidcConfig+}++/**+ * Generated factory for {@link PoolTemplate} record objects.+ */+export const PoolTemplate = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<PoolTemplate, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<PoolTemplate>,+ });+})();++const FfiConverterTypePoolTemplate = (() => {+ type TypeName = PoolTemplate;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ runtime: FfiConverterOptionalTypeRuntimeKind.read(from),+ runtimeClassName: FfiConverterOptionalString.read(from),+ nodeSelector: FfiConverterOptionalMapStringString.read(from),+ tolerations: FfiConverterOptionalSequenceTypePreservedJson.read(from),+ command: FfiConverterOptionalSequenceString.read(from),+ containerDiskImage: FfiConverterString.read(from),+ imagePullSecret: FfiConverterOptionalString.read(from),+ cpuCores: FfiConverterOptionalUInt32.read(from),+ memory: FfiConverterOptionalString.read(from),+ firmware: FfiConverterOptionalTypeFirmware.read(from),+ probes: FfiConverterOptionalTypePreservedJson.read(from),+ oidc: FfiConverterOptionalTypeOidcConfig.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalTypeRuntimeKind.write(value.runtime, into);+ FfiConverterOptionalString.write(value.runtimeClassName, into);+ FfiConverterOptionalMapStringString.write(value.nodeSelector, into);+ FfiConverterOptionalSequenceTypePreservedJson.write(value.tolerations, into);+ FfiConverterOptionalSequenceString.write(value.command, into);+ FfiConverterString.write(value.containerDiskImage, into);+ FfiConverterOptionalString.write(value.imagePullSecret, into);+ FfiConverterOptionalUInt32.write(value.cpuCores, into);+ FfiConverterOptionalString.write(value.memory, into);+ FfiConverterOptionalTypeFirmware.write(value.firmware, into);+ FfiConverterOptionalTypePreservedJson.write(value.probes, into);+ FfiConverterOptionalTypeOidcConfig.write(value.oidc, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalTypeRuntimeKind.allocationSize(value.runtime) ++ FfiConverterOptionalString.allocationSize(value.runtimeClassName) ++ FfiConverterOptionalMapStringString.allocationSize(value.nodeSelector) ++ FfiConverterOptionalSequenceTypePreservedJson.allocationSize(value.tolerations) ++ FfiConverterOptionalSequenceString.allocationSize(value.command) ++ FfiConverterString.allocationSize(value.containerDiskImage) ++ FfiConverterOptionalString.allocationSize(value.imagePullSecret) ++ FfiConverterOptionalUInt32.allocationSize(value.cpuCores) ++ FfiConverterOptionalString.allocationSize(value.memory) ++ FfiConverterOptionalTypeFirmware.allocationSize(value.firmware) ++ FfiConverterOptionalTypePreservedJson.allocationSize(value.probes) ++ FfiConverterOptionalTypeOidcConfig.allocationSize(value.oidc);++ }+ };+ return new FFIConverter();+})();++export type PoolSpec = {+ replicas: number,+ template: PoolTemplate,+ autoscaling?: WarmPoolAutoscaling,+ services?: Array<SandboxService>+}++/**+ * Generated factory for {@link PoolSpec} record objects.+ */+export const PoolSpec = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<PoolSpec, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<PoolSpec>,+ equals(self_: PoolSpec, other: PoolSpec): boolean {++ return FfiConverterBool.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq(+ FfiConverterTypePoolSpec.lower(self_, nativeModule().rustbuffer_alloc),+ FfiConverterTypePoolSpec.lower(other, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ },+ hashCode(self_: PoolSpec): bigint {++ return FfiConverterUInt64.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash(+ FfiConverterTypePoolSpec.lower(self_, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ },+ });+})();++const FfiConverterTypePoolSpec = (() => {+ type TypeName = PoolSpec;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ replicas: FfiConverterUInt32.read(from),+ template: FfiConverterTypePoolTemplate.read(from),+ autoscaling: FfiConverterOptionalTypeWarmPoolAutoscaling.read(from),+ services: FfiConverterOptionalSequenceTypeSandboxService.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterUInt32.write(value.replicas, into);+ FfiConverterTypePoolTemplate.write(value.template, into);+ FfiConverterOptionalTypeWarmPoolAutoscaling.write(value.autoscaling, into);+ FfiConverterOptionalSequenceTypeSandboxService.write(value.services, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterUInt32.allocationSize(value.replicas) ++ FfiConverterTypePoolTemplate.allocationSize(value.template) ++ FfiConverterOptionalTypeWarmPoolAutoscaling.allocationSize(value.autoscaling) ++ FfiConverterOptionalSequenceTypeSandboxService.allocationSize(value.services);++ }+ };+ return new FFIConverter();+})();+++// Error type: JsonValueError+export enum JsonValueError_Tags {+ Invalid = "Invalid"+}+export const JsonValueError = (() => {++ type Invalid__interface = {+ tag: JsonValueError_Tags.Invalid;+ inner:+Readonly<{reason: string}>+ };+ class Invalid_ extends UniffiError implements Invalid__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "JsonValueError";+ readonly tag = JsonValueError_Tags.Invalid;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("JsonValueError", "Invalid");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Invalid_ {+ return new Invalid_(inner);+ }++ static instanceOf(obj: any): obj is Invalid_ {+ return obj.tag === JsonValueError_Tags.Invalid;+ }+ static hasInner(obj: any): obj is Invalid_ {+ return Invalid_.instanceOf(obj);+ }++ static getInner(obj: Invalid_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ function instanceOf(obj: any): obj is JsonValueError {+ return obj[uniffiTypeNameSymbol] === "JsonValueError";+ }++ return Object.freeze({+ instanceOf,+ Invalid: Invalid_+ });++})();+export type JsonValueError = InstanceType<+ typeof JsonValueError['Invalid']+>;++// FfiConverter for enum JsonValueError+const FfiConverterTypeJsonValueError = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = JsonValueError;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return new JsonValueError.Invalid({reason: FfiConverterString.read(from) });+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value.tag) {+ case JsonValueError_Tags.Invalid: {+ ordinalConverter.write(1, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ default:+ // Throwing from here means that JsonValueError_Tags hasn't matched an ordinal.+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ allocationSize(value: TypeName): number {+ switch (value.tag) {+ case JsonValueError_Tags.Invalid: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(1);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ }+ return new FFIConverter();+})();++// FfiConverter for string | undefined+const FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);++// FfiConverter for boolean | undefined+const FfiConverterOptionalBoolean = new FfiConverterOptional(FfiConverterBool);++// FfiConverter for number | undefined+const FfiConverterOptionalUInt32 = new FfiConverterOptional(FfiConverterUInt32);++// FfiConverter for ClaimLifecycle | undefined+const FfiConverterOptionalTypeClaimLifecycle = new FfiConverterOptional(FfiConverterTypeClaimLifecycle);++// FfiConverter for Array<OsGymSandboxClaimCondition>+const FfiConverterSequenceTypeOSGymSandboxClaimCondition = new FfiConverterArray(FfiConverterTypeOSGymSandboxClaimCondition);++// FfiConverter for Array<OsGymSandboxClaimCondition> | undefined+const FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition = new FfiConverterOptional(FfiConverterSequenceTypeOSGymSandboxClaimCondition);++// FfiConverter for OsGymSandboxClaimSandbox | undefined+const FfiConverterOptionalTypeOSGymSandboxClaimSandbox = new FfiConverterOptional(FfiConverterTypeOSGymSandboxClaimSandbox);++// FfiConverter for Array<string>+const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);++// FfiConverter for Array<string> | undefined+const FfiConverterOptionalSequenceString = new FfiConverterOptional(FfiConverterSequenceString);++// FfiConverter for RuntimeKind | undefined+const FfiConverterOptionalTypeRuntimeKind = new FfiConverterOptional(FfiConverterTypeRuntimeKind);++// FfiConverter for Map<string, string>+const FfiConverterMapStringString = new FfiConverterMap(FfiConverterString, FfiConverterString);++// FfiConverter for Map<string, string> | undefined+const FfiConverterOptionalMapStringString = new FfiConverterOptional(FfiConverterMapStringString);++// FfiConverter for Array<PreservedJsonLike>+const FfiConverterSequenceTypePreservedJson = new FfiConverterArray(FfiConverterTypePreservedJson);++// FfiConverter for Array<PreservedJsonLike> | undefined+const FfiConverterOptionalSequenceTypePreservedJson = new FfiConverterOptional(FfiConverterSequenceTypePreservedJson);++// FfiConverter for ImagePullPolicy | undefined+const FfiConverterOptionalTypeImagePullPolicy = new FfiConverterOptional(FfiConverterTypeImagePullPolicy);++// FfiConverter for Firmware | undefined+const FfiConverterOptionalTypeFirmware = new FfiConverterOptional(FfiConverterTypeFirmware);++// FfiConverter for PreservedJsonLike | undefined+const FfiConverterOptionalTypePreservedJson = new FfiConverterOptional(FfiConverterTypePreservedJson);++// FfiConverter for ServiceProtocol | undefined+const FfiConverterOptionalTypeServiceProtocol = new FfiConverterOptional(FfiConverterTypeServiceProtocol);++// FfiConverter for Array<SandboxService>+const FfiConverterSequenceTypeSandboxService = new FfiConverterArray(FfiConverterTypeSandboxService);++// FfiConverter for Array<SandboxService> | undefined+const FfiConverterOptionalSequenceTypeSandboxService = new FfiConverterOptional(FfiConverterSequenceTypeSandboxService);++// FfiConverter for OidcConfig | undefined+const FfiConverterOptionalTypeOidcConfig = new FfiConverterOptional(FfiConverterTypeOidcConfig);++// FfiConverter for WarmPoolAutoscaling | undefined+const FfiConverterOptionalTypeWarmPoolAutoscaling = new FfiConverterOptional(FfiConverterTypeWarmPoolAutoscaling);+++/**+ * This should be called before anything else.+ *+ * It is likely that this is being done for you by the library's `index.ts`.+ *+ * It checks versions of uniffi between when the Rust scaffolding was generated+ * and when the bindings were generated.+ *+ * It also initializes the machinery to enable Rust to talk back to Javascript.+ */+function uniffiEnsureInitialized() {+ // Get the bindings contract version from our ComponentInterface+ const bindingsContractVersion = 30;+ // Get the scaffolding contract version by calling the into the dylib+ const scaffoldingContractVersion = nativeModule().ubrn_ffi_cyclops_sdk_schema_uniffi_contract_version();+ if (bindingsContractVersion !== scaffoldingContractVersion) {+ throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() !== 24064) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json");+ }+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() !== 8252) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json");+ }++ }++export default Object.freeze({+ initialize: uniffiEnsureInitialized,+ converters: {+ FfiConverterTypeClaimLifecycle,+ FfiConverterTypeClaimSpec,+ FfiConverterTypeFirmware,+ FfiConverterTypeImagePullPolicy,+ FfiConverterTypeJsonValueError,+ FfiConverterTypeOSGymSandboxClaimCondition,+ FfiConverterTypeOSGymSandboxClaimSandbox,+ FfiConverterTypeOSGymSandboxClaimStatus,+ FfiConverterTypeOSGymSandboxSpec,+ FfiConverterTypeOSGymSandboxStatus,+ FfiConverterTypeOSGymSandboxTemplateSpec,+ FfiConverterTypeOSGymSandboxWarmPoolSpec,+ FfiConverterTypeOSGymSandboxWarmPoolStatus,+ FfiConverterTypeOSGymWorkspacePoolStatus,+ FfiConverterTypeOidcConfig,+ FfiConverterTypePoolSpec,+ FfiConverterTypePoolTemplate,+ FfiConverterTypePreservedJson,+ FfiConverterTypeRuntimeKind,+ FfiConverterTypeSandboxService,+ FfiConverterTypeSandboxTemplateRef,+ FfiConverterTypeServiceProtocol,+ FfiConverterTypeVmTemplate,+ FfiConverterTypeWarmPoolAutoscaling,+ }+});\ No newline at end of filediff --git a/libs/fleet/sdk-bindings/ts-uniffi/README.md b/libs/fleet/sdk-bindings/ts-uniffi/README.mdnew file mode 100644index 0000000000..c448d7256e--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi/README.md@@ -0,0 +1,6 @@+# Cyclops TypeScript UniFFI bindings++Generated with `uniffi-bindgen-react-native` for Node.js N-API. Runtime+requires `@ubjs/core`, `@ubjs/node`, and a colocated `libcyclops_sdk` cdylib.+Browser source is generated in `../ts-uniffi-browser`; packaging its WASM crate+requires a project `ubrn.config.yaml` and a wasm build pipeline.diff --git a/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk-ffi.ts b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk-ffi.tsnew file mode 100644index 0000000000..ef89900b43--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk-ffi.ts@@ -0,0 +1,622 @@+// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.+// Trust me, you don't want to mess with it!+/* tslint:disable */+/* eslint-disable */+// @ts-nocheck++import lib from "@ubjs/node";+const { UniffiNativeModule, FfiType, resolveLibPath } = lib;++import {+ type StructuralEquality as UniffiStructuralEquality,+ type UniffiForeignFuture as RuntimeUniffiForeignFuture,+ type UniffiRustCallStatus,+ type UniffiGcObject,+ type UniffiRustFutureContinuationCallback as RuntimeUniffiRustFutureContinuationCallback,+ type UniffiResult,+} from '@ubjs/core';++const DEFINITIONS = {+ symbols: {+ rustbuffer_alloc: "ffi_cyclops_sdk_rustbuffer_alloc",+ rustbuffer_free: "ffi_cyclops_sdk_rustbuffer_free",+ rustbuffer_from_bytes: "ffi_cyclops_sdk_rustbuffer_from_bytes",+ },+ functions: {+ "ffi_cyclops_sdk_rust_future_poll_u8": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_u8": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_u8": {+ args: [FfiType.Handle],+ ret: FfiType.UInt8,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_u8": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_i8": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_i8": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_i8": {+ args: [FfiType.Handle],+ ret: FfiType.Int8,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_i8": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_u16": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_u16": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_u16": {+ args: [FfiType.Handle],+ ret: FfiType.UInt16,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_u16": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_i16": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_i16": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_i16": {+ args: [FfiType.Handle],+ ret: FfiType.Int16,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_i16": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_u32": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_u32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_u32": {+ args: [FfiType.Handle],+ ret: FfiType.UInt32,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_u32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_i32": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_i32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_i32": {+ args: [FfiType.Handle],+ ret: FfiType.Int32,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_i32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_u64": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_u64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_u64": {+ args: [FfiType.Handle],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_u64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_i64": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_i64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_i64": {+ args: [FfiType.Handle],+ ret: FfiType.Int64,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_i64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_f32": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_f32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_f32": {+ args: [FfiType.Handle],+ ret: FfiType.Float32,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_f32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_f64": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_f64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_f64": {+ args: [FfiType.Handle],+ ret: FfiType.Float64,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_f64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_rust_buffer": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_rust_buffer": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_rust_buffer": {+ args: [FfiType.Handle],+ ret: FfiType.RustBuffer,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_rust_buffer": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_poll_void": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_cancel_void": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_rust_future_complete_void": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_rust_future_free_void": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_clone_cyclopsclient": {+ args: [FfiType.Handle],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_free_cyclopsclient": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_clone_cyclopscredentials": {+ args: [FfiType.Handle],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_free_cyclopscredentials": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_clone_httpclient": {+ args: [FfiType.Handle],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_free_httpclient": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient": {+ args: [FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceCyclopsSdkHttpClient"))],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect": {+ args: [FfiType.RustBuffer, FfiType.Handle],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request": {+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new": {+ args: [FfiType.RustBuffer, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_fn_method_httpclient_execute": {+ args: [FfiType.Handle, FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_uniffi_contract_version": {+ args: [],+ ret: FfiType.UInt32,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_checksum_method_httpclient_execute": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ },+ callbacks: {+ "RustFutureContinuationCallback": {+ args: [FfiType.Handle, FfiType.Int8],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ForeignFutureDroppedCallback": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ForeignFutureCompleterust_buffer": {+ args: [FfiType.Handle, FfiType.Struct("ForeignFutureResultRustBuffer")],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "CallbackInterfaceCyclopsSdkHttpClientMethod0": {+ args: [FfiType.Handle, FfiType.RustBuffer, FfiType.Callback("ForeignFutureCompleterust_buffer"), FfiType.Handle],+ ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),+ hasRustCallStatus: false,+ outReturn: true,+ },+ "CallbackInterfaceCloneCyclopsSdk_HttpClient": {+ args: [FfiType.Handle],+ ret: FfiType.Handle,+ hasRustCallStatus: false,+ },+ "CallbackInterfaceFreeCyclopsSdk_HttpClient": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ },+ structs: {+ "ForeignFutureDroppedCallbackStruct": [+ { name: "handle", type: FfiType.Handle },+ { name: "free", type: FfiType.Callback("ForeignFutureDroppedCallback") },+ ],+ "ForeignFutureResultRustBuffer": [+ { name: "return_value", type: FfiType.RustBuffer },+ { name: "call_status", type: FfiType.RustCallStatus },+ ],+ "VTableCallbackInterfaceCyclopsSdkHttpClient": [+ { name: "uniffi_free", type: FfiType.Callback("CallbackInterfaceFreeCyclopsSdk_HttpClient") },+ { name: "uniffi_clone", type: FfiType.Callback("CallbackInterfaceCloneCyclopsSdk_HttpClient") },+ { name: "execute", type: FfiType.Callback("CallbackInterfaceCyclopsSdkHttpClientMethod0") },+ ],+ },+} as const;++interface NativeModuleInterface {+ ffi_cyclops_sdk_rust_future_poll_u8(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_u8(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_u8(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_rust_future_free_u8(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_i8(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_i8(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_i8(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_rust_future_free_i8(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_u16(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_u16(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_u16(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_rust_future_free_u16(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_i16(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_i16(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_i16(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_rust_future_free_i16(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_u32(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_u32(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_u32(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_rust_future_free_u32(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_i32(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_i32(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_i32(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_rust_future_free_i32(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_u64(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_u64(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_u64(handle: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ ffi_cyclops_sdk_rust_future_free_u64(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_i64(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_i64(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_i64(handle: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ ffi_cyclops_sdk_rust_future_free_i64(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_f32(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_f32(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_f32(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_rust_future_free_f32(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_f64(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_f64(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_f64(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_rust_future_free_f64(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_rust_buffer(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_rust_buffer(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_rust_buffer(handle: bigint, uniffi_out_err: UniffiRustCallStatus): Uint8Array;+ ffi_cyclops_sdk_rust_future_free_rust_buffer(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_poll_void(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_rust_future_cancel_void(handle: bigint): void;+ ffi_cyclops_sdk_rust_future_complete_void(handle: bigint, uniffi_out_err: UniffiRustCallStatus): void;+ ffi_cyclops_sdk_rust_future_free_void(handle: bigint): void;+ uniffi_cyclops_sdk_fn_clone_cyclopsclient(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_free_cyclopsclient(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): void;+ uniffi_cyclops_sdk_fn_clone_cyclopscredentials(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_free_cyclopscredentials(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): void;+ uniffi_cyclops_sdk_fn_clone_httpclient(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_free_httpclient(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): void;+ uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(vtable: UniffiVTableCallbackInterfaceCyclopsSdkHttpClient): void;+ uniffi_cyclops_sdk_fn_constructor_cyclopsclient_connect(configuration: Uint8Array, httpClient: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(uniffiSelf: bigint, request: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(uniffiSelf: bigint, request: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(uniffiSelf: bigint, claim: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(uniffiSelf: bigint, pool: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(uniffiSelf: bigint, claim: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(uniffiSelf: bigint, pool: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(uniffiSelf: bigint, namespace: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(uniffiSelf: bigint, namespace: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(uniffiSelf: bigint, sandbox: Uint8Array, service: Uint8Array, path: Uint8Array, request: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(uniffiSelf: bigint, pool: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(uniffiSelf: bigint, claim: Uint8Array): bigint;+ uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(clientId: Uint8Array, clientSecret: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_fn_method_httpclient_execute(uniffiSelf: bigint, request: Uint8Array): bigint;+ ffi_cyclops_sdk_uniffi_contract_version(): number;+ uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool(): number;+ uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim(): number;+ uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new(): number;+ uniffi_cyclops_sdk_checksum_method_httpclient_execute(): number;+ // Codegen call sites use these via `nativeModule().rustbuffer_alloc(...)`+ // and `nativeModule().rustbuffer_free(...)`. The runtime's registered+ // module exposes them as method properties.+ rustbuffer_alloc(n: number): Uint8Array;+ rustbuffer_free(view: Uint8Array): void;+}++let _nativeModule: NativeModuleInterface | undefined;+const getter: () => NativeModuleInterface = () => {+ if (!_nativeModule) {+ const libPath = resolveLibPath({+ crateName: "cyclops_sdk",+ callerUrl: import.meta.url,+ });+ const mod_ = UniffiNativeModule.open(libPath);+ _nativeModule = mod_.register(DEFINITIONS) as unknown as NativeModuleInterface;+ }+ return _nativeModule;+};+export default getter;++// Structs and function types for calling back into Typescript from Rust.+export type UniffiRustFutureContinuationCallback = (data: bigint, pollResult: number) => void;+export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void;+export type UniffiForeignFutureDroppedCallbackStruct = {+ handle: bigint;+ free: UniffiForeignFutureDroppedCallback;+};+export type UniffiForeignFutureResultRustBuffer = {+ return_value: Uint8Array;+ call_status: UniffiRustCallStatus;+};+export type UniffiForeignFutureCompleterustBuffer = (callbackData: bigint, result: UniffiForeignFutureResultRustBuffer) => void;+type UniffiCallbackInterfaceCyclopsSdkHttpClientMethod0 = (uniffiHandle: bigint, request: Uint8Array, uniffiFutureCallback: UniffiForeignFutureCompleterustBuffer, uniffiCallbackData: bigint) => UniffiForeignFutureDroppedCallbackStruct;+type UniffiCallbackInterfaceCloneCyclopsSdkHttpClient = (handle: bigint) => UniffiResult<void>;+type UniffiCallbackInterfaceFreeCyclopsSdkHttpClient = (handle: bigint) => void;+export type UniffiVTableCallbackInterfaceCyclopsSdkHttpClient = {+ uniffi_free: UniffiCallbackInterfaceFreeCyclopsSdkHttpClient;+ uniffi_clone: UniffiCallbackInterfaceCloneCyclopsSdkHttpClient;+ execute: UniffiCallbackInterfaceCyclopsSdkHttpClientMethod0;+};\ No newline at end of filediff --git a/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk.ts b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk.tsnew file mode 100644index 0000000000..b0f3a27bd6--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk.ts@@ -0,0 +1,2124 @@+// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.+// Trust me, you don't want to mess with it!+/* tslint:disable */+/* eslint-disable */+// @ts-nocheck+import nativeModule from "./cyclops_sdk-ffi";+import { type UniffiRustFutureContinuationCallback, type UniffiForeignFutureDroppedCallback, type UniffiForeignFutureDroppedCallbackStruct, type UniffiForeignFutureResultRustBuffer, type UniffiForeignFutureCompleterustBuffer, type UniffiVTableCallbackInterfaceCyclopsSdkHttpClient,+} from "./cyclops_sdk-ffi";+import { type ClaimSpec, type OsGymSandboxClaimStatus, type OsGymWorkspacePoolStatus, type PoolSpec,+} from "./cyclops_sdk_schema";+import { type FfiConverter, type UniffiByteArray, type UniffiGcObject, type UniffiHandle, type UniffiObjectFactory, type UniffiReferenceHolder, type UniffiRustCallStatus, AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterArrayBuffer, FfiConverterInt32, FfiConverterMap, FfiConverterObject, FfiConverterObjectWithCallbacks, FfiConverterOptional, FfiConverterUInt16, FfiConverterUInt32, FfiConverterUInt64, FfiConverterUInt8, RustBuffer, UniffiAbstractObject, UniffiError, UniffiInternalError, UniffiResult, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiRustCallAsync, uniffiTraitInterfaceCallAsyncWithError, uniffiTypeNameSymbol, variantOrdinalSymbol,+} from "@ubjs/core";+import uniffiCyclopsSdkSchemaModule from "./cyclops_sdk_schema";+const { FfiConverterTypeClaimSpec, FfiConverterTypeOSGymSandboxClaimStatus, FfiConverterTypeOSGymWorkspacePoolStatus, FfiConverterTypePoolSpec } = uniffiCyclopsSdkSchemaModule.converters;+const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));++const uniffiIsDebug =+ // @ts-ignore -- The process global might not be defined+ typeof process !== "object" ||+ // @ts-ignore -- The process global might not be defined+ process?.env?.NODE_ENV !== "production" ||+ false;++// Public interface members begin here.++const stringConverter = (() => {+ const encoder = new TextEncoder();+ const decoder = new TextDecoder();+ return {+ stringToBytes: (s: string) => encoder.encode(s),+ bytesToString: (ab: UniffiByteArray) => decoder.decode(ab),+ stringByteLength: (s: string) => encoder.encode(s).byteLength,+ writeStringIntoBuffer: (s: string, buf: any, offset: number): number => {+ const view = new Uint8Array(+ buf.arrayBuffer,+ offset,+ buf.arrayBuffer.byteLength - offset,+ );+ return encoder.encodeInto(s, view).written;+ },+ readStringFromBuffer: (buf: any, offset: number, length: number): string =>+ decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length)),+ };+})();+const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);++export type ResourceMetadata = {+ namespace: string,+ name: string,+ labels?: Map<string, string>+}++/**+ * Generated factory for {@link ResourceMetadata} record objects.+ */+export const ResourceMetadata = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<ResourceMetadata, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<ResourceMetadata>,+ });+})();++const FfiConverterTypeResourceMetadata = (() => {+ type TypeName = ResourceMetadata;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ namespace: FfiConverterString.read(from),+ name: FfiConverterString.read(from),+ labels: FfiConverterOptionalMapStringString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.namespace, into);+ FfiConverterString.write(value.name, into);+ FfiConverterOptionalMapStringString.write(value.labels, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.namespace) ++ FfiConverterString.allocationSize(value.name) ++ FfiConverterOptionalMapStringString.allocationSize(value.labels);++ }+ };+ return new FFIConverter();+})();++export type Claim = {+ apiVersion: string,+ kind: string,+ metadata: ResourceMetadata,+ spec: ClaimSpec,+ status?: OsGymSandboxClaimStatus+}++/**+ * Generated factory for {@link Claim} record objects.+ */+export const Claim = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<Claim, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<Claim>,+ });+})();++const FfiConverterTypeClaim = (() => {+ type TypeName = Claim;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ apiVersion: FfiConverterString.read(from),+ kind: FfiConverterString.read(from),+ metadata: FfiConverterTypeResourceMetadata.read(from),+ spec: FfiConverterTypeClaimSpec.read(from),+ status: FfiConverterOptionalTypeOSGymSandboxClaimStatus.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.apiVersion, into);+ FfiConverterString.write(value.kind, into);+ FfiConverterTypeResourceMetadata.write(value.metadata, into);+ FfiConverterTypeClaimSpec.write(value.spec, into);+ FfiConverterOptionalTypeOSGymSandboxClaimStatus.write(value.status, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.apiVersion) ++ FfiConverterString.allocationSize(value.kind) ++ FfiConverterTypeResourceMetadata.allocationSize(value.metadata) ++ FfiConverterTypeClaimSpec.allocationSize(value.spec) ++ FfiConverterOptionalTypeOSGymSandboxClaimStatus.allocationSize(value.status);++ }+ };+ return new FFIConverter();+})();++/**+ * UniFFI cannot emit aliases for external record types. Generated bindings use+ * `OSGymWorkspacePoolStatus` and `OSGymSandboxClaimStatus` from cyclops_sdk_schema.+ */+export type Pool = {+ apiVersion: string,+ kind: string,+ metadata: ResourceMetadata,+ spec: PoolSpec,+ status?: OsGymWorkspacePoolStatus+}++/**+ * Generated factory for {@link Pool} record objects.+ */+export const Pool = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<Pool, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<Pool>,+ });+})();++const FfiConverterTypePool = (() => {+ type TypeName = Pool;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ apiVersion: FfiConverterString.read(from),+ kind: FfiConverterString.read(from),+ metadata: FfiConverterTypeResourceMetadata.read(from),+ spec: FfiConverterTypePoolSpec.read(from),+ status: FfiConverterOptionalTypeOSGymWorkspacePoolStatus.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.apiVersion, into);+ FfiConverterString.write(value.kind, into);+ FfiConverterTypeResourceMetadata.write(value.metadata, into);+ FfiConverterTypePoolSpec.write(value.spec, into);+ FfiConverterOptionalTypeOSGymWorkspacePoolStatus.write(value.status, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.apiVersion) ++ FfiConverterString.allocationSize(value.kind) ++ FfiConverterTypeResourceMetadata.allocationSize(value.metadata) ++ FfiConverterTypePoolSpec.allocationSize(value.spec) ++ FfiConverterOptionalTypeOSGymWorkspacePoolStatus.allocationSize(value.status);++ }+ };+ return new FFIConverter();+})();++export type CreateClaimRequest = {+ pool: Pool,+ spec?: ClaimSpec+}++/**+ * Generated factory for {@link CreateClaimRequest} record objects.+ */+export const CreateClaimRequest = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<CreateClaimRequest, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<CreateClaimRequest>,+ });+})();++const FfiConverterTypeCreateClaimRequest = (() => {+ type TypeName = CreateClaimRequest;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ pool: FfiConverterTypePool.read(from),+ spec: FfiConverterOptionalTypeClaimSpec.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterTypePool.write(value.pool, into);+ FfiConverterOptionalTypeClaimSpec.write(value.spec, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterTypePool.allocationSize(value.pool) ++ FfiConverterOptionalTypeClaimSpec.allocationSize(value.spec);++ }+ };+ return new FFIConverter();+})();++export type CreatePoolRequest = {+ namespace: string,+ spec: PoolSpec+}++/**+ * Generated factory for {@link CreatePoolRequest} record objects.+ */+export const CreatePoolRequest = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<CreatePoolRequest, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<CreatePoolRequest>,+ });+})();++const FfiConverterTypeCreatePoolRequest = (() => {+ type TypeName = CreatePoolRequest;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ namespace: FfiConverterString.read(from),+ spec: FfiConverterTypePoolSpec.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.namespace, into);+ FfiConverterTypePoolSpec.write(value.spec, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.namespace) ++ FfiConverterTypePoolSpec.allocationSize(value.spec);++ }+ };+ return new FFIConverter();+})();++export interface CyclopsCredentialsLike {++}+/**+ * @deprecated Use `CyclopsCredentialsLike` instead.+ */+export type CyclopsCredentialsInterface = CyclopsCredentialsLike;+++export class CyclopsCredentials extends UniffiAbstractObject implements CyclopsCredentialsLike {++ readonly [uniffiTypeNameSymbol] = "CyclopsCredentials";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ constructor(clientId: string, clientSecret: string) {+ super();+ const pointer =+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().uniffi_cyclops_sdk_fn_constructor_cyclopscredentials_new(+ FfiConverterString.lower(clientId, nativeModule().rustbuffer_alloc),+ FfiConverterString.lower(clientSecret, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ );+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] = uniffiTypeCyclopsCredentialsObjectFactory.bless(pointer);+ }++++++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer = uniffiTypeCyclopsCredentialsObjectFactory.pointer(this);+ uniffiTypeCyclopsCredentialsObjectFactory.freePointer(pointer);+ uniffiTypeCyclopsCredentialsObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is CyclopsCredentials {+ return uniffiTypeCyclopsCredentialsObjectFactory.isConcreteType(obj_);+ }+++}++const uniffiTypeCyclopsCredentialsObjectFactory: UniffiObjectFactory<CyclopsCredentialsLike> = (() => {++ /// <reference lib="es2021" />+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypeCyclopsCredentialsObjectFactory.freePointer(heldValue);+ }) : null;++ return {+ create(pointer: UniffiHandle): CyclopsCredentialsLike {+ const instance = Object.create(CyclopsCredentials.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "CyclopsCredentials";+ 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_: CyclopsCredentialsLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: CyclopsCredentialsLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().uniffi_cyclops_sdk_fn_clone_cyclopscredentials(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().uniffi_cyclops_sdk_fn_free_cyclopscredentials(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ isConcreteType(obj_: any): obj_ is CyclopsCredentialsLike {+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "CyclopsCredentials";+ },+}})();+const FfiConverterTypeCyclopsCredentials = new FfiConverterObject(uniffiTypeCyclopsCredentialsObjectFactory);++export type CyclopsConfiguration = {+ baseUrl: string,+ tokenUrl: string,+ credentials: CyclopsCredentialsLike,+ poolPollIntervalMs: bigint,+ poolPollLimit: number,+ claimPollIntervalMs: bigint,+ claimPollLimit: number+}++/**+ * Generated factory for {@link CyclopsConfiguration} record objects.+ */+export const CyclopsConfiguration = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<CyclopsConfiguration, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<CyclopsConfiguration>,+ });+})();++const FfiConverterTypeCyclopsConfiguration = (() => {+ type TypeName = CyclopsConfiguration;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ baseUrl: FfiConverterString.read(from),+ tokenUrl: FfiConverterString.read(from),+ credentials: FfiConverterTypeCyclopsCredentials.read(from),+ poolPollIntervalMs: FfiConverterUInt64.read(from),+ poolPollLimit: FfiConverterUInt32.read(from),+ claimPollIntervalMs: FfiConverterUInt64.read(from),+ claimPollLimit: FfiConverterUInt32.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.baseUrl, into);+ FfiConverterString.write(value.tokenUrl, into);+ FfiConverterTypeCyclopsCredentials.write(value.credentials, into);+ FfiConverterUInt64.write(value.poolPollIntervalMs, into);+ FfiConverterUInt32.write(value.poolPollLimit, into);+ FfiConverterUInt64.write(value.claimPollIntervalMs, into);+ FfiConverterUInt32.write(value.claimPollLimit, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.baseUrl) ++ FfiConverterString.allocationSize(value.tokenUrl) ++ FfiConverterTypeCyclopsCredentials.allocationSize(value.credentials) ++ FfiConverterUInt64.allocationSize(value.poolPollIntervalMs) ++ FfiConverterUInt32.allocationSize(value.poolPollLimit) ++ FfiConverterUInt64.allocationSize(value.claimPollIntervalMs) ++ FfiConverterUInt32.allocationSize(value.claimPollLimit);++ }+ };+ return new FFIConverter();+})();++export type HttpHeader = {+ name: string,+ value: string+}++/**+ * Generated factory for {@link HttpHeader} record objects.+ */+export const HttpHeader = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<HttpHeader, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<HttpHeader>,+ });+})();++const FfiConverterTypeHttpHeader = (() => {+ type TypeName = HttpHeader;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ name: FfiConverterString.read(from),+ value: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.name, into);+ FfiConverterString.write(value.value, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.name) ++ FfiConverterString.allocationSize(value.value);++ }+ };+ return new FFIConverter();+})();++export type HttpRequest = {+ method: string,+ url: string,+ headers: Array<HttpHeader>,+ body?: ArrayBuffer+}++/**+ * Generated factory for {@link HttpRequest} record objects.+ */+export const HttpRequest = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<HttpRequest, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<HttpRequest>,+ });+})();++const FfiConverterTypeHttpRequest = (() => {+ type TypeName = HttpRequest;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ method: FfiConverterString.read(from),+ url: FfiConverterString.read(from),+ headers: FfiConverterSequenceTypeHttpHeader.read(from),+ body: FfiConverterOptionalBytes.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.method, into);+ FfiConverterString.write(value.url, into);+ FfiConverterSequenceTypeHttpHeader.write(value.headers, into);+ FfiConverterOptionalBytes.write(value.body, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.method) ++ FfiConverterString.allocationSize(value.url) ++ FfiConverterSequenceTypeHttpHeader.allocationSize(value.headers) ++ FfiConverterOptionalBytes.allocationSize(value.body);++ }+ };+ return new FFIConverter();+})();++export type HttpResponse = {+ status: number,+ headers: Array<HttpHeader>,+ body: ArrayBuffer+}++/**+ * Generated factory for {@link HttpResponse} record objects.+ */+export const HttpResponse = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<HttpResponse, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<HttpResponse>,+ });+})();++const FfiConverterTypeHttpResponse = (() => {+ type TypeName = HttpResponse;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ status: FfiConverterUInt16.read(from),+ headers: FfiConverterSequenceTypeHttpHeader.read(from),+ body: FfiConverterArrayBuffer.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterUInt16.write(value.status, into);+ FfiConverterSequenceTypeHttpHeader.write(value.headers, into);+ FfiConverterArrayBuffer.write(value.body, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterUInt16.allocationSize(value.status) ++ FfiConverterSequenceTypeHttpHeader.allocationSize(value.headers) ++ FfiConverterArrayBuffer.allocationSize(value.body);++ }+ };+ return new FFIConverter();+})();++export type Sandbox = {+ namespace: string,+ claim: string,+ name: string,+ services: Array<string>+}++/**+ * Generated factory for {@link Sandbox} record objects.+ */+export const Sandbox = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<Sandbox, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<Sandbox>,+ });+})();++const FfiConverterTypeSandbox = (() => {+ type TypeName = Sandbox;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ namespace: FfiConverterString.read(from),+ claim: FfiConverterString.read(from),+ name: FfiConverterString.read(from),+ services: FfiConverterSequenceString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.namespace, into);+ FfiConverterString.write(value.claim, into);+ FfiConverterString.write(value.name, into);+ FfiConverterSequenceString.write(value.services, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.namespace) ++ FfiConverterString.allocationSize(value.claim) ++ FfiConverterString.allocationSize(value.name) ++ FfiConverterSequenceString.allocationSize(value.services);++ }+ };+ return new FFIConverter();+})();+++// Error type: HttpError+export enum HttpError_Tags {+ Transport = "Transport"+}+export const HttpError = (() => {++ type Transport__interface = {+ tag: HttpError_Tags.Transport;+ inner:+Readonly<{reason: string}>+ };+ class Transport_ extends UniffiError implements Transport__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "HttpError";+ readonly tag = HttpError_Tags.Transport;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("HttpError", "Transport");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Transport_ {+ return new Transport_(inner);+ }++ static instanceOf(obj: any): obj is Transport_ {+ return obj.tag === HttpError_Tags.Transport;+ }+ static hasInner(obj: any): obj is Transport_ {+ return Transport_.instanceOf(obj);+ }++ static getInner(obj: Transport_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ function instanceOf(obj: any): obj is HttpError {+ return obj[uniffiTypeNameSymbol] === "HttpError";+ }++ return Object.freeze({+ instanceOf,+ Transport: Transport_+ });++})();+export type HttpError = InstanceType<+ typeof HttpError['Transport']+>;++// FfiConverter for enum HttpError+const FfiConverterTypeHttpError = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = HttpError;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return new HttpError.Transport({reason: FfiConverterString.read(from) });+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value.tag) {+ case HttpError_Tags.Transport: {+ ordinalConverter.write(1, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ default:+ // Throwing from here means that HttpError_Tags hasn't matched an ordinal.+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ allocationSize(value: TypeName): number {+ switch (value.tag) {+ case HttpError_Tags.Transport: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(1);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ }+ return new FFIConverter();+})();+++// Error type: SdkError+export enum SdkError_Tags {+ Configuration = "Configuration",+ InvalidResourceName = "InvalidResourceName",+ Transport = "Transport",+ Token = "Token",+ Body = "Body",+ Status = "Status",+ UnknownService = "UnknownService",+ InvalidServicePath = "InvalidServicePath",+ ClaimFailed = "ClaimFailed",+ ClaimTimeout = "ClaimTimeout"+}+export const SdkError = (() => {++ type Configuration__interface = {+ tag: SdkError_Tags.Configuration;+ inner:+Readonly<{reason: string}>+ };+ class Configuration_ extends UniffiError implements Configuration__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.Configuration;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("SdkError", "Configuration");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Configuration_ {+ return new Configuration_(inner);+ }++ static instanceOf(obj: any): obj is Configuration_ {+ return obj.tag === SdkError_Tags.Configuration;+ }+ static hasInner(obj: any): obj is Configuration_ {+ return Configuration_.instanceOf(obj);+ }++ static getInner(obj: Configuration_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ type InvalidResourceName__interface = {+ tag: SdkError_Tags.InvalidResourceName;+ inner:+Readonly<{field: string; value: string; reason: string}>+ };+ class InvalidResourceName_ extends UniffiError implements InvalidResourceName__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.InvalidResourceName;+ readonly inner:+Readonly<{field: string; value: string; reason: string}>;+ constructor(+inner: {field: string; value: string; reason: string }) {+ super("SdkError", "InvalidResourceName");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {field: string; value: string; reason: string }): InvalidResourceName_ {+ return new InvalidResourceName_(inner);+ }++ static instanceOf(obj: any): obj is InvalidResourceName_ {+ return obj.tag === SdkError_Tags.InvalidResourceName;+ }+ static hasInner(obj: any): obj is InvalidResourceName_ {+ return InvalidResourceName_.instanceOf(obj);+ }++ static getInner(obj: InvalidResourceName_):+Readonly<{field: string; value: string; reason: string}> {+ return obj.inner;+ }++ }++ type Transport__interface = {+ tag: SdkError_Tags.Transport;+ inner:+Readonly<{reason: string}>+ };+ class Transport_ extends UniffiError implements Transport__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.Transport;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("SdkError", "Transport");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Transport_ {+ return new Transport_(inner);+ }++ static instanceOf(obj: any): obj is Transport_ {+ return obj.tag === SdkError_Tags.Transport;+ }+ static hasInner(obj: any): obj is Transport_ {+ return Transport_.instanceOf(obj);+ }++ static getInner(obj: Transport_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ type Token__interface = {+ tag: SdkError_Tags.Token;+ inner:+Readonly<{reason: string}>+ };+ class Token_ extends UniffiError implements Token__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.Token;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("SdkError", "Token");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Token_ {+ return new Token_(inner);+ }++ static instanceOf(obj: any): obj is Token_ {+ return obj.tag === SdkError_Tags.Token;+ }+ static hasInner(obj: any): obj is Token_ {+ return Token_.instanceOf(obj);+ }++ static getInner(obj: Token_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ type Body__interface = {+ tag: SdkError_Tags.Body;+ inner:+Readonly<{reason: string}>+ };+ class Body_ extends UniffiError implements Body__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.Body;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("SdkError", "Body");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Body_ {+ return new Body_(inner);+ }++ static instanceOf(obj: any): obj is Body_ {+ return obj.tag === SdkError_Tags.Body;+ }+ static hasInner(obj: any): obj is Body_ {+ return Body_.instanceOf(obj);+ }++ static getInner(obj: Body_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ type Status__interface = {+ tag: SdkError_Tags.Status;+ inner:+Readonly<{operation: string; status: number; body: string}>+ };+ class Status_ extends UniffiError implements Status__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.Status;+ readonly inner:+Readonly<{operation: string; status: number; body: string}>;+ constructor(+inner: {operation: string; status: number; body: string }) {+ super("SdkError", "Status");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {operation: string; status: number; body: string }): Status_ {+ return new Status_(inner);+ }++ static instanceOf(obj: any): obj is Status_ {+ return obj.tag === SdkError_Tags.Status;+ }+ static hasInner(obj: any): obj is Status_ {+ return Status_.instanceOf(obj);+ }++ static getInner(obj: Status_):+Readonly<{operation: string; status: number; body: string}> {+ return obj.inner;+ }++ }++ type UnknownService__interface = {+ tag: SdkError_Tags.UnknownService;+ inner:+Readonly<{requested: string; available: Array<string>}>+ };+ class UnknownService_ extends UniffiError implements UnknownService__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.UnknownService;+ readonly inner:+Readonly<{requested: string; available: Array<string>}>;+ constructor(+inner: {requested: string; available: Array<string> }) {+ super("SdkError", "UnknownService");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {requested: string; available: Array<string> }): UnknownService_ {+ return new UnknownService_(inner);+ }++ static instanceOf(obj: any): obj is UnknownService_ {+ return obj.tag === SdkError_Tags.UnknownService;+ }+ static hasInner(obj: any): obj is UnknownService_ {+ return UnknownService_.instanceOf(obj);+ }++ static getInner(obj: UnknownService_):+Readonly<{requested: string; available: Array<string>}> {+ return obj.inner;+ }++ }++ type InvalidServicePath__interface = {+ tag: SdkError_Tags.InvalidServicePath;+ inner:+Readonly<{path: string}>+ };+ class InvalidServicePath_ extends UniffiError implements InvalidServicePath__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.InvalidServicePath;+ readonly inner:+Readonly<{path: string}>;+ constructor(+inner: {path: string }) {+ super("SdkError", "InvalidServicePath");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {path: string }): InvalidServicePath_ {+ return new InvalidServicePath_(inner);+ }++ static instanceOf(obj: any): obj is InvalidServicePath_ {+ return obj.tag === SdkError_Tags.InvalidServicePath;+ }+ static hasInner(obj: any): obj is InvalidServicePath_ {+ return InvalidServicePath_.instanceOf(obj);+ }++ static getInner(obj: InvalidServicePath_):+Readonly<{path: string}> {+ return obj.inner;+ }++ }++ type ClaimFailed__interface = {+ tag: SdkError_Tags.ClaimFailed;+ inner:+Readonly<{phase: string; status: string}>+ };+ class ClaimFailed_ extends UniffiError implements ClaimFailed__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.ClaimFailed;+ readonly inner:+Readonly<{phase: string; status: string}>;+ constructor(+inner: {phase: string; status: string }) {+ super("SdkError", "ClaimFailed");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {phase: string; status: string }): ClaimFailed_ {+ return new ClaimFailed_(inner);+ }++ static instanceOf(obj: any): obj is ClaimFailed_ {+ return obj.tag === SdkError_Tags.ClaimFailed;+ }+ static hasInner(obj: any): obj is ClaimFailed_ {+ return ClaimFailed_.instanceOf(obj);+ }++ static getInner(obj: ClaimFailed_):+Readonly<{phase: string; status: string}> {+ return obj.inner;+ }++ }++ type ClaimTimeout__interface = {+ tag: SdkError_Tags.ClaimTimeout+ };+ class ClaimTimeout_ extends UniffiError implements ClaimTimeout__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "SdkError";+ readonly tag = SdkError_Tags.ClaimTimeout;+ constructor() {+ super("SdkError", "ClaimTimeout");+ }++ static new(): ClaimTimeout_ {+ return new ClaimTimeout_();+ }++ static instanceOf(obj: any): obj is ClaimTimeout_ {+ return obj.tag === SdkError_Tags.ClaimTimeout;+ }+ static hasInner(obj: any): obj is ClaimTimeout_ {+ return false;+ }++ }++ function instanceOf(obj: any): obj is SdkError {+ return obj[uniffiTypeNameSymbol] === "SdkError";+ }++ return Object.freeze({+ instanceOf,+ Configuration: Configuration_,+ InvalidResourceName: InvalidResourceName_,+ Transport: Transport_,+ Token: Token_,+ Body: Body_,+ Status: Status_,+ UnknownService: UnknownService_,+ InvalidServicePath: InvalidServicePath_,+ ClaimFailed: ClaimFailed_,+ ClaimTimeout: ClaimTimeout_+ });++})();+export type SdkError = InstanceType<+ typeof SdkError['Configuration' | 'InvalidResourceName' | 'Transport' | 'Token' | 'Body' | 'Status' | 'UnknownService' | 'InvalidServicePath' | 'ClaimFailed' | 'ClaimTimeout']+>;++// FfiConverter for enum SdkError+const FfiConverterTypeSdkError = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = SdkError;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return new SdkError.Configuration({reason: FfiConverterString.read(from) });+ case 2: return new SdkError.InvalidResourceName({field: FfiConverterString.read(from), value: FfiConverterString.read(from), reason: FfiConverterString.read(from) });+ case 3: return new SdkError.Transport({reason: FfiConverterString.read(from) });+ case 4: return new SdkError.Token({reason: FfiConverterString.read(from) });+ case 5: return new SdkError.Body({reason: FfiConverterString.read(from) });+ case 6: return new SdkError.Status({operation: FfiConverterString.read(from), status: FfiConverterUInt16.read(from), body: FfiConverterString.read(from) });+ case 7: return new SdkError.UnknownService({requested: FfiConverterString.read(from), available: FfiConverterSequenceString.read(from) });+ case 8: return new SdkError.InvalidServicePath({path: FfiConverterString.read(from) });+ case 9: return new SdkError.ClaimFailed({phase: FfiConverterString.read(from), status: FfiConverterString.read(from) });+ case 10: return new SdkError.ClaimTimeout();+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value.tag) {+ case SdkError_Tags.Configuration: {+ ordinalConverter.write(1, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ case SdkError_Tags.InvalidResourceName: {+ ordinalConverter.write(2, into);+ const inner = value.inner;+ FfiConverterString.write(inner.field, into);+ FfiConverterString.write(inner.value, into);+ FfiConverterString.write(inner.reason, into);+ return;+ }+ case SdkError_Tags.Transport: {+ ordinalConverter.write(3, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ case SdkError_Tags.Token: {+ ordinalConverter.write(4, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ case SdkError_Tags.Body: {+ ordinalConverter.write(5, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ case SdkError_Tags.Status: {+ ordinalConverter.write(6, into);+ const inner = value.inner;+ FfiConverterString.write(inner.operation, into);+ FfiConverterUInt16.write(inner.status, into);+ FfiConverterString.write(inner.body, into);+ return;+ }+ case SdkError_Tags.UnknownService: {+ ordinalConverter.write(7, into);+ const inner = value.inner;+ FfiConverterString.write(inner.requested, into);+ FfiConverterSequenceString.write(inner.available, into);+ return;+ }+ case SdkError_Tags.InvalidServicePath: {+ ordinalConverter.write(8, into);+ const inner = value.inner;+ FfiConverterString.write(inner.path, into);+ return;+ }+ case SdkError_Tags.ClaimFailed: {+ ordinalConverter.write(9, into);+ const inner = value.inner;+ FfiConverterString.write(inner.phase, into);+ FfiConverterString.write(inner.status, into);+ return;+ }+ case SdkError_Tags.ClaimTimeout: {+ ordinalConverter.write(10, into);+ return;+ }+ default:+ // Throwing from here means that SdkError_Tags hasn't matched an ordinal.+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ allocationSize(value: TypeName): number {+ switch (value.tag) {+ case SdkError_Tags.Configuration: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(1);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ case SdkError_Tags.InvalidResourceName: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(2);+ size += FfiConverterString.allocationSize(inner.field);+ size += FfiConverterString.allocationSize(inner.value);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ case SdkError_Tags.Transport: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(3);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ case SdkError_Tags.Token: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(4);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ case SdkError_Tags.Body: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(5);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ case SdkError_Tags.Status: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(6);+ size += FfiConverterString.allocationSize(inner.operation);+ size += FfiConverterUInt16.allocationSize(inner.status);+ size += FfiConverterString.allocationSize(inner.body);+ return size;+ }+ case SdkError_Tags.UnknownService: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(7);+ size += FfiConverterString.allocationSize(inner.requested);+ size += FfiConverterSequenceString.allocationSize(inner.available);+ return size;+ }+ case SdkError_Tags.InvalidServicePath: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(8);+ size += FfiConverterString.allocationSize(inner.path);+ return size;+ }+ case SdkError_Tags.ClaimFailed: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(9);+ size += FfiConverterString.allocationSize(inner.phase);+ size += FfiConverterString.allocationSize(inner.status);+ return size;+ }+ case SdkError_Tags.ClaimTimeout: {+ return ordinalConverter.allocationSize(10);+ }+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ }+ return new FFIConverter();+})();++export interface CyclopsClientLike {++ createClaim(request: CreateClaimRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Claim>;+ createPool(request: CreatePoolRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Pool>;+ deleteClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;+ deletePool(pool: Pool, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;+ getClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Claim>;+ getPool(pool: Pool, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Pool>;+ listClaims(namespace: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Array<Claim>>;+ listPools(namespace: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Array<Pool>>;+ serviceRequest(sandbox: Sandbox, service: string, path: string, request: HttpRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<HttpResponse>;+ updatePool(pool: Pool, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Pool>;+ 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().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),+ ));+ }++++ async createClaim(request: CreateClaimRequest, asyncOpts_?: { signal: AbortSignal }): Promise<Claim> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_create_claim(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeCreateClaimRequest.lower(request, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeClaim.lift.bind(FfiConverterTypeClaim),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }++ async createPool(request: CreatePoolRequest, asyncOpts_?: { signal: AbortSignal }): Promise<Pool> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_create_pool(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeCreatePoolRequest.lower(request, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypePool.lift.bind(FfiConverterTypePool),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }++ async deleteClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_claim(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeClaim.lower(claim, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_void,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_void,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_void,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_void,+ /*liftFunc:*/ (_v) => {},+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }++ async deletePool(pool: Pool, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_delete_pool(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypePool.lower(pool, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_void,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_void,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_void,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_void,+ /*liftFunc:*/ (_v) => {},+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }++ async getClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }): Promise<Claim> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_get_claim(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeClaim.lower(claim, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeClaim.lift.bind(FfiConverterTypeClaim),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }++ async getPool(pool: Pool, asyncOpts_?: { signal: AbortSignal }): Promise<Pool> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_get_pool(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypePool.lower(pool, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypePool.lift.bind(FfiConverterTypePool),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }++ async listClaims(namespace: string, asyncOpts_?: { signal: AbortSignal }): Promise<Array<Claim>> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_list_claims(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterString.lower(namespace, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterSequenceTypeClaim.lift.bind(FfiConverterSequenceTypeClaim),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }++ async listPools(namespace: string, asyncOpts_?: { signal: AbortSignal }): Promise<Array<Pool>> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_list_pools(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterString.lower(namespace, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterSequenceTypePool.lift.bind(FfiConverterSequenceTypePool),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }++ async serviceRequest(sandbox: Sandbox, service: string, path: string, request: HttpRequest, asyncOpts_?: { signal: AbortSignal }): Promise<HttpResponse> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_service_request(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeSandbox.lower(sandbox, nativeModule().rustbuffer_alloc),FfiConverterString.lower(service, nativeModule().rustbuffer_alloc),FfiConverterString.lower(path, nativeModule().rustbuffer_alloc),FfiConverterTypeHttpRequest.lower(request, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeHttpResponse.lift.bind(FfiConverterTypeHttpResponse),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }++ async updatePool(pool: Pool, asyncOpts_?: { signal: AbortSignal }): Promise<Pool> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_update_pool(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypePool.lower(pool, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypePool.lift.bind(FfiConverterTypePool),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }++ async waitClaim(claim: Claim, asyncOpts_?: { signal: AbortSignal }): Promise<Sandbox> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_cyclopsclient_wait_claim(+ uniffiTypeCyclopsClientObjectFactory.clonePointer(this),FfiConverterTypeClaim.lower(claim, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeSandbox.lift.bind(FfiConverterTypeSandbox),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }+++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer = uniffiTypeCyclopsClientObjectFactory.pointer(this);+ uniffiTypeCyclopsClientObjectFactory.freePointer(pointer);+ uniffiTypeCyclopsClientObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ 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().uniffi_cyclops_sdk_fn_clone_cyclopsclient(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().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 HttpClient {++ execute(request: HttpRequest, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<HttpResponse>;+}+++export class HttpClientImpl extends UniffiAbstractObject implements HttpClient {++ readonly [uniffiTypeNameSymbol] = "HttpClientImpl";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ // No primary constructor declared for this class.+private constructor(pointer: UniffiHandle) {+ super();+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] = uniffiTypeHttpClientImplObjectFactory.bless(pointer);+}+++++ async execute(request: HttpRequest, asyncOpts_?: { signal: AbortSignal }): Promise<HttpResponse> /*throws*/ {+ const __stack = uniffiIsDebug ? new Error().stack : undefined;+ try {+ return await uniffiRustCallAsync(+ /*rustCaller:*/ uniffiCaller,+ /*rustFutureFunc:*/ () => {+ return nativeModule().uniffi_cyclops_sdk_fn_method_httpclient_execute(+ uniffiTypeHttpClientImplObjectFactory.clonePointer(this),FfiConverterTypeHttpRequest.lower(request, nativeModule().rustbuffer_alloc)+ );+ },+ /*pollFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_poll_rust_buffer,+ /*cancelFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_cancel_rust_buffer,+ /*completeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_complete_rust_buffer,+ /*freeFunc:*/ nativeModule().ffi_cyclops_sdk_rust_future_free_rust_buffer,+ // Async returns always go through the JS-side converter: the+ // FFI symbol returns the future handle (u64), and the user-level+ // RustBuffer comes back via the shared `rust_future_complete_*`+ // export. The bytes the runtime hands back must be deserialized+ // here using the per-callable return-type converter.+ /*liftFunc:*/ FfiConverterTypeHttpResponse.lift.bind(FfiConverterTypeHttpResponse),+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ /*asyncOpts:*/ asyncOpts_,+ /*errorHandler:*/ FfiConverterTypeHttpError.lift.bind(FfiConverterTypeHttpError)+ );+ } catch (__error: any) {+ if (uniffiIsDebug && __error instanceof Error) {+ __error.stack = __stack;+ }+ throw __error;+ }+ }+++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ 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().uniffi_cyclops_sdk_fn_clone_httpclient(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().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().uniffi_cyclops_sdk_fn_init_callback_vtable_httpclient(+ uniffiCallbackInterfaceHttpClient.vtable+ );+ },+};++// FfiConverter for Map<string, string>+const FfiConverterMapStringString = new FfiConverterMap(FfiConverterString, FfiConverterString);++// FfiConverter for Map<string, string> | undefined+const FfiConverterOptionalMapStringString = new FfiConverterOptional(FfiConverterMapStringString);++// FfiConverter for OsGymSandboxClaimStatus | undefined+const FfiConverterOptionalTypeOSGymSandboxClaimStatus = new FfiConverterOptional(FfiConverterTypeOSGymSandboxClaimStatus);++// FfiConverter for OsGymWorkspacePoolStatus | undefined+const FfiConverterOptionalTypeOSGymWorkspacePoolStatus = new FfiConverterOptional(FfiConverterTypeOSGymWorkspacePoolStatus);++// FfiConverter for ClaimSpec | undefined+const FfiConverterOptionalTypeClaimSpec = new FfiConverterOptional(FfiConverterTypeClaimSpec);++// FfiConverter for Array<HttpHeader>+const FfiConverterSequenceTypeHttpHeader = new FfiConverterArray(FfiConverterTypeHttpHeader);++// FfiConverter for ArrayBuffer | undefined+const FfiConverterOptionalBytes = new FfiConverterOptional(FfiConverterArrayBuffer);++// FfiConverter for Array<string>+const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);++// FfiConverter for Array<Claim>+const FfiConverterSequenceTypeClaim = new FfiConverterArray(FfiConverterTypeClaim);++// FfiConverter for Array<Pool>+const FfiConverterSequenceTypePool = new FfiConverterArray(FfiConverterTypePool);+++/**+ * This should be called before anything else.+ *+ * It is likely that this is being done for you by the library's `index.ts`.+ *+ * It checks versions of uniffi between when the Rust scaffolding was generated+ * and when the bindings were generated.+ *+ * It also initializes the machinery to enable Rust to talk back to Javascript.+ */+function uniffiEnsureInitialized() {+ // Get the bindings contract version from our ComponentInterface+ const bindingsContractVersion = 30;+ // Get the scaffolding contract version by calling the into the dylib+ const scaffoldingContractVersion = nativeModule().ffi_cyclops_sdk_uniffi_contract_version();+ if (bindingsContractVersion !== scaffoldingContractVersion) {+ throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect() !== 54404) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_constructor_cyclopsclient_connect");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim() !== 23330) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_claim");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool() !== 48557) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_create_pool");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim() !== 20460) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_claim");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool() !== 31235) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_delete_pool");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim() !== 17760) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_claim");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool() !== 43327) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_get_pool");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims() !== 7802) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_claims");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools() !== 27984) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_list_pools");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request() !== 46699) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_service_request");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool() !== 17695) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_update_pool");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim() !== 18984) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_cyclopsclient_wait_claim");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new() !== 25746) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_constructor_cyclopscredentials_new");+ }+ if (nativeModule().uniffi_cyclops_sdk_checksum_method_httpclient_execute() !== 38803) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_checksum_method_httpclient_execute");+ }++ uniffiCallbackInterfaceHttpClient.register();+ }++export default Object.freeze({+ initialize: uniffiEnsureInitialized,+ converters: {+ FfiConverterTypeClaim,+ FfiConverterTypeCreateClaimRequest,+ FfiConverterTypeCreatePoolRequest,+ FfiConverterTypeCyclopsClient,+ FfiConverterTypeCyclopsConfiguration,+ FfiConverterTypeCyclopsCredentials,+ FfiConverterTypeHttpClient,+ FfiConverterTypeHttpError,+ FfiConverterTypeHttpHeader,+ FfiConverterTypeHttpRequest,+ FfiConverterTypeHttpResponse,+ FfiConverterTypePool,+ FfiConverterTypeResourceMetadata,+ FfiConverterTypeSandbox,+ FfiConverterTypeSdkError,+ }+});\ No newline at end of filediff --git a/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema-ffi.ts b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema-ffi.tsnew file mode 100644index 0000000000..6f7788b709--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema-ffi.ts@@ -0,0 +1,423 @@+// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.+// Trust me, you don't want to mess with it!+/* tslint:disable */+/* eslint-disable */+// @ts-nocheck++import lib from "@ubjs/node";+const { UniffiNativeModule, FfiType, resolveLibPath } = lib;++import {+ type StructuralEquality as UniffiStructuralEquality,+ type UniffiForeignFuture as RuntimeUniffiForeignFuture,+ type UniffiRustCallStatus,+ type UniffiGcObject,+ type UniffiRustFutureContinuationCallback as RuntimeUniffiRustFutureContinuationCallback,+ type UniffiResult,+} from '@ubjs/core';++const DEFINITIONS = {+ symbols: {+ rustbuffer_alloc: "ffi_cyclops_sdk_schema_rustbuffer_alloc",+ rustbuffer_free: "ffi_cyclops_sdk_schema_rustbuffer_free",+ rustbuffer_from_bytes: "ffi_cyclops_sdk_schema_rustbuffer_from_bytes",+ },+ functions: {+ "ffi_cyclops_sdk_schema_rust_future_poll_u8": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_u8": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_u8": {+ args: [FfiType.Handle],+ ret: FfiType.UInt8,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_u8": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_i8": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_i8": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_i8": {+ args: [FfiType.Handle],+ ret: FfiType.Int8,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_i8": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_u16": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_u16": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_u16": {+ args: [FfiType.Handle],+ ret: FfiType.UInt16,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_u16": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_i16": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_i16": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_i16": {+ args: [FfiType.Handle],+ ret: FfiType.Int16,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_i16": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_u32": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_u32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_u32": {+ args: [FfiType.Handle],+ ret: FfiType.UInt32,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_u32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_i32": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_i32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_i32": {+ args: [FfiType.Handle],+ ret: FfiType.Int32,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_i32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_u64": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_u64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_u64": {+ args: [FfiType.Handle],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_u64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_i64": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_i64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_i64": {+ args: [FfiType.Handle],+ ret: FfiType.Int64,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_i64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_f32": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_f32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_f32": {+ args: [FfiType.Handle],+ ret: FfiType.Float32,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_f32": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_f64": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_f64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_f64": {+ args: [FfiType.Handle],+ ret: FfiType.Float64,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_f64": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_rust_buffer": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_rust_buffer": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_rust_buffer": {+ args: [FfiType.Handle],+ ret: FfiType.RustBuffer,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_rust_buffer": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_poll_void": {+ args: [FfiType.Handle, FfiType.Callback("RustFutureContinuationCallback"), FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_cancel_void": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ffi_cyclops_sdk_schema_rust_future_complete_void": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_rust_future_free_void": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_schema_fn_clone_preservedjson": {+ args: [FfiType.Handle],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_schema_fn_free_preservedjson": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq": {+ args: [FfiType.RustBuffer, FfiType.RustBuffer],+ ret: FfiType.Int8,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_ne": {+ args: [FfiType.RustBuffer, FfiType.RustBuffer],+ ret: FfiType.Int8,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash": {+ args: [FfiType.RustBuffer],+ ret: FfiType.UInt64,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json": {+ args: [FfiType.RustBuffer],+ ret: FfiType.Handle,+ hasRustCallStatus: true,+ },+ "uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json": {+ args: [FfiType.Handle],+ ret: FfiType.RustBuffer,+ hasRustCallStatus: true,+ },+ "ffi_cyclops_sdk_schema_uniffi_contract_version": {+ args: [],+ ret: FfiType.UInt32,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ "uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json": {+ args: [],+ ret: FfiType.UInt16,+ hasRustCallStatus: false,+ },+ },+ callbacks: {+ "RustFutureContinuationCallback": {+ args: [FfiType.Handle, FfiType.Int8],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ "ForeignFutureDroppedCallback": {+ args: [FfiType.Handle],+ ret: FfiType.Void,+ hasRustCallStatus: false,+ },+ },+ structs: {+ "ForeignFutureDroppedCallbackStruct": [+ { name: "handle", type: FfiType.Handle },+ { name: "free", type: FfiType.Callback("ForeignFutureDroppedCallback") },+ ],+ },+} as const;++interface NativeModuleInterface {+ ffi_cyclops_sdk_schema_rust_future_poll_u8(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_u8(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_u8(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_schema_rust_future_free_u8(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_i8(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_i8(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_i8(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_schema_rust_future_free_i8(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_u16(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_u16(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_u16(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_schema_rust_future_free_u16(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_i16(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_i16(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_i16(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_schema_rust_future_free_i16(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_u32(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_u32(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_u32(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_schema_rust_future_free_u32(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_i32(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_i32(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_i32(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_schema_rust_future_free_i32(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_u64(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_u64(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_u64(handle: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ ffi_cyclops_sdk_schema_rust_future_free_u64(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_i64(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_i64(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_i64(handle: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ ffi_cyclops_sdk_schema_rust_future_free_i64(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_f32(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_f32(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_f32(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_schema_rust_future_free_f32(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_f64(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_f64(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_f64(handle: bigint, uniffi_out_err: UniffiRustCallStatus): number;+ ffi_cyclops_sdk_schema_rust_future_free_f64(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_rust_buffer(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_rust_buffer(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_rust_buffer(handle: bigint, uniffi_out_err: UniffiRustCallStatus): Uint8Array;+ ffi_cyclops_sdk_schema_rust_future_free_rust_buffer(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_poll_void(handle: bigint, callback: UniffiRustFutureContinuationCallback, callbackData: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_cancel_void(handle: bigint): void;+ ffi_cyclops_sdk_schema_rust_future_complete_void(handle: bigint, uniffi_out_err: UniffiRustCallStatus): void;+ ffi_cyclops_sdk_schema_rust_future_free_void(handle: bigint): void;+ uniffi_cyclops_sdk_schema_fn_clone_preservedjson(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_schema_fn_free_preservedjson(ptr: bigint, uniffi_out_err: UniffiRustCallStatus): void;+ uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq(uniffiSelf: Uint8Array, other: Uint8Array, uniffi_out_err: UniffiRustCallStatus): number;+ uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_ne(uniffiSelf: Uint8Array, other: Uint8Array, uniffi_out_err: UniffiRustCallStatus): number;+ uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash(uniffiSelf: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(value: Uint8Array, uniffi_out_err: UniffiRustCallStatus): bigint;+ uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json(uniffiSelf: bigint, uniffi_out_err: UniffiRustCallStatus): Uint8Array;+ ffi_cyclops_sdk_schema_uniffi_contract_version(): number;+ uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json(): number;+ uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json(): number;+ // Codegen call sites use these via `nativeModule().rustbuffer_alloc(...)`+ // and `nativeModule().rustbuffer_free(...)`. The runtime's registered+ // module exposes them as method properties.+ rustbuffer_alloc(n: number): Uint8Array;+ rustbuffer_free(view: Uint8Array): void;+}++let _nativeModule: NativeModuleInterface | undefined;+const getter: () => NativeModuleInterface = () => {+ if (!_nativeModule) {+ const libPath = resolveLibPath({+ crateName: "cyclops_sdk_schema",+ callerUrl: import.meta.url,+ });+ const mod_ = UniffiNativeModule.open(libPath);+ _nativeModule = mod_.register(DEFINITIONS) as unknown as NativeModuleInterface;+ }+ return _nativeModule;+};+export default getter;++// Structs and function types for calling back into Typescript from Rust.+export type UniffiRustFutureContinuationCallback = (data: bigint, pollResult: number) => void;+export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void;+export type UniffiForeignFutureDroppedCallbackStruct = {+ handle: bigint;+ free: UniffiForeignFutureDroppedCallback;+};\ No newline at end of filediff --git a/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema.ts b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema.tsnew file mode 100644index 0000000000..95e45c47b4--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi/cyclops_sdk_schema.ts@@ -0,0 +1,1489 @@+// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.+// Trust me, you don't want to mess with it!+/* tslint:disable */+/* eslint-disable */+// @ts-nocheck+import nativeModule from "./cyclops_sdk_schema-ffi";+import { type UniffiRustFutureContinuationCallback, type UniffiForeignFutureDroppedCallback, type UniffiForeignFutureDroppedCallbackStruct,+} from "./cyclops_sdk_schema-ffi";+import { type FfiConverter, type UniffiByteArray, type UniffiGcObject, type UniffiHandle, type UniffiObjectFactory, AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterInt32, FfiConverterMap, FfiConverterObject, FfiConverterOptional, FfiConverterUInt16, FfiConverterUInt32, FfiConverterUInt64, FfiConverterUInt8, RustBuffer, UniffiAbstractObject, UniffiEnum, UniffiError, UniffiInternalError, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiTypeNameSymbol, variantOrdinalSymbol,+} from "@ubjs/core";+const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));++const uniffiIsDebug =+ // @ts-ignore -- The process global might not be defined+ typeof process !== "object" ||+ // @ts-ignore -- The process global might not be defined+ process?.env?.NODE_ENV !== "production" ||+ false;++// Public interface members begin here.++const stringConverter = (() => {+ const encoder = new TextEncoder();+ const decoder = new TextDecoder();+ return {+ stringToBytes: (s: string) => encoder.encode(s),+ bytesToString: (ab: UniffiByteArray) => decoder.decode(ab),+ stringByteLength: (s: string) => encoder.encode(s).byteLength,+ writeStringIntoBuffer: (s: string, buf: any, offset: number): number => {+ const view = new Uint8Array(+ buf.arrayBuffer,+ offset,+ buf.arrayBuffer.byteLength - offset,+ );+ return encoder.encodeInto(s, view).written;+ },+ readStringFromBuffer: (buf: any, offset: number, length: number): string =>+ decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length)),+ };+})();+const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);++export type ClaimLifecycle = {+ shutdownTime?: string,+ shutdownPolicy?: string,+ autoRenew?: boolean+}++/**+ * Generated factory for {@link ClaimLifecycle} record objects.+ */+export const ClaimLifecycle = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<ClaimLifecycle, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<ClaimLifecycle>,+ });+})();++const FfiConverterTypeClaimLifecycle = (() => {+ type TypeName = ClaimLifecycle;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ shutdownTime: FfiConverterOptionalString.read(from),+ shutdownPolicy: FfiConverterOptionalString.read(from),+ autoRenew: FfiConverterOptionalBoolean.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.shutdownTime, into);+ FfiConverterOptionalString.write(value.shutdownPolicy, into);+ FfiConverterOptionalBoolean.write(value.autoRenew, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.shutdownTime) ++ FfiConverterOptionalString.allocationSize(value.shutdownPolicy) ++ FfiConverterOptionalBoolean.allocationSize(value.autoRenew);++ }+ };+ return new FFIConverter();+})();++export type SandboxTemplateRef = {+ name: string+}++/**+ * Generated factory for {@link SandboxTemplateRef} record objects.+ */+export const SandboxTemplateRef = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<SandboxTemplateRef, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<SandboxTemplateRef>,+ });+})();++const FfiConverterTypeSandboxTemplateRef = (() => {+ type TypeName = SandboxTemplateRef;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ name: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.name, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.name);++ }+ };+ return new FFIConverter();+})();++export type ClaimSpec = {+ sandboxTemplateRef: SandboxTemplateRef,+ warmpool?: string,+ bindDeadline?: number,+ lifecycle?: ClaimLifecycle+}++/**+ * Generated factory for {@link ClaimSpec} record objects.+ */+export const ClaimSpec = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<ClaimSpec, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<ClaimSpec>,+ });+})();++const FfiConverterTypeClaimSpec = (() => {+ type TypeName = ClaimSpec;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ sandboxTemplateRef: FfiConverterTypeSandboxTemplateRef.read(from),+ warmpool: FfiConverterOptionalString.read(from),+ bindDeadline: FfiConverterOptionalUInt32.read(from),+ lifecycle: FfiConverterOptionalTypeClaimLifecycle.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterTypeSandboxTemplateRef.write(value.sandboxTemplateRef, into);+ FfiConverterOptionalString.write(value.warmpool, into);+ FfiConverterOptionalUInt32.write(value.bindDeadline, into);+ FfiConverterOptionalTypeClaimLifecycle.write(value.lifecycle, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterTypeSandboxTemplateRef.allocationSize(value.sandboxTemplateRef) ++ FfiConverterOptionalString.allocationSize(value.warmpool) ++ FfiConverterOptionalUInt32.allocationSize(value.bindDeadline) ++ FfiConverterOptionalTypeClaimLifecycle.allocationSize(value.lifecycle);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxClaimCondition = {+ type?: string,+ status?: string,+ reason?: string,+ message?: string,+ lastTransitionTime?: string+}++/**+ * Generated factory for {@link OsGymSandboxClaimCondition} record objects.+ */+export const OsGymSandboxClaimCondition = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxClaimCondition, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxClaimCondition>,+ });+})();++const FfiConverterTypeOSGymSandboxClaimCondition = (() => {+ type TypeName = OsGymSandboxClaimCondition;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ type: FfiConverterOptionalString.read(from),+ status: FfiConverterOptionalString.read(from),+ reason: FfiConverterOptionalString.read(from),+ message: FfiConverterOptionalString.read(from),+ lastTransitionTime: FfiConverterOptionalString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.type, into);+ FfiConverterOptionalString.write(value.status, into);+ FfiConverterOptionalString.write(value.reason, into);+ FfiConverterOptionalString.write(value.message, into);+ FfiConverterOptionalString.write(value.lastTransitionTime, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.type) ++ FfiConverterOptionalString.allocationSize(value.status) ++ FfiConverterOptionalString.allocationSize(value.reason) ++ FfiConverterOptionalString.allocationSize(value.message) ++ FfiConverterOptionalString.allocationSize(value.lastTransitionTime);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxClaimSandbox = {+ name?: string,+ service?: string+}++/**+ * Generated factory for {@link OsGymSandboxClaimSandbox} record objects.+ */+export const OsGymSandboxClaimSandbox = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxClaimSandbox, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxClaimSandbox>,+ });+})();++const FfiConverterTypeOSGymSandboxClaimSandbox = (() => {+ type TypeName = OsGymSandboxClaimSandbox;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ name: FfiConverterOptionalString.read(from),+ service: FfiConverterOptionalString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.name, into);+ FfiConverterOptionalString.write(value.service, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.name) ++ FfiConverterOptionalString.allocationSize(value.service);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxClaimStatus = {+ phase?: string,+ conditions?: Array<OsGymSandboxClaimCondition>,+ sandbox?: OsGymSandboxClaimSandbox+}++/**+ * Generated factory for {@link OsGymSandboxClaimStatus} record objects.+ */+export const OsGymSandboxClaimStatus = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxClaimStatus, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxClaimStatus>,+ });+})();++const FfiConverterTypeOSGymSandboxClaimStatus = (() => {+ type TypeName = OsGymSandboxClaimStatus;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ phase: FfiConverterOptionalString.read(from),+ conditions: FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition.read(from),+ sandbox: FfiConverterOptionalTypeOSGymSandboxClaimSandbox.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.phase, into);+ FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition.write(value.conditions, into);+ FfiConverterOptionalTypeOSGymSandboxClaimSandbox.write(value.sandbox, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.phase) ++ FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition.allocationSize(value.conditions) ++ FfiConverterOptionalTypeOSGymSandboxClaimSandbox.allocationSize(value.sandbox);++ }+ };+ return new FFIConverter();+})();++export enum RuntimeKind {+ Kubevirt,+ Macos,+ Gvisor+}++const FfiConverterTypeRuntimeKind = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = RuntimeKind;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return RuntimeKind.Kubevirt;+ case 2: return RuntimeKind.Macos;+ case 3: return RuntimeKind.Gvisor;+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value) {+ case RuntimeKind.Kubevirt: return ordinalConverter.write(1, into);+ case RuntimeKind.Macos: return ordinalConverter.write(2, into);+ case RuntimeKind.Gvisor: return ordinalConverter.write(3, into);+ }+ }+ allocationSize(value: TypeName): number {+ return ordinalConverter.allocationSize(0);+ }+ }+ return new FFIConverter();+})();++export interface PreservedJsonLike {++ toJson(): string;+}+/**+ * @deprecated Use `PreservedJsonLike` instead.+ */+export type PreservedJsonInterface = PreservedJsonLike;+++export class PreservedJson extends UniffiAbstractObject implements PreservedJsonLike {++ readonly [uniffiTypeNameSymbol] = "PreservedJson";+ readonly [destructorGuardSymbol]: UniffiGcObject;+ readonly [pointerLiteralSymbol]: UniffiHandle;+ // No primary constructor declared for this class.+private constructor(pointer: UniffiHandle) {+ super();+ this[pointerLiteralSymbol] = pointer;+ this[destructorGuardSymbol] = uniffiTypePreservedJsonObjectFactory.bless(pointer);+}+++ static fromJson(value: string): PreservedJsonLike /*throws*/ {+ return FfiConverterTypePreservedJson.lift(uniffiCaller.rustCallWithError(+ /*liftError:*/ FfiConverterTypeJsonValueError.lift.bind(FfiConverterTypeJsonValueError),+ /*caller:*/ (callStatus) => {+ return nativeModule().uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }++++ toJson(): string {+ return ((__rb: Uint8Array) => {+ try {+ return FfiConverterString.lift(__rb);+ } finally {+ nativeModule().rustbuffer_free(__rb);+ }+ })(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json(+ uniffiTypePreservedJsonObjectFactory.clonePointer(this),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ }+++ uniffiDestroy(): void {+ const ptr = (this as any)[destructorGuardSymbol];+ if (ptr !== undefined) {+ const pointer = uniffiTypePreservedJsonObjectFactory.pointer(this);+ uniffiTypePreservedJsonObjectFactory.freePointer(pointer);+ uniffiTypePreservedJsonObjectFactory.unbless(ptr);+ delete (this as any)[destructorGuardSymbol];+ }+ }++ static instanceOf(obj_: any): obj_ is PreservedJson {+ return uniffiTypePreservedJsonObjectFactory.isConcreteType(obj_);+ }+++}++const uniffiTypePreservedJsonObjectFactory: UniffiObjectFactory<PreservedJsonLike> = (() => {++ /// <reference lib="es2021" />+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {+ uniffiTypePreservedJsonObjectFactory.freePointer(heldValue);+ }) : null;++ return {+ create(pointer: UniffiHandle): PreservedJsonLike {+ const instance = Object.create(PreservedJson.prototype);+ instance[pointerLiteralSymbol] = pointer;+ instance[destructorGuardSymbol] = this.bless(pointer);+ instance[uniffiTypeNameSymbol] = "PreservedJson";+ 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_: PreservedJsonLike): UniffiHandle {+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {+ throw new UniffiInternalError.UnexpectedNullPointer();+ }+ return (obj_ as any)[pointerLiteralSymbol];+ },++ clonePointer(obj_: PreservedJsonLike): UniffiHandle {+ const pointer = this.pointer(obj_);+ return uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().uniffi_cyclops_sdk_schema_fn_clone_preservedjson(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ freePointer(pointer: UniffiHandle): void {+ uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => nativeModule().uniffi_cyclops_sdk_schema_fn_free_preservedjson(pointer, callStatus),+ /*liftString:*/ FfiConverterString.lift+ );+ },++ isConcreteType(obj_: any): obj_ is PreservedJsonLike {+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "PreservedJson";+ },+}})();+const FfiConverterTypePreservedJson = new FfiConverterObject(uniffiTypePreservedJsonObjectFactory);++export enum ImagePullPolicy {+ Always,+ IfNotPresent,+ Never+}++const FfiConverterTypeImagePullPolicy = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = ImagePullPolicy;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return ImagePullPolicy.Always;+ case 2: return ImagePullPolicy.IfNotPresent;+ case 3: return ImagePullPolicy.Never;+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value) {+ case ImagePullPolicy.Always: return ordinalConverter.write(1, into);+ case ImagePullPolicy.IfNotPresent: return ordinalConverter.write(2, into);+ case ImagePullPolicy.Never: return ordinalConverter.write(3, into);+ }+ }+ allocationSize(value: TypeName): number {+ return ordinalConverter.allocationSize(0);+ }+ }+ return new FFIConverter();+})();++export enum Firmware {+ Bios,+ Efi+}++const FfiConverterTypeFirmware = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = Firmware;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return Firmware.Bios;+ case 2: return Firmware.Efi;+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value) {+ case Firmware.Bios: return ordinalConverter.write(1, into);+ case Firmware.Efi: return ordinalConverter.write(2, into);+ }+ }+ allocationSize(value: TypeName): number {+ return ordinalConverter.allocationSize(0);+ }+ }+ return new FFIConverter();+})();++export enum ServiceProtocol {+ Tcp,+ Udp+}++const FfiConverterTypeServiceProtocol = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = ServiceProtocol;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return ServiceProtocol.Tcp;+ case 2: return ServiceProtocol.Udp;+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value) {+ case ServiceProtocol.Tcp: return ordinalConverter.write(1, into);+ case ServiceProtocol.Udp: return ordinalConverter.write(2, into);+ }+ }+ allocationSize(value: TypeName): number {+ return ordinalConverter.allocationSize(0);+ }+ }+ return new FFIConverter();+})();++export type SandboxService = {+ name: string,+ targetPort: number,+ protocol?: ServiceProtocol+}++/**+ * Generated factory for {@link SandboxService} record objects.+ */+export const SandboxService = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<SandboxService, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<SandboxService>,+ });+})();++const FfiConverterTypeSandboxService = (() => {+ type TypeName = SandboxService;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ name: FfiConverterString.read(from),+ targetPort: FfiConverterUInt16.read(from),+ protocol: FfiConverterOptionalTypeServiceProtocol.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.name, into);+ FfiConverterUInt16.write(value.targetPort, into);+ FfiConverterOptionalTypeServiceProtocol.write(value.protocol, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.name) ++ FfiConverterUInt16.allocationSize(value.targetPort) ++ FfiConverterOptionalTypeServiceProtocol.allocationSize(value.protocol);++ }+ };+ return new FFIConverter();+})();++export type OidcConfig = {+ credentialsSecret: string,+ tokenUrl: string,+ awsRoleArn?: string,+ awsRegion?: string,+ refreshIntervalSeconds?: number+}++/**+ * Generated factory for {@link OidcConfig} record objects.+ */+export const OidcConfig = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OidcConfig, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OidcConfig>,+ });+})();++const FfiConverterTypeOidcConfig = (() => {+ type TypeName = OidcConfig;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ credentialsSecret: FfiConverterString.read(from),+ tokenUrl: FfiConverterString.read(from),+ awsRoleArn: FfiConverterOptionalString.read(from),+ awsRegion: FfiConverterOptionalString.read(from),+ refreshIntervalSeconds: FfiConverterOptionalUInt32.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.credentialsSecret, into);+ FfiConverterString.write(value.tokenUrl, into);+ FfiConverterOptionalString.write(value.awsRoleArn, into);+ FfiConverterOptionalString.write(value.awsRegion, into);+ FfiConverterOptionalUInt32.write(value.refreshIntervalSeconds, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.credentialsSecret) ++ FfiConverterString.allocationSize(value.tokenUrl) ++ FfiConverterOptionalString.allocationSize(value.awsRoleArn) ++ FfiConverterOptionalString.allocationSize(value.awsRegion) ++ FfiConverterOptionalUInt32.allocationSize(value.refreshIntervalSeconds);++ }+ };+ return new FFIConverter();+})();++export type VmTemplate = {+ containerDiskImage: string,+ command?: Array<string>,+ runtime?: RuntimeKind,+ runtimeClassName?: string,+ nodeSelector?: Map<string, string>,+ tolerations?: Array<PreservedJsonLike>,+ imagePullPolicy?: ImagePullPolicy,+ imagePullSecret?: string,+ cpuCores?: number,+ memory?: string,+ firmware?: Firmware,+ probes?: PreservedJsonLike,+ services?: Array<SandboxService>,+ oidc?: OidcConfig+}++/**+ * Generated factory for {@link VmTemplate} record objects.+ */+export const VmTemplate = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<VmTemplate, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<VmTemplate>,+ });+})();++const FfiConverterTypeVmTemplate = (() => {+ type TypeName = VmTemplate;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ containerDiskImage: FfiConverterString.read(from),+ command: FfiConverterOptionalSequenceString.read(from),+ runtime: FfiConverterOptionalTypeRuntimeKind.read(from),+ runtimeClassName: FfiConverterOptionalString.read(from),+ nodeSelector: FfiConverterOptionalMapStringString.read(from),+ tolerations: FfiConverterOptionalSequenceTypePreservedJson.read(from),+ imagePullPolicy: FfiConverterOptionalTypeImagePullPolicy.read(from),+ imagePullSecret: FfiConverterOptionalString.read(from),+ cpuCores: FfiConverterOptionalUInt32.read(from),+ memory: FfiConverterOptionalString.read(from),+ firmware: FfiConverterOptionalTypeFirmware.read(from),+ probes: FfiConverterOptionalTypePreservedJson.read(from),+ services: FfiConverterOptionalSequenceTypeSandboxService.read(from),+ oidc: FfiConverterOptionalTypeOidcConfig.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.containerDiskImage, into);+ FfiConverterOptionalSequenceString.write(value.command, into);+ FfiConverterOptionalTypeRuntimeKind.write(value.runtime, into);+ FfiConverterOptionalString.write(value.runtimeClassName, into);+ FfiConverterOptionalMapStringString.write(value.nodeSelector, into);+ FfiConverterOptionalSequenceTypePreservedJson.write(value.tolerations, into);+ FfiConverterOptionalTypeImagePullPolicy.write(value.imagePullPolicy, into);+ FfiConverterOptionalString.write(value.imagePullSecret, into);+ FfiConverterOptionalUInt32.write(value.cpuCores, into);+ FfiConverterOptionalString.write(value.memory, into);+ FfiConverterOptionalTypeFirmware.write(value.firmware, into);+ FfiConverterOptionalTypePreservedJson.write(value.probes, into);+ FfiConverterOptionalSequenceTypeSandboxService.write(value.services, into);+ FfiConverterOptionalTypeOidcConfig.write(value.oidc, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.containerDiskImage) ++ FfiConverterOptionalSequenceString.allocationSize(value.command) ++ FfiConverterOptionalTypeRuntimeKind.allocationSize(value.runtime) ++ FfiConverterOptionalString.allocationSize(value.runtimeClassName) ++ FfiConverterOptionalMapStringString.allocationSize(value.nodeSelector) ++ FfiConverterOptionalSequenceTypePreservedJson.allocationSize(value.tolerations) ++ FfiConverterOptionalTypeImagePullPolicy.allocationSize(value.imagePullPolicy) ++ FfiConverterOptionalString.allocationSize(value.imagePullSecret) ++ FfiConverterOptionalUInt32.allocationSize(value.cpuCores) ++ FfiConverterOptionalString.allocationSize(value.memory) ++ FfiConverterOptionalTypeFirmware.allocationSize(value.firmware) ++ FfiConverterOptionalTypePreservedJson.allocationSize(value.probes) ++ FfiConverterOptionalSequenceTypeSandboxService.allocationSize(value.services) ++ FfiConverterOptionalTypeOidcConfig.allocationSize(value.oidc);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxSpec = {+ vmTemplate: VmTemplate+}++/**+ * Generated factory for {@link OsGymSandboxSpec} record objects.+ */+export const OsGymSandboxSpec = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxSpec, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxSpec>,+ });+})();++const FfiConverterTypeOSGymSandboxSpec = (() => {+ type TypeName = OsGymSandboxSpec;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ vmTemplate: FfiConverterTypeVmTemplate.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterTypeVmTemplate.write(value.vmTemplate, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterTypeVmTemplate.allocationSize(value.vmTemplate);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxStatus = {+ phase?: string,+ runtime?: string,+ ready?: boolean,+ vmName?: string,+ service?: string,+ message?: string,+ resetIssuedAt?: string,+ resetVmiUid?: string+}++/**+ * Generated factory for {@link OsGymSandboxStatus} record objects.+ */+export const OsGymSandboxStatus = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxStatus, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxStatus>,+ });+})();++const FfiConverterTypeOSGymSandboxStatus = (() => {+ type TypeName = OsGymSandboxStatus;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ phase: FfiConverterOptionalString.read(from),+ runtime: FfiConverterOptionalString.read(from),+ ready: FfiConverterOptionalBoolean.read(from),+ vmName: FfiConverterOptionalString.read(from),+ service: FfiConverterOptionalString.read(from),+ message: FfiConverterOptionalString.read(from),+ resetIssuedAt: FfiConverterOptionalString.read(from),+ resetVmiUid: FfiConverterOptionalString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.phase, into);+ FfiConverterOptionalString.write(value.runtime, into);+ FfiConverterOptionalBoolean.write(value.ready, into);+ FfiConverterOptionalString.write(value.vmName, into);+ FfiConverterOptionalString.write(value.service, into);+ FfiConverterOptionalString.write(value.message, into);+ FfiConverterOptionalString.write(value.resetIssuedAt, into);+ FfiConverterOptionalString.write(value.resetVmiUid, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.phase) ++ FfiConverterOptionalString.allocationSize(value.runtime) ++ FfiConverterOptionalBoolean.allocationSize(value.ready) ++ FfiConverterOptionalString.allocationSize(value.vmName) ++ FfiConverterOptionalString.allocationSize(value.service) ++ FfiConverterOptionalString.allocationSize(value.message) ++ FfiConverterOptionalString.allocationSize(value.resetIssuedAt) ++ FfiConverterOptionalString.allocationSize(value.resetVmiUid);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxTemplateSpec = {+ vmTemplate: VmTemplate+}++/**+ * Generated factory for {@link OsGymSandboxTemplateSpec} record objects.+ */+export const OsGymSandboxTemplateSpec = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxTemplateSpec, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxTemplateSpec>,+ });+})();++const FfiConverterTypeOSGymSandboxTemplateSpec = (() => {+ type TypeName = OsGymSandboxTemplateSpec;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ vmTemplate: FfiConverterTypeVmTemplate.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterTypeVmTemplate.write(value.vmTemplate, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterTypeVmTemplate.allocationSize(value.vmTemplate);++ }+ };+ return new FFIConverter();+})();++export type WarmPoolAutoscaling = {+ minPoolSize?: number,+ initialPoolSize?: number,+ maxPoolSize?: number+}++/**+ * Generated factory for {@link WarmPoolAutoscaling} record objects.+ */+export const WarmPoolAutoscaling = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<WarmPoolAutoscaling, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<WarmPoolAutoscaling>,+ });+})();++const FfiConverterTypeWarmPoolAutoscaling = (() => {+ type TypeName = WarmPoolAutoscaling;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ minPoolSize: FfiConverterOptionalUInt32.read(from),+ initialPoolSize: FfiConverterOptionalUInt32.read(from),+ maxPoolSize: FfiConverterOptionalUInt32.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalUInt32.write(value.minPoolSize, into);+ FfiConverterOptionalUInt32.write(value.initialPoolSize, into);+ FfiConverterOptionalUInt32.write(value.maxPoolSize, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalUInt32.allocationSize(value.minPoolSize) ++ FfiConverterOptionalUInt32.allocationSize(value.initialPoolSize) ++ FfiConverterOptionalUInt32.allocationSize(value.maxPoolSize);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxWarmPoolSpec = {+ replicas: number,+ sandboxTemplateRef: SandboxTemplateRef,+ autoscaling?: WarmPoolAutoscaling+}++/**+ * Generated factory for {@link OsGymSandboxWarmPoolSpec} record objects.+ */+export const OsGymSandboxWarmPoolSpec = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxWarmPoolSpec, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxWarmPoolSpec>,+ });+})();++const FfiConverterTypeOSGymSandboxWarmPoolSpec = (() => {+ type TypeName = OsGymSandboxWarmPoolSpec;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ replicas: FfiConverterUInt32.read(from),+ sandboxTemplateRef: FfiConverterTypeSandboxTemplateRef.read(from),+ autoscaling: FfiConverterOptionalTypeWarmPoolAutoscaling.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterUInt32.write(value.replicas, into);+ FfiConverterTypeSandboxTemplateRef.write(value.sandboxTemplateRef, into);+ FfiConverterOptionalTypeWarmPoolAutoscaling.write(value.autoscaling, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterUInt32.allocationSize(value.replicas) ++ FfiConverterTypeSandboxTemplateRef.allocationSize(value.sandboxTemplateRef) ++ FfiConverterOptionalTypeWarmPoolAutoscaling.allocationSize(value.autoscaling);++ }+ };+ return new FFIConverter();+})();++export type OsGymSandboxWarmPoolStatus = {+ replicas?: number,+ readyReplicas?: number,+ selector?: string+}++/**+ * Generated factory for {@link OsGymSandboxWarmPoolStatus} record objects.+ */+export const OsGymSandboxWarmPoolStatus = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymSandboxWarmPoolStatus, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxWarmPoolStatus>,+ });+})();++const FfiConverterTypeOSGymSandboxWarmPoolStatus = (() => {+ type TypeName = OsGymSandboxWarmPoolStatus;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ replicas: FfiConverterOptionalUInt32.read(from),+ readyReplicas: FfiConverterOptionalUInt32.read(from),+ selector: FfiConverterOptionalString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalUInt32.write(value.replicas, into);+ FfiConverterOptionalUInt32.write(value.readyReplicas, into);+ FfiConverterOptionalString.write(value.selector, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalUInt32.allocationSize(value.replicas) ++ FfiConverterOptionalUInt32.allocationSize(value.readyReplicas) ++ FfiConverterOptionalString.allocationSize(value.selector);++ }+ };+ return new FFIConverter();+})();++export type OsGymWorkspacePoolStatus = {+ phase?: string,+ totalCount?: number,+ availableCount?: number,+ claimedCount?: number+}++/**+ * Generated factory for {@link OsGymWorkspacePoolStatus} record objects.+ */+export const OsGymWorkspacePoolStatus = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<OsGymWorkspacePoolStatus, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<OsGymWorkspacePoolStatus>,+ });+})();++const FfiConverterTypeOSGymWorkspacePoolStatus = (() => {+ type TypeName = OsGymWorkspacePoolStatus;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ phase: FfiConverterOptionalString.read(from),+ totalCount: FfiConverterOptionalUInt32.read(from),+ availableCount: FfiConverterOptionalUInt32.read(from),+ claimedCount: FfiConverterOptionalUInt32.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalString.write(value.phase, into);+ FfiConverterOptionalUInt32.write(value.totalCount, into);+ FfiConverterOptionalUInt32.write(value.availableCount, into);+ FfiConverterOptionalUInt32.write(value.claimedCount, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalString.allocationSize(value.phase) ++ FfiConverterOptionalUInt32.allocationSize(value.totalCount) ++ FfiConverterOptionalUInt32.allocationSize(value.availableCount) ++ FfiConverterOptionalUInt32.allocationSize(value.claimedCount);++ }+ };+ return new FFIConverter();+})();++export type PoolTemplate = {+ runtime?: RuntimeKind,+ runtimeClassName?: string,+ nodeSelector?: Map<string, string>,+ tolerations?: Array<PreservedJsonLike>,+ command?: Array<string>,+ containerDiskImage: string,+ imagePullSecret?: string,+ cpuCores?: number,+ memory?: string,+ firmware?: Firmware,+ probes?: PreservedJsonLike,+ oidc?: OidcConfig+}++/**+ * Generated factory for {@link PoolTemplate} record objects.+ */+export const PoolTemplate = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<PoolTemplate, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<PoolTemplate>,+ });+})();++const FfiConverterTypePoolTemplate = (() => {+ type TypeName = PoolTemplate;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ runtime: FfiConverterOptionalTypeRuntimeKind.read(from),+ runtimeClassName: FfiConverterOptionalString.read(from),+ nodeSelector: FfiConverterOptionalMapStringString.read(from),+ tolerations: FfiConverterOptionalSequenceTypePreservedJson.read(from),+ command: FfiConverterOptionalSequenceString.read(from),+ containerDiskImage: FfiConverterString.read(from),+ imagePullSecret: FfiConverterOptionalString.read(from),+ cpuCores: FfiConverterOptionalUInt32.read(from),+ memory: FfiConverterOptionalString.read(from),+ firmware: FfiConverterOptionalTypeFirmware.read(from),+ probes: FfiConverterOptionalTypePreservedJson.read(from),+ oidc: FfiConverterOptionalTypeOidcConfig.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterOptionalTypeRuntimeKind.write(value.runtime, into);+ FfiConverterOptionalString.write(value.runtimeClassName, into);+ FfiConverterOptionalMapStringString.write(value.nodeSelector, into);+ FfiConverterOptionalSequenceTypePreservedJson.write(value.tolerations, into);+ FfiConverterOptionalSequenceString.write(value.command, into);+ FfiConverterString.write(value.containerDiskImage, into);+ FfiConverterOptionalString.write(value.imagePullSecret, into);+ FfiConverterOptionalUInt32.write(value.cpuCores, into);+ FfiConverterOptionalString.write(value.memory, into);+ FfiConverterOptionalTypeFirmware.write(value.firmware, into);+ FfiConverterOptionalTypePreservedJson.write(value.probes, into);+ FfiConverterOptionalTypeOidcConfig.write(value.oidc, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterOptionalTypeRuntimeKind.allocationSize(value.runtime) ++ FfiConverterOptionalString.allocationSize(value.runtimeClassName) ++ FfiConverterOptionalMapStringString.allocationSize(value.nodeSelector) ++ FfiConverterOptionalSequenceTypePreservedJson.allocationSize(value.tolerations) ++ FfiConverterOptionalSequenceString.allocationSize(value.command) ++ FfiConverterString.allocationSize(value.containerDiskImage) ++ FfiConverterOptionalString.allocationSize(value.imagePullSecret) ++ FfiConverterOptionalUInt32.allocationSize(value.cpuCores) ++ FfiConverterOptionalString.allocationSize(value.memory) ++ FfiConverterOptionalTypeFirmware.allocationSize(value.firmware) ++ FfiConverterOptionalTypePreservedJson.allocationSize(value.probes) ++ FfiConverterOptionalTypeOidcConfig.allocationSize(value.oidc);++ }+ };+ return new FFIConverter();+})();++export type PoolSpec = {+ replicas: number,+ template: PoolTemplate,+ autoscaling?: WarmPoolAutoscaling,+ services?: Array<SandboxService>+}++/**+ * Generated factory for {@link PoolSpec} record objects.+ */+export const PoolSpec = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<PoolSpec, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<PoolSpec>,+ equals(self_: PoolSpec, other: PoolSpec): boolean {++ return FfiConverterBool.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_eq_eq(+ FfiConverterTypePoolSpec.lower(self_, nativeModule().rustbuffer_alloc),+ FfiConverterTypePoolSpec.lower(other, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ },+ hashCode(self_: PoolSpec): bigint {++ return FfiConverterUInt64.lift(uniffiCaller.rustCall(+ /*caller:*/ (callStatus) => {+ return nativeModule().uniffi_cyclops_sdk_schema_fn_method_poolspec_uniffi_trait_hash(+ FfiConverterTypePoolSpec.lower(self_, nativeModule().rustbuffer_alloc),+ callStatus);+ },+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),+ ));+ },+ });+})();++const FfiConverterTypePoolSpec = (() => {+ type TypeName = PoolSpec;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ replicas: FfiConverterUInt32.read(from),+ template: FfiConverterTypePoolTemplate.read(from),+ autoscaling: FfiConverterOptionalTypeWarmPoolAutoscaling.read(from),+ services: FfiConverterOptionalSequenceTypeSandboxService.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterUInt32.write(value.replicas, into);+ FfiConverterTypePoolTemplate.write(value.template, into);+ FfiConverterOptionalTypeWarmPoolAutoscaling.write(value.autoscaling, into);+ FfiConverterOptionalSequenceTypeSandboxService.write(value.services, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterUInt32.allocationSize(value.replicas) ++ FfiConverterTypePoolTemplate.allocationSize(value.template) ++ FfiConverterOptionalTypeWarmPoolAutoscaling.allocationSize(value.autoscaling) ++ FfiConverterOptionalSequenceTypeSandboxService.allocationSize(value.services);++ }+ };+ return new FFIConverter();+})();+++// Error type: JsonValueError+export enum JsonValueError_Tags {+ Invalid = "Invalid"+}+export const JsonValueError = (() => {++ type Invalid__interface = {+ tag: JsonValueError_Tags.Invalid;+ inner:+Readonly<{reason: string}>+ };+ class Invalid_ extends UniffiError implements Invalid__interface {+ /**+ * @private+ * This field is private and should not be used, use `tag` instead.+ */+ readonly [uniffiTypeNameSymbol] = "JsonValueError";+ readonly tag = JsonValueError_Tags.Invalid;+ readonly inner:+Readonly<{reason: string}>;+ constructor(+inner: {reason: string }) {+ super("JsonValueError", "Invalid");++ this.inner = Object.freeze(inner);+ }+ static new(+inner: {reason: string }): Invalid_ {+ return new Invalid_(inner);+ }++ static instanceOf(obj: any): obj is Invalid_ {+ return obj.tag === JsonValueError_Tags.Invalid;+ }+ static hasInner(obj: any): obj is Invalid_ {+ return Invalid_.instanceOf(obj);+ }++ static getInner(obj: Invalid_):+Readonly<{reason: string}> {+ return obj.inner;+ }++ }++ function instanceOf(obj: any): obj is JsonValueError {+ return obj[uniffiTypeNameSymbol] === "JsonValueError";+ }++ return Object.freeze({+ instanceOf,+ Invalid: Invalid_+ });++})();+export type JsonValueError = InstanceType<+ typeof JsonValueError['Invalid']+>;++// FfiConverter for enum JsonValueError+const FfiConverterTypeJsonValueError = (() => {+ const ordinalConverter = FfiConverterInt32;+ type TypeName = JsonValueError;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ switch (ordinalConverter.read(from)) {+ case 1: return new JsonValueError.Invalid({reason: FfiConverterString.read(from) });+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ write(value: TypeName, into: RustBuffer): void {+ switch (value.tag) {+ case JsonValueError_Tags.Invalid: {+ ordinalConverter.write(1, into);+ const inner = value.inner;+ FfiConverterString.write(inner.reason, into);+ return;+ }+ default:+ // Throwing from here means that JsonValueError_Tags hasn't matched an ordinal.+ throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ allocationSize(value: TypeName): number {+ switch (value.tag) {+ case JsonValueError_Tags.Invalid: {+ const inner = value.inner;+ let size = ordinalConverter.allocationSize(1);+ size += FfiConverterString.allocationSize(inner.reason);+ return size;+ }+ default: throw new UniffiInternalError.UnexpectedEnumCase();+ }+ }+ }+ return new FFIConverter();+})();++// FfiConverter for string | undefined+const FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);++// FfiConverter for boolean | undefined+const FfiConverterOptionalBoolean = new FfiConverterOptional(FfiConverterBool);++// FfiConverter for number | undefined+const FfiConverterOptionalUInt32 = new FfiConverterOptional(FfiConverterUInt32);++// FfiConverter for ClaimLifecycle | undefined+const FfiConverterOptionalTypeClaimLifecycle = new FfiConverterOptional(FfiConverterTypeClaimLifecycle);++// FfiConverter for Array<OsGymSandboxClaimCondition>+const FfiConverterSequenceTypeOSGymSandboxClaimCondition = new FfiConverterArray(FfiConverterTypeOSGymSandboxClaimCondition);++// FfiConverter for Array<OsGymSandboxClaimCondition> | undefined+const FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition = new FfiConverterOptional(FfiConverterSequenceTypeOSGymSandboxClaimCondition);++// FfiConverter for OsGymSandboxClaimSandbox | undefined+const FfiConverterOptionalTypeOSGymSandboxClaimSandbox = new FfiConverterOptional(FfiConverterTypeOSGymSandboxClaimSandbox);++// FfiConverter for Array<string>+const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);++// FfiConverter for Array<string> | undefined+const FfiConverterOptionalSequenceString = new FfiConverterOptional(FfiConverterSequenceString);++// FfiConverter for RuntimeKind | undefined+const FfiConverterOptionalTypeRuntimeKind = new FfiConverterOptional(FfiConverterTypeRuntimeKind);++// FfiConverter for Map<string, string>+const FfiConverterMapStringString = new FfiConverterMap(FfiConverterString, FfiConverterString);++// FfiConverter for Map<string, string> | undefined+const FfiConverterOptionalMapStringString = new FfiConverterOptional(FfiConverterMapStringString);++// FfiConverter for Array<PreservedJsonLike>+const FfiConverterSequenceTypePreservedJson = new FfiConverterArray(FfiConverterTypePreservedJson);++// FfiConverter for Array<PreservedJsonLike> | undefined+const FfiConverterOptionalSequenceTypePreservedJson = new FfiConverterOptional(FfiConverterSequenceTypePreservedJson);++// FfiConverter for ImagePullPolicy | undefined+const FfiConverterOptionalTypeImagePullPolicy = new FfiConverterOptional(FfiConverterTypeImagePullPolicy);++// FfiConverter for Firmware | undefined+const FfiConverterOptionalTypeFirmware = new FfiConverterOptional(FfiConverterTypeFirmware);++// FfiConverter for PreservedJsonLike | undefined+const FfiConverterOptionalTypePreservedJson = new FfiConverterOptional(FfiConverterTypePreservedJson);++// FfiConverter for ServiceProtocol | undefined+const FfiConverterOptionalTypeServiceProtocol = new FfiConverterOptional(FfiConverterTypeServiceProtocol);++// FfiConverter for Array<SandboxService>+const FfiConverterSequenceTypeSandboxService = new FfiConverterArray(FfiConverterTypeSandboxService);++// FfiConverter for Array<SandboxService> | undefined+const FfiConverterOptionalSequenceTypeSandboxService = new FfiConverterOptional(FfiConverterSequenceTypeSandboxService);++// FfiConverter for OidcConfig | undefined+const FfiConverterOptionalTypeOidcConfig = new FfiConverterOptional(FfiConverterTypeOidcConfig);++// FfiConverter for WarmPoolAutoscaling | undefined+const FfiConverterOptionalTypeWarmPoolAutoscaling = new FfiConverterOptional(FfiConverterTypeWarmPoolAutoscaling);+++/**+ * This should be called before anything else.+ *+ * It is likely that this is being done for you by the library's `index.ts`.+ *+ * It checks versions of uniffi between when the Rust scaffolding was generated+ * and when the bindings were generated.+ *+ * It also initializes the machinery to enable Rust to talk back to Javascript.+ */+function uniffiEnsureInitialized() {+ // Get the bindings contract version from our ComponentInterface+ const bindingsContractVersion = 30;+ // Get the scaffolding contract version by calling the into the dylib+ const scaffoldingContractVersion = nativeModule().ffi_cyclops_sdk_schema_uniffi_contract_version();+ if (bindingsContractVersion !== scaffoldingContractVersion) {+ throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);+ }+ if (nativeModule().uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() !== 24064) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json");+ }+ if (nativeModule().uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() !== 8252) {+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json");+ }++ }++export default Object.freeze({+ initialize: uniffiEnsureInitialized,+ converters: {+ FfiConverterTypeClaimLifecycle,+ FfiConverterTypeClaimSpec,+ FfiConverterTypeFirmware,+ FfiConverterTypeImagePullPolicy,+ FfiConverterTypeJsonValueError,+ FfiConverterTypeOSGymSandboxClaimCondition,+ FfiConverterTypeOSGymSandboxClaimSandbox,+ FfiConverterTypeOSGymSandboxClaimStatus,+ FfiConverterTypeOSGymSandboxSpec,+ FfiConverterTypeOSGymSandboxStatus,+ FfiConverterTypeOSGymSandboxTemplateSpec,+ FfiConverterTypeOSGymSandboxWarmPoolSpec,+ FfiConverterTypeOSGymSandboxWarmPoolStatus,+ FfiConverterTypeOSGymWorkspacePoolStatus,+ FfiConverterTypeOidcConfig,+ FfiConverterTypePoolSpec,+ FfiConverterTypePoolTemplate,+ FfiConverterTypePreservedJson,+ FfiConverterTypeRuntimeKind,+ FfiConverterTypeSandboxService,+ FfiConverterTypeSandboxTemplateRef,+ FfiConverterTypeServiceProtocol,+ FfiConverterTypeVmTemplate,+ FfiConverterTypeWarmPoolAutoscaling,+ }+});\ No newline at end of filediff --git a/libs/fleet/sdk-bindings/ts-uniffi/examples/README.md b/libs/fleet/sdk-bindings/ts-uniffi/examples/README.mdnew file mode 100644index 0000000000..7ce90fd2dd--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi/examples/README.md@@ -0,0 +1,39 @@+# Node.js live lifecycle example++This example uses Node 18+ `fetch` to provide the SDK's `HttpClient` callback.+It creates a pool and claim, waits for a sandbox, calls `GET /health` on its+`mcp` service, then cleans up both resources in `finally`.++## Prerequisites++- Node.js 18 or newer.+- A host-native `libcyclops_sdk` cdylib colocated where the generated UniFFI+ Node runtime can load it. The parent binding README describes this requirement.+- An image exposing an MCP service on port `3000` that responds to `GET /health`.++## Configuration and run++| Variable | Required | Description |+| --- | --- | --- |+| `CYCLOPS_BASE_URL` | Yes | Cyclops control-plane base URL. |+| `CYCLOPS_TOKEN_URL` | Yes | OAuth token endpoint. |+| `CYCLOPS_CLIENT_ID` | Yes | OAuth client ID. |+| `CYCLOPS_CLIENT_SECRET` | Yes | OAuth client secret. |+| `CYCLOPS_NAMESPACE` | Yes | Namespace where resources are created. |+| `CYCLOPS_IMAGE` | Yes | Container-disk image for the pool template. |+| `CYCLOPS_IMAGE_PULL_SECRET` | No | Kubernetes image-pull secret name. |++```bash+export CYCLOPS_BASE_URL="https://cyclops.example"+export CYCLOPS_TOKEN_URL="https://auth.example/oauth/token"+export CYCLOPS_CLIENT_ID="example-client"+export CYCLOPS_CLIENT_SECRET="replace-me"+export CYCLOPS_NAMESPACE="default"+export CYCLOPS_IMAGE="registry.example/cyclops-mcp:latest"++cd cyclops-cs/sdk-bindings/ts-uniffi/examples+npm install+npm start+```++The native library must be present before Node loads `../index.ts`.diff --git a/libs/fleet/sdk-bindings/ts-uniffi/examples/node.ts b/libs/fleet/sdk-bindings/ts-uniffi/examples/node.tsnew file mode 100644index 0000000000..804c0ba3fd--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi/examples/node.ts@@ -0,0 +1,103 @@+import {+ CyclopsClient,+ CyclopsCredentials,+ type Claim,+ type CreateClaimRequest,+ type CreatePoolRequest,+ type HttpClient,+ type HttpRequest,+ type HttpResponse,+ type Pool,+ type PoolSpec,+} from "../index.ts";++const serviceName = "mcp";+const servicePath = "/health";++class FetchHttpClient implements HttpClient {+ async execute(request: HttpRequest): Promise<HttpResponse> {+ const response = await fetch(request.url, {+ method: request.method,+ headers: request.headers.map(({ name, value }) => [name, value]),+ body: request.body,+ });+ return {+ status: response.status,+ headers: [...response.headers].map(([name, value]) => ({ name, value })),+ body: await response.arrayBuffer(),+ };+ }+}++function requiredEnv(name: string): string {+ const value = process.env[name];+ if (!value) throw new Error(`Missing required environment variable: ${name}`);+ return value;+}++function poolSpec(image: string, imagePullSecret?: string): PoolSpec {+ return {+ replicas: 1,+ template: {+ // The live example requests the same resources as the working SDK examples.+ containerDiskImage: image,+ imagePullSecret,+ cpuCores: 4,+ memory: "4Gi",+ },+ services: [{ name: serviceName, targetPort: 3000 }],+ };+}++async function main(): Promise<void> {+ const namespace = requiredEnv("CYCLOPS_NAMESPACE");+ const image = requiredEnv("CYCLOPS_IMAGE");+ const client = CyclopsClient.connect({+ baseUrl: requiredEnv("CYCLOPS_BASE_URL"),+ tokenUrl: requiredEnv("CYCLOPS_TOKEN_URL"),+ credentials: new CyclopsCredentials(requiredEnv("CYCLOPS_CLIENT_ID"), requiredEnv("CYCLOPS_CLIENT_SECRET")),+ poolPollIntervalMs: 5000n,+ poolPollLimit: 100,+ claimPollIntervalMs: 5000n,+ claimPollLimit: 120,+ }, new FetchHttpClient());++ let pool: Pool | undefined;+ let claim: Claim | undefined;+ try {+ console.log("[1/5] Creating pool...");+ const createPool: CreatePoolRequest = { namespace, spec: poolSpec(image, process.env.CYCLOPS_IMAGE_PULL_SECRET) };+ pool = await client.createPool(createPool);+ console.log(pool);++ console.log("[2/5] Creating claim...");+ const createClaim: CreateClaimRequest = { pool };+ claim = await client.createClaim(createClaim);+ console.log(claim);++ console.log("[3/5] Waiting for claim to bind a sandbox...");+ const sandbox = await client.waitClaim(claim);+ console.log(sandbox);++ console.log("[4/5] Calling the sandbox service...");+ const response = await client.serviceRequest(sandbox, serviceName, servicePath, {+ method: "GET", url: `https://ignored.invalid${servicePath}`, headers: [],+ });+ console.log({ status: response.status, body: new TextDecoder().decode(response.body) });+ console.log("[5/5] Lifecycle completed; cleanup will now run.");+ } finally {+ if (claim) {+ console.log("[cleanup] Deleting claim...");+ await client.deleteClaim(claim);+ }+ if (pool) {+ console.log("[cleanup] Deleting pool...");+ await client.deletePool(pool);+ }+ }+}++main().catch((error: unknown) => {+ console.error("Lifecycle failed:", error);+ process.exitCode = 1;+});diff --git a/libs/fleet/sdk-bindings/ts-uniffi/examples/package.json b/libs/fleet/sdk-bindings/ts-uniffi/examples/package.jsonnew file mode 100644index 0000000000..272470b809--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi/examples/package.json@@ -0,0 +1,17 @@+{+ "private": true,+ "type": "module",+ "scripts": {+ "start": "tsx node.ts",+ "build": "tsc"+ },+ "dependencies": {+ "@ubjs/core": "latest",+ "@ubjs/node": "latest",+ "tsx": "latest",+ "typescript": "latest"+ },+ "devDependencies": {+ "@types/node": "latest"+ }+}diff --git a/libs/fleet/sdk-bindings/ts-uniffi/examples/tsconfig.json b/libs/fleet/sdk-bindings/ts-uniffi/examples/tsconfig.jsonnew file mode 100644index 0000000000..91c309f4cc--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi/examples/tsconfig.json@@ -0,0 +1,13 @@+{+ "compilerOptions": {+ "allowImportingTsExtensions": true,+ "module": "ESNext",+ "moduleResolution": "Bundler",+ "noEmit": true,+ "skipLibCheck": true,+ "strict": true,+ "target": "ES2022",+ "types": ["node"]+ },+ "files": ["node.ts"]+}diff --git a/libs/fleet/sdk-bindings/ts-uniffi/index.ts b/libs/fleet/sdk-bindings/ts-uniffi/index.tsnew file mode 100644index 0000000000..7773ef46f8--- /dev/null+++ b/libs/fleet/sdk-bindings/ts-uniffi/index.ts@@ -0,0 +1,21 @@+// Generated by uniffi-bindgen-react-native — do not edit.+export * from './cyclops_sdk';+export * from './cyclops_sdk_schema';+import * as cyclops_sdk from './cyclops_sdk';+import * as cyclops_sdk_schema from './cyclops_sdk_schema';+++let initialized = false;+if (!initialized) {+ cyclops_sdk.default.initialize();+ cyclops_sdk_schema.default.initialize();+ initialized = true;+}++export async function uniffiInitAsync() { /* sync flavor: no-op */ }+++export default {+ cyclops_sdk,+ cyclops_sdk_schema,+};\ No newline at end of filediff --git a/libs/fleet/sdk-bindings/uniffi.toml b/libs/fleet/sdk-bindings/uniffi.tomldeleted file mode 100644index a6d3b08201..0000000000--- a/libs/fleet/sdk-bindings/uniffi.toml+++ /dev/null@@ -1,39 +0,0 @@-[crate-roots]-cyclops_sdk = "../sdk"-cyclops_sdk_schema = "../sdk-schema"--[crates.cyclops_sdk.bindings.python]-cdylib_name = "cyclops_sdk"--[crates.cyclops_sdk.bindings.python.external_packages]-cyclops_sdk_schema = "cyclops_sdk"--[crates.cyclops_sdk_schema.bindings.python]-cdylib_name = "cyclops_sdk"--[crates.cyclops_sdk.bindings.kotlin]-package_name = "ai.cua.cyclops.sdk"-cdylib_name = "cyclops_sdk"--[crates.cyclops_sdk.bindings.kotlin.external_packages]-cyclops_sdk_schema = "ai.cua.cyclops.sdk.schema"--[crates.cyclops_sdk_schema.bindings.kotlin]-package_name = "ai.cua.cyclops.sdk.schema"-cdylib_name = "cyclops_sdk"--[crates.cyclops_sdk.bindings.swift]-module_name = "CyclopsSdk"-ffi_module_name = "CyclopsSdkFFI"-ffi_module_filename = "CyclopsSdkFFI"--[crates.cyclops_sdk_schema.bindings.swift]-module_name = "CyclopsSdkSchema"-ffi_module_name = "CyclopsSdkSchemaFFI"-ffi_module_filename = "CyclopsSdkSchemaFFI"--[crates.cyclops_sdk.bindings.ruby]-cdylib_name = "cyclops_sdk"--[crates.cyclops_sdk_schema.bindings.ruby]-cdylib_name = "cyclops_sdk"diff --git a/libs/fleet/sdk-schema/uniffi.toml b/libs/fleet/sdk-schema/uniffi.tomlnew file mode 100644index 0000000000..d1586263d5--- /dev/null+++ b/libs/fleet/sdk-schema/uniffi.toml@@ -0,0 +1,14 @@+[bindings.python]+cdylib_name = "cyclops_sdk"++[bindings.kotlin]+package_name = "ai.cua.cyclops.sdk.schema"+cdylib_name = "cyclops_sdk"++[bindings.swift]+module_name = "CyclopsSdkSchema"+ffi_module_name = "CyclopsSdkSchemaFFI"+ffi_module_filename = "CyclopsSdkSchemaFFI"++[bindings.ruby]+cdylib_name = "cyclops_sdk"diff --git a/libs/fleet/sdk/uniffi.toml b/libs/fleet/sdk/uniffi.tomlnew file mode 100644index 0000000000..06625dc4aa--- /dev/null+++ b/libs/fleet/sdk/uniffi.toml@@ -0,0 +1,20 @@+[bindings.python]+cdylib_name = "cyclops_sdk"++[bindings.python.external_packages]+cyclops_sdk_schema = "cyclops_sdk"++[bindings.kotlin]+package_name = "ai.cua.cyclops.sdk"+cdylib_name = "cyclops_sdk"++[bindings.kotlin.external_packages]+cyclops_sdk_schema = "ai.cua.cyclops.sdk.schema"++[bindings.swift]+module_name = "CyclopsSdk"+ffi_module_name = "CyclopsSdkFFI"+ffi_module_filename = "CyclopsSdkFFI"++[bindings.ruby]+cdylib_name = "cyclops_sdk"