@trycua/cua 0.2.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.
Files changed (91) hide show
  1. package/README.md +121 -0
  2. package/bin/cua.js +37 -0
  3. package/browser/cua_sdk-ffi.d.ts +6 -0
  4. package/browser/cua_sdk-ffi.js +3 -0
  5. package/browser/cua_sdk-ffi.ts +14 -0
  6. package/browser/cua_sdk.d.ts +2237 -0
  7. package/browser/cua_sdk.js +2607 -0
  8. package/browser/cua_sdk.ts +3644 -0
  9. package/browser/cyclops_sdk_schema-ffi.d.ts +6 -0
  10. package/browser/cyclops_sdk_schema-ffi.js +3 -0
  11. package/browser/cyclops_sdk_schema-ffi.ts +14 -0
  12. package/browser/cyclops_sdk_schema.d.ts +996 -0
  13. package/browser/cyclops_sdk_schema.js +2194 -0
  14. package/browser/cyclops_sdk_schema.ts +2934 -0
  15. package/browser/fleet_sdk-ffi.d.ts +28 -0
  16. package/browser/fleet_sdk-ffi.js +3 -0
  17. package/browser/fleet_sdk-ffi.ts +35 -0
  18. package/browser/fleet_sdk.d.ts +3056 -0
  19. package/browser/fleet_sdk.js +5088 -0
  20. package/browser/fleet_sdk.ts +6830 -0
  21. package/browser/index.d.ts +2 -0
  22. package/browser/index.js +18 -0
  23. package/browser/index.web.ts +34 -0
  24. package/browser/tsconfig.json +20 -0
  25. package/browser/wasm-bindgen/index.d.ts +2346 -0
  26. package/browser/wasm-bindgen/index.js +6642 -0
  27. package/browser/wasm-bindgen/index_bg.wasm +0 -0
  28. package/browser/wasm-bindgen/index_bg.wasm.d.ts +1154 -0
  29. package/dist/index.d.ts +118 -0
  30. package/dist/index.js +207 -0
  31. package/dist/mcp.d.ts +33 -0
  32. package/dist/mcp.js +41 -0
  33. package/dist/native/cua_sdk-ffi.d.ts +1038 -0
  34. package/dist/native/cua_sdk-ffi.js +5095 -0
  35. package/dist/native/cua_sdk.d.ts +15906 -0
  36. package/dist/native/cua_sdk.js +27061 -0
  37. package/dist/native/index.d.ts +7 -0
  38. package/dist/native/index.js +12 -0
  39. package/dist/native/node-runtime.d.ts +72 -0
  40. package/dist/native/node-runtime.js +35 -0
  41. package/dist/spaces/cursorArt.d.ts +27 -0
  42. package/dist/spaces/cursorArt.js +59 -0
  43. package/dist/spaces/errors.d.ts +81 -0
  44. package/dist/spaces/errors.js +102 -0
  45. package/dist/spaces/events.d.ts +154 -0
  46. package/dist/spaces/events.js +182 -0
  47. package/dist/spaces/groups.d.ts +130 -0
  48. package/dist/spaces/groups.js +275 -0
  49. package/dist/spaces/host.d.ts +71 -0
  50. package/dist/spaces/host.js +154 -0
  51. package/dist/spaces/index.d.ts +48 -0
  52. package/dist/spaces/index.js +44 -0
  53. package/dist/spaces/pip.d.ts +128 -0
  54. package/dist/spaces/pip.js +250 -0
  55. package/dist/spaces/presence.d.ts +187 -0
  56. package/dist/spaces/presence.js +449 -0
  57. package/dist/spaces/presenceTypes.check.d.ts +12 -0
  58. package/dist/spaces/presenceTypes.check.js +1 -0
  59. package/dist/spaces/presenceTypes.d.ts +47 -0
  60. package/dist/spaces/presenceTypes.js +7 -0
  61. package/dist/spaces/routines.d.ts +158 -0
  62. package/dist/spaces/routines.js +339 -0
  63. package/dist/spaces/thread.d.ts +147 -0
  64. package/dist/spaces/thread.js +285 -0
  65. package/dist/spaces/transport/http.d.ts +51 -0
  66. package/dist/spaces/transport/http.js +113 -0
  67. package/dist/spaces/transport/index.d.ts +19 -0
  68. package/dist/spaces/transport/index.js +19 -0
  69. package/dist/spaces/transport/session.d.ts +120 -0
  70. package/dist/spaces/transport/session.js +188 -0
  71. package/dist/spaces/transport/tauri.d.ts +50 -0
  72. package/dist/spaces/transport/tauri.js +90 -0
  73. package/dist/spaces/transport/types.d.ts +123 -0
  74. package/dist/spaces/transport/types.js +59 -0
  75. package/dist/teleport/controller.d.ts +34 -0
  76. package/dist/teleport/controller.js +107 -0
  77. package/dist/teleport/drop.d.ts +62 -0
  78. package/dist/teleport/drop.js +138 -0
  79. package/dist/teleport/dropZone.d.ts +59 -0
  80. package/dist/teleport/dropZone.js +166 -0
  81. package/dist/teleport/element.d.ts +28 -0
  82. package/dist/teleport/element.js +340 -0
  83. package/dist/teleport/index.d.ts +32 -0
  84. package/dist/teleport/index.js +32 -0
  85. package/dist/teleport/install.d.ts +31 -0
  86. package/dist/teleport/install.js +65 -0
  87. package/dist/teleport/model.d.ts +245 -0
  88. package/dist/teleport/model.js +334 -0
  89. package/dist/teleport/windowDrag.d.ts +86 -0
  90. package/dist/teleport/windowDrag.js +71 -0
  91. package/package.json +93 -0
