@trycua/cua-driver 0.14.1 → 0.16.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/dist/native/cua_driver_contract.d.ts +516 -0
- package/dist/native/cua_driver_contract.js +999 -5
- package/dist/native/cua_driver_sdk-ffi.d.ts +16 -0
- package/dist/native/cua_driver_sdk-ffi.js +80 -0
- package/dist/native/cua_driver_sdk.d.ts +53 -4
- package/dist/native/cua_driver_sdk.js +267 -6
- package/package.json +7 -7
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import nativeModule from "./cua_driver_sdk-ffi.js";
|
|
7
7
|
import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterInt32, FfiConverterObject, FfiConverterObjectWithCallbacks, FfiConverterOptional, FfiConverterUInt32, FfiConverterUInt64, UniffiAbstractObject, UniffiError, UniffiInternalError, UniffiResult, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiRustCallAsync, uniffiTraitInterfaceCall, uniffiTraitInterfaceCallAsyncWithError, uniffiTypeNameSymbol, } from "@ubjs/core";
|
|
8
8
|
import uniffiCuaDriverContractModule from "./cua_driver_contract.js";
|
|
9
|
-
const { FfiConverterTypeClickInput, FfiConverterTypeDragInput, FfiConverterTypeEndSessionInput, FfiConverterTypeEndSessionOutput, FfiConverterTypeEscalateSessionInput, FfiConverterTypeGetAgentCursorStateInput, FfiConverterTypeGetCursorPositionInput, FfiConverterTypeGetDesktopStateInput, FfiConverterTypeGetScreenSizeInput, FfiConverterTypeGetSessionStateInput, FfiConverterTypeHotkeyInput, FfiConverterTypeMoveCursorInput, FfiConverterTypePressKeyInput, FfiConverterTypeScrollInput, FfiConverterTypeSessionStateOutput, FfiConverterTypeSetAgentCursorEnabledInput, FfiConverterTypeSetAgentCursorMotionInput, FfiConverterTypeSetAgentCursorThemeInput, FfiConverterTypeStartSessionInput, FfiConverterTypeStartSessionOutput, FfiConverterTypeTypeTextInput } = uniffiCuaDriverContractModule.converters;
|
|
9
|
+
const { FfiConverterTypeActionResult, FfiConverterTypeClickInput, FfiConverterTypeClipboardReadInput, FfiConverterTypeClipboardWriteInput, FfiConverterTypeDragInput, FfiConverterTypeEndSessionInput, FfiConverterTypeEndSessionOutput, FfiConverterTypeEscalateSessionInput, FfiConverterTypeGetAgentCursorStateInput, FfiConverterTypeGetCursorPositionInput, FfiConverterTypeGetDesktopStateInput, FfiConverterTypeGetScreenSizeInput, FfiConverterTypeGetSessionStateInput, FfiConverterTypeHotkeyInput, FfiConverterTypeMoveCursorInput, FfiConverterTypePressKeyInput, FfiConverterTypeScrollInput, FfiConverterTypeSessionStateOutput, FfiConverterTypeSetAgentCursorEnabledInput, FfiConverterTypeSetAgentCursorMotionInput, FfiConverterTypeSetAgentCursorThemeInput, FfiConverterTypeSetWindowFrameInput, FfiConverterTypeStartSessionInput, FfiConverterTypeStartSessionOutput, FfiConverterTypeTypeTextInput, FfiConverterTypeVerifyStateInput, FfiConverterTypeVerifyStateOutput } = uniffiCuaDriverContractModule.converters;
|
|
10
10
|
const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));
|
|
11
11
|
const uniffiIsDebug =
|
|
12
12
|
// @ts-ignore -- The process global might not be defined
|
|
@@ -893,7 +893,8 @@ const FfiConverterTypeToolResult = (() => {
|
|
|
893
893
|
structuredJson: FfiConverterOptionalString.read(from),
|
|
894
894
|
isError: FfiConverterBool.read(from),
|
|
895
895
|
errorCode: FfiConverterOptionalString.read(from),
|
|
896
|
-
|
|
896
|
+
action: FfiConverterOptionalTypeActionResult.read(from),
|
|
897
|
+
verification: FfiConverterOptionalTypeVerifyStateOutput.read(from),
|
|
897
898
|
degraded: FfiConverterBool.read(from),
|
|
898
899
|
rawJson: FfiConverterString.read(from)
|
|
899
900
|
};
|
|
@@ -904,7 +905,8 @@ const FfiConverterTypeToolResult = (() => {
|
|
|
904
905
|
FfiConverterOptionalString.write(value.structuredJson, into);
|
|
905
906
|
FfiConverterBool.write(value.isError, into);
|
|
906
907
|
FfiConverterOptionalString.write(value.errorCode, into);
|
|
907
|
-
|
|
908
|
+
FfiConverterOptionalTypeActionResult.write(value.action, into);
|
|
909
|
+
FfiConverterOptionalTypeVerifyStateOutput.write(value.verification, into);
|
|
908
910
|
FfiConverterBool.write(value.degraded, into);
|
|
909
911
|
FfiConverterString.write(value.rawJson, into);
|
|
910
912
|
}
|
|
@@ -914,7 +916,8 @@ const FfiConverterTypeToolResult = (() => {
|
|
|
914
916
|
FfiConverterOptionalString.allocationSize(value.structuredJson) +
|
|
915
917
|
FfiConverterBool.allocationSize(value.isError) +
|
|
916
918
|
FfiConverterOptionalString.allocationSize(value.errorCode) +
|
|
917
|
-
|
|
919
|
+
FfiConverterOptionalTypeActionResult.allocationSize(value.action) +
|
|
920
|
+
FfiConverterOptionalTypeVerifyStateOutput.allocationSize(value.verification) +
|
|
918
921
|
FfiConverterBool.allocationSize(value.degraded) +
|
|
919
922
|
FfiConverterString.allocationSize(value.rawJson);
|
|
920
923
|
}
|
|
@@ -2193,6 +2196,64 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
2193
2196
|
throw __error;
|
|
2194
2197
|
}
|
|
2195
2198
|
}
|
|
2199
|
+
async clipboardRead(input, asyncOpts_) {
|
|
2200
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2201
|
+
try {
|
|
2202
|
+
return await uniffiRustCallAsync(
|
|
2203
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2204
|
+
/*rustFutureFunc:*/ () => {
|
|
2205
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_clipboard_read(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeClipboardReadInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2206
|
+
},
|
|
2207
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2208
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2209
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2210
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2211
|
+
// Async returns always go through the JS-side converter: the
|
|
2212
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2213
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2214
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2215
|
+
// here using the per-callable return-type converter.
|
|
2216
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2217
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2218
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2219
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2220
|
+
}
|
|
2221
|
+
catch (__error) {
|
|
2222
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2223
|
+
__error.stack = __stack;
|
|
2224
|
+
}
|
|
2225
|
+
throw __error;
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
async clipboardWrite(input, asyncOpts_) {
|
|
2229
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2230
|
+
try {
|
|
2231
|
+
return await uniffiRustCallAsync(
|
|
2232
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2233
|
+
/*rustFutureFunc:*/ () => {
|
|
2234
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_clipboard_write(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeClipboardWriteInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2235
|
+
},
|
|
2236
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2237
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2238
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2239
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2240
|
+
// Async returns always go through the JS-side converter: the
|
|
2241
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2242
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2243
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2244
|
+
// here using the per-callable return-type converter.
|
|
2245
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2246
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2247
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2248
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2249
|
+
}
|
|
2250
|
+
catch (__error) {
|
|
2251
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2252
|
+
__error.stack = __stack;
|
|
2253
|
+
}
|
|
2254
|
+
throw __error;
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2196
2257
|
async drag(input, asyncOpts_) {
|
|
2197
2258
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2198
2259
|
try {
|
|
@@ -2724,6 +2785,35 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
2724
2785
|
throw __error;
|
|
2725
2786
|
}
|
|
2726
2787
|
}
|
|
2788
|
+
async setWindowFrame(input, asyncOpts_) {
|
|
2789
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2790
|
+
try {
|
|
2791
|
+
return await uniffiRustCallAsync(
|
|
2792
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2793
|
+
/*rustFutureFunc:*/ () => {
|
|
2794
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_set_window_frame(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeSetWindowFrameInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2795
|
+
},
|
|
2796
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2797
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2798
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2799
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2800
|
+
// Async returns always go through the JS-side converter: the
|
|
2801
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2802
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2803
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2804
|
+
// here using the per-callable return-type converter.
|
|
2805
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2806
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2807
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2808
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2809
|
+
}
|
|
2810
|
+
catch (__error) {
|
|
2811
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2812
|
+
__error.stack = __stack;
|
|
2813
|
+
}
|
|
2814
|
+
throw __error;
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2727
2817
|
/**
|
|
2728
2818
|
* Stop accepting new embedded operations. Repeated calls are harmless;
|
|
2729
2819
|
* daemon compatibility clients do not own the daemon and therefore no-op.
|
|
@@ -2828,6 +2918,35 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
2828
2918
|
throw __error;
|
|
2829
2919
|
}
|
|
2830
2920
|
}
|
|
2921
|
+
async verifyState(input, asyncOpts_) {
|
|
2922
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2923
|
+
try {
|
|
2924
|
+
return await uniffiRustCallAsync(
|
|
2925
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2926
|
+
/*rustFutureFunc:*/ () => {
|
|
2927
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_verify_state(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeVerifyStateInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2928
|
+
},
|
|
2929
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2930
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2931
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2932
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2933
|
+
// Async returns always go through the JS-side converter: the
|
|
2934
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2935
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2936
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2937
|
+
// here using the per-callable return-type converter.
|
|
2938
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2939
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2940
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2941
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2942
|
+
}
|
|
2943
|
+
catch (__error) {
|
|
2944
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2945
|
+
__error.stack = __stack;
|
|
2946
|
+
}
|
|
2947
|
+
throw __error;
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2831
2950
|
uniffiDestroy() {
|
|
2832
2951
|
const ptr = this[destructorGuardSymbol];
|
|
2833
2952
|
if (ptr !== undefined) {
|
|
@@ -2960,6 +3079,64 @@ export class CuaDriverSession extends UniffiAbstractObject {
|
|
|
2960
3079
|
throw __error;
|
|
2961
3080
|
}
|
|
2962
3081
|
}
|
|
3082
|
+
async clipboardRead(input, asyncOpts_) {
|
|
3083
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3084
|
+
try {
|
|
3085
|
+
return await uniffiRustCallAsync(
|
|
3086
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3087
|
+
/*rustFutureFunc:*/ () => {
|
|
3088
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_clipboard_read(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeClipboardReadInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3089
|
+
},
|
|
3090
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3091
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3092
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3093
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3094
|
+
// Async returns always go through the JS-side converter: the
|
|
3095
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3096
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3097
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3098
|
+
// here using the per-callable return-type converter.
|
|
3099
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3100
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3101
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3102
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3103
|
+
}
|
|
3104
|
+
catch (__error) {
|
|
3105
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3106
|
+
__error.stack = __stack;
|
|
3107
|
+
}
|
|
3108
|
+
throw __error;
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
async clipboardWrite(input, asyncOpts_) {
|
|
3112
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3113
|
+
try {
|
|
3114
|
+
return await uniffiRustCallAsync(
|
|
3115
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3116
|
+
/*rustFutureFunc:*/ () => {
|
|
3117
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_clipboard_write(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeClipboardWriteInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3118
|
+
},
|
|
3119
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3120
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3121
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3122
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3123
|
+
// Async returns always go through the JS-side converter: the
|
|
3124
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3125
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3126
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3127
|
+
// here using the per-callable return-type converter.
|
|
3128
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3129
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3130
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3131
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3132
|
+
}
|
|
3133
|
+
catch (__error) {
|
|
3134
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3135
|
+
__error.stack = __stack;
|
|
3136
|
+
}
|
|
3137
|
+
throw __error;
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
2963
3140
|
/**
|
|
2964
3141
|
* Revoke the session-bound authority and release its native handle.
|
|
2965
3142
|
*
|
|
@@ -3408,6 +3585,35 @@ export class CuaDriverSession extends UniffiAbstractObject {
|
|
|
3408
3585
|
throw __error;
|
|
3409
3586
|
}
|
|
3410
3587
|
}
|
|
3588
|
+
async setWindowFrame(input, asyncOpts_) {
|
|
3589
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3590
|
+
try {
|
|
3591
|
+
return await uniffiRustCallAsync(
|
|
3592
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3593
|
+
/*rustFutureFunc:*/ () => {
|
|
3594
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_set_window_frame(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeSetWindowFrameInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3595
|
+
},
|
|
3596
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3597
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3598
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3599
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3600
|
+
// Async returns always go through the JS-side converter: the
|
|
3601
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3602
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3603
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3604
|
+
// here using the per-callable return-type converter.
|
|
3605
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3606
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3607
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3608
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3609
|
+
}
|
|
3610
|
+
catch (__error) {
|
|
3611
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3612
|
+
__error.stack = __stack;
|
|
3613
|
+
}
|
|
3614
|
+
throw __error;
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3411
3617
|
async startSession(input, asyncOpts_) {
|
|
3412
3618
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3413
3619
|
try {
|
|
@@ -3466,6 +3672,35 @@ export class CuaDriverSession extends UniffiAbstractObject {
|
|
|
3466
3672
|
throw __error;
|
|
3467
3673
|
}
|
|
3468
3674
|
}
|
|
3675
|
+
async verifyState(input, asyncOpts_) {
|
|
3676
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3677
|
+
try {
|
|
3678
|
+
return await uniffiRustCallAsync(
|
|
3679
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3680
|
+
/*rustFutureFunc:*/ () => {
|
|
3681
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_verify_state(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeVerifyStateInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3682
|
+
},
|
|
3683
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3684
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3685
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3686
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3687
|
+
// Async returns always go through the JS-side converter: the
|
|
3688
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3689
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3690
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3691
|
+
// here using the per-callable return-type converter.
|
|
3692
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3693
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3694
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3695
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3696
|
+
}
|
|
3697
|
+
catch (__error) {
|
|
3698
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3699
|
+
__error.stack = __stack;
|
|
3700
|
+
}
|
|
3701
|
+
throw __error;
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3469
3704
|
uniffiDestroy() {
|
|
3470
3705
|
const ptr = this[destructorGuardSymbol];
|
|
3471
3706
|
if (ptr !== undefined) {
|
|
@@ -4053,8 +4288,10 @@ const FfiConverterOptionalUInt64 = new FfiConverterOptional(FfiConverterUInt64);
|
|
|
4053
4288
|
const FfiConverterOptionalTypeEmbeddedPermissionMode = new FfiConverterOptional(FfiConverterTypeEmbeddedPermissionMode);
|
|
4054
4289
|
// FfiConverter for Array<ImageContent>
|
|
4055
4290
|
const FfiConverterSequenceTypeImageContent = new FfiConverterArray(FfiConverterTypeImageContent);
|
|
4056
|
-
// FfiConverter for
|
|
4057
|
-
const
|
|
4291
|
+
// FfiConverter for ActionResult | undefined
|
|
4292
|
+
const FfiConverterOptionalTypeActionResult = new FfiConverterOptional(FfiConverterTypeActionResult);
|
|
4293
|
+
// FfiConverter for VerifyStateOutput | undefined
|
|
4294
|
+
const FfiConverterOptionalTypeVerifyStateOutput = new FfiConverterOptional(FfiConverterTypeVerifyStateOutput);
|
|
4058
4295
|
// FfiConverter for EmbeddedDriverConnection | undefined
|
|
4059
4296
|
const FfiConverterOptionalTypeEmbeddedDriverConnection = new FfiConverterOptional(FfiConverterTypeEmbeddedDriverConnection);
|
|
4060
4297
|
// FfiConverter for DriverOptions | undefined
|
|
@@ -4137,6 +4374,12 @@ function uniffiEnsureInitialized() {
|
|
|
4137
4374
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_click() !== 56077) {
|
|
4138
4375
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_click");
|
|
4139
4376
|
}
|
|
4377
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_clipboard_read() !== 58238) {
|
|
4378
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_clipboard_read");
|
|
4379
|
+
}
|
|
4380
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_clipboard_write() !== 8399) {
|
|
4381
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_clipboard_write");
|
|
4382
|
+
}
|
|
4140
4383
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_drag() !== 25742) {
|
|
4141
4384
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_drag");
|
|
4142
4385
|
}
|
|
@@ -4197,6 +4440,9 @@ function uniffiEnsureInitialized() {
|
|
|
4197
4440
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_set_agent_cursor_theme() !== 53908) {
|
|
4198
4441
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_set_agent_cursor_theme");
|
|
4199
4442
|
}
|
|
4443
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_set_window_frame() !== 6509) {
|
|
4444
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_set_window_frame");
|
|
4445
|
+
}
|
|
4200
4446
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_shutdown() !== 36331) {
|
|
4201
4447
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_shutdown");
|
|
4202
4448
|
}
|
|
@@ -4209,12 +4455,21 @@ function uniffiEnsureInitialized() {
|
|
|
4209
4455
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_type_text() !== 25156) {
|
|
4210
4456
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_type_text");
|
|
4211
4457
|
}
|
|
4458
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_verify_state() !== 26193) {
|
|
4459
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_verify_state");
|
|
4460
|
+
}
|
|
4212
4461
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_call_tool() !== 52859) {
|
|
4213
4462
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_call_tool");
|
|
4214
4463
|
}
|
|
4215
4464
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_click() !== 22303) {
|
|
4216
4465
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_click");
|
|
4217
4466
|
}
|
|
4467
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_clipboard_read() !== 23560) {
|
|
4468
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_clipboard_read");
|
|
4469
|
+
}
|
|
4470
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_clipboard_write() !== 45732) {
|
|
4471
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_clipboard_write");
|
|
4472
|
+
}
|
|
4218
4473
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_close() !== 58108) {
|
|
4219
4474
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_close");
|
|
4220
4475
|
}
|
|
@@ -4263,12 +4518,18 @@ function uniffiEnsureInitialized() {
|
|
|
4263
4518
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_agent_cursor_theme() !== 29734) {
|
|
4264
4519
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_agent_cursor_theme");
|
|
4265
4520
|
}
|
|
4521
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_window_frame() !== 65413) {
|
|
4522
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_window_frame");
|
|
4523
|
+
}
|
|
4266
4524
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_start_session() !== 13118) {
|
|
4267
4525
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_start_session");
|
|
4268
4526
|
}
|
|
4269
4527
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_type_text() !== 63241) {
|
|
4270
4528
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_type_text");
|
|
4271
4529
|
}
|
|
4530
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_verify_state() !== 36472) {
|
|
4531
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_verify_state");
|
|
4532
|
+
}
|
|
4272
4533
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_driveractivityobserver_on_activity() !== 9786) {
|
|
4273
4534
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_driveractivityobserver_on_activity");
|
|
4274
4535
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trycua/cua-driver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Rust-backed Cua Driver SDK and embedded Node host",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"@ubjs/node": "0.31.0-3"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
|
-
"@trycua/cua-driver-darwin-arm64": "0.
|
|
46
|
-
"@trycua/cua-driver-darwin-x64": "0.
|
|
47
|
-
"@trycua/cua-driver-linux-arm64-gnu": "0.
|
|
48
|
-
"@trycua/cua-driver-linux-x64-gnu": "0.
|
|
49
|
-
"@trycua/cua-driver-win32-arm64-msvc": "0.
|
|
50
|
-
"@trycua/cua-driver-win32-x64-msvc": "0.
|
|
45
|
+
"@trycua/cua-driver-darwin-arm64": "0.16.0",
|
|
46
|
+
"@trycua/cua-driver-darwin-x64": "0.16.0",
|
|
47
|
+
"@trycua/cua-driver-linux-arm64-gnu": "0.16.0",
|
|
48
|
+
"@trycua/cua-driver-linux-x64-gnu": "0.16.0",
|
|
49
|
+
"@trycua/cua-driver-win32-arm64-msvc": "0.16.0",
|
|
50
|
+
"@trycua/cua-driver-win32-x64-msvc": "0.16.0"
|
|
51
51
|
}
|
|
52
52
|
}
|