@trycua/cua-driver 0.14.2 → 0.17.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 +545 -0
- package/dist/native/cua_driver_contract.js +1060 -25
- package/dist/native/cua_driver_sdk-ffi.d.ts +20 -0
- package/dist/native/cua_driver_sdk-ffi.js +100 -0
- package/dist/native/cua_driver_sdk.d.ts +65 -4
- package/dist/native/cua_driver_sdk.js +331 -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, FfiConverterTypeInvokeMenuInput, 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 {
|
|
@@ -2468,6 +2529,35 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
2468
2529
|
throw __error;
|
|
2469
2530
|
}
|
|
2470
2531
|
}
|
|
2532
|
+
async invokeMenu(input, asyncOpts_) {
|
|
2533
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2534
|
+
try {
|
|
2535
|
+
return await uniffiRustCallAsync(
|
|
2536
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2537
|
+
/*rustFutureFunc:*/ () => {
|
|
2538
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_invoke_menu(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeInvokeMenuInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2539
|
+
},
|
|
2540
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2541
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2542
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2543
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2544
|
+
// Async returns always go through the JS-side converter: the
|
|
2545
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2546
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2547
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2548
|
+
// here using the per-callable return-type converter.
|
|
2549
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2550
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2551
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2552
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2553
|
+
}
|
|
2554
|
+
catch (__error) {
|
|
2555
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2556
|
+
__error.stack = __stack;
|
|
2557
|
+
}
|
|
2558
|
+
throw __error;
|
|
2559
|
+
}
|
|
2560
|
+
}
|
|
2471
2561
|
isAvailable() {
|
|
2472
2562
|
return FfiConverterBool.lift(uniffiCaller.rustCall(
|
|
2473
2563
|
/*caller:*/ (callStatus) => {
|
|
@@ -2724,6 +2814,35 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
2724
2814
|
throw __error;
|
|
2725
2815
|
}
|
|
2726
2816
|
}
|
|
2817
|
+
async setWindowFrame(input, asyncOpts_) {
|
|
2818
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2819
|
+
try {
|
|
2820
|
+
return await uniffiRustCallAsync(
|
|
2821
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2822
|
+
/*rustFutureFunc:*/ () => {
|
|
2823
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_set_window_frame(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeSetWindowFrameInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2824
|
+
},
|
|
2825
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2826
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2827
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2828
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2829
|
+
// Async returns always go through the JS-side converter: the
|
|
2830
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2831
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2832
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2833
|
+
// here using the per-callable return-type converter.
|
|
2834
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2835
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2836
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2837
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2838
|
+
}
|
|
2839
|
+
catch (__error) {
|
|
2840
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2841
|
+
__error.stack = __stack;
|
|
2842
|
+
}
|
|
2843
|
+
throw __error;
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2727
2846
|
/**
|
|
2728
2847
|
* Stop accepting new embedded operations. Repeated calls are harmless;
|
|
2729
2848
|
* daemon compatibility clients do not own the daemon and therefore no-op.
|
|
@@ -2828,6 +2947,35 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
2828
2947
|
throw __error;
|
|
2829
2948
|
}
|
|
2830
2949
|
}
|
|
2950
|
+
async verifyState(input, asyncOpts_) {
|
|
2951
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2952
|
+
try {
|
|
2953
|
+
return await uniffiRustCallAsync(
|
|
2954
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2955
|
+
/*rustFutureFunc:*/ () => {
|
|
2956
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_verify_state(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeVerifyStateInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2957
|
+
},
|
|
2958
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2959
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2960
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2961
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2962
|
+
// Async returns always go through the JS-side converter: the
|
|
2963
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2964
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2965
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2966
|
+
// here using the per-callable return-type converter.
|
|
2967
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2968
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2969
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2970
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2971
|
+
}
|
|
2972
|
+
catch (__error) {
|
|
2973
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2974
|
+
__error.stack = __stack;
|
|
2975
|
+
}
|
|
2976
|
+
throw __error;
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2831
2979
|
uniffiDestroy() {
|
|
2832
2980
|
const ptr = this[destructorGuardSymbol];
|
|
2833
2981
|
if (ptr !== undefined) {
|
|
@@ -2960,6 +3108,64 @@ export class CuaDriverSession extends UniffiAbstractObject {
|
|
|
2960
3108
|
throw __error;
|
|
2961
3109
|
}
|
|
2962
3110
|
}
|
|
3111
|
+
async clipboardRead(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_read(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeClipboardReadInput.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
|
+
}
|
|
3140
|
+
async clipboardWrite(input, asyncOpts_) {
|
|
3141
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3142
|
+
try {
|
|
3143
|
+
return await uniffiRustCallAsync(
|
|
3144
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3145
|
+
/*rustFutureFunc:*/ () => {
|
|
3146
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_clipboard_write(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeClipboardWriteInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3147
|
+
},
|
|
3148
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3149
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3150
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3151
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3152
|
+
// Async returns always go through the JS-side converter: the
|
|
3153
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3154
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3155
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3156
|
+
// here using the per-callable return-type converter.
|
|
3157
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3158
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3159
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3160
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3161
|
+
}
|
|
3162
|
+
catch (__error) {
|
|
3163
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3164
|
+
__error.stack = __stack;
|
|
3165
|
+
}
|
|
3166
|
+
throw __error;
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
2963
3169
|
/**
|
|
2964
3170
|
* Revoke the session-bound authority and release its native handle.
|
|
2965
3171
|
*
|
|
@@ -3234,6 +3440,35 @@ export class CuaDriverSession extends UniffiAbstractObject {
|
|
|
3234
3440
|
throw __error;
|
|
3235
3441
|
}
|
|
3236
3442
|
}
|
|
3443
|
+
async invokeMenu(input, asyncOpts_) {
|
|
3444
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3445
|
+
try {
|
|
3446
|
+
return await uniffiRustCallAsync(
|
|
3447
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3448
|
+
/*rustFutureFunc:*/ () => {
|
|
3449
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_invoke_menu(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeInvokeMenuInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3450
|
+
},
|
|
3451
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3452
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3453
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3454
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3455
|
+
// Async returns always go through the JS-side converter: the
|
|
3456
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3457
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3458
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3459
|
+
// here using the per-callable return-type converter.
|
|
3460
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3461
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3462
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3463
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3464
|
+
}
|
|
3465
|
+
catch (__error) {
|
|
3466
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3467
|
+
__error.stack = __stack;
|
|
3468
|
+
}
|
|
3469
|
+
throw __error;
|
|
3470
|
+
}
|
|
3471
|
+
}
|
|
3237
3472
|
async moveCursor(input, asyncOpts_) {
|
|
3238
3473
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3239
3474
|
try {
|
|
@@ -3408,6 +3643,35 @@ export class CuaDriverSession extends UniffiAbstractObject {
|
|
|
3408
3643
|
throw __error;
|
|
3409
3644
|
}
|
|
3410
3645
|
}
|
|
3646
|
+
async setWindowFrame(input, asyncOpts_) {
|
|
3647
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3648
|
+
try {
|
|
3649
|
+
return await uniffiRustCallAsync(
|
|
3650
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3651
|
+
/*rustFutureFunc:*/ () => {
|
|
3652
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_set_window_frame(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeSetWindowFrameInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3653
|
+
},
|
|
3654
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3655
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3656
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3657
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3658
|
+
// Async returns always go through the JS-side converter: the
|
|
3659
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3660
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3661
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3662
|
+
// here using the per-callable return-type converter.
|
|
3663
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3664
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3665
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3666
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3667
|
+
}
|
|
3668
|
+
catch (__error) {
|
|
3669
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3670
|
+
__error.stack = __stack;
|
|
3671
|
+
}
|
|
3672
|
+
throw __error;
|
|
3673
|
+
}
|
|
3674
|
+
}
|
|
3411
3675
|
async startSession(input, asyncOpts_) {
|
|
3412
3676
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3413
3677
|
try {
|
|
@@ -3466,6 +3730,35 @@ export class CuaDriverSession extends UniffiAbstractObject {
|
|
|
3466
3730
|
throw __error;
|
|
3467
3731
|
}
|
|
3468
3732
|
}
|
|
3733
|
+
async verifyState(input, asyncOpts_) {
|
|
3734
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3735
|
+
try {
|
|
3736
|
+
return await uniffiRustCallAsync(
|
|
3737
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3738
|
+
/*rustFutureFunc:*/ () => {
|
|
3739
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_verify_state(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeVerifyStateInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3740
|
+
},
|
|
3741
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3742
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3743
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3744
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3745
|
+
// Async returns always go through the JS-side converter: the
|
|
3746
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3747
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3748
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3749
|
+
// here using the per-callable return-type converter.
|
|
3750
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3751
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3752
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3753
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3754
|
+
}
|
|
3755
|
+
catch (__error) {
|
|
3756
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3757
|
+
__error.stack = __stack;
|
|
3758
|
+
}
|
|
3759
|
+
throw __error;
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3469
3762
|
uniffiDestroy() {
|
|
3470
3763
|
const ptr = this[destructorGuardSymbol];
|
|
3471
3764
|
if (ptr !== undefined) {
|
|
@@ -4053,8 +4346,10 @@ const FfiConverterOptionalUInt64 = new FfiConverterOptional(FfiConverterUInt64);
|
|
|
4053
4346
|
const FfiConverterOptionalTypeEmbeddedPermissionMode = new FfiConverterOptional(FfiConverterTypeEmbeddedPermissionMode);
|
|
4054
4347
|
// FfiConverter for Array<ImageContent>
|
|
4055
4348
|
const FfiConverterSequenceTypeImageContent = new FfiConverterArray(FfiConverterTypeImageContent);
|
|
4056
|
-
// FfiConverter for
|
|
4057
|
-
const
|
|
4349
|
+
// FfiConverter for ActionResult | undefined
|
|
4350
|
+
const FfiConverterOptionalTypeActionResult = new FfiConverterOptional(FfiConverterTypeActionResult);
|
|
4351
|
+
// FfiConverter for VerifyStateOutput | undefined
|
|
4352
|
+
const FfiConverterOptionalTypeVerifyStateOutput = new FfiConverterOptional(FfiConverterTypeVerifyStateOutput);
|
|
4058
4353
|
// FfiConverter for EmbeddedDriverConnection | undefined
|
|
4059
4354
|
const FfiConverterOptionalTypeEmbeddedDriverConnection = new FfiConverterOptional(FfiConverterTypeEmbeddedDriverConnection);
|
|
4060
4355
|
// FfiConverter for DriverOptions | undefined
|
|
@@ -4137,6 +4432,12 @@ function uniffiEnsureInitialized() {
|
|
|
4137
4432
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_click() !== 56077) {
|
|
4138
4433
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_click");
|
|
4139
4434
|
}
|
|
4435
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_clipboard_read() !== 58238) {
|
|
4436
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_clipboard_read");
|
|
4437
|
+
}
|
|
4438
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_clipboard_write() !== 8399) {
|
|
4439
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_clipboard_write");
|
|
4440
|
+
}
|
|
4140
4441
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_drag() !== 25742) {
|
|
4141
4442
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_drag");
|
|
4142
4443
|
}
|
|
@@ -4167,6 +4468,9 @@ function uniffiEnsureInitialized() {
|
|
|
4167
4468
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_hotkey() !== 53333) {
|
|
4168
4469
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_hotkey");
|
|
4169
4470
|
}
|
|
4471
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_invoke_menu() !== 13118) {
|
|
4472
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_invoke_menu");
|
|
4473
|
+
}
|
|
4170
4474
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_is_available() !== 42961) {
|
|
4171
4475
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_is_available");
|
|
4172
4476
|
}
|
|
@@ -4197,6 +4501,9 @@ function uniffiEnsureInitialized() {
|
|
|
4197
4501
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_set_agent_cursor_theme() !== 53908) {
|
|
4198
4502
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_set_agent_cursor_theme");
|
|
4199
4503
|
}
|
|
4504
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_set_window_frame() !== 6509) {
|
|
4505
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_set_window_frame");
|
|
4506
|
+
}
|
|
4200
4507
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_shutdown() !== 36331) {
|
|
4201
4508
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_shutdown");
|
|
4202
4509
|
}
|
|
@@ -4209,12 +4516,21 @@ function uniffiEnsureInitialized() {
|
|
|
4209
4516
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_type_text() !== 25156) {
|
|
4210
4517
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_type_text");
|
|
4211
4518
|
}
|
|
4519
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_verify_state() !== 26193) {
|
|
4520
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_verify_state");
|
|
4521
|
+
}
|
|
4212
4522
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_call_tool() !== 52859) {
|
|
4213
4523
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_call_tool");
|
|
4214
4524
|
}
|
|
4215
4525
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_click() !== 22303) {
|
|
4216
4526
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_click");
|
|
4217
4527
|
}
|
|
4528
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_clipboard_read() !== 23560) {
|
|
4529
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_clipboard_read");
|
|
4530
|
+
}
|
|
4531
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_clipboard_write() !== 45732) {
|
|
4532
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_clipboard_write");
|
|
4533
|
+
}
|
|
4218
4534
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_close() !== 58108) {
|
|
4219
4535
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_close");
|
|
4220
4536
|
}
|
|
@@ -4245,6 +4561,9 @@ function uniffiEnsureInitialized() {
|
|
|
4245
4561
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_hotkey() !== 12820) {
|
|
4246
4562
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_hotkey");
|
|
4247
4563
|
}
|
|
4564
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_invoke_menu() !== 2742) {
|
|
4565
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_invoke_menu");
|
|
4566
|
+
}
|
|
4248
4567
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_move_cursor() !== 35768) {
|
|
4249
4568
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_move_cursor");
|
|
4250
4569
|
}
|
|
@@ -4263,12 +4582,18 @@ function uniffiEnsureInitialized() {
|
|
|
4263
4582
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_agent_cursor_theme() !== 29734) {
|
|
4264
4583
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_agent_cursor_theme");
|
|
4265
4584
|
}
|
|
4585
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_window_frame() !== 65413) {
|
|
4586
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_window_frame");
|
|
4587
|
+
}
|
|
4266
4588
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_start_session() !== 13118) {
|
|
4267
4589
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_start_session");
|
|
4268
4590
|
}
|
|
4269
4591
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_type_text() !== 63241) {
|
|
4270
4592
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_type_text");
|
|
4271
4593
|
}
|
|
4594
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_verify_state() !== 36472) {
|
|
4595
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_verify_state");
|
|
4596
|
+
}
|
|
4272
4597
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_driveractivityobserver_on_activity() !== 9786) {
|
|
4273
4598
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_driveractivityobserver_on_activity");
|
|
4274
4599
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trycua/cua-driver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.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.17.0",
|
|
46
|
+
"@trycua/cua-driver-darwin-x64": "0.17.0",
|
|
47
|
+
"@trycua/cua-driver-linux-arm64-gnu": "0.17.0",
|
|
48
|
+
"@trycua/cua-driver-linux-x64-gnu": "0.17.0",
|
|
49
|
+
"@trycua/cua-driver-win32-arm64-msvc": "0.17.0",
|
|
50
|
+
"@trycua/cua-driver-win32-x64-msvc": "0.17.0"
|
|
51
51
|
}
|
|
52
52
|
}
|