@trycua/cua-driver 0.12.5 → 0.14.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/README.md +33 -0
- package/dist/index.js +5 -0
- package/dist/native/cua_driver_contract.d.ts +313 -2
- package/dist/native/cua_driver_contract.js +635 -4
- package/dist/native/cua_driver_sdk-ffi.d.ts +106 -1
- package/dist/native/cua_driver_sdk-ffi.js +471 -0
- package/dist/native/cua_driver_sdk.d.ts +1066 -32
- package/dist/native/cua_driver_sdk.js +2141 -123
- package/package.json +7 -7
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
// @ts-nocheck
|
|
6
6
|
import nativeModule from "./cua_driver_sdk-ffi.js";
|
|
7
|
-
import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterInt32, FfiConverterObject, FfiConverterOptional, FfiConverterUInt32, FfiConverterUInt64, UniffiAbstractObject, UniffiError, UniffiInternalError, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiRustCallAsync, uniffiTypeNameSymbol, } from "@ubjs/core";
|
|
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, FfiConverterTypeGetCursorPositionInput, FfiConverterTypeGetDesktopStateInput, FfiConverterTypeGetScreenSizeInput, FfiConverterTypeGetSessionStateInput, FfiConverterTypeHotkeyInput, FfiConverterTypeMoveCursorInput, FfiConverterTypePressKeyInput, FfiConverterTypeScrollInput, FfiConverterTypeSessionStateOutput, FfiConverterTypeStartSessionInput, FfiConverterTypeStartSessionOutput, FfiConverterTypeTypeTextInput } = uniffiCuaDriverContractModule.converters;
|
|
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;
|
|
10
10
|
const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));
|
|
11
11
|
const uniffiIsDebug =
|
|
12
12
|
// @ts-ignore -- The process global might not be defined
|
|
@@ -15,6 +15,21 @@ typeof process !== "object" ||
|
|
|
15
15
|
process?.env?.NODE_ENV !== "production" ||
|
|
16
16
|
false;
|
|
17
17
|
// Public interface members begin here.
|
|
18
|
+
/**
|
|
19
|
+
* Generated-language host factory for a session-bound action surface.
|
|
20
|
+
*
|
|
21
|
+
* This remains a separate top-level capability instead of adding a required
|
|
22
|
+
* method to the released `CuaDriverProtocol` / `CuaDriverLike` structural
|
|
23
|
+
* interfaces.
|
|
24
|
+
*/
|
|
25
|
+
export function createTrustedSession(driver, options) {
|
|
26
|
+
return FfiConverterTypeCuaDriverSession.lift(uniffiCaller.rustCallWithError(
|
|
27
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
28
|
+
/*caller:*/ (callStatus) => {
|
|
29
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_func_create_trusted_session(FfiConverterTypeCuaDriver.lower(driver, nativeModule().rustbuffer_alloc), FfiConverterTypeTrustedSessionOptions.lower(options, nativeModule().rustbuffer_alloc), callStatus);
|
|
30
|
+
},
|
|
31
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
32
|
+
}
|
|
18
33
|
export function currentMacOsPermissionStatus() {
|
|
19
34
|
return ((__rb) => {
|
|
20
35
|
try {
|
|
@@ -51,6 +66,39 @@ export function requestMacOsPermissions() {
|
|
|
51
66
|
},
|
|
52
67
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
53
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Permission mode chosen by trusted host code for a runtime or session.
|
|
71
|
+
*/
|
|
72
|
+
export var SessionPermissionMode;
|
|
73
|
+
(function (SessionPermissionMode) {
|
|
74
|
+
SessionPermissionMode[SessionPermissionMode["Standard"] = 0] = "Standard";
|
|
75
|
+
SessionPermissionMode[SessionPermissionMode["Bounded"] = 1] = "Bounded";
|
|
76
|
+
SessionPermissionMode[SessionPermissionMode["Unrestricted"] = 2] = "Unrestricted";
|
|
77
|
+
})(SessionPermissionMode || (SessionPermissionMode = {}));
|
|
78
|
+
const FfiConverterTypeSessionPermissionMode = (() => {
|
|
79
|
+
const ordinalConverter = FfiConverterInt32;
|
|
80
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
81
|
+
read(from) {
|
|
82
|
+
switch (ordinalConverter.read(from)) {
|
|
83
|
+
case 1: return SessionPermissionMode.Standard;
|
|
84
|
+
case 2: return SessionPermissionMode.Bounded;
|
|
85
|
+
case 3: return SessionPermissionMode.Unrestricted;
|
|
86
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
write(value, into) {
|
|
90
|
+
switch (value) {
|
|
91
|
+
case SessionPermissionMode.Standard: return ordinalConverter.write(1, into);
|
|
92
|
+
case SessionPermissionMode.Bounded: return ordinalConverter.write(2, into);
|
|
93
|
+
case SessionPermissionMode.Unrestricted: return ordinalConverter.write(3, into);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
allocationSize(value) {
|
|
97
|
+
return ordinalConverter.allocationSize(0);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return new FFIConverter();
|
|
101
|
+
})();
|
|
54
102
|
const stringConverter = (() => {
|
|
55
103
|
const encoder = new TextEncoder();
|
|
56
104
|
const decoder = new TextDecoder();
|
|
@@ -66,6 +114,314 @@ const stringConverter = (() => {
|
|
|
66
114
|
};
|
|
67
115
|
})();
|
|
68
116
|
const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
|
|
117
|
+
/**
|
|
118
|
+
* Generated factory for {@link RuntimeAuthorizationOptions} record objects.
|
|
119
|
+
*/
|
|
120
|
+
export const RuntimeAuthorizationOptions = (() => {
|
|
121
|
+
const defaults = () => ({});
|
|
122
|
+
const create = (() => {
|
|
123
|
+
return uniffiCreateRecord(defaults);
|
|
124
|
+
})();
|
|
125
|
+
return Object.freeze({
|
|
126
|
+
create,
|
|
127
|
+
new: create,
|
|
128
|
+
defaults: () => Object.freeze(defaults()),
|
|
129
|
+
});
|
|
130
|
+
})();
|
|
131
|
+
const FfiConverterTypeRuntimeAuthorizationOptions = (() => {
|
|
132
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
133
|
+
read(from) {
|
|
134
|
+
return {
|
|
135
|
+
allowedModes: FfiConverterSequenceTypeSessionPermissionMode.read(from),
|
|
136
|
+
compatibilityMode: FfiConverterTypeSessionPermissionMode.read(from),
|
|
137
|
+
compatibilityBoundedManifestPath: FfiConverterOptionalString.read(from),
|
|
138
|
+
unrestrictedAcknowledged: FfiConverterBool.read(from),
|
|
139
|
+
maxSessionTtlSeconds: FfiConverterUInt64.read(from),
|
|
140
|
+
maxIdleTtlSeconds: FfiConverterUInt64.read(from)
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
write(value, into) {
|
|
144
|
+
FfiConverterSequenceTypeSessionPermissionMode.write(value.allowedModes, into);
|
|
145
|
+
FfiConverterTypeSessionPermissionMode.write(value.compatibilityMode, into);
|
|
146
|
+
FfiConverterOptionalString.write(value.compatibilityBoundedManifestPath, into);
|
|
147
|
+
FfiConverterBool.write(value.unrestrictedAcknowledged, into);
|
|
148
|
+
FfiConverterUInt64.write(value.maxSessionTtlSeconds, into);
|
|
149
|
+
FfiConverterUInt64.write(value.maxIdleTtlSeconds, into);
|
|
150
|
+
}
|
|
151
|
+
allocationSize(value) {
|
|
152
|
+
return FfiConverterSequenceTypeSessionPermissionMode.allocationSize(value.allowedModes) +
|
|
153
|
+
FfiConverterTypeSessionPermissionMode.allocationSize(value.compatibilityMode) +
|
|
154
|
+
FfiConverterOptionalString.allocationSize(value.compatibilityBoundedManifestPath) +
|
|
155
|
+
FfiConverterBool.allocationSize(value.unrestrictedAcknowledged) +
|
|
156
|
+
FfiConverterUInt64.allocationSize(value.maxSessionTtlSeconds) +
|
|
157
|
+
FfiConverterUInt64.allocationSize(value.maxIdleTtlSeconds);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
;
|
|
161
|
+
return new FFIConverter();
|
|
162
|
+
})();
|
|
163
|
+
/**
|
|
164
|
+
* Generated factory for {@link ConfiguredDriverOptions} record objects.
|
|
165
|
+
*/
|
|
166
|
+
export const ConfiguredDriverOptions = (() => {
|
|
167
|
+
const defaults = () => ({});
|
|
168
|
+
const create = (() => {
|
|
169
|
+
return uniffiCreateRecord(defaults);
|
|
170
|
+
})();
|
|
171
|
+
return Object.freeze({
|
|
172
|
+
create,
|
|
173
|
+
new: create,
|
|
174
|
+
defaults: () => Object.freeze(defaults()),
|
|
175
|
+
});
|
|
176
|
+
})();
|
|
177
|
+
const FfiConverterTypeConfiguredDriverOptions = (() => {
|
|
178
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
179
|
+
read(from) {
|
|
180
|
+
return {
|
|
181
|
+
claudeCodeCompatibility: FfiConverterBool.read(from),
|
|
182
|
+
authorization: FfiConverterTypeRuntimeAuthorizationOptions.read(from)
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
write(value, into) {
|
|
186
|
+
FfiConverterBool.write(value.claudeCodeCompatibility, into);
|
|
187
|
+
FfiConverterTypeRuntimeAuthorizationOptions.write(value.authorization, into);
|
|
188
|
+
}
|
|
189
|
+
allocationSize(value) {
|
|
190
|
+
return FfiConverterBool.allocationSize(value.claudeCodeCompatibility) +
|
|
191
|
+
FfiConverterTypeRuntimeAuthorizationOptions.allocationSize(value.authorization);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
;
|
|
195
|
+
return new FFIConverter();
|
|
196
|
+
})();
|
|
197
|
+
export var DriverActivityKind;
|
|
198
|
+
(function (DriverActivityKind) {
|
|
199
|
+
DriverActivityKind[DriverActivityKind["AuthorizedAction"] = 0] = "AuthorizedAction";
|
|
200
|
+
DriverActivityKind[DriverActivityKind["AuthorizationRefused"] = 1] = "AuthorizationRefused";
|
|
201
|
+
DriverActivityKind[DriverActivityKind["ActionFailed"] = 2] = "ActionFailed";
|
|
202
|
+
DriverActivityKind[DriverActivityKind["GrantIssued"] = 3] = "GrantIssued";
|
|
203
|
+
DriverActivityKind[DriverActivityKind["GrantRevoked"] = 4] = "GrantRevoked";
|
|
204
|
+
DriverActivityKind[DriverActivityKind["SessionStarted"] = 5] = "SessionStarted";
|
|
205
|
+
DriverActivityKind[DriverActivityKind["SessionEnded"] = 6] = "SessionEnded";
|
|
206
|
+
})(DriverActivityKind || (DriverActivityKind = {}));
|
|
207
|
+
const FfiConverterTypeDriverActivityKind = (() => {
|
|
208
|
+
const ordinalConverter = FfiConverterInt32;
|
|
209
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
210
|
+
read(from) {
|
|
211
|
+
switch (ordinalConverter.read(from)) {
|
|
212
|
+
case 1: return DriverActivityKind.AuthorizedAction;
|
|
213
|
+
case 2: return DriverActivityKind.AuthorizationRefused;
|
|
214
|
+
case 3: return DriverActivityKind.ActionFailed;
|
|
215
|
+
case 4: return DriverActivityKind.GrantIssued;
|
|
216
|
+
case 5: return DriverActivityKind.GrantRevoked;
|
|
217
|
+
case 6: return DriverActivityKind.SessionStarted;
|
|
218
|
+
case 7: return DriverActivityKind.SessionEnded;
|
|
219
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
write(value, into) {
|
|
223
|
+
switch (value) {
|
|
224
|
+
case DriverActivityKind.AuthorizedAction: return ordinalConverter.write(1, into);
|
|
225
|
+
case DriverActivityKind.AuthorizationRefused: return ordinalConverter.write(2, into);
|
|
226
|
+
case DriverActivityKind.ActionFailed: return ordinalConverter.write(3, into);
|
|
227
|
+
case DriverActivityKind.GrantIssued: return ordinalConverter.write(4, into);
|
|
228
|
+
case DriverActivityKind.GrantRevoked: return ordinalConverter.write(5, into);
|
|
229
|
+
case DriverActivityKind.SessionStarted: return ordinalConverter.write(6, into);
|
|
230
|
+
case DriverActivityKind.SessionEnded: return ordinalConverter.write(7, into);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
allocationSize(value) {
|
|
234
|
+
return ordinalConverter.allocationSize(0);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return new FFIConverter();
|
|
238
|
+
})();
|
|
239
|
+
/**
|
|
240
|
+
* Generated factory for {@link DriverActivityEvent} record objects.
|
|
241
|
+
*/
|
|
242
|
+
export const DriverActivityEvent = (() => {
|
|
243
|
+
const defaults = () => ({});
|
|
244
|
+
const create = (() => {
|
|
245
|
+
return uniffiCreateRecord(defaults);
|
|
246
|
+
})();
|
|
247
|
+
return Object.freeze({
|
|
248
|
+
create,
|
|
249
|
+
new: create,
|
|
250
|
+
defaults: () => Object.freeze(defaults()),
|
|
251
|
+
});
|
|
252
|
+
})();
|
|
253
|
+
const FfiConverterTypeDriverActivityEvent = (() => {
|
|
254
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
255
|
+
read(from) {
|
|
256
|
+
return {
|
|
257
|
+
kind: FfiConverterTypeDriverActivityKind.read(from),
|
|
258
|
+
unixMs: FfiConverterUInt64.read(from),
|
|
259
|
+
toolName: FfiConverterString.read(from),
|
|
260
|
+
adapterIds: FfiConverterSequenceString.read(from),
|
|
261
|
+
riskClass: FfiConverterString.read(from),
|
|
262
|
+
publicSession: FfiConverterOptionalString.read(from),
|
|
263
|
+
refusalCode: FfiConverterOptionalString.read(from)
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
write(value, into) {
|
|
267
|
+
FfiConverterTypeDriverActivityKind.write(value.kind, into);
|
|
268
|
+
FfiConverterUInt64.write(value.unixMs, into);
|
|
269
|
+
FfiConverterString.write(value.toolName, into);
|
|
270
|
+
FfiConverterSequenceString.write(value.adapterIds, into);
|
|
271
|
+
FfiConverterString.write(value.riskClass, into);
|
|
272
|
+
FfiConverterOptionalString.write(value.publicSession, into);
|
|
273
|
+
FfiConverterOptionalString.write(value.refusalCode, into);
|
|
274
|
+
}
|
|
275
|
+
allocationSize(value) {
|
|
276
|
+
return FfiConverterTypeDriverActivityKind.allocationSize(value.kind) +
|
|
277
|
+
FfiConverterUInt64.allocationSize(value.unixMs) +
|
|
278
|
+
FfiConverterString.allocationSize(value.toolName) +
|
|
279
|
+
FfiConverterSequenceString.allocationSize(value.adapterIds) +
|
|
280
|
+
FfiConverterString.allocationSize(value.riskClass) +
|
|
281
|
+
FfiConverterOptionalString.allocationSize(value.publicSession) +
|
|
282
|
+
FfiConverterOptionalString.allocationSize(value.refusalCode);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
;
|
|
286
|
+
return new FFIConverter();
|
|
287
|
+
})();
|
|
288
|
+
export var DriverAuthorizationAction;
|
|
289
|
+
(function (DriverAuthorizationAction) {
|
|
290
|
+
DriverAuthorizationAction[DriverAuthorizationAction["Allow"] = 0] = "Allow";
|
|
291
|
+
DriverAuthorizationAction[DriverAuthorizationAction["Deny"] = 1] = "Deny";
|
|
292
|
+
DriverAuthorizationAction[DriverAuthorizationAction["Cancel"] = 2] = "Cancel";
|
|
293
|
+
})(DriverAuthorizationAction || (DriverAuthorizationAction = {}));
|
|
294
|
+
const FfiConverterTypeDriverAuthorizationAction = (() => {
|
|
295
|
+
const ordinalConverter = FfiConverterInt32;
|
|
296
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
297
|
+
read(from) {
|
|
298
|
+
switch (ordinalConverter.read(from)) {
|
|
299
|
+
case 1: return DriverAuthorizationAction.Allow;
|
|
300
|
+
case 2: return DriverAuthorizationAction.Deny;
|
|
301
|
+
case 3: return DriverAuthorizationAction.Cancel;
|
|
302
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
write(value, into) {
|
|
306
|
+
switch (value) {
|
|
307
|
+
case DriverAuthorizationAction.Allow: return ordinalConverter.write(1, into);
|
|
308
|
+
case DriverAuthorizationAction.Deny: return ordinalConverter.write(2, into);
|
|
309
|
+
case DriverAuthorizationAction.Cancel: return ordinalConverter.write(3, into);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
allocationSize(value) {
|
|
313
|
+
return ordinalConverter.allocationSize(0);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return new FFIConverter();
|
|
317
|
+
})();
|
|
318
|
+
/**
|
|
319
|
+
* Generated factory for {@link DriverAuthorizationDecision} record objects.
|
|
320
|
+
*/
|
|
321
|
+
export const DriverAuthorizationDecision = (() => {
|
|
322
|
+
const defaults = () => ({});
|
|
323
|
+
const create = (() => {
|
|
324
|
+
return uniffiCreateRecord(defaults);
|
|
325
|
+
})();
|
|
326
|
+
return Object.freeze({
|
|
327
|
+
create,
|
|
328
|
+
new: create,
|
|
329
|
+
defaults: () => Object.freeze(defaults()),
|
|
330
|
+
});
|
|
331
|
+
})();
|
|
332
|
+
const FfiConverterTypeDriverAuthorizationDecision = (() => {
|
|
333
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
334
|
+
read(from) {
|
|
335
|
+
return {
|
|
336
|
+
action: FfiConverterTypeDriverAuthorizationAction.read(from),
|
|
337
|
+
requestDigest: FfiConverterString.read(from)
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
write(value, into) {
|
|
341
|
+
FfiConverterTypeDriverAuthorizationAction.write(value.action, into);
|
|
342
|
+
FfiConverterString.write(value.requestDigest, into);
|
|
343
|
+
}
|
|
344
|
+
allocationSize(value) {
|
|
345
|
+
return FfiConverterTypeDriverAuthorizationAction.allocationSize(value.action) +
|
|
346
|
+
FfiConverterString.allocationSize(value.requestDigest);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
;
|
|
350
|
+
return new FFIConverter();
|
|
351
|
+
})();
|
|
352
|
+
/**
|
|
353
|
+
* Generated factory for {@link DriverAuthorizationRequest} record objects.
|
|
354
|
+
*/
|
|
355
|
+
export const DriverAuthorizationRequest = (() => {
|
|
356
|
+
const defaults = () => ({});
|
|
357
|
+
const create = (() => {
|
|
358
|
+
return uniffiCreateRecord(defaults);
|
|
359
|
+
})();
|
|
360
|
+
return Object.freeze({
|
|
361
|
+
create,
|
|
362
|
+
new: create,
|
|
363
|
+
defaults: () => Object.freeze(defaults()),
|
|
364
|
+
});
|
|
365
|
+
})();
|
|
366
|
+
const FfiConverterTypeDriverAuthorizationRequest = (() => {
|
|
367
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
368
|
+
read(from) {
|
|
369
|
+
return {
|
|
370
|
+
schema: FfiConverterString.read(from),
|
|
371
|
+
nonce: FfiConverterString.read(from),
|
|
372
|
+
generation: FfiConverterUInt64.read(from),
|
|
373
|
+
daemonInstance: FfiConverterString.read(from),
|
|
374
|
+
permissionMode: FfiConverterString.read(from),
|
|
375
|
+
managedPolicySha256: FfiConverterOptionalString.read(from),
|
|
376
|
+
userPolicySha256: FfiConverterOptionalString.read(from),
|
|
377
|
+
adapterId: FfiConverterString.read(from),
|
|
378
|
+
riskClass: FfiConverterString.read(from),
|
|
379
|
+
publicSession: FfiConverterString.read(from),
|
|
380
|
+
transportSession: FfiConverterString.read(from),
|
|
381
|
+
resourceJson: FfiConverterString.read(from),
|
|
382
|
+
humanSummary: FfiConverterString.read(from),
|
|
383
|
+
expiresUnixMs: FfiConverterUInt64.read(from),
|
|
384
|
+
requestDigest: FfiConverterString.read(from)
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
write(value, into) {
|
|
388
|
+
FfiConverterString.write(value.schema, into);
|
|
389
|
+
FfiConverterString.write(value.nonce, into);
|
|
390
|
+
FfiConverterUInt64.write(value.generation, into);
|
|
391
|
+
FfiConverterString.write(value.daemonInstance, into);
|
|
392
|
+
FfiConverterString.write(value.permissionMode, into);
|
|
393
|
+
FfiConverterOptionalString.write(value.managedPolicySha256, into);
|
|
394
|
+
FfiConverterOptionalString.write(value.userPolicySha256, into);
|
|
395
|
+
FfiConverterString.write(value.adapterId, into);
|
|
396
|
+
FfiConverterString.write(value.riskClass, into);
|
|
397
|
+
FfiConverterString.write(value.publicSession, into);
|
|
398
|
+
FfiConverterString.write(value.transportSession, into);
|
|
399
|
+
FfiConverterString.write(value.resourceJson, into);
|
|
400
|
+
FfiConverterString.write(value.humanSummary, into);
|
|
401
|
+
FfiConverterUInt64.write(value.expiresUnixMs, into);
|
|
402
|
+
FfiConverterString.write(value.requestDigest, into);
|
|
403
|
+
}
|
|
404
|
+
allocationSize(value) {
|
|
405
|
+
return FfiConverterString.allocationSize(value.schema) +
|
|
406
|
+
FfiConverterString.allocationSize(value.nonce) +
|
|
407
|
+
FfiConverterUInt64.allocationSize(value.generation) +
|
|
408
|
+
FfiConverterString.allocationSize(value.daemonInstance) +
|
|
409
|
+
FfiConverterString.allocationSize(value.permissionMode) +
|
|
410
|
+
FfiConverterOptionalString.allocationSize(value.managedPolicySha256) +
|
|
411
|
+
FfiConverterOptionalString.allocationSize(value.userPolicySha256) +
|
|
412
|
+
FfiConverterString.allocationSize(value.adapterId) +
|
|
413
|
+
FfiConverterString.allocationSize(value.riskClass) +
|
|
414
|
+
FfiConverterString.allocationSize(value.publicSession) +
|
|
415
|
+
FfiConverterString.allocationSize(value.transportSession) +
|
|
416
|
+
FfiConverterString.allocationSize(value.resourceJson) +
|
|
417
|
+
FfiConverterString.allocationSize(value.humanSummary) +
|
|
418
|
+
FfiConverterUInt64.allocationSize(value.expiresUnixMs) +
|
|
419
|
+
FfiConverterString.allocationSize(value.requestDigest);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
;
|
|
423
|
+
return new FFIConverter();
|
|
424
|
+
})();
|
|
69
425
|
/**
|
|
70
426
|
* Generated factory for {@link DriverMetadata} record objects.
|
|
71
427
|
*/
|
|
@@ -465,6 +821,55 @@ const FfiConverterTypeMacOsPermissionStatus = (() => {
|
|
|
465
821
|
;
|
|
466
822
|
return new FFIConverter();
|
|
467
823
|
})();
|
|
824
|
+
/**
|
|
825
|
+
* Generated factory for {@link PrivateWorkerOptions} record objects.
|
|
826
|
+
*/
|
|
827
|
+
export const PrivateWorkerOptions = (() => {
|
|
828
|
+
const defaults = () => ({});
|
|
829
|
+
const create = (() => {
|
|
830
|
+
return uniffiCreateRecord(defaults);
|
|
831
|
+
})();
|
|
832
|
+
return Object.freeze({
|
|
833
|
+
create,
|
|
834
|
+
new: create,
|
|
835
|
+
defaults: () => Object.freeze(defaults()),
|
|
836
|
+
});
|
|
837
|
+
})();
|
|
838
|
+
const FfiConverterTypePrivateWorkerOptions = (() => {
|
|
839
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
840
|
+
read(from) {
|
|
841
|
+
return {
|
|
842
|
+
binaryPath: FfiConverterString.read(from),
|
|
843
|
+
hostBundleId: FfiConverterString.read(from),
|
|
844
|
+
startupTimeoutMs: FfiConverterOptionalUInt64.read(from),
|
|
845
|
+
shutdownTimeoutMs: FfiConverterOptionalUInt64.read(from),
|
|
846
|
+
configuredDriver: FfiConverterTypeConfiguredDriverOptions.read(from),
|
|
847
|
+
environment: FfiConverterSequenceTypeEmbeddedEnvironmentVariable.read(from),
|
|
848
|
+
inheritStderr: FfiConverterBool.read(from)
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
write(value, into) {
|
|
852
|
+
FfiConverterString.write(value.binaryPath, into);
|
|
853
|
+
FfiConverterString.write(value.hostBundleId, into);
|
|
854
|
+
FfiConverterOptionalUInt64.write(value.startupTimeoutMs, into);
|
|
855
|
+
FfiConverterOptionalUInt64.write(value.shutdownTimeoutMs, into);
|
|
856
|
+
FfiConverterTypeConfiguredDriverOptions.write(value.configuredDriver, into);
|
|
857
|
+
FfiConverterSequenceTypeEmbeddedEnvironmentVariable.write(value.environment, into);
|
|
858
|
+
FfiConverterBool.write(value.inheritStderr, into);
|
|
859
|
+
}
|
|
860
|
+
allocationSize(value) {
|
|
861
|
+
return FfiConverterString.allocationSize(value.binaryPath) +
|
|
862
|
+
FfiConverterString.allocationSize(value.hostBundleId) +
|
|
863
|
+
FfiConverterOptionalUInt64.allocationSize(value.startupTimeoutMs) +
|
|
864
|
+
FfiConverterOptionalUInt64.allocationSize(value.shutdownTimeoutMs) +
|
|
865
|
+
FfiConverterTypeConfiguredDriverOptions.allocationSize(value.configuredDriver) +
|
|
866
|
+
FfiConverterSequenceTypeEmbeddedEnvironmentVariable.allocationSize(value.environment) +
|
|
867
|
+
FfiConverterBool.allocationSize(value.inheritStderr);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
;
|
|
871
|
+
return new FFIConverter();
|
|
872
|
+
})();
|
|
468
873
|
/**
|
|
469
874
|
* Generated factory for {@link ToolResult} record objects.
|
|
470
875
|
*/
|
|
@@ -517,32 +922,185 @@ const FfiConverterTypeToolResult = (() => {
|
|
|
517
922
|
;
|
|
518
923
|
return new FFIConverter();
|
|
519
924
|
})();
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
925
|
+
/**
|
|
926
|
+
* Generated factory for {@link TrustedSessionOptions} record objects.
|
|
927
|
+
*/
|
|
928
|
+
export const TrustedSessionOptions = (() => {
|
|
929
|
+
const defaults = () => ({});
|
|
930
|
+
const create = (() => {
|
|
931
|
+
return uniffiCreateRecord(defaults);
|
|
932
|
+
})();
|
|
933
|
+
return Object.freeze({
|
|
934
|
+
create,
|
|
935
|
+
new: create,
|
|
936
|
+
defaults: () => Object.freeze(defaults()),
|
|
937
|
+
});
|
|
938
|
+
})();
|
|
939
|
+
const FfiConverterTypeTrustedSessionOptions = (() => {
|
|
940
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
941
|
+
read(from) {
|
|
942
|
+
return {
|
|
943
|
+
publicSession: FfiConverterString.read(from),
|
|
944
|
+
mode: FfiConverterTypeSessionPermissionMode.read(from),
|
|
945
|
+
ttlSeconds: FfiConverterUInt64.read(from),
|
|
946
|
+
idleTtlSeconds: FfiConverterUInt64.read(from),
|
|
947
|
+
boundedManifestPath: FfiConverterOptionalString.read(from)
|
|
948
|
+
};
|
|
949
|
+
}
|
|
950
|
+
write(value, into) {
|
|
951
|
+
FfiConverterString.write(value.publicSession, into);
|
|
952
|
+
FfiConverterTypeSessionPermissionMode.write(value.mode, into);
|
|
953
|
+
FfiConverterUInt64.write(value.ttlSeconds, into);
|
|
954
|
+
FfiConverterUInt64.write(value.idleTtlSeconds, into);
|
|
955
|
+
FfiConverterOptionalString.write(value.boundedManifestPath, into);
|
|
956
|
+
}
|
|
957
|
+
allocationSize(value) {
|
|
958
|
+
return FfiConverterString.allocationSize(value.publicSession) +
|
|
959
|
+
FfiConverterTypeSessionPermissionMode.allocationSize(value.mode) +
|
|
960
|
+
FfiConverterUInt64.allocationSize(value.ttlSeconds) +
|
|
961
|
+
FfiConverterUInt64.allocationSize(value.idleTtlSeconds) +
|
|
962
|
+
FfiConverterOptionalString.allocationSize(value.boundedManifestPath);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
;
|
|
966
|
+
return new FFIConverter();
|
|
967
|
+
})();
|
|
968
|
+
export var ActionCompletion;
|
|
969
|
+
(function (ActionCompletion) {
|
|
970
|
+
ActionCompletion[ActionCompletion["NotStarted"] = 0] = "NotStarted";
|
|
971
|
+
ActionCompletion[ActionCompletion["Completed"] = 1] = "Completed";
|
|
972
|
+
ActionCompletion[ActionCompletion["Unknown"] = 2] = "Unknown";
|
|
973
|
+
})(ActionCompletion || (ActionCompletion = {}));
|
|
974
|
+
const FfiConverterTypeActionCompletion = (() => {
|
|
975
|
+
const ordinalConverter = FfiConverterInt32;
|
|
976
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
977
|
+
read(from) {
|
|
978
|
+
switch (ordinalConverter.read(from)) {
|
|
979
|
+
case 1: return ActionCompletion.NotStarted;
|
|
980
|
+
case 2: return ActionCompletion.Completed;
|
|
981
|
+
case 3: return ActionCompletion.Unknown;
|
|
982
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
write(value, into) {
|
|
986
|
+
switch (value) {
|
|
987
|
+
case ActionCompletion.NotStarted: return ordinalConverter.write(1, into);
|
|
988
|
+
case ActionCompletion.Completed: return ordinalConverter.write(2, into);
|
|
989
|
+
case ActionCompletion.Unknown: return ordinalConverter.write(3, into);
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
allocationSize(value) {
|
|
993
|
+
return ordinalConverter.allocationSize(0);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
return new FFIConverter();
|
|
997
|
+
})();
|
|
998
|
+
// Error type: DriverAuthorizationHostError
|
|
999
|
+
export var DriverAuthorizationHostError_Tags;
|
|
1000
|
+
(function (DriverAuthorizationHostError_Tags) {
|
|
1001
|
+
DriverAuthorizationHostError_Tags["Failed"] = "Failed";
|
|
1002
|
+
})(DriverAuthorizationHostError_Tags || (DriverAuthorizationHostError_Tags = {}));
|
|
1003
|
+
export const DriverAuthorizationHostError = (() => {
|
|
1004
|
+
class Failed_ extends UniffiError {
|
|
1005
|
+
/**
|
|
1006
|
+
* @private
|
|
1007
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1008
|
+
*/
|
|
1009
|
+
[uniffiTypeNameSymbol] = "DriverAuthorizationHostError";
|
|
1010
|
+
tag = DriverAuthorizationHostError_Tags.Failed;
|
|
1011
|
+
inner;
|
|
1012
|
+
constructor(inner) {
|
|
1013
|
+
super("DriverAuthorizationHostError", "Failed");
|
|
1014
|
+
this.inner = Object.freeze(inner);
|
|
1015
|
+
}
|
|
1016
|
+
static new(inner) {
|
|
1017
|
+
return new Failed_(inner);
|
|
1018
|
+
}
|
|
1019
|
+
static instanceOf(obj) {
|
|
1020
|
+
return obj.tag === DriverAuthorizationHostError_Tags.Failed;
|
|
1021
|
+
}
|
|
1022
|
+
static hasInner(obj) {
|
|
1023
|
+
return Failed_.instanceOf(obj);
|
|
1024
|
+
}
|
|
1025
|
+
static getInner(obj) {
|
|
1026
|
+
return obj.inner;
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
function instanceOf(obj) {
|
|
1030
|
+
return obj[uniffiTypeNameSymbol] === "DriverAuthorizationHostError";
|
|
1031
|
+
}
|
|
1032
|
+
return Object.freeze({
|
|
1033
|
+
instanceOf,
|
|
1034
|
+
Failed: Failed_
|
|
1035
|
+
});
|
|
1036
|
+
})();
|
|
1037
|
+
// FfiConverter for enum DriverAuthorizationHostError
|
|
1038
|
+
const FfiConverterTypeDriverAuthorizationHostError = (() => {
|
|
1039
|
+
const ordinalConverter = FfiConverterInt32;
|
|
1040
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1041
|
+
read(from) {
|
|
1042
|
+
switch (ordinalConverter.read(from)) {
|
|
1043
|
+
case 1: return new DriverAuthorizationHostError.Failed({ reason: FfiConverterString.read(from) });
|
|
1044
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
write(value, into) {
|
|
1048
|
+
switch (value.tag) {
|
|
1049
|
+
case DriverAuthorizationHostError_Tags.Failed: {
|
|
1050
|
+
ordinalConverter.write(1, into);
|
|
1051
|
+
const inner = value.inner;
|
|
1052
|
+
FfiConverterString.write(inner.reason, into);
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
default:
|
|
1056
|
+
// Throwing from here means that DriverAuthorizationHostError_Tags hasn't matched an ordinal.
|
|
1057
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
allocationSize(value) {
|
|
1061
|
+
switch (value.tag) {
|
|
1062
|
+
case DriverAuthorizationHostError_Tags.Failed: {
|
|
1063
|
+
const inner = value.inner;
|
|
1064
|
+
let size = ordinalConverter.allocationSize(1);
|
|
1065
|
+
size += FfiConverterString.allocationSize(inner.reason);
|
|
1066
|
+
return size;
|
|
1067
|
+
}
|
|
1068
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
return new FFIConverter();
|
|
1073
|
+
})();
|
|
1074
|
+
// Error type: DriverError
|
|
1075
|
+
export var DriverError_Tags;
|
|
1076
|
+
(function (DriverError_Tags) {
|
|
1077
|
+
DriverError_Tags["Configuration"] = "Configuration";
|
|
1078
|
+
DriverError_Tags["InvalidArguments"] = "InvalidArguments";
|
|
1079
|
+
DriverError_Tags["Transport"] = "Transport";
|
|
1080
|
+
DriverError_Tags["Protocol"] = "Protocol";
|
|
1081
|
+
DriverError_Tags["Tool"] = "Tool";
|
|
1082
|
+
DriverError_Tags["Shutdown"] = "Shutdown";
|
|
1083
|
+
DriverError_Tags["RuntimeAlreadyExists"] = "RuntimeAlreadyExists";
|
|
1084
|
+
DriverError_Tags["Worker"] = "Worker";
|
|
1085
|
+
DriverError_Tags["Remote"] = "Remote";
|
|
1086
|
+
DriverError_Tags["ActionInterrupted"] = "ActionInterrupted";
|
|
1087
|
+
})(DriverError_Tags || (DriverError_Tags = {}));
|
|
1088
|
+
export const DriverError = (() => {
|
|
1089
|
+
class Configuration_ extends UniffiError {
|
|
1090
|
+
/**
|
|
1091
|
+
* @private
|
|
1092
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1093
|
+
*/
|
|
1094
|
+
[uniffiTypeNameSymbol] = "DriverError";
|
|
1095
|
+
tag = DriverError_Tags.Configuration;
|
|
1096
|
+
inner;
|
|
1097
|
+
constructor(inner) {
|
|
1098
|
+
super("DriverError", "Configuration");
|
|
1099
|
+
this.inner = Object.freeze(inner);
|
|
1100
|
+
}
|
|
1101
|
+
static new(inner) {
|
|
1102
|
+
return new Configuration_(inner);
|
|
1103
|
+
}
|
|
546
1104
|
static instanceOf(obj) {
|
|
547
1105
|
return obj.tag === DriverError_Tags.Configuration;
|
|
548
1106
|
}
|
|
@@ -673,6 +1231,101 @@ export const DriverError = (() => {
|
|
|
673
1231
|
return false;
|
|
674
1232
|
}
|
|
675
1233
|
}
|
|
1234
|
+
class RuntimeAlreadyExists_ extends UniffiError {
|
|
1235
|
+
/**
|
|
1236
|
+
* @private
|
|
1237
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1238
|
+
*/
|
|
1239
|
+
[uniffiTypeNameSymbol] = "DriverError";
|
|
1240
|
+
tag = DriverError_Tags.RuntimeAlreadyExists;
|
|
1241
|
+
constructor() {
|
|
1242
|
+
super("DriverError", "RuntimeAlreadyExists");
|
|
1243
|
+
}
|
|
1244
|
+
static new() {
|
|
1245
|
+
return new RuntimeAlreadyExists_();
|
|
1246
|
+
}
|
|
1247
|
+
static instanceOf(obj) {
|
|
1248
|
+
return obj.tag === DriverError_Tags.RuntimeAlreadyExists;
|
|
1249
|
+
}
|
|
1250
|
+
static hasInner(obj) {
|
|
1251
|
+
return false;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
class Worker_ extends UniffiError {
|
|
1255
|
+
/**
|
|
1256
|
+
* @private
|
|
1257
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1258
|
+
*/
|
|
1259
|
+
[uniffiTypeNameSymbol] = "DriverError";
|
|
1260
|
+
tag = DriverError_Tags.Worker;
|
|
1261
|
+
inner;
|
|
1262
|
+
constructor(inner) {
|
|
1263
|
+
super("DriverError", "Worker");
|
|
1264
|
+
this.inner = Object.freeze(inner);
|
|
1265
|
+
}
|
|
1266
|
+
static new(inner) {
|
|
1267
|
+
return new Worker_(inner);
|
|
1268
|
+
}
|
|
1269
|
+
static instanceOf(obj) {
|
|
1270
|
+
return obj.tag === DriverError_Tags.Worker;
|
|
1271
|
+
}
|
|
1272
|
+
static hasInner(obj) {
|
|
1273
|
+
return Worker_.instanceOf(obj);
|
|
1274
|
+
}
|
|
1275
|
+
static getInner(obj) {
|
|
1276
|
+
return obj.inner;
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
class Remote_ extends UniffiError {
|
|
1280
|
+
/**
|
|
1281
|
+
* @private
|
|
1282
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1283
|
+
*/
|
|
1284
|
+
[uniffiTypeNameSymbol] = "DriverError";
|
|
1285
|
+
tag = DriverError_Tags.Remote;
|
|
1286
|
+
inner;
|
|
1287
|
+
constructor(inner) {
|
|
1288
|
+
super("DriverError", "Remote");
|
|
1289
|
+
this.inner = Object.freeze(inner);
|
|
1290
|
+
}
|
|
1291
|
+
static new(inner) {
|
|
1292
|
+
return new Remote_(inner);
|
|
1293
|
+
}
|
|
1294
|
+
static instanceOf(obj) {
|
|
1295
|
+
return obj.tag === DriverError_Tags.Remote;
|
|
1296
|
+
}
|
|
1297
|
+
static hasInner(obj) {
|
|
1298
|
+
return Remote_.instanceOf(obj);
|
|
1299
|
+
}
|
|
1300
|
+
static getInner(obj) {
|
|
1301
|
+
return obj.inner;
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
class ActionInterrupted_ extends UniffiError {
|
|
1305
|
+
/**
|
|
1306
|
+
* @private
|
|
1307
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1308
|
+
*/
|
|
1309
|
+
[uniffiTypeNameSymbol] = "DriverError";
|
|
1310
|
+
tag = DriverError_Tags.ActionInterrupted;
|
|
1311
|
+
inner;
|
|
1312
|
+
constructor(inner) {
|
|
1313
|
+
super("DriverError", "ActionInterrupted");
|
|
1314
|
+
this.inner = Object.freeze(inner);
|
|
1315
|
+
}
|
|
1316
|
+
static new(inner) {
|
|
1317
|
+
return new ActionInterrupted_(inner);
|
|
1318
|
+
}
|
|
1319
|
+
static instanceOf(obj) {
|
|
1320
|
+
return obj.tag === DriverError_Tags.ActionInterrupted;
|
|
1321
|
+
}
|
|
1322
|
+
static hasInner(obj) {
|
|
1323
|
+
return ActionInterrupted_.instanceOf(obj);
|
|
1324
|
+
}
|
|
1325
|
+
static getInner(obj) {
|
|
1326
|
+
return obj.inner;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
676
1329
|
function instanceOf(obj) {
|
|
677
1330
|
return obj[uniffiTypeNameSymbol] === "DriverError";
|
|
678
1331
|
}
|
|
@@ -683,7 +1336,11 @@ export const DriverError = (() => {
|
|
|
683
1336
|
Transport: Transport_,
|
|
684
1337
|
Protocol: Protocol_,
|
|
685
1338
|
Tool: Tool_,
|
|
686
|
-
Shutdown: Shutdown_
|
|
1339
|
+
Shutdown: Shutdown_,
|
|
1340
|
+
RuntimeAlreadyExists: RuntimeAlreadyExists_,
|
|
1341
|
+
Worker: Worker_,
|
|
1342
|
+
Remote: Remote_,
|
|
1343
|
+
ActionInterrupted: ActionInterrupted_
|
|
687
1344
|
});
|
|
688
1345
|
})();
|
|
689
1346
|
// FfiConverter for enum DriverError
|
|
@@ -698,6 +1355,10 @@ const FfiConverterTypeDriverError = (() => {
|
|
|
698
1355
|
case 4: return new DriverError.Protocol({ reason: FfiConverterString.read(from) });
|
|
699
1356
|
case 5: return new DriverError.Tool({ tool: FfiConverterString.read(from), message: FfiConverterString.read(from), errorCode: FfiConverterString.read(from) });
|
|
700
1357
|
case 6: return new DriverError.Shutdown();
|
|
1358
|
+
case 7: return new DriverError.RuntimeAlreadyExists();
|
|
1359
|
+
case 8: return new DriverError.Worker({ reason: FfiConverterString.read(from) });
|
|
1360
|
+
case 9: return new DriverError.Remote({ reason: FfiConverterString.read(from) });
|
|
1361
|
+
case 10: return new DriverError.ActionInterrupted({ completion: FfiConverterTypeActionCompletion.read(from), reason: FfiConverterString.read(from) });
|
|
701
1362
|
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
702
1363
|
}
|
|
703
1364
|
}
|
|
@@ -741,6 +1402,29 @@ const FfiConverterTypeDriverError = (() => {
|
|
|
741
1402
|
ordinalConverter.write(6, into);
|
|
742
1403
|
return;
|
|
743
1404
|
}
|
|
1405
|
+
case DriverError_Tags.RuntimeAlreadyExists: {
|
|
1406
|
+
ordinalConverter.write(7, into);
|
|
1407
|
+
return;
|
|
1408
|
+
}
|
|
1409
|
+
case DriverError_Tags.Worker: {
|
|
1410
|
+
ordinalConverter.write(8, into);
|
|
1411
|
+
const inner = value.inner;
|
|
1412
|
+
FfiConverterString.write(inner.reason, into);
|
|
1413
|
+
return;
|
|
1414
|
+
}
|
|
1415
|
+
case DriverError_Tags.Remote: {
|
|
1416
|
+
ordinalConverter.write(9, into);
|
|
1417
|
+
const inner = value.inner;
|
|
1418
|
+
FfiConverterString.write(inner.reason, into);
|
|
1419
|
+
return;
|
|
1420
|
+
}
|
|
1421
|
+
case DriverError_Tags.ActionInterrupted: {
|
|
1422
|
+
ordinalConverter.write(10, into);
|
|
1423
|
+
const inner = value.inner;
|
|
1424
|
+
FfiConverterTypeActionCompletion.write(inner.completion, into);
|
|
1425
|
+
FfiConverterString.write(inner.reason, into);
|
|
1426
|
+
return;
|
|
1427
|
+
}
|
|
744
1428
|
default:
|
|
745
1429
|
// Throwing from here means that DriverError_Tags hasn't matched an ordinal.
|
|
746
1430
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -785,6 +1469,28 @@ const FfiConverterTypeDriverError = (() => {
|
|
|
785
1469
|
case DriverError_Tags.Shutdown: {
|
|
786
1470
|
return ordinalConverter.allocationSize(6);
|
|
787
1471
|
}
|
|
1472
|
+
case DriverError_Tags.RuntimeAlreadyExists: {
|
|
1473
|
+
return ordinalConverter.allocationSize(7);
|
|
1474
|
+
}
|
|
1475
|
+
case DriverError_Tags.Worker: {
|
|
1476
|
+
const inner = value.inner;
|
|
1477
|
+
let size = ordinalConverter.allocationSize(8);
|
|
1478
|
+
size += FfiConverterString.allocationSize(inner.reason);
|
|
1479
|
+
return size;
|
|
1480
|
+
}
|
|
1481
|
+
case DriverError_Tags.Remote: {
|
|
1482
|
+
const inner = value.inner;
|
|
1483
|
+
let size = ordinalConverter.allocationSize(9);
|
|
1484
|
+
size += FfiConverterString.allocationSize(inner.reason);
|
|
1485
|
+
return size;
|
|
1486
|
+
}
|
|
1487
|
+
case DriverError_Tags.ActionInterrupted: {
|
|
1488
|
+
const inner = value.inner;
|
|
1489
|
+
let size = ordinalConverter.allocationSize(10);
|
|
1490
|
+
size += FfiConverterTypeActionCompletion.allocationSize(inner.completion);
|
|
1491
|
+
size += FfiConverterString.allocationSize(inner.reason);
|
|
1492
|
+
return size;
|
|
1493
|
+
}
|
|
788
1494
|
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
789
1495
|
}
|
|
790
1496
|
}
|
|
@@ -798,6 +1504,8 @@ export var DriverExecutionMode;
|
|
|
798
1504
|
(function (DriverExecutionMode) {
|
|
799
1505
|
DriverExecutionMode[DriverExecutionMode["Embedded"] = 0] = "Embedded";
|
|
800
1506
|
DriverExecutionMode[DriverExecutionMode["Daemon"] = 1] = "Daemon";
|
|
1507
|
+
DriverExecutionMode[DriverExecutionMode["PrivateWorker"] = 2] = "PrivateWorker";
|
|
1508
|
+
DriverExecutionMode[DriverExecutionMode["Remote"] = 3] = "Remote";
|
|
801
1509
|
})(DriverExecutionMode || (DriverExecutionMode = {}));
|
|
802
1510
|
const FfiConverterTypeDriverExecutionMode = (() => {
|
|
803
1511
|
const ordinalConverter = FfiConverterInt32;
|
|
@@ -806,6 +1514,8 @@ const FfiConverterTypeDriverExecutionMode = (() => {
|
|
|
806
1514
|
switch (ordinalConverter.read(from)) {
|
|
807
1515
|
case 1: return DriverExecutionMode.Embedded;
|
|
808
1516
|
case 2: return DriverExecutionMode.Daemon;
|
|
1517
|
+
case 3: return DriverExecutionMode.PrivateWorker;
|
|
1518
|
+
case 4: return DriverExecutionMode.Remote;
|
|
809
1519
|
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
810
1520
|
}
|
|
811
1521
|
}
|
|
@@ -813,6 +1523,8 @@ const FfiConverterTypeDriverExecutionMode = (() => {
|
|
|
813
1523
|
switch (value) {
|
|
814
1524
|
case DriverExecutionMode.Embedded: return ordinalConverter.write(1, into);
|
|
815
1525
|
case DriverExecutionMode.Daemon: return ordinalConverter.write(2, into);
|
|
1526
|
+
case DriverExecutionMode.PrivateWorker: return ordinalConverter.write(3, into);
|
|
1527
|
+
case DriverExecutionMode.Remote: return ordinalConverter.write(4, into);
|
|
816
1528
|
}
|
|
817
1529
|
}
|
|
818
1530
|
allocationSize(value) {
|
|
@@ -1283,46 +1995,170 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1283
1995
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
1284
1996
|
}
|
|
1285
1997
|
/**
|
|
1286
|
-
*
|
|
1287
|
-
*
|
|
1998
|
+
* Create a same-process runtime with an explicit immutable authorization
|
|
1999
|
+
* ceiling. This is a trusted host constructor and is not exposed as an
|
|
2000
|
+
* agent tool. Existing `create()` callers remain unchanged.
|
|
1288
2001
|
*/
|
|
1289
|
-
static
|
|
2002
|
+
static createConfigured(options) {
|
|
1290
2003
|
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
1291
2004
|
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
1292
2005
|
/*caller:*/ (callStatus) => {
|
|
1293
|
-
return nativeModule().
|
|
2006
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_configured(FfiConverterTypeConfiguredDriverOptions.lower(options, nativeModule().rustbuffer_alloc), callStatus);
|
|
1294
2007
|
},
|
|
1295
2008
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
1296
2009
|
}
|
|
1297
2010
|
/**
|
|
1298
|
-
*
|
|
1299
|
-
*
|
|
1300
|
-
* remain downstream of the same public SDK runtime.
|
|
2011
|
+
* Create a configured same-process runtime with a content-free activity
|
|
2012
|
+
* observer supplied by trusted embedding-host code.
|
|
1301
2013
|
*/
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
2014
|
+
static createConfiguredWithActivityObserver(options, observer) {
|
|
2015
|
+
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
2016
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
2017
|
+
/*caller:*/ (callStatus) => {
|
|
2018
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_configured_with_activity_observer(FfiConverterTypeConfiguredDriverOptions.lower(options, nativeModule().rustbuffer_alloc), FfiConverterTypeDriverActivityObserver.lower(observer, nativeModule().rustbuffer_alloc), callStatus);
|
|
2019
|
+
},
|
|
2020
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2021
|
+
}
|
|
2022
|
+
/**
|
|
2023
|
+
* Language-package entry point for a configured activity-observer runtime.
|
|
2024
|
+
*/
|
|
2025
|
+
static createConfiguredWithActivityObserverAndClientKind(options, observer, clientKind) {
|
|
2026
|
+
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
2027
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
2028
|
+
/*caller:*/ (callStatus) => {
|
|
2029
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_configured_with_activity_observer_and_client_kind(FfiConverterTypeConfiguredDriverOptions.lower(options, nativeModule().rustbuffer_alloc), FfiConverterTypeDriverActivityObserver.lower(observer, nativeModule().rustbuffer_alloc), FfiConverterTypeSdkClientKind.lower(clientKind, nativeModule().rustbuffer_alloc), callStatus);
|
|
2030
|
+
},
|
|
2031
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2032
|
+
}
|
|
2033
|
+
/**
|
|
2034
|
+
* Create a configured same-process runtime with an optional residual
|
|
2035
|
+
* authorization callback supplied by trusted embedding-host code.
|
|
2036
|
+
*
|
|
2037
|
+
* The callback object is immutable runtime configuration. Applications
|
|
2038
|
+
* must not expose it to an agent or implement it using ordinary MCP
|
|
2039
|
+
* elicitation, model-visible stdio, or an auto-accepting callback.
|
|
2040
|
+
*/
|
|
2041
|
+
static createConfiguredWithAuthorizationHost(options, host) {
|
|
2042
|
+
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
2043
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
2044
|
+
/*caller:*/ (callStatus) => {
|
|
2045
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_configured_with_authorization_host(FfiConverterTypeConfiguredDriverOptions.lower(options, nativeModule().rustbuffer_alloc), FfiConverterTypeDriverAuthorizationHost.lower(host, nativeModule().rustbuffer_alloc), callStatus);
|
|
2046
|
+
},
|
|
2047
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2048
|
+
}
|
|
2049
|
+
/**
|
|
2050
|
+
* Language-package entry point for a configured protected-host runtime.
|
|
2051
|
+
*/
|
|
2052
|
+
static createConfiguredWithAuthorizationHostAndClientKind(options, host, clientKind) {
|
|
2053
|
+
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
2054
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
2055
|
+
/*caller:*/ (callStatus) => {
|
|
2056
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_configured_with_authorization_host_and_client_kind(FfiConverterTypeConfiguredDriverOptions.lower(options, nativeModule().rustbuffer_alloc), FfiConverterTypeDriverAuthorizationHost.lower(host, nativeModule().rustbuffer_alloc), FfiConverterTypeSdkClientKind.lower(clientKind, nativeModule().rustbuffer_alloc), callStatus);
|
|
2057
|
+
},
|
|
2058
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2059
|
+
}
|
|
2060
|
+
/**
|
|
2061
|
+
* Language-package entry point for an explicitly configured runtime.
|
|
2062
|
+
*/
|
|
2063
|
+
static createConfiguredWithClientKind(options, clientKind) {
|
|
2064
|
+
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
2065
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
2066
|
+
/*caller:*/ (callStatus) => {
|
|
2067
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_configured_with_client_kind(FfiConverterTypeConfiguredDriverOptions.lower(options, nativeModule().rustbuffer_alloc), FfiConverterTypeSdkClientKind.lower(clientKind, nativeModule().rustbuffer_alloc), callStatus);
|
|
2068
|
+
},
|
|
2069
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
* Create a configured same-process runtime with both residual
|
|
2073
|
+
* authorization and content-free activity callbacks.
|
|
2074
|
+
*/
|
|
2075
|
+
static createConfiguredWithHostIntegrations(options, host, observer) {
|
|
2076
|
+
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
2077
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
2078
|
+
/*caller:*/ (callStatus) => {
|
|
2079
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_configured_with_host_integrations(FfiConverterTypeConfiguredDriverOptions.lower(options, nativeModule().rustbuffer_alloc), FfiConverterTypeDriverAuthorizationHost.lower(host, nativeModule().rustbuffer_alloc), FfiConverterTypeDriverActivityObserver.lower(observer, nativeModule().rustbuffer_alloc), callStatus);
|
|
2080
|
+
},
|
|
2081
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2082
|
+
}
|
|
2083
|
+
/**
|
|
2084
|
+
* Language-package entry point for both trusted host callbacks.
|
|
2085
|
+
*/
|
|
2086
|
+
static createConfiguredWithHostIntegrationsAndClientKind(options, host, observer, clientKind) {
|
|
2087
|
+
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
2088
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
2089
|
+
/*caller:*/ (callStatus) => {
|
|
2090
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_configured_with_host_integrations_and_client_kind(FfiConverterTypeConfiguredDriverOptions.lower(options, nativeModule().rustbuffer_alloc), FfiConverterTypeDriverAuthorizationHost.lower(host, nativeModule().rustbuffer_alloc), FfiConverterTypeDriverActivityObserver.lower(observer, nativeModule().rustbuffer_alloc), FfiConverterTypeSdkClientKind.lower(clientKind, nativeModule().rustbuffer_alloc), callStatus);
|
|
2091
|
+
},
|
|
2092
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2093
|
+
}
|
|
2094
|
+
/**
|
|
2095
|
+
* Create a process-isolated runtime owned by this SDK object.
|
|
2096
|
+
*
|
|
2097
|
+
* This constructor directly spawns the supplied Cua Driver binary and
|
|
2098
|
+
* communicates only over inherited stdio. No daemon or reusable endpoint
|
|
2099
|
+
* is created.
|
|
2100
|
+
*/
|
|
2101
|
+
static createPrivateWorker(options) {
|
|
2102
|
+
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
2103
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
2104
|
+
/*caller:*/ (callStatus) => {
|
|
2105
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_private_worker(FfiConverterTypePrivateWorkerOptions.lower(options, nativeModule().rustbuffer_alloc), callStatus);
|
|
2106
|
+
},
|
|
2107
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2108
|
+
}
|
|
2109
|
+
/**
|
|
2110
|
+
* Language-package entry point that preserves the worker constructor
|
|
2111
|
+
* while attaching the importing SDK runtime category.
|
|
2112
|
+
*/
|
|
2113
|
+
static createPrivateWorkerWithClientKind(options, clientKind) {
|
|
2114
|
+
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
2115
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
2116
|
+
/*caller:*/ (callStatus) => {
|
|
2117
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_private_worker_with_client_kind(FfiConverterTypePrivateWorkerOptions.lower(options, nativeModule().rustbuffer_alloc), FfiConverterTypeSdkClientKind.lower(clientKind, nativeModule().rustbuffer_alloc), callStatus);
|
|
2118
|
+
},
|
|
2119
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2120
|
+
}
|
|
2121
|
+
/**
|
|
2122
|
+
* Language-package entry point for the same-process runtime. The wrapper
|
|
2123
|
+
* at each package root selects the client kind automatically.
|
|
2124
|
+
*/
|
|
2125
|
+
static createWithClientKind(options, clientKind) {
|
|
2126
|
+
return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
|
|
2127
|
+
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
2128
|
+
/*caller:*/ (callStatus) => {
|
|
2129
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_constructor_cuadriver_create_with_client_kind(FfiConverterOptionalTypeDriverOptions.lower(options, nativeModule().rustbuffer_alloc), FfiConverterTypeSdkClientKind.lower(clientKind, nativeModule().rustbuffer_alloc), callStatus);
|
|
2130
|
+
},
|
|
2131
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2132
|
+
}
|
|
2133
|
+
/**
|
|
2134
|
+
* Generic protocol-adapter surface. Ordinary applications should prefer
|
|
2135
|
+
* typed methods; MCP and other open-ended adapters use this method so they
|
|
2136
|
+
* remain downstream of the same public SDK runtime.
|
|
2137
|
+
*/
|
|
2138
|
+
async callTool(name, argumentsJson, asyncOpts_) {
|
|
2139
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2140
|
+
try {
|
|
2141
|
+
return await uniffiRustCallAsync(
|
|
2142
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2143
|
+
/*rustFutureFunc:*/ () => {
|
|
2144
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_call_tool(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterString.lower(name, nativeModule().rustbuffer_alloc), FfiConverterString.lower(argumentsJson, nativeModule().rustbuffer_alloc));
|
|
2145
|
+
},
|
|
2146
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2147
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2148
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2149
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2150
|
+
// Async returns always go through the JS-side converter: the
|
|
2151
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2152
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2153
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2154
|
+
// here using the per-callable return-type converter.
|
|
2155
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2156
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2157
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2158
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2159
|
+
}
|
|
2160
|
+
catch (__error) {
|
|
2161
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
1326
2162
|
__error.stack = __stack;
|
|
1327
2163
|
}
|
|
1328
2164
|
throw __error;
|
|
@@ -1458,6 +2294,35 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1458
2294
|
},
|
|
1459
2295
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
1460
2296
|
}
|
|
2297
|
+
async getAgentCursorState(input, asyncOpts_) {
|
|
2298
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2299
|
+
try {
|
|
2300
|
+
return await uniffiRustCallAsync(
|
|
2301
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2302
|
+
/*rustFutureFunc:*/ () => {
|
|
2303
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_get_agent_cursor_state(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeGetAgentCursorStateInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2304
|
+
},
|
|
2305
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2306
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2307
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2308
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2309
|
+
// Async returns always go through the JS-side converter: the
|
|
2310
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2311
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2312
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2313
|
+
// here using the per-callable return-type converter.
|
|
2314
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2315
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2316
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2317
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2318
|
+
}
|
|
2319
|
+
catch (__error) {
|
|
2320
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2321
|
+
__error.stack = __stack;
|
|
2322
|
+
}
|
|
2323
|
+
throw __error;
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
1461
2326
|
async getCursorPosition(input, asyncOpts_) {
|
|
1462
2327
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
1463
2328
|
try {
|
|
@@ -1610,16 +2475,801 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1610
2475
|
},
|
|
1611
2476
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
1612
2477
|
}
|
|
1613
|
-
/**
|
|
1614
|
-
* Canonical tool inventory for MCP and other protocol adapters.
|
|
1615
|
-
*/
|
|
1616
|
-
async listToolsJson(asyncOpts_) {
|
|
2478
|
+
/**
|
|
2479
|
+
* Canonical tool inventory for MCP and other protocol adapters.
|
|
2480
|
+
*/
|
|
2481
|
+
async listToolsJson(asyncOpts_) {
|
|
2482
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2483
|
+
try {
|
|
2484
|
+
return await uniffiRustCallAsync(
|
|
2485
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2486
|
+
/*rustFutureFunc:*/ () => {
|
|
2487
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_list_tools_json(uniffiTypeCuaDriverObjectFactory.clonePointer(this));
|
|
2488
|
+
},
|
|
2489
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2490
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2491
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2492
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2493
|
+
// Async returns always go through the JS-side converter: the
|
|
2494
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2495
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2496
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2497
|
+
// here using the per-callable return-type converter.
|
|
2498
|
+
/*liftFunc:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2499
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2500
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2501
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2502
|
+
}
|
|
2503
|
+
catch (__error) {
|
|
2504
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2505
|
+
__error.stack = __stack;
|
|
2506
|
+
}
|
|
2507
|
+
throw __error;
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
async metadata(asyncOpts_) {
|
|
2511
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2512
|
+
try {
|
|
2513
|
+
return await uniffiRustCallAsync(
|
|
2514
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2515
|
+
/*rustFutureFunc:*/ () => {
|
|
2516
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_metadata(uniffiTypeCuaDriverObjectFactory.clonePointer(this));
|
|
2517
|
+
},
|
|
2518
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2519
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2520
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2521
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2522
|
+
// Async returns always go through the JS-side converter: the
|
|
2523
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2524
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2525
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2526
|
+
// here using the per-callable return-type converter.
|
|
2527
|
+
/*liftFunc:*/ FfiConverterTypeDriverMetadata.lift.bind(FfiConverterTypeDriverMetadata),
|
|
2528
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2529
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2530
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2531
|
+
}
|
|
2532
|
+
catch (__error) {
|
|
2533
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2534
|
+
__error.stack = __stack;
|
|
2535
|
+
}
|
|
2536
|
+
throw __error;
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
async moveCursor(input, asyncOpts_) {
|
|
2540
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2541
|
+
try {
|
|
2542
|
+
return await uniffiRustCallAsync(
|
|
2543
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2544
|
+
/*rustFutureFunc:*/ () => {
|
|
2545
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_move_cursor(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeMoveCursorInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2546
|
+
},
|
|
2547
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2548
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2549
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2550
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2551
|
+
// Async returns always go through the JS-side converter: the
|
|
2552
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2553
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2554
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2555
|
+
// here using the per-callable return-type converter.
|
|
2556
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2557
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2558
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2559
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2560
|
+
}
|
|
2561
|
+
catch (__error) {
|
|
2562
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2563
|
+
__error.stack = __stack;
|
|
2564
|
+
}
|
|
2565
|
+
throw __error;
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
async pressKey(input, asyncOpts_) {
|
|
2569
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2570
|
+
try {
|
|
2571
|
+
return await uniffiRustCallAsync(
|
|
2572
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2573
|
+
/*rustFutureFunc:*/ () => {
|
|
2574
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_press_key(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypePressKeyInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2575
|
+
},
|
|
2576
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2577
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2578
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2579
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2580
|
+
// Async returns always go through the JS-side converter: the
|
|
2581
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2582
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2583
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2584
|
+
// here using the per-callable return-type converter.
|
|
2585
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2586
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2587
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2588
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2589
|
+
}
|
|
2590
|
+
catch (__error) {
|
|
2591
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2592
|
+
__error.stack = __stack;
|
|
2593
|
+
}
|
|
2594
|
+
throw __error;
|
|
2595
|
+
}
|
|
2596
|
+
}
|
|
2597
|
+
runtimeScopePrefix() {
|
|
2598
|
+
return ((__rb) => {
|
|
2599
|
+
try {
|
|
2600
|
+
return FfiConverterOptionalString.lift(__rb);
|
|
2601
|
+
}
|
|
2602
|
+
finally {
|
|
2603
|
+
nativeModule().rustbuffer_free(__rb);
|
|
2604
|
+
}
|
|
2605
|
+
})(uniffiCaller.rustCall(
|
|
2606
|
+
/*caller:*/ (callStatus) => {
|
|
2607
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_runtime_scope_prefix(uniffiTypeCuaDriverObjectFactory.clonePointer(this), callStatus);
|
|
2608
|
+
},
|
|
2609
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2610
|
+
}
|
|
2611
|
+
async scroll(input, asyncOpts_) {
|
|
2612
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2613
|
+
try {
|
|
2614
|
+
return await uniffiRustCallAsync(
|
|
2615
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2616
|
+
/*rustFutureFunc:*/ () => {
|
|
2617
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_scroll(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeScrollInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2618
|
+
},
|
|
2619
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2620
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2621
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2622
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2623
|
+
// Async returns always go through the JS-side converter: the
|
|
2624
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2625
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2626
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2627
|
+
// here using the per-callable return-type converter.
|
|
2628
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2629
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2630
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2631
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2632
|
+
}
|
|
2633
|
+
catch (__error) {
|
|
2634
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2635
|
+
__error.stack = __stack;
|
|
2636
|
+
}
|
|
2637
|
+
throw __error;
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
async setAgentCursorEnabled(input, asyncOpts_) {
|
|
2641
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2642
|
+
try {
|
|
2643
|
+
return await uniffiRustCallAsync(
|
|
2644
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2645
|
+
/*rustFutureFunc:*/ () => {
|
|
2646
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_set_agent_cursor_enabled(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeSetAgentCursorEnabledInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2647
|
+
},
|
|
2648
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2649
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2650
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2651
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2652
|
+
// Async returns always go through the JS-side converter: the
|
|
2653
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2654
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2655
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2656
|
+
// here using the per-callable return-type converter.
|
|
2657
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2658
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2659
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2660
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2661
|
+
}
|
|
2662
|
+
catch (__error) {
|
|
2663
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2664
|
+
__error.stack = __stack;
|
|
2665
|
+
}
|
|
2666
|
+
throw __error;
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
async setAgentCursorMotion(input, asyncOpts_) {
|
|
2670
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2671
|
+
try {
|
|
2672
|
+
return await uniffiRustCallAsync(
|
|
2673
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2674
|
+
/*rustFutureFunc:*/ () => {
|
|
2675
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_set_agent_cursor_motion(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeSetAgentCursorMotionInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2676
|
+
},
|
|
2677
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2678
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2679
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2680
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2681
|
+
// Async returns always go through the JS-side converter: the
|
|
2682
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2683
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2684
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2685
|
+
// here using the per-callable return-type converter.
|
|
2686
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2687
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2688
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2689
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2690
|
+
}
|
|
2691
|
+
catch (__error) {
|
|
2692
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2693
|
+
__error.stack = __stack;
|
|
2694
|
+
}
|
|
2695
|
+
throw __error;
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
async setAgentCursorTheme(input, asyncOpts_) {
|
|
2699
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2700
|
+
try {
|
|
2701
|
+
return await uniffiRustCallAsync(
|
|
2702
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2703
|
+
/*rustFutureFunc:*/ () => {
|
|
2704
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_set_agent_cursor_theme(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeSetAgentCursorThemeInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2705
|
+
},
|
|
2706
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2707
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2708
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2709
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2710
|
+
// Async returns always go through the JS-side converter: the
|
|
2711
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2712
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2713
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2714
|
+
// here using the per-callable return-type converter.
|
|
2715
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2716
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2717
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2718
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2719
|
+
}
|
|
2720
|
+
catch (__error) {
|
|
2721
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2722
|
+
__error.stack = __stack;
|
|
2723
|
+
}
|
|
2724
|
+
throw __error;
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
/**
|
|
2728
|
+
* Stop accepting new embedded operations. Repeated calls are harmless;
|
|
2729
|
+
* daemon compatibility clients do not own the daemon and therefore no-op.
|
|
2730
|
+
*/
|
|
2731
|
+
async shutdown(asyncOpts_) {
|
|
2732
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2733
|
+
try {
|
|
2734
|
+
return await uniffiRustCallAsync(
|
|
2735
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2736
|
+
/*rustFutureFunc:*/ () => {
|
|
2737
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_shutdown(uniffiTypeCuaDriverObjectFactory.clonePointer(this));
|
|
2738
|
+
},
|
|
2739
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_void,
|
|
2740
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_void,
|
|
2741
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_void,
|
|
2742
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_void,
|
|
2743
|
+
/*liftFunc:*/ (_v) => { },
|
|
2744
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2745
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2746
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2747
|
+
}
|
|
2748
|
+
catch (__error) {
|
|
2749
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2750
|
+
__error.stack = __stack;
|
|
2751
|
+
}
|
|
2752
|
+
throw __error;
|
|
2753
|
+
}
|
|
2754
|
+
}
|
|
2755
|
+
/**
|
|
2756
|
+
* Compatibility accessor. Embedded runtimes have no socket and return an
|
|
2757
|
+
* empty string; new code should branch on [`Self::execution_mode`].
|
|
2758
|
+
*/
|
|
2759
|
+
socketPath() {
|
|
2760
|
+
return ((__rb) => {
|
|
2761
|
+
try {
|
|
2762
|
+
return FfiConverterString.lift(__rb);
|
|
2763
|
+
}
|
|
2764
|
+
finally {
|
|
2765
|
+
nativeModule().rustbuffer_free(__rb);
|
|
2766
|
+
}
|
|
2767
|
+
})(uniffiCaller.rustCall(
|
|
2768
|
+
/*caller:*/ (callStatus) => {
|
|
2769
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_socket_path(uniffiTypeCuaDriverObjectFactory.clonePointer(this), callStatus);
|
|
2770
|
+
},
|
|
2771
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
2772
|
+
}
|
|
2773
|
+
async startSession(input, asyncOpts_) {
|
|
2774
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2775
|
+
try {
|
|
2776
|
+
return await uniffiRustCallAsync(
|
|
2777
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2778
|
+
/*rustFutureFunc:*/ () => {
|
|
2779
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_start_session(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeStartSessionInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2780
|
+
},
|
|
2781
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2782
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2783
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2784
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2785
|
+
// Async returns always go through the JS-side converter: the
|
|
2786
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2787
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2788
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2789
|
+
// here using the per-callable return-type converter.
|
|
2790
|
+
/*liftFunc:*/ FfiConverterTypeStartSessionOutput.lift.bind(FfiConverterTypeStartSessionOutput),
|
|
2791
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2792
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2793
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2794
|
+
}
|
|
2795
|
+
catch (__error) {
|
|
2796
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2797
|
+
__error.stack = __stack;
|
|
2798
|
+
}
|
|
2799
|
+
throw __error;
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
async typeText(input, asyncOpts_) {
|
|
2803
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2804
|
+
try {
|
|
2805
|
+
return await uniffiRustCallAsync(
|
|
2806
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2807
|
+
/*rustFutureFunc:*/ () => {
|
|
2808
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_type_text(uniffiTypeCuaDriverObjectFactory.clonePointer(this), FfiConverterTypeTypeTextInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2809
|
+
},
|
|
2810
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2811
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2812
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2813
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2814
|
+
// Async returns always go through the JS-side converter: the
|
|
2815
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2816
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2817
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2818
|
+
// here using the per-callable return-type converter.
|
|
2819
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2820
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2821
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2822
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2823
|
+
}
|
|
2824
|
+
catch (__error) {
|
|
2825
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2826
|
+
__error.stack = __stack;
|
|
2827
|
+
}
|
|
2828
|
+
throw __error;
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
uniffiDestroy() {
|
|
2832
|
+
const ptr = this[destructorGuardSymbol];
|
|
2833
|
+
if (ptr !== undefined) {
|
|
2834
|
+
const pointer = uniffiTypeCuaDriverObjectFactory.pointer(this);
|
|
2835
|
+
uniffiTypeCuaDriverObjectFactory.freePointer(pointer);
|
|
2836
|
+
uniffiTypeCuaDriverObjectFactory.unbless(ptr);
|
|
2837
|
+
delete this[destructorGuardSymbol];
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
static instanceOf(obj_) {
|
|
2841
|
+
return uniffiTypeCuaDriverObjectFactory.isConcreteType(obj_);
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
const uniffiTypeCuaDriverObjectFactory = (() => {
|
|
2845
|
+
/// <reference lib="es2021" />
|
|
2846
|
+
const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry((heldValue) => {
|
|
2847
|
+
uniffiTypeCuaDriverObjectFactory.freePointer(heldValue);
|
|
2848
|
+
}) : null;
|
|
2849
|
+
return {
|
|
2850
|
+
create(pointer) {
|
|
2851
|
+
const instance = Object.create(CuaDriver.prototype);
|
|
2852
|
+
instance[pointerLiteralSymbol] = pointer;
|
|
2853
|
+
instance[destructorGuardSymbol] = this.bless(pointer);
|
|
2854
|
+
instance[uniffiTypeNameSymbol] = "CuaDriver";
|
|
2855
|
+
return instance;
|
|
2856
|
+
},
|
|
2857
|
+
bless(p) {
|
|
2858
|
+
const ptr = {
|
|
2859
|
+
p, // make sure this object doesn't get optimized away.
|
|
2860
|
+
markDestroyed: () => undefined,
|
|
2861
|
+
};
|
|
2862
|
+
if (registry) {
|
|
2863
|
+
registry.register(ptr, p, ptr);
|
|
2864
|
+
}
|
|
2865
|
+
return ptr;
|
|
2866
|
+
},
|
|
2867
|
+
unbless(ptr_) {
|
|
2868
|
+
if (registry) {
|
|
2869
|
+
registry.unregister(ptr_);
|
|
2870
|
+
}
|
|
2871
|
+
},
|
|
2872
|
+
pointer(obj_) {
|
|
2873
|
+
if (obj_[destructorGuardSymbol] === undefined) {
|
|
2874
|
+
throw new UniffiInternalError.UnexpectedNullPointer();
|
|
2875
|
+
}
|
|
2876
|
+
return obj_[pointerLiteralSymbol];
|
|
2877
|
+
},
|
|
2878
|
+
clonePointer(obj_) {
|
|
2879
|
+
const pointer = this.pointer(obj_);
|
|
2880
|
+
return uniffiCaller.rustCall(
|
|
2881
|
+
/*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_clone_cuadriver(pointer, callStatus),
|
|
2882
|
+
/*liftString:*/ FfiConverterString.lift);
|
|
2883
|
+
},
|
|
2884
|
+
freePointer(pointer) {
|
|
2885
|
+
uniffiCaller.rustCall(
|
|
2886
|
+
/*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_free_cuadriver(pointer, callStatus),
|
|
2887
|
+
/*liftString:*/ FfiConverterString.lift);
|
|
2888
|
+
},
|
|
2889
|
+
isConcreteType(obj_) {
|
|
2890
|
+
return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "CuaDriver";
|
|
2891
|
+
},
|
|
2892
|
+
};
|
|
2893
|
+
})();
|
|
2894
|
+
const FfiConverterTypeCuaDriver = new FfiConverterObject(uniffiTypeCuaDriverObjectFactory);
|
|
2895
|
+
export class CuaDriverSession extends UniffiAbstractObject {
|
|
2896
|
+
[uniffiTypeNameSymbol] = "CuaDriverSession";
|
|
2897
|
+
[destructorGuardSymbol];
|
|
2898
|
+
[pointerLiteralSymbol];
|
|
2899
|
+
// No primary constructor declared for this class.
|
|
2900
|
+
constructor(pointer) {
|
|
2901
|
+
super();
|
|
2902
|
+
this[pointerLiteralSymbol] = pointer;
|
|
2903
|
+
this[destructorGuardSymbol] = uniffiTypeCuaDriverSessionObjectFactory.bless(pointer);
|
|
2904
|
+
}
|
|
2905
|
+
async callTool(name, argumentsJson, asyncOpts_) {
|
|
2906
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2907
|
+
try {
|
|
2908
|
+
return await uniffiRustCallAsync(
|
|
2909
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2910
|
+
/*rustFutureFunc:*/ () => {
|
|
2911
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_call_tool(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterString.lower(name, nativeModule().rustbuffer_alloc), FfiConverterString.lower(argumentsJson, nativeModule().rustbuffer_alloc));
|
|
2912
|
+
},
|
|
2913
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2914
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2915
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2916
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2917
|
+
// Async returns always go through the JS-side converter: the
|
|
2918
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2919
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2920
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2921
|
+
// here using the per-callable return-type converter.
|
|
2922
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2923
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2924
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2925
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2926
|
+
}
|
|
2927
|
+
catch (__error) {
|
|
2928
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2929
|
+
__error.stack = __stack;
|
|
2930
|
+
}
|
|
2931
|
+
throw __error;
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
async click(input, asyncOpts_) {
|
|
2935
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2936
|
+
try {
|
|
2937
|
+
return await uniffiRustCallAsync(
|
|
2938
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2939
|
+
/*rustFutureFunc:*/ () => {
|
|
2940
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_click(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeClickInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2941
|
+
},
|
|
2942
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2943
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2944
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2945
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2946
|
+
// Async returns always go through the JS-side converter: the
|
|
2947
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2948
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2949
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2950
|
+
// here using the per-callable return-type converter.
|
|
2951
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2952
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2953
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2954
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2955
|
+
}
|
|
2956
|
+
catch (__error) {
|
|
2957
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2958
|
+
__error.stack = __stack;
|
|
2959
|
+
}
|
|
2960
|
+
throw __error;
|
|
2961
|
+
}
|
|
2962
|
+
}
|
|
2963
|
+
/**
|
|
2964
|
+
* Revoke the session-bound authority and release its native handle.
|
|
2965
|
+
*
|
|
2966
|
+
* This operation is idempotent. Dropping the object performs the same
|
|
2967
|
+
* cleanup, but trusted hosts should call it at their lifecycle boundary.
|
|
2968
|
+
*/
|
|
2969
|
+
close() {
|
|
2970
|
+
uniffiCaller.rustCall(
|
|
2971
|
+
/*caller:*/ (callStatus) => {
|
|
2972
|
+
nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_close(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), callStatus);
|
|
2973
|
+
},
|
|
2974
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString));
|
|
2975
|
+
}
|
|
2976
|
+
async drag(input, asyncOpts_) {
|
|
2977
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2978
|
+
try {
|
|
2979
|
+
return await uniffiRustCallAsync(
|
|
2980
|
+
/*rustCaller:*/ uniffiCaller,
|
|
2981
|
+
/*rustFutureFunc:*/ () => {
|
|
2982
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_drag(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeDragInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
2983
|
+
},
|
|
2984
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
2985
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
2986
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
2987
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
2988
|
+
// Async returns always go through the JS-side converter: the
|
|
2989
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2990
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2991
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2992
|
+
// here using the per-callable return-type converter.
|
|
2993
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
2994
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
2995
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
2996
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
2997
|
+
}
|
|
2998
|
+
catch (__error) {
|
|
2999
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3000
|
+
__error.stack = __stack;
|
|
3001
|
+
}
|
|
3002
|
+
throw __error;
|
|
3003
|
+
}
|
|
3004
|
+
}
|
|
3005
|
+
async endSession(input, asyncOpts_) {
|
|
3006
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3007
|
+
try {
|
|
3008
|
+
return await uniffiRustCallAsync(
|
|
3009
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3010
|
+
/*rustFutureFunc:*/ () => {
|
|
3011
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_end_session(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeEndSessionInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3012
|
+
},
|
|
3013
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3014
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3015
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3016
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3017
|
+
// Async returns always go through the JS-side converter: the
|
|
3018
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3019
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3020
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3021
|
+
// here using the per-callable return-type converter.
|
|
3022
|
+
/*liftFunc:*/ FfiConverterTypeEndSessionOutput.lift.bind(FfiConverterTypeEndSessionOutput),
|
|
3023
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3024
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3025
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3026
|
+
}
|
|
3027
|
+
catch (__error) {
|
|
3028
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3029
|
+
__error.stack = __stack;
|
|
3030
|
+
}
|
|
3031
|
+
throw __error;
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
async escalateSession(input, asyncOpts_) {
|
|
3035
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3036
|
+
try {
|
|
3037
|
+
return await uniffiRustCallAsync(
|
|
3038
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3039
|
+
/*rustFutureFunc:*/ () => {
|
|
3040
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_escalate_session(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeEscalateSessionInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3041
|
+
},
|
|
3042
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3043
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3044
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3045
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3046
|
+
// Async returns always go through the JS-side converter: the
|
|
3047
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3048
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3049
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3050
|
+
// here using the per-callable return-type converter.
|
|
3051
|
+
/*liftFunc:*/ FfiConverterTypeSessionStateOutput.lift.bind(FfiConverterTypeSessionStateOutput),
|
|
3052
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3053
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3054
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3055
|
+
}
|
|
3056
|
+
catch (__error) {
|
|
3057
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3058
|
+
__error.stack = __stack;
|
|
3059
|
+
}
|
|
3060
|
+
throw __error;
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
async getAgentCursorState(input, asyncOpts_) {
|
|
3064
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3065
|
+
try {
|
|
3066
|
+
return await uniffiRustCallAsync(
|
|
3067
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3068
|
+
/*rustFutureFunc:*/ () => {
|
|
3069
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_get_agent_cursor_state(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeGetAgentCursorStateInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3070
|
+
},
|
|
3071
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3072
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3073
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3074
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3075
|
+
// Async returns always go through the JS-side converter: the
|
|
3076
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3077
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3078
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3079
|
+
// here using the per-callable return-type converter.
|
|
3080
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3081
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3082
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3083
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3084
|
+
}
|
|
3085
|
+
catch (__error) {
|
|
3086
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3087
|
+
__error.stack = __stack;
|
|
3088
|
+
}
|
|
3089
|
+
throw __error;
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
async getCursorPosition(input, asyncOpts_) {
|
|
3093
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3094
|
+
try {
|
|
3095
|
+
return await uniffiRustCallAsync(
|
|
3096
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3097
|
+
/*rustFutureFunc:*/ () => {
|
|
3098
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_get_cursor_position(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeGetCursorPositionInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3099
|
+
},
|
|
3100
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3101
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3102
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3103
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3104
|
+
// Async returns always go through the JS-side converter: the
|
|
3105
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3106
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3107
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3108
|
+
// here using the per-callable return-type converter.
|
|
3109
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3110
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3111
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3112
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3113
|
+
}
|
|
3114
|
+
catch (__error) {
|
|
3115
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3116
|
+
__error.stack = __stack;
|
|
3117
|
+
}
|
|
3118
|
+
throw __error;
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
3121
|
+
async getDesktopState(input, asyncOpts_) {
|
|
3122
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3123
|
+
try {
|
|
3124
|
+
return await uniffiRustCallAsync(
|
|
3125
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3126
|
+
/*rustFutureFunc:*/ () => {
|
|
3127
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_get_desktop_state(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeGetDesktopStateInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3128
|
+
},
|
|
3129
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3130
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3131
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3132
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3133
|
+
// Async returns always go through the JS-side converter: the
|
|
3134
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3135
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3136
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3137
|
+
// here using the per-callable return-type converter.
|
|
3138
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3139
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3140
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3141
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3142
|
+
}
|
|
3143
|
+
catch (__error) {
|
|
3144
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3145
|
+
__error.stack = __stack;
|
|
3146
|
+
}
|
|
3147
|
+
throw __error;
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
async getScreenSize(input, asyncOpts_) {
|
|
3151
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3152
|
+
try {
|
|
3153
|
+
return await uniffiRustCallAsync(
|
|
3154
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3155
|
+
/*rustFutureFunc:*/ () => {
|
|
3156
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_get_screen_size(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeGetScreenSizeInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3157
|
+
},
|
|
3158
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3159
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3160
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3161
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3162
|
+
// Async returns always go through the JS-side converter: the
|
|
3163
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3164
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3165
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3166
|
+
// here using the per-callable return-type converter.
|
|
3167
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3168
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3169
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3170
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3171
|
+
}
|
|
3172
|
+
catch (__error) {
|
|
3173
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3174
|
+
__error.stack = __stack;
|
|
3175
|
+
}
|
|
3176
|
+
throw __error;
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
async getSessionState(input, asyncOpts_) {
|
|
3180
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3181
|
+
try {
|
|
3182
|
+
return await uniffiRustCallAsync(
|
|
3183
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3184
|
+
/*rustFutureFunc:*/ () => {
|
|
3185
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_get_session_state(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeGetSessionStateInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3186
|
+
},
|
|
3187
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3188
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3189
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3190
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3191
|
+
// Async returns always go through the JS-side converter: the
|
|
3192
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3193
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3194
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3195
|
+
// here using the per-callable return-type converter.
|
|
3196
|
+
/*liftFunc:*/ FfiConverterTypeSessionStateOutput.lift.bind(FfiConverterTypeSessionStateOutput),
|
|
3197
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3198
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3199
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3200
|
+
}
|
|
3201
|
+
catch (__error) {
|
|
3202
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3203
|
+
__error.stack = __stack;
|
|
3204
|
+
}
|
|
3205
|
+
throw __error;
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
async hotkey(input, asyncOpts_) {
|
|
3209
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3210
|
+
try {
|
|
3211
|
+
return await uniffiRustCallAsync(
|
|
3212
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3213
|
+
/*rustFutureFunc:*/ () => {
|
|
3214
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_hotkey(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeHotkeyInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3215
|
+
},
|
|
3216
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3217
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3218
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3219
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3220
|
+
// Async returns always go through the JS-side converter: the
|
|
3221
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3222
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3223
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3224
|
+
// here using the per-callable return-type converter.
|
|
3225
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3226
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3227
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3228
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3229
|
+
}
|
|
3230
|
+
catch (__error) {
|
|
3231
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3232
|
+
__error.stack = __stack;
|
|
3233
|
+
}
|
|
3234
|
+
throw __error;
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
async moveCursor(input, asyncOpts_) {
|
|
3238
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3239
|
+
try {
|
|
3240
|
+
return await uniffiRustCallAsync(
|
|
3241
|
+
/*rustCaller:*/ uniffiCaller,
|
|
3242
|
+
/*rustFutureFunc:*/ () => {
|
|
3243
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_move_cursor(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeMoveCursorInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
3244
|
+
},
|
|
3245
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3246
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3247
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3248
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3249
|
+
// Async returns always go through the JS-side converter: the
|
|
3250
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3251
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3252
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3253
|
+
// here using the per-callable return-type converter.
|
|
3254
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
3255
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
3256
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
3257
|
+
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
3258
|
+
}
|
|
3259
|
+
catch (__error) {
|
|
3260
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3261
|
+
__error.stack = __stack;
|
|
3262
|
+
}
|
|
3263
|
+
throw __error;
|
|
3264
|
+
}
|
|
3265
|
+
}
|
|
3266
|
+
async pressKey(input, asyncOpts_) {
|
|
1617
3267
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
1618
3268
|
try {
|
|
1619
3269
|
return await uniffiRustCallAsync(
|
|
1620
3270
|
/*rustCaller:*/ uniffiCaller,
|
|
1621
3271
|
/*rustFutureFunc:*/ () => {
|
|
1622
|
-
return nativeModule().
|
|
3272
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_press_key(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypePressKeyInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
1623
3273
|
},
|
|
1624
3274
|
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
1625
3275
|
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
@@ -1630,7 +3280,7 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1630
3280
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1631
3281
|
// export. The bytes the runtime hands back must be deserialized
|
|
1632
3282
|
// here using the per-callable return-type converter.
|
|
1633
|
-
/*liftFunc:*/
|
|
3283
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
1634
3284
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
1635
3285
|
/*asyncOpts:*/ asyncOpts_,
|
|
1636
3286
|
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
@@ -1642,13 +3292,13 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1642
3292
|
throw __error;
|
|
1643
3293
|
}
|
|
1644
3294
|
}
|
|
1645
|
-
async
|
|
3295
|
+
async scroll(input, asyncOpts_) {
|
|
1646
3296
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
1647
3297
|
try {
|
|
1648
3298
|
return await uniffiRustCallAsync(
|
|
1649
3299
|
/*rustCaller:*/ uniffiCaller,
|
|
1650
3300
|
/*rustFutureFunc:*/ () => {
|
|
1651
|
-
return nativeModule().
|
|
3301
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_scroll(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeScrollInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
1652
3302
|
},
|
|
1653
3303
|
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
1654
3304
|
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
@@ -1659,7 +3309,7 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1659
3309
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1660
3310
|
// export. The bytes the runtime hands back must be deserialized
|
|
1661
3311
|
// here using the per-callable return-type converter.
|
|
1662
|
-
/*liftFunc:*/
|
|
3312
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
1663
3313
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
1664
3314
|
/*asyncOpts:*/ asyncOpts_,
|
|
1665
3315
|
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
@@ -1671,13 +3321,13 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1671
3321
|
throw __error;
|
|
1672
3322
|
}
|
|
1673
3323
|
}
|
|
1674
|
-
async
|
|
3324
|
+
async setAgentCursorEnabled(input, asyncOpts_) {
|
|
1675
3325
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
1676
3326
|
try {
|
|
1677
3327
|
return await uniffiRustCallAsync(
|
|
1678
3328
|
/*rustCaller:*/ uniffiCaller,
|
|
1679
3329
|
/*rustFutureFunc:*/ () => {
|
|
1680
|
-
return nativeModule().
|
|
3330
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_set_agent_cursor_enabled(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeSetAgentCursorEnabledInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
1681
3331
|
},
|
|
1682
3332
|
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
1683
3333
|
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
@@ -1700,13 +3350,13 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1700
3350
|
throw __error;
|
|
1701
3351
|
}
|
|
1702
3352
|
}
|
|
1703
|
-
async
|
|
3353
|
+
async setAgentCursorMotion(input, asyncOpts_) {
|
|
1704
3354
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
1705
3355
|
try {
|
|
1706
3356
|
return await uniffiRustCallAsync(
|
|
1707
3357
|
/*rustCaller:*/ uniffiCaller,
|
|
1708
3358
|
/*rustFutureFunc:*/ () => {
|
|
1709
|
-
return nativeModule().
|
|
3359
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_set_agent_cursor_motion(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeSetAgentCursorMotionInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
1710
3360
|
},
|
|
1711
3361
|
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
1712
3362
|
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
@@ -1729,13 +3379,13 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1729
3379
|
throw __error;
|
|
1730
3380
|
}
|
|
1731
3381
|
}
|
|
1732
|
-
async
|
|
3382
|
+
async setAgentCursorTheme(input, asyncOpts_) {
|
|
1733
3383
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
1734
3384
|
try {
|
|
1735
3385
|
return await uniffiRustCallAsync(
|
|
1736
3386
|
/*rustCaller:*/ uniffiCaller,
|
|
1737
3387
|
/*rustFutureFunc:*/ () => {
|
|
1738
|
-
return nativeModule().
|
|
3388
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_set_agent_cursor_theme(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeSetAgentCursorThemeInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
1739
3389
|
},
|
|
1740
3390
|
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
1741
3391
|
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
@@ -1758,23 +3408,24 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1758
3408
|
throw __error;
|
|
1759
3409
|
}
|
|
1760
3410
|
}
|
|
1761
|
-
|
|
1762
|
-
* Stop accepting new embedded operations. Repeated calls are harmless;
|
|
1763
|
-
* daemon compatibility clients do not own the daemon and therefore no-op.
|
|
1764
|
-
*/
|
|
1765
|
-
async shutdown(asyncOpts_) {
|
|
3411
|
+
async startSession(input, asyncOpts_) {
|
|
1766
3412
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
1767
3413
|
try {
|
|
1768
3414
|
return await uniffiRustCallAsync(
|
|
1769
3415
|
/*rustCaller:*/ uniffiCaller,
|
|
1770
3416
|
/*rustFutureFunc:*/ () => {
|
|
1771
|
-
return nativeModule().
|
|
3417
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_start_session(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeStartSessionInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
1772
3418
|
},
|
|
1773
|
-
/*pollFunc:*/ nativeModule().
|
|
1774
|
-
/*cancelFunc:*/ nativeModule().
|
|
1775
|
-
/*completeFunc:*/ nativeModule().
|
|
1776
|
-
/*freeFunc:*/ nativeModule().
|
|
1777
|
-
|
|
3419
|
+
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
3420
|
+
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
3421
|
+
/*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
|
|
3422
|
+
/*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
|
|
3423
|
+
// Async returns always go through the JS-side converter: the
|
|
3424
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
3425
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
3426
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
3427
|
+
// here using the per-callable return-type converter.
|
|
3428
|
+
/*liftFunc:*/ FfiConverterTypeStartSessionOutput.lift.bind(FfiConverterTypeStartSessionOutput),
|
|
1778
3429
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
1779
3430
|
/*asyncOpts:*/ asyncOpts_,
|
|
1780
3431
|
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
@@ -1786,31 +3437,13 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1786
3437
|
throw __error;
|
|
1787
3438
|
}
|
|
1788
3439
|
}
|
|
1789
|
-
|
|
1790
|
-
* Compatibility accessor. Embedded runtimes have no socket and return an
|
|
1791
|
-
* empty string; new code should branch on [`Self::execution_mode`].
|
|
1792
|
-
*/
|
|
1793
|
-
socketPath() {
|
|
1794
|
-
return ((__rb) => {
|
|
1795
|
-
try {
|
|
1796
|
-
return FfiConverterString.lift(__rb);
|
|
1797
|
-
}
|
|
1798
|
-
finally {
|
|
1799
|
-
nativeModule().rustbuffer_free(__rb);
|
|
1800
|
-
}
|
|
1801
|
-
})(uniffiCaller.rustCall(
|
|
1802
|
-
/*caller:*/ (callStatus) => {
|
|
1803
|
-
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriver_socket_path(uniffiTypeCuaDriverObjectFactory.clonePointer(this), callStatus);
|
|
1804
|
-
},
|
|
1805
|
-
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
1806
|
-
}
|
|
1807
|
-
async startSession(input, asyncOpts_) {
|
|
3440
|
+
async typeText(input, asyncOpts_) {
|
|
1808
3441
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
1809
3442
|
try {
|
|
1810
3443
|
return await uniffiRustCallAsync(
|
|
1811
3444
|
/*rustCaller:*/ uniffiCaller,
|
|
1812
3445
|
/*rustFutureFunc:*/ () => {
|
|
1813
|
-
return nativeModule().
|
|
3446
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cuadriversession_type_text(uniffiTypeCuaDriverSessionObjectFactory.clonePointer(this), FfiConverterTypeTypeTextInput.lower(input, nativeModule().rustbuffer_alloc));
|
|
1814
3447
|
},
|
|
1815
3448
|
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
1816
3449
|
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
@@ -1821,7 +3454,7 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1821
3454
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1822
3455
|
// export. The bytes the runtime hands back must be deserialized
|
|
1823
3456
|
// here using the per-callable return-type converter.
|
|
1824
|
-
/*liftFunc:*/
|
|
3457
|
+
/*liftFunc:*/ FfiConverterTypeToolResult.lift.bind(FfiConverterTypeToolResult),
|
|
1825
3458
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
1826
3459
|
/*asyncOpts:*/ asyncOpts_,
|
|
1827
3460
|
/*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
|
|
@@ -1833,13 +3466,217 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1833
3466
|
throw __error;
|
|
1834
3467
|
}
|
|
1835
3468
|
}
|
|
1836
|
-
|
|
3469
|
+
uniffiDestroy() {
|
|
3470
|
+
const ptr = this[destructorGuardSymbol];
|
|
3471
|
+
if (ptr !== undefined) {
|
|
3472
|
+
const pointer = uniffiTypeCuaDriverSessionObjectFactory.pointer(this);
|
|
3473
|
+
uniffiTypeCuaDriverSessionObjectFactory.freePointer(pointer);
|
|
3474
|
+
uniffiTypeCuaDriverSessionObjectFactory.unbless(ptr);
|
|
3475
|
+
delete this[destructorGuardSymbol];
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
3478
|
+
static instanceOf(obj_) {
|
|
3479
|
+
return uniffiTypeCuaDriverSessionObjectFactory.isConcreteType(obj_);
|
|
3480
|
+
}
|
|
3481
|
+
}
|
|
3482
|
+
const uniffiTypeCuaDriverSessionObjectFactory = (() => {
|
|
3483
|
+
/// <reference lib="es2021" />
|
|
3484
|
+
const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry((heldValue) => {
|
|
3485
|
+
uniffiTypeCuaDriverSessionObjectFactory.freePointer(heldValue);
|
|
3486
|
+
}) : null;
|
|
3487
|
+
return {
|
|
3488
|
+
create(pointer) {
|
|
3489
|
+
const instance = Object.create(CuaDriverSession.prototype);
|
|
3490
|
+
instance[pointerLiteralSymbol] = pointer;
|
|
3491
|
+
instance[destructorGuardSymbol] = this.bless(pointer);
|
|
3492
|
+
instance[uniffiTypeNameSymbol] = "CuaDriverSession";
|
|
3493
|
+
return instance;
|
|
3494
|
+
},
|
|
3495
|
+
bless(p) {
|
|
3496
|
+
const ptr = {
|
|
3497
|
+
p, // make sure this object doesn't get optimized away.
|
|
3498
|
+
markDestroyed: () => undefined,
|
|
3499
|
+
};
|
|
3500
|
+
if (registry) {
|
|
3501
|
+
registry.register(ptr, p, ptr);
|
|
3502
|
+
}
|
|
3503
|
+
return ptr;
|
|
3504
|
+
},
|
|
3505
|
+
unbless(ptr_) {
|
|
3506
|
+
if (registry) {
|
|
3507
|
+
registry.unregister(ptr_);
|
|
3508
|
+
}
|
|
3509
|
+
},
|
|
3510
|
+
pointer(obj_) {
|
|
3511
|
+
if (obj_[destructorGuardSymbol] === undefined) {
|
|
3512
|
+
throw new UniffiInternalError.UnexpectedNullPointer();
|
|
3513
|
+
}
|
|
3514
|
+
return obj_[pointerLiteralSymbol];
|
|
3515
|
+
},
|
|
3516
|
+
clonePointer(obj_) {
|
|
3517
|
+
const pointer = this.pointer(obj_);
|
|
3518
|
+
return uniffiCaller.rustCall(
|
|
3519
|
+
/*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_clone_cuadriversession(pointer, callStatus),
|
|
3520
|
+
/*liftString:*/ FfiConverterString.lift);
|
|
3521
|
+
},
|
|
3522
|
+
freePointer(pointer) {
|
|
3523
|
+
uniffiCaller.rustCall(
|
|
3524
|
+
/*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_free_cuadriversession(pointer, callStatus),
|
|
3525
|
+
/*liftString:*/ FfiConverterString.lift);
|
|
3526
|
+
},
|
|
3527
|
+
isConcreteType(obj_) {
|
|
3528
|
+
return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "CuaDriverSession";
|
|
3529
|
+
},
|
|
3530
|
+
};
|
|
3531
|
+
})();
|
|
3532
|
+
const FfiConverterTypeCuaDriverSession = new FfiConverterObject(uniffiTypeCuaDriverSessionObjectFactory);
|
|
3533
|
+
/**
|
|
3534
|
+
* Optional observer implemented by trusted embedding-host code.
|
|
3535
|
+
*
|
|
3536
|
+
* Observations are informational and cannot grant authority or change a tool
|
|
3537
|
+
* result. Implementations should return quickly and hand off expensive work.
|
|
3538
|
+
*/
|
|
3539
|
+
export class DriverActivityObserverImpl extends UniffiAbstractObject {
|
|
3540
|
+
[uniffiTypeNameSymbol] = "DriverActivityObserverImpl";
|
|
3541
|
+
[destructorGuardSymbol];
|
|
3542
|
+
[pointerLiteralSymbol];
|
|
3543
|
+
// No primary constructor declared for this class.
|
|
3544
|
+
constructor(pointer) {
|
|
3545
|
+
super();
|
|
3546
|
+
this[pointerLiteralSymbol] = pointer;
|
|
3547
|
+
this[destructorGuardSymbol] = uniffiTypeDriverActivityObserverImplObjectFactory.bless(pointer);
|
|
3548
|
+
}
|
|
3549
|
+
onActivity(event) {
|
|
3550
|
+
uniffiCaller.rustCall(
|
|
3551
|
+
/*caller:*/ (callStatus) => {
|
|
3552
|
+
nativeModule().uniffi_cua_driver_sdk_fn_method_driveractivityobserver_on_activity(uniffiTypeDriverActivityObserverImplObjectFactory.clonePointer(this), FfiConverterTypeDriverActivityEvent.lower(event, nativeModule().rustbuffer_alloc), callStatus);
|
|
3553
|
+
},
|
|
3554
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString));
|
|
3555
|
+
}
|
|
3556
|
+
uniffiDestroy() {
|
|
3557
|
+
const ptr = this[destructorGuardSymbol];
|
|
3558
|
+
if (ptr !== undefined) {
|
|
3559
|
+
const pointer = uniffiTypeDriverActivityObserverImplObjectFactory.pointer(this);
|
|
3560
|
+
uniffiTypeDriverActivityObserverImplObjectFactory.freePointer(pointer);
|
|
3561
|
+
uniffiTypeDriverActivityObserverImplObjectFactory.unbless(ptr);
|
|
3562
|
+
delete this[destructorGuardSymbol];
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
static instanceOf(obj_) {
|
|
3566
|
+
return uniffiTypeDriverActivityObserverImplObjectFactory.isConcreteType(obj_);
|
|
3567
|
+
}
|
|
3568
|
+
}
|
|
3569
|
+
const uniffiTypeDriverActivityObserverImplObjectFactory = (() => {
|
|
3570
|
+
/// <reference lib="es2021" />
|
|
3571
|
+
const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry((heldValue) => {
|
|
3572
|
+
uniffiTypeDriverActivityObserverImplObjectFactory.freePointer(heldValue);
|
|
3573
|
+
}) : null;
|
|
3574
|
+
return {
|
|
3575
|
+
create(pointer) {
|
|
3576
|
+
const instance = Object.create(DriverActivityObserverImpl.prototype);
|
|
3577
|
+
instance[pointerLiteralSymbol] = pointer;
|
|
3578
|
+
instance[destructorGuardSymbol] = this.bless(pointer);
|
|
3579
|
+
instance[uniffiTypeNameSymbol] = "DriverActivityObserverImpl";
|
|
3580
|
+
return instance;
|
|
3581
|
+
},
|
|
3582
|
+
bless(p) {
|
|
3583
|
+
const ptr = {
|
|
3584
|
+
p, // make sure this object doesn't get optimized away.
|
|
3585
|
+
markDestroyed: () => undefined,
|
|
3586
|
+
};
|
|
3587
|
+
if (registry) {
|
|
3588
|
+
registry.register(ptr, p, ptr);
|
|
3589
|
+
}
|
|
3590
|
+
return ptr;
|
|
3591
|
+
},
|
|
3592
|
+
unbless(ptr_) {
|
|
3593
|
+
if (registry) {
|
|
3594
|
+
registry.unregister(ptr_);
|
|
3595
|
+
}
|
|
3596
|
+
},
|
|
3597
|
+
pointer(obj_) {
|
|
3598
|
+
if (obj_[destructorGuardSymbol] === undefined) {
|
|
3599
|
+
throw new UniffiInternalError.UnexpectedNullPointer();
|
|
3600
|
+
}
|
|
3601
|
+
return obj_[pointerLiteralSymbol];
|
|
3602
|
+
},
|
|
3603
|
+
clonePointer(obj_) {
|
|
3604
|
+
const pointer = this.pointer(obj_);
|
|
3605
|
+
return uniffiCaller.rustCall(
|
|
3606
|
+
/*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_clone_driveractivityobserver(pointer, callStatus),
|
|
3607
|
+
/*liftString:*/ FfiConverterString.lift);
|
|
3608
|
+
},
|
|
3609
|
+
freePointer(pointer) {
|
|
3610
|
+
uniffiCaller.rustCall(
|
|
3611
|
+
/*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_free_driveractivityobserver(pointer, callStatus),
|
|
3612
|
+
/*liftString:*/ FfiConverterString.lift);
|
|
3613
|
+
},
|
|
3614
|
+
isConcreteType(obj_) {
|
|
3615
|
+
return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "DriverActivityObserverImpl";
|
|
3616
|
+
},
|
|
3617
|
+
};
|
|
3618
|
+
})();
|
|
3619
|
+
const FfiConverterTypeDriverActivityObserver = new FfiConverterObjectWithCallbacks(uniffiTypeDriverActivityObserverImplObjectFactory);
|
|
3620
|
+
// Add a vtable for the callbacks that go in DriverActivityObserver.
|
|
3621
|
+
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
3622
|
+
const uniffiCallbackInterfaceDriverActivityObserver = {
|
|
3623
|
+
// Create the VTable using a series of closures.
|
|
3624
|
+
// ts automatically converts these into C callback functions.
|
|
3625
|
+
vtable: {
|
|
3626
|
+
on_activity: (uniffiHandle, event) => {
|
|
3627
|
+
const uniffiMakeCall = () => {
|
|
3628
|
+
const jsCallback = FfiConverterTypeDriverActivityObserver.lift(uniffiHandle);
|
|
3629
|
+
return jsCallback.onActivity(FfiConverterTypeDriverActivityEvent.lift(event));
|
|
3630
|
+
};
|
|
3631
|
+
const uniffiResult = UniffiResult.ready();
|
|
3632
|
+
const uniffiHandleSuccess = (obj) => { };
|
|
3633
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
3634
|
+
UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
3635
|
+
};
|
|
3636
|
+
uniffiTraitInterfaceCall(
|
|
3637
|
+
/*makeCall:*/ uniffiMakeCall,
|
|
3638
|
+
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
3639
|
+
/*handleError:*/ uniffiHandleError,
|
|
3640
|
+
/*lowerString:*/ FfiConverterString.lower.bind(FfiConverterString),
|
|
3641
|
+
/*alloc:*/ nativeModule().rustbuffer_alloc);
|
|
3642
|
+
return uniffiResult;
|
|
3643
|
+
},
|
|
3644
|
+
uniffi_free: (uniffiHandle) => {
|
|
3645
|
+
// this will throw a stale handle error if the handle isn't found.
|
|
3646
|
+
FfiConverterTypeDriverActivityObserver.drop(uniffiHandle);
|
|
3647
|
+
},
|
|
3648
|
+
uniffi_clone: (uniffiHandle) => {
|
|
3649
|
+
return FfiConverterTypeDriverActivityObserver.clone(uniffiHandle);
|
|
3650
|
+
}
|
|
3651
|
+
},
|
|
3652
|
+
register: () => {
|
|
3653
|
+
nativeModule().uniffi_cua_driver_sdk_fn_init_callback_vtable_driveractivityobserver(uniffiCallbackInterfaceDriverActivityObserver.vtable);
|
|
3654
|
+
},
|
|
3655
|
+
};
|
|
3656
|
+
/**
|
|
3657
|
+
* Optional callback implemented by a trusted embedding application.
|
|
3658
|
+
*
|
|
3659
|
+
* Cua invokes this only for a residual boundary whose active permission mode
|
|
3660
|
+
* requires a host grant. Routine standard-mode automation and every
|
|
3661
|
+
* in-manifest bounded operation bypass it.
|
|
3662
|
+
*/
|
|
3663
|
+
export class DriverAuthorizationHostImpl extends UniffiAbstractObject {
|
|
3664
|
+
[uniffiTypeNameSymbol] = "DriverAuthorizationHostImpl";
|
|
3665
|
+
[destructorGuardSymbol];
|
|
3666
|
+
[pointerLiteralSymbol];
|
|
3667
|
+
// No primary constructor declared for this class.
|
|
3668
|
+
constructor(pointer) {
|
|
3669
|
+
super();
|
|
3670
|
+
this[pointerLiteralSymbol] = pointer;
|
|
3671
|
+
this[destructorGuardSymbol] = uniffiTypeDriverAuthorizationHostImplObjectFactory.bless(pointer);
|
|
3672
|
+
}
|
|
3673
|
+
async authorize(request, asyncOpts_) {
|
|
1837
3674
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
1838
3675
|
try {
|
|
1839
3676
|
return await uniffiRustCallAsync(
|
|
1840
3677
|
/*rustCaller:*/ uniffiCaller,
|
|
1841
3678
|
/*rustFutureFunc:*/ () => {
|
|
1842
|
-
return nativeModule().
|
|
3679
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_driverauthorizationhost_authorize(uniffiTypeDriverAuthorizationHostImplObjectFactory.clonePointer(this), FfiConverterTypeDriverAuthorizationRequest.lower(request, nativeModule().rustbuffer_alloc));
|
|
1843
3680
|
},
|
|
1844
3681
|
/*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
|
|
1845
3682
|
/*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
|
|
@@ -1850,10 +3687,10 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1850
3687
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1851
3688
|
// export. The bytes the runtime hands back must be deserialized
|
|
1852
3689
|
// here using the per-callable return-type converter.
|
|
1853
|
-
/*liftFunc:*/
|
|
3690
|
+
/*liftFunc:*/ FfiConverterTypeDriverAuthorizationDecision.lift.bind(FfiConverterTypeDriverAuthorizationDecision),
|
|
1854
3691
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
|
|
1855
3692
|
/*asyncOpts:*/ asyncOpts_,
|
|
1856
|
-
/*errorHandler:*/
|
|
3693
|
+
/*errorHandler:*/ FfiConverterTypeDriverAuthorizationHostError.lift.bind(FfiConverterTypeDriverAuthorizationHostError));
|
|
1857
3694
|
}
|
|
1858
3695
|
catch (__error) {
|
|
1859
3696
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
@@ -1865,27 +3702,27 @@ export class CuaDriver extends UniffiAbstractObject {
|
|
|
1865
3702
|
uniffiDestroy() {
|
|
1866
3703
|
const ptr = this[destructorGuardSymbol];
|
|
1867
3704
|
if (ptr !== undefined) {
|
|
1868
|
-
const pointer =
|
|
1869
|
-
|
|
1870
|
-
|
|
3705
|
+
const pointer = uniffiTypeDriverAuthorizationHostImplObjectFactory.pointer(this);
|
|
3706
|
+
uniffiTypeDriverAuthorizationHostImplObjectFactory.freePointer(pointer);
|
|
3707
|
+
uniffiTypeDriverAuthorizationHostImplObjectFactory.unbless(ptr);
|
|
1871
3708
|
delete this[destructorGuardSymbol];
|
|
1872
3709
|
}
|
|
1873
3710
|
}
|
|
1874
3711
|
static instanceOf(obj_) {
|
|
1875
|
-
return
|
|
3712
|
+
return uniffiTypeDriverAuthorizationHostImplObjectFactory.isConcreteType(obj_);
|
|
1876
3713
|
}
|
|
1877
3714
|
}
|
|
1878
|
-
const
|
|
3715
|
+
const uniffiTypeDriverAuthorizationHostImplObjectFactory = (() => {
|
|
1879
3716
|
/// <reference lib="es2021" />
|
|
1880
3717
|
const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry((heldValue) => {
|
|
1881
|
-
|
|
3718
|
+
uniffiTypeDriverAuthorizationHostImplObjectFactory.freePointer(heldValue);
|
|
1882
3719
|
}) : null;
|
|
1883
3720
|
return {
|
|
1884
3721
|
create(pointer) {
|
|
1885
|
-
const instance = Object.create(
|
|
3722
|
+
const instance = Object.create(DriverAuthorizationHostImpl.prototype);
|
|
1886
3723
|
instance[pointerLiteralSymbol] = pointer;
|
|
1887
3724
|
instance[destructorGuardSymbol] = this.bless(pointer);
|
|
1888
|
-
instance[uniffiTypeNameSymbol] = "
|
|
3725
|
+
instance[uniffiTypeNameSymbol] = "DriverAuthorizationHostImpl";
|
|
1889
3726
|
return instance;
|
|
1890
3727
|
},
|
|
1891
3728
|
bless(p) {
|
|
@@ -1912,20 +3749,68 @@ const uniffiTypeCuaDriverObjectFactory = (() => {
|
|
|
1912
3749
|
clonePointer(obj_) {
|
|
1913
3750
|
const pointer = this.pointer(obj_);
|
|
1914
3751
|
return uniffiCaller.rustCall(
|
|
1915
|
-
/*caller:*/ (callStatus) => nativeModule().
|
|
3752
|
+
/*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_clone_driverauthorizationhost(pointer, callStatus),
|
|
1916
3753
|
/*liftString:*/ FfiConverterString.lift);
|
|
1917
3754
|
},
|
|
1918
3755
|
freePointer(pointer) {
|
|
1919
3756
|
uniffiCaller.rustCall(
|
|
1920
|
-
/*caller:*/ (callStatus) => nativeModule().
|
|
3757
|
+
/*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_free_driverauthorizationhost(pointer, callStatus),
|
|
1921
3758
|
/*liftString:*/ FfiConverterString.lift);
|
|
1922
3759
|
},
|
|
1923
3760
|
isConcreteType(obj_) {
|
|
1924
|
-
return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "
|
|
3761
|
+
return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "DriverAuthorizationHostImpl";
|
|
1925
3762
|
},
|
|
1926
3763
|
};
|
|
1927
3764
|
})();
|
|
1928
|
-
const
|
|
3765
|
+
const FfiConverterTypeDriverAuthorizationHost = new FfiConverterObjectWithCallbacks(uniffiTypeDriverAuthorizationHostImplObjectFactory);
|
|
3766
|
+
// Add a vtable for the callbacks that go in DriverAuthorizationHost.
|
|
3767
|
+
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
3768
|
+
const uniffiCallbackInterfaceDriverAuthorizationHost = {
|
|
3769
|
+
// Create the VTable using a series of closures.
|
|
3770
|
+
// ts automatically converts these into C callback functions.
|
|
3771
|
+
vtable: {
|
|
3772
|
+
authorize: (uniffiHandle, request, uniffiFutureCallback, uniffiCallbackData) => {
|
|
3773
|
+
const uniffiMakeCall = async (signal) => {
|
|
3774
|
+
const jsCallback = FfiConverterTypeDriverAuthorizationHost.lift(uniffiHandle);
|
|
3775
|
+
return await jsCallback.authorize(FfiConverterTypeDriverAuthorizationRequest.lift(request), { signal });
|
|
3776
|
+
};
|
|
3777
|
+
const uniffiHandleSuccess = (returnValue) => {
|
|
3778
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
|
|
3779
|
+
/* UniffiForeignFutureResultRustBuffer */ {
|
|
3780
|
+
return_value: FfiConverterTypeDriverAuthorizationDecision.lower(returnValue, nativeModule().rustbuffer_alloc),
|
|
3781
|
+
call_status: uniffiCaller.createCallStatus()
|
|
3782
|
+
});
|
|
3783
|
+
};
|
|
3784
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
3785
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
|
|
3786
|
+
/* UniffiForeignFutureResultRustBuffer */ {
|
|
3787
|
+
return_value: /*empty*/ new Uint8Array(0),
|
|
3788
|
+
// TODO create callstatus with error.
|
|
3789
|
+
call_status: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
3790
|
+
});
|
|
3791
|
+
};
|
|
3792
|
+
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
3793
|
+
/*makeCall:*/ uniffiMakeCall,
|
|
3794
|
+
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
3795
|
+
/*handleError:*/ uniffiHandleError,
|
|
3796
|
+
/*isErrorType:*/ DriverAuthorizationHostError.instanceOf,
|
|
3797
|
+
/*lowerError:*/ FfiConverterTypeDriverAuthorizationHostError.lower.bind(FfiConverterTypeDriverAuthorizationHostError),
|
|
3798
|
+
/*lowerString:*/ FfiConverterString.lower.bind(FfiConverterString),
|
|
3799
|
+
/*alloc:*/ nativeModule().rustbuffer_alloc);
|
|
3800
|
+
return uniffiForeignFuture;
|
|
3801
|
+
},
|
|
3802
|
+
uniffi_free: (uniffiHandle) => {
|
|
3803
|
+
// this will throw a stale handle error if the handle isn't found.
|
|
3804
|
+
FfiConverterTypeDriverAuthorizationHost.drop(uniffiHandle);
|
|
3805
|
+
},
|
|
3806
|
+
uniffi_clone: (uniffiHandle) => {
|
|
3807
|
+
return FfiConverterTypeDriverAuthorizationHost.clone(uniffiHandle);
|
|
3808
|
+
}
|
|
3809
|
+
},
|
|
3810
|
+
register: () => {
|
|
3811
|
+
nativeModule().uniffi_cua_driver_sdk_fn_init_callback_vtable_driverauthorizationhost(uniffiCallbackInterfaceDriverAuthorizationHost.vtable);
|
|
3812
|
+
},
|
|
3813
|
+
};
|
|
1929
3814
|
export class EmbeddedCuaDriverHost extends UniffiAbstractObject {
|
|
1930
3815
|
[uniffiTypeNameSymbol] = "EmbeddedCuaDriverHost";
|
|
1931
3816
|
[destructorGuardSymbol];
|
|
@@ -2152,6 +4037,8 @@ const uniffiTypeEmbeddedCuaDriverHostObjectFactory = (() => {
|
|
|
2152
4037
|
};
|
|
2153
4038
|
})();
|
|
2154
4039
|
const FfiConverterTypeEmbeddedCuaDriverHost = new FfiConverterObject(uniffiTypeEmbeddedCuaDriverHostObjectFactory);
|
|
4040
|
+
// FfiConverter for Array<SessionPermissionMode>
|
|
4041
|
+
const FfiConverterSequenceTypeSessionPermissionMode = new FfiConverterArray(FfiConverterTypeSessionPermissionMode);
|
|
2155
4042
|
// FfiConverter for string | undefined
|
|
2156
4043
|
const FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
|
|
2157
4044
|
// FfiConverter for Array<string>
|
|
@@ -2190,6 +4077,9 @@ function uniffiEnsureInitialized() {
|
|
|
2190
4077
|
if (bindingsContractVersion !== scaffoldingContractVersion) {
|
|
2191
4078
|
throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
|
|
2192
4079
|
}
|
|
4080
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_create_trusted_session() !== 50573) {
|
|
4081
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_create_trusted_session");
|
|
4082
|
+
}
|
|
2193
4083
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_current_mac_os_permission_status() !== 22890) {
|
|
2194
4084
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_current_mac_os_permission_status");
|
|
2195
4085
|
}
|
|
@@ -2208,6 +4098,36 @@ function uniffiEnsureInitialized() {
|
|
|
2208
4098
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create() !== 15191) {
|
|
2209
4099
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create");
|
|
2210
4100
|
}
|
|
4101
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured() !== 58596) {
|
|
4102
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured");
|
|
4103
|
+
}
|
|
4104
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_activity_observer() !== 37471) {
|
|
4105
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_activity_observer");
|
|
4106
|
+
}
|
|
4107
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_activity_observer_and_client_kind() !== 50814) {
|
|
4108
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_activity_observer_and_client_kind");
|
|
4109
|
+
}
|
|
4110
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_authorization_host() !== 28087) {
|
|
4111
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_authorization_host");
|
|
4112
|
+
}
|
|
4113
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_authorization_host_and_client_kind() !== 17837) {
|
|
4114
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_authorization_host_and_client_kind");
|
|
4115
|
+
}
|
|
4116
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_client_kind() !== 23819) {
|
|
4117
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_client_kind");
|
|
4118
|
+
}
|
|
4119
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_host_integrations() !== 2578) {
|
|
4120
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_host_integrations");
|
|
4121
|
+
}
|
|
4122
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_host_integrations_and_client_kind() !== 25294) {
|
|
4123
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_configured_with_host_integrations_and_client_kind");
|
|
4124
|
+
}
|
|
4125
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_private_worker() !== 8571) {
|
|
4126
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_private_worker");
|
|
4127
|
+
}
|
|
4128
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_private_worker_with_client_kind() !== 31571) {
|
|
4129
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_private_worker_with_client_kind");
|
|
4130
|
+
}
|
|
2211
4131
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_with_client_kind() !== 3630) {
|
|
2212
4132
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_cuadriver_create_with_client_kind");
|
|
2213
4133
|
}
|
|
@@ -2229,6 +4149,9 @@ function uniffiEnsureInitialized() {
|
|
|
2229
4149
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_execution_mode() !== 2639) {
|
|
2230
4150
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_execution_mode");
|
|
2231
4151
|
}
|
|
4152
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_get_agent_cursor_state() !== 45642) {
|
|
4153
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_get_agent_cursor_state");
|
|
4154
|
+
}
|
|
2232
4155
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_get_cursor_position() !== 34285) {
|
|
2233
4156
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_get_cursor_position");
|
|
2234
4157
|
}
|
|
@@ -2259,9 +4182,21 @@ function uniffiEnsureInitialized() {
|
|
|
2259
4182
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_press_key() !== 63712) {
|
|
2260
4183
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_press_key");
|
|
2261
4184
|
}
|
|
4185
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_runtime_scope_prefix() !== 2453) {
|
|
4186
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_runtime_scope_prefix");
|
|
4187
|
+
}
|
|
2262
4188
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_scroll() !== 52290) {
|
|
2263
4189
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_scroll");
|
|
2264
4190
|
}
|
|
4191
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_set_agent_cursor_enabled() !== 26268) {
|
|
4192
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_set_agent_cursor_enabled");
|
|
4193
|
+
}
|
|
4194
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_set_agent_cursor_motion() !== 12578) {
|
|
4195
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_set_agent_cursor_motion");
|
|
4196
|
+
}
|
|
4197
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_set_agent_cursor_theme() !== 53908) {
|
|
4198
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_set_agent_cursor_theme");
|
|
4199
|
+
}
|
|
2265
4200
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_shutdown() !== 36331) {
|
|
2266
4201
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_shutdown");
|
|
2267
4202
|
}
|
|
@@ -2274,6 +4209,72 @@ function uniffiEnsureInitialized() {
|
|
|
2274
4209
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriver_type_text() !== 25156) {
|
|
2275
4210
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriver_type_text");
|
|
2276
4211
|
}
|
|
4212
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_call_tool() !== 52859) {
|
|
4213
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_call_tool");
|
|
4214
|
+
}
|
|
4215
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_click() !== 22303) {
|
|
4216
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_click");
|
|
4217
|
+
}
|
|
4218
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_close() !== 58108) {
|
|
4219
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_close");
|
|
4220
|
+
}
|
|
4221
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_drag() !== 5854) {
|
|
4222
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_drag");
|
|
4223
|
+
}
|
|
4224
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_end_session() !== 42785) {
|
|
4225
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_end_session");
|
|
4226
|
+
}
|
|
4227
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_escalate_session() !== 34392) {
|
|
4228
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_escalate_session");
|
|
4229
|
+
}
|
|
4230
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_get_agent_cursor_state() !== 60344) {
|
|
4231
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_get_agent_cursor_state");
|
|
4232
|
+
}
|
|
4233
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_get_cursor_position() !== 54838) {
|
|
4234
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_get_cursor_position");
|
|
4235
|
+
}
|
|
4236
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_get_desktop_state() !== 26695) {
|
|
4237
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_get_desktop_state");
|
|
4238
|
+
}
|
|
4239
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_get_screen_size() !== 9763) {
|
|
4240
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_get_screen_size");
|
|
4241
|
+
}
|
|
4242
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_get_session_state() !== 55370) {
|
|
4243
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_get_session_state");
|
|
4244
|
+
}
|
|
4245
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_hotkey() !== 12820) {
|
|
4246
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_hotkey");
|
|
4247
|
+
}
|
|
4248
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_move_cursor() !== 35768) {
|
|
4249
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_move_cursor");
|
|
4250
|
+
}
|
|
4251
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_press_key() !== 36768) {
|
|
4252
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_press_key");
|
|
4253
|
+
}
|
|
4254
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_scroll() !== 8013) {
|
|
4255
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_scroll");
|
|
4256
|
+
}
|
|
4257
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_agent_cursor_enabled() !== 37153) {
|
|
4258
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_agent_cursor_enabled");
|
|
4259
|
+
}
|
|
4260
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_agent_cursor_motion() !== 26144) {
|
|
4261
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_agent_cursor_motion");
|
|
4262
|
+
}
|
|
4263
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_agent_cursor_theme() !== 29734) {
|
|
4264
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_set_agent_cursor_theme");
|
|
4265
|
+
}
|
|
4266
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_start_session() !== 13118) {
|
|
4267
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_start_session");
|
|
4268
|
+
}
|
|
4269
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_type_text() !== 63241) {
|
|
4270
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_type_text");
|
|
4271
|
+
}
|
|
4272
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_driveractivityobserver_on_activity() !== 9786) {
|
|
4273
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_driveractivityobserver_on_activity");
|
|
4274
|
+
}
|
|
4275
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_driverauthorizationhost_authorize() !== 10089) {
|
|
4276
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_driverauthorizationhost_authorize");
|
|
4277
|
+
}
|
|
2277
4278
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_constructor_embeddedcuadriverhost_new() !== 10108) {
|
|
2278
4279
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_constructor_embeddedcuadriverhost_new");
|
|
2279
4280
|
}
|
|
@@ -2298,11 +4299,24 @@ function uniffiEnsureInitialized() {
|
|
|
2298
4299
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_embeddedcuadriverhost_wait_for_exit() !== 21124) {
|
|
2299
4300
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_embeddedcuadriverhost_wait_for_exit");
|
|
2300
4301
|
}
|
|
4302
|
+
uniffiCallbackInterfaceDriverActivityObserver.register();
|
|
4303
|
+
uniffiCallbackInterfaceDriverAuthorizationHost.register();
|
|
2301
4304
|
}
|
|
2302
4305
|
export default Object.freeze({
|
|
2303
4306
|
initialize: uniffiEnsureInitialized,
|
|
2304
4307
|
converters: {
|
|
4308
|
+
FfiConverterTypeActionCompletion,
|
|
4309
|
+
FfiConverterTypeConfiguredDriverOptions,
|
|
2305
4310
|
FfiConverterTypeCuaDriver,
|
|
4311
|
+
FfiConverterTypeCuaDriverSession,
|
|
4312
|
+
FfiConverterTypeDriverActivityEvent,
|
|
4313
|
+
FfiConverterTypeDriverActivityKind,
|
|
4314
|
+
FfiConverterTypeDriverActivityObserver,
|
|
4315
|
+
FfiConverterTypeDriverAuthorizationAction,
|
|
4316
|
+
FfiConverterTypeDriverAuthorizationDecision,
|
|
4317
|
+
FfiConverterTypeDriverAuthorizationHost,
|
|
4318
|
+
FfiConverterTypeDriverAuthorizationHostError,
|
|
4319
|
+
FfiConverterTypeDriverAuthorizationRequest,
|
|
2306
4320
|
FfiConverterTypeDriverError,
|
|
2307
4321
|
FfiConverterTypeDriverExecutionMode,
|
|
2308
4322
|
FfiConverterTypeDriverMetadata,
|
|
@@ -2318,7 +4332,11 @@ export default Object.freeze({
|
|
|
2318
4332
|
FfiConverterTypeEmbeddedPermissionMode,
|
|
2319
4333
|
FfiConverterTypeImageContent,
|
|
2320
4334
|
FfiConverterTypeMacOsPermissionStatus,
|
|
4335
|
+
FfiConverterTypePrivateWorkerOptions,
|
|
4336
|
+
FfiConverterTypeRuntimeAuthorizationOptions,
|
|
2321
4337
|
FfiConverterTypeSdkClientKind,
|
|
4338
|
+
FfiConverterTypeSessionPermissionMode,
|
|
2322
4339
|
FfiConverterTypeToolResult,
|
|
4340
|
+
FfiConverterTypeTrustedSessionOptions,
|
|
2323
4341
|
}
|
|
2324
4342
|
});
|