@@ -0,0 +1,2237 @@
1
+ import { type UniffiByteArray, type UniffiGcObject, type UniffiHandle, FfiConverterObject, RustBuffer, UniffiAbstractObject, destructorGuardSymbol, pointerLiteralSymbol, uniffiTypeNameSymbol, variantOrdinalSymbol } from "@ubjs/core";
2
+ /**
3
+ * Version of the SDK library.
4
+ */
5
+ export declare function cuaSdkVersion(): string;
6
+ /**
7
+ * A link to the errors-reference entry of a [`CuaError`] variant, by name
8
+ * (`InvalidArgument`, case-insensitive). An unknown name links to the
9
+ * page itself. The bindings' `doc_url` / `docUrl` on `CuaError` use it.
10
+ */
11
+ export declare function errorDocUrl(variant: string): string;
12
+ /**
13
+ * Fleet settings for the browser (static bearer only).
14
+ */
15
+ export type FleetSettings = {
16
+ /**
17
+ * Fleet API base URL.
18
+ */
19
+ baseUrl?: string;
20
+ /**
21
+ * Bearer token.
22
+ */
23
+ token?: string;
24
+ };
25
+ /**
26
+ * Generated factory for {@link FleetSettings} record objects.
27
+ */
28
+ export declare const FleetSettings: Readonly<{
29
+ create: (partial: Partial<FleetSettings> & Required<Omit<FleetSettings, "baseUrl" | "token">>) => FleetSettings;
30
+ new: (partial: Partial<FleetSettings> & Required<Omit<FleetSettings, "baseUrl" | "token">>) => FleetSettings;
31
+ defaults: () => Partial<FleetSettings>;
32
+ }>;
33
+ /**
34
+ * Configuration of the browser SDK.
35
+ */
36
+ export type CuaConfig = {
37
+ /**
38
+ * Fleet settings.
39
+ */
40
+ fleet?: FleetSettings;
41
+ };
42
+ /**
43
+ * Generated factory for {@link CuaConfig} record objects.
44
+ */
45
+ export declare const CuaConfig: Readonly<{
46
+ create: (partial: Partial<CuaConfig> & Required<Omit<CuaConfig, "fleet">>) => CuaConfig;
47
+ new: (partial: Partial<CuaConfig> & Required<Omit<CuaConfig, "fleet">>) => CuaConfig;
48
+ defaults: () => Partial<CuaConfig>;
49
+ }>;
50
+ /**
51
+ * How a process ended.
52
+ */
53
+ export type ExitInfo = {
54
+ /**
55
+ * Exit code for a normal exit.
56
+ */
57
+ code?: number;
58
+ /**
59
+ * Terminating signal (`kill`, `term`, ...).
60
+ */
61
+ signal?: string;
62
+ /**
63
+ * Stopped by its timeout.
64
+ */
65
+ timedOut: boolean;
66
+ /**
67
+ * Supervisor error (for example "executable not found").
68
+ */
69
+ error?: string;
70
+ /**
71
+ * `code == 0`.
72
+ */
73
+ success: boolean;
74
+ };
75
+ /**
76
+ * Generated factory for {@link ExitInfo} record objects.
77
+ */
78
+ export declare const ExitInfo: Readonly<{
79
+ create: (partial: Partial<ExitInfo> & Required<Omit<ExitInfo, "code" | "signal" | "timedOut" | "error" | "success">>) => ExitInfo;
80
+ new: (partial: Partial<ExitInfo> & Required<Omit<ExitInfo, "code" | "signal" | "timedOut" | "error" | "success">>) => ExitInfo;
81
+ defaults: () => Partial<ExitInfo>;
82
+ }>;
83
+ /**
84
+ * A file or directory in the guest.
85
+ */
86
+ export type FileEntry = {
87
+ /**
88
+ * Base name.
89
+ */
90
+ name: string;
91
+ /**
92
+ * Absolute path.
93
+ */
94
+ path: string;
95
+ /**
96
+ * `file`, `directory`, `symlink` or `other`.
97
+ */
98
+ kind: string;
99
+ /**
100
+ * Size in bytes.
101
+ */
102
+ size: bigint;
103
+ /**
104
+ * Unix mode bits.
105
+ */
106
+ mode: number;
107
+ /**
108
+ * Modification time (Unix ms), when known.
109
+ */
110
+ modifiedMs?: bigint;
111
+ /**
112
+ * Symlink target.
113
+ */
114
+ symlinkTarget?: string;
115
+ };
116
+ /**
117
+ * Generated factory for {@link FileEntry} record objects.
118
+ */
119
+ export declare const FileEntry: Readonly<{
120
+ create: (partial: Partial<FileEntry> & Required<Omit<FileEntry, "name" | "path" | "kind" | "size" | "mode" | "modifiedMs" | "symlinkTarget">>) => FileEntry;
121
+ new: (partial: Partial<FileEntry> & Required<Omit<FileEntry, "name" | "path" | "kind" | "size" | "mode" | "modifiedMs" | "symlinkTarget">>) => FileEntry;
122
+ defaults: () => Partial<FileEntry>;
123
+ }>;
124
+ /**
125
+ * A bound Fleet sandbox.
126
+ */
127
+ export type FleetSandbox = {
128
+ /**
129
+ * Sandbox name.
130
+ */
131
+ name: string;
132
+ /**
133
+ * Namespace.
134
+ */
135
+ namespace: string;
136
+ /**
137
+ * Claim name.
138
+ */
139
+ claim: string;
140
+ /**
141
+ * Declared services.
142
+ */
143
+ services: Array<string>;
144
+ };
145
+ /**
146
+ * Generated factory for {@link FleetSandbox} record objects.
147
+ */
148
+ export declare const FleetSandbox: Readonly<{
149
+ create: (partial: Partial<FleetSandbox> & Required<Omit<FleetSandbox, "name" | "namespace" | "claim" | "services">>) => FleetSandbox;
150
+ new: (partial: Partial<FleetSandbox> & Required<Omit<FleetSandbox, "name" | "namespace" | "claim" | "services">>) => FleetSandbox;
151
+ defaults: () => Partial<FleetSandbox>;
152
+ }>;
153
+ /**
154
+ * Media session options.
155
+ */
156
+ export type MediaOpenOptions = {
157
+ /**
158
+ * Display id (primary when unset). Ignored when `window_handle` is set.
159
+ */
160
+ display?: string;
161
+ /**
162
+ * Window handle (from `ListTargets` / `ListWindows`).
163
+ */
164
+ windowHandle?: string;
165
+ /**
166
+ * FPS cap (0 = driver default).
167
+ */
168
+ maxFps: number;
169
+ /**
170
+ * Long-edge cap (0 = native).
171
+ */
172
+ maxDimension: number;
173
+ /**
174
+ * Also negotiate desktop/app audio (Opus).
175
+ */
176
+ audio: boolean;
177
+ /**
178
+ * Audio only.
179
+ */
180
+ disableVideo: boolean;
181
+ /**
182
+ * Extra `OpenMediaRequest` fields as proto3 JSON, merged over the
183
+ * above (escape hatch).
184
+ */
185
+ requestJson?: string;
186
+ };
187
+ /**
188
+ * Generated factory for {@link MediaOpenOptions} record objects.
189
+ */
190
+ export declare const MediaOpenOptions: Readonly<{
191
+ create: (partial: Partial<MediaOpenOptions> & Required<Omit<MediaOpenOptions, "display" | "windowHandle" | "maxFps" | "maxDimension" | "audio" | "disableVideo" | "requestJson">>) => MediaOpenOptions;
192
+ new: (partial: Partial<MediaOpenOptions> & Required<Omit<MediaOpenOptions, "display" | "windowHandle" | "maxFps" | "maxDimension" | "audio" | "disableVideo" | "requestJson">>) => MediaOpenOptions;
193
+ defaults: () => Partial<MediaOpenOptions>;
194
+ }>;
195
+ /**
196
+ * A point.
197
+ */
198
+ export type Point = {
199
+ /**
200
+ * X.
201
+ */
202
+ x: number;
203
+ /**
204
+ * Y.
205
+ */
206
+ y: number;
207
+ };
208
+ /**
209
+ * Generated factory for {@link Point} record objects.
210
+ */
211
+ export declare const Point: Readonly<{
212
+ create: (partial: Partial<Point> & Required<Omit<Point, "x" | "y">>) => Point;
213
+ new: (partial: Partial<Point> & Required<Omit<Point, "x" | "y">>) => Point;
214
+ defaults: () => Partial<Point>;
215
+ }>;
216
+ /**
217
+ * Kind of a process event.
218
+ */
219
+ export declare enum ProcessEventKind {
220
+ /**
221
+ * stdout bytes.
222
+ */
223
+ Stdout = 0,
224
+ /**
225
+ * stderr bytes.
226
+ */
227
+ Stderr = 1,
228
+ /**
229
+ * PTY bytes.
230
+ */
231
+ Pty = 2,
232
+ /**
233
+ * The process ended (always last).
234
+ */
235
+ Exit = 3
236
+ }
237
+ /**
238
+ * One output chunk or the exit.
239
+ */
240
+ export type ProcessEvent = {
241
+ /**
242
+ * Kind.
243
+ */
244
+ kind: ProcessEventKind;
245
+ /**
246
+ * Combined-output offset of the first byte.
247
+ */
248
+ offset: bigint;
249
+ /**
250
+ * Bytes (empty for `Exit`).
251
+ */
252
+ data: ArrayBuffer;
253
+ /**
254
+ * Exit (only for `Exit`).
255
+ */
256
+ exit?: ExitInfo;
257
+ };
258
+ /**
259
+ * Generated factory for {@link ProcessEvent} record objects.
260
+ */
261
+ export declare const ProcessEvent: Readonly<{
262
+ create: (partial: Partial<ProcessEvent> & Required<Omit<ProcessEvent, "kind" | "offset" | "data" | "exit">>) => ProcessEvent;
263
+ new: (partial: Partial<ProcessEvent> & Required<Omit<ProcessEvent, "kind" | "offset" | "data" | "exit">>) => ProcessEvent;
264
+ defaults: () => Partial<ProcessEvent>;
265
+ }>;
266
+ /**
267
+ * Collected output of a finished process.
268
+ */
269
+ export type ProcessOutput = {
270
+ /**
271
+ * Exit.
272
+ */
273
+ exit: ExitInfo;
274
+ /**
275
+ * stdout bytes.
276
+ */
277
+ stdout: ArrayBuffer;
278
+ /**
279
+ * stderr bytes.
280
+ */
281
+ stderr: ArrayBuffer;
282
+ /**
283
+ * PTY bytes.
284
+ */
285
+ pty: ArrayBuffer;
286
+ };
287
+ /**
288
+ * Generated factory for {@link ProcessOutput} record objects.
289
+ */
290
+ export declare const ProcessOutput: Readonly<{
291
+ create: (partial: Partial<ProcessOutput> & Required<Omit<ProcessOutput, "exit" | "stdout" | "stderr" | "pty">>) => ProcessOutput;
292
+ new: (partial: Partial<ProcessOutput> & Required<Omit<ProcessOutput, "exit" | "stdout" | "stderr" | "pty">>) => ProcessOutput;
293
+ defaults: () => Partial<ProcessOutput>;
294
+ }>;
295
+ /**
296
+ * A PTY size.
297
+ */
298
+ export type PtySize = {
299
+ /**
300
+ * Columns.
301
+ */
302
+ cols: number;
303
+ /**
304
+ * Rows.
305
+ */
306
+ rows: number;
307
+ };
308
+ /**
309
+ * Generated factory for {@link PtySize} record objects.
310
+ */
311
+ export declare const PtySize: Readonly<{
312
+ create: (partial: Partial<PtySize> & Required<Omit<PtySize, "cols" | "rows">>) => PtySize;
313
+ new: (partial: Partial<PtySize> & Required<Omit<PtySize, "cols" | "rows">>) => PtySize;
314
+ defaults: () => Partial<PtySize>;
315
+ }>;
316
+ /**
317
+ * Screenshot encoding.
318
+ */
319
+ export declare enum ImageFormat {
320
+ /**
321
+ * PNG.
322
+ */
323
+ Png = 0,
324
+ /**
325
+ * JPEG.
326
+ */
327
+ Jpeg = 1,
328
+ /**
329
+ * WebP.
330
+ */
331
+ Webp = 2
332
+ }
333
+ /**
334
+ * A captured screenshot.
335
+ */
336
+ export type Screenshot = {
337
+ /**
338
+ * Encoded image.
339
+ */
340
+ image: ArrayBuffer;
341
+ /**
342
+ * Encoding.
343
+ */
344
+ format: ImageFormat;
345
+ /**
346
+ * Pixel width.
347
+ */
348
+ width: number;
349
+ /**
350
+ * Pixel height.
351
+ */
352
+ height: number;
353
+ /**
354
+ * Image pixels per logical point.
355
+ */
356
+ scale: number;
357
+ /**
358
+ * Id for screenshot-space input.
359
+ */
360
+ screenshotId: string;
361
+ };
362
+ /**
363
+ * Generated factory for {@link Screenshot} record objects.
364
+ */
365
+ export declare const Screenshot: Readonly<{
366
+ create: (partial: Partial<Screenshot> & Required<Omit<Screenshot, "image" | "format" | "width" | "height" | "scale" | "screenshotId">>) => Screenshot;
367
+ new: (partial: Partial<Screenshot> & Required<Omit<Screenshot, "image" | "format" | "width" | "height" | "scale" | "screenshotId">>) => Screenshot;
368
+ defaults: () => Partial<Screenshot>;
369
+ }>;
370
+ /**
371
+ * Screenshot options.
372
+ */
373
+ export type ScreenshotOptions = {
374
+ /**
375
+ * Display id (primary when unset).
376
+ */
377
+ display?: string;
378
+ /**
379
+ * Encoding (PNG when unset).
380
+ */
381
+ format?: ImageFormat;
382
+ /**
383
+ * Lossy quality 1–100.
384
+ */
385
+ quality?: number;
386
+ /**
387
+ * Long-edge cap in pixels.
388
+ */
389
+ maxDimension?: number;
390
+ /**
391
+ * Draw the cursor.
392
+ */
393
+ includeCursor: boolean;
394
+ };
395
+ /**
396
+ * Generated factory for {@link ScreenshotOptions} record objects.
397
+ */
398
+ export declare const ScreenshotOptions: Readonly<{
399
+ create: (partial: Partial<ScreenshotOptions> & Required<Omit<ScreenshotOptions, "display" | "maxDimension" | "format" | "quality" | "includeCursor">>) => ScreenshotOptions;
400
+ new: (partial: Partial<ScreenshotOptions> & Required<Omit<ScreenshotOptions, "display" | "maxDimension" | "format" | "quality" | "includeCursor">>) => ScreenshotOptions;
401
+ defaults: () => Partial<ScreenshotOptions>;
402
+ }>;
403
+ /**
404
+ * One capability flag.
405
+ */
406
+ export type SpacesdFeature = {
407
+ /**
408
+ * Feature name (for example `a11y`, `stream.h264`, `audio.desktop`).
409
+ */
410
+ name: string;
411
+ /**
412
+ * Supported in this guest.
413
+ */
414
+ supported: boolean;
415
+ /**
416
+ * Limitation when degraded or unsupported.
417
+ */
418
+ limitation?: string;
419
+ /**
420
+ * Extra attributes.
421
+ */
422
+ attributes: Map<string, string>;
423
+ };
424
+ /**
425
+ * Generated factory for {@link SpacesdFeature} record objects.
426
+ */
427
+ export declare const SpacesdFeature: Readonly<{
428
+ create: (partial: Partial<SpacesdFeature> & Required<Omit<SpacesdFeature, "name" | "supported" | "limitation" | "attributes">>) => SpacesdFeature;
429
+ new: (partial: Partial<SpacesdFeature> & Required<Omit<SpacesdFeature, "name" | "supported" | "limitation" | "attributes">>) => SpacesdFeature;
430
+ defaults: () => Partial<SpacesdFeature>;
431
+ }>;
432
+ /**
433
+ * `SystemService.GetCapabilities`, summarized. `json` has everything.
434
+ */
435
+ export type SpacesdCapabilities = {
436
+ /**
437
+ * spacesd version.
438
+ */
439
+ version: string;
440
+ /**
441
+ * `cua.env.v1` protocol version.
442
+ */
443
+ protocolVersion: number;
444
+ /**
445
+ * Additive contract revision.
446
+ */
447
+ protocolRevision: number;
448
+ /**
449
+ * OS family (`linux`, `macos`, `windows`).
450
+ */
451
+ osFamily: string;
452
+ /**
453
+ * OS name.
454
+ */
455
+ osName: string;
456
+ /**
457
+ * OS version.
458
+ */
459
+ osVersion: string;
460
+ /**
461
+ * CPU architecture.
462
+ */
463
+ arch: string;
464
+ /**
465
+ * Guest hostname.
466
+ */
467
+ hostname: string;
468
+ /**
469
+ * `SystemService.Init` has run.
470
+ */
471
+ initialized: boolean;
472
+ /**
473
+ * Feature flags.
474
+ */
475
+ features: Array<SpacesdFeature>;
476
+ /**
477
+ * The full response as proto3 JSON.
478
+ */
479
+ json: string;
480
+ };
481
+ /**
482
+ * Generated factory for {@link SpacesdCapabilities} record objects.
483
+ */
484
+ export declare const SpacesdCapabilities: Readonly<{
485
+ create: (partial: Partial<SpacesdCapabilities> & Required<Omit<SpacesdCapabilities, "version" | "protocolVersion" | "protocolRevision" | "osFamily" | "osName" | "osVersion" | "arch" | "hostname" | "initialized" | "features" | "json">>) => SpacesdCapabilities;
486
+ new: (partial: Partial<SpacesdCapabilities> & Required<Omit<SpacesdCapabilities, "version" | "protocolVersion" | "protocolRevision" | "osFamily" | "osName" | "osVersion" | "arch" | "hostname" | "initialized" | "features" | "json">>) => SpacesdCapabilities;
487
+ defaults: () => Partial<SpacesdCapabilities>;
488
+ }>;
489
+ /**
490
+ * A command to run in the guest.
491
+ */
492
+ export type SpacesdCommand = {
493
+ /**
494
+ * Program (absolute path or `PATH` lookup).
495
+ */
496
+ program: string;
497
+ /**
498
+ * Arguments.
499
+ */
500
+ args: Array<string>;
501
+ /**
502
+ * Extra environment.
503
+ */
504
+ env: Map<string, string>;
505
+ /**
506
+ * Working directory.
507
+ */
508
+ cwd?: string;
509
+ /**
510
+ * Run as this user.
511
+ */
512
+ user?: string;
513
+ /**
514
+ * Kill after this long.
515
+ */
516
+ timeoutMs?: number;
517
+ /**
518
+ * Tag for reattaching (`attach(tag=…)`).
519
+ */
520
+ tag?: string;
521
+ /**
522
+ * Keep stdin open for `write_stdin`.
523
+ */
524
+ stdin: boolean;
525
+ /**
526
+ * Run in a PTY of this size.
527
+ */
528
+ pty?: PtySize;
529
+ };
530
+ /**
531
+ * Generated factory for {@link SpacesdCommand} record objects.
532
+ */
533
+ export declare const SpacesdCommand: Readonly<{
534
+ create: (partial: Partial<SpacesdCommand> & Required<Omit<SpacesdCommand, "pty" | "program" | "args" | "env" | "cwd" | "user" | "timeoutMs" | "tag" | "stdin">>) => SpacesdCommand;
535
+ new: (partial: Partial<SpacesdCommand> & Required<Omit<SpacesdCommand, "pty" | "program" | "args" | "env" | "cwd" | "user" | "timeoutMs" | "tag" | "stdin">>) => SpacesdCommand;
536
+ defaults: () => Partial<SpacesdCommand>;
537
+ }>;
538
+ /**
539
+ * Result of an upload or download.
540
+ */
541
+ export type TransferResult = {
542
+ /**
543
+ * Bytes transferred.
544
+ */
545
+ size: bigint;
546
+ /**
547
+ * SHA-256 (hex) of the content.
548
+ */
549
+ sha256: string;
550
+ /**
551
+ * Resumes after dropped connections.
552
+ */
553
+ resumes: number;
554
+ };
555
+ /**
556
+ * Generated factory for {@link TransferResult} record objects.
557
+ */
558
+ export declare const TransferResult: Readonly<{
559
+ create: (partial: Partial<TransferResult> & Required<Omit<TransferResult, "size" | "sha256" | "resumes">>) => TransferResult;
560
+ new: (partial: Partial<TransferResult> & Required<Omit<TransferResult, "size" | "sha256" | "resumes">>) => TransferResult;
561
+ defaults: () => Partial<TransferResult>;
562
+ }>;
563
+ /**
564
+ * Upload options.
565
+ */
566
+ export type UploadOptions = {
567
+ /**
568
+ * Fail when the file exists (instead of overwriting).
569
+ */
570
+ createNew: boolean;
571
+ /**
572
+ * Append instead of overwriting.
573
+ */
574
+ append: boolean;
575
+ /**
576
+ * Unix permissions (0 = default).
577
+ */
578
+ permissions: number;
579
+ /**
580
+ * Create missing parent directories.
581
+ */
582
+ createParents: boolean;
583
+ };
584
+ /**
585
+ * Generated factory for {@link UploadOptions} record objects.
586
+ */
587
+ export declare const UploadOptions: Readonly<{
588
+ create: (partial: Partial<UploadOptions> & Required<Omit<UploadOptions, "createNew" | "append" | "permissions" | "createParents">>) => UploadOptions;
589
+ new: (partial: Partial<UploadOptions> & Required<Omit<UploadOptions, "createNew" | "append" | "permissions" | "createParents">>) => UploadOptions;
590
+ defaults: () => Partial<UploadOptions>;
591
+ }>;
592
+ export declare enum CuaError_Tags {
593
+ InvalidArgument = "InvalidArgument",
594
+ InvalidPlacement = "InvalidPlacement",
595
+ NotFound = "NotFound",
596
+ ProviderNotConfigured = "ProviderNotConfigured",
597
+ Unsupported = "Unsupported",
598
+ SpacesdNotAvailable = "SpacesdNotAvailable",
599
+ Timeout = "Timeout",
600
+ Fleet = "Fleet",
601
+ FleetAdmissionDenied = "FleetAdmissionDenied",
602
+ CloudCreditExhausted = "CloudCreditExhausted",
603
+ Runtime = "Runtime",
604
+ Env = "Env",
605
+ Http = "Http",
606
+ Unauthenticated = "Unauthenticated",
607
+ PermissionDenied = "PermissionDenied",
608
+ Transport = "Transport",
609
+ DaemonNotRunning = "DaemonNotRunning",
610
+ Closed = "Closed",
611
+ CapabilityMissing = "CapabilityMissing",
612
+ HostCapabilityMissing = "HostCapabilityMissing",
613
+ TeleportRefused = "TeleportRefused",
614
+ PoolSpecMismatch = "PoolSpecMismatch",
615
+ ClaimSecretsNotDelivered = "ClaimSecretsNotDelivered",
616
+ Internal = "Internal",
617
+ AmbiguousSandbox = "AmbiguousSandbox",
618
+ InsufficientDisk = "InsufficientDisk",
619
+ ImageNotPublished = "ImageNotPublished",
620
+ Cancelled = "Cancelled",
621
+ Cloud = "Cloud"
622
+ }
623
+ /**
624
+ * Every error the SDK raises. Flat across the FFI: each language sees one
625
+ * exception/error type with a case per variant and the message.
626
+ */
627
+ export declare const CuaError: {
628
+ InvalidArgument: {
629
+ new (message: string): {
630
+ readonly tag: CuaError_Tags.InvalidArgument;
631
+ /**
632
+ * @private
633
+ * This field is private and should not be used.
634
+ */
635
+ readonly [uniffiTypeNameSymbol]: string;
636
+ /**
637
+ * @private
638
+ * This field is private and should not be used.
639
+ */
640
+ readonly [variantOrdinalSymbol]: 1;
641
+ name: string;
642
+ message: string;
643
+ stack?: string;
644
+ cause?: unknown;
645
+ };
646
+ instanceOf(e: any): e is {
647
+ readonly tag: CuaError_Tags.InvalidArgument;
648
+ /**
649
+ * @private
650
+ * This field is private and should not be used.
651
+ */
652
+ readonly [uniffiTypeNameSymbol]: string;
653
+ /**
654
+ * @private
655
+ * This field is private and should not be used.
656
+ */
657
+ readonly [variantOrdinalSymbol]: 1;
658
+ name: string;
659
+ message: string;
660
+ stack?: string;
661
+ cause?: unknown;
662
+ };
663
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
664
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
665
+ stackTraceLimit: number;
666
+ };
667
+ InvalidPlacement: {
668
+ new (message: string): {
669
+ readonly tag: CuaError_Tags.InvalidPlacement;
670
+ /**
671
+ * @private
672
+ * This field is private and should not be used.
673
+ */
674
+ readonly [uniffiTypeNameSymbol]: string;
675
+ /**
676
+ * @private
677
+ * This field is private and should not be used.
678
+ */
679
+ readonly [variantOrdinalSymbol]: 2;
680
+ name: string;
681
+ message: string;
682
+ stack?: string;
683
+ cause?: unknown;
684
+ };
685
+ instanceOf(e: any): e is {
686
+ readonly tag: CuaError_Tags.InvalidPlacement;
687
+ /**
688
+ * @private
689
+ * This field is private and should not be used.
690
+ */
691
+ readonly [uniffiTypeNameSymbol]: string;
692
+ /**
693
+ * @private
694
+ * This field is private and should not be used.
695
+ */
696
+ readonly [variantOrdinalSymbol]: 2;
697
+ name: string;
698
+ message: string;
699
+ stack?: string;
700
+ cause?: unknown;
701
+ };
702
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
703
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
704
+ stackTraceLimit: number;
705
+ };
706
+ NotFound: {
707
+ new (message: string): {
708
+ readonly tag: CuaError_Tags.NotFound;
709
+ /**
710
+ * @private
711
+ * This field is private and should not be used.
712
+ */
713
+ readonly [uniffiTypeNameSymbol]: string;
714
+ /**
715
+ * @private
716
+ * This field is private and should not be used.
717
+ */
718
+ readonly [variantOrdinalSymbol]: 3;
719
+ name: string;
720
+ message: string;
721
+ stack?: string;
722
+ cause?: unknown;
723
+ };
724
+ instanceOf(e: any): e is {
725
+ readonly tag: CuaError_Tags.NotFound;
726
+ /**
727
+ * @private
728
+ * This field is private and should not be used.
729
+ */
730
+ readonly [uniffiTypeNameSymbol]: string;
731
+ /**
732
+ * @private
733
+ * This field is private and should not be used.
734
+ */
735
+ readonly [variantOrdinalSymbol]: 3;
736
+ name: string;
737
+ message: string;
738
+ stack?: string;
739
+ cause?: unknown;
740
+ };
741
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
742
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
743
+ stackTraceLimit: number;
744
+ };
745
+ ProviderNotConfigured: {
746
+ new (message: string): {
747
+ readonly tag: CuaError_Tags.ProviderNotConfigured;
748
+ /**
749
+ * @private
750
+ * This field is private and should not be used.
751
+ */
752
+ readonly [uniffiTypeNameSymbol]: string;
753
+ /**
754
+ * @private
755
+ * This field is private and should not be used.
756
+ */
757
+ readonly [variantOrdinalSymbol]: 4;
758
+ name: string;
759
+ message: string;
760
+ stack?: string;
761
+ cause?: unknown;
762
+ };
763
+ instanceOf(e: any): e is {
764
+ readonly tag: CuaError_Tags.ProviderNotConfigured;
765
+ /**
766
+ * @private
767
+ * This field is private and should not be used.
768
+ */
769
+ readonly [uniffiTypeNameSymbol]: string;
770
+ /**
771
+ * @private
772
+ * This field is private and should not be used.
773
+ */
774
+ readonly [variantOrdinalSymbol]: 4;
775
+ name: string;
776
+ message: string;
777
+ stack?: string;
778
+ cause?: unknown;
779
+ };
780
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
781
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
782
+ stackTraceLimit: number;
783
+ };
784
+ Unsupported: {
785
+ new (message: string): {
786
+ readonly tag: CuaError_Tags.Unsupported;
787
+ /**
788
+ * @private
789
+ * This field is private and should not be used.
790
+ */
791
+ readonly [uniffiTypeNameSymbol]: string;
792
+ /**
793
+ * @private
794
+ * This field is private and should not be used.
795
+ */
796
+ readonly [variantOrdinalSymbol]: 5;
797
+ name: string;
798
+ message: string;
799
+ stack?: string;
800
+ cause?: unknown;
801
+ };
802
+ instanceOf(e: any): e is {
803
+ readonly tag: CuaError_Tags.Unsupported;
804
+ /**
805
+ * @private
806
+ * This field is private and should not be used.
807
+ */
808
+ readonly [uniffiTypeNameSymbol]: string;
809
+ /**
810
+ * @private
811
+ * This field is private and should not be used.
812
+ */
813
+ readonly [variantOrdinalSymbol]: 5;
814
+ name: string;
815
+ message: string;
816
+ stack?: string;
817
+ cause?: unknown;
818
+ };
819
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
820
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
821
+ stackTraceLimit: number;
822
+ };
823
+ SpacesdNotAvailable: {
824
+ new (message: string): {
825
+ readonly tag: CuaError_Tags.SpacesdNotAvailable;
826
+ /**
827
+ * @private
828
+ * This field is private and should not be used.
829
+ */
830
+ readonly [uniffiTypeNameSymbol]: string;
831
+ /**
832
+ * @private
833
+ * This field is private and should not be used.
834
+ */
835
+ readonly [variantOrdinalSymbol]: 6;
836
+ name: string;
837
+ message: string;
838
+ stack?: string;
839
+ cause?: unknown;
840
+ };
841
+ instanceOf(e: any): e is {
842
+ readonly tag: CuaError_Tags.SpacesdNotAvailable;
843
+ /**
844
+ * @private
845
+ * This field is private and should not be used.
846
+ */
847
+ readonly [uniffiTypeNameSymbol]: string;
848
+ /**
849
+ * @private
850
+ * This field is private and should not be used.
851
+ */
852
+ readonly [variantOrdinalSymbol]: 6;
853
+ name: string;
854
+ message: string;
855
+ stack?: string;
856
+ cause?: unknown;
857
+ };
858
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
859
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
860
+ stackTraceLimit: number;
861
+ };
862
+ Timeout: {
863
+ new (message: string): {
864
+ readonly tag: CuaError_Tags.Timeout;
865
+ /**
866
+ * @private
867
+ * This field is private and should not be used.
868
+ */
869
+ readonly [uniffiTypeNameSymbol]: string;
870
+ /**
871
+ * @private
872
+ * This field is private and should not be used.
873
+ */
874
+ readonly [variantOrdinalSymbol]: 7;
875
+ name: string;
876
+ message: string;
877
+ stack?: string;
878
+ cause?: unknown;
879
+ };
880
+ instanceOf(e: any): e is {
881
+ readonly tag: CuaError_Tags.Timeout;
882
+ /**
883
+ * @private
884
+ * This field is private and should not be used.
885
+ */
886
+ readonly [uniffiTypeNameSymbol]: string;
887
+ /**
888
+ * @private
889
+ * This field is private and should not be used.
890
+ */
891
+ readonly [variantOrdinalSymbol]: 7;
892
+ name: string;
893
+ message: string;
894
+ stack?: string;
895
+ cause?: unknown;
896
+ };
897
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
898
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
899
+ stackTraceLimit: number;
900
+ };
901
+ Fleet: {
902
+ new (message: string): {
903
+ readonly tag: CuaError_Tags.Fleet;
904
+ /**
905
+ * @private
906
+ * This field is private and should not be used.
907
+ */
908
+ readonly [uniffiTypeNameSymbol]: string;
909
+ /**
910
+ * @private
911
+ * This field is private and should not be used.
912
+ */
913
+ readonly [variantOrdinalSymbol]: 8;
914
+ name: string;
915
+ message: string;
916
+ stack?: string;
917
+ cause?: unknown;
918
+ };
919
+ instanceOf(e: any): e is {
920
+ readonly tag: CuaError_Tags.Fleet;
921
+ /**
922
+ * @private
923
+ * This field is private and should not be used.
924
+ */
925
+ readonly [uniffiTypeNameSymbol]: string;
926
+ /**
927
+ * @private
928
+ * This field is private and should not be used.
929
+ */
930
+ readonly [variantOrdinalSymbol]: 8;
931
+ name: string;
932
+ message: string;
933
+ stack?: string;
934
+ cause?: unknown;
935
+ };
936
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
937
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
938
+ stackTraceLimit: number;
939
+ };
940
+ FleetAdmissionDenied: {
941
+ new (message: string): {
942
+ readonly tag: CuaError_Tags.FleetAdmissionDenied;
943
+ /**
944
+ * @private
945
+ * This field is private and should not be used.
946
+ */
947
+ readonly [uniffiTypeNameSymbol]: string;
948
+ /**
949
+ * @private
950
+ * This field is private and should not be used.
951
+ */
952
+ readonly [variantOrdinalSymbol]: 9;
953
+ name: string;
954
+ message: string;
955
+ stack?: string;
956
+ cause?: unknown;
957
+ };
958
+ instanceOf(e: any): e is {
959
+ readonly tag: CuaError_Tags.FleetAdmissionDenied;
960
+ /**
961
+ * @private
962
+ * This field is private and should not be used.
963
+ */
964
+ readonly [uniffiTypeNameSymbol]: string;
965
+ /**
966
+ * @private
967
+ * This field is private and should not be used.
968
+ */
969
+ readonly [variantOrdinalSymbol]: 9;
970
+ name: string;
971
+ message: string;
972
+ stack?: string;
973
+ cause?: unknown;
974
+ };
975
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
976
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
977
+ stackTraceLimit: number;
978
+ };
979
+ CloudCreditExhausted: {
980
+ new (message: string): {
981
+ readonly tag: CuaError_Tags.CloudCreditExhausted;
982
+ /**
983
+ * @private
984
+ * This field is private and should not be used.
985
+ */
986
+ readonly [uniffiTypeNameSymbol]: string;
987
+ /**
988
+ * @private
989
+ * This field is private and should not be used.
990
+ */
991
+ readonly [variantOrdinalSymbol]: 10;
992
+ name: string;
993
+ message: string;
994
+ stack?: string;
995
+ cause?: unknown;
996
+ };
997
+ instanceOf(e: any): e is {
998
+ readonly tag: CuaError_Tags.CloudCreditExhausted;
999
+ /**
1000
+ * @private
1001
+ * This field is private and should not be used.
1002
+ */
1003
+ readonly [uniffiTypeNameSymbol]: string;
1004
+ /**
1005
+ * @private
1006
+ * This field is private and should not be used.
1007
+ */
1008
+ readonly [variantOrdinalSymbol]: 10;
1009
+ name: string;
1010
+ message: string;
1011
+ stack?: string;
1012
+ cause?: unknown;
1013
+ };
1014
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1015
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1016
+ stackTraceLimit: number;
1017
+ };
1018
+ Runtime: {
1019
+ new (message: string): {
1020
+ readonly tag: CuaError_Tags.Runtime;
1021
+ /**
1022
+ * @private
1023
+ * This field is private and should not be used.
1024
+ */
1025
+ readonly [uniffiTypeNameSymbol]: string;
1026
+ /**
1027
+ * @private
1028
+ * This field is private and should not be used.
1029
+ */
1030
+ readonly [variantOrdinalSymbol]: 11;
1031
+ name: string;
1032
+ message: string;
1033
+ stack?: string;
1034
+ cause?: unknown;
1035
+ };
1036
+ instanceOf(e: any): e is {
1037
+ readonly tag: CuaError_Tags.Runtime;
1038
+ /**
1039
+ * @private
1040
+ * This field is private and should not be used.
1041
+ */
1042
+ readonly [uniffiTypeNameSymbol]: string;
1043
+ /**
1044
+ * @private
1045
+ * This field is private and should not be used.
1046
+ */
1047
+ readonly [variantOrdinalSymbol]: 11;
1048
+ name: string;
1049
+ message: string;
1050
+ stack?: string;
1051
+ cause?: unknown;
1052
+ };
1053
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1054
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1055
+ stackTraceLimit: number;
1056
+ };
1057
+ Env: {
1058
+ new (message: string): {
1059
+ readonly tag: CuaError_Tags.Env;
1060
+ /**
1061
+ * @private
1062
+ * This field is private and should not be used.
1063
+ */
1064
+ readonly [uniffiTypeNameSymbol]: string;
1065
+ /**
1066
+ * @private
1067
+ * This field is private and should not be used.
1068
+ */
1069
+ readonly [variantOrdinalSymbol]: 12;
1070
+ name: string;
1071
+ message: string;
1072
+ stack?: string;
1073
+ cause?: unknown;
1074
+ };
1075
+ instanceOf(e: any): e is {
1076
+ readonly tag: CuaError_Tags.Env;
1077
+ /**
1078
+ * @private
1079
+ * This field is private and should not be used.
1080
+ */
1081
+ readonly [uniffiTypeNameSymbol]: string;
1082
+ /**
1083
+ * @private
1084
+ * This field is private and should not be used.
1085
+ */
1086
+ readonly [variantOrdinalSymbol]: 12;
1087
+ name: string;
1088
+ message: string;
1089
+ stack?: string;
1090
+ cause?: unknown;
1091
+ };
1092
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1093
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1094
+ stackTraceLimit: number;
1095
+ };
1096
+ Http: {
1097
+ new (message: string): {
1098
+ readonly tag: CuaError_Tags.Http;
1099
+ /**
1100
+ * @private
1101
+ * This field is private and should not be used.
1102
+ */
1103
+ readonly [uniffiTypeNameSymbol]: string;
1104
+ /**
1105
+ * @private
1106
+ * This field is private and should not be used.
1107
+ */
1108
+ readonly [variantOrdinalSymbol]: 13;
1109
+ name: string;
1110
+ message: string;
1111
+ stack?: string;
1112
+ cause?: unknown;
1113
+ };
1114
+ instanceOf(e: any): e is {
1115
+ readonly tag: CuaError_Tags.Http;
1116
+ /**
1117
+ * @private
1118
+ * This field is private and should not be used.
1119
+ */
1120
+ readonly [uniffiTypeNameSymbol]: string;
1121
+ /**
1122
+ * @private
1123
+ * This field is private and should not be used.
1124
+ */
1125
+ readonly [variantOrdinalSymbol]: 13;
1126
+ name: string;
1127
+ message: string;
1128
+ stack?: string;
1129
+ cause?: unknown;
1130
+ };
1131
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1132
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1133
+ stackTraceLimit: number;
1134
+ };
1135
+ Unauthenticated: {
1136
+ new (message: string): {
1137
+ readonly tag: CuaError_Tags.Unauthenticated;
1138
+ /**
1139
+ * @private
1140
+ * This field is private and should not be used.
1141
+ */
1142
+ readonly [uniffiTypeNameSymbol]: string;
1143
+ /**
1144
+ * @private
1145
+ * This field is private and should not be used.
1146
+ */
1147
+ readonly [variantOrdinalSymbol]: 14;
1148
+ name: string;
1149
+ message: string;
1150
+ stack?: string;
1151
+ cause?: unknown;
1152
+ };
1153
+ instanceOf(e: any): e is {
1154
+ readonly tag: CuaError_Tags.Unauthenticated;
1155
+ /**
1156
+ * @private
1157
+ * This field is private and should not be used.
1158
+ */
1159
+ readonly [uniffiTypeNameSymbol]: string;
1160
+ /**
1161
+ * @private
1162
+ * This field is private and should not be used.
1163
+ */
1164
+ readonly [variantOrdinalSymbol]: 14;
1165
+ name: string;
1166
+ message: string;
1167
+ stack?: string;
1168
+ cause?: unknown;
1169
+ };
1170
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1171
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1172
+ stackTraceLimit: number;
1173
+ };
1174
+ PermissionDenied: {
1175
+ new (message: string): {
1176
+ readonly tag: CuaError_Tags.PermissionDenied;
1177
+ /**
1178
+ * @private
1179
+ * This field is private and should not be used.
1180
+ */
1181
+ readonly [uniffiTypeNameSymbol]: string;
1182
+ /**
1183
+ * @private
1184
+ * This field is private and should not be used.
1185
+ */
1186
+ readonly [variantOrdinalSymbol]: 15;
1187
+ name: string;
1188
+ message: string;
1189
+ stack?: string;
1190
+ cause?: unknown;
1191
+ };
1192
+ instanceOf(e: any): e is {
1193
+ readonly tag: CuaError_Tags.PermissionDenied;
1194
+ /**
1195
+ * @private
1196
+ * This field is private and should not be used.
1197
+ */
1198
+ readonly [uniffiTypeNameSymbol]: string;
1199
+ /**
1200
+ * @private
1201
+ * This field is private and should not be used.
1202
+ */
1203
+ readonly [variantOrdinalSymbol]: 15;
1204
+ name: string;
1205
+ message: string;
1206
+ stack?: string;
1207
+ cause?: unknown;
1208
+ };
1209
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1210
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1211
+ stackTraceLimit: number;
1212
+ };
1213
+ Transport: {
1214
+ new (message: string): {
1215
+ readonly tag: CuaError_Tags.Transport;
1216
+ /**
1217
+ * @private
1218
+ * This field is private and should not be used.
1219
+ */
1220
+ readonly [uniffiTypeNameSymbol]: string;
1221
+ /**
1222
+ * @private
1223
+ * This field is private and should not be used.
1224
+ */
1225
+ readonly [variantOrdinalSymbol]: 16;
1226
+ name: string;
1227
+ message: string;
1228
+ stack?: string;
1229
+ cause?: unknown;
1230
+ };
1231
+ instanceOf(e: any): e is {
1232
+ readonly tag: CuaError_Tags.Transport;
1233
+ /**
1234
+ * @private
1235
+ * This field is private and should not be used.
1236
+ */
1237
+ readonly [uniffiTypeNameSymbol]: string;
1238
+ /**
1239
+ * @private
1240
+ * This field is private and should not be used.
1241
+ */
1242
+ readonly [variantOrdinalSymbol]: 16;
1243
+ name: string;
1244
+ message: string;
1245
+ stack?: string;
1246
+ cause?: unknown;
1247
+ };
1248
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1249
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1250
+ stackTraceLimit: number;
1251
+ };
1252
+ DaemonNotRunning: {
1253
+ new (message: string): {
1254
+ readonly tag: CuaError_Tags.DaemonNotRunning;
1255
+ /**
1256
+ * @private
1257
+ * This field is private and should not be used.
1258
+ */
1259
+ readonly [uniffiTypeNameSymbol]: string;
1260
+ /**
1261
+ * @private
1262
+ * This field is private and should not be used.
1263
+ */
1264
+ readonly [variantOrdinalSymbol]: 17;
1265
+ name: string;
1266
+ message: string;
1267
+ stack?: string;
1268
+ cause?: unknown;
1269
+ };
1270
+ instanceOf(e: any): e is {
1271
+ readonly tag: CuaError_Tags.DaemonNotRunning;
1272
+ /**
1273
+ * @private
1274
+ * This field is private and should not be used.
1275
+ */
1276
+ readonly [uniffiTypeNameSymbol]: string;
1277
+ /**
1278
+ * @private
1279
+ * This field is private and should not be used.
1280
+ */
1281
+ readonly [variantOrdinalSymbol]: 17;
1282
+ name: string;
1283
+ message: string;
1284
+ stack?: string;
1285
+ cause?: unknown;
1286
+ };
1287
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1288
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1289
+ stackTraceLimit: number;
1290
+ };
1291
+ Closed: {
1292
+ new (message: string): {
1293
+ readonly tag: CuaError_Tags.Closed;
1294
+ /**
1295
+ * @private
1296
+ * This field is private and should not be used.
1297
+ */
1298
+ readonly [uniffiTypeNameSymbol]: string;
1299
+ /**
1300
+ * @private
1301
+ * This field is private and should not be used.
1302
+ */
1303
+ readonly [variantOrdinalSymbol]: 18;
1304
+ name: string;
1305
+ message: string;
1306
+ stack?: string;
1307
+ cause?: unknown;
1308
+ };
1309
+ instanceOf(e: any): e is {
1310
+ readonly tag: CuaError_Tags.Closed;
1311
+ /**
1312
+ * @private
1313
+ * This field is private and should not be used.
1314
+ */
1315
+ readonly [uniffiTypeNameSymbol]: string;
1316
+ /**
1317
+ * @private
1318
+ * This field is private and should not be used.
1319
+ */
1320
+ readonly [variantOrdinalSymbol]: 18;
1321
+ name: string;
1322
+ message: string;
1323
+ stack?: string;
1324
+ cause?: unknown;
1325
+ };
1326
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1327
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1328
+ stackTraceLimit: number;
1329
+ };
1330
+ CapabilityMissing: {
1331
+ new (message: string): {
1332
+ readonly tag: CuaError_Tags.CapabilityMissing;
1333
+ /**
1334
+ * @private
1335
+ * This field is private and should not be used.
1336
+ */
1337
+ readonly [uniffiTypeNameSymbol]: string;
1338
+ /**
1339
+ * @private
1340
+ * This field is private and should not be used.
1341
+ */
1342
+ readonly [variantOrdinalSymbol]: 19;
1343
+ name: string;
1344
+ message: string;
1345
+ stack?: string;
1346
+ cause?: unknown;
1347
+ };
1348
+ instanceOf(e: any): e is {
1349
+ readonly tag: CuaError_Tags.CapabilityMissing;
1350
+ /**
1351
+ * @private
1352
+ * This field is private and should not be used.
1353
+ */
1354
+ readonly [uniffiTypeNameSymbol]: string;
1355
+ /**
1356
+ * @private
1357
+ * This field is private and should not be used.
1358
+ */
1359
+ readonly [variantOrdinalSymbol]: 19;
1360
+ name: string;
1361
+ message: string;
1362
+ stack?: string;
1363
+ cause?: unknown;
1364
+ };
1365
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1366
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1367
+ stackTraceLimit: number;
1368
+ };
1369
+ HostCapabilityMissing: {
1370
+ new (message: string): {
1371
+ readonly tag: CuaError_Tags.HostCapabilityMissing;
1372
+ /**
1373
+ * @private
1374
+ * This field is private and should not be used.
1375
+ */
1376
+ readonly [uniffiTypeNameSymbol]: string;
1377
+ /**
1378
+ * @private
1379
+ * This field is private and should not be used.
1380
+ */
1381
+ readonly [variantOrdinalSymbol]: 20;
1382
+ name: string;
1383
+ message: string;
1384
+ stack?: string;
1385
+ cause?: unknown;
1386
+ };
1387
+ instanceOf(e: any): e is {
1388
+ readonly tag: CuaError_Tags.HostCapabilityMissing;
1389
+ /**
1390
+ * @private
1391
+ * This field is private and should not be used.
1392
+ */
1393
+ readonly [uniffiTypeNameSymbol]: string;
1394
+ /**
1395
+ * @private
1396
+ * This field is private and should not be used.
1397
+ */
1398
+ readonly [variantOrdinalSymbol]: 20;
1399
+ name: string;
1400
+ message: string;
1401
+ stack?: string;
1402
+ cause?: unknown;
1403
+ };
1404
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1405
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1406
+ stackTraceLimit: number;
1407
+ };
1408
+ TeleportRefused: {
1409
+ new (message: string): {
1410
+ readonly tag: CuaError_Tags.TeleportRefused;
1411
+ /**
1412
+ * @private
1413
+ * This field is private and should not be used.
1414
+ */
1415
+ readonly [uniffiTypeNameSymbol]: string;
1416
+ /**
1417
+ * @private
1418
+ * This field is private and should not be used.
1419
+ */
1420
+ readonly [variantOrdinalSymbol]: 21;
1421
+ name: string;
1422
+ message: string;
1423
+ stack?: string;
1424
+ cause?: unknown;
1425
+ };
1426
+ instanceOf(e: any): e is {
1427
+ readonly tag: CuaError_Tags.TeleportRefused;
1428
+ /**
1429
+ * @private
1430
+ * This field is private and should not be used.
1431
+ */
1432
+ readonly [uniffiTypeNameSymbol]: string;
1433
+ /**
1434
+ * @private
1435
+ * This field is private and should not be used.
1436
+ */
1437
+ readonly [variantOrdinalSymbol]: 21;
1438
+ name: string;
1439
+ message: string;
1440
+ stack?: string;
1441
+ cause?: unknown;
1442
+ };
1443
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1444
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1445
+ stackTraceLimit: number;
1446
+ };
1447
+ PoolSpecMismatch: {
1448
+ new (message: string): {
1449
+ readonly tag: CuaError_Tags.PoolSpecMismatch;
1450
+ /**
1451
+ * @private
1452
+ * This field is private and should not be used.
1453
+ */
1454
+ readonly [uniffiTypeNameSymbol]: string;
1455
+ /**
1456
+ * @private
1457
+ * This field is private and should not be used.
1458
+ */
1459
+ readonly [variantOrdinalSymbol]: 22;
1460
+ name: string;
1461
+ message: string;
1462
+ stack?: string;
1463
+ cause?: unknown;
1464
+ };
1465
+ instanceOf(e: any): e is {
1466
+ readonly tag: CuaError_Tags.PoolSpecMismatch;
1467
+ /**
1468
+ * @private
1469
+ * This field is private and should not be used.
1470
+ */
1471
+ readonly [uniffiTypeNameSymbol]: string;
1472
+ /**
1473
+ * @private
1474
+ * This field is private and should not be used.
1475
+ */
1476
+ readonly [variantOrdinalSymbol]: 22;
1477
+ name: string;
1478
+ message: string;
1479
+ stack?: string;
1480
+ cause?: unknown;
1481
+ };
1482
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1483
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1484
+ stackTraceLimit: number;
1485
+ };
1486
+ ClaimSecretsNotDelivered: {
1487
+ new (message: string): {
1488
+ readonly tag: CuaError_Tags.ClaimSecretsNotDelivered;
1489
+ /**
1490
+ * @private
1491
+ * This field is private and should not be used.
1492
+ */
1493
+ readonly [uniffiTypeNameSymbol]: string;
1494
+ /**
1495
+ * @private
1496
+ * This field is private and should not be used.
1497
+ */
1498
+ readonly [variantOrdinalSymbol]: 23;
1499
+ name: string;
1500
+ message: string;
1501
+ stack?: string;
1502
+ cause?: unknown;
1503
+ };
1504
+ instanceOf(e: any): e is {
1505
+ readonly tag: CuaError_Tags.ClaimSecretsNotDelivered;
1506
+ /**
1507
+ * @private
1508
+ * This field is private and should not be used.
1509
+ */
1510
+ readonly [uniffiTypeNameSymbol]: string;
1511
+ /**
1512
+ * @private
1513
+ * This field is private and should not be used.
1514
+ */
1515
+ readonly [variantOrdinalSymbol]: 23;
1516
+ name: string;
1517
+ message: string;
1518
+ stack?: string;
1519
+ cause?: unknown;
1520
+ };
1521
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1522
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1523
+ stackTraceLimit: number;
1524
+ };
1525
+ Internal: {
1526
+ new (message: string): {
1527
+ readonly tag: CuaError_Tags.Internal;
1528
+ /**
1529
+ * @private
1530
+ * This field is private and should not be used.
1531
+ */
1532
+ readonly [uniffiTypeNameSymbol]: string;
1533
+ /**
1534
+ * @private
1535
+ * This field is private and should not be used.
1536
+ */
1537
+ readonly [variantOrdinalSymbol]: 24;
1538
+ name: string;
1539
+ message: string;
1540
+ stack?: string;
1541
+ cause?: unknown;
1542
+ };
1543
+ instanceOf(e: any): e is {
1544
+ readonly tag: CuaError_Tags.Internal;
1545
+ /**
1546
+ * @private
1547
+ * This field is private and should not be used.
1548
+ */
1549
+ readonly [uniffiTypeNameSymbol]: string;
1550
+ /**
1551
+ * @private
1552
+ * This field is private and should not be used.
1553
+ */
1554
+ readonly [variantOrdinalSymbol]: 24;
1555
+ name: string;
1556
+ message: string;
1557
+ stack?: string;
1558
+ cause?: unknown;
1559
+ };
1560
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1561
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1562
+ stackTraceLimit: number;
1563
+ };
1564
+ AmbiguousSandbox: {
1565
+ new (message: string): {
1566
+ readonly tag: CuaError_Tags.AmbiguousSandbox;
1567
+ /**
1568
+ * @private
1569
+ * This field is private and should not be used.
1570
+ */
1571
+ readonly [uniffiTypeNameSymbol]: string;
1572
+ /**
1573
+ * @private
1574
+ * This field is private and should not be used.
1575
+ */
1576
+ readonly [variantOrdinalSymbol]: 25;
1577
+ name: string;
1578
+ message: string;
1579
+ stack?: string;
1580
+ cause?: unknown;
1581
+ };
1582
+ instanceOf(e: any): e is {
1583
+ readonly tag: CuaError_Tags.AmbiguousSandbox;
1584
+ /**
1585
+ * @private
1586
+ * This field is private and should not be used.
1587
+ */
1588
+ readonly [uniffiTypeNameSymbol]: string;
1589
+ /**
1590
+ * @private
1591
+ * This field is private and should not be used.
1592
+ */
1593
+ readonly [variantOrdinalSymbol]: 25;
1594
+ name: string;
1595
+ message: string;
1596
+ stack?: string;
1597
+ cause?: unknown;
1598
+ };
1599
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1600
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1601
+ stackTraceLimit: number;
1602
+ };
1603
+ InsufficientDisk: {
1604
+ new (message: string): {
1605
+ readonly tag: CuaError_Tags.InsufficientDisk;
1606
+ /**
1607
+ * @private
1608
+ * This field is private and should not be used.
1609
+ */
1610
+ readonly [uniffiTypeNameSymbol]: string;
1611
+ /**
1612
+ * @private
1613
+ * This field is private and should not be used.
1614
+ */
1615
+ readonly [variantOrdinalSymbol]: 26;
1616
+ name: string;
1617
+ message: string;
1618
+ stack?: string;
1619
+ cause?: unknown;
1620
+ };
1621
+ instanceOf(e: any): e is {
1622
+ readonly tag: CuaError_Tags.InsufficientDisk;
1623
+ /**
1624
+ * @private
1625
+ * This field is private and should not be used.
1626
+ */
1627
+ readonly [uniffiTypeNameSymbol]: string;
1628
+ /**
1629
+ * @private
1630
+ * This field is private and should not be used.
1631
+ */
1632
+ readonly [variantOrdinalSymbol]: 26;
1633
+ name: string;
1634
+ message: string;
1635
+ stack?: string;
1636
+ cause?: unknown;
1637
+ };
1638
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1639
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1640
+ stackTraceLimit: number;
1641
+ };
1642
+ ImageNotPublished: {
1643
+ new (message: string): {
1644
+ readonly tag: CuaError_Tags.ImageNotPublished;
1645
+ /**
1646
+ * @private
1647
+ * This field is private and should not be used.
1648
+ */
1649
+ readonly [uniffiTypeNameSymbol]: string;
1650
+ /**
1651
+ * @private
1652
+ * This field is private and should not be used.
1653
+ */
1654
+ readonly [variantOrdinalSymbol]: 27;
1655
+ name: string;
1656
+ message: string;
1657
+ stack?: string;
1658
+ cause?: unknown;
1659
+ };
1660
+ instanceOf(e: any): e is {
1661
+ readonly tag: CuaError_Tags.ImageNotPublished;
1662
+ /**
1663
+ * @private
1664
+ * This field is private and should not be used.
1665
+ */
1666
+ readonly [uniffiTypeNameSymbol]: string;
1667
+ /**
1668
+ * @private
1669
+ * This field is private and should not be used.
1670
+ */
1671
+ readonly [variantOrdinalSymbol]: 27;
1672
+ name: string;
1673
+ message: string;
1674
+ stack?: string;
1675
+ cause?: unknown;
1676
+ };
1677
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1678
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1679
+ stackTraceLimit: number;
1680
+ };
1681
+ Cancelled: {
1682
+ new (message: string): {
1683
+ readonly tag: CuaError_Tags.Cancelled;
1684
+ /**
1685
+ * @private
1686
+ * This field is private and should not be used.
1687
+ */
1688
+ readonly [uniffiTypeNameSymbol]: string;
1689
+ /**
1690
+ * @private
1691
+ * This field is private and should not be used.
1692
+ */
1693
+ readonly [variantOrdinalSymbol]: 28;
1694
+ name: string;
1695
+ message: string;
1696
+ stack?: string;
1697
+ cause?: unknown;
1698
+ };
1699
+ instanceOf(e: any): e is {
1700
+ readonly tag: CuaError_Tags.Cancelled;
1701
+ /**
1702
+ * @private
1703
+ * This field is private and should not be used.
1704
+ */
1705
+ readonly [uniffiTypeNameSymbol]: string;
1706
+ /**
1707
+ * @private
1708
+ * This field is private and should not be used.
1709
+ */
1710
+ readonly [variantOrdinalSymbol]: 28;
1711
+ name: string;
1712
+ message: string;
1713
+ stack?: string;
1714
+ cause?: unknown;
1715
+ };
1716
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1717
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1718
+ stackTraceLimit: number;
1719
+ };
1720
+ Cloud: {
1721
+ new (message: string): {
1722
+ readonly tag: CuaError_Tags.Cloud;
1723
+ /**
1724
+ * @private
1725
+ * This field is private and should not be used.
1726
+ */
1727
+ readonly [uniffiTypeNameSymbol]: string;
1728
+ /**
1729
+ * @private
1730
+ * This field is private and should not be used.
1731
+ */
1732
+ readonly [variantOrdinalSymbol]: 29;
1733
+ name: string;
1734
+ message: string;
1735
+ stack?: string;
1736
+ cause?: unknown;
1737
+ };
1738
+ instanceOf(e: any): e is {
1739
+ readonly tag: CuaError_Tags.Cloud;
1740
+ /**
1741
+ * @private
1742
+ * This field is private and should not be used.
1743
+ */
1744
+ readonly [uniffiTypeNameSymbol]: string;
1745
+ /**
1746
+ * @private
1747
+ * This field is private and should not be used.
1748
+ */
1749
+ readonly [variantOrdinalSymbol]: 29;
1750
+ name: string;
1751
+ message: string;
1752
+ stack?: string;
1753
+ cause?: unknown;
1754
+ };
1755
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1756
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1757
+ stackTraceLimit: number;
1758
+ };
1759
+ instanceOf: (e: any) => e is CuaError;
1760
+ };
1761
+ /**
1762
+ * Every error the SDK raises. Flat across the FFI: each language sees one
1763
+ * exception/error type with a case per variant and the message.
1764
+ */
1765
+ export type CuaError = InstanceType<typeof CuaError['InvalidArgument' | 'InvalidPlacement' | 'NotFound' | 'ProviderNotConfigured' | 'Unsupported' | 'SpacesdNotAvailable' | 'Timeout' | 'Fleet' | 'FleetAdmissionDenied' | 'CloudCreditExhausted' | 'Runtime' | 'Env' | 'Http' | 'Unauthenticated' | 'PermissionDenied' | 'Transport' | 'DaemonNotRunning' | 'Closed' | 'CapabilityMissing' | 'HostCapabilityMissing' | 'TeleportRefused' | 'PoolSpecMismatch' | 'ClaimSecretsNotDelivered' | 'Internal' | 'AmbiguousSandbox' | 'InsufficientDisk' | 'ImageNotPublished' | 'Cancelled' | 'Cloud']>;
1766
+ /**
1767
+ * Fleet control plane (browser transport).
1768
+ */
1769
+ export interface FleetLike {
1770
+ /**
1771
+ * Claims a sandbox from `pool` and waits for it to bind.
1772
+ */
1773
+ acquire(pool: string, name: string | undefined, asyncOpts_?: {
1774
+ signal: AbortSignal;
1775
+ }): Promise<FleetSandbox>;
1776
+ /**
1777
+ * Claims in a namespace (JSON resources).
1778
+ */
1779
+ listClaims(namespace: string, asyncOpts_?: {
1780
+ signal: AbortSignal;
1781
+ }): Promise<Array<string>>;
1782
+ /**
1783
+ * Pools in a namespace (JSON resources).
1784
+ */
1785
+ listPools(namespace: string, asyncOpts_?: {
1786
+ signal: AbortSignal;
1787
+ }): Promise<Array<string>>;
1788
+ /**
1789
+ * Releases a claim.
1790
+ */
1791
+ release(sandbox: FleetSandbox, asyncOpts_?: {
1792
+ signal: AbortSignal;
1793
+ }): Promise<void>;
1794
+ }
1795
+ /**
1796
+ * @deprecated Use `FleetLike` instead.
1797
+ */
1798
+ export type FleetInterface = FleetLike;
1799
+ /**
1800
+ * Fleet control plane (browser transport).
1801
+ */
1802
+ export declare class Fleet extends UniffiAbstractObject implements FleetLike {
1803
+ readonly [uniffiTypeNameSymbol] = "Fleet";
1804
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1805
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1806
+ private constructor();
1807
+ /**
1808
+ * Claims a sandbox from `pool` and waits for it to bind.
1809
+ */
1810
+ acquire(pool: string, name: string | undefined, asyncOpts_?: {
1811
+ signal: AbortSignal;
1812
+ }): Promise<FleetSandbox>;
1813
+ /**
1814
+ * Claims in a namespace (JSON resources).
1815
+ */
1816
+ listClaims(namespace: string, asyncOpts_?: {
1817
+ signal: AbortSignal;
1818
+ }): Promise<Array<string>>;
1819
+ /**
1820
+ * Pools in a namespace (JSON resources).
1821
+ */
1822
+ listPools(namespace: string, asyncOpts_?: {
1823
+ signal: AbortSignal;
1824
+ }): Promise<Array<string>>;
1825
+ /**
1826
+ * Releases a claim.
1827
+ */
1828
+ release(sandbox: FleetSandbox, asyncOpts_?: {
1829
+ signal: AbortSignal;
1830
+ }): Promise<void>;
1831
+ uniffiDestroy(): void;
1832
+ static instanceOf(obj_: any): obj_ is Fleet;
1833
+ }
1834
+ /**
1835
+ * cua-spacesd over gRPC-Web.
1836
+ */
1837
+ export interface SpacesdClientLike {
1838
+ /**
1839
+ * Any unary `cua.env.v1` RPC with proto3-JSON bodies.
1840
+ */
1841
+ callJson(method: string, requestJson: string, asyncOpts_?: {
1842
+ signal: AbortSignal;
1843
+ }): Promise<string>;
1844
+ /**
1845
+ * `GetCapabilities`.
1846
+ */
1847
+ capabilities(asyncOpts_?: {
1848
+ signal: AbortSignal;
1849
+ }): Promise<SpacesdCapabilities>;
1850
+ /**
1851
+ * Left click.
1852
+ */
1853
+ click(x: number, y: number, asyncOpts_?: {
1854
+ signal: AbortSignal;
1855
+ }): Promise<void>;
1856
+ /**
1857
+ * Pointer position.
1858
+ */
1859
+ cursorPosition(asyncOpts_?: {
1860
+ signal: AbortSignal;
1861
+ }): Promise<Point>;
1862
+ /**
1863
+ * Clipboard text.
1864
+ */
1865
+ getClipboard(asyncOpts_?: {
1866
+ signal: AbortSignal;
1867
+ }): Promise<string | undefined>;
1868
+ /**
1869
+ * `Health` as proto3 JSON.
1870
+ */
1871
+ health(asyncOpts_?: {
1872
+ signal: AbortSignal;
1873
+ }): Promise<string>;
1874
+ /**
1875
+ * Presses a chord.
1876
+ */
1877
+ hotkey(keys: Array<string>, asyncOpts_?: {
1878
+ signal: AbortSignal;
1879
+ }): Promise<void>;
1880
+ /**
1881
+ * Moves the pointer.
1882
+ */
1883
+ moveTo(x: number, y: number, asyncOpts_?: {
1884
+ signal: AbortSignal;
1885
+ }): Promise<void>;
1886
+ /**
1887
+ * Presses one key.
1888
+ */
1889
+ press(keyName: string, asyncOpts_?: {
1890
+ signal: AbortSignal;
1891
+ }): Promise<void>;
1892
+ /**
1893
+ * Runs a command to completion (at most 64 MiB of output).
1894
+ */
1895
+ run(command: SpacesdCommand, asyncOpts_?: {
1896
+ signal: AbortSignal;
1897
+ }): Promise<ProcessOutput>;
1898
+ /**
1899
+ * Captures a display.
1900
+ */
1901
+ screenshot(options: ScreenshotOptions | undefined, asyncOpts_?: {
1902
+ signal: AbortSignal;
1903
+ }): Promise<Screenshot>;
1904
+ /**
1905
+ * Scrolls by line deltas.
1906
+ */
1907
+ scroll(dx: number, dy: number, asyncOpts_?: {
1908
+ signal: AbortSignal;
1909
+ }): Promise<void>;
1910
+ /**
1911
+ * Sets clipboard text.
1912
+ */
1913
+ setClipboard(text: string, asyncOpts_?: {
1914
+ signal: AbortSignal;
1915
+ }): Promise<bigint>;
1916
+ /**
1917
+ * Runs `line` with `/bin/sh -c`.
1918
+ */
1919
+ sh(line: string, timeoutMs: number | undefined, asyncOpts_?: {
1920
+ signal: AbortSignal;
1921
+ }): Promise<ProcessOutput>;
1922
+ /**
1923
+ * Types text.
1924
+ */
1925
+ typeText(text: string, asyncOpts_?: {
1926
+ signal: AbortSignal;
1927
+ }): Promise<void>;
1928
+ }
1929
+ /**
1930
+ * @deprecated Use `SpacesdClientLike` instead.
1931
+ */
1932
+ export type SpacesdClientInterface = SpacesdClientLike;
1933
+ /**
1934
+ * cua-spacesd over gRPC-Web.
1935
+ */
1936
+ export declare class SpacesdClient extends UniffiAbstractObject implements SpacesdClientLike {
1937
+ readonly [uniffiTypeNameSymbol] = "SpacesdClient";
1938
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1939
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1940
+ private constructor();
1941
+ /**
1942
+ * Any unary `cua.env.v1` RPC with proto3-JSON bodies.
1943
+ */
1944
+ callJson(method: string, requestJson: string, asyncOpts_?: {
1945
+ signal: AbortSignal;
1946
+ }): Promise<string>;
1947
+ /**
1948
+ * `GetCapabilities`.
1949
+ */
1950
+ capabilities(asyncOpts_?: {
1951
+ signal: AbortSignal;
1952
+ }): Promise<SpacesdCapabilities>;
1953
+ /**
1954
+ * Left click.
1955
+ */
1956
+ click(x: number, y: number, asyncOpts_?: {
1957
+ signal: AbortSignal;
1958
+ }): Promise<void>;
1959
+ /**
1960
+ * Pointer position.
1961
+ */
1962
+ cursorPosition(asyncOpts_?: {
1963
+ signal: AbortSignal;
1964
+ }): Promise<Point>;
1965
+ /**
1966
+ * Clipboard text.
1967
+ */
1968
+ getClipboard(asyncOpts_?: {
1969
+ signal: AbortSignal;
1970
+ }): Promise<string | undefined>;
1971
+ /**
1972
+ * `Health` as proto3 JSON.
1973
+ */
1974
+ health(asyncOpts_?: {
1975
+ signal: AbortSignal;
1976
+ }): Promise<string>;
1977
+ /**
1978
+ * Presses a chord.
1979
+ */
1980
+ hotkey(keys: Array<string>, asyncOpts_?: {
1981
+ signal: AbortSignal;
1982
+ }): Promise<void>;
1983
+ /**
1984
+ * Moves the pointer.
1985
+ */
1986
+ moveTo(x: number, y: number, asyncOpts_?: {
1987
+ signal: AbortSignal;
1988
+ }): Promise<void>;
1989
+ /**
1990
+ * Presses one key.
1991
+ */
1992
+ press(keyName: string, asyncOpts_?: {
1993
+ signal: AbortSignal;
1994
+ }): Promise<void>;
1995
+ /**
1996
+ * Runs a command to completion (at most 64 MiB of output).
1997
+ */
1998
+ run(command: SpacesdCommand, asyncOpts_?: {
1999
+ signal: AbortSignal;
2000
+ }): Promise<ProcessOutput>;
2001
+ /**
2002
+ * Captures a display.
2003
+ */
2004
+ screenshot(options: ScreenshotOptions | undefined, asyncOpts_?: {
2005
+ signal: AbortSignal;
2006
+ }): Promise<Screenshot>;
2007
+ /**
2008
+ * Scrolls by line deltas.
2009
+ */
2010
+ scroll(dx: number, dy: number, asyncOpts_?: {
2011
+ signal: AbortSignal;
2012
+ }): Promise<void>;
2013
+ /**
2014
+ * Sets clipboard text.
2015
+ */
2016
+ setClipboard(text: string, asyncOpts_?: {
2017
+ signal: AbortSignal;
2018
+ }): Promise<bigint>;
2019
+ /**
2020
+ * Runs `line` with `/bin/sh -c`.
2021
+ */
2022
+ sh(line: string, timeoutMs: number | undefined, asyncOpts_?: {
2023
+ signal: AbortSignal;
2024
+ }): Promise<ProcessOutput>;
2025
+ /**
2026
+ * Types text.
2027
+ */
2028
+ typeText(text: string, asyncOpts_?: {
2029
+ signal: AbortSignal;
2030
+ }): Promise<void>;
2031
+ uniffiDestroy(): void;
2032
+ static instanceOf(obj_: any): obj_ is SpacesdClient;
2033
+ }
2034
+ /**
2035
+ * The cua SDK (browser build).
2036
+ */
2037
+ export interface CuaLike {
2038
+ /**
2039
+ * Fleet control plane.
2040
+ */
2041
+ fleet(): FleetLike;
2042
+ /**
2043
+ * Connects to cua-spacesd at `url` over gRPC-Web.
2044
+ */
2045
+ spacesd(url: string, token: string | undefined, asyncOpts_?: {
2046
+ signal: AbortSignal;
2047
+ }): Promise<SpacesdClientLike>;
2048
+ }
2049
+ /**
2050
+ * @deprecated Use `CuaLike` instead.
2051
+ */
2052
+ export type CuaInterface = CuaLike;
2053
+ /**
2054
+ * The cua SDK (browser build).
2055
+ */
2056
+ export declare class Cua extends UniffiAbstractObject implements CuaLike {
2057
+ readonly [uniffiTypeNameSymbol] = "Cua";
2058
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2059
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2060
+ private constructor();
2061
+ /**
2062
+ * The browser runtime.
2063
+ */
2064
+ static embedded(config: CuaConfig): CuaLike;
2065
+ /**
2066
+ * Fleet control plane.
2067
+ */
2068
+ fleet(): FleetLike;
2069
+ /**
2070
+ * Connects to cua-spacesd at `url` over gRPC-Web.
2071
+ */
2072
+ spacesd(url: string, token: string | undefined, asyncOpts_?: {
2073
+ signal: AbortSignal;
2074
+ }): Promise<SpacesdClientLike>;
2075
+ uniffiDestroy(): void;
2076
+ static instanceOf(obj_: any): obj_ is Cua;
2077
+ }
2078
+ /**
2079
+ * This should be called before anything else.
2080
+ *
2081
+ * It is likely that this is being done for you by the library's `index.ts`.
2082
+ *
2083
+ * It checks versions of uniffi between when the Rust scaffolding was generated
2084
+ * and when the bindings were generated.
2085
+ *
2086
+ * It also initializes the machinery to enable Rust to talk back to Javascript.
2087
+ */
2088
+ declare function uniffiEnsureInitialized(): void;
2089
+ declare const _default: Readonly<{
2090
+ initialize: typeof uniffiEnsureInitialized;
2091
+ converters: {
2092
+ FfiConverterTypeCua: FfiConverterObject<CuaLike>;
2093
+ FfiConverterTypeCuaConfig: {
2094
+ read(from: RustBuffer): CuaConfig;
2095
+ write(value: CuaConfig, into: RustBuffer): void;
2096
+ allocationSize(value: CuaConfig): number;
2097
+ lift(value: UniffiByteArray): CuaConfig;
2098
+ lower(value: CuaConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2099
+ };
2100
+ FfiConverterTypeCuaError: {
2101
+ read(from: RustBuffer): CuaError;
2102
+ write(value: CuaError, into: RustBuffer): void;
2103
+ allocationSize(value: CuaError): number;
2104
+ lift(value: UniffiByteArray): CuaError;
2105
+ lower(value: CuaError, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2106
+ };
2107
+ FfiConverterTypeExitInfo: {
2108
+ read(from: RustBuffer): ExitInfo;
2109
+ write(value: ExitInfo, into: RustBuffer): void;
2110
+ allocationSize(value: ExitInfo): number;
2111
+ lift(value: UniffiByteArray): ExitInfo;
2112
+ lower(value: ExitInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2113
+ };
2114
+ FfiConverterTypeFileEntry: {
2115
+ read(from: RustBuffer): FileEntry;
2116
+ write(value: FileEntry, into: RustBuffer): void;
2117
+ allocationSize(value: FileEntry): number;
2118
+ lift(value: UniffiByteArray): FileEntry;
2119
+ lower(value: FileEntry, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2120
+ };
2121
+ FfiConverterTypeFleet: FfiConverterObject<FleetLike>;
2122
+ FfiConverterTypeFleetSandbox: {
2123
+ read(from: RustBuffer): FleetSandbox;
2124
+ write(value: FleetSandbox, into: RustBuffer): void;
2125
+ allocationSize(value: FleetSandbox): number;
2126
+ lift(value: UniffiByteArray): FleetSandbox;
2127
+ lower(value: FleetSandbox, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2128
+ };
2129
+ FfiConverterTypeFleetSettings: {
2130
+ read(from: RustBuffer): FleetSettings;
2131
+ write(value: FleetSettings, into: RustBuffer): void;
2132
+ allocationSize(value: FleetSettings): number;
2133
+ lift(value: UniffiByteArray): FleetSettings;
2134
+ lower(value: FleetSettings, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2135
+ };
2136
+ FfiConverterTypeImageFormat: {
2137
+ read(from: RustBuffer): ImageFormat;
2138
+ write(value: ImageFormat, into: RustBuffer): void;
2139
+ allocationSize(value: ImageFormat): number;
2140
+ lift(value: UniffiByteArray): ImageFormat;
2141
+ lower(value: ImageFormat, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2142
+ };
2143
+ FfiConverterTypeMediaOpenOptions: {
2144
+ read(from: RustBuffer): MediaOpenOptions;
2145
+ write(value: MediaOpenOptions, into: RustBuffer): void;
2146
+ allocationSize(value: MediaOpenOptions): number;
2147
+ lift(value: UniffiByteArray): MediaOpenOptions;
2148
+ lower(value: MediaOpenOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2149
+ };
2150
+ FfiConverterTypePoint: {
2151
+ read(from: RustBuffer): Point;
2152
+ write(value: Point, into: RustBuffer): void;
2153
+ allocationSize(value: Point): number;
2154
+ lift(value: UniffiByteArray): Point;
2155
+ lower(value: Point, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2156
+ };
2157
+ FfiConverterTypeProcessEvent: {
2158
+ read(from: RustBuffer): ProcessEvent;
2159
+ write(value: ProcessEvent, into: RustBuffer): void;
2160
+ allocationSize(value: ProcessEvent): number;
2161
+ lift(value: UniffiByteArray): ProcessEvent;
2162
+ lower(value: ProcessEvent, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2163
+ };
2164
+ FfiConverterTypeProcessEventKind: {
2165
+ read(from: RustBuffer): ProcessEventKind;
2166
+ write(value: ProcessEventKind, into: RustBuffer): void;
2167
+ allocationSize(value: ProcessEventKind): number;
2168
+ lift(value: UniffiByteArray): ProcessEventKind;
2169
+ lower(value: ProcessEventKind, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2170
+ };
2171
+ FfiConverterTypeProcessOutput: {
2172
+ read(from: RustBuffer): ProcessOutput;
2173
+ write(value: ProcessOutput, into: RustBuffer): void;
2174
+ allocationSize(value: ProcessOutput): number;
2175
+ lift(value: UniffiByteArray): ProcessOutput;
2176
+ lower(value: ProcessOutput, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2177
+ };
2178
+ FfiConverterTypePtySize: {
2179
+ read(from: RustBuffer): PtySize;
2180
+ write(value: PtySize, into: RustBuffer): void;
2181
+ allocationSize(value: PtySize): number;
2182
+ lift(value: UniffiByteArray): PtySize;
2183
+ lower(value: PtySize, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2184
+ };
2185
+ FfiConverterTypeScreenshot: {
2186
+ read(from: RustBuffer): Screenshot;
2187
+ write(value: Screenshot, into: RustBuffer): void;
2188
+ allocationSize(value: Screenshot): number;
2189
+ lift(value: UniffiByteArray): Screenshot;
2190
+ lower(value: Screenshot, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2191
+ };
2192
+ FfiConverterTypeScreenshotOptions: {
2193
+ read(from: RustBuffer): ScreenshotOptions;
2194
+ write(value: ScreenshotOptions, into: RustBuffer): void;
2195
+ allocationSize(value: ScreenshotOptions): number;
2196
+ lift(value: UniffiByteArray): ScreenshotOptions;
2197
+ lower(value: ScreenshotOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2198
+ };
2199
+ FfiConverterTypeSpacesdCapabilities: {
2200
+ read(from: RustBuffer): SpacesdCapabilities;
2201
+ write(value: SpacesdCapabilities, into: RustBuffer): void;
2202
+ allocationSize(value: SpacesdCapabilities): number;
2203
+ lift(value: UniffiByteArray): SpacesdCapabilities;
2204
+ lower(value: SpacesdCapabilities, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2205
+ };
2206
+ FfiConverterTypeSpacesdClient: FfiConverterObject<SpacesdClientLike>;
2207
+ FfiConverterTypeSpacesdCommand: {
2208
+ read(from: RustBuffer): SpacesdCommand;
2209
+ write(value: SpacesdCommand, into: RustBuffer): void;
2210
+ allocationSize(value: SpacesdCommand): number;
2211
+ lift(value: UniffiByteArray): SpacesdCommand;
2212
+ lower(value: SpacesdCommand, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2213
+ };
2214
+ FfiConverterTypeSpacesdFeature: {
2215
+ read(from: RustBuffer): SpacesdFeature;
2216
+ write(value: SpacesdFeature, into: RustBuffer): void;
2217
+ allocationSize(value: SpacesdFeature): number;
2218
+ lift(value: UniffiByteArray): SpacesdFeature;
2219
+ lower(value: SpacesdFeature, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2220
+ };
2221
+ FfiConverterTypeTransferResult: {
2222
+ read(from: RustBuffer): TransferResult;
2223
+ write(value: TransferResult, into: RustBuffer): void;
2224
+ allocationSize(value: TransferResult): number;
2225
+ lift(value: UniffiByteArray): TransferResult;
2226
+ lower(value: TransferResult, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2227
+ };
2228
+ FfiConverterTypeUploadOptions: {
2229
+ read(from: RustBuffer): UploadOptions;
2230
+ write(value: UploadOptions, into: RustBuffer): void;
2231
+ allocationSize(value: UploadOptions): number;
2232
+ lift(value: UniffiByteArray): UploadOptions;
2233
+ lower(value: UploadOptions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2234
+ };
2235
+ };
2236
+ }>;
2237
+ export default _default;