@trycua/cua-driver 0.11.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.
@@ -0,0 +1,1541 @@
1
+ import { type ClickInput, type DragInput, type EndSessionInput, type EndSessionOutput, type EscalateSessionInput, type GetCursorPositionInput, type GetDesktopStateInput, type GetScreenSizeInput, type GetSessionStateInput, type HotkeyInput, type MoveCursorInput, type PressKeyInput, type ScrollInput, type SessionStateOutput, type StartSessionInput, type StartSessionOutput, type TypeTextInput } from "./cua_driver_contract.js";
2
+ import { type UniffiByteArray, type UniffiGcObject, type UniffiHandle, FfiConverterObject, RustBuffer, UniffiAbstractObject, destructorGuardSymbol, pointerLiteralSymbol, uniffiTypeNameSymbol } from "@ubjs/core";
3
+ export declare function currentMacOsPermissionStatus(): MacOsPermissionStatus;
4
+ export declare function openMacOsScreenRecordingSettings(): void;
5
+ export declare function requestMacOsPermissions(): MacOsPermissionStatus;
6
+ /**
7
+ * Transport-independent daemon identity used to prove that standalone and
8
+ * embedded SDK/MCP routes reached a compatible Rust implementation.
9
+ */
10
+ export type DriverMetadata = {
11
+ driverVersion: string;
12
+ contractVersion: string;
13
+ toolsListSchemaVersion: string;
14
+ capabilityVersion: string;
15
+ mcpProtocolVersion: string;
16
+ pid: number;
17
+ embedded: boolean;
18
+ hostBundleId?: string;
19
+ };
20
+ /**
21
+ * Generated factory for {@link DriverMetadata} record objects.
22
+ */
23
+ export declare const DriverMetadata: Readonly<{
24
+ create: (partial: Partial<DriverMetadata> & Required<Omit<DriverMetadata, "hostBundleId">>) => DriverMetadata;
25
+ new: (partial: Partial<DriverMetadata> & Required<Omit<DriverMetadata, "hostBundleId">>) => DriverMetadata;
26
+ defaults: () => Partial<DriverMetadata>;
27
+ }>;
28
+ export type EmbeddedEnvironmentVariable = {
29
+ name: string;
30
+ value: string;
31
+ };
32
+ /**
33
+ * Generated factory for {@link EmbeddedEnvironmentVariable} record objects.
34
+ */
35
+ export declare const EmbeddedEnvironmentVariable: Readonly<{
36
+ create: (partial: Partial<EmbeddedEnvironmentVariable> & Required<Omit<EmbeddedEnvironmentVariable, never>>) => EmbeddedEnvironmentVariable;
37
+ new: (partial: Partial<EmbeddedEnvironmentVariable> & Required<Omit<EmbeddedEnvironmentVariable, never>>) => EmbeddedEnvironmentVariable;
38
+ defaults: () => Partial<EmbeddedEnvironmentVariable>;
39
+ }>;
40
+ export type EmbeddedMcpConfiguration = {
41
+ command: string;
42
+ args: Array<string>;
43
+ environment: Array<EmbeddedEnvironmentVariable>;
44
+ };
45
+ /**
46
+ * Generated factory for {@link EmbeddedMcpConfiguration} record objects.
47
+ */
48
+ export declare const EmbeddedMcpConfiguration: Readonly<{
49
+ create: (partial: Partial<EmbeddedMcpConfiguration> & Required<Omit<EmbeddedMcpConfiguration, never>>) => EmbeddedMcpConfiguration;
50
+ new: (partial: Partial<EmbeddedMcpConfiguration> & Required<Omit<EmbeddedMcpConfiguration, never>>) => EmbeddedMcpConfiguration;
51
+ defaults: () => Partial<EmbeddedMcpConfiguration>;
52
+ }>;
53
+ export type EmbeddedDriverConnection = {
54
+ socketPath: string;
55
+ pid: number;
56
+ generation: string;
57
+ driverVersion: string;
58
+ contractVersion: string;
59
+ mcpProtocolVersion: string;
60
+ mcp: EmbeddedMcpConfiguration;
61
+ };
62
+ /**
63
+ * Generated factory for {@link EmbeddedDriverConnection} record objects.
64
+ */
65
+ export declare const EmbeddedDriverConnection: Readonly<{
66
+ create: (partial: Partial<EmbeddedDriverConnection> & Required<Omit<EmbeddedDriverConnection, never>>) => EmbeddedDriverConnection;
67
+ new: (partial: Partial<EmbeddedDriverConnection> & Required<Omit<EmbeddedDriverConnection, never>>) => EmbeddedDriverConnection;
68
+ defaults: () => Partial<EmbeddedDriverConnection>;
69
+ }>;
70
+ export type EmbeddedDriverExit = {
71
+ generation: string;
72
+ code?: number;
73
+ success: boolean;
74
+ };
75
+ /**
76
+ * Generated factory for {@link EmbeddedDriverExit} record objects.
77
+ */
78
+ export declare const EmbeddedDriverExit: Readonly<{
79
+ create: (partial: Partial<EmbeddedDriverExit> & Required<Omit<EmbeddedDriverExit, "code">>) => EmbeddedDriverExit;
80
+ new: (partial: Partial<EmbeddedDriverExit> & Required<Omit<EmbeddedDriverExit, "code">>) => EmbeddedDriverExit;
81
+ defaults: () => Partial<EmbeddedDriverExit>;
82
+ }>;
83
+ export declare enum EmbeddedPermissionMode {
84
+ Standard = 0,
85
+ Bounded = 1,
86
+ Unrestricted = 2
87
+ }
88
+ export type EmbeddedDriverHostOptions = {
89
+ binaryPath: string;
90
+ hostBundleId: string;
91
+ socketPath?: string;
92
+ startupTimeoutMs?: bigint;
93
+ shutdownTimeoutMs?: bigint;
94
+ permissionMode?: EmbeddedPermissionMode;
95
+ sessionPolicyPath?: string;
96
+ approveSessionPolicy: boolean;
97
+ dangerouslyBypassApprovals: boolean;
98
+ environment: Array<EmbeddedEnvironmentVariable>;
99
+ inheritStderr: boolean;
100
+ };
101
+ /**
102
+ * Generated factory for {@link EmbeddedDriverHostOptions} record objects.
103
+ */
104
+ export declare const EmbeddedDriverHostOptions: Readonly<{
105
+ create: (partial: Partial<EmbeddedDriverHostOptions> & Required<Omit<EmbeddedDriverHostOptions, "socketPath" | "startupTimeoutMs" | "shutdownTimeoutMs" | "permissionMode" | "sessionPolicyPath">>) => EmbeddedDriverHostOptions;
106
+ new: (partial: Partial<EmbeddedDriverHostOptions> & Required<Omit<EmbeddedDriverHostOptions, "socketPath" | "startupTimeoutMs" | "shutdownTimeoutMs" | "permissionMode" | "sessionPolicyPath">>) => EmbeddedDriverHostOptions;
107
+ defaults: () => Partial<EmbeddedDriverHostOptions>;
108
+ }>;
109
+ export type ImageContent = {
110
+ mimeType: string;
111
+ dataBase64: string;
112
+ };
113
+ /**
114
+ * Generated factory for {@link ImageContent} record objects.
115
+ */
116
+ export declare const ImageContent: Readonly<{
117
+ create: (partial: Partial<ImageContent> & Required<Omit<ImageContent, never>>) => ImageContent;
118
+ new: (partial: Partial<ImageContent> & Required<Omit<ImageContent, never>>) => ImageContent;
119
+ defaults: () => Partial<ImageContent>;
120
+ }>;
121
+ /**
122
+ * The TCC grants required by a macOS host application before it starts an
123
+ * embedded driver. These probes execute in the importing SDK process so the
124
+ * operating system attributes the request to the host application.
125
+ */
126
+ export type MacOsPermissionStatus = {
127
+ accessibility: boolean;
128
+ screenRecording: boolean;
129
+ };
130
+ /**
131
+ * Generated factory for {@link MacOsPermissionStatus} record objects.
132
+ */
133
+ export declare const MacOsPermissionStatus: Readonly<{
134
+ create: (partial: Partial<MacOsPermissionStatus> & Required<Omit<MacOsPermissionStatus, never>>) => MacOsPermissionStatus;
135
+ new: (partial: Partial<MacOsPermissionStatus> & Required<Omit<MacOsPermissionStatus, never>>) => MacOsPermissionStatus;
136
+ defaults: () => Partial<MacOsPermissionStatus>;
137
+ }>;
138
+ /**
139
+ * Transport-neutral result envelope used for open-ended tool calls and
140
+ * desktop tools whose platform extensions are intentionally preserved as JSON.
141
+ */
142
+ export type ToolResult = {
143
+ text: string;
144
+ images: Array<ImageContent>;
145
+ structuredJson?: string;
146
+ isError: boolean;
147
+ errorCode?: string;
148
+ verified?: boolean;
149
+ degraded: boolean;
150
+ rawJson: string;
151
+ };
152
+ /**
153
+ * Generated factory for {@link ToolResult} record objects.
154
+ */
155
+ export declare const ToolResult: Readonly<{
156
+ create: (partial: Partial<ToolResult> & Required<Omit<ToolResult, "errorCode" | "structuredJson" | "verified">>) => ToolResult;
157
+ new: (partial: Partial<ToolResult> & Required<Omit<ToolResult, "errorCode" | "structuredJson" | "verified">>) => ToolResult;
158
+ defaults: () => Partial<ToolResult>;
159
+ }>;
160
+ export declare enum DriverError_Tags {
161
+ Configuration = "Configuration",
162
+ InvalidArguments = "InvalidArguments",
163
+ Transport = "Transport",
164
+ Protocol = "Protocol",
165
+ Tool = "Tool"
166
+ }
167
+ export declare const DriverError: Readonly<{
168
+ instanceOf: (obj: any) => obj is DriverError;
169
+ Configuration: {
170
+ new (inner: {
171
+ reason: string;
172
+ }): {
173
+ readonly tag: DriverError_Tags.Configuration;
174
+ readonly inner: Readonly<{
175
+ reason: string;
176
+ }>;
177
+ /**
178
+ * @private
179
+ * This field is private and should not be used, use `tag` instead.
180
+ */
181
+ readonly [uniffiTypeNameSymbol]: "DriverError";
182
+ name: string;
183
+ message: string;
184
+ stack?: string;
185
+ cause?: unknown;
186
+ };
187
+ "new"(inner: {
188
+ reason: string;
189
+ }): {
190
+ readonly tag: DriverError_Tags.Configuration;
191
+ readonly inner: Readonly<{
192
+ reason: string;
193
+ }>;
194
+ /**
195
+ * @private
196
+ * This field is private and should not be used, use `tag` instead.
197
+ */
198
+ readonly [uniffiTypeNameSymbol]: "DriverError";
199
+ name: string;
200
+ message: string;
201
+ stack?: string;
202
+ cause?: unknown;
203
+ };
204
+ instanceOf(obj: any): obj is {
205
+ readonly tag: DriverError_Tags.Configuration;
206
+ readonly inner: Readonly<{
207
+ reason: string;
208
+ }>;
209
+ /**
210
+ * @private
211
+ * This field is private and should not be used, use `tag` instead.
212
+ */
213
+ readonly [uniffiTypeNameSymbol]: "DriverError";
214
+ name: string;
215
+ message: string;
216
+ stack?: string;
217
+ cause?: unknown;
218
+ };
219
+ hasInner(obj: any): obj is {
220
+ readonly tag: DriverError_Tags.Configuration;
221
+ readonly inner: Readonly<{
222
+ reason: string;
223
+ }>;
224
+ /**
225
+ * @private
226
+ * This field is private and should not be used, use `tag` instead.
227
+ */
228
+ readonly [uniffiTypeNameSymbol]: "DriverError";
229
+ name: string;
230
+ message: string;
231
+ stack?: string;
232
+ cause?: unknown;
233
+ };
234
+ getInner(obj: {
235
+ readonly tag: DriverError_Tags.Configuration;
236
+ readonly inner: Readonly<{
237
+ reason: string;
238
+ }>;
239
+ /**
240
+ * @private
241
+ * This field is private and should not be used, use `tag` instead.
242
+ */
243
+ readonly [uniffiTypeNameSymbol]: "DriverError";
244
+ name: string;
245
+ message: string;
246
+ stack?: string;
247
+ cause?: unknown;
248
+ }): Readonly<{
249
+ reason: string;
250
+ }>;
251
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
252
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
253
+ stackTraceLimit: number;
254
+ };
255
+ InvalidArguments: {
256
+ new (inner: {
257
+ tool: string;
258
+ reason: string;
259
+ }): {
260
+ readonly tag: DriverError_Tags.InvalidArguments;
261
+ readonly inner: Readonly<{
262
+ tool: string;
263
+ reason: string;
264
+ }>;
265
+ /**
266
+ * @private
267
+ * This field is private and should not be used, use `tag` instead.
268
+ */
269
+ readonly [uniffiTypeNameSymbol]: "DriverError";
270
+ name: string;
271
+ message: string;
272
+ stack?: string;
273
+ cause?: unknown;
274
+ };
275
+ "new"(inner: {
276
+ tool: string;
277
+ reason: string;
278
+ }): {
279
+ readonly tag: DriverError_Tags.InvalidArguments;
280
+ readonly inner: Readonly<{
281
+ tool: string;
282
+ reason: string;
283
+ }>;
284
+ /**
285
+ * @private
286
+ * This field is private and should not be used, use `tag` instead.
287
+ */
288
+ readonly [uniffiTypeNameSymbol]: "DriverError";
289
+ name: string;
290
+ message: string;
291
+ stack?: string;
292
+ cause?: unknown;
293
+ };
294
+ instanceOf(obj: any): obj is {
295
+ readonly tag: DriverError_Tags.InvalidArguments;
296
+ readonly inner: Readonly<{
297
+ tool: string;
298
+ reason: string;
299
+ }>;
300
+ /**
301
+ * @private
302
+ * This field is private and should not be used, use `tag` instead.
303
+ */
304
+ readonly [uniffiTypeNameSymbol]: "DriverError";
305
+ name: string;
306
+ message: string;
307
+ stack?: string;
308
+ cause?: unknown;
309
+ };
310
+ hasInner(obj: any): obj is {
311
+ readonly tag: DriverError_Tags.InvalidArguments;
312
+ readonly inner: Readonly<{
313
+ tool: string;
314
+ reason: string;
315
+ }>;
316
+ /**
317
+ * @private
318
+ * This field is private and should not be used, use `tag` instead.
319
+ */
320
+ readonly [uniffiTypeNameSymbol]: "DriverError";
321
+ name: string;
322
+ message: string;
323
+ stack?: string;
324
+ cause?: unknown;
325
+ };
326
+ getInner(obj: {
327
+ readonly tag: DriverError_Tags.InvalidArguments;
328
+ readonly inner: Readonly<{
329
+ tool: string;
330
+ reason: string;
331
+ }>;
332
+ /**
333
+ * @private
334
+ * This field is private and should not be used, use `tag` instead.
335
+ */
336
+ readonly [uniffiTypeNameSymbol]: "DriverError";
337
+ name: string;
338
+ message: string;
339
+ stack?: string;
340
+ cause?: unknown;
341
+ }): Readonly<{
342
+ tool: string;
343
+ reason: string;
344
+ }>;
345
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
346
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
347
+ stackTraceLimit: number;
348
+ };
349
+ Transport: {
350
+ new (inner: {
351
+ socketPath: string;
352
+ reason: string;
353
+ }): {
354
+ readonly tag: DriverError_Tags.Transport;
355
+ readonly inner: Readonly<{
356
+ socketPath: string;
357
+ reason: string;
358
+ }>;
359
+ /**
360
+ * @private
361
+ * This field is private and should not be used, use `tag` instead.
362
+ */
363
+ readonly [uniffiTypeNameSymbol]: "DriverError";
364
+ name: string;
365
+ message: string;
366
+ stack?: string;
367
+ cause?: unknown;
368
+ };
369
+ "new"(inner: {
370
+ socketPath: string;
371
+ reason: string;
372
+ }): {
373
+ readonly tag: DriverError_Tags.Transport;
374
+ readonly inner: Readonly<{
375
+ socketPath: string;
376
+ reason: string;
377
+ }>;
378
+ /**
379
+ * @private
380
+ * This field is private and should not be used, use `tag` instead.
381
+ */
382
+ readonly [uniffiTypeNameSymbol]: "DriverError";
383
+ name: string;
384
+ message: string;
385
+ stack?: string;
386
+ cause?: unknown;
387
+ };
388
+ instanceOf(obj: any): obj is {
389
+ readonly tag: DriverError_Tags.Transport;
390
+ readonly inner: Readonly<{
391
+ socketPath: string;
392
+ reason: string;
393
+ }>;
394
+ /**
395
+ * @private
396
+ * This field is private and should not be used, use `tag` instead.
397
+ */
398
+ readonly [uniffiTypeNameSymbol]: "DriverError";
399
+ name: string;
400
+ message: string;
401
+ stack?: string;
402
+ cause?: unknown;
403
+ };
404
+ hasInner(obj: any): obj is {
405
+ readonly tag: DriverError_Tags.Transport;
406
+ readonly inner: Readonly<{
407
+ socketPath: string;
408
+ reason: string;
409
+ }>;
410
+ /**
411
+ * @private
412
+ * This field is private and should not be used, use `tag` instead.
413
+ */
414
+ readonly [uniffiTypeNameSymbol]: "DriverError";
415
+ name: string;
416
+ message: string;
417
+ stack?: string;
418
+ cause?: unknown;
419
+ };
420
+ getInner(obj: {
421
+ readonly tag: DriverError_Tags.Transport;
422
+ readonly inner: Readonly<{
423
+ socketPath: string;
424
+ reason: string;
425
+ }>;
426
+ /**
427
+ * @private
428
+ * This field is private and should not be used, use `tag` instead.
429
+ */
430
+ readonly [uniffiTypeNameSymbol]: "DriverError";
431
+ name: string;
432
+ message: string;
433
+ stack?: string;
434
+ cause?: unknown;
435
+ }): Readonly<{
436
+ socketPath: string;
437
+ reason: string;
438
+ }>;
439
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
440
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
441
+ stackTraceLimit: number;
442
+ };
443
+ Protocol: {
444
+ new (inner: {
445
+ reason: string;
446
+ }): {
447
+ readonly tag: DriverError_Tags.Protocol;
448
+ readonly inner: Readonly<{
449
+ reason: string;
450
+ }>;
451
+ /**
452
+ * @private
453
+ * This field is private and should not be used, use `tag` instead.
454
+ */
455
+ readonly [uniffiTypeNameSymbol]: "DriverError";
456
+ name: string;
457
+ message: string;
458
+ stack?: string;
459
+ cause?: unknown;
460
+ };
461
+ "new"(inner: {
462
+ reason: string;
463
+ }): {
464
+ readonly tag: DriverError_Tags.Protocol;
465
+ readonly inner: Readonly<{
466
+ reason: string;
467
+ }>;
468
+ /**
469
+ * @private
470
+ * This field is private and should not be used, use `tag` instead.
471
+ */
472
+ readonly [uniffiTypeNameSymbol]: "DriverError";
473
+ name: string;
474
+ message: string;
475
+ stack?: string;
476
+ cause?: unknown;
477
+ };
478
+ instanceOf(obj: any): obj is {
479
+ readonly tag: DriverError_Tags.Protocol;
480
+ readonly inner: Readonly<{
481
+ reason: string;
482
+ }>;
483
+ /**
484
+ * @private
485
+ * This field is private and should not be used, use `tag` instead.
486
+ */
487
+ readonly [uniffiTypeNameSymbol]: "DriverError";
488
+ name: string;
489
+ message: string;
490
+ stack?: string;
491
+ cause?: unknown;
492
+ };
493
+ hasInner(obj: any): obj is {
494
+ readonly tag: DriverError_Tags.Protocol;
495
+ readonly inner: Readonly<{
496
+ reason: string;
497
+ }>;
498
+ /**
499
+ * @private
500
+ * This field is private and should not be used, use `tag` instead.
501
+ */
502
+ readonly [uniffiTypeNameSymbol]: "DriverError";
503
+ name: string;
504
+ message: string;
505
+ stack?: string;
506
+ cause?: unknown;
507
+ };
508
+ getInner(obj: {
509
+ readonly tag: DriverError_Tags.Protocol;
510
+ readonly inner: Readonly<{
511
+ reason: string;
512
+ }>;
513
+ /**
514
+ * @private
515
+ * This field is private and should not be used, use `tag` instead.
516
+ */
517
+ readonly [uniffiTypeNameSymbol]: "DriverError";
518
+ name: string;
519
+ message: string;
520
+ stack?: string;
521
+ cause?: unknown;
522
+ }): Readonly<{
523
+ reason: string;
524
+ }>;
525
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
526
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
527
+ stackTraceLimit: number;
528
+ };
529
+ Tool: {
530
+ new (inner: {
531
+ tool: string;
532
+ message: string;
533
+ errorCode: string;
534
+ }): {
535
+ readonly tag: DriverError_Tags.Tool;
536
+ readonly inner: Readonly<{
537
+ tool: string;
538
+ message: string;
539
+ errorCode: string;
540
+ }>;
541
+ /**
542
+ * @private
543
+ * This field is private and should not be used, use `tag` instead.
544
+ */
545
+ readonly [uniffiTypeNameSymbol]: "DriverError";
546
+ name: string;
547
+ message: string;
548
+ stack?: string;
549
+ cause?: unknown;
550
+ };
551
+ "new"(inner: {
552
+ tool: string;
553
+ message: string;
554
+ errorCode: string;
555
+ }): {
556
+ readonly tag: DriverError_Tags.Tool;
557
+ readonly inner: Readonly<{
558
+ tool: string;
559
+ message: string;
560
+ errorCode: string;
561
+ }>;
562
+ /**
563
+ * @private
564
+ * This field is private and should not be used, use `tag` instead.
565
+ */
566
+ readonly [uniffiTypeNameSymbol]: "DriverError";
567
+ name: string;
568
+ message: string;
569
+ stack?: string;
570
+ cause?: unknown;
571
+ };
572
+ instanceOf(obj: any): obj is {
573
+ readonly tag: DriverError_Tags.Tool;
574
+ readonly inner: Readonly<{
575
+ tool: string;
576
+ message: string;
577
+ errorCode: string;
578
+ }>;
579
+ /**
580
+ * @private
581
+ * This field is private and should not be used, use `tag` instead.
582
+ */
583
+ readonly [uniffiTypeNameSymbol]: "DriverError";
584
+ name: string;
585
+ message: string;
586
+ stack?: string;
587
+ cause?: unknown;
588
+ };
589
+ hasInner(obj: any): obj is {
590
+ readonly tag: DriverError_Tags.Tool;
591
+ readonly inner: Readonly<{
592
+ tool: string;
593
+ message: string;
594
+ errorCode: string;
595
+ }>;
596
+ /**
597
+ * @private
598
+ * This field is private and should not be used, use `tag` instead.
599
+ */
600
+ readonly [uniffiTypeNameSymbol]: "DriverError";
601
+ name: string;
602
+ message: string;
603
+ stack?: string;
604
+ cause?: unknown;
605
+ };
606
+ getInner(obj: {
607
+ readonly tag: DriverError_Tags.Tool;
608
+ readonly inner: Readonly<{
609
+ tool: string;
610
+ message: string;
611
+ errorCode: string;
612
+ }>;
613
+ /**
614
+ * @private
615
+ * This field is private and should not be used, use `tag` instead.
616
+ */
617
+ readonly [uniffiTypeNameSymbol]: "DriverError";
618
+ name: string;
619
+ message: string;
620
+ stack?: string;
621
+ cause?: unknown;
622
+ }): Readonly<{
623
+ tool: string;
624
+ message: string;
625
+ errorCode: string;
626
+ }>;
627
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
628
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
629
+ stackTraceLimit: number;
630
+ };
631
+ }>;
632
+ export type DriverError = InstanceType<typeof DriverError['Configuration' | 'InvalidArguments' | 'Transport' | 'Protocol' | 'Tool']>;
633
+ export declare enum EmbeddedDriverError_Tags {
634
+ Configuration = "Configuration",
635
+ EndpointConflict = "EndpointConflict",
636
+ Spawn = "Spawn",
637
+ StartupCancelled = "StartupCancelled",
638
+ StartupTimeout = "StartupTimeout",
639
+ ExitedBeforeReady = "ExitedBeforeReady",
640
+ IncompatibleDaemon = "IncompatibleDaemon",
641
+ Lifecycle = "Lifecycle"
642
+ }
643
+ export declare const EmbeddedDriverError: Readonly<{
644
+ instanceOf: (obj: any) => obj is EmbeddedDriverError;
645
+ Configuration: {
646
+ new (inner: {
647
+ reason: string;
648
+ }): {
649
+ readonly tag: EmbeddedDriverError_Tags.Configuration;
650
+ readonly inner: Readonly<{
651
+ reason: string;
652
+ }>;
653
+ /**
654
+ * @private
655
+ * This field is private and should not be used, use `tag` instead.
656
+ */
657
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
658
+ name: string;
659
+ message: string;
660
+ stack?: string;
661
+ cause?: unknown;
662
+ };
663
+ "new"(inner: {
664
+ reason: string;
665
+ }): {
666
+ readonly tag: EmbeddedDriverError_Tags.Configuration;
667
+ readonly inner: Readonly<{
668
+ reason: string;
669
+ }>;
670
+ /**
671
+ * @private
672
+ * This field is private and should not be used, use `tag` instead.
673
+ */
674
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
675
+ name: string;
676
+ message: string;
677
+ stack?: string;
678
+ cause?: unknown;
679
+ };
680
+ instanceOf(obj: any): obj is {
681
+ readonly tag: EmbeddedDriverError_Tags.Configuration;
682
+ readonly inner: Readonly<{
683
+ reason: string;
684
+ }>;
685
+ /**
686
+ * @private
687
+ * This field is private and should not be used, use `tag` instead.
688
+ */
689
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
690
+ name: string;
691
+ message: string;
692
+ stack?: string;
693
+ cause?: unknown;
694
+ };
695
+ hasInner(obj: any): obj is {
696
+ readonly tag: EmbeddedDriverError_Tags.Configuration;
697
+ readonly inner: Readonly<{
698
+ reason: string;
699
+ }>;
700
+ /**
701
+ * @private
702
+ * This field is private and should not be used, use `tag` instead.
703
+ */
704
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
705
+ name: string;
706
+ message: string;
707
+ stack?: string;
708
+ cause?: unknown;
709
+ };
710
+ getInner(obj: {
711
+ readonly tag: EmbeddedDriverError_Tags.Configuration;
712
+ readonly inner: Readonly<{
713
+ reason: string;
714
+ }>;
715
+ /**
716
+ * @private
717
+ * This field is private and should not be used, use `tag` instead.
718
+ */
719
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
720
+ name: string;
721
+ message: string;
722
+ stack?: string;
723
+ cause?: unknown;
724
+ }): Readonly<{
725
+ reason: string;
726
+ }>;
727
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
728
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
729
+ stackTraceLimit: number;
730
+ };
731
+ EndpointConflict: {
732
+ new (inner: {
733
+ path: string;
734
+ reason: string;
735
+ }): {
736
+ readonly tag: EmbeddedDriverError_Tags.EndpointConflict;
737
+ readonly inner: Readonly<{
738
+ path: string;
739
+ reason: string;
740
+ }>;
741
+ /**
742
+ * @private
743
+ * This field is private and should not be used, use `tag` instead.
744
+ */
745
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
746
+ name: string;
747
+ message: string;
748
+ stack?: string;
749
+ cause?: unknown;
750
+ };
751
+ "new"(inner: {
752
+ path: string;
753
+ reason: string;
754
+ }): {
755
+ readonly tag: EmbeddedDriverError_Tags.EndpointConflict;
756
+ readonly inner: Readonly<{
757
+ path: string;
758
+ reason: string;
759
+ }>;
760
+ /**
761
+ * @private
762
+ * This field is private and should not be used, use `tag` instead.
763
+ */
764
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
765
+ name: string;
766
+ message: string;
767
+ stack?: string;
768
+ cause?: unknown;
769
+ };
770
+ instanceOf(obj: any): obj is {
771
+ readonly tag: EmbeddedDriverError_Tags.EndpointConflict;
772
+ readonly inner: Readonly<{
773
+ path: string;
774
+ reason: string;
775
+ }>;
776
+ /**
777
+ * @private
778
+ * This field is private and should not be used, use `tag` instead.
779
+ */
780
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
781
+ name: string;
782
+ message: string;
783
+ stack?: string;
784
+ cause?: unknown;
785
+ };
786
+ hasInner(obj: any): obj is {
787
+ readonly tag: EmbeddedDriverError_Tags.EndpointConflict;
788
+ readonly inner: Readonly<{
789
+ path: string;
790
+ reason: string;
791
+ }>;
792
+ /**
793
+ * @private
794
+ * This field is private and should not be used, use `tag` instead.
795
+ */
796
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
797
+ name: string;
798
+ message: string;
799
+ stack?: string;
800
+ cause?: unknown;
801
+ };
802
+ getInner(obj: {
803
+ readonly tag: EmbeddedDriverError_Tags.EndpointConflict;
804
+ readonly inner: Readonly<{
805
+ path: string;
806
+ reason: string;
807
+ }>;
808
+ /**
809
+ * @private
810
+ * This field is private and should not be used, use `tag` instead.
811
+ */
812
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
813
+ name: string;
814
+ message: string;
815
+ stack?: string;
816
+ cause?: unknown;
817
+ }): Readonly<{
818
+ path: string;
819
+ reason: string;
820
+ }>;
821
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
822
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
823
+ stackTraceLimit: number;
824
+ };
825
+ Spawn: {
826
+ new (inner: {
827
+ binaryPath: string;
828
+ reason: string;
829
+ }): {
830
+ readonly tag: EmbeddedDriverError_Tags.Spawn;
831
+ readonly inner: Readonly<{
832
+ binaryPath: string;
833
+ reason: string;
834
+ }>;
835
+ /**
836
+ * @private
837
+ * This field is private and should not be used, use `tag` instead.
838
+ */
839
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
840
+ name: string;
841
+ message: string;
842
+ stack?: string;
843
+ cause?: unknown;
844
+ };
845
+ "new"(inner: {
846
+ binaryPath: string;
847
+ reason: string;
848
+ }): {
849
+ readonly tag: EmbeddedDriverError_Tags.Spawn;
850
+ readonly inner: Readonly<{
851
+ binaryPath: string;
852
+ reason: string;
853
+ }>;
854
+ /**
855
+ * @private
856
+ * This field is private and should not be used, use `tag` instead.
857
+ */
858
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
859
+ name: string;
860
+ message: string;
861
+ stack?: string;
862
+ cause?: unknown;
863
+ };
864
+ instanceOf(obj: any): obj is {
865
+ readonly tag: EmbeddedDriverError_Tags.Spawn;
866
+ readonly inner: Readonly<{
867
+ binaryPath: string;
868
+ reason: string;
869
+ }>;
870
+ /**
871
+ * @private
872
+ * This field is private and should not be used, use `tag` instead.
873
+ */
874
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
875
+ name: string;
876
+ message: string;
877
+ stack?: string;
878
+ cause?: unknown;
879
+ };
880
+ hasInner(obj: any): obj is {
881
+ readonly tag: EmbeddedDriverError_Tags.Spawn;
882
+ readonly inner: Readonly<{
883
+ binaryPath: string;
884
+ reason: string;
885
+ }>;
886
+ /**
887
+ * @private
888
+ * This field is private and should not be used, use `tag` instead.
889
+ */
890
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
891
+ name: string;
892
+ message: string;
893
+ stack?: string;
894
+ cause?: unknown;
895
+ };
896
+ getInner(obj: {
897
+ readonly tag: EmbeddedDriverError_Tags.Spawn;
898
+ readonly inner: Readonly<{
899
+ binaryPath: string;
900
+ reason: string;
901
+ }>;
902
+ /**
903
+ * @private
904
+ * This field is private and should not be used, use `tag` instead.
905
+ */
906
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
907
+ name: string;
908
+ message: string;
909
+ stack?: string;
910
+ cause?: unknown;
911
+ }): Readonly<{
912
+ binaryPath: string;
913
+ reason: string;
914
+ }>;
915
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
916
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
917
+ stackTraceLimit: number;
918
+ };
919
+ StartupCancelled: {
920
+ new (): {
921
+ readonly tag: EmbeddedDriverError_Tags.StartupCancelled;
922
+ /**
923
+ * @private
924
+ * This field is private and should not be used, use `tag` instead.
925
+ */
926
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
927
+ name: string;
928
+ message: string;
929
+ stack?: string;
930
+ cause?: unknown;
931
+ };
932
+ "new"(): {
933
+ readonly tag: EmbeddedDriverError_Tags.StartupCancelled;
934
+ /**
935
+ * @private
936
+ * This field is private and should not be used, use `tag` instead.
937
+ */
938
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
939
+ name: string;
940
+ message: string;
941
+ stack?: string;
942
+ cause?: unknown;
943
+ };
944
+ instanceOf(obj: any): obj is {
945
+ readonly tag: EmbeddedDriverError_Tags.StartupCancelled;
946
+ /**
947
+ * @private
948
+ * This field is private and should not be used, use `tag` instead.
949
+ */
950
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
951
+ name: string;
952
+ message: string;
953
+ stack?: string;
954
+ cause?: unknown;
955
+ };
956
+ hasInner(obj: any): obj is {
957
+ readonly tag: EmbeddedDriverError_Tags.StartupCancelled;
958
+ /**
959
+ * @private
960
+ * This field is private and should not be used, use `tag` instead.
961
+ */
962
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
963
+ name: string;
964
+ message: string;
965
+ stack?: string;
966
+ cause?: unknown;
967
+ };
968
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
969
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
970
+ stackTraceLimit: number;
971
+ };
972
+ StartupTimeout: {
973
+ new (inner: {
974
+ timeoutMs: bigint;
975
+ }): {
976
+ readonly tag: EmbeddedDriverError_Tags.StartupTimeout;
977
+ readonly inner: Readonly<{
978
+ timeoutMs: bigint;
979
+ }>;
980
+ /**
981
+ * @private
982
+ * This field is private and should not be used, use `tag` instead.
983
+ */
984
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
985
+ name: string;
986
+ message: string;
987
+ stack?: string;
988
+ cause?: unknown;
989
+ };
990
+ "new"(inner: {
991
+ timeoutMs: bigint;
992
+ }): {
993
+ readonly tag: EmbeddedDriverError_Tags.StartupTimeout;
994
+ readonly inner: Readonly<{
995
+ timeoutMs: bigint;
996
+ }>;
997
+ /**
998
+ * @private
999
+ * This field is private and should not be used, use `tag` instead.
1000
+ */
1001
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1002
+ name: string;
1003
+ message: string;
1004
+ stack?: string;
1005
+ cause?: unknown;
1006
+ };
1007
+ instanceOf(obj: any): obj is {
1008
+ readonly tag: EmbeddedDriverError_Tags.StartupTimeout;
1009
+ readonly inner: Readonly<{
1010
+ timeoutMs: bigint;
1011
+ }>;
1012
+ /**
1013
+ * @private
1014
+ * This field is private and should not be used, use `tag` instead.
1015
+ */
1016
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1017
+ name: string;
1018
+ message: string;
1019
+ stack?: string;
1020
+ cause?: unknown;
1021
+ };
1022
+ hasInner(obj: any): obj is {
1023
+ readonly tag: EmbeddedDriverError_Tags.StartupTimeout;
1024
+ readonly inner: Readonly<{
1025
+ timeoutMs: bigint;
1026
+ }>;
1027
+ /**
1028
+ * @private
1029
+ * This field is private and should not be used, use `tag` instead.
1030
+ */
1031
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1032
+ name: string;
1033
+ message: string;
1034
+ stack?: string;
1035
+ cause?: unknown;
1036
+ };
1037
+ getInner(obj: {
1038
+ readonly tag: EmbeddedDriverError_Tags.StartupTimeout;
1039
+ readonly inner: Readonly<{
1040
+ timeoutMs: bigint;
1041
+ }>;
1042
+ /**
1043
+ * @private
1044
+ * This field is private and should not be used, use `tag` instead.
1045
+ */
1046
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1047
+ name: string;
1048
+ message: string;
1049
+ stack?: string;
1050
+ cause?: unknown;
1051
+ }): Readonly<{
1052
+ timeoutMs: bigint;
1053
+ }>;
1054
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1055
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1056
+ stackTraceLimit: number;
1057
+ };
1058
+ ExitedBeforeReady: {
1059
+ new (inner: {
1060
+ code?: number;
1061
+ }): {
1062
+ readonly tag: EmbeddedDriverError_Tags.ExitedBeforeReady;
1063
+ readonly inner: Readonly<{
1064
+ code?: number;
1065
+ }>;
1066
+ /**
1067
+ * @private
1068
+ * This field is private and should not be used, use `tag` instead.
1069
+ */
1070
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1071
+ name: string;
1072
+ message: string;
1073
+ stack?: string;
1074
+ cause?: unknown;
1075
+ };
1076
+ "new"(inner: {
1077
+ code?: number;
1078
+ }): {
1079
+ readonly tag: EmbeddedDriverError_Tags.ExitedBeforeReady;
1080
+ readonly inner: Readonly<{
1081
+ code?: number;
1082
+ }>;
1083
+ /**
1084
+ * @private
1085
+ * This field is private and should not be used, use `tag` instead.
1086
+ */
1087
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1088
+ name: string;
1089
+ message: string;
1090
+ stack?: string;
1091
+ cause?: unknown;
1092
+ };
1093
+ instanceOf(obj: any): obj is {
1094
+ readonly tag: EmbeddedDriverError_Tags.ExitedBeforeReady;
1095
+ readonly inner: Readonly<{
1096
+ code?: number;
1097
+ }>;
1098
+ /**
1099
+ * @private
1100
+ * This field is private and should not be used, use `tag` instead.
1101
+ */
1102
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1103
+ name: string;
1104
+ message: string;
1105
+ stack?: string;
1106
+ cause?: unknown;
1107
+ };
1108
+ hasInner(obj: any): obj is {
1109
+ readonly tag: EmbeddedDriverError_Tags.ExitedBeforeReady;
1110
+ readonly inner: Readonly<{
1111
+ code?: number;
1112
+ }>;
1113
+ /**
1114
+ * @private
1115
+ * This field is private and should not be used, use `tag` instead.
1116
+ */
1117
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1118
+ name: string;
1119
+ message: string;
1120
+ stack?: string;
1121
+ cause?: unknown;
1122
+ };
1123
+ getInner(obj: {
1124
+ readonly tag: EmbeddedDriverError_Tags.ExitedBeforeReady;
1125
+ readonly inner: Readonly<{
1126
+ code?: number;
1127
+ }>;
1128
+ /**
1129
+ * @private
1130
+ * This field is private and should not be used, use `tag` instead.
1131
+ */
1132
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1133
+ name: string;
1134
+ message: string;
1135
+ stack?: string;
1136
+ cause?: unknown;
1137
+ }): Readonly<{
1138
+ code?: number;
1139
+ }>;
1140
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1141
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1142
+ stackTraceLimit: number;
1143
+ };
1144
+ IncompatibleDaemon: {
1145
+ new (inner: {
1146
+ reason: string;
1147
+ }): {
1148
+ readonly tag: EmbeddedDriverError_Tags.IncompatibleDaemon;
1149
+ readonly inner: Readonly<{
1150
+ reason: string;
1151
+ }>;
1152
+ /**
1153
+ * @private
1154
+ * This field is private and should not be used, use `tag` instead.
1155
+ */
1156
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1157
+ name: string;
1158
+ message: string;
1159
+ stack?: string;
1160
+ cause?: unknown;
1161
+ };
1162
+ "new"(inner: {
1163
+ reason: string;
1164
+ }): {
1165
+ readonly tag: EmbeddedDriverError_Tags.IncompatibleDaemon;
1166
+ readonly inner: Readonly<{
1167
+ reason: string;
1168
+ }>;
1169
+ /**
1170
+ * @private
1171
+ * This field is private and should not be used, use `tag` instead.
1172
+ */
1173
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1174
+ name: string;
1175
+ message: string;
1176
+ stack?: string;
1177
+ cause?: unknown;
1178
+ };
1179
+ instanceOf(obj: any): obj is {
1180
+ readonly tag: EmbeddedDriverError_Tags.IncompatibleDaemon;
1181
+ readonly inner: Readonly<{
1182
+ reason: string;
1183
+ }>;
1184
+ /**
1185
+ * @private
1186
+ * This field is private and should not be used, use `tag` instead.
1187
+ */
1188
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1189
+ name: string;
1190
+ message: string;
1191
+ stack?: string;
1192
+ cause?: unknown;
1193
+ };
1194
+ hasInner(obj: any): obj is {
1195
+ readonly tag: EmbeddedDriverError_Tags.IncompatibleDaemon;
1196
+ readonly inner: Readonly<{
1197
+ reason: string;
1198
+ }>;
1199
+ /**
1200
+ * @private
1201
+ * This field is private and should not be used, use `tag` instead.
1202
+ */
1203
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1204
+ name: string;
1205
+ message: string;
1206
+ stack?: string;
1207
+ cause?: unknown;
1208
+ };
1209
+ getInner(obj: {
1210
+ readonly tag: EmbeddedDriverError_Tags.IncompatibleDaemon;
1211
+ readonly inner: Readonly<{
1212
+ reason: string;
1213
+ }>;
1214
+ /**
1215
+ * @private
1216
+ * This field is private and should not be used, use `tag` instead.
1217
+ */
1218
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1219
+ name: string;
1220
+ message: string;
1221
+ stack?: string;
1222
+ cause?: unknown;
1223
+ }): Readonly<{
1224
+ reason: string;
1225
+ }>;
1226
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1227
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1228
+ stackTraceLimit: number;
1229
+ };
1230
+ Lifecycle: {
1231
+ new (inner: {
1232
+ reason: string;
1233
+ }): {
1234
+ readonly tag: EmbeddedDriverError_Tags.Lifecycle;
1235
+ readonly inner: Readonly<{
1236
+ reason: string;
1237
+ }>;
1238
+ /**
1239
+ * @private
1240
+ * This field is private and should not be used, use `tag` instead.
1241
+ */
1242
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1243
+ name: string;
1244
+ message: string;
1245
+ stack?: string;
1246
+ cause?: unknown;
1247
+ };
1248
+ "new"(inner: {
1249
+ reason: string;
1250
+ }): {
1251
+ readonly tag: EmbeddedDriverError_Tags.Lifecycle;
1252
+ readonly inner: Readonly<{
1253
+ reason: string;
1254
+ }>;
1255
+ /**
1256
+ * @private
1257
+ * This field is private and should not be used, use `tag` instead.
1258
+ */
1259
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1260
+ name: string;
1261
+ message: string;
1262
+ stack?: string;
1263
+ cause?: unknown;
1264
+ };
1265
+ instanceOf(obj: any): obj is {
1266
+ readonly tag: EmbeddedDriverError_Tags.Lifecycle;
1267
+ readonly inner: Readonly<{
1268
+ reason: string;
1269
+ }>;
1270
+ /**
1271
+ * @private
1272
+ * This field is private and should not be used, use `tag` instead.
1273
+ */
1274
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1275
+ name: string;
1276
+ message: string;
1277
+ stack?: string;
1278
+ cause?: unknown;
1279
+ };
1280
+ hasInner(obj: any): obj is {
1281
+ readonly tag: EmbeddedDriverError_Tags.Lifecycle;
1282
+ readonly inner: Readonly<{
1283
+ reason: string;
1284
+ }>;
1285
+ /**
1286
+ * @private
1287
+ * This field is private and should not be used, use `tag` instead.
1288
+ */
1289
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1290
+ name: string;
1291
+ message: string;
1292
+ stack?: string;
1293
+ cause?: unknown;
1294
+ };
1295
+ getInner(obj: {
1296
+ readonly tag: EmbeddedDriverError_Tags.Lifecycle;
1297
+ readonly inner: Readonly<{
1298
+ reason: string;
1299
+ }>;
1300
+ /**
1301
+ * @private
1302
+ * This field is private and should not be used, use `tag` instead.
1303
+ */
1304
+ readonly [uniffiTypeNameSymbol]: "EmbeddedDriverError";
1305
+ name: string;
1306
+ message: string;
1307
+ stack?: string;
1308
+ cause?: unknown;
1309
+ }): Readonly<{
1310
+ reason: string;
1311
+ }>;
1312
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1313
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1314
+ stackTraceLimit: number;
1315
+ };
1316
+ }>;
1317
+ export type EmbeddedDriverError = InstanceType<typeof EmbeddedDriverError['Configuration' | 'EndpointConflict' | 'Spawn' | 'StartupCancelled' | 'StartupTimeout' | 'ExitedBeforeReady' | 'IncompatibleDaemon' | 'Lifecycle']>;
1318
+ export declare enum EmbeddedDriverHostState {
1319
+ Stopped = 0,
1320
+ Starting = 1,
1321
+ Ready = 2,
1322
+ Stopping = 3
1323
+ }
1324
+ export interface CuaDriverLike {
1325
+ /**
1326
+ * Escape hatch for forward-compatible tools and application-owned server
1327
+ * adapters. Typed methods below serialize the same canonical Rust inputs.
1328
+ */
1329
+ callTool(name: string, argumentsJson: string): ToolResult;
1330
+ click(input: ClickInput): ToolResult;
1331
+ drag(input: DragInput): ToolResult;
1332
+ endSession(input: EndSessionInput): EndSessionOutput;
1333
+ escalateSession(input: EscalateSessionInput): SessionStateOutput;
1334
+ getCursorPosition(input: GetCursorPositionInput): ToolResult;
1335
+ getDesktopState(input: GetDesktopStateInput): ToolResult;
1336
+ getScreenSize(input: GetScreenSizeInput): ToolResult;
1337
+ getSessionState(input: GetSessionStateInput): SessionStateOutput;
1338
+ hotkey(input: HotkeyInput): ToolResult;
1339
+ isAvailable(): boolean;
1340
+ listToolsJson(): string;
1341
+ metadata(): DriverMetadata;
1342
+ moveCursor(input: MoveCursorInput): ToolResult;
1343
+ pressKey(input: PressKeyInput): ToolResult;
1344
+ scroll(input: ScrollInput): ToolResult;
1345
+ socketPath(): string;
1346
+ startSession(input: StartSessionInput): StartSessionOutput;
1347
+ typeText(input: TypeTextInput): ToolResult;
1348
+ }
1349
+ /**
1350
+ * @deprecated Use `CuaDriverLike` instead.
1351
+ */
1352
+ export type CuaDriverInterface = CuaDriverLike;
1353
+ export declare class CuaDriver extends UniffiAbstractObject implements CuaDriverLike {
1354
+ readonly [uniffiTypeNameSymbol] = "CuaDriver";
1355
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1356
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1357
+ private constructor();
1358
+ /**
1359
+ * Connect to the default installed daemon or an explicitly selected socket.
1360
+ * Construction does not launch a process or perform I/O.
1361
+ */
1362
+ static connect(socketPath: string | undefined): CuaDriverLike;
1363
+ /**
1364
+ * Escape hatch for forward-compatible tools and application-owned server
1365
+ * adapters. Typed methods below serialize the same canonical Rust inputs.
1366
+ */
1367
+ callTool(name: string, argumentsJson: string): ToolResult;
1368
+ click(input: ClickInput): ToolResult;
1369
+ drag(input: DragInput): ToolResult;
1370
+ endSession(input: EndSessionInput): EndSessionOutput;
1371
+ escalateSession(input: EscalateSessionInput): SessionStateOutput;
1372
+ getCursorPosition(input: GetCursorPositionInput): ToolResult;
1373
+ getDesktopState(input: GetDesktopStateInput): ToolResult;
1374
+ getScreenSize(input: GetScreenSizeInput): ToolResult;
1375
+ getSessionState(input: GetSessionStateInput): SessionStateOutput;
1376
+ hotkey(input: HotkeyInput): ToolResult;
1377
+ isAvailable(): boolean;
1378
+ listToolsJson(): string;
1379
+ metadata(): DriverMetadata;
1380
+ moveCursor(input: MoveCursorInput): ToolResult;
1381
+ pressKey(input: PressKeyInput): ToolResult;
1382
+ scroll(input: ScrollInput): ToolResult;
1383
+ socketPath(): string;
1384
+ startSession(input: StartSessionInput): StartSessionOutput;
1385
+ typeText(input: TypeTextInput): ToolResult;
1386
+ uniffiDestroy(): void;
1387
+ static instanceOf(obj_: any): obj_ is CuaDriver;
1388
+ }
1389
+ export interface EmbeddedCuaDriverHostLike {
1390
+ connection(): EmbeddedDriverConnection | undefined;
1391
+ restart(asyncOpts_?: {
1392
+ signal: AbortSignal;
1393
+ }): Promise<EmbeddedDriverConnection>;
1394
+ start(asyncOpts_?: {
1395
+ signal: AbortSignal;
1396
+ }): Promise<EmbeddedDriverConnection>;
1397
+ state(): EmbeddedDriverHostState;
1398
+ stop(asyncOpts_?: {
1399
+ signal: AbortSignal;
1400
+ }): Promise<void>;
1401
+ waitForExit(generation: string, asyncOpts_?: {
1402
+ signal: AbortSignal;
1403
+ }): Promise<EmbeddedDriverExit>;
1404
+ }
1405
+ /**
1406
+ * @deprecated Use `EmbeddedCuaDriverHostLike` instead.
1407
+ */
1408
+ export type EmbeddedCuaDriverHostInterface = EmbeddedCuaDriverHostLike;
1409
+ export declare class EmbeddedCuaDriverHost extends UniffiAbstractObject implements EmbeddedCuaDriverHostLike {
1410
+ readonly [uniffiTypeNameSymbol] = "EmbeddedCuaDriverHost";
1411
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1412
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1413
+ constructor(binaryPath: string, hostBundleId: string);
1414
+ static withOptions(options: EmbeddedDriverHostOptions): EmbeddedCuaDriverHostLike;
1415
+ connection(): EmbeddedDriverConnection | undefined;
1416
+ restart(asyncOpts_?: {
1417
+ signal: AbortSignal;
1418
+ }): Promise<EmbeddedDriverConnection>;
1419
+ start(asyncOpts_?: {
1420
+ signal: AbortSignal;
1421
+ }): Promise<EmbeddedDriverConnection>;
1422
+ state(): EmbeddedDriverHostState;
1423
+ stop(asyncOpts_?: {
1424
+ signal: AbortSignal;
1425
+ }): Promise<void>;
1426
+ waitForExit(generation: string, asyncOpts_?: {
1427
+ signal: AbortSignal;
1428
+ }): Promise<EmbeddedDriverExit>;
1429
+ uniffiDestroy(): void;
1430
+ static instanceOf(obj_: any): obj_ is EmbeddedCuaDriverHost;
1431
+ }
1432
+ /**
1433
+ * This should be called before anything else.
1434
+ *
1435
+ * It is likely that this is being done for you by the library's `index.ts`.
1436
+ *
1437
+ * It checks versions of uniffi between when the Rust scaffolding was generated
1438
+ * and when the bindings were generated.
1439
+ *
1440
+ * It also initializes the machinery to enable Rust to talk back to Javascript.
1441
+ */
1442
+ declare function uniffiEnsureInitialized(): void;
1443
+ declare const _default: Readonly<{
1444
+ initialize: typeof uniffiEnsureInitialized;
1445
+ converters: {
1446
+ FfiConverterTypeCuaDriver: FfiConverterObject<CuaDriverLike>;
1447
+ FfiConverterTypeDriverError: {
1448
+ read(from: RustBuffer): DriverError;
1449
+ write(value: DriverError, into: RustBuffer): void;
1450
+ allocationSize(value: DriverError): number;
1451
+ lift(value: UniffiByteArray): DriverError;
1452
+ lower(value: DriverError, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1453
+ };
1454
+ FfiConverterTypeDriverMetadata: {
1455
+ read(from: RustBuffer): DriverMetadata;
1456
+ write(value: DriverMetadata, into: RustBuffer): void;
1457
+ allocationSize(value: DriverMetadata): number;
1458
+ lift(value: UniffiByteArray): DriverMetadata;
1459
+ lower(value: DriverMetadata, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1460
+ };
1461
+ FfiConverterTypeEmbeddedCuaDriverHost: FfiConverterObject<EmbeddedCuaDriverHostLike>;
1462
+ FfiConverterTypeEmbeddedDriverConnection: {
1463
+ read(from: RustBuffer): EmbeddedDriverConnection;
1464
+ write(value: EmbeddedDriverConnection, into: RustBuffer): void;
1465
+ allocationSize(value: EmbeddedDriverConnection): number;
1466
+ lift(value: UniffiByteArray): EmbeddedDriverConnection;
1467
+ lower(value: EmbeddedDriverConnection, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1468
+ };
1469
+ FfiConverterTypeEmbeddedDriverError: {
1470
+ read(from: RustBuffer): EmbeddedDriverError;
1471
+ write(value: EmbeddedDriverError, into: RustBuffer): void;
1472
+ allocationSize(value: EmbeddedDriverError): number;
1473
+ lift(value: UniffiByteArray): EmbeddedDriverError;
1474
+ lower(value: EmbeddedDriverError, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1475
+ };
1476
+ FfiConverterTypeEmbeddedDriverExit: {
1477
+ read(from: RustBuffer): EmbeddedDriverExit;
1478
+ write(value: EmbeddedDriverExit, into: RustBuffer): void;
1479
+ allocationSize(value: EmbeddedDriverExit): number;
1480
+ lift(value: UniffiByteArray): EmbeddedDriverExit;
1481
+ lower(value: EmbeddedDriverExit, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1482
+ };
1483
+ FfiConverterTypeEmbeddedDriverHostOptions: {
1484
+ read(from: RustBuffer): EmbeddedDriverHostOptions;
1485
+ write(value: EmbeddedDriverHostOptions, into: RustBuffer): void;
1486
+ allocationSize(value: EmbeddedDriverHostOptions): number;
1487
+ lift(value: UniffiByteArray): EmbeddedDriverHostOptions;
1488
+ lower(value: EmbeddedDriverHostOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1489
+ };
1490
+ FfiConverterTypeEmbeddedDriverHostState: {
1491
+ read(from: RustBuffer): EmbeddedDriverHostState;
1492
+ write(value: EmbeddedDriverHostState, into: RustBuffer): void;
1493
+ allocationSize(value: EmbeddedDriverHostState): number;
1494
+ lift(value: UniffiByteArray): EmbeddedDriverHostState;
1495
+ lower(value: EmbeddedDriverHostState, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1496
+ };
1497
+ FfiConverterTypeEmbeddedEnvironmentVariable: {
1498
+ read(from: RustBuffer): EmbeddedEnvironmentVariable;
1499
+ write(value: EmbeddedEnvironmentVariable, into: RustBuffer): void;
1500
+ allocationSize(value: EmbeddedEnvironmentVariable): number;
1501
+ lift(value: UniffiByteArray): EmbeddedEnvironmentVariable;
1502
+ lower(value: EmbeddedEnvironmentVariable, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1503
+ };
1504
+ FfiConverterTypeEmbeddedMcpConfiguration: {
1505
+ read(from: RustBuffer): EmbeddedMcpConfiguration;
1506
+ write(value: EmbeddedMcpConfiguration, into: RustBuffer): void;
1507
+ allocationSize(value: EmbeddedMcpConfiguration): number;
1508
+ lift(value: UniffiByteArray): EmbeddedMcpConfiguration;
1509
+ lower(value: EmbeddedMcpConfiguration, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1510
+ };
1511
+ FfiConverterTypeEmbeddedPermissionMode: {
1512
+ read(from: RustBuffer): EmbeddedPermissionMode;
1513
+ write(value: EmbeddedPermissionMode, into: RustBuffer): void;
1514
+ allocationSize(value: EmbeddedPermissionMode): number;
1515
+ lift(value: UniffiByteArray): EmbeddedPermissionMode;
1516
+ lower(value: EmbeddedPermissionMode, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1517
+ };
1518
+ FfiConverterTypeImageContent: {
1519
+ read(from: RustBuffer): ImageContent;
1520
+ write(value: ImageContent, into: RustBuffer): void;
1521
+ allocationSize(value: ImageContent): number;
1522
+ lift(value: UniffiByteArray): ImageContent;
1523
+ lower(value: ImageContent, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1524
+ };
1525
+ FfiConverterTypeMacOsPermissionStatus: {
1526
+ read(from: RustBuffer): MacOsPermissionStatus;
1527
+ write(value: MacOsPermissionStatus, into: RustBuffer): void;
1528
+ allocationSize(value: MacOsPermissionStatus): number;
1529
+ lift(value: UniffiByteArray): MacOsPermissionStatus;
1530
+ lower(value: MacOsPermissionStatus, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1531
+ };
1532
+ FfiConverterTypeToolResult: {
1533
+ read(from: RustBuffer): ToolResult;
1534
+ write(value: ToolResult, into: RustBuffer): void;
1535
+ allocationSize(value: ToolResult): number;
1536
+ lift(value: UniffiByteArray): ToolResult;
1537
+ lower(value: ToolResult, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
1538
+ };
1539
+ };
1540
+ }>;
1541
+ export default _default;