eve 0.36.0 → 0.37.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 (68) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -0
  3. package/dist/src/cli/commands/agent-instructions.d.ts +4 -4
  4. package/dist/src/cli/commands/init-confirm.d.ts +12 -0
  5. package/dist/src/cli/commands/init-confirm.js +1 -0
  6. package/dist/src/cli/commands/init.d.ts +6 -5
  7. package/dist/src/cli/commands/init.js +1 -1
  8. package/dist/src/cli/run.d.ts +1 -0
  9. package/dist/src/cli/run.js +3 -3
  10. package/dist/src/compiled/.vendor-stamp.json +2 -1
  11. package/dist/src/compiled/@vercel/sandbox/api-client/api-client.d.ts +339 -0
  12. package/dist/src/compiled/@vercel/sandbox/api-client/index.d.ts +1 -1
  13. package/dist/src/compiled/@vercel/sandbox/api-client/validators.d.ts +25 -1
  14. package/dist/src/compiled/@vercel/sandbox/drive.d.ts +140 -0
  15. package/dist/src/compiled/@vercel/sandbox/index.d.ts +3 -2
  16. package/dist/src/compiled/@vercel/sandbox/index.js +13 -13
  17. package/dist/src/compiled/@vercel/sandbox/sandbox.d.ts +55 -18
  18. package/dist/src/compiled/@vercel/sandbox-stable/LICENSE +201 -0
  19. package/dist/src/compiled/@vercel/sandbox-stable/_async-retry.d.ts +8 -0
  20. package/dist/src/compiled/@vercel/sandbox-stable/_workflow-serde.d.ts +5 -0
  21. package/dist/src/compiled/@vercel/sandbox-stable/api-client/api-client.d.ts +1456 -0
  22. package/dist/src/compiled/@vercel/sandbox-stable/api-client/api-error.d.ts +29 -0
  23. package/dist/src/compiled/@vercel/sandbox-stable/api-client/base-client.d.ts +39 -0
  24. package/dist/src/compiled/@vercel/sandbox-stable/api-client/file-writer.d.ts +66 -0
  25. package/dist/src/compiled/@vercel/sandbox-stable/api-client/index.d.ts +2 -0
  26. package/dist/src/compiled/@vercel/sandbox-stable/api-client/validators.d.ts +899 -0
  27. package/dist/src/compiled/@vercel/sandbox-stable/api-client/with-retry.d.ts +10 -0
  28. package/dist/src/compiled/@vercel/sandbox-stable/auth/error.d.ts +15 -0
  29. package/dist/src/compiled/@vercel/sandbox-stable/auth/file.d.ts +18 -0
  30. package/dist/src/compiled/@vercel/sandbox-stable/auth/index.d.ts +6 -0
  31. package/dist/src/compiled/@vercel/sandbox-stable/auth/oauth.d.ts +111 -0
  32. package/dist/src/compiled/@vercel/sandbox-stable/auth/poll-for-token.d.ts +28 -0
  33. package/dist/src/compiled/@vercel/sandbox-stable/auth/project.d.ts +40 -0
  34. package/dist/src/compiled/@vercel/sandbox-stable/command.d.ts +292 -0
  35. package/dist/src/compiled/@vercel/sandbox-stable/constants.d.ts +5 -0
  36. package/dist/src/compiled/@vercel/sandbox-stable/execution-context.d.ts +116 -0
  37. package/dist/src/compiled/@vercel/sandbox-stable/filesystem.d.ts +258 -0
  38. package/dist/src/compiled/@vercel/sandbox-stable/index.d.ts +12 -0
  39. package/dist/src/compiled/@vercel/sandbox-stable/index.js +1 -0
  40. package/dist/src/compiled/@vercel/sandbox-stable/network-policy.d.ts +169 -0
  41. package/dist/src/compiled/@vercel/sandbox-stable/proxy.d.ts +55 -0
  42. package/dist/src/compiled/@vercel/sandbox-stable/sandbox-user.d.ts +212 -0
  43. package/dist/src/compiled/@vercel/sandbox-stable/sandbox.d.ts +1216 -0
  44. package/dist/src/compiled/@vercel/sandbox-stable/session.d.ts +433 -0
  45. package/dist/src/compiled/@vercel/sandbox-stable/snapshot.d.ts +229 -0
  46. package/dist/src/compiled/@vercel/sandbox-stable/utils/get-credentials.d.ts +21 -0
  47. package/dist/src/compiled/@vercel/sandbox-stable/utils/paginator.d.ts +16 -0
  48. package/dist/src/compiled/@vercel/sandbox-stable/utils/resolveSignal.d.ts +15 -0
  49. package/dist/src/compiled/@vercel/sandbox-stable/utils/sandbox-snapshot.d.ts +11 -0
  50. package/dist/src/compiled/@vercel/sandbox-stable/utils/types.d.ts +11 -0
  51. package/dist/src/compiled/_chunks/node/{auth-BS3UoyvT.js → auth-BaNbsImr.js} +1 -1
  52. package/dist/src/compiled/_chunks/node/version-BYHw-SDY.js +1 -0
  53. package/dist/src/execution/sandbox/bindings/vercel.d.ts +2 -1
  54. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  55. package/dist/src/internal/application/package.js +1 -1
  56. package/dist/src/packages/eve-catalog/src/index.js +1 -1
  57. package/dist/src/public/sandbox/backends/vercel.d.ts +5 -4
  58. package/dist/src/public/sandbox/backends/vercel.js +1 -1
  59. package/dist/src/public/sandbox/vercel-sandbox.d.ts +25 -1
  60. package/dist/src/public/sandbox/vercel.d.ts +2 -1
  61. package/dist/src/public/sandbox/vercel.js +1 -1
  62. package/dist/src/setup/scaffold/create/project.js +1 -1
  63. package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
  64. package/dist/src/setup/scaffold/create/web-template.js +0 -1
  65. package/dist/src/shared/sandbox-network-policy.d.ts +1 -1
  66. package/docs/reference/cli.md +10 -6
  67. package/package.json +2 -1
  68. package/dist/src/compiled/_chunks/node/version-Cztrk7z6.js +0 -1
@@ -0,0 +1,1456 @@
1
+ import { BaseClient, Parsed, RequestParams } from "./base-client.js";
2
+ import { CommandData, CommandFinishedData, CommandFinishedResponse, CommandResponse, CreateSnapshotResponse, InteractiveSessionResponse, LogOutputLine, SessionResponse, SnapshotResponse, StopSessionResponse } from "./validators.js";
3
+ import { FileWriter } from "./file-writer.js";
4
+ import { NetworkPolicy } from "../network-policy.js";
5
+ import { WithPrivate } from "../utils/types.js";
6
+ import { RUNTIMES } from "../constants.js";
7
+ import { z } from "#compiled/zod/index.js";
8
+ import { Readable } from "stream";
9
+
10
+ //#region src/api-client/api-client.d.ts
11
+ interface WithFetchOptions {
12
+ fetch?: typeof globalThis.fetch;
13
+ }
14
+ declare class APIClient extends BaseClient {
15
+ private teamId;
16
+ private projectId;
17
+ private isJwtToken;
18
+ constructor(params: {
19
+ baseUrl?: string;
20
+ teamId: string;
21
+ token: string;
22
+ fetch?: typeof globalThis.fetch;
23
+ });
24
+ private ensureValidToken;
25
+ protected request(path: string, params?: RequestParams): Promise<Response>;
26
+ getSession(params: WithPrivate<{
27
+ sessionId: string;
28
+ signal?: AbortSignal;
29
+ }>): Promise<Parsed<{
30
+ session: {
31
+ [x: string]: unknown;
32
+ id: string;
33
+ memory: number;
34
+ vcpus: number;
35
+ region: string;
36
+ runtime: string;
37
+ timeout: number;
38
+ status: "pending" | "running" | "stopping" | "stopped" | "failed" | "aborted" | "snapshotting";
39
+ requestedAt: number;
40
+ createdAt: number;
41
+ cwd: string;
42
+ updatedAt: number;
43
+ startedAt?: number | undefined;
44
+ requestedStopAt?: number | undefined;
45
+ stoppedAt?: number | undefined;
46
+ abortedAt?: number | undefined;
47
+ duration?: number | undefined;
48
+ sourceSnapshotId?: string | undefined;
49
+ snapshottedAt?: number | undefined;
50
+ interactivePort?: number | undefined;
51
+ networkPolicy?: {
52
+ [x: string]: unknown;
53
+ mode: "allow-all";
54
+ } | {
55
+ [x: string]: unknown;
56
+ mode: "deny-all";
57
+ } | {
58
+ [x: string]: unknown;
59
+ mode: "custom";
60
+ allowedDomains?: string[] | undefined;
61
+ allowedCIDRs?: string[] | undefined;
62
+ deniedCIDRs?: string[] | undefined;
63
+ injectionRules?: {
64
+ domain: string;
65
+ headers?: Record<string, string> | undefined;
66
+ headerNames?: string[] | undefined;
67
+ match?: {
68
+ path?: {
69
+ exact?: string | undefined;
70
+ startsWith?: string | undefined;
71
+ regex?: string | undefined;
72
+ } | undefined;
73
+ method?: string[] | undefined;
74
+ queryString?: {
75
+ key?: {
76
+ exact?: string | undefined;
77
+ startsWith?: string | undefined;
78
+ regex?: string | undefined;
79
+ } | undefined;
80
+ value?: {
81
+ exact?: string | undefined;
82
+ startsWith?: string | undefined;
83
+ regex?: string | undefined;
84
+ } | undefined;
85
+ }[] | undefined;
86
+ headers?: {
87
+ key?: {
88
+ exact?: string | undefined;
89
+ startsWith?: string | undefined;
90
+ regex?: string | undefined;
91
+ } | undefined;
92
+ value?: {
93
+ exact?: string | undefined;
94
+ startsWith?: string | undefined;
95
+ regex?: string | undefined;
96
+ } | undefined;
97
+ }[] | undefined;
98
+ } | undefined;
99
+ }[] | undefined;
100
+ forwardRules?: {
101
+ domain: string;
102
+ forwardURL: string;
103
+ match?: {
104
+ path?: {
105
+ exact?: string | undefined;
106
+ startsWith?: string | undefined;
107
+ regex?: string | undefined;
108
+ } | undefined;
109
+ method?: string[] | undefined;
110
+ queryString?: {
111
+ key?: {
112
+ exact?: string | undefined;
113
+ startsWith?: string | undefined;
114
+ regex?: string | undefined;
115
+ } | undefined;
116
+ value?: {
117
+ exact?: string | undefined;
118
+ startsWith?: string | undefined;
119
+ regex?: string | undefined;
120
+ } | undefined;
121
+ }[] | undefined;
122
+ headers?: {
123
+ key?: {
124
+ exact?: string | undefined;
125
+ startsWith?: string | undefined;
126
+ regex?: string | undefined;
127
+ } | undefined;
128
+ value?: {
129
+ exact?: string | undefined;
130
+ startsWith?: string | undefined;
131
+ regex?: string | undefined;
132
+ } | undefined;
133
+ }[] | undefined;
134
+ } | undefined;
135
+ }[] | undefined;
136
+ } | undefined;
137
+ activeCpuDurationMs?: number | undefined;
138
+ networkTransfer?: {
139
+ ingress: number;
140
+ egress: number;
141
+ } | undefined;
142
+ };
143
+ routes: {
144
+ url: string;
145
+ subdomain: string;
146
+ port: number;
147
+ }[];
148
+ }>>;
149
+ createSandbox(params: WithPrivate<{
150
+ name?: string;
151
+ ports?: number[];
152
+ projectId: string;
153
+ source?: {
154
+ type: "git";
155
+ url: string;
156
+ depth?: number;
157
+ revision?: string;
158
+ username?: string;
159
+ password?: string;
160
+ } | {
161
+ type: "tarball";
162
+ url: string;
163
+ } | {
164
+ type: "snapshot";
165
+ snapshotId: string;
166
+ };
167
+ timeout?: number;
168
+ resources?: {
169
+ vcpus: number;
170
+ };
171
+ persistent?: boolean;
172
+ runtime?: RUNTIMES | (string & {});
173
+ image?: string;
174
+ networkPolicy?: NetworkPolicy;
175
+ env?: Record<string, string>;
176
+ tags?: Record<string, string>;
177
+ snapshotExpiration?: number;
178
+ keepLastSnapshots?: {
179
+ count: number;
180
+ expiration?: number;
181
+ deleteEvicted?: boolean;
182
+ };
183
+ signal?: AbortSignal;
184
+ }>): Promise<Parsed<{
185
+ sandbox: {
186
+ name: string;
187
+ persistent: boolean;
188
+ createdAt: number;
189
+ updatedAt: number;
190
+ currentSessionId: string;
191
+ status: "pending" | "running" | "stopping" | "stopped" | "failed" | "aborted" | "snapshotting";
192
+ region?: string | undefined;
193
+ vcpus?: number | undefined;
194
+ memory?: number | undefined;
195
+ runtime?: string | undefined;
196
+ image?: string | undefined;
197
+ timeout?: number | undefined;
198
+ networkPolicy?: {
199
+ [x: string]: unknown;
200
+ mode: "allow-all";
201
+ } | {
202
+ [x: string]: unknown;
203
+ mode: "deny-all";
204
+ } | {
205
+ [x: string]: unknown;
206
+ mode: "custom";
207
+ allowedDomains?: string[] | undefined;
208
+ allowedCIDRs?: string[] | undefined;
209
+ deniedCIDRs?: string[] | undefined;
210
+ injectionRules?: {
211
+ domain: string;
212
+ headers?: Record<string, string> | undefined;
213
+ headerNames?: string[] | undefined;
214
+ match?: {
215
+ path?: {
216
+ exact?: string | undefined;
217
+ startsWith?: string | undefined;
218
+ regex?: string | undefined;
219
+ } | undefined;
220
+ method?: string[] | undefined;
221
+ queryString?: {
222
+ key?: {
223
+ exact?: string | undefined;
224
+ startsWith?: string | undefined;
225
+ regex?: string | undefined;
226
+ } | undefined;
227
+ value?: {
228
+ exact?: string | undefined;
229
+ startsWith?: string | undefined;
230
+ regex?: string | undefined;
231
+ } | undefined;
232
+ }[] | undefined;
233
+ headers?: {
234
+ key?: {
235
+ exact?: string | undefined;
236
+ startsWith?: string | undefined;
237
+ regex?: string | undefined;
238
+ } | undefined;
239
+ value?: {
240
+ exact?: string | undefined;
241
+ startsWith?: string | undefined;
242
+ regex?: string | undefined;
243
+ } | undefined;
244
+ }[] | undefined;
245
+ } | undefined;
246
+ }[] | undefined;
247
+ forwardRules?: {
248
+ domain: string;
249
+ forwardURL: string;
250
+ match?: {
251
+ path?: {
252
+ exact?: string | undefined;
253
+ startsWith?: string | undefined;
254
+ regex?: string | undefined;
255
+ } | undefined;
256
+ method?: string[] | undefined;
257
+ queryString?: {
258
+ key?: {
259
+ exact?: string | undefined;
260
+ startsWith?: string | undefined;
261
+ regex?: string | undefined;
262
+ } | undefined;
263
+ value?: {
264
+ exact?: string | undefined;
265
+ startsWith?: string | undefined;
266
+ regex?: string | undefined;
267
+ } | undefined;
268
+ }[] | undefined;
269
+ headers?: {
270
+ key?: {
271
+ exact?: string | undefined;
272
+ startsWith?: string | undefined;
273
+ regex?: string | undefined;
274
+ } | undefined;
275
+ value?: {
276
+ exact?: string | undefined;
277
+ startsWith?: string | undefined;
278
+ regex?: string | undefined;
279
+ } | undefined;
280
+ }[] | undefined;
281
+ } | undefined;
282
+ }[] | undefined;
283
+ } | undefined;
284
+ totalEgressBytes?: number | undefined;
285
+ totalIngressBytes?: number | undefined;
286
+ totalActiveCpuDurationMs?: number | undefined;
287
+ totalDurationMs?: number | undefined;
288
+ expiresAt?: number | undefined;
289
+ currentSnapshotId?: string | undefined;
290
+ statusUpdatedAt?: number | undefined;
291
+ cwd?: string | undefined;
292
+ tags?: Record<string, string> | undefined;
293
+ snapshotExpiration?: number | undefined;
294
+ keepLastSnapshots?: {
295
+ count: number;
296
+ expiration?: number | undefined;
297
+ deleteEvicted?: boolean | undefined;
298
+ } | undefined;
299
+ };
300
+ session: {
301
+ [x: string]: unknown;
302
+ id: string;
303
+ memory: number;
304
+ vcpus: number;
305
+ region: string;
306
+ runtime: string;
307
+ timeout: number;
308
+ status: "pending" | "running" | "stopping" | "stopped" | "failed" | "aborted" | "snapshotting";
309
+ requestedAt: number;
310
+ createdAt: number;
311
+ cwd: string;
312
+ updatedAt: number;
313
+ startedAt?: number | undefined;
314
+ requestedStopAt?: number | undefined;
315
+ stoppedAt?: number | undefined;
316
+ abortedAt?: number | undefined;
317
+ duration?: number | undefined;
318
+ sourceSnapshotId?: string | undefined;
319
+ snapshottedAt?: number | undefined;
320
+ interactivePort?: number | undefined;
321
+ networkPolicy?: {
322
+ [x: string]: unknown;
323
+ mode: "allow-all";
324
+ } | {
325
+ [x: string]: unknown;
326
+ mode: "deny-all";
327
+ } | {
328
+ [x: string]: unknown;
329
+ mode: "custom";
330
+ allowedDomains?: string[] | undefined;
331
+ allowedCIDRs?: string[] | undefined;
332
+ deniedCIDRs?: string[] | undefined;
333
+ injectionRules?: {
334
+ domain: string;
335
+ headers?: Record<string, string> | undefined;
336
+ headerNames?: string[] | undefined;
337
+ match?: {
338
+ path?: {
339
+ exact?: string | undefined;
340
+ startsWith?: string | undefined;
341
+ regex?: string | undefined;
342
+ } | undefined;
343
+ method?: string[] | undefined;
344
+ queryString?: {
345
+ key?: {
346
+ exact?: string | undefined;
347
+ startsWith?: string | undefined;
348
+ regex?: string | undefined;
349
+ } | undefined;
350
+ value?: {
351
+ exact?: string | undefined;
352
+ startsWith?: string | undefined;
353
+ regex?: string | undefined;
354
+ } | undefined;
355
+ }[] | undefined;
356
+ headers?: {
357
+ key?: {
358
+ exact?: string | undefined;
359
+ startsWith?: string | undefined;
360
+ regex?: string | undefined;
361
+ } | undefined;
362
+ value?: {
363
+ exact?: string | undefined;
364
+ startsWith?: string | undefined;
365
+ regex?: string | undefined;
366
+ } | undefined;
367
+ }[] | undefined;
368
+ } | undefined;
369
+ }[] | undefined;
370
+ forwardRules?: {
371
+ domain: string;
372
+ forwardURL: string;
373
+ match?: {
374
+ path?: {
375
+ exact?: string | undefined;
376
+ startsWith?: string | undefined;
377
+ regex?: string | undefined;
378
+ } | undefined;
379
+ method?: string[] | undefined;
380
+ queryString?: {
381
+ key?: {
382
+ exact?: string | undefined;
383
+ startsWith?: string | undefined;
384
+ regex?: string | undefined;
385
+ } | undefined;
386
+ value?: {
387
+ exact?: string | undefined;
388
+ startsWith?: string | undefined;
389
+ regex?: string | undefined;
390
+ } | undefined;
391
+ }[] | undefined;
392
+ headers?: {
393
+ key?: {
394
+ exact?: string | undefined;
395
+ startsWith?: string | undefined;
396
+ regex?: string | undefined;
397
+ } | undefined;
398
+ value?: {
399
+ exact?: string | undefined;
400
+ startsWith?: string | undefined;
401
+ regex?: string | undefined;
402
+ } | undefined;
403
+ }[] | undefined;
404
+ } | undefined;
405
+ }[] | undefined;
406
+ } | undefined;
407
+ activeCpuDurationMs?: number | undefined;
408
+ networkTransfer?: {
409
+ ingress: number;
410
+ egress: number;
411
+ } | undefined;
412
+ };
413
+ routes: {
414
+ url: string;
415
+ subdomain: string;
416
+ port: number;
417
+ }[];
418
+ resumed?: boolean | undefined;
419
+ }>>;
420
+ runCommand(params: {
421
+ sessionId: string;
422
+ cwd?: string;
423
+ command: string;
424
+ args: string[];
425
+ env: Record<string, string>;
426
+ sudo: boolean;
427
+ wait: true;
428
+ logs?: boolean;
429
+ onLog?: (log: LogOutputLine) => void;
430
+ timeout?: number;
431
+ signal?: AbortSignal;
432
+ }): Promise<{
433
+ command: CommandData;
434
+ finished: Promise<CommandFinishedData>;
435
+ }>;
436
+ runCommand(params: {
437
+ sessionId: string;
438
+ cwd?: string;
439
+ command: string;
440
+ args: string[];
441
+ env: Record<string, string>;
442
+ sudo: boolean;
443
+ wait?: false;
444
+ timeout?: number;
445
+ signal?: AbortSignal;
446
+ }): Promise<Parsed<z.infer<typeof CommandResponse>>>;
447
+ getCommand(params: {
448
+ sessionId: string;
449
+ cmdId: string;
450
+ wait: true;
451
+ signal?: AbortSignal;
452
+ }): Promise<Parsed<z.infer<typeof CommandFinishedResponse>>>;
453
+ getCommand(params: {
454
+ sessionId: string;
455
+ cmdId: string;
456
+ wait?: boolean;
457
+ signal?: AbortSignal;
458
+ }): Promise<Parsed<z.infer<typeof CommandResponse>>>;
459
+ openInteractive(params: {
460
+ sessionId: string;
461
+ signal?: AbortSignal;
462
+ }): Promise<Parsed<z.infer<typeof InteractiveSessionResponse>>>;
463
+ mkDir(params: {
464
+ sessionId: string;
465
+ path: string;
466
+ cwd?: string;
467
+ signal?: AbortSignal;
468
+ }): Promise<Parsed<Record<string, never>>>;
469
+ getFileWriter(params: {
470
+ sessionId: string;
471
+ extractDir: string;
472
+ signal?: AbortSignal;
473
+ }): {
474
+ response: Promise<Response>;
475
+ writer: FileWriter;
476
+ };
477
+ listSessions(params: {
478
+ /**
479
+ * The ID or name of the project to which the sessions belong.
480
+ * @example "my-project"
481
+ */
482
+ projectId: string;
483
+ /**
484
+ * Filter sessions by sandbox name.
485
+ */
486
+ name?: string;
487
+ /**
488
+ * Maximum number of sessions to list from a request.
489
+ * @example 10
490
+ */
491
+ limit?: number;
492
+ /**
493
+ * Cursor for pagination.
494
+ */
495
+ cursor?: string;
496
+ /**
497
+ * Sort order for results.
498
+ */
499
+ sortOrder?: "asc" | "desc";
500
+ signal?: AbortSignal;
501
+ }): Promise<Parsed<{
502
+ sessions: {
503
+ [x: string]: unknown;
504
+ id: string;
505
+ memory: number;
506
+ vcpus: number;
507
+ region: string;
508
+ runtime: string;
509
+ timeout: number;
510
+ status: "pending" | "running" | "stopping" | "stopped" | "failed" | "aborted" | "snapshotting";
511
+ requestedAt: number;
512
+ createdAt: number;
513
+ cwd: string;
514
+ updatedAt: number;
515
+ startedAt?: number | undefined;
516
+ requestedStopAt?: number | undefined;
517
+ stoppedAt?: number | undefined;
518
+ abortedAt?: number | undefined;
519
+ duration?: number | undefined;
520
+ sourceSnapshotId?: string | undefined;
521
+ snapshottedAt?: number | undefined;
522
+ interactivePort?: number | undefined;
523
+ networkPolicy?: {
524
+ [x: string]: unknown;
525
+ mode: "allow-all";
526
+ } | {
527
+ [x: string]: unknown;
528
+ mode: "deny-all";
529
+ } | {
530
+ [x: string]: unknown;
531
+ mode: "custom";
532
+ allowedDomains?: string[] | undefined;
533
+ allowedCIDRs?: string[] | undefined;
534
+ deniedCIDRs?: string[] | undefined;
535
+ injectionRules?: {
536
+ domain: string;
537
+ headers?: Record<string, string> | undefined;
538
+ headerNames?: string[] | undefined;
539
+ match?: {
540
+ path?: {
541
+ exact?: string | undefined;
542
+ startsWith?: string | undefined;
543
+ regex?: string | undefined;
544
+ } | undefined;
545
+ method?: string[] | undefined;
546
+ queryString?: {
547
+ key?: {
548
+ exact?: string | undefined;
549
+ startsWith?: string | undefined;
550
+ regex?: string | undefined;
551
+ } | undefined;
552
+ value?: {
553
+ exact?: string | undefined;
554
+ startsWith?: string | undefined;
555
+ regex?: string | undefined;
556
+ } | undefined;
557
+ }[] | undefined;
558
+ headers?: {
559
+ key?: {
560
+ exact?: string | undefined;
561
+ startsWith?: string | undefined;
562
+ regex?: string | undefined;
563
+ } | undefined;
564
+ value?: {
565
+ exact?: string | undefined;
566
+ startsWith?: string | undefined;
567
+ regex?: string | undefined;
568
+ } | undefined;
569
+ }[] | undefined;
570
+ } | undefined;
571
+ }[] | undefined;
572
+ forwardRules?: {
573
+ domain: string;
574
+ forwardURL: string;
575
+ match?: {
576
+ path?: {
577
+ exact?: string | undefined;
578
+ startsWith?: string | undefined;
579
+ regex?: string | undefined;
580
+ } | undefined;
581
+ method?: string[] | undefined;
582
+ queryString?: {
583
+ key?: {
584
+ exact?: string | undefined;
585
+ startsWith?: string | undefined;
586
+ regex?: string | undefined;
587
+ } | undefined;
588
+ value?: {
589
+ exact?: string | undefined;
590
+ startsWith?: string | undefined;
591
+ regex?: string | undefined;
592
+ } | undefined;
593
+ }[] | undefined;
594
+ headers?: {
595
+ key?: {
596
+ exact?: string | undefined;
597
+ startsWith?: string | undefined;
598
+ regex?: string | undefined;
599
+ } | undefined;
600
+ value?: {
601
+ exact?: string | undefined;
602
+ startsWith?: string | undefined;
603
+ regex?: string | undefined;
604
+ } | undefined;
605
+ }[] | undefined;
606
+ } | undefined;
607
+ }[] | undefined;
608
+ } | undefined;
609
+ activeCpuDurationMs?: number | undefined;
610
+ networkTransfer?: {
611
+ ingress: number;
612
+ egress: number;
613
+ } | undefined;
614
+ }[];
615
+ pagination: {
616
+ count: number;
617
+ next: string | null;
618
+ };
619
+ }>>;
620
+ listSnapshots(params: {
621
+ /**
622
+ * The ID or name of the project to which the snapshots belong.
623
+ * @example "my-project"
624
+ */
625
+ projectId: string;
626
+ /**
627
+ * Filter snapshots by sandbox name.
628
+ */
629
+ name?: string;
630
+ /**
631
+ * Maximum number of snapshots to list from a request.
632
+ * @example 10
633
+ */
634
+ limit?: number;
635
+ /**
636
+ * Cursor for pagination.
637
+ */
638
+ cursor?: string;
639
+ /**
640
+ * Sort order for results.
641
+ */
642
+ sortOrder?: "asc" | "desc";
643
+ signal?: AbortSignal;
644
+ }): Promise<Parsed<{
645
+ snapshots: {
646
+ id: string;
647
+ sourceSessionId: string;
648
+ region: string;
649
+ status: "failed" | "created" | "deleted";
650
+ sizeBytes: number;
651
+ createdAt: number;
652
+ updatedAt: number;
653
+ expiresAt?: number | undefined;
654
+ lastUsedAt?: number | undefined;
655
+ creationMethod?: string | undefined;
656
+ parentId?: string | undefined;
657
+ }[];
658
+ pagination: {
659
+ count: number;
660
+ next: string | null;
661
+ };
662
+ }>>;
663
+ getSnapshotTree(params: {
664
+ /**
665
+ * The ID or name of the project to which the snapshots belong.
666
+ */
667
+ projectId: string;
668
+ /**
669
+ * The snapshot ID to use as the anchor for the tree traversal.
670
+ */
671
+ snapshotId: string;
672
+ /**
673
+ * Maximum number of nodes to return.
674
+ */
675
+ limit?: number;
676
+ /**
677
+ * Sort order: "asc" for descendants, "desc" for ancestors.
678
+ */
679
+ sortOrder?: "asc" | "desc";
680
+ signal?: AbortSignal;
681
+ }): Promise<Parsed<{
682
+ snapshots: {
683
+ snapshot: {
684
+ id: string;
685
+ sourceSessionId: string;
686
+ region: string;
687
+ status: "failed" | "created" | "deleted";
688
+ sizeBytes: number;
689
+ createdAt: number;
690
+ updatedAt: number;
691
+ expiresAt?: number | undefined;
692
+ lastUsedAt?: number | undefined;
693
+ creationMethod?: string | undefined;
694
+ parentId?: string | undefined;
695
+ };
696
+ siblings: {
697
+ id: string;
698
+ sourceSessionId: string;
699
+ region: string;
700
+ status: "failed" | "created" | "deleted";
701
+ sizeBytes: number;
702
+ createdAt: number;
703
+ updatedAt: number;
704
+ expiresAt?: number | undefined;
705
+ lastUsedAt?: number | undefined;
706
+ creationMethod?: string | undefined;
707
+ parentId?: string | undefined;
708
+ }[];
709
+ count: string;
710
+ }[];
711
+ pagination: {
712
+ count: number;
713
+ next: string | null;
714
+ };
715
+ anchor?: {
716
+ snapshot: {
717
+ id: string;
718
+ sourceSessionId: string;
719
+ region: string;
720
+ status: "failed" | "created" | "deleted";
721
+ sizeBytes: number;
722
+ createdAt: number;
723
+ updatedAt: number;
724
+ expiresAt?: number | undefined;
725
+ lastUsedAt?: number | undefined;
726
+ creationMethod?: string | undefined;
727
+ parentId?: string | undefined;
728
+ };
729
+ siblings: {
730
+ id: string;
731
+ sourceSessionId: string;
732
+ region: string;
733
+ status: "failed" | "created" | "deleted";
734
+ sizeBytes: number;
735
+ createdAt: number;
736
+ updatedAt: number;
737
+ expiresAt?: number | undefined;
738
+ lastUsedAt?: number | undefined;
739
+ creationMethod?: string | undefined;
740
+ parentId?: string | undefined;
741
+ }[];
742
+ count: string;
743
+ } | undefined;
744
+ }>>;
745
+ writeFiles(params: {
746
+ sessionId: string;
747
+ cwd: string;
748
+ files: {
749
+ path: string;
750
+ content: string | Uint8Array;
751
+ mode?: number;
752
+ }[];
753
+ extractDir: string;
754
+ signal?: AbortSignal;
755
+ }): Promise<void>;
756
+ readFile(params: {
757
+ sessionId: string;
758
+ path: string;
759
+ cwd?: string;
760
+ signal?: AbortSignal;
761
+ }): Promise<Readable | null>;
762
+ killCommand(params: {
763
+ sessionId: string;
764
+ commandId: string;
765
+ signal: number;
766
+ abortSignal?: AbortSignal;
767
+ }): Promise<Parsed<{
768
+ command: {
769
+ id: string;
770
+ name: string;
771
+ args: string[];
772
+ cwd: string;
773
+ sessionId: string;
774
+ exitCode: number | null;
775
+ startedAt: number;
776
+ durationMs?: number | undefined;
777
+ };
778
+ }>>;
779
+ getLogs(params: {
780
+ sessionId: string;
781
+ cmdId: string;
782
+ signal?: AbortSignal;
783
+ }): AsyncGenerator<LogOutputLine, void, void> & Disposable & {
784
+ close(): void;
785
+ };
786
+ stopSession(params: {
787
+ sessionId: string;
788
+ signal?: AbortSignal;
789
+ }): Promise<Parsed<z.infer<typeof StopSessionResponse>>>;
790
+ updateNetworkPolicy(params: {
791
+ sessionId: string;
792
+ networkPolicy: NetworkPolicy;
793
+ signal?: AbortSignal;
794
+ }): Promise<Parsed<z.infer<typeof SessionResponse>>>;
795
+ extendTimeout(params: {
796
+ sessionId: string;
797
+ duration: number;
798
+ signal?: AbortSignal;
799
+ }): Promise<Parsed<z.infer<typeof SessionResponse>>>;
800
+ createSnapshot(params: {
801
+ sessionId: string;
802
+ expiration?: number;
803
+ signal?: AbortSignal;
804
+ }): Promise<Parsed<z.infer<typeof CreateSnapshotResponse>>>;
805
+ deleteSnapshot(params: {
806
+ snapshotId: string;
807
+ signal?: AbortSignal;
808
+ }): Promise<Parsed<z.infer<typeof SnapshotResponse>>>;
809
+ getSnapshot(params: {
810
+ snapshotId: string;
811
+ signal?: AbortSignal;
812
+ }): Promise<Parsed<z.infer<typeof SnapshotResponse>>>;
813
+ getSandbox(params: WithPrivate<{
814
+ name: string;
815
+ projectId: string;
816
+ resume?: boolean;
817
+ signal?: AbortSignal;
818
+ }>): Promise<Parsed<{
819
+ sandbox: {
820
+ name: string;
821
+ persistent: boolean;
822
+ createdAt: number;
823
+ updatedAt: number;
824
+ currentSessionId: string;
825
+ status: "pending" | "running" | "stopping" | "stopped" | "failed" | "aborted" | "snapshotting";
826
+ region?: string | undefined;
827
+ vcpus?: number | undefined;
828
+ memory?: number | undefined;
829
+ runtime?: string | undefined;
830
+ image?: string | undefined;
831
+ timeout?: number | undefined;
832
+ networkPolicy?: {
833
+ [x: string]: unknown;
834
+ mode: "allow-all";
835
+ } | {
836
+ [x: string]: unknown;
837
+ mode: "deny-all";
838
+ } | {
839
+ [x: string]: unknown;
840
+ mode: "custom";
841
+ allowedDomains?: string[] | undefined;
842
+ allowedCIDRs?: string[] | undefined;
843
+ deniedCIDRs?: string[] | undefined;
844
+ injectionRules?: {
845
+ domain: string;
846
+ headers?: Record<string, string> | undefined;
847
+ headerNames?: string[] | undefined;
848
+ match?: {
849
+ path?: {
850
+ exact?: string | undefined;
851
+ startsWith?: string | undefined;
852
+ regex?: string | undefined;
853
+ } | undefined;
854
+ method?: string[] | undefined;
855
+ queryString?: {
856
+ key?: {
857
+ exact?: string | undefined;
858
+ startsWith?: string | undefined;
859
+ regex?: string | undefined;
860
+ } | undefined;
861
+ value?: {
862
+ exact?: string | undefined;
863
+ startsWith?: string | undefined;
864
+ regex?: string | undefined;
865
+ } | undefined;
866
+ }[] | undefined;
867
+ headers?: {
868
+ key?: {
869
+ exact?: string | undefined;
870
+ startsWith?: string | undefined;
871
+ regex?: string | undefined;
872
+ } | undefined;
873
+ value?: {
874
+ exact?: string | undefined;
875
+ startsWith?: string | undefined;
876
+ regex?: string | undefined;
877
+ } | undefined;
878
+ }[] | undefined;
879
+ } | undefined;
880
+ }[] | undefined;
881
+ forwardRules?: {
882
+ domain: string;
883
+ forwardURL: string;
884
+ match?: {
885
+ path?: {
886
+ exact?: string | undefined;
887
+ startsWith?: string | undefined;
888
+ regex?: string | undefined;
889
+ } | undefined;
890
+ method?: string[] | undefined;
891
+ queryString?: {
892
+ key?: {
893
+ exact?: string | undefined;
894
+ startsWith?: string | undefined;
895
+ regex?: string | undefined;
896
+ } | undefined;
897
+ value?: {
898
+ exact?: string | undefined;
899
+ startsWith?: string | undefined;
900
+ regex?: string | undefined;
901
+ } | undefined;
902
+ }[] | undefined;
903
+ headers?: {
904
+ key?: {
905
+ exact?: string | undefined;
906
+ startsWith?: string | undefined;
907
+ regex?: string | undefined;
908
+ } | undefined;
909
+ value?: {
910
+ exact?: string | undefined;
911
+ startsWith?: string | undefined;
912
+ regex?: string | undefined;
913
+ } | undefined;
914
+ }[] | undefined;
915
+ } | undefined;
916
+ }[] | undefined;
917
+ } | undefined;
918
+ totalEgressBytes?: number | undefined;
919
+ totalIngressBytes?: number | undefined;
920
+ totalActiveCpuDurationMs?: number | undefined;
921
+ totalDurationMs?: number | undefined;
922
+ expiresAt?: number | undefined;
923
+ currentSnapshotId?: string | undefined;
924
+ statusUpdatedAt?: number | undefined;
925
+ cwd?: string | undefined;
926
+ tags?: Record<string, string> | undefined;
927
+ snapshotExpiration?: number | undefined;
928
+ keepLastSnapshots?: {
929
+ count: number;
930
+ expiration?: number | undefined;
931
+ deleteEvicted?: boolean | undefined;
932
+ } | undefined;
933
+ };
934
+ session: {
935
+ [x: string]: unknown;
936
+ id: string;
937
+ memory: number;
938
+ vcpus: number;
939
+ region: string;
940
+ runtime: string;
941
+ timeout: number;
942
+ status: "pending" | "running" | "stopping" | "stopped" | "failed" | "aborted" | "snapshotting";
943
+ requestedAt: number;
944
+ createdAt: number;
945
+ cwd: string;
946
+ updatedAt: number;
947
+ startedAt?: number | undefined;
948
+ requestedStopAt?: number | undefined;
949
+ stoppedAt?: number | undefined;
950
+ abortedAt?: number | undefined;
951
+ duration?: number | undefined;
952
+ sourceSnapshotId?: string | undefined;
953
+ snapshottedAt?: number | undefined;
954
+ interactivePort?: number | undefined;
955
+ networkPolicy?: {
956
+ [x: string]: unknown;
957
+ mode: "allow-all";
958
+ } | {
959
+ [x: string]: unknown;
960
+ mode: "deny-all";
961
+ } | {
962
+ [x: string]: unknown;
963
+ mode: "custom";
964
+ allowedDomains?: string[] | undefined;
965
+ allowedCIDRs?: string[] | undefined;
966
+ deniedCIDRs?: string[] | undefined;
967
+ injectionRules?: {
968
+ domain: string;
969
+ headers?: Record<string, string> | undefined;
970
+ headerNames?: string[] | undefined;
971
+ match?: {
972
+ path?: {
973
+ exact?: string | undefined;
974
+ startsWith?: string | undefined;
975
+ regex?: string | undefined;
976
+ } | undefined;
977
+ method?: string[] | undefined;
978
+ queryString?: {
979
+ key?: {
980
+ exact?: string | undefined;
981
+ startsWith?: string | undefined;
982
+ regex?: string | undefined;
983
+ } | undefined;
984
+ value?: {
985
+ exact?: string | undefined;
986
+ startsWith?: string | undefined;
987
+ regex?: string | undefined;
988
+ } | undefined;
989
+ }[] | undefined;
990
+ headers?: {
991
+ key?: {
992
+ exact?: string | undefined;
993
+ startsWith?: string | undefined;
994
+ regex?: string | undefined;
995
+ } | undefined;
996
+ value?: {
997
+ exact?: string | undefined;
998
+ startsWith?: string | undefined;
999
+ regex?: string | undefined;
1000
+ } | undefined;
1001
+ }[] | undefined;
1002
+ } | undefined;
1003
+ }[] | undefined;
1004
+ forwardRules?: {
1005
+ domain: string;
1006
+ forwardURL: string;
1007
+ match?: {
1008
+ path?: {
1009
+ exact?: string | undefined;
1010
+ startsWith?: string | undefined;
1011
+ regex?: string | undefined;
1012
+ } | undefined;
1013
+ method?: string[] | undefined;
1014
+ queryString?: {
1015
+ key?: {
1016
+ exact?: string | undefined;
1017
+ startsWith?: string | undefined;
1018
+ regex?: string | undefined;
1019
+ } | undefined;
1020
+ value?: {
1021
+ exact?: string | undefined;
1022
+ startsWith?: string | undefined;
1023
+ regex?: string | undefined;
1024
+ } | undefined;
1025
+ }[] | undefined;
1026
+ headers?: {
1027
+ key?: {
1028
+ exact?: string | undefined;
1029
+ startsWith?: string | undefined;
1030
+ regex?: string | undefined;
1031
+ } | undefined;
1032
+ value?: {
1033
+ exact?: string | undefined;
1034
+ startsWith?: string | undefined;
1035
+ regex?: string | undefined;
1036
+ } | undefined;
1037
+ }[] | undefined;
1038
+ } | undefined;
1039
+ }[] | undefined;
1040
+ } | undefined;
1041
+ activeCpuDurationMs?: number | undefined;
1042
+ networkTransfer?: {
1043
+ ingress: number;
1044
+ egress: number;
1045
+ } | undefined;
1046
+ };
1047
+ routes: {
1048
+ url: string;
1049
+ subdomain: string;
1050
+ port: number;
1051
+ }[];
1052
+ resumed?: boolean | undefined;
1053
+ }>>;
1054
+ listSandboxes(params: {
1055
+ projectId: string;
1056
+ limit?: number;
1057
+ sortBy?: "createdAt" | "name" | "statusUpdatedAt";
1058
+ sortOrder?: "asc" | "desc";
1059
+ namePrefix?: string;
1060
+ cursor?: string;
1061
+ tags?: Record<string, string>;
1062
+ signal?: AbortSignal;
1063
+ }): Promise<Parsed<{
1064
+ sandboxes: {
1065
+ name: string;
1066
+ persistent: boolean;
1067
+ createdAt: number;
1068
+ updatedAt: number;
1069
+ currentSessionId: string;
1070
+ status: "pending" | "running" | "stopping" | "stopped" | "failed" | "aborted" | "snapshotting";
1071
+ region?: string | undefined;
1072
+ vcpus?: number | undefined;
1073
+ memory?: number | undefined;
1074
+ runtime?: string | undefined;
1075
+ image?: string | undefined;
1076
+ timeout?: number | undefined;
1077
+ networkPolicy?: {
1078
+ [x: string]: unknown;
1079
+ mode: "allow-all";
1080
+ } | {
1081
+ [x: string]: unknown;
1082
+ mode: "deny-all";
1083
+ } | {
1084
+ [x: string]: unknown;
1085
+ mode: "custom";
1086
+ allowedDomains?: string[] | undefined;
1087
+ allowedCIDRs?: string[] | undefined;
1088
+ deniedCIDRs?: string[] | undefined;
1089
+ injectionRules?: {
1090
+ domain: string;
1091
+ headers?: Record<string, string> | undefined;
1092
+ headerNames?: string[] | undefined;
1093
+ match?: {
1094
+ path?: {
1095
+ exact?: string | undefined;
1096
+ startsWith?: string | undefined;
1097
+ regex?: string | undefined;
1098
+ } | undefined;
1099
+ method?: string[] | undefined;
1100
+ queryString?: {
1101
+ key?: {
1102
+ exact?: string | undefined;
1103
+ startsWith?: string | undefined;
1104
+ regex?: string | undefined;
1105
+ } | undefined;
1106
+ value?: {
1107
+ exact?: string | undefined;
1108
+ startsWith?: string | undefined;
1109
+ regex?: string | undefined;
1110
+ } | undefined;
1111
+ }[] | undefined;
1112
+ headers?: {
1113
+ key?: {
1114
+ exact?: string | undefined;
1115
+ startsWith?: string | undefined;
1116
+ regex?: string | undefined;
1117
+ } | undefined;
1118
+ value?: {
1119
+ exact?: string | undefined;
1120
+ startsWith?: string | undefined;
1121
+ regex?: string | undefined;
1122
+ } | undefined;
1123
+ }[] | undefined;
1124
+ } | undefined;
1125
+ }[] | undefined;
1126
+ forwardRules?: {
1127
+ domain: string;
1128
+ forwardURL: string;
1129
+ match?: {
1130
+ path?: {
1131
+ exact?: string | undefined;
1132
+ startsWith?: string | undefined;
1133
+ regex?: string | undefined;
1134
+ } | undefined;
1135
+ method?: string[] | undefined;
1136
+ queryString?: {
1137
+ key?: {
1138
+ exact?: string | undefined;
1139
+ startsWith?: string | undefined;
1140
+ regex?: string | undefined;
1141
+ } | undefined;
1142
+ value?: {
1143
+ exact?: string | undefined;
1144
+ startsWith?: string | undefined;
1145
+ regex?: string | undefined;
1146
+ } | undefined;
1147
+ }[] | undefined;
1148
+ headers?: {
1149
+ key?: {
1150
+ exact?: string | undefined;
1151
+ startsWith?: string | undefined;
1152
+ regex?: string | undefined;
1153
+ } | undefined;
1154
+ value?: {
1155
+ exact?: string | undefined;
1156
+ startsWith?: string | undefined;
1157
+ regex?: string | undefined;
1158
+ } | undefined;
1159
+ }[] | undefined;
1160
+ } | undefined;
1161
+ }[] | undefined;
1162
+ } | undefined;
1163
+ totalEgressBytes?: number | undefined;
1164
+ totalIngressBytes?: number | undefined;
1165
+ totalActiveCpuDurationMs?: number | undefined;
1166
+ totalDurationMs?: number | undefined;
1167
+ expiresAt?: number | undefined;
1168
+ currentSnapshotId?: string | undefined;
1169
+ statusUpdatedAt?: number | undefined;
1170
+ cwd?: string | undefined;
1171
+ tags?: Record<string, string> | undefined;
1172
+ snapshotExpiration?: number | undefined;
1173
+ keepLastSnapshots?: {
1174
+ count: number;
1175
+ expiration?: number | undefined;
1176
+ deleteEvicted?: boolean | undefined;
1177
+ } | undefined;
1178
+ }[];
1179
+ pagination: {
1180
+ count: number;
1181
+ next: string | null;
1182
+ };
1183
+ }>>;
1184
+ updateSandbox(params: {
1185
+ name: string;
1186
+ projectId: string;
1187
+ persistent?: boolean;
1188
+ resources?: {
1189
+ vcpus?: number;
1190
+ memory?: number;
1191
+ };
1192
+ runtime?: RUNTIMES | (string & {});
1193
+ timeout?: number;
1194
+ networkPolicy?: NetworkPolicy;
1195
+ tags?: Record<string, string>;
1196
+ ports?: number[];
1197
+ snapshotExpiration?: number;
1198
+ keepLastSnapshots?: {
1199
+ count: number;
1200
+ expiration?: number;
1201
+ deleteEvicted?: boolean;
1202
+ } | null;
1203
+ currentSnapshotId?: string;
1204
+ signal?: AbortSignal;
1205
+ }): Promise<Parsed<{
1206
+ sandbox: {
1207
+ name: string;
1208
+ persistent: boolean;
1209
+ createdAt: number;
1210
+ updatedAt: number;
1211
+ currentSessionId: string;
1212
+ status: "pending" | "running" | "stopping" | "stopped" | "failed" | "aborted" | "snapshotting";
1213
+ region?: string | undefined;
1214
+ vcpus?: number | undefined;
1215
+ memory?: number | undefined;
1216
+ runtime?: string | undefined;
1217
+ image?: string | undefined;
1218
+ timeout?: number | undefined;
1219
+ networkPolicy?: {
1220
+ [x: string]: unknown;
1221
+ mode: "allow-all";
1222
+ } | {
1223
+ [x: string]: unknown;
1224
+ mode: "deny-all";
1225
+ } | {
1226
+ [x: string]: unknown;
1227
+ mode: "custom";
1228
+ allowedDomains?: string[] | undefined;
1229
+ allowedCIDRs?: string[] | undefined;
1230
+ deniedCIDRs?: string[] | undefined;
1231
+ injectionRules?: {
1232
+ domain: string;
1233
+ headers?: Record<string, string> | undefined;
1234
+ headerNames?: string[] | undefined;
1235
+ match?: {
1236
+ path?: {
1237
+ exact?: string | undefined;
1238
+ startsWith?: string | undefined;
1239
+ regex?: string | undefined;
1240
+ } | undefined;
1241
+ method?: string[] | undefined;
1242
+ queryString?: {
1243
+ key?: {
1244
+ exact?: string | undefined;
1245
+ startsWith?: string | undefined;
1246
+ regex?: string | undefined;
1247
+ } | undefined;
1248
+ value?: {
1249
+ exact?: string | undefined;
1250
+ startsWith?: string | undefined;
1251
+ regex?: string | undefined;
1252
+ } | undefined;
1253
+ }[] | undefined;
1254
+ headers?: {
1255
+ key?: {
1256
+ exact?: string | undefined;
1257
+ startsWith?: string | undefined;
1258
+ regex?: string | undefined;
1259
+ } | undefined;
1260
+ value?: {
1261
+ exact?: string | undefined;
1262
+ startsWith?: string | undefined;
1263
+ regex?: string | undefined;
1264
+ } | undefined;
1265
+ }[] | undefined;
1266
+ } | undefined;
1267
+ }[] | undefined;
1268
+ forwardRules?: {
1269
+ domain: string;
1270
+ forwardURL: string;
1271
+ match?: {
1272
+ path?: {
1273
+ exact?: string | undefined;
1274
+ startsWith?: string | undefined;
1275
+ regex?: string | undefined;
1276
+ } | undefined;
1277
+ method?: string[] | undefined;
1278
+ queryString?: {
1279
+ key?: {
1280
+ exact?: string | undefined;
1281
+ startsWith?: string | undefined;
1282
+ regex?: string | undefined;
1283
+ } | undefined;
1284
+ value?: {
1285
+ exact?: string | undefined;
1286
+ startsWith?: string | undefined;
1287
+ regex?: string | undefined;
1288
+ } | undefined;
1289
+ }[] | undefined;
1290
+ headers?: {
1291
+ key?: {
1292
+ exact?: string | undefined;
1293
+ startsWith?: string | undefined;
1294
+ regex?: string | undefined;
1295
+ } | undefined;
1296
+ value?: {
1297
+ exact?: string | undefined;
1298
+ startsWith?: string | undefined;
1299
+ regex?: string | undefined;
1300
+ } | undefined;
1301
+ }[] | undefined;
1302
+ } | undefined;
1303
+ }[] | undefined;
1304
+ } | undefined;
1305
+ totalEgressBytes?: number | undefined;
1306
+ totalIngressBytes?: number | undefined;
1307
+ totalActiveCpuDurationMs?: number | undefined;
1308
+ totalDurationMs?: number | undefined;
1309
+ expiresAt?: number | undefined;
1310
+ currentSnapshotId?: string | undefined;
1311
+ statusUpdatedAt?: number | undefined;
1312
+ cwd?: string | undefined;
1313
+ tags?: Record<string, string> | undefined;
1314
+ snapshotExpiration?: number | undefined;
1315
+ keepLastSnapshots?: {
1316
+ count: number;
1317
+ expiration?: number | undefined;
1318
+ deleteEvicted?: boolean | undefined;
1319
+ } | undefined;
1320
+ };
1321
+ routes?: {
1322
+ url: string;
1323
+ subdomain: string;
1324
+ port: number;
1325
+ }[] | undefined;
1326
+ }>>;
1327
+ deleteSandbox(params: {
1328
+ name: string;
1329
+ projectId: string;
1330
+ signal?: AbortSignal;
1331
+ }): Promise<Parsed<{
1332
+ sandbox: {
1333
+ name: string;
1334
+ persistent: boolean;
1335
+ createdAt: number;
1336
+ updatedAt: number;
1337
+ currentSessionId: string;
1338
+ status: "pending" | "running" | "stopping" | "stopped" | "failed" | "aborted" | "snapshotting";
1339
+ region?: string | undefined;
1340
+ vcpus?: number | undefined;
1341
+ memory?: number | undefined;
1342
+ runtime?: string | undefined;
1343
+ image?: string | undefined;
1344
+ timeout?: number | undefined;
1345
+ networkPolicy?: {
1346
+ [x: string]: unknown;
1347
+ mode: "allow-all";
1348
+ } | {
1349
+ [x: string]: unknown;
1350
+ mode: "deny-all";
1351
+ } | {
1352
+ [x: string]: unknown;
1353
+ mode: "custom";
1354
+ allowedDomains?: string[] | undefined;
1355
+ allowedCIDRs?: string[] | undefined;
1356
+ deniedCIDRs?: string[] | undefined;
1357
+ injectionRules?: {
1358
+ domain: string;
1359
+ headers?: Record<string, string> | undefined;
1360
+ headerNames?: string[] | undefined;
1361
+ match?: {
1362
+ path?: {
1363
+ exact?: string | undefined;
1364
+ startsWith?: string | undefined;
1365
+ regex?: string | undefined;
1366
+ } | undefined;
1367
+ method?: string[] | undefined;
1368
+ queryString?: {
1369
+ key?: {
1370
+ exact?: string | undefined;
1371
+ startsWith?: string | undefined;
1372
+ regex?: string | undefined;
1373
+ } | undefined;
1374
+ value?: {
1375
+ exact?: string | undefined;
1376
+ startsWith?: string | undefined;
1377
+ regex?: string | undefined;
1378
+ } | undefined;
1379
+ }[] | undefined;
1380
+ headers?: {
1381
+ key?: {
1382
+ exact?: string | undefined;
1383
+ startsWith?: string | undefined;
1384
+ regex?: string | undefined;
1385
+ } | undefined;
1386
+ value?: {
1387
+ exact?: string | undefined;
1388
+ startsWith?: string | undefined;
1389
+ regex?: string | undefined;
1390
+ } | undefined;
1391
+ }[] | undefined;
1392
+ } | undefined;
1393
+ }[] | undefined;
1394
+ forwardRules?: {
1395
+ domain: string;
1396
+ forwardURL: string;
1397
+ match?: {
1398
+ path?: {
1399
+ exact?: string | undefined;
1400
+ startsWith?: string | undefined;
1401
+ regex?: string | undefined;
1402
+ } | undefined;
1403
+ method?: string[] | undefined;
1404
+ queryString?: {
1405
+ key?: {
1406
+ exact?: string | undefined;
1407
+ startsWith?: string | undefined;
1408
+ regex?: string | undefined;
1409
+ } | undefined;
1410
+ value?: {
1411
+ exact?: string | undefined;
1412
+ startsWith?: string | undefined;
1413
+ regex?: string | undefined;
1414
+ } | undefined;
1415
+ }[] | undefined;
1416
+ headers?: {
1417
+ key?: {
1418
+ exact?: string | undefined;
1419
+ startsWith?: string | undefined;
1420
+ regex?: string | undefined;
1421
+ } | undefined;
1422
+ value?: {
1423
+ exact?: string | undefined;
1424
+ startsWith?: string | undefined;
1425
+ regex?: string | undefined;
1426
+ } | undefined;
1427
+ }[] | undefined;
1428
+ } | undefined;
1429
+ }[] | undefined;
1430
+ } | undefined;
1431
+ totalEgressBytes?: number | undefined;
1432
+ totalIngressBytes?: number | undefined;
1433
+ totalActiveCpuDurationMs?: number | undefined;
1434
+ totalDurationMs?: number | undefined;
1435
+ expiresAt?: number | undefined;
1436
+ currentSnapshotId?: string | undefined;
1437
+ statusUpdatedAt?: number | undefined;
1438
+ cwd?: string | undefined;
1439
+ tags?: Record<string, string> | undefined;
1440
+ snapshotExpiration?: number | undefined;
1441
+ keepLastSnapshots?: {
1442
+ count: number;
1443
+ expiration?: number | undefined;
1444
+ deleteEvicted?: boolean | undefined;
1445
+ } | undefined;
1446
+ };
1447
+ routes?: {
1448
+ url: string;
1449
+ subdomain: string;
1450
+ port: number;
1451
+ }[] | undefined;
1452
+ }>>;
1453
+ }
1454
+ //#endregion
1455
+ export { APIClient, WithFetchOptions };
1456
+ //# sourceMappingURL=api-client.d.ts.map