@trycua/cua 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cua_sdk.d.ts +41 -0
- package/browser/cua_sdk.js +44 -0
- package/browser/cua_sdk.ts +75 -0
- package/browser/wasm-bindgen/index.d.ts +14 -14
- package/browser/wasm-bindgen/index.js +44 -44
- package/browser/wasm-bindgen/index_bg.wasm +0 -0
- package/browser/wasm-bindgen/index_bg.wasm.d.ts +14 -14
- package/dist/native/cua_sdk-ffi.d.ts +2 -0
- package/dist/native/cua_sdk-ffi.js +10 -0
- package/dist/native/cua_sdk.d.ts +92 -22
- package/dist/native/cua_sdk.js +104 -16
- package/package.json +7 -7
package/browser/cua_sdk.d.ts
CHANGED
|
@@ -400,6 +400,40 @@ export declare const ScreenshotOptions: Readonly<{
|
|
|
400
400
|
new: (partial: Partial<ScreenshotOptions> & Required<Omit<ScreenshotOptions, "display" | "maxDimension" | "format" | "quality" | "includeCursor">>) => ScreenshotOptions;
|
|
401
401
|
defaults: () => Partial<ScreenshotOptions>;
|
|
402
402
|
}>;
|
|
403
|
+
/**
|
|
404
|
+
* A Space's latest thumbnail, from the cache every client on this machine
|
|
405
|
+
* shares ([`crate::native::spaces::Space::thumbnail`]).
|
|
406
|
+
*/
|
|
407
|
+
export type SpaceThumbnail = {
|
|
408
|
+
/**
|
|
409
|
+
* Encoded image (a small JPEG of the primary display).
|
|
410
|
+
*/
|
|
411
|
+
image: ArrayBuffer;
|
|
412
|
+
/**
|
|
413
|
+
* Encoding.
|
|
414
|
+
*/
|
|
415
|
+
format: ImageFormat;
|
|
416
|
+
/**
|
|
417
|
+
* Pixel width.
|
|
418
|
+
*/
|
|
419
|
+
width: number;
|
|
420
|
+
/**
|
|
421
|
+
* Pixel height.
|
|
422
|
+
*/
|
|
423
|
+
height: number;
|
|
424
|
+
/**
|
|
425
|
+
* When it was captured, Unix milliseconds.
|
|
426
|
+
*/
|
|
427
|
+
capturedAtMs: bigint;
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* Generated factory for {@link SpaceThumbnail} record objects.
|
|
431
|
+
*/
|
|
432
|
+
export declare const SpaceThumbnail: Readonly<{
|
|
433
|
+
create: (partial: Partial<SpaceThumbnail> & Required<Omit<SpaceThumbnail, "image" | "format" | "width" | "height" | "capturedAtMs">>) => SpaceThumbnail;
|
|
434
|
+
new: (partial: Partial<SpaceThumbnail> & Required<Omit<SpaceThumbnail, "image" | "format" | "width" | "height" | "capturedAtMs">>) => SpaceThumbnail;
|
|
435
|
+
defaults: () => Partial<SpaceThumbnail>;
|
|
436
|
+
}>;
|
|
403
437
|
/**
|
|
404
438
|
* One capability flag.
|
|
405
439
|
*/
|
|
@@ -2196,6 +2230,13 @@ declare const _default: Readonly<{
|
|
|
2196
2230
|
lift(value: UniffiByteArray): ScreenshotOptions;
|
|
2197
2231
|
lower(value: ScreenshotOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
2198
2232
|
};
|
|
2233
|
+
FfiConverterTypeSpaceThumbnail: {
|
|
2234
|
+
read(from: RustBuffer): SpaceThumbnail;
|
|
2235
|
+
write(value: SpaceThumbnail, into: RustBuffer): void;
|
|
2236
|
+
allocationSize(value: SpaceThumbnail): number;
|
|
2237
|
+
lift(value: UniffiByteArray): SpaceThumbnail;
|
|
2238
|
+
lower(value: SpaceThumbnail, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
2239
|
+
};
|
|
2199
2240
|
FfiConverterTypeSpacesdCapabilities: {
|
|
2200
2241
|
read(from: RustBuffer): SpacesdCapabilities;
|
|
2201
2242
|
write(value: SpacesdCapabilities, into: RustBuffer): void;
|
package/browser/cua_sdk.js
CHANGED
|
@@ -665,6 +665,49 @@ const FfiConverterTypeScreenshotOptions = (() => {
|
|
|
665
665
|
;
|
|
666
666
|
return new FFIConverter();
|
|
667
667
|
})();
|
|
668
|
+
/**
|
|
669
|
+
* Generated factory for {@link SpaceThumbnail} record objects.
|
|
670
|
+
*/
|
|
671
|
+
export const SpaceThumbnail = (() => {
|
|
672
|
+
const defaults = () => ({});
|
|
673
|
+
const create = (() => {
|
|
674
|
+
return uniffiCreateRecord(defaults);
|
|
675
|
+
})();
|
|
676
|
+
return Object.freeze({
|
|
677
|
+
create,
|
|
678
|
+
new: create,
|
|
679
|
+
defaults: () => Object.freeze(defaults()),
|
|
680
|
+
});
|
|
681
|
+
})();
|
|
682
|
+
const FfiConverterTypeSpaceThumbnail = (() => {
|
|
683
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
684
|
+
read(from) {
|
|
685
|
+
return {
|
|
686
|
+
image: FfiConverterArrayBuffer.read(from),
|
|
687
|
+
format: FfiConverterTypeImageFormat.read(from),
|
|
688
|
+
width: FfiConverterUInt32.read(from),
|
|
689
|
+
height: FfiConverterUInt32.read(from),
|
|
690
|
+
capturedAtMs: FfiConverterUInt64.read(from)
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
write(value, into) {
|
|
694
|
+
FfiConverterArrayBuffer.write(value.image, into);
|
|
695
|
+
FfiConverterTypeImageFormat.write(value.format, into);
|
|
696
|
+
FfiConverterUInt32.write(value.width, into);
|
|
697
|
+
FfiConverterUInt32.write(value.height, into);
|
|
698
|
+
FfiConverterUInt64.write(value.capturedAtMs, into);
|
|
699
|
+
}
|
|
700
|
+
allocationSize(value) {
|
|
701
|
+
return FfiConverterArrayBuffer.allocationSize(value.image) +
|
|
702
|
+
FfiConverterTypeImageFormat.allocationSize(value.format) +
|
|
703
|
+
FfiConverterUInt32.allocationSize(value.width) +
|
|
704
|
+
FfiConverterUInt32.allocationSize(value.height) +
|
|
705
|
+
FfiConverterUInt64.allocationSize(value.capturedAtMs);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
;
|
|
709
|
+
return new FFIConverter();
|
|
710
|
+
})();
|
|
668
711
|
/**
|
|
669
712
|
* Generated factory for {@link SpacesdFeature} record objects.
|
|
670
713
|
*/
|
|
@@ -2597,6 +2640,7 @@ export default Object.freeze({
|
|
|
2597
2640
|
FfiConverterTypePtySize,
|
|
2598
2641
|
FfiConverterTypeScreenshot,
|
|
2599
2642
|
FfiConverterTypeScreenshotOptions,
|
|
2643
|
+
FfiConverterTypeSpaceThumbnail,
|
|
2600
2644
|
FfiConverterTypeSpacesdCapabilities,
|
|
2601
2645
|
FfiConverterTypeSpacesdClient,
|
|
2602
2646
|
FfiConverterTypeSpacesdCommand,
|
package/browser/cua_sdk.ts
CHANGED
|
@@ -999,6 +999,80 @@ const FfiConverterTypeScreenshotOptions = (() => {
|
|
|
999
999
|
return new FFIConverter();
|
|
1000
1000
|
})();
|
|
1001
1001
|
|
|
1002
|
+
/**
|
|
1003
|
+
* A Space's latest thumbnail, from the cache every client on this machine
|
|
1004
|
+
* shares ([`crate::native::spaces::Space::thumbnail`]).
|
|
1005
|
+
*/
|
|
1006
|
+
export type SpaceThumbnail = {
|
|
1007
|
+
/**
|
|
1008
|
+
* Encoded image (a small JPEG of the primary display).
|
|
1009
|
+
*/
|
|
1010
|
+
image: ArrayBuffer,
|
|
1011
|
+
/**
|
|
1012
|
+
* Encoding.
|
|
1013
|
+
*/
|
|
1014
|
+
format: ImageFormat,
|
|
1015
|
+
/**
|
|
1016
|
+
* Pixel width.
|
|
1017
|
+
*/
|
|
1018
|
+
width: number,
|
|
1019
|
+
/**
|
|
1020
|
+
* Pixel height.
|
|
1021
|
+
*/
|
|
1022
|
+
height: number,
|
|
1023
|
+
/**
|
|
1024
|
+
* When it was captured, Unix milliseconds.
|
|
1025
|
+
*/
|
|
1026
|
+
capturedAtMs: bigint
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Generated factory for {@link SpaceThumbnail} record objects.
|
|
1031
|
+
*/
|
|
1032
|
+
export const SpaceThumbnail = (() => {
|
|
1033
|
+
const defaults = () => ({
|
|
1034
|
+
});
|
|
1035
|
+
const create = (() => {
|
|
1036
|
+
return uniffiCreateRecord<SpaceThumbnail, ReturnType<typeof defaults>>(defaults);
|
|
1037
|
+
})();
|
|
1038
|
+
return Object.freeze({
|
|
1039
|
+
create,
|
|
1040
|
+
new: create,
|
|
1041
|
+
defaults: () => Object.freeze(defaults()) as Partial<SpaceThumbnail>,
|
|
1042
|
+
});
|
|
1043
|
+
})();
|
|
1044
|
+
|
|
1045
|
+
const FfiConverterTypeSpaceThumbnail = (() => {
|
|
1046
|
+
type TypeName = SpaceThumbnail;
|
|
1047
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
1048
|
+
read(from: RustBuffer): TypeName {
|
|
1049
|
+
return {
|
|
1050
|
+
image: FfiConverterArrayBuffer.read(from),
|
|
1051
|
+
format: FfiConverterTypeImageFormat.read(from),
|
|
1052
|
+
width: FfiConverterUInt32.read(from),
|
|
1053
|
+
height: FfiConverterUInt32.read(from),
|
|
1054
|
+
capturedAtMs: FfiConverterUInt64.read(from)
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
1058
|
+
FfiConverterArrayBuffer.write(value.image, into);
|
|
1059
|
+
FfiConverterTypeImageFormat.write(value.format, into);
|
|
1060
|
+
FfiConverterUInt32.write(value.width, into);
|
|
1061
|
+
FfiConverterUInt32.write(value.height, into);
|
|
1062
|
+
FfiConverterUInt64.write(value.capturedAtMs, into);
|
|
1063
|
+
}
|
|
1064
|
+
allocationSize(value: TypeName): number {
|
|
1065
|
+
return FfiConverterArrayBuffer.allocationSize(value.image) +
|
|
1066
|
+
FfiConverterTypeImageFormat.allocationSize(value.format) +
|
|
1067
|
+
FfiConverterUInt32.allocationSize(value.width) +
|
|
1068
|
+
FfiConverterUInt32.allocationSize(value.height) +
|
|
1069
|
+
FfiConverterUInt64.allocationSize(value.capturedAtMs);
|
|
1070
|
+
|
|
1071
|
+
}
|
|
1072
|
+
};
|
|
1073
|
+
return new FFIConverter();
|
|
1074
|
+
})();
|
|
1075
|
+
|
|
1002
1076
|
/**
|
|
1003
1077
|
* One capability flag.
|
|
1004
1078
|
*/
|
|
@@ -3634,6 +3708,7 @@ export default Object.freeze({
|
|
|
3634
3708
|
FfiConverterTypePtySize,
|
|
3635
3709
|
FfiConverterTypeScreenshot,
|
|
3636
3710
|
FfiConverterTypeScreenshotOptions,
|
|
3711
|
+
FfiConverterTypeSpaceThumbnail,
|
|
3637
3712
|
FfiConverterTypeSpacesdCapabilities,
|
|
3638
3713
|
FfiConverterTypeSpacesdClient,
|
|
3639
3714
|
FfiConverterTypeSpacesdCommand,
|
|
@@ -2206,28 +2206,28 @@ export interface InitOutput {
|
|
|
2206
2206
|
readonly uniffi_cua_sdk_fn_method_spacesdclient_type_text: (a: bigint, b: number) => bigint;
|
|
2207
2207
|
readonly __wbg_foreignfuturecompletei8_free: (a: number, b: number) => void;
|
|
2208
2208
|
readonly foreignfuturecompletei8_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2209
|
-
readonly
|
|
2210
|
-
readonly
|
|
2209
|
+
readonly __wbg_foreignfuturecompleteu16_free: (a: number, b: number) => void;
|
|
2210
|
+
readonly foreignfuturecompleteu16_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2211
2211
|
readonly __wbg_foreignfuturecompletef32_free: (a: number, b: number) => void;
|
|
2212
|
-
readonly
|
|
2212
|
+
readonly __wbg_foreignfuturecompletei32_free: (a: number, b: number) => void;
|
|
2213
2213
|
readonly __wbg_foreignfuturecompletevoid_free: (a: number, b: number) => void;
|
|
2214
2214
|
readonly foreignfuturecompletef32_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2215
|
-
readonly foreignfuturecompleteu64_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2216
|
-
readonly foreignfuturecompletevoid_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2217
|
-
readonly __wbg_foreignfuturecompletei32_free: (a: number, b: number) => void;
|
|
2218
|
-
readonly __wbg_foreignfuturecompleterustbuffer_free: (a: number, b: number) => void;
|
|
2219
|
-
readonly __wbg_foreignfuturecompleteu16_free: (a: number, b: number) => void;
|
|
2220
|
-
readonly __wbg_foreignfuturecompleteu32_free: (a: number, b: number) => void;
|
|
2221
|
-
readonly __wbg_foreignfuturecompleteu8_free: (a: number, b: number) => void;
|
|
2222
2215
|
readonly foreignfuturecompletei32_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2223
|
-
readonly
|
|
2224
|
-
readonly foreignfuturecompleteu16_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2225
|
-
readonly foreignfuturecompleteu32_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2226
|
-
readonly foreignfuturecompleteu8_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2216
|
+
readonly foreignfuturecompletevoid_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2227
2217
|
readonly __wbg_foreignfuturecompletef64_free: (a: number, b: number) => void;
|
|
2218
|
+
readonly __wbg_foreignfuturecompletei16_free: (a: number, b: number) => void;
|
|
2228
2219
|
readonly __wbg_foreignfuturecompletei64_free: (a: number, b: number) => void;
|
|
2220
|
+
readonly __wbg_foreignfuturecompleterustbuffer_free: (a: number, b: number) => void;
|
|
2221
|
+
readonly __wbg_foreignfuturecompleteu8_free: (a: number, b: number) => void;
|
|
2229
2222
|
readonly foreignfuturecompletef64_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2223
|
+
readonly foreignfuturecompletei16_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2230
2224
|
readonly foreignfuturecompletei64_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2225
|
+
readonly foreignfuturecompleterustbuffer_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2226
|
+
readonly foreignfuturecompleteu8_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2227
|
+
readonly __wbg_foreignfuturecompleteu32_free: (a: number, b: number) => void;
|
|
2228
|
+
readonly __wbg_foreignfuturecompleteu64_free: (a: number, b: number) => void;
|
|
2229
|
+
readonly foreignfuturecompleteu32_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2230
|
+
readonly foreignfuturecompleteu64_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
2231
2231
|
readonly __wbg_get_rustcallstatus_code: (a: number) => number;
|
|
2232
2232
|
readonly __wbg_rustcallstatus_free: (a: number, b: number) => void;
|
|
2233
2233
|
readonly __wbg_set_rustcallstatus_code: (a: number, b: number) => void;
|
|
@@ -5688,45 +5688,45 @@ function __wbg_get_imports() {
|
|
|
5688
5688
|
const ret = arg0.byteOffset;
|
|
5689
5689
|
return ret;
|
|
5690
5690
|
},
|
|
5691
|
-
|
|
5692
|
-
const ret = arg0.call(arg1, BigInt.asUintN(64, arg2));
|
|
5691
|
+
__wbg_call_2325e8aee238fb5e: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
5692
|
+
const ret = arg0.call(arg1, BigInt.asUintN(64, arg2), arg3, ForeignFutureCompleteRustBuffer.__wrap(arg4), BigInt.asUintN(64, arg5));
|
|
5693
5693
|
return ret;
|
|
5694
5694
|
},
|
|
5695
|
-
|
|
5695
|
+
__wbg_call_2c494b60fdb795ed: function(arg0, arg1, arg2) {
|
|
5696
5696
|
arg0.call(arg1, BigInt.asUintN(64, arg2));
|
|
5697
5697
|
},
|
|
5698
|
-
|
|
5699
|
-
arg0.call(arg1, BigInt.asUintN(64, arg2)
|
|
5698
|
+
__wbg_call_7a9698cedbef9313: function(arg0, arg1, arg2) {
|
|
5699
|
+
const ret = arg0.call(arg1, BigInt.asUintN(64, arg2));
|
|
5700
|
+
return ret;
|
|
5701
|
+
},
|
|
5702
|
+
__wbg_call_89c084c852bcf581: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
5703
|
+
var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
|
|
5704
|
+
wasm.__wbindgen_free(arg3, arg4 * 1, 1);
|
|
5705
|
+
const ret = arg0.call(arg1, BigInt.asUintN(64, arg2), v0, ForeignFutureCompleteRustBuffer.__wrap(arg5), BigInt.asUintN(64, arg6));
|
|
5706
|
+
return ret;
|
|
5700
5707
|
},
|
|
5701
5708
|
__wbg_call_8a2dd23819f8a60a: function() { return handleError(function (arg0, arg1) {
|
|
5702
5709
|
const ret = arg0.call(arg1);
|
|
5703
5710
|
return ret;
|
|
5704
5711
|
}, arguments); },
|
|
5705
|
-
|
|
5706
|
-
const ret = arg0.call(arg1, BigInt.asUintN(64, arg2)
|
|
5712
|
+
__wbg_call_90c145fb2f1956aa: function(arg0, arg1, arg2) {
|
|
5713
|
+
const ret = arg0.call(arg1, BigInt.asUintN(64, arg2));
|
|
5707
5714
|
return ret;
|
|
5708
5715
|
},
|
|
5709
5716
|
__wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
|
|
5710
5717
|
const ret = arg0.call(arg1, arg2);
|
|
5711
5718
|
return ret;
|
|
5712
5719
|
}, arguments); },
|
|
5713
|
-
|
|
5720
|
+
__wbg_call_bb55f3fa9553b590: function(arg0, arg1, arg2) {
|
|
5714
5721
|
arg0.call(arg1, BigInt.asUintN(64, arg2));
|
|
5715
5722
|
},
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
return ret;
|
|
5719
|
-
},
|
|
5720
|
-
__wbg_call_e663b1dbc18c0975: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
5721
|
-
var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
|
|
5722
|
-
wasm.__wbindgen_free(arg3, arg4 * 1, 1);
|
|
5723
|
-
const ret = arg0.call(arg1, BigInt.asUintN(64, arg2), v0, ForeignFutureCompleteRustBuffer.__wrap(arg5), BigInt.asUintN(64, arg6));
|
|
5724
|
-
return ret;
|
|
5723
|
+
__wbg_call_f57c1e6ad55537cc: function(arg0, arg1, arg2, arg3) {
|
|
5724
|
+
arg0.call(arg1, BigInt.asUintN(64, arg2), arg3);
|
|
5725
5725
|
},
|
|
5726
|
-
|
|
5726
|
+
__wbg_call_feb9c7a34e4131ab: function(arg0, arg1, arg2) {
|
|
5727
5727
|
arg0.call(arg1, BigInt.asUintN(64, arg2));
|
|
5728
5728
|
},
|
|
5729
|
-
|
|
5729
|
+
__wbg_call_status_1f63f490cf21c21d: function(arg0) {
|
|
5730
5730
|
const ret = arg0.call_status;
|
|
5731
5731
|
_assertClass(ret, RustCallStatus);
|
|
5732
5732
|
var ptr1 = ret.__destroy_into_raw();
|
|
@@ -5765,7 +5765,7 @@ function __wbg_get_imports() {
|
|
|
5765
5765
|
__wbg_enqueue_6d83b4c6281bafd6: function() { return handleError(function (arg0, arg1) {
|
|
5766
5766
|
arg0.enqueue(arg1);
|
|
5767
5767
|
}, arguments); },
|
|
5768
|
-
|
|
5768
|
+
__wbg_execute_032510998c86ada3: function(arg0) {
|
|
5769
5769
|
const ret = arg0.execute;
|
|
5770
5770
|
return ret;
|
|
5771
5771
|
},
|
|
@@ -5781,7 +5781,7 @@ function __wbg_get_imports() {
|
|
|
5781
5781
|
const ret = arg0.fetch(arg1, arg2);
|
|
5782
5782
|
return ret;
|
|
5783
5783
|
},
|
|
5784
|
-
|
|
5784
|
+
__wbg_free_6ff472af429983e8: function(arg0) {
|
|
5785
5785
|
const ret = arg0.free;
|
|
5786
5786
|
return ret;
|
|
5787
5787
|
},
|
|
@@ -5804,7 +5804,7 @@ function __wbg_get_imports() {
|
|
|
5804
5804
|
const ret = Reflect.get(arg0, arg1);
|
|
5805
5805
|
return ret;
|
|
5806
5806
|
}, arguments); },
|
|
5807
|
-
|
|
5807
|
+
__wbg_get_access_token_d07bff1ca94eefd2: function(arg0) {
|
|
5808
5808
|
const ret = arg0.get_access_token;
|
|
5809
5809
|
return ret;
|
|
5810
5810
|
},
|
|
@@ -5820,7 +5820,7 @@ function __wbg_get_imports() {
|
|
|
5820
5820
|
const ret = arg0.value;
|
|
5821
5821
|
return ret;
|
|
5822
5822
|
},
|
|
5823
|
-
|
|
5823
|
+
__wbg_handle_2b1470162d02da94: function(arg0) {
|
|
5824
5824
|
const ret = arg0.handle;
|
|
5825
5825
|
return ret;
|
|
5826
5826
|
},
|
|
@@ -6021,50 +6021,50 @@ function __wbg_get_imports() {
|
|
|
6021
6021
|
__wbg_respond_510e32df8aeb6817: function() { return handleError(function (arg0, arg1) {
|
|
6022
6022
|
arg0.respond(arg1 >>> 0);
|
|
6023
6023
|
}, arguments); },
|
|
6024
|
-
|
|
6025
|
-
const ret = arg0.return_value;
|
|
6026
|
-
return ret;
|
|
6027
|
-
},
|
|
6028
|
-
__wbg_return_value_192cd18ef1a45ae6: function(arg0) {
|
|
6029
|
-
const ret = arg0.return_value;
|
|
6030
|
-
return ret;
|
|
6031
|
-
},
|
|
6032
|
-
__wbg_return_value_523d96fbaafdf9e1: function(arg0) {
|
|
6024
|
+
__wbg_return_value_11a2e88504324753: function(arg0) {
|
|
6033
6025
|
const ret = arg0.return_value;
|
|
6034
6026
|
return ret;
|
|
6035
6027
|
},
|
|
6036
|
-
|
|
6028
|
+
__wbg_return_value_4a94e5b194877436: function(arg0) {
|
|
6037
6029
|
const ret = arg0.return_value;
|
|
6038
6030
|
return ret;
|
|
6039
6031
|
},
|
|
6040
|
-
|
|
6032
|
+
__wbg_return_value_58d5123eaeac2067: function(arg0) {
|
|
6041
6033
|
const ret = arg0.return_value;
|
|
6042
6034
|
return ret;
|
|
6043
6035
|
},
|
|
6044
|
-
|
|
6036
|
+
__wbg_return_value_74c80e677fc4f7d4: function(arg0, arg1) {
|
|
6045
6037
|
const ret = arg1.return_value;
|
|
6046
6038
|
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
6047
6039
|
const len1 = WASM_VECTOR_LEN;
|
|
6048
6040
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
6049
6041
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
6050
6042
|
},
|
|
6051
|
-
|
|
6043
|
+
__wbg_return_value_956f00ed925c4818: function(arg0) {
|
|
6044
|
+
const ret = arg0.return_value;
|
|
6045
|
+
return ret;
|
|
6046
|
+
},
|
|
6047
|
+
__wbg_return_value_96f8ab1ccde345bc: function(arg0) {
|
|
6048
|
+
const ret = arg0.return_value;
|
|
6049
|
+
return ret;
|
|
6050
|
+
},
|
|
6051
|
+
__wbg_return_value_b180d62db8952018: function(arg0) {
|
|
6052
6052
|
const ret = arg0.return_value;
|
|
6053
6053
|
return ret;
|
|
6054
6054
|
},
|
|
6055
|
-
|
|
6055
|
+
__wbg_return_value_b3ef039f4aae8f41: function(arg0) {
|
|
6056
6056
|
const ret = arg0.return_value;
|
|
6057
6057
|
return ret;
|
|
6058
6058
|
},
|
|
6059
|
-
|
|
6059
|
+
__wbg_return_value_d7223ad80370e50b: function(arg0) {
|
|
6060
6060
|
const ret = arg0.return_value;
|
|
6061
6061
|
return ret;
|
|
6062
6062
|
},
|
|
6063
|
-
|
|
6063
|
+
__wbg_return_value_dc912d477b81f807: function(arg0) {
|
|
6064
6064
|
const ret = arg0.return_value;
|
|
6065
6065
|
return ret;
|
|
6066
6066
|
},
|
|
6067
|
-
|
|
6067
|
+
__wbg_return_value_ed51e08cb18afada: function(arg0) {
|
|
6068
6068
|
const ret = arg0.return_value;
|
|
6069
6069
|
return ret;
|
|
6070
6070
|
},
|
|
@@ -6155,19 +6155,19 @@ function __wbg_get_imports() {
|
|
|
6155
6155
|
const ret = arg0.toString();
|
|
6156
6156
|
return ret;
|
|
6157
6157
|
},
|
|
6158
|
-
|
|
6158
|
+
__wbg_uniffi_clone_92a912a27badfc9c: function(arg0) {
|
|
6159
6159
|
const ret = arg0.uniffi_clone;
|
|
6160
6160
|
return ret;
|
|
6161
6161
|
},
|
|
6162
|
-
|
|
6162
|
+
__wbg_uniffi_clone_c961449ce1f36c1a: function(arg0) {
|
|
6163
6163
|
const ret = arg0.uniffi_clone;
|
|
6164
6164
|
return ret;
|
|
6165
6165
|
},
|
|
6166
|
-
|
|
6166
|
+
__wbg_uniffi_free_1b5d0da25d4d8e5e: function(arg0) {
|
|
6167
6167
|
const ret = arg0.uniffi_free;
|
|
6168
6168
|
return ret;
|
|
6169
6169
|
},
|
|
6170
|
-
|
|
6170
|
+
__wbg_uniffi_free_c71028223a500c14: function(arg0) {
|
|
6171
6171
|
const ret = arg0.uniffi_free;
|
|
6172
6172
|
return ret;
|
|
6173
6173
|
},
|
|
Binary file
|
|
@@ -1037,28 +1037,28 @@ export const ubrn_uniffi_cua_sdk_fn_method_spacesdclient_type_text: (a: bigint,
|
|
|
1037
1037
|
export const uniffi_cua_sdk_fn_method_spacesdclient_type_text: (a: bigint, b: number) => bigint;
|
|
1038
1038
|
export const __wbg_foreignfuturecompletei8_free: (a: number, b: number) => void;
|
|
1039
1039
|
export const foreignfuturecompletei8_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1040
|
-
export const
|
|
1041
|
-
export const
|
|
1040
|
+
export const __wbg_foreignfuturecompleteu16_free: (a: number, b: number) => void;
|
|
1041
|
+
export const foreignfuturecompleteu16_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1042
1042
|
export const __wbg_foreignfuturecompletef32_free: (a: number, b: number) => void;
|
|
1043
|
-
export const
|
|
1043
|
+
export const __wbg_foreignfuturecompletei32_free: (a: number, b: number) => void;
|
|
1044
1044
|
export const __wbg_foreignfuturecompletevoid_free: (a: number, b: number) => void;
|
|
1045
1045
|
export const foreignfuturecompletef32_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1046
|
-
export const foreignfuturecompleteu64_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1047
|
-
export const foreignfuturecompletevoid_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1048
|
-
export const __wbg_foreignfuturecompletei32_free: (a: number, b: number) => void;
|
|
1049
|
-
export const __wbg_foreignfuturecompleterustbuffer_free: (a: number, b: number) => void;
|
|
1050
|
-
export const __wbg_foreignfuturecompleteu16_free: (a: number, b: number) => void;
|
|
1051
|
-
export const __wbg_foreignfuturecompleteu32_free: (a: number, b: number) => void;
|
|
1052
|
-
export const __wbg_foreignfuturecompleteu8_free: (a: number, b: number) => void;
|
|
1053
1046
|
export const foreignfuturecompletei32_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1054
|
-
export const
|
|
1055
|
-
export const foreignfuturecompleteu16_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1056
|
-
export const foreignfuturecompleteu32_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1057
|
-
export const foreignfuturecompleteu8_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1047
|
+
export const foreignfuturecompletevoid_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1058
1048
|
export const __wbg_foreignfuturecompletef64_free: (a: number, b: number) => void;
|
|
1049
|
+
export const __wbg_foreignfuturecompletei16_free: (a: number, b: number) => void;
|
|
1059
1050
|
export const __wbg_foreignfuturecompletei64_free: (a: number, b: number) => void;
|
|
1051
|
+
export const __wbg_foreignfuturecompleterustbuffer_free: (a: number, b: number) => void;
|
|
1052
|
+
export const __wbg_foreignfuturecompleteu8_free: (a: number, b: number) => void;
|
|
1060
1053
|
export const foreignfuturecompletef64_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1054
|
+
export const foreignfuturecompletei16_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1061
1055
|
export const foreignfuturecompletei64_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1056
|
+
export const foreignfuturecompleterustbuffer_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1057
|
+
export const foreignfuturecompleteu8_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1058
|
+
export const __wbg_foreignfuturecompleteu32_free: (a: number, b: number) => void;
|
|
1059
|
+
export const __wbg_foreignfuturecompleteu64_free: (a: number, b: number) => void;
|
|
1060
|
+
export const foreignfuturecompleteu32_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1061
|
+
export const foreignfuturecompleteu64_call: (a: number, b: number, c: bigint, d: any) => void;
|
|
1062
1062
|
export const __wbg_get_rustcallstatus_code: (a: number) => number;
|
|
1063
1063
|
export const __wbg_rustcallstatus_free: (a: number, b: number) => void;
|
|
1064
1064
|
export const __wbg_set_rustcallstatus_code: (a: number, b: number) => void;
|
|
@@ -410,6 +410,7 @@ interface NativeModuleInterface {
|
|
|
410
410
|
uniffi_cua_sdk_fn_method_space_supports(uniffiSelf: bigint, feature: Uint8Array, uniffi_out_err: UniffiRustCallStatus): number;
|
|
411
411
|
uniffi_cua_sdk_fn_method_space_teleport(uniffiSelf: bigint, app: Uint8Array, scope: Uint8Array, approver: bigint, requestId: Uint8Array): bigint;
|
|
412
412
|
uniffi_cua_sdk_fn_method_space_teleport_manifest(uniffiSelf: bigint, app: Uint8Array, scope: Uint8Array): bigint;
|
|
413
|
+
uniffi_cua_sdk_fn_method_space_thumbnail(uniffiSelf: bigint, maxAgeMs: Uint8Array): bigint;
|
|
413
414
|
uniffi_cua_sdk_fn_method_space_unshare(uniffiSelf: bigint, who: Uint8Array): bigint;
|
|
414
415
|
uniffi_cua_sdk_fn_method_space_upload(uniffiSelf: bigint, localPath: Uint8Array, dest: Uint8Array): bigint;
|
|
415
416
|
uniffi_cua_sdk_fn_method_space_usage(uniffiSelf: bigint): bigint;
|
|
@@ -849,6 +850,7 @@ interface NativeModuleInterface {
|
|
|
849
850
|
uniffi_cua_sdk_checksum_method_space_supports(): number;
|
|
850
851
|
uniffi_cua_sdk_checksum_method_space_teleport(): number;
|
|
851
852
|
uniffi_cua_sdk_checksum_method_space_teleport_manifest(): number;
|
|
853
|
+
uniffi_cua_sdk_checksum_method_space_thumbnail(): number;
|
|
852
854
|
uniffi_cua_sdk_checksum_method_space_unshare(): number;
|
|
853
855
|
uniffi_cua_sdk_checksum_method_space_upload(): number;
|
|
854
856
|
uniffi_cua_sdk_checksum_method_space_usage(): number;
|
|
@@ -2062,6 +2062,11 @@ const DEFINITIONS = {
|
|
|
2062
2062
|
ret: FfiType.Handle,
|
|
2063
2063
|
hasRustCallStatus: false,
|
|
2064
2064
|
},
|
|
2065
|
+
"uniffi_cua_sdk_fn_method_space_thumbnail": {
|
|
2066
|
+
args: [FfiType.Handle, FfiType.RustBuffer],
|
|
2067
|
+
ret: FfiType.Handle,
|
|
2068
|
+
hasRustCallStatus: false,
|
|
2069
|
+
},
|
|
2065
2070
|
"uniffi_cua_sdk_fn_method_space_unshare": {
|
|
2066
2071
|
args: [FfiType.Handle, FfiType.RustBuffer],
|
|
2067
2072
|
ret: FfiType.Handle,
|
|
@@ -4257,6 +4262,11 @@ const DEFINITIONS = {
|
|
|
4257
4262
|
ret: FfiType.UInt16,
|
|
4258
4263
|
hasRustCallStatus: false,
|
|
4259
4264
|
},
|
|
4265
|
+
"uniffi_cua_sdk_checksum_method_space_thumbnail": {
|
|
4266
|
+
args: [],
|
|
4267
|
+
ret: FfiType.UInt16,
|
|
4268
|
+
hasRustCallStatus: false,
|
|
4269
|
+
},
|
|
4260
4270
|
"uniffi_cua_sdk_checksum_method_space_unshare": {
|
|
4261
4271
|
args: [],
|
|
4262
4272
|
ret: FfiType.UInt16,
|
package/dist/native/cua_sdk.d.ts
CHANGED
|
@@ -6677,6 +6677,40 @@ export declare const SpaceStreamTicket: Readonly<{
|
|
|
6677
6677
|
new: (partial: Partial<SpaceStreamTicket> & Required<Omit<SpaceStreamTicket, "ticketExpiresAt">>) => SpaceStreamTicket;
|
|
6678
6678
|
defaults: () => Partial<SpaceStreamTicket>;
|
|
6679
6679
|
}>;
|
|
6680
|
+
/**
|
|
6681
|
+
* A Space's latest thumbnail, from the cache every client on this machine
|
|
6682
|
+
* shares ([`crate::native::spaces::Space::thumbnail`]).
|
|
6683
|
+
*/
|
|
6684
|
+
export type SpaceThumbnail = {
|
|
6685
|
+
/**
|
|
6686
|
+
* Encoded image (a small JPEG of the primary display).
|
|
6687
|
+
*/
|
|
6688
|
+
image: ArrayBuffer;
|
|
6689
|
+
/**
|
|
6690
|
+
* Encoding.
|
|
6691
|
+
*/
|
|
6692
|
+
format: ImageFormat;
|
|
6693
|
+
/**
|
|
6694
|
+
* Pixel width.
|
|
6695
|
+
*/
|
|
6696
|
+
width: number;
|
|
6697
|
+
/**
|
|
6698
|
+
* Pixel height.
|
|
6699
|
+
*/
|
|
6700
|
+
height: number;
|
|
6701
|
+
/**
|
|
6702
|
+
* When it was captured, Unix milliseconds.
|
|
6703
|
+
*/
|
|
6704
|
+
capturedAtMs: bigint;
|
|
6705
|
+
};
|
|
6706
|
+
/**
|
|
6707
|
+
* Generated factory for {@link SpaceThumbnail} record objects.
|
|
6708
|
+
*/
|
|
6709
|
+
export declare const SpaceThumbnail: Readonly<{
|
|
6710
|
+
create: (partial: Partial<SpaceThumbnail> & Required<Omit<SpaceThumbnail, never>>) => SpaceThumbnail;
|
|
6711
|
+
new: (partial: Partial<SpaceThumbnail> & Required<Omit<SpaceThumbnail, never>>) => SpaceThumbnail;
|
|
6712
|
+
defaults: () => Partial<SpaceThumbnail>;
|
|
6713
|
+
}>;
|
|
6680
6714
|
/**
|
|
6681
6715
|
* A tool of a Space's MCP service.
|
|
6682
6716
|
*/
|
|
@@ -9447,10 +9481,11 @@ export interface LoginAttemptLike {
|
|
|
9447
9481
|
* Waits for the user, stores the session and returns who signed in.
|
|
9448
9482
|
* Only the first call waits; later calls fail.
|
|
9449
9483
|
*
|
|
9450
|
-
*
|
|
9451
|
-
*
|
|
9452
|
-
* the fresh sign-in enrolls
|
|
9453
|
-
* That step is best effort and
|
|
9484
|
+
* This device then registers with the relay (the one `cua` uses:
|
|
9485
|
+
* `CUA_RELAY_URL`, else this machine's host setup, else relay.cua.ai),
|
|
9486
|
+
* creating its device key on first use, so the fresh sign-in enrolls
|
|
9487
|
+
* or re-verifies it without an approval. That step is best effort and
|
|
9488
|
+
* never fails the sign-in.
|
|
9454
9489
|
*/
|
|
9455
9490
|
wait(asyncOpts_?: {
|
|
9456
9491
|
signal: AbortSignal;
|
|
@@ -9488,10 +9523,11 @@ export declare class LoginAttempt extends UniffiAbstractObject implements LoginA
|
|
|
9488
9523
|
* Waits for the user, stores the session and returns who signed in.
|
|
9489
9524
|
* Only the first call waits; later calls fail.
|
|
9490
9525
|
*
|
|
9491
|
-
*
|
|
9492
|
-
*
|
|
9493
|
-
* the fresh sign-in enrolls
|
|
9494
|
-
* That step is best effort and
|
|
9526
|
+
* This device then registers with the relay (the one `cua` uses:
|
|
9527
|
+
* `CUA_RELAY_URL`, else this machine's host setup, else relay.cua.ai),
|
|
9528
|
+
* creating its device key on first use, so the fresh sign-in enrolls
|
|
9529
|
+
* or re-verifies it without an approval. That step is best effort and
|
|
9530
|
+
* never fails the sign-in.
|
|
9495
9531
|
*/
|
|
9496
9532
|
wait(asyncOpts_?: {
|
|
9497
9533
|
signal: AbortSignal;
|
|
@@ -9666,9 +9702,10 @@ export interface AuthLike {
|
|
|
9666
9702
|
signal: AbortSignal;
|
|
9667
9703
|
}): Promise<LoginAttemptLike>;
|
|
9668
9704
|
/**
|
|
9669
|
-
* This device on `relay_url` (`None` = `
|
|
9705
|
+
* This device on `relay_url` (`None` = the relay `cua` uses:
|
|
9706
|
+
* `CUA_RELAY_URL`, else this machine's host setup, else
|
|
9670
9707
|
* `https://relay.cua.ai`) as the signed-in account, shown as `name`
|
|
9671
|
-
* (default:
|
|
9708
|
+
* (default: this computer's name).
|
|
9672
9709
|
*/
|
|
9673
9710
|
devices(relayUrl: string | undefined, name: string | undefined): DevicesLike;
|
|
9674
9711
|
/**
|
|
@@ -9710,9 +9747,10 @@ export declare class Auth extends UniffiAbstractObject implements AuthLike {
|
|
|
9710
9747
|
signal: AbortSignal;
|
|
9711
9748
|
}): Promise<LoginAttemptLike>;
|
|
9712
9749
|
/**
|
|
9713
|
-
* This device on `relay_url` (`None` = `
|
|
9750
|
+
* This device on `relay_url` (`None` = the relay `cua` uses:
|
|
9751
|
+
* `CUA_RELAY_URL`, else this machine's host setup, else
|
|
9714
9752
|
* `https://relay.cua.ai`) as the signed-in account, shown as `name`
|
|
9715
|
-
* (default:
|
|
9753
|
+
* (default: this computer's name).
|
|
9716
9754
|
*/
|
|
9717
9755
|
devices(relayUrl: string | undefined, name: string | undefined): DevicesLike;
|
|
9718
9756
|
/**
|
|
@@ -12666,10 +12704,10 @@ export interface SpaceLike {
|
|
|
12666
12704
|
signal: AbortSignal;
|
|
12667
12705
|
}): Promise<SiteLoginReport>;
|
|
12668
12706
|
/**
|
|
12669
|
-
* Captures the Space's display
|
|
12670
|
-
*
|
|
12671
|
-
*
|
|
12672
|
-
* cua-spacesd.
|
|
12707
|
+
* Captures the Space's display: PNG at full size on the primary
|
|
12708
|
+
* display unless `options` say otherwise (for a small preview,
|
|
12709
|
+
* [`Space::thumbnail`] reads the shared cache instead). Fails with
|
|
12710
|
+
* `CapabilityMissing` (`spacesd`) when the image runs no cua-spacesd.
|
|
12673
12711
|
*/
|
|
12674
12712
|
screenshot(options: ScreenshotOptions | undefined, asyncOpts_?: {
|
|
12675
12713
|
signal: AbortSignal;
|
|
@@ -12760,6 +12798,18 @@ export interface SpaceLike {
|
|
|
12760
12798
|
teleportManifest(app: string, scope: string | undefined, asyncOpts_?: {
|
|
12761
12799
|
signal: AbortSignal;
|
|
12762
12800
|
}): Promise<TeleportManifest>;
|
|
12801
|
+
/**
|
|
12802
|
+
* The Space's latest thumbnail (a small JPEG of its primary display)
|
|
12803
|
+
* from the cache every client on this machine shares: returned at
|
|
12804
|
+
* once when it is younger than `max_age_ms` (unset: any age), else
|
|
12805
|
+
* captured fresh through cua-spacesd and kept for the next caller.
|
|
12806
|
+
* When that capture fails, the older one comes back (`captured_at_ms`
|
|
12807
|
+
* says how old). Asking keeps the daemon refreshing running Spaces'
|
|
12808
|
+
* thumbnails in the background for a while (about every 90 s).
|
|
12809
|
+
*/
|
|
12810
|
+
thumbnail(maxAgeMs: bigint | undefined, asyncOpts_?: {
|
|
12811
|
+
signal: AbortSignal;
|
|
12812
|
+
}): Promise<SpaceThumbnail>;
|
|
12763
12813
|
/**
|
|
12764
12814
|
* Stops sharing this Space with `who` at once, or with everyone when
|
|
12765
12815
|
* `who` is `None`.
|
|
@@ -12988,10 +13038,10 @@ export declare class Space extends UniffiAbstractObject implements SpaceLike {
|
|
|
12988
13038
|
signal: AbortSignal;
|
|
12989
13039
|
}): Promise<SiteLoginReport>;
|
|
12990
13040
|
/**
|
|
12991
|
-
* Captures the Space's display
|
|
12992
|
-
*
|
|
12993
|
-
*
|
|
12994
|
-
* cua-spacesd.
|
|
13041
|
+
* Captures the Space's display: PNG at full size on the primary
|
|
13042
|
+
* display unless `options` say otherwise (for a small preview,
|
|
13043
|
+
* [`Space::thumbnail`] reads the shared cache instead). Fails with
|
|
13044
|
+
* `CapabilityMissing` (`spacesd`) when the image runs no cua-spacesd.
|
|
12995
13045
|
*/
|
|
12996
13046
|
screenshot(options: ScreenshotOptions | undefined, asyncOpts_?: {
|
|
12997
13047
|
signal: AbortSignal;
|
|
@@ -13082,6 +13132,18 @@ export declare class Space extends UniffiAbstractObject implements SpaceLike {
|
|
|
13082
13132
|
teleportManifest(app: string, scope: string | undefined, asyncOpts_?: {
|
|
13083
13133
|
signal: AbortSignal;
|
|
13084
13134
|
}): Promise<TeleportManifest>;
|
|
13135
|
+
/**
|
|
13136
|
+
* The Space's latest thumbnail (a small JPEG of its primary display)
|
|
13137
|
+
* from the cache every client on this machine shares: returned at
|
|
13138
|
+
* once when it is younger than `max_age_ms` (unset: any age), else
|
|
13139
|
+
* captured fresh through cua-spacesd and kept for the next caller.
|
|
13140
|
+
* When that capture fails, the older one comes back (`captured_at_ms`
|
|
13141
|
+
* says how old). Asking keeps the daemon refreshing running Spaces'
|
|
13142
|
+
* thumbnails in the background for a while (about every 90 s).
|
|
13143
|
+
*/
|
|
13144
|
+
thumbnail(maxAgeMs: bigint | undefined, asyncOpts_?: {
|
|
13145
|
+
signal: AbortSignal;
|
|
13146
|
+
}): Promise<SpaceThumbnail>;
|
|
13085
13147
|
/**
|
|
13086
13148
|
* Stops sharing this Space with `who` at once, or with everyone when
|
|
13087
13149
|
* `who` is `None`.
|
|
@@ -14372,8 +14434,9 @@ export declare class Relay extends UniffiAbstractObject implements RelayLike {
|
|
|
14372
14434
|
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
14373
14435
|
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
14374
14436
|
/**
|
|
14375
|
-
* A relay (`None` = `CUA_RELAY_URL`, else
|
|
14376
|
-
*
|
|
14437
|
+
* A relay (`None` = the relay `cua` uses: `CUA_RELAY_URL`, else this
|
|
14438
|
+
* machine's host setup, else `https://relay.cua.ai`) seen as the
|
|
14439
|
+
* account behind `account_token` (a cua.ai access token).
|
|
14377
14440
|
*/
|
|
14378
14441
|
constructor(relayUrl: string | undefined, accountToken: string);
|
|
14379
14442
|
/**
|
|
@@ -15708,6 +15771,13 @@ declare const _default: Readonly<{
|
|
|
15708
15771
|
lift(value: UniffiByteArray): SpaceStreamTicket;
|
|
15709
15772
|
lower(value: SpaceStreamTicket, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
15710
15773
|
};
|
|
15774
|
+
FfiConverterTypeSpaceThumbnail: {
|
|
15775
|
+
read(from: RustBuffer): SpaceThumbnail;
|
|
15776
|
+
write(value: SpaceThumbnail, into: RustBuffer): void;
|
|
15777
|
+
allocationSize(value: SpaceThumbnail): number;
|
|
15778
|
+
lift(value: UniffiByteArray): SpaceThumbnail;
|
|
15779
|
+
lower(value: SpaceThumbnail, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
15780
|
+
};
|
|
15711
15781
|
FfiConverterTypeSpaceToolInfo: {
|
|
15712
15782
|
read(from: RustBuffer): SpaceToolInfo;
|
|
15713
15783
|
write(value: SpaceToolInfo, into: RustBuffer): void;
|
package/dist/native/cua_sdk.js
CHANGED
|
@@ -9764,6 +9764,49 @@ const FfiConverterTypeSpaceStreamTicket = (() => {
|
|
|
9764
9764
|
;
|
|
9765
9765
|
return new FFIConverter();
|
|
9766
9766
|
})();
|
|
9767
|
+
/**
|
|
9768
|
+
* Generated factory for {@link SpaceThumbnail} record objects.
|
|
9769
|
+
*/
|
|
9770
|
+
export const SpaceThumbnail = (() => {
|
|
9771
|
+
const defaults = () => ({});
|
|
9772
|
+
const create = (() => {
|
|
9773
|
+
return uniffiCreateRecord(defaults);
|
|
9774
|
+
})();
|
|
9775
|
+
return Object.freeze({
|
|
9776
|
+
create,
|
|
9777
|
+
new: create,
|
|
9778
|
+
defaults: () => Object.freeze(defaults()),
|
|
9779
|
+
});
|
|
9780
|
+
})();
|
|
9781
|
+
const FfiConverterTypeSpaceThumbnail = (() => {
|
|
9782
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
9783
|
+
read(from) {
|
|
9784
|
+
return {
|
|
9785
|
+
image: FfiConverterArrayBuffer.read(from),
|
|
9786
|
+
format: FfiConverterTypeImageFormat.read(from),
|
|
9787
|
+
width: FfiConverterUInt32.read(from),
|
|
9788
|
+
height: FfiConverterUInt32.read(from),
|
|
9789
|
+
capturedAtMs: FfiConverterUInt64.read(from)
|
|
9790
|
+
};
|
|
9791
|
+
}
|
|
9792
|
+
write(value, into) {
|
|
9793
|
+
FfiConverterArrayBuffer.write(value.image, into);
|
|
9794
|
+
FfiConverterTypeImageFormat.write(value.format, into);
|
|
9795
|
+
FfiConverterUInt32.write(value.width, into);
|
|
9796
|
+
FfiConverterUInt32.write(value.height, into);
|
|
9797
|
+
FfiConverterUInt64.write(value.capturedAtMs, into);
|
|
9798
|
+
}
|
|
9799
|
+
allocationSize(value) {
|
|
9800
|
+
return FfiConverterArrayBuffer.allocationSize(value.image) +
|
|
9801
|
+
FfiConverterTypeImageFormat.allocationSize(value.format) +
|
|
9802
|
+
FfiConverterUInt32.allocationSize(value.width) +
|
|
9803
|
+
FfiConverterUInt32.allocationSize(value.height) +
|
|
9804
|
+
FfiConverterUInt64.allocationSize(value.capturedAtMs);
|
|
9805
|
+
}
|
|
9806
|
+
}
|
|
9807
|
+
;
|
|
9808
|
+
return new FFIConverter();
|
|
9809
|
+
})();
|
|
9767
9810
|
/**
|
|
9768
9811
|
* Generated factory for {@link SpaceToolInfo} record objects.
|
|
9769
9812
|
*/
|
|
@@ -13371,10 +13414,11 @@ export class LoginAttempt extends UniffiAbstractObject {
|
|
|
13371
13414
|
* Waits for the user, stores the session and returns who signed in.
|
|
13372
13415
|
* Only the first call waits; later calls fail.
|
|
13373
13416
|
*
|
|
13374
|
-
*
|
|
13375
|
-
*
|
|
13376
|
-
* the fresh sign-in enrolls
|
|
13377
|
-
* That step is best effort and
|
|
13417
|
+
* This device then registers with the relay (the one `cua` uses:
|
|
13418
|
+
* `CUA_RELAY_URL`, else this machine's host setup, else relay.cua.ai),
|
|
13419
|
+
* creating its device key on first use, so the fresh sign-in enrolls
|
|
13420
|
+
* or re-verifies it without an approval. That step is best effort and
|
|
13421
|
+
* never fails the sign-in.
|
|
13378
13422
|
*/
|
|
13379
13423
|
async wait(asyncOpts_) {
|
|
13380
13424
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
@@ -13898,9 +13942,10 @@ export class Auth extends UniffiAbstractObject {
|
|
|
13898
13942
|
}
|
|
13899
13943
|
}
|
|
13900
13944
|
/**
|
|
13901
|
-
* This device on `relay_url` (`None` = `
|
|
13945
|
+
* This device on `relay_url` (`None` = the relay `cua` uses:
|
|
13946
|
+
* `CUA_RELAY_URL`, else this machine's host setup, else
|
|
13902
13947
|
* `https://relay.cua.ai`) as the signed-in account, shown as `name`
|
|
13903
|
-
* (default:
|
|
13948
|
+
* (default: this computer's name).
|
|
13904
13949
|
*/
|
|
13905
13950
|
devices(relayUrl, name) {
|
|
13906
13951
|
return FfiConverterTypeDevices.lift(uniffiCaller.rustCallWithError(
|
|
@@ -21498,10 +21543,10 @@ export class Space extends UniffiAbstractObject {
|
|
|
21498
21543
|
}
|
|
21499
21544
|
}
|
|
21500
21545
|
/**
|
|
21501
|
-
* Captures the Space's display
|
|
21502
|
-
*
|
|
21503
|
-
*
|
|
21504
|
-
* cua-spacesd.
|
|
21546
|
+
* Captures the Space's display: PNG at full size on the primary
|
|
21547
|
+
* display unless `options` say otherwise (for a small preview,
|
|
21548
|
+
* [`Space::thumbnail`] reads the shared cache instead). Fails with
|
|
21549
|
+
* `CapabilityMissing` (`spacesd`) when the image runs no cua-spacesd.
|
|
21505
21550
|
*/
|
|
21506
21551
|
async screenshot(options, asyncOpts_) {
|
|
21507
21552
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
@@ -21866,6 +21911,44 @@ export class Space extends UniffiAbstractObject {
|
|
|
21866
21911
|
throw __error;
|
|
21867
21912
|
}
|
|
21868
21913
|
}
|
|
21914
|
+
/**
|
|
21915
|
+
* The Space's latest thumbnail (a small JPEG of its primary display)
|
|
21916
|
+
* from the cache every client on this machine shares: returned at
|
|
21917
|
+
* once when it is younger than `max_age_ms` (unset: any age), else
|
|
21918
|
+
* captured fresh through cua-spacesd and kept for the next caller.
|
|
21919
|
+
* When that capture fails, the older one comes back (`captured_at_ms`
|
|
21920
|
+
* says how old). Asking keeps the daemon refreshing running Spaces'
|
|
21921
|
+
* thumbnails in the background for a while (about every 90 s).
|
|
21922
|
+
*/
|
|
21923
|
+
async thumbnail(maxAgeMs, asyncOpts_) {
|
|
21924
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
21925
|
+
try {
|
|
21926
|
+
return await uniffiRustCallAsync(
|
|
21927
|
+
/*rustCaller:*/ uniffiCaller,
|
|
21928
|
+
/*rustFutureFunc:*/ () => {
|
|
21929
|
+
return nativeModule().uniffi_cua_sdk_fn_method_space_thumbnail(uniffiTypeSpaceObjectFactory.clonePointer(this), FfiConverterOptionalUInt64.lower(maxAgeMs, nativeModule().rustbuffer_alloc));
|
|
21930
|
+
},
|
|
21931
|
+
/*pollFunc:*/ nativeModule().ffi_cua_sdk_rust_future_poll_rust_buffer,
|
|
21932
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_sdk_rust_future_cancel_rust_buffer,
|
|
21933
|
+
/*completeFunc:*/ nativeModule().ffi_cua_sdk_rust_future_complete_rust_buffer,
|
|
21934
|
+
/*freeFunc:*/ nativeModule().ffi_cua_sdk_rust_future_free_rust_buffer,
|
|
21935
|
+
// Async returns always go through the JS-side converter: the
|
|
21936
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
21937
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
21938
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
21939
|
+
// here using the per-callable return-type converter.
|
|
21940
|
+
/*liftFunc:*/ FfiConverterTypeSpaceThumbnail.lift.bind(FfiConverterTypeSpaceThumbnail),
|
|
21941
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
21942
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
21943
|
+
/*errorHandler:*/ FfiConverterTypeCuaError.lift.bind(FfiConverterTypeCuaError));
|
|
21944
|
+
}
|
|
21945
|
+
catch (__error) {
|
|
21946
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
21947
|
+
__error.stack = __stack;
|
|
21948
|
+
}
|
|
21949
|
+
throw __error;
|
|
21950
|
+
}
|
|
21951
|
+
}
|
|
21869
21952
|
/**
|
|
21870
21953
|
* Stops sharing this Space with `who` at once, or with everyone when
|
|
21871
21954
|
* `who` is `None`.
|
|
@@ -24970,8 +25053,9 @@ export class Relay extends UniffiAbstractObject {
|
|
|
24970
25053
|
[destructorGuardSymbol];
|
|
24971
25054
|
[pointerLiteralSymbol];
|
|
24972
25055
|
/**
|
|
24973
|
-
* A relay (`None` = `CUA_RELAY_URL`, else
|
|
24974
|
-
*
|
|
25056
|
+
* A relay (`None` = the relay `cua` uses: `CUA_RELAY_URL`, else this
|
|
25057
|
+
* machine's host setup, else `https://relay.cua.ai`) seen as the
|
|
25058
|
+
* account behind `account_token` (a cua.ai access token).
|
|
24975
25059
|
*/
|
|
24976
25060
|
constructor(relayUrl, accountToken) {
|
|
24977
25061
|
super();
|
|
@@ -25768,7 +25852,7 @@ function uniffiEnsureInitialized() {
|
|
|
25768
25852
|
if (nativeModule().uniffi_cua_sdk_checksum_method_auth_begin_login() !== 55109) {
|
|
25769
25853
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_auth_begin_login");
|
|
25770
25854
|
}
|
|
25771
|
-
if (nativeModule().uniffi_cua_sdk_checksum_method_auth_devices() !==
|
|
25855
|
+
if (nativeModule().uniffi_cua_sdk_checksum_method_auth_devices() !== 36673) {
|
|
25772
25856
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_auth_devices");
|
|
25773
25857
|
}
|
|
25774
25858
|
if (nativeModule().uniffi_cua_sdk_checksum_method_auth_logout() !== 38806) {
|
|
@@ -26011,7 +26095,7 @@ function uniffiEnsureInitialized() {
|
|
|
26011
26095
|
if (nativeModule().uniffi_cua_sdk_checksum_method_loginattempt_user_code() !== 37591) {
|
|
26012
26096
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_loginattempt_user_code");
|
|
26013
26097
|
}
|
|
26014
|
-
if (nativeModule().uniffi_cua_sdk_checksum_method_loginattempt_wait() !==
|
|
26098
|
+
if (nativeModule().uniffi_cua_sdk_checksum_method_loginattempt_wait() !== 16950) {
|
|
26015
26099
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_loginattempt_wait");
|
|
26016
26100
|
}
|
|
26017
26101
|
if (nativeModule().uniffi_cua_sdk_checksum_method_mcpclient_call_tool() !== 44958) {
|
|
@@ -26110,7 +26194,7 @@ function uniffiEnsureInitialized() {
|
|
|
26110
26194
|
if (nativeModule().uniffi_cua_sdk_checksum_method_presenceview_upsert() !== 29196) {
|
|
26111
26195
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_presenceview_upsert");
|
|
26112
26196
|
}
|
|
26113
|
-
if (nativeModule().uniffi_cua_sdk_checksum_constructor_relay_new() !==
|
|
26197
|
+
if (nativeModule().uniffi_cua_sdk_checksum_constructor_relay_new() !== 19970) {
|
|
26114
26198
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_constructor_relay_new");
|
|
26115
26199
|
}
|
|
26116
26200
|
if (nativeModule().uniffi_cua_sdk_checksum_method_relay_connect() !== 37946) {
|
|
@@ -26350,7 +26434,7 @@ function uniffiEnsureInitialized() {
|
|
|
26350
26434
|
if (nativeModule().uniffi_cua_sdk_checksum_method_space_request_site_login() !== 2223) {
|
|
26351
26435
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_space_request_site_login");
|
|
26352
26436
|
}
|
|
26353
|
-
if (nativeModule().uniffi_cua_sdk_checksum_method_space_screenshot() !==
|
|
26437
|
+
if (nativeModule().uniffi_cua_sdk_checksum_method_space_screenshot() !== 41142) {
|
|
26354
26438
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_space_screenshot");
|
|
26355
26439
|
}
|
|
26356
26440
|
if (nativeModule().uniffi_cua_sdk_checksum_method_space_send_file() !== 29056) {
|
|
@@ -26386,6 +26470,9 @@ function uniffiEnsureInitialized() {
|
|
|
26386
26470
|
if (nativeModule().uniffi_cua_sdk_checksum_method_space_teleport_manifest() !== 31596) {
|
|
26387
26471
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_space_teleport_manifest");
|
|
26388
26472
|
}
|
|
26473
|
+
if (nativeModule().uniffi_cua_sdk_checksum_method_space_thumbnail() !== 10979) {
|
|
26474
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_space_thumbnail");
|
|
26475
|
+
}
|
|
26389
26476
|
if (nativeModule().uniffi_cua_sdk_checksum_method_space_unshare() !== 58172) {
|
|
26390
26477
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_space_unshare");
|
|
26391
26478
|
}
|
|
@@ -27026,6 +27113,7 @@ export default Object.freeze({
|
|
|
27026
27113
|
FfiConverterTypeSpaceStreamSession,
|
|
27027
27114
|
FfiConverterTypeSpaceStreamStats,
|
|
27028
27115
|
FfiConverterTypeSpaceStreamTicket,
|
|
27116
|
+
FfiConverterTypeSpaceThumbnail,
|
|
27029
27117
|
FfiConverterTypeSpaceToolInfo,
|
|
27030
27118
|
FfiConverterTypeSpaceToolResult,
|
|
27031
27119
|
FfiConverterTypeSpaceTransferReport,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trycua/cua",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The cua SDK for Node and the browser: sandboxes, cua-spacesd, media streaming, Spaces and the cua daemon, on a Rust core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,11 +83,11 @@
|
|
|
83
83
|
"cua": "bin/cua.js"
|
|
84
84
|
},
|
|
85
85
|
"optionalDependencies": {
|
|
86
|
-
"@trycua/cua-darwin-arm64": "0.
|
|
87
|
-
"@trycua/cua-darwin-x64": "0.
|
|
88
|
-
"@trycua/cua-linux-arm64-gnu": "0.
|
|
89
|
-
"@trycua/cua-linux-x64-gnu": "0.
|
|
90
|
-
"@trycua/cua-win32-arm64-msvc": "0.
|
|
91
|
-
"@trycua/cua-win32-x64-msvc": "0.
|
|
86
|
+
"@trycua/cua-darwin-arm64": "0.3.0",
|
|
87
|
+
"@trycua/cua-darwin-x64": "0.3.0",
|
|
88
|
+
"@trycua/cua-linux-arm64-gnu": "0.3.0",
|
|
89
|
+
"@trycua/cua-linux-x64-gnu": "0.3.0",
|
|
90
|
+
"@trycua/cua-win32-arm64-msvc": "0.3.0",
|
|
91
|
+
"@trycua/cua-win32-x64-msvc": "0.3.0"
|
|
92
92
|
}
|
|
93
93
|
}
|