@vercel/sandbox 2.0.0-beta.13 → 2.0.0-beta.18

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 (79) hide show
  1. package/dist/api-client/api-client.cjs +3 -15
  2. package/dist/api-client/api-client.cjs.map +1 -1
  3. package/dist/api-client/api-client.d.cts +5510 -76
  4. package/dist/api-client/api-client.d.ts +5510 -76
  5. package/dist/api-client/api-client.js +4 -16
  6. package/dist/api-client/api-client.js.map +1 -1
  7. package/dist/api-client/base-client.cjs +2 -1
  8. package/dist/api-client/base-client.cjs.map +1 -1
  9. package/dist/api-client/base-client.js +2 -1
  10. package/dist/api-client/base-client.js.map +1 -1
  11. package/dist/api-client/index.d.ts +1 -1
  12. package/dist/api-client/index.js +1 -1
  13. package/dist/api-client/validators.cjs +60 -16
  14. package/dist/api-client/validators.cjs.map +1 -1
  15. package/dist/api-client/validators.d.cts +25546 -130
  16. package/dist/api-client/validators.d.ts +25546 -130
  17. package/dist/api-client/validators.js +55 -16
  18. package/dist/api-client/validators.js.map +1 -1
  19. package/dist/auth/api.cjs +1 -1
  20. package/dist/auth/api.cjs.map +1 -1
  21. package/dist/auth/api.js +1 -1
  22. package/dist/auth/api.js.map +1 -1
  23. package/dist/auth/file.d.cts +3 -3
  24. package/dist/auth/file.d.ts +3 -3
  25. package/dist/auth/index.cjs +0 -1
  26. package/dist/auth/index.d.cts +2 -2
  27. package/dist/auth/index.d.ts +2 -2
  28. package/dist/auth/index.js +2 -2
  29. package/dist/auth/project.cjs +124 -26
  30. package/dist/auth/project.cjs.map +1 -1
  31. package/dist/auth/project.d.cts +9 -13
  32. package/dist/auth/project.d.ts +9 -13
  33. package/dist/auth/project.js +125 -26
  34. package/dist/auth/project.js.map +1 -1
  35. package/dist/filesystem.cjs +499 -0
  36. package/dist/filesystem.cjs.map +1 -0
  37. package/dist/filesystem.d.cts +258 -0
  38. package/dist/filesystem.d.ts +258 -0
  39. package/dist/filesystem.js +497 -0
  40. package/dist/filesystem.js.map +1 -0
  41. package/dist/index.cjs +2 -0
  42. package/dist/index.d.cts +4 -3
  43. package/dist/index.d.ts +4 -3
  44. package/dist/index.js +2 -1
  45. package/dist/network-policy.d.cts +58 -2
  46. package/dist/network-policy.d.ts +58 -2
  47. package/dist/sandbox.cjs +138 -22
  48. package/dist/sandbox.cjs.map +1 -1
  49. package/dist/sandbox.d.cts +2069 -22
  50. package/dist/sandbox.d.ts +2069 -22
  51. package/dist/sandbox.js +138 -22
  52. package/dist/sandbox.js.map +1 -1
  53. package/dist/session.cjs +10 -7
  54. package/dist/session.cjs.map +1 -1
  55. package/dist/session.d.cts +7 -5
  56. package/dist/session.d.ts +7 -5
  57. package/dist/session.js +10 -7
  58. package/dist/session.js.map +1 -1
  59. package/dist/snapshot.cjs +63 -10
  60. package/dist/snapshot.cjs.map +1 -1
  61. package/dist/snapshot.d.cts +41 -9
  62. package/dist/snapshot.d.ts +41 -9
  63. package/dist/snapshot.js +62 -10
  64. package/dist/snapshot.js.map +1 -1
  65. package/dist/utils/network-policy.cjs +23 -39
  66. package/dist/utils/network-policy.cjs.map +1 -1
  67. package/dist/utils/network-policy.js +23 -39
  68. package/dist/utils/network-policy.js.map +1 -1
  69. package/dist/utils/paginator.cjs +41 -0
  70. package/dist/utils/paginator.cjs.map +1 -0
  71. package/dist/utils/paginator.d.cts +16 -0
  72. package/dist/utils/paginator.d.ts +16 -0
  73. package/dist/utils/paginator.js +40 -0
  74. package/dist/utils/paginator.js.map +1 -0
  75. package/dist/version.cjs +1 -1
  76. package/dist/version.cjs.map +1 -1
  77. package/dist/version.js +1 -1
  78. package/dist/version.js.map +1 -1
  79. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
- import { SandboxMetaData, SandboxRouteData, SessionMetaData } from "./api-client/validators.cjs";
2
- import { NetworkPolicy } from "./network-policy.cjs";
1
+ import { Paginator } from "./utils/paginator.cjs";
2
+ import { SandboxMetaData, SandboxRouteData, SessionMetaData, SnapshotMetadata } from "./api-client/validators.cjs";
3
+ import { NetworkPolicy, NetworkPolicyKeyValueMatcher, NetworkPolicyMatch, NetworkPolicyMatcher } from "./network-policy.cjs";
3
4
  import { WithPrivate } from "./utils/types.cjs";
4
5
  import { RUNTIMES } from "./constants.cjs";
5
6
  import { APIClient, WithFetchOptions } from "./api-client/api-client.cjs";
@@ -8,6 +9,7 @@ import { Command, CommandFinished } from "./command.cjs";
8
9
  import { Snapshot } from "./snapshot.cjs";
9
10
  import { SandboxSnapshot } from "./utils/sandbox-snapshot.cjs";
10
11
  import { RunCommandParams, Session } from "./session.cjs";
12
+ import { FileSystem } from "./filesystem.cjs";
11
13
  import * as zod0 from "zod";
12
14
  import { WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE } from "@workflow/serde";
13
15
 
@@ -135,6 +137,23 @@ interface GetSandboxParams {
135
137
  */
136
138
  onResume?: (sandbox: Sandbox) => Promise<void>;
137
139
  }
140
+ /**
141
+ * Extends both {@link BaseCreateSandboxParams} and {@link GetSandboxParams}
142
+ * (minus `name`, which is required on get but optional here) so that any
143
+ * new parameter added to either flow is picked up automatically. The
144
+ * structural overlap on `signal` / `onResume` is intentional — both
145
+ * interfaces declare them with identical optional types.
146
+ * @inline
147
+ */
148
+ interface GetOrCreateSandboxParams extends BaseCreateSandboxParams, Omit<GetSandboxParams, "name"> {
149
+ /**
150
+ * Called once after a sandbox is freshly created (not when an existing
151
+ * sandbox is retrieved). Use this for one-time setup such as seeding
152
+ * files or warming caches. The returned promise is awaited before
153
+ * {@link Sandbox.getOrCreate} resolves.
154
+ */
155
+ onCreate?: (sandbox: Sandbox) => Promise<void>;
156
+ }
138
157
  /**
139
158
  * Serialized representation of a Sandbox for @workflow/serde.
140
159
  * Fields `metadata` and `routes` are the original wire format from main.
@@ -170,6 +189,16 @@ declare class Sandbox {
170
189
  * Hook that will be executed when a new session is created during resume.
171
190
  */
172
191
  private readonly onResume?;
192
+ /**
193
+ * A `node:fs/promises`-compatible API for interacting with the sandbox filesystem.
194
+ *
195
+ * @example
196
+ * const content = await sandbox.fs.readFile('/etc/hostname', 'utf8');
197
+ * await sandbox.fs.writeFile('/tmp/hello.txt', 'Hello, world!');
198
+ * const files = await sandbox.fs.readdir('/tmp');
199
+ * const stats = await sandbox.fs.stat('/tmp/hello.txt');
200
+ */
201
+ readonly fs: FileSystem;
173
202
  /**
174
203
  * Lazily resolve credentials and construct an API client.
175
204
  * @internal
@@ -277,21 +306,30 @@ declare class Sandbox {
277
306
  * Allow to get a list of sandboxes for a team narrowed to the given params.
278
307
  * It returns both the sandboxes and the pagination metadata to allow getting
279
308
  * the next page of results.
280
- */
281
- static list(params?: Partial<Parameters<APIClient["listSandboxes"]>[0]> & Partial<Credentials> & WithFetchOptions): Promise<{
309
+ *
310
+ * The returned object is async-iterable to auto-paginate through all pages:
311
+ *
312
+ * ```ts
313
+ * const result = await Sandbox.list({ namePrefix: "ci-" });
314
+ * for await (const sandbox of result) { ... }
315
+ * // or: await result.toArray();
316
+ * // or: for await (const page of result.pages()) { ... }
317
+ * ```
318
+ */
319
+ static list(params?: Partial<Parameters<APIClient["listSandboxes"]>[0]> & Partial<Credentials> & WithFetchOptions): Promise<Paginator<{
282
320
  sandboxes: {
283
321
  status: "aborted" | "pending" | "running" | "stopping" | "stopped" | "failed" | "snapshotting";
284
- name: string;
285
- persistent: boolean;
286
322
  createdAt: number;
287
323
  updatedAt: number;
324
+ name: string;
325
+ persistent: boolean;
288
326
  currentSessionId: string;
289
- tags?: Record<string, string> | undefined;
290
- region?: string | undefined;
291
- vcpus?: number | undefined;
292
327
  memory?: number | undefined;
328
+ vcpus?: number | undefined;
329
+ region?: string | undefined;
293
330
  runtime?: string | undefined;
294
331
  timeout?: number | undefined;
332
+ cwd?: string | undefined;
295
333
  networkPolicy?: zod0.objectInputType<{
296
334
  mode: zod0.ZodLiteral<"allow-all">;
297
335
  }, zod0.ZodTypeAny, "passthrough"> | zod0.objectInputType<{
@@ -305,22 +343,516 @@ declare class Sandbox {
305
343
  domain: zod0.ZodString;
306
344
  headers: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodString>>;
307
345
  headerNames: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
346
+ match: zod0.ZodOptional<zod0.ZodObject<{
347
+ path: zod0.ZodOptional<zod0.ZodObject<{
348
+ exact: zod0.ZodOptional<zod0.ZodString>;
349
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
350
+ regex: zod0.ZodOptional<zod0.ZodString>;
351
+ }, "strip", zod0.ZodTypeAny, {
352
+ exact?: string | undefined;
353
+ startsWith?: string | undefined;
354
+ regex?: string | undefined;
355
+ }, {
356
+ exact?: string | undefined;
357
+ startsWith?: string | undefined;
358
+ regex?: string | undefined;
359
+ }>>;
360
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
361
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
362
+ key: zod0.ZodOptional<zod0.ZodObject<{
363
+ exact: zod0.ZodOptional<zod0.ZodString>;
364
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
365
+ regex: zod0.ZodOptional<zod0.ZodString>;
366
+ }, "strip", zod0.ZodTypeAny, {
367
+ exact?: string | undefined;
368
+ startsWith?: string | undefined;
369
+ regex?: string | undefined;
370
+ }, {
371
+ exact?: string | undefined;
372
+ startsWith?: string | undefined;
373
+ regex?: string | undefined;
374
+ }>>;
375
+ value: zod0.ZodOptional<zod0.ZodObject<{
376
+ exact: zod0.ZodOptional<zod0.ZodString>;
377
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
378
+ regex: zod0.ZodOptional<zod0.ZodString>;
379
+ }, "strip", zod0.ZodTypeAny, {
380
+ exact?: string | undefined;
381
+ startsWith?: string | undefined;
382
+ regex?: string | undefined;
383
+ }, {
384
+ exact?: string | undefined;
385
+ startsWith?: string | undefined;
386
+ regex?: string | undefined;
387
+ }>>;
388
+ }, "strip", zod0.ZodTypeAny, {
389
+ value?: {
390
+ exact?: string | undefined;
391
+ startsWith?: string | undefined;
392
+ regex?: string | undefined;
393
+ } | undefined;
394
+ key?: {
395
+ exact?: string | undefined;
396
+ startsWith?: string | undefined;
397
+ regex?: string | undefined;
398
+ } | undefined;
399
+ }, {
400
+ value?: {
401
+ exact?: string | undefined;
402
+ startsWith?: string | undefined;
403
+ regex?: string | undefined;
404
+ } | undefined;
405
+ key?: {
406
+ exact?: string | undefined;
407
+ startsWith?: string | undefined;
408
+ regex?: string | undefined;
409
+ } | undefined;
410
+ }>, "many">>;
411
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
412
+ key: zod0.ZodOptional<zod0.ZodObject<{
413
+ exact: zod0.ZodOptional<zod0.ZodString>;
414
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
415
+ regex: zod0.ZodOptional<zod0.ZodString>;
416
+ }, "strip", zod0.ZodTypeAny, {
417
+ exact?: string | undefined;
418
+ startsWith?: string | undefined;
419
+ regex?: string | undefined;
420
+ }, {
421
+ exact?: string | undefined;
422
+ startsWith?: string | undefined;
423
+ regex?: string | undefined;
424
+ }>>;
425
+ value: zod0.ZodOptional<zod0.ZodObject<{
426
+ exact: zod0.ZodOptional<zod0.ZodString>;
427
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
428
+ regex: zod0.ZodOptional<zod0.ZodString>;
429
+ }, "strip", zod0.ZodTypeAny, {
430
+ exact?: string | undefined;
431
+ startsWith?: string | undefined;
432
+ regex?: string | undefined;
433
+ }, {
434
+ exact?: string | undefined;
435
+ startsWith?: string | undefined;
436
+ regex?: string | undefined;
437
+ }>>;
438
+ }, "strip", zod0.ZodTypeAny, {
439
+ value?: {
440
+ exact?: string | undefined;
441
+ startsWith?: string | undefined;
442
+ regex?: string | undefined;
443
+ } | undefined;
444
+ key?: {
445
+ exact?: string | undefined;
446
+ startsWith?: string | undefined;
447
+ regex?: string | undefined;
448
+ } | undefined;
449
+ }, {
450
+ value?: {
451
+ exact?: string | undefined;
452
+ startsWith?: string | undefined;
453
+ regex?: string | undefined;
454
+ } | undefined;
455
+ key?: {
456
+ exact?: string | undefined;
457
+ startsWith?: string | undefined;
458
+ regex?: string | undefined;
459
+ } | undefined;
460
+ }>, "many">>;
461
+ }, "strip", zod0.ZodTypeAny, {
462
+ path?: {
463
+ exact?: string | undefined;
464
+ startsWith?: string | undefined;
465
+ regex?: string | undefined;
466
+ } | undefined;
467
+ headers?: {
468
+ value?: {
469
+ exact?: string | undefined;
470
+ startsWith?: string | undefined;
471
+ regex?: string | undefined;
472
+ } | undefined;
473
+ key?: {
474
+ exact?: string | undefined;
475
+ startsWith?: string | undefined;
476
+ regex?: string | undefined;
477
+ } | undefined;
478
+ }[] | undefined;
479
+ method?: string[] | undefined;
480
+ queryString?: {
481
+ value?: {
482
+ exact?: string | undefined;
483
+ startsWith?: string | undefined;
484
+ regex?: string | undefined;
485
+ } | undefined;
486
+ key?: {
487
+ exact?: string | undefined;
488
+ startsWith?: string | undefined;
489
+ regex?: string | undefined;
490
+ } | undefined;
491
+ }[] | undefined;
492
+ }, {
493
+ path?: {
494
+ exact?: string | undefined;
495
+ startsWith?: string | undefined;
496
+ regex?: string | undefined;
497
+ } | undefined;
498
+ headers?: {
499
+ value?: {
500
+ exact?: string | undefined;
501
+ startsWith?: string | undefined;
502
+ regex?: string | undefined;
503
+ } | undefined;
504
+ key?: {
505
+ exact?: string | undefined;
506
+ startsWith?: string | undefined;
507
+ regex?: string | undefined;
508
+ } | undefined;
509
+ }[] | undefined;
510
+ method?: string[] | undefined;
511
+ queryString?: {
512
+ value?: {
513
+ exact?: string | undefined;
514
+ startsWith?: string | undefined;
515
+ regex?: string | undefined;
516
+ } | undefined;
517
+ key?: {
518
+ exact?: string | undefined;
519
+ startsWith?: string | undefined;
520
+ regex?: string | undefined;
521
+ } | undefined;
522
+ }[] | undefined;
523
+ }>>;
308
524
  }, "strip", zod0.ZodTypeAny, {
309
525
  domain: string;
526
+ match?: {
527
+ path?: {
528
+ exact?: string | undefined;
529
+ startsWith?: string | undefined;
530
+ regex?: string | undefined;
531
+ } | undefined;
532
+ headers?: {
533
+ value?: {
534
+ exact?: string | undefined;
535
+ startsWith?: string | undefined;
536
+ regex?: string | undefined;
537
+ } | undefined;
538
+ key?: {
539
+ exact?: string | undefined;
540
+ startsWith?: string | undefined;
541
+ regex?: string | undefined;
542
+ } | undefined;
543
+ }[] | undefined;
544
+ method?: string[] | undefined;
545
+ queryString?: {
546
+ value?: {
547
+ exact?: string | undefined;
548
+ startsWith?: string | undefined;
549
+ regex?: string | undefined;
550
+ } | undefined;
551
+ key?: {
552
+ exact?: string | undefined;
553
+ startsWith?: string | undefined;
554
+ regex?: string | undefined;
555
+ } | undefined;
556
+ }[] | undefined;
557
+ } | undefined;
310
558
  headers?: Record<string, string> | undefined;
311
559
  headerNames?: string[] | undefined;
312
560
  }, {
313
561
  domain: string;
562
+ match?: {
563
+ path?: {
564
+ exact?: string | undefined;
565
+ startsWith?: string | undefined;
566
+ regex?: string | undefined;
567
+ } | undefined;
568
+ headers?: {
569
+ value?: {
570
+ exact?: string | undefined;
571
+ startsWith?: string | undefined;
572
+ regex?: string | undefined;
573
+ } | undefined;
574
+ key?: {
575
+ exact?: string | undefined;
576
+ startsWith?: string | undefined;
577
+ regex?: string | undefined;
578
+ } | undefined;
579
+ }[] | undefined;
580
+ method?: string[] | undefined;
581
+ queryString?: {
582
+ value?: {
583
+ exact?: string | undefined;
584
+ startsWith?: string | undefined;
585
+ regex?: string | undefined;
586
+ } | undefined;
587
+ key?: {
588
+ exact?: string | undefined;
589
+ startsWith?: string | undefined;
590
+ regex?: string | undefined;
591
+ } | undefined;
592
+ }[] | undefined;
593
+ } | undefined;
314
594
  headers?: Record<string, string> | undefined;
315
595
  headerNames?: string[] | undefined;
316
596
  }>, "many">>;
597
+ forwardRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
598
+ domain: zod0.ZodString;
599
+ forwardURL: zod0.ZodString;
600
+ match: zod0.ZodOptional<zod0.ZodObject<{
601
+ path: zod0.ZodOptional<zod0.ZodObject<{
602
+ exact: zod0.ZodOptional<zod0.ZodString>;
603
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
604
+ regex: zod0.ZodOptional<zod0.ZodString>;
605
+ }, "strip", zod0.ZodTypeAny, {
606
+ exact?: string | undefined;
607
+ startsWith?: string | undefined;
608
+ regex?: string | undefined;
609
+ }, {
610
+ exact?: string | undefined;
611
+ startsWith?: string | undefined;
612
+ regex?: string | undefined;
613
+ }>>;
614
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
615
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
616
+ key: zod0.ZodOptional<zod0.ZodObject<{
617
+ exact: zod0.ZodOptional<zod0.ZodString>;
618
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
619
+ regex: zod0.ZodOptional<zod0.ZodString>;
620
+ }, "strip", zod0.ZodTypeAny, {
621
+ exact?: string | undefined;
622
+ startsWith?: string | undefined;
623
+ regex?: string | undefined;
624
+ }, {
625
+ exact?: string | undefined;
626
+ startsWith?: string | undefined;
627
+ regex?: string | undefined;
628
+ }>>;
629
+ value: zod0.ZodOptional<zod0.ZodObject<{
630
+ exact: zod0.ZodOptional<zod0.ZodString>;
631
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
632
+ regex: zod0.ZodOptional<zod0.ZodString>;
633
+ }, "strip", zod0.ZodTypeAny, {
634
+ exact?: string | undefined;
635
+ startsWith?: string | undefined;
636
+ regex?: string | undefined;
637
+ }, {
638
+ exact?: string | undefined;
639
+ startsWith?: string | undefined;
640
+ regex?: string | undefined;
641
+ }>>;
642
+ }, "strip", zod0.ZodTypeAny, {
643
+ value?: {
644
+ exact?: string | undefined;
645
+ startsWith?: string | undefined;
646
+ regex?: string | undefined;
647
+ } | undefined;
648
+ key?: {
649
+ exact?: string | undefined;
650
+ startsWith?: string | undefined;
651
+ regex?: string | undefined;
652
+ } | undefined;
653
+ }, {
654
+ value?: {
655
+ exact?: string | undefined;
656
+ startsWith?: string | undefined;
657
+ regex?: string | undefined;
658
+ } | undefined;
659
+ key?: {
660
+ exact?: string | undefined;
661
+ startsWith?: string | undefined;
662
+ regex?: string | undefined;
663
+ } | undefined;
664
+ }>, "many">>;
665
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
666
+ key: zod0.ZodOptional<zod0.ZodObject<{
667
+ exact: zod0.ZodOptional<zod0.ZodString>;
668
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
669
+ regex: zod0.ZodOptional<zod0.ZodString>;
670
+ }, "strip", zod0.ZodTypeAny, {
671
+ exact?: string | undefined;
672
+ startsWith?: string | undefined;
673
+ regex?: string | undefined;
674
+ }, {
675
+ exact?: string | undefined;
676
+ startsWith?: string | undefined;
677
+ regex?: string | undefined;
678
+ }>>;
679
+ value: zod0.ZodOptional<zod0.ZodObject<{
680
+ exact: zod0.ZodOptional<zod0.ZodString>;
681
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
682
+ regex: zod0.ZodOptional<zod0.ZodString>;
683
+ }, "strip", zod0.ZodTypeAny, {
684
+ exact?: string | undefined;
685
+ startsWith?: string | undefined;
686
+ regex?: string | undefined;
687
+ }, {
688
+ exact?: string | undefined;
689
+ startsWith?: string | undefined;
690
+ regex?: string | undefined;
691
+ }>>;
692
+ }, "strip", zod0.ZodTypeAny, {
693
+ value?: {
694
+ exact?: string | undefined;
695
+ startsWith?: string | undefined;
696
+ regex?: string | undefined;
697
+ } | undefined;
698
+ key?: {
699
+ exact?: string | undefined;
700
+ startsWith?: string | undefined;
701
+ regex?: string | undefined;
702
+ } | undefined;
703
+ }, {
704
+ value?: {
705
+ exact?: string | undefined;
706
+ startsWith?: string | undefined;
707
+ regex?: string | undefined;
708
+ } | undefined;
709
+ key?: {
710
+ exact?: string | undefined;
711
+ startsWith?: string | undefined;
712
+ regex?: string | undefined;
713
+ } | undefined;
714
+ }>, "many">>;
715
+ }, "strip", zod0.ZodTypeAny, {
716
+ path?: {
717
+ exact?: string | undefined;
718
+ startsWith?: string | undefined;
719
+ regex?: string | undefined;
720
+ } | undefined;
721
+ headers?: {
722
+ value?: {
723
+ exact?: string | undefined;
724
+ startsWith?: string | undefined;
725
+ regex?: string | undefined;
726
+ } | undefined;
727
+ key?: {
728
+ exact?: string | undefined;
729
+ startsWith?: string | undefined;
730
+ regex?: string | undefined;
731
+ } | undefined;
732
+ }[] | undefined;
733
+ method?: string[] | undefined;
734
+ queryString?: {
735
+ value?: {
736
+ exact?: string | undefined;
737
+ startsWith?: string | undefined;
738
+ regex?: string | undefined;
739
+ } | undefined;
740
+ key?: {
741
+ exact?: string | undefined;
742
+ startsWith?: string | undefined;
743
+ regex?: string | undefined;
744
+ } | undefined;
745
+ }[] | undefined;
746
+ }, {
747
+ path?: {
748
+ exact?: string | undefined;
749
+ startsWith?: string | undefined;
750
+ regex?: string | undefined;
751
+ } | undefined;
752
+ headers?: {
753
+ value?: {
754
+ exact?: string | undefined;
755
+ startsWith?: string | undefined;
756
+ regex?: string | undefined;
757
+ } | undefined;
758
+ key?: {
759
+ exact?: string | undefined;
760
+ startsWith?: string | undefined;
761
+ regex?: string | undefined;
762
+ } | undefined;
763
+ }[] | undefined;
764
+ method?: string[] | undefined;
765
+ queryString?: {
766
+ value?: {
767
+ exact?: string | undefined;
768
+ startsWith?: string | undefined;
769
+ regex?: string | undefined;
770
+ } | undefined;
771
+ key?: {
772
+ exact?: string | undefined;
773
+ startsWith?: string | undefined;
774
+ regex?: string | undefined;
775
+ } | undefined;
776
+ }[] | undefined;
777
+ }>>;
778
+ }, "strip", zod0.ZodTypeAny, {
779
+ domain: string;
780
+ forwardURL: string;
781
+ match?: {
782
+ path?: {
783
+ exact?: string | undefined;
784
+ startsWith?: string | undefined;
785
+ regex?: string | undefined;
786
+ } | undefined;
787
+ headers?: {
788
+ value?: {
789
+ exact?: string | undefined;
790
+ startsWith?: string | undefined;
791
+ regex?: string | undefined;
792
+ } | undefined;
793
+ key?: {
794
+ exact?: string | undefined;
795
+ startsWith?: string | undefined;
796
+ regex?: string | undefined;
797
+ } | undefined;
798
+ }[] | undefined;
799
+ method?: string[] | undefined;
800
+ queryString?: {
801
+ value?: {
802
+ exact?: string | undefined;
803
+ startsWith?: string | undefined;
804
+ regex?: string | undefined;
805
+ } | undefined;
806
+ key?: {
807
+ exact?: string | undefined;
808
+ startsWith?: string | undefined;
809
+ regex?: string | undefined;
810
+ } | undefined;
811
+ }[] | undefined;
812
+ } | undefined;
813
+ }, {
814
+ domain: string;
815
+ forwardURL: string;
816
+ match?: {
817
+ path?: {
818
+ exact?: string | undefined;
819
+ startsWith?: string | undefined;
820
+ regex?: string | undefined;
821
+ } | undefined;
822
+ headers?: {
823
+ value?: {
824
+ exact?: string | undefined;
825
+ startsWith?: string | undefined;
826
+ regex?: string | undefined;
827
+ } | undefined;
828
+ key?: {
829
+ exact?: string | undefined;
830
+ startsWith?: string | undefined;
831
+ regex?: string | undefined;
832
+ } | undefined;
833
+ }[] | undefined;
834
+ method?: string[] | undefined;
835
+ queryString?: {
836
+ value?: {
837
+ exact?: string | undefined;
838
+ startsWith?: string | undefined;
839
+ regex?: string | undefined;
840
+ } | undefined;
841
+ key?: {
842
+ exact?: string | undefined;
843
+ startsWith?: string | undefined;
844
+ regex?: string | undefined;
845
+ } | undefined;
846
+ }[] | undefined;
847
+ } | undefined;
848
+ }>, "many">>;
317
849
  }, zod0.ZodTypeAny, "passthrough"> | undefined;
850
+ tags?: Record<string, string> | undefined;
318
851
  totalEgressBytes?: number | undefined;
319
852
  totalIngressBytes?: number | undefined;
320
853
  totalActiveCpuDurationMs?: number | undefined;
321
854
  totalDurationMs?: number | undefined;
322
855
  currentSnapshotId?: string | undefined;
323
- cwd?: string | undefined;
324
856
  statusUpdatedAt?: number | undefined;
325
857
  snapshotExpiration?: number | undefined;
326
858
  }[];
@@ -328,7 +860,7 @@ declare class Sandbox {
328
860
  count: number;
329
861
  next: string | null;
330
862
  };
331
- }>;
863
+ }, "sandboxes">>;
332
864
  /**
333
865
  * Serialize a Sandbox instance to plain data for @workflow/serde.
334
866
  *
@@ -370,6 +902,38 @@ declare class Sandbox {
370
902
  * @returns A promise resolving to the {@link Sandbox}.
371
903
  */
372
904
  static get(params: WithPrivate<GetSandboxParams | (GetSandboxParams & Credentials)> & WithFetchOptions): Promise<Sandbox>;
905
+ /**
906
+ * Retrieve an existing named sandbox, or create a new one if none exists.
907
+ *
908
+ * If `name` is omitted, this always creates a new sandbox and fires
909
+ * `onCreate`. If `name` is provided, it first tries {@link Sandbox.get};
910
+ * on `not_found` it creates a new sandbox with that name; on
911
+ * `snapshot_not_found` it deletes the stale named sandbox and creates
912
+ * a fresh one with the same name.
913
+ *
914
+ * @param params - Get/create parameters plus an optional `onCreate` hook.
915
+ * @returns A promise resolving to the {@link Sandbox}.
916
+ *
917
+ * @example
918
+ * <caption>Idempotent named sandbox with one-time setup</caption>
919
+ * const sandbox = await Sandbox.getOrCreate({
920
+ * name: "my-workspace",
921
+ * onCreate: async (sbx) => {
922
+ * await sbx.writeFiles([
923
+ * { path: "README.md", content: Buffer.from("# Hello") },
924
+ * ]);
925
+ * },
926
+ * });
927
+ *
928
+ * @example
929
+ * <caption>Unnamed — always creates</caption>
930
+ * const sandbox = await Sandbox.getOrCreate({
931
+ * onCreate: async (sbx) => {
932
+ * await sbx.runCommand("npm", ["install"]);
933
+ * },
934
+ * });
935
+ */
936
+ static getOrCreate(params?: WithPrivate<GetOrCreateSandboxParams | (GetOrCreateSandboxParams & Credentials)> & WithFetchOptions): Promise<Sandbox>;
373
937
  /**
374
938
  * Create a new Sandbox instance.
375
939
  *
@@ -543,13 +1107,13 @@ declare class Sandbox {
543
1107
  *
544
1108
  * @param opts - Optional parameters.
545
1109
  * @param opts.signal - An AbortSignal to cancel the operation.
546
- * @param opts.blocking - If true, poll until the sandbox has fully stopped and return the final state.
547
- * @returns The sandbox at the time the stop was acknowledged, or after fully stopped if `blocking` is true.
1110
+ * @returns The final session state after stopping, with optional snapshot metadata.
548
1111
  */
549
1112
  stop(opts?: {
550
1113
  signal?: AbortSignal;
551
- blocking?: boolean;
552
- }): Promise<SandboxSnapshot>;
1114
+ }): Promise<SandboxSnapshot & {
1115
+ snapshot?: SnapshotMetadata;
1116
+ }>;
553
1117
  /**
554
1118
  * Update the network policy for this sandbox.
555
1119
  *
@@ -635,6 +1199,7 @@ declare class Sandbox {
635
1199
  networkPolicy?: NetworkPolicy;
636
1200
  tags?: Record<string, string>;
637
1201
  snapshotExpiration?: number;
1202
+ currentSnapshotId?: string;
638
1203
  }, opts?: {
639
1204
  signal?: AbortSignal;
640
1205
  }): Promise<void>;
@@ -658,7 +1223,7 @@ declare class Sandbox {
658
1223
  cursor?: string;
659
1224
  sortOrder?: "asc" | "desc";
660
1225
  signal?: AbortSignal;
661
- }): Promise<{
1226
+ }): Promise<Paginator<{
662
1227
  pagination: {
663
1228
  count: number;
664
1229
  next: string | null;
@@ -683,7 +1248,7 @@ declare class Sandbox {
683
1248
  cwd: zod0.ZodString;
684
1249
  updatedAt: zod0.ZodNumber;
685
1250
  interactivePort: zod0.ZodOptional<zod0.ZodNumber>;
686
- networkPolicy: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodObject<{
1251
+ networkPolicy: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodUnion<[zod0.ZodObject<{
687
1252
  mode: zod0.ZodLiteral<"allow-all">;
688
1253
  }, "passthrough", zod0.ZodTypeAny, zod0.objectOutputType<{
689
1254
  mode: zod0.ZodLiteral<"allow-all">;
@@ -695,7 +1260,7 @@ declare class Sandbox {
695
1260
  mode: zod0.ZodLiteral<"deny-all">;
696
1261
  }, zod0.ZodTypeAny, "passthrough">, zod0.objectInputType<{
697
1262
  mode: zod0.ZodLiteral<"deny-all">;
698
- }, zod0.ZodTypeAny, "passthrough">>, zod0.ZodObject<{
1263
+ }, zod0.ZodTypeAny, "passthrough">>]>, zod0.ZodObject<{
699
1264
  mode: zod0.ZodLiteral<"custom">;
700
1265
  allowedDomains: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
701
1266
  allowedCIDRs: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
@@ -704,15 +1269,509 @@ declare class Sandbox {
704
1269
  domain: zod0.ZodString;
705
1270
  headers: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodString>>;
706
1271
  headerNames: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1272
+ match: zod0.ZodOptional<zod0.ZodObject<{
1273
+ path: zod0.ZodOptional<zod0.ZodObject<{
1274
+ exact: zod0.ZodOptional<zod0.ZodString>;
1275
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1276
+ regex: zod0.ZodOptional<zod0.ZodString>;
1277
+ }, "strip", zod0.ZodTypeAny, {
1278
+ exact?: string | undefined;
1279
+ startsWith?: string | undefined;
1280
+ regex?: string | undefined;
1281
+ }, {
1282
+ exact?: string | undefined;
1283
+ startsWith?: string | undefined;
1284
+ regex?: string | undefined;
1285
+ }>>;
1286
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1287
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1288
+ key: zod0.ZodOptional<zod0.ZodObject<{
1289
+ exact: zod0.ZodOptional<zod0.ZodString>;
1290
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1291
+ regex: zod0.ZodOptional<zod0.ZodString>;
1292
+ }, "strip", zod0.ZodTypeAny, {
1293
+ exact?: string | undefined;
1294
+ startsWith?: string | undefined;
1295
+ regex?: string | undefined;
1296
+ }, {
1297
+ exact?: string | undefined;
1298
+ startsWith?: string | undefined;
1299
+ regex?: string | undefined;
1300
+ }>>;
1301
+ value: zod0.ZodOptional<zod0.ZodObject<{
1302
+ exact: zod0.ZodOptional<zod0.ZodString>;
1303
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1304
+ regex: zod0.ZodOptional<zod0.ZodString>;
1305
+ }, "strip", zod0.ZodTypeAny, {
1306
+ exact?: string | undefined;
1307
+ startsWith?: string | undefined;
1308
+ regex?: string | undefined;
1309
+ }, {
1310
+ exact?: string | undefined;
1311
+ startsWith?: string | undefined;
1312
+ regex?: string | undefined;
1313
+ }>>;
1314
+ }, "strip", zod0.ZodTypeAny, {
1315
+ value?: {
1316
+ exact?: string | undefined;
1317
+ startsWith?: string | undefined;
1318
+ regex?: string | undefined;
1319
+ } | undefined;
1320
+ key?: {
1321
+ exact?: string | undefined;
1322
+ startsWith?: string | undefined;
1323
+ regex?: string | undefined;
1324
+ } | undefined;
1325
+ }, {
1326
+ value?: {
1327
+ exact?: string | undefined;
1328
+ startsWith?: string | undefined;
1329
+ regex?: string | undefined;
1330
+ } | undefined;
1331
+ key?: {
1332
+ exact?: string | undefined;
1333
+ startsWith?: string | undefined;
1334
+ regex?: string | undefined;
1335
+ } | undefined;
1336
+ }>, "many">>;
1337
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1338
+ key: zod0.ZodOptional<zod0.ZodObject<{
1339
+ exact: zod0.ZodOptional<zod0.ZodString>;
1340
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1341
+ regex: zod0.ZodOptional<zod0.ZodString>;
1342
+ }, "strip", zod0.ZodTypeAny, {
1343
+ exact?: string | undefined;
1344
+ startsWith?: string | undefined;
1345
+ regex?: string | undefined;
1346
+ }, {
1347
+ exact?: string | undefined;
1348
+ startsWith?: string | undefined;
1349
+ regex?: string | undefined;
1350
+ }>>;
1351
+ value: zod0.ZodOptional<zod0.ZodObject<{
1352
+ exact: zod0.ZodOptional<zod0.ZodString>;
1353
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1354
+ regex: zod0.ZodOptional<zod0.ZodString>;
1355
+ }, "strip", zod0.ZodTypeAny, {
1356
+ exact?: string | undefined;
1357
+ startsWith?: string | undefined;
1358
+ regex?: string | undefined;
1359
+ }, {
1360
+ exact?: string | undefined;
1361
+ startsWith?: string | undefined;
1362
+ regex?: string | undefined;
1363
+ }>>;
1364
+ }, "strip", zod0.ZodTypeAny, {
1365
+ value?: {
1366
+ exact?: string | undefined;
1367
+ startsWith?: string | undefined;
1368
+ regex?: string | undefined;
1369
+ } | undefined;
1370
+ key?: {
1371
+ exact?: string | undefined;
1372
+ startsWith?: string | undefined;
1373
+ regex?: string | undefined;
1374
+ } | undefined;
1375
+ }, {
1376
+ value?: {
1377
+ exact?: string | undefined;
1378
+ startsWith?: string | undefined;
1379
+ regex?: string | undefined;
1380
+ } | undefined;
1381
+ key?: {
1382
+ exact?: string | undefined;
1383
+ startsWith?: string | undefined;
1384
+ regex?: string | undefined;
1385
+ } | undefined;
1386
+ }>, "many">>;
1387
+ }, "strip", zod0.ZodTypeAny, {
1388
+ path?: {
1389
+ exact?: string | undefined;
1390
+ startsWith?: string | undefined;
1391
+ regex?: string | undefined;
1392
+ } | undefined;
1393
+ headers?: {
1394
+ value?: {
1395
+ exact?: string | undefined;
1396
+ startsWith?: string | undefined;
1397
+ regex?: string | undefined;
1398
+ } | undefined;
1399
+ key?: {
1400
+ exact?: string | undefined;
1401
+ startsWith?: string | undefined;
1402
+ regex?: string | undefined;
1403
+ } | undefined;
1404
+ }[] | undefined;
1405
+ method?: string[] | undefined;
1406
+ queryString?: {
1407
+ value?: {
1408
+ exact?: string | undefined;
1409
+ startsWith?: string | undefined;
1410
+ regex?: string | undefined;
1411
+ } | undefined;
1412
+ key?: {
1413
+ exact?: string | undefined;
1414
+ startsWith?: string | undefined;
1415
+ regex?: string | undefined;
1416
+ } | undefined;
1417
+ }[] | undefined;
1418
+ }, {
1419
+ path?: {
1420
+ exact?: string | undefined;
1421
+ startsWith?: string | undefined;
1422
+ regex?: string | undefined;
1423
+ } | undefined;
1424
+ headers?: {
1425
+ value?: {
1426
+ exact?: string | undefined;
1427
+ startsWith?: string | undefined;
1428
+ regex?: string | undefined;
1429
+ } | undefined;
1430
+ key?: {
1431
+ exact?: string | undefined;
1432
+ startsWith?: string | undefined;
1433
+ regex?: string | undefined;
1434
+ } | undefined;
1435
+ }[] | undefined;
1436
+ method?: string[] | undefined;
1437
+ queryString?: {
1438
+ value?: {
1439
+ exact?: string | undefined;
1440
+ startsWith?: string | undefined;
1441
+ regex?: string | undefined;
1442
+ } | undefined;
1443
+ key?: {
1444
+ exact?: string | undefined;
1445
+ startsWith?: string | undefined;
1446
+ regex?: string | undefined;
1447
+ } | undefined;
1448
+ }[] | undefined;
1449
+ }>>;
707
1450
  }, "strip", zod0.ZodTypeAny, {
708
1451
  domain: string;
1452
+ match?: {
1453
+ path?: {
1454
+ exact?: string | undefined;
1455
+ startsWith?: string | undefined;
1456
+ regex?: string | undefined;
1457
+ } | undefined;
1458
+ headers?: {
1459
+ value?: {
1460
+ exact?: string | undefined;
1461
+ startsWith?: string | undefined;
1462
+ regex?: string | undefined;
1463
+ } | undefined;
1464
+ key?: {
1465
+ exact?: string | undefined;
1466
+ startsWith?: string | undefined;
1467
+ regex?: string | undefined;
1468
+ } | undefined;
1469
+ }[] | undefined;
1470
+ method?: string[] | undefined;
1471
+ queryString?: {
1472
+ value?: {
1473
+ exact?: string | undefined;
1474
+ startsWith?: string | undefined;
1475
+ regex?: string | undefined;
1476
+ } | undefined;
1477
+ key?: {
1478
+ exact?: string | undefined;
1479
+ startsWith?: string | undefined;
1480
+ regex?: string | undefined;
1481
+ } | undefined;
1482
+ }[] | undefined;
1483
+ } | undefined;
709
1484
  headers?: Record<string, string> | undefined;
710
1485
  headerNames?: string[] | undefined;
711
1486
  }, {
712
1487
  domain: string;
1488
+ match?: {
1489
+ path?: {
1490
+ exact?: string | undefined;
1491
+ startsWith?: string | undefined;
1492
+ regex?: string | undefined;
1493
+ } | undefined;
1494
+ headers?: {
1495
+ value?: {
1496
+ exact?: string | undefined;
1497
+ startsWith?: string | undefined;
1498
+ regex?: string | undefined;
1499
+ } | undefined;
1500
+ key?: {
1501
+ exact?: string | undefined;
1502
+ startsWith?: string | undefined;
1503
+ regex?: string | undefined;
1504
+ } | undefined;
1505
+ }[] | undefined;
1506
+ method?: string[] | undefined;
1507
+ queryString?: {
1508
+ value?: {
1509
+ exact?: string | undefined;
1510
+ startsWith?: string | undefined;
1511
+ regex?: string | undefined;
1512
+ } | undefined;
1513
+ key?: {
1514
+ exact?: string | undefined;
1515
+ startsWith?: string | undefined;
1516
+ regex?: string | undefined;
1517
+ } | undefined;
1518
+ }[] | undefined;
1519
+ } | undefined;
713
1520
  headers?: Record<string, string> | undefined;
714
1521
  headerNames?: string[] | undefined;
715
1522
  }>, "many">>;
1523
+ forwardRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1524
+ domain: zod0.ZodString;
1525
+ forwardURL: zod0.ZodString;
1526
+ match: zod0.ZodOptional<zod0.ZodObject<{
1527
+ path: zod0.ZodOptional<zod0.ZodObject<{
1528
+ exact: zod0.ZodOptional<zod0.ZodString>;
1529
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1530
+ regex: zod0.ZodOptional<zod0.ZodString>;
1531
+ }, "strip", zod0.ZodTypeAny, {
1532
+ exact?: string | undefined;
1533
+ startsWith?: string | undefined;
1534
+ regex?: string | undefined;
1535
+ }, {
1536
+ exact?: string | undefined;
1537
+ startsWith?: string | undefined;
1538
+ regex?: string | undefined;
1539
+ }>>;
1540
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1541
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1542
+ key: zod0.ZodOptional<zod0.ZodObject<{
1543
+ exact: zod0.ZodOptional<zod0.ZodString>;
1544
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1545
+ regex: zod0.ZodOptional<zod0.ZodString>;
1546
+ }, "strip", zod0.ZodTypeAny, {
1547
+ exact?: string | undefined;
1548
+ startsWith?: string | undefined;
1549
+ regex?: string | undefined;
1550
+ }, {
1551
+ exact?: string | undefined;
1552
+ startsWith?: string | undefined;
1553
+ regex?: string | undefined;
1554
+ }>>;
1555
+ value: zod0.ZodOptional<zod0.ZodObject<{
1556
+ exact: zod0.ZodOptional<zod0.ZodString>;
1557
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1558
+ regex: zod0.ZodOptional<zod0.ZodString>;
1559
+ }, "strip", zod0.ZodTypeAny, {
1560
+ exact?: string | undefined;
1561
+ startsWith?: string | undefined;
1562
+ regex?: string | undefined;
1563
+ }, {
1564
+ exact?: string | undefined;
1565
+ startsWith?: string | undefined;
1566
+ regex?: string | undefined;
1567
+ }>>;
1568
+ }, "strip", zod0.ZodTypeAny, {
1569
+ value?: {
1570
+ exact?: string | undefined;
1571
+ startsWith?: string | undefined;
1572
+ regex?: string | undefined;
1573
+ } | undefined;
1574
+ key?: {
1575
+ exact?: string | undefined;
1576
+ startsWith?: string | undefined;
1577
+ regex?: string | undefined;
1578
+ } | undefined;
1579
+ }, {
1580
+ value?: {
1581
+ exact?: string | undefined;
1582
+ startsWith?: string | undefined;
1583
+ regex?: string | undefined;
1584
+ } | undefined;
1585
+ key?: {
1586
+ exact?: string | undefined;
1587
+ startsWith?: string | undefined;
1588
+ regex?: string | undefined;
1589
+ } | undefined;
1590
+ }>, "many">>;
1591
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1592
+ key: zod0.ZodOptional<zod0.ZodObject<{
1593
+ exact: zod0.ZodOptional<zod0.ZodString>;
1594
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1595
+ regex: zod0.ZodOptional<zod0.ZodString>;
1596
+ }, "strip", zod0.ZodTypeAny, {
1597
+ exact?: string | undefined;
1598
+ startsWith?: string | undefined;
1599
+ regex?: string | undefined;
1600
+ }, {
1601
+ exact?: string | undefined;
1602
+ startsWith?: string | undefined;
1603
+ regex?: string | undefined;
1604
+ }>>;
1605
+ value: zod0.ZodOptional<zod0.ZodObject<{
1606
+ exact: zod0.ZodOptional<zod0.ZodString>;
1607
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1608
+ regex: zod0.ZodOptional<zod0.ZodString>;
1609
+ }, "strip", zod0.ZodTypeAny, {
1610
+ exact?: string | undefined;
1611
+ startsWith?: string | undefined;
1612
+ regex?: string | undefined;
1613
+ }, {
1614
+ exact?: string | undefined;
1615
+ startsWith?: string | undefined;
1616
+ regex?: string | undefined;
1617
+ }>>;
1618
+ }, "strip", zod0.ZodTypeAny, {
1619
+ value?: {
1620
+ exact?: string | undefined;
1621
+ startsWith?: string | undefined;
1622
+ regex?: string | undefined;
1623
+ } | undefined;
1624
+ key?: {
1625
+ exact?: string | undefined;
1626
+ startsWith?: string | undefined;
1627
+ regex?: string | undefined;
1628
+ } | undefined;
1629
+ }, {
1630
+ value?: {
1631
+ exact?: string | undefined;
1632
+ startsWith?: string | undefined;
1633
+ regex?: string | undefined;
1634
+ } | undefined;
1635
+ key?: {
1636
+ exact?: string | undefined;
1637
+ startsWith?: string | undefined;
1638
+ regex?: string | undefined;
1639
+ } | undefined;
1640
+ }>, "many">>;
1641
+ }, "strip", zod0.ZodTypeAny, {
1642
+ path?: {
1643
+ exact?: string | undefined;
1644
+ startsWith?: string | undefined;
1645
+ regex?: string | undefined;
1646
+ } | undefined;
1647
+ headers?: {
1648
+ value?: {
1649
+ exact?: string | undefined;
1650
+ startsWith?: string | undefined;
1651
+ regex?: string | undefined;
1652
+ } | undefined;
1653
+ key?: {
1654
+ exact?: string | undefined;
1655
+ startsWith?: string | undefined;
1656
+ regex?: string | undefined;
1657
+ } | undefined;
1658
+ }[] | undefined;
1659
+ method?: string[] | undefined;
1660
+ queryString?: {
1661
+ value?: {
1662
+ exact?: string | undefined;
1663
+ startsWith?: string | undefined;
1664
+ regex?: string | undefined;
1665
+ } | undefined;
1666
+ key?: {
1667
+ exact?: string | undefined;
1668
+ startsWith?: string | undefined;
1669
+ regex?: string | undefined;
1670
+ } | undefined;
1671
+ }[] | undefined;
1672
+ }, {
1673
+ path?: {
1674
+ exact?: string | undefined;
1675
+ startsWith?: string | undefined;
1676
+ regex?: string | undefined;
1677
+ } | undefined;
1678
+ headers?: {
1679
+ value?: {
1680
+ exact?: string | undefined;
1681
+ startsWith?: string | undefined;
1682
+ regex?: string | undefined;
1683
+ } | undefined;
1684
+ key?: {
1685
+ exact?: string | undefined;
1686
+ startsWith?: string | undefined;
1687
+ regex?: string | undefined;
1688
+ } | undefined;
1689
+ }[] | undefined;
1690
+ method?: string[] | undefined;
1691
+ queryString?: {
1692
+ value?: {
1693
+ exact?: string | undefined;
1694
+ startsWith?: string | undefined;
1695
+ regex?: string | undefined;
1696
+ } | undefined;
1697
+ key?: {
1698
+ exact?: string | undefined;
1699
+ startsWith?: string | undefined;
1700
+ regex?: string | undefined;
1701
+ } | undefined;
1702
+ }[] | undefined;
1703
+ }>>;
1704
+ }, "strip", zod0.ZodTypeAny, {
1705
+ domain: string;
1706
+ forwardURL: string;
1707
+ match?: {
1708
+ path?: {
1709
+ exact?: string | undefined;
1710
+ startsWith?: string | undefined;
1711
+ regex?: string | undefined;
1712
+ } | undefined;
1713
+ headers?: {
1714
+ value?: {
1715
+ exact?: string | undefined;
1716
+ startsWith?: string | undefined;
1717
+ regex?: string | undefined;
1718
+ } | undefined;
1719
+ key?: {
1720
+ exact?: string | undefined;
1721
+ startsWith?: string | undefined;
1722
+ regex?: string | undefined;
1723
+ } | undefined;
1724
+ }[] | undefined;
1725
+ method?: string[] | undefined;
1726
+ queryString?: {
1727
+ value?: {
1728
+ exact?: string | undefined;
1729
+ startsWith?: string | undefined;
1730
+ regex?: string | undefined;
1731
+ } | undefined;
1732
+ key?: {
1733
+ exact?: string | undefined;
1734
+ startsWith?: string | undefined;
1735
+ regex?: string | undefined;
1736
+ } | undefined;
1737
+ }[] | undefined;
1738
+ } | undefined;
1739
+ }, {
1740
+ domain: string;
1741
+ forwardURL: string;
1742
+ match?: {
1743
+ path?: {
1744
+ exact?: string | undefined;
1745
+ startsWith?: string | undefined;
1746
+ regex?: string | undefined;
1747
+ } | undefined;
1748
+ headers?: {
1749
+ value?: {
1750
+ exact?: string | undefined;
1751
+ startsWith?: string | undefined;
1752
+ regex?: string | undefined;
1753
+ } | undefined;
1754
+ key?: {
1755
+ exact?: string | undefined;
1756
+ startsWith?: string | undefined;
1757
+ regex?: string | undefined;
1758
+ } | undefined;
1759
+ }[] | undefined;
1760
+ method?: string[] | undefined;
1761
+ queryString?: {
1762
+ value?: {
1763
+ exact?: string | undefined;
1764
+ startsWith?: string | undefined;
1765
+ regex?: string | undefined;
1766
+ } | undefined;
1767
+ key?: {
1768
+ exact?: string | undefined;
1769
+ startsWith?: string | undefined;
1770
+ regex?: string | undefined;
1771
+ } | undefined;
1772
+ }[] | undefined;
1773
+ } | undefined;
1774
+ }>, "many">>;
716
1775
  }, "passthrough", zod0.ZodTypeAny, zod0.objectOutputType<{
717
1776
  mode: zod0.ZodLiteral<"custom">;
718
1777
  allowedDomains: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
@@ -722,15 +1781,509 @@ declare class Sandbox {
722
1781
  domain: zod0.ZodString;
723
1782
  headers: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodString>>;
724
1783
  headerNames: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1784
+ match: zod0.ZodOptional<zod0.ZodObject<{
1785
+ path: zod0.ZodOptional<zod0.ZodObject<{
1786
+ exact: zod0.ZodOptional<zod0.ZodString>;
1787
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1788
+ regex: zod0.ZodOptional<zod0.ZodString>;
1789
+ }, "strip", zod0.ZodTypeAny, {
1790
+ exact?: string | undefined;
1791
+ startsWith?: string | undefined;
1792
+ regex?: string | undefined;
1793
+ }, {
1794
+ exact?: string | undefined;
1795
+ startsWith?: string | undefined;
1796
+ regex?: string | undefined;
1797
+ }>>;
1798
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1799
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1800
+ key: zod0.ZodOptional<zod0.ZodObject<{
1801
+ exact: zod0.ZodOptional<zod0.ZodString>;
1802
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1803
+ regex: zod0.ZodOptional<zod0.ZodString>;
1804
+ }, "strip", zod0.ZodTypeAny, {
1805
+ exact?: string | undefined;
1806
+ startsWith?: string | undefined;
1807
+ regex?: string | undefined;
1808
+ }, {
1809
+ exact?: string | undefined;
1810
+ startsWith?: string | undefined;
1811
+ regex?: string | undefined;
1812
+ }>>;
1813
+ value: zod0.ZodOptional<zod0.ZodObject<{
1814
+ exact: zod0.ZodOptional<zod0.ZodString>;
1815
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1816
+ regex: zod0.ZodOptional<zod0.ZodString>;
1817
+ }, "strip", zod0.ZodTypeAny, {
1818
+ exact?: string | undefined;
1819
+ startsWith?: string | undefined;
1820
+ regex?: string | undefined;
1821
+ }, {
1822
+ exact?: string | undefined;
1823
+ startsWith?: string | undefined;
1824
+ regex?: string | undefined;
1825
+ }>>;
1826
+ }, "strip", zod0.ZodTypeAny, {
1827
+ value?: {
1828
+ exact?: string | undefined;
1829
+ startsWith?: string | undefined;
1830
+ regex?: string | undefined;
1831
+ } | undefined;
1832
+ key?: {
1833
+ exact?: string | undefined;
1834
+ startsWith?: string | undefined;
1835
+ regex?: string | undefined;
1836
+ } | undefined;
1837
+ }, {
1838
+ value?: {
1839
+ exact?: string | undefined;
1840
+ startsWith?: string | undefined;
1841
+ regex?: string | undefined;
1842
+ } | undefined;
1843
+ key?: {
1844
+ exact?: string | undefined;
1845
+ startsWith?: string | undefined;
1846
+ regex?: string | undefined;
1847
+ } | undefined;
1848
+ }>, "many">>;
1849
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1850
+ key: zod0.ZodOptional<zod0.ZodObject<{
1851
+ exact: zod0.ZodOptional<zod0.ZodString>;
1852
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1853
+ regex: zod0.ZodOptional<zod0.ZodString>;
1854
+ }, "strip", zod0.ZodTypeAny, {
1855
+ exact?: string | undefined;
1856
+ startsWith?: string | undefined;
1857
+ regex?: string | undefined;
1858
+ }, {
1859
+ exact?: string | undefined;
1860
+ startsWith?: string | undefined;
1861
+ regex?: string | undefined;
1862
+ }>>;
1863
+ value: zod0.ZodOptional<zod0.ZodObject<{
1864
+ exact: zod0.ZodOptional<zod0.ZodString>;
1865
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1866
+ regex: zod0.ZodOptional<zod0.ZodString>;
1867
+ }, "strip", zod0.ZodTypeAny, {
1868
+ exact?: string | undefined;
1869
+ startsWith?: string | undefined;
1870
+ regex?: string | undefined;
1871
+ }, {
1872
+ exact?: string | undefined;
1873
+ startsWith?: string | undefined;
1874
+ regex?: string | undefined;
1875
+ }>>;
1876
+ }, "strip", zod0.ZodTypeAny, {
1877
+ value?: {
1878
+ exact?: string | undefined;
1879
+ startsWith?: string | undefined;
1880
+ regex?: string | undefined;
1881
+ } | undefined;
1882
+ key?: {
1883
+ exact?: string | undefined;
1884
+ startsWith?: string | undefined;
1885
+ regex?: string | undefined;
1886
+ } | undefined;
1887
+ }, {
1888
+ value?: {
1889
+ exact?: string | undefined;
1890
+ startsWith?: string | undefined;
1891
+ regex?: string | undefined;
1892
+ } | undefined;
1893
+ key?: {
1894
+ exact?: string | undefined;
1895
+ startsWith?: string | undefined;
1896
+ regex?: string | undefined;
1897
+ } | undefined;
1898
+ }>, "many">>;
1899
+ }, "strip", zod0.ZodTypeAny, {
1900
+ path?: {
1901
+ exact?: string | undefined;
1902
+ startsWith?: string | undefined;
1903
+ regex?: string | undefined;
1904
+ } | undefined;
1905
+ headers?: {
1906
+ value?: {
1907
+ exact?: string | undefined;
1908
+ startsWith?: string | undefined;
1909
+ regex?: string | undefined;
1910
+ } | undefined;
1911
+ key?: {
1912
+ exact?: string | undefined;
1913
+ startsWith?: string | undefined;
1914
+ regex?: string | undefined;
1915
+ } | undefined;
1916
+ }[] | undefined;
1917
+ method?: string[] | undefined;
1918
+ queryString?: {
1919
+ value?: {
1920
+ exact?: string | undefined;
1921
+ startsWith?: string | undefined;
1922
+ regex?: string | undefined;
1923
+ } | undefined;
1924
+ key?: {
1925
+ exact?: string | undefined;
1926
+ startsWith?: string | undefined;
1927
+ regex?: string | undefined;
1928
+ } | undefined;
1929
+ }[] | undefined;
1930
+ }, {
1931
+ path?: {
1932
+ exact?: string | undefined;
1933
+ startsWith?: string | undefined;
1934
+ regex?: string | undefined;
1935
+ } | undefined;
1936
+ headers?: {
1937
+ value?: {
1938
+ exact?: string | undefined;
1939
+ startsWith?: string | undefined;
1940
+ regex?: string | undefined;
1941
+ } | undefined;
1942
+ key?: {
1943
+ exact?: string | undefined;
1944
+ startsWith?: string | undefined;
1945
+ regex?: string | undefined;
1946
+ } | undefined;
1947
+ }[] | undefined;
1948
+ method?: string[] | undefined;
1949
+ queryString?: {
1950
+ value?: {
1951
+ exact?: string | undefined;
1952
+ startsWith?: string | undefined;
1953
+ regex?: string | undefined;
1954
+ } | undefined;
1955
+ key?: {
1956
+ exact?: string | undefined;
1957
+ startsWith?: string | undefined;
1958
+ regex?: string | undefined;
1959
+ } | undefined;
1960
+ }[] | undefined;
1961
+ }>>;
725
1962
  }, "strip", zod0.ZodTypeAny, {
726
1963
  domain: string;
1964
+ match?: {
1965
+ path?: {
1966
+ exact?: string | undefined;
1967
+ startsWith?: string | undefined;
1968
+ regex?: string | undefined;
1969
+ } | undefined;
1970
+ headers?: {
1971
+ value?: {
1972
+ exact?: string | undefined;
1973
+ startsWith?: string | undefined;
1974
+ regex?: string | undefined;
1975
+ } | undefined;
1976
+ key?: {
1977
+ exact?: string | undefined;
1978
+ startsWith?: string | undefined;
1979
+ regex?: string | undefined;
1980
+ } | undefined;
1981
+ }[] | undefined;
1982
+ method?: string[] | undefined;
1983
+ queryString?: {
1984
+ value?: {
1985
+ exact?: string | undefined;
1986
+ startsWith?: string | undefined;
1987
+ regex?: string | undefined;
1988
+ } | undefined;
1989
+ key?: {
1990
+ exact?: string | undefined;
1991
+ startsWith?: string | undefined;
1992
+ regex?: string | undefined;
1993
+ } | undefined;
1994
+ }[] | undefined;
1995
+ } | undefined;
727
1996
  headers?: Record<string, string> | undefined;
728
1997
  headerNames?: string[] | undefined;
729
1998
  }, {
730
1999
  domain: string;
2000
+ match?: {
2001
+ path?: {
2002
+ exact?: string | undefined;
2003
+ startsWith?: string | undefined;
2004
+ regex?: string | undefined;
2005
+ } | undefined;
2006
+ headers?: {
2007
+ value?: {
2008
+ exact?: string | undefined;
2009
+ startsWith?: string | undefined;
2010
+ regex?: string | undefined;
2011
+ } | undefined;
2012
+ key?: {
2013
+ exact?: string | undefined;
2014
+ startsWith?: string | undefined;
2015
+ regex?: string | undefined;
2016
+ } | undefined;
2017
+ }[] | undefined;
2018
+ method?: string[] | undefined;
2019
+ queryString?: {
2020
+ value?: {
2021
+ exact?: string | undefined;
2022
+ startsWith?: string | undefined;
2023
+ regex?: string | undefined;
2024
+ } | undefined;
2025
+ key?: {
2026
+ exact?: string | undefined;
2027
+ startsWith?: string | undefined;
2028
+ regex?: string | undefined;
2029
+ } | undefined;
2030
+ }[] | undefined;
2031
+ } | undefined;
731
2032
  headers?: Record<string, string> | undefined;
732
2033
  headerNames?: string[] | undefined;
733
2034
  }>, "many">>;
2035
+ forwardRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2036
+ domain: zod0.ZodString;
2037
+ forwardURL: zod0.ZodString;
2038
+ match: zod0.ZodOptional<zod0.ZodObject<{
2039
+ path: zod0.ZodOptional<zod0.ZodObject<{
2040
+ exact: zod0.ZodOptional<zod0.ZodString>;
2041
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2042
+ regex: zod0.ZodOptional<zod0.ZodString>;
2043
+ }, "strip", zod0.ZodTypeAny, {
2044
+ exact?: string | undefined;
2045
+ startsWith?: string | undefined;
2046
+ regex?: string | undefined;
2047
+ }, {
2048
+ exact?: string | undefined;
2049
+ startsWith?: string | undefined;
2050
+ regex?: string | undefined;
2051
+ }>>;
2052
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2053
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2054
+ key: zod0.ZodOptional<zod0.ZodObject<{
2055
+ exact: zod0.ZodOptional<zod0.ZodString>;
2056
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2057
+ regex: zod0.ZodOptional<zod0.ZodString>;
2058
+ }, "strip", zod0.ZodTypeAny, {
2059
+ exact?: string | undefined;
2060
+ startsWith?: string | undefined;
2061
+ regex?: string | undefined;
2062
+ }, {
2063
+ exact?: string | undefined;
2064
+ startsWith?: string | undefined;
2065
+ regex?: string | undefined;
2066
+ }>>;
2067
+ value: zod0.ZodOptional<zod0.ZodObject<{
2068
+ exact: zod0.ZodOptional<zod0.ZodString>;
2069
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2070
+ regex: zod0.ZodOptional<zod0.ZodString>;
2071
+ }, "strip", zod0.ZodTypeAny, {
2072
+ exact?: string | undefined;
2073
+ startsWith?: string | undefined;
2074
+ regex?: string | undefined;
2075
+ }, {
2076
+ exact?: string | undefined;
2077
+ startsWith?: string | undefined;
2078
+ regex?: string | undefined;
2079
+ }>>;
2080
+ }, "strip", zod0.ZodTypeAny, {
2081
+ value?: {
2082
+ exact?: string | undefined;
2083
+ startsWith?: string | undefined;
2084
+ regex?: string | undefined;
2085
+ } | undefined;
2086
+ key?: {
2087
+ exact?: string | undefined;
2088
+ startsWith?: string | undefined;
2089
+ regex?: string | undefined;
2090
+ } | undefined;
2091
+ }, {
2092
+ value?: {
2093
+ exact?: string | undefined;
2094
+ startsWith?: string | undefined;
2095
+ regex?: string | undefined;
2096
+ } | undefined;
2097
+ key?: {
2098
+ exact?: string | undefined;
2099
+ startsWith?: string | undefined;
2100
+ regex?: string | undefined;
2101
+ } | undefined;
2102
+ }>, "many">>;
2103
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2104
+ key: zod0.ZodOptional<zod0.ZodObject<{
2105
+ exact: zod0.ZodOptional<zod0.ZodString>;
2106
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2107
+ regex: zod0.ZodOptional<zod0.ZodString>;
2108
+ }, "strip", zod0.ZodTypeAny, {
2109
+ exact?: string | undefined;
2110
+ startsWith?: string | undefined;
2111
+ regex?: string | undefined;
2112
+ }, {
2113
+ exact?: string | undefined;
2114
+ startsWith?: string | undefined;
2115
+ regex?: string | undefined;
2116
+ }>>;
2117
+ value: zod0.ZodOptional<zod0.ZodObject<{
2118
+ exact: zod0.ZodOptional<zod0.ZodString>;
2119
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2120
+ regex: zod0.ZodOptional<zod0.ZodString>;
2121
+ }, "strip", zod0.ZodTypeAny, {
2122
+ exact?: string | undefined;
2123
+ startsWith?: string | undefined;
2124
+ regex?: string | undefined;
2125
+ }, {
2126
+ exact?: string | undefined;
2127
+ startsWith?: string | undefined;
2128
+ regex?: string | undefined;
2129
+ }>>;
2130
+ }, "strip", zod0.ZodTypeAny, {
2131
+ value?: {
2132
+ exact?: string | undefined;
2133
+ startsWith?: string | undefined;
2134
+ regex?: string | undefined;
2135
+ } | undefined;
2136
+ key?: {
2137
+ exact?: string | undefined;
2138
+ startsWith?: string | undefined;
2139
+ regex?: string | undefined;
2140
+ } | undefined;
2141
+ }, {
2142
+ value?: {
2143
+ exact?: string | undefined;
2144
+ startsWith?: string | undefined;
2145
+ regex?: string | undefined;
2146
+ } | undefined;
2147
+ key?: {
2148
+ exact?: string | undefined;
2149
+ startsWith?: string | undefined;
2150
+ regex?: string | undefined;
2151
+ } | undefined;
2152
+ }>, "many">>;
2153
+ }, "strip", zod0.ZodTypeAny, {
2154
+ path?: {
2155
+ exact?: string | undefined;
2156
+ startsWith?: string | undefined;
2157
+ regex?: string | undefined;
2158
+ } | undefined;
2159
+ headers?: {
2160
+ value?: {
2161
+ exact?: string | undefined;
2162
+ startsWith?: string | undefined;
2163
+ regex?: string | undefined;
2164
+ } | undefined;
2165
+ key?: {
2166
+ exact?: string | undefined;
2167
+ startsWith?: string | undefined;
2168
+ regex?: string | undefined;
2169
+ } | undefined;
2170
+ }[] | undefined;
2171
+ method?: string[] | undefined;
2172
+ queryString?: {
2173
+ value?: {
2174
+ exact?: string | undefined;
2175
+ startsWith?: string | undefined;
2176
+ regex?: string | undefined;
2177
+ } | undefined;
2178
+ key?: {
2179
+ exact?: string | undefined;
2180
+ startsWith?: string | undefined;
2181
+ regex?: string | undefined;
2182
+ } | undefined;
2183
+ }[] | undefined;
2184
+ }, {
2185
+ path?: {
2186
+ exact?: string | undefined;
2187
+ startsWith?: string | undefined;
2188
+ regex?: string | undefined;
2189
+ } | undefined;
2190
+ headers?: {
2191
+ value?: {
2192
+ exact?: string | undefined;
2193
+ startsWith?: string | undefined;
2194
+ regex?: string | undefined;
2195
+ } | undefined;
2196
+ key?: {
2197
+ exact?: string | undefined;
2198
+ startsWith?: string | undefined;
2199
+ regex?: string | undefined;
2200
+ } | undefined;
2201
+ }[] | undefined;
2202
+ method?: string[] | undefined;
2203
+ queryString?: {
2204
+ value?: {
2205
+ exact?: string | undefined;
2206
+ startsWith?: string | undefined;
2207
+ regex?: string | undefined;
2208
+ } | undefined;
2209
+ key?: {
2210
+ exact?: string | undefined;
2211
+ startsWith?: string | undefined;
2212
+ regex?: string | undefined;
2213
+ } | undefined;
2214
+ }[] | undefined;
2215
+ }>>;
2216
+ }, "strip", zod0.ZodTypeAny, {
2217
+ domain: string;
2218
+ forwardURL: string;
2219
+ match?: {
2220
+ path?: {
2221
+ exact?: string | undefined;
2222
+ startsWith?: string | undefined;
2223
+ regex?: string | undefined;
2224
+ } | undefined;
2225
+ headers?: {
2226
+ value?: {
2227
+ exact?: string | undefined;
2228
+ startsWith?: string | undefined;
2229
+ regex?: string | undefined;
2230
+ } | undefined;
2231
+ key?: {
2232
+ exact?: string | undefined;
2233
+ startsWith?: string | undefined;
2234
+ regex?: string | undefined;
2235
+ } | undefined;
2236
+ }[] | undefined;
2237
+ method?: string[] | undefined;
2238
+ queryString?: {
2239
+ value?: {
2240
+ exact?: string | undefined;
2241
+ startsWith?: string | undefined;
2242
+ regex?: string | undefined;
2243
+ } | undefined;
2244
+ key?: {
2245
+ exact?: string | undefined;
2246
+ startsWith?: string | undefined;
2247
+ regex?: string | undefined;
2248
+ } | undefined;
2249
+ }[] | undefined;
2250
+ } | undefined;
2251
+ }, {
2252
+ domain: string;
2253
+ forwardURL: string;
2254
+ match?: {
2255
+ path?: {
2256
+ exact?: string | undefined;
2257
+ startsWith?: string | undefined;
2258
+ regex?: string | undefined;
2259
+ } | undefined;
2260
+ headers?: {
2261
+ value?: {
2262
+ exact?: string | undefined;
2263
+ startsWith?: string | undefined;
2264
+ regex?: string | undefined;
2265
+ } | undefined;
2266
+ key?: {
2267
+ exact?: string | undefined;
2268
+ startsWith?: string | undefined;
2269
+ regex?: string | undefined;
2270
+ } | undefined;
2271
+ }[] | undefined;
2272
+ method?: string[] | undefined;
2273
+ queryString?: {
2274
+ value?: {
2275
+ exact?: string | undefined;
2276
+ startsWith?: string | undefined;
2277
+ regex?: string | undefined;
2278
+ } | undefined;
2279
+ key?: {
2280
+ exact?: string | undefined;
2281
+ startsWith?: string | undefined;
2282
+ regex?: string | undefined;
2283
+ } | undefined;
2284
+ }[] | undefined;
2285
+ } | undefined;
2286
+ }>, "many">>;
734
2287
  }, zod0.ZodTypeAny, "passthrough">, zod0.objectInputType<{
735
2288
  mode: zod0.ZodLiteral<"custom">;
736
2289
  allowedDomains: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
@@ -740,15 +2293,509 @@ declare class Sandbox {
740
2293
  domain: zod0.ZodString;
741
2294
  headers: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodString>>;
742
2295
  headerNames: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2296
+ match: zod0.ZodOptional<zod0.ZodObject<{
2297
+ path: zod0.ZodOptional<zod0.ZodObject<{
2298
+ exact: zod0.ZodOptional<zod0.ZodString>;
2299
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2300
+ regex: zod0.ZodOptional<zod0.ZodString>;
2301
+ }, "strip", zod0.ZodTypeAny, {
2302
+ exact?: string | undefined;
2303
+ startsWith?: string | undefined;
2304
+ regex?: string | undefined;
2305
+ }, {
2306
+ exact?: string | undefined;
2307
+ startsWith?: string | undefined;
2308
+ regex?: string | undefined;
2309
+ }>>;
2310
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2311
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2312
+ key: zod0.ZodOptional<zod0.ZodObject<{
2313
+ exact: zod0.ZodOptional<zod0.ZodString>;
2314
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2315
+ regex: zod0.ZodOptional<zod0.ZodString>;
2316
+ }, "strip", zod0.ZodTypeAny, {
2317
+ exact?: string | undefined;
2318
+ startsWith?: string | undefined;
2319
+ regex?: string | undefined;
2320
+ }, {
2321
+ exact?: string | undefined;
2322
+ startsWith?: string | undefined;
2323
+ regex?: string | undefined;
2324
+ }>>;
2325
+ value: zod0.ZodOptional<zod0.ZodObject<{
2326
+ exact: zod0.ZodOptional<zod0.ZodString>;
2327
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2328
+ regex: zod0.ZodOptional<zod0.ZodString>;
2329
+ }, "strip", zod0.ZodTypeAny, {
2330
+ exact?: string | undefined;
2331
+ startsWith?: string | undefined;
2332
+ regex?: string | undefined;
2333
+ }, {
2334
+ exact?: string | undefined;
2335
+ startsWith?: string | undefined;
2336
+ regex?: string | undefined;
2337
+ }>>;
2338
+ }, "strip", zod0.ZodTypeAny, {
2339
+ value?: {
2340
+ exact?: string | undefined;
2341
+ startsWith?: string | undefined;
2342
+ regex?: string | undefined;
2343
+ } | undefined;
2344
+ key?: {
2345
+ exact?: string | undefined;
2346
+ startsWith?: string | undefined;
2347
+ regex?: string | undefined;
2348
+ } | undefined;
2349
+ }, {
2350
+ value?: {
2351
+ exact?: string | undefined;
2352
+ startsWith?: string | undefined;
2353
+ regex?: string | undefined;
2354
+ } | undefined;
2355
+ key?: {
2356
+ exact?: string | undefined;
2357
+ startsWith?: string | undefined;
2358
+ regex?: string | undefined;
2359
+ } | undefined;
2360
+ }>, "many">>;
2361
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2362
+ key: zod0.ZodOptional<zod0.ZodObject<{
2363
+ exact: zod0.ZodOptional<zod0.ZodString>;
2364
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2365
+ regex: zod0.ZodOptional<zod0.ZodString>;
2366
+ }, "strip", zod0.ZodTypeAny, {
2367
+ exact?: string | undefined;
2368
+ startsWith?: string | undefined;
2369
+ regex?: string | undefined;
2370
+ }, {
2371
+ exact?: string | undefined;
2372
+ startsWith?: string | undefined;
2373
+ regex?: string | undefined;
2374
+ }>>;
2375
+ value: zod0.ZodOptional<zod0.ZodObject<{
2376
+ exact: zod0.ZodOptional<zod0.ZodString>;
2377
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2378
+ regex: zod0.ZodOptional<zod0.ZodString>;
2379
+ }, "strip", zod0.ZodTypeAny, {
2380
+ exact?: string | undefined;
2381
+ startsWith?: string | undefined;
2382
+ regex?: string | undefined;
2383
+ }, {
2384
+ exact?: string | undefined;
2385
+ startsWith?: string | undefined;
2386
+ regex?: string | undefined;
2387
+ }>>;
2388
+ }, "strip", zod0.ZodTypeAny, {
2389
+ value?: {
2390
+ exact?: string | undefined;
2391
+ startsWith?: string | undefined;
2392
+ regex?: string | undefined;
2393
+ } | undefined;
2394
+ key?: {
2395
+ exact?: string | undefined;
2396
+ startsWith?: string | undefined;
2397
+ regex?: string | undefined;
2398
+ } | undefined;
2399
+ }, {
2400
+ value?: {
2401
+ exact?: string | undefined;
2402
+ startsWith?: string | undefined;
2403
+ regex?: string | undefined;
2404
+ } | undefined;
2405
+ key?: {
2406
+ exact?: string | undefined;
2407
+ startsWith?: string | undefined;
2408
+ regex?: string | undefined;
2409
+ } | undefined;
2410
+ }>, "many">>;
2411
+ }, "strip", zod0.ZodTypeAny, {
2412
+ path?: {
2413
+ exact?: string | undefined;
2414
+ startsWith?: string | undefined;
2415
+ regex?: string | undefined;
2416
+ } | undefined;
2417
+ headers?: {
2418
+ value?: {
2419
+ exact?: string | undefined;
2420
+ startsWith?: string | undefined;
2421
+ regex?: string | undefined;
2422
+ } | undefined;
2423
+ key?: {
2424
+ exact?: string | undefined;
2425
+ startsWith?: string | undefined;
2426
+ regex?: string | undefined;
2427
+ } | undefined;
2428
+ }[] | undefined;
2429
+ method?: string[] | undefined;
2430
+ queryString?: {
2431
+ value?: {
2432
+ exact?: string | undefined;
2433
+ startsWith?: string | undefined;
2434
+ regex?: string | undefined;
2435
+ } | undefined;
2436
+ key?: {
2437
+ exact?: string | undefined;
2438
+ startsWith?: string | undefined;
2439
+ regex?: string | undefined;
2440
+ } | undefined;
2441
+ }[] | undefined;
2442
+ }, {
2443
+ path?: {
2444
+ exact?: string | undefined;
2445
+ startsWith?: string | undefined;
2446
+ regex?: string | undefined;
2447
+ } | undefined;
2448
+ headers?: {
2449
+ value?: {
2450
+ exact?: string | undefined;
2451
+ startsWith?: string | undefined;
2452
+ regex?: string | undefined;
2453
+ } | undefined;
2454
+ key?: {
2455
+ exact?: string | undefined;
2456
+ startsWith?: string | undefined;
2457
+ regex?: string | undefined;
2458
+ } | undefined;
2459
+ }[] | undefined;
2460
+ method?: string[] | undefined;
2461
+ queryString?: {
2462
+ value?: {
2463
+ exact?: string | undefined;
2464
+ startsWith?: string | undefined;
2465
+ regex?: string | undefined;
2466
+ } | undefined;
2467
+ key?: {
2468
+ exact?: string | undefined;
2469
+ startsWith?: string | undefined;
2470
+ regex?: string | undefined;
2471
+ } | undefined;
2472
+ }[] | undefined;
2473
+ }>>;
743
2474
  }, "strip", zod0.ZodTypeAny, {
744
2475
  domain: string;
2476
+ match?: {
2477
+ path?: {
2478
+ exact?: string | undefined;
2479
+ startsWith?: string | undefined;
2480
+ regex?: string | undefined;
2481
+ } | undefined;
2482
+ headers?: {
2483
+ value?: {
2484
+ exact?: string | undefined;
2485
+ startsWith?: string | undefined;
2486
+ regex?: string | undefined;
2487
+ } | undefined;
2488
+ key?: {
2489
+ exact?: string | undefined;
2490
+ startsWith?: string | undefined;
2491
+ regex?: string | undefined;
2492
+ } | undefined;
2493
+ }[] | undefined;
2494
+ method?: string[] | undefined;
2495
+ queryString?: {
2496
+ value?: {
2497
+ exact?: string | undefined;
2498
+ startsWith?: string | undefined;
2499
+ regex?: string | undefined;
2500
+ } | undefined;
2501
+ key?: {
2502
+ exact?: string | undefined;
2503
+ startsWith?: string | undefined;
2504
+ regex?: string | undefined;
2505
+ } | undefined;
2506
+ }[] | undefined;
2507
+ } | undefined;
745
2508
  headers?: Record<string, string> | undefined;
746
2509
  headerNames?: string[] | undefined;
747
2510
  }, {
748
2511
  domain: string;
2512
+ match?: {
2513
+ path?: {
2514
+ exact?: string | undefined;
2515
+ startsWith?: string | undefined;
2516
+ regex?: string | undefined;
2517
+ } | undefined;
2518
+ headers?: {
2519
+ value?: {
2520
+ exact?: string | undefined;
2521
+ startsWith?: string | undefined;
2522
+ regex?: string | undefined;
2523
+ } | undefined;
2524
+ key?: {
2525
+ exact?: string | undefined;
2526
+ startsWith?: string | undefined;
2527
+ regex?: string | undefined;
2528
+ } | undefined;
2529
+ }[] | undefined;
2530
+ method?: string[] | undefined;
2531
+ queryString?: {
2532
+ value?: {
2533
+ exact?: string | undefined;
2534
+ startsWith?: string | undefined;
2535
+ regex?: string | undefined;
2536
+ } | undefined;
2537
+ key?: {
2538
+ exact?: string | undefined;
2539
+ startsWith?: string | undefined;
2540
+ regex?: string | undefined;
2541
+ } | undefined;
2542
+ }[] | undefined;
2543
+ } | undefined;
749
2544
  headers?: Record<string, string> | undefined;
750
2545
  headerNames?: string[] | undefined;
751
2546
  }>, "many">>;
2547
+ forwardRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2548
+ domain: zod0.ZodString;
2549
+ forwardURL: zod0.ZodString;
2550
+ match: zod0.ZodOptional<zod0.ZodObject<{
2551
+ path: zod0.ZodOptional<zod0.ZodObject<{
2552
+ exact: zod0.ZodOptional<zod0.ZodString>;
2553
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2554
+ regex: zod0.ZodOptional<zod0.ZodString>;
2555
+ }, "strip", zod0.ZodTypeAny, {
2556
+ exact?: string | undefined;
2557
+ startsWith?: string | undefined;
2558
+ regex?: string | undefined;
2559
+ }, {
2560
+ exact?: string | undefined;
2561
+ startsWith?: string | undefined;
2562
+ regex?: string | undefined;
2563
+ }>>;
2564
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2565
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2566
+ key: zod0.ZodOptional<zod0.ZodObject<{
2567
+ exact: zod0.ZodOptional<zod0.ZodString>;
2568
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2569
+ regex: zod0.ZodOptional<zod0.ZodString>;
2570
+ }, "strip", zod0.ZodTypeAny, {
2571
+ exact?: string | undefined;
2572
+ startsWith?: string | undefined;
2573
+ regex?: string | undefined;
2574
+ }, {
2575
+ exact?: string | undefined;
2576
+ startsWith?: string | undefined;
2577
+ regex?: string | undefined;
2578
+ }>>;
2579
+ value: zod0.ZodOptional<zod0.ZodObject<{
2580
+ exact: zod0.ZodOptional<zod0.ZodString>;
2581
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2582
+ regex: zod0.ZodOptional<zod0.ZodString>;
2583
+ }, "strip", zod0.ZodTypeAny, {
2584
+ exact?: string | undefined;
2585
+ startsWith?: string | undefined;
2586
+ regex?: string | undefined;
2587
+ }, {
2588
+ exact?: string | undefined;
2589
+ startsWith?: string | undefined;
2590
+ regex?: string | undefined;
2591
+ }>>;
2592
+ }, "strip", zod0.ZodTypeAny, {
2593
+ value?: {
2594
+ exact?: string | undefined;
2595
+ startsWith?: string | undefined;
2596
+ regex?: string | undefined;
2597
+ } | undefined;
2598
+ key?: {
2599
+ exact?: string | undefined;
2600
+ startsWith?: string | undefined;
2601
+ regex?: string | undefined;
2602
+ } | undefined;
2603
+ }, {
2604
+ value?: {
2605
+ exact?: string | undefined;
2606
+ startsWith?: string | undefined;
2607
+ regex?: string | undefined;
2608
+ } | undefined;
2609
+ key?: {
2610
+ exact?: string | undefined;
2611
+ startsWith?: string | undefined;
2612
+ regex?: string | undefined;
2613
+ } | undefined;
2614
+ }>, "many">>;
2615
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2616
+ key: zod0.ZodOptional<zod0.ZodObject<{
2617
+ exact: zod0.ZodOptional<zod0.ZodString>;
2618
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2619
+ regex: zod0.ZodOptional<zod0.ZodString>;
2620
+ }, "strip", zod0.ZodTypeAny, {
2621
+ exact?: string | undefined;
2622
+ startsWith?: string | undefined;
2623
+ regex?: string | undefined;
2624
+ }, {
2625
+ exact?: string | undefined;
2626
+ startsWith?: string | undefined;
2627
+ regex?: string | undefined;
2628
+ }>>;
2629
+ value: zod0.ZodOptional<zod0.ZodObject<{
2630
+ exact: zod0.ZodOptional<zod0.ZodString>;
2631
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2632
+ regex: zod0.ZodOptional<zod0.ZodString>;
2633
+ }, "strip", zod0.ZodTypeAny, {
2634
+ exact?: string | undefined;
2635
+ startsWith?: string | undefined;
2636
+ regex?: string | undefined;
2637
+ }, {
2638
+ exact?: string | undefined;
2639
+ startsWith?: string | undefined;
2640
+ regex?: string | undefined;
2641
+ }>>;
2642
+ }, "strip", zod0.ZodTypeAny, {
2643
+ value?: {
2644
+ exact?: string | undefined;
2645
+ startsWith?: string | undefined;
2646
+ regex?: string | undefined;
2647
+ } | undefined;
2648
+ key?: {
2649
+ exact?: string | undefined;
2650
+ startsWith?: string | undefined;
2651
+ regex?: string | undefined;
2652
+ } | undefined;
2653
+ }, {
2654
+ value?: {
2655
+ exact?: string | undefined;
2656
+ startsWith?: string | undefined;
2657
+ regex?: string | undefined;
2658
+ } | undefined;
2659
+ key?: {
2660
+ exact?: string | undefined;
2661
+ startsWith?: string | undefined;
2662
+ regex?: string | undefined;
2663
+ } | undefined;
2664
+ }>, "many">>;
2665
+ }, "strip", zod0.ZodTypeAny, {
2666
+ path?: {
2667
+ exact?: string | undefined;
2668
+ startsWith?: string | undefined;
2669
+ regex?: string | undefined;
2670
+ } | undefined;
2671
+ headers?: {
2672
+ value?: {
2673
+ exact?: string | undefined;
2674
+ startsWith?: string | undefined;
2675
+ regex?: string | undefined;
2676
+ } | undefined;
2677
+ key?: {
2678
+ exact?: string | undefined;
2679
+ startsWith?: string | undefined;
2680
+ regex?: string | undefined;
2681
+ } | undefined;
2682
+ }[] | undefined;
2683
+ method?: string[] | undefined;
2684
+ queryString?: {
2685
+ value?: {
2686
+ exact?: string | undefined;
2687
+ startsWith?: string | undefined;
2688
+ regex?: string | undefined;
2689
+ } | undefined;
2690
+ key?: {
2691
+ exact?: string | undefined;
2692
+ startsWith?: string | undefined;
2693
+ regex?: string | undefined;
2694
+ } | undefined;
2695
+ }[] | undefined;
2696
+ }, {
2697
+ path?: {
2698
+ exact?: string | undefined;
2699
+ startsWith?: string | undefined;
2700
+ regex?: string | undefined;
2701
+ } | undefined;
2702
+ headers?: {
2703
+ value?: {
2704
+ exact?: string | undefined;
2705
+ startsWith?: string | undefined;
2706
+ regex?: string | undefined;
2707
+ } | undefined;
2708
+ key?: {
2709
+ exact?: string | undefined;
2710
+ startsWith?: string | undefined;
2711
+ regex?: string | undefined;
2712
+ } | undefined;
2713
+ }[] | undefined;
2714
+ method?: string[] | undefined;
2715
+ queryString?: {
2716
+ value?: {
2717
+ exact?: string | undefined;
2718
+ startsWith?: string | undefined;
2719
+ regex?: string | undefined;
2720
+ } | undefined;
2721
+ key?: {
2722
+ exact?: string | undefined;
2723
+ startsWith?: string | undefined;
2724
+ regex?: string | undefined;
2725
+ } | undefined;
2726
+ }[] | undefined;
2727
+ }>>;
2728
+ }, "strip", zod0.ZodTypeAny, {
2729
+ domain: string;
2730
+ forwardURL: string;
2731
+ match?: {
2732
+ path?: {
2733
+ exact?: string | undefined;
2734
+ startsWith?: string | undefined;
2735
+ regex?: string | undefined;
2736
+ } | undefined;
2737
+ headers?: {
2738
+ value?: {
2739
+ exact?: string | undefined;
2740
+ startsWith?: string | undefined;
2741
+ regex?: string | undefined;
2742
+ } | undefined;
2743
+ key?: {
2744
+ exact?: string | undefined;
2745
+ startsWith?: string | undefined;
2746
+ regex?: string | undefined;
2747
+ } | undefined;
2748
+ }[] | undefined;
2749
+ method?: string[] | undefined;
2750
+ queryString?: {
2751
+ value?: {
2752
+ exact?: string | undefined;
2753
+ startsWith?: string | undefined;
2754
+ regex?: string | undefined;
2755
+ } | undefined;
2756
+ key?: {
2757
+ exact?: string | undefined;
2758
+ startsWith?: string | undefined;
2759
+ regex?: string | undefined;
2760
+ } | undefined;
2761
+ }[] | undefined;
2762
+ } | undefined;
2763
+ }, {
2764
+ domain: string;
2765
+ forwardURL: string;
2766
+ match?: {
2767
+ path?: {
2768
+ exact?: string | undefined;
2769
+ startsWith?: string | undefined;
2770
+ regex?: string | undefined;
2771
+ } | undefined;
2772
+ headers?: {
2773
+ value?: {
2774
+ exact?: string | undefined;
2775
+ startsWith?: string | undefined;
2776
+ regex?: string | undefined;
2777
+ } | undefined;
2778
+ key?: {
2779
+ exact?: string | undefined;
2780
+ startsWith?: string | undefined;
2781
+ regex?: string | undefined;
2782
+ } | undefined;
2783
+ }[] | undefined;
2784
+ method?: string[] | undefined;
2785
+ queryString?: {
2786
+ value?: {
2787
+ exact?: string | undefined;
2788
+ startsWith?: string | undefined;
2789
+ regex?: string | undefined;
2790
+ } | undefined;
2791
+ key?: {
2792
+ exact?: string | undefined;
2793
+ startsWith?: string | undefined;
2794
+ regex?: string | undefined;
2795
+ } | undefined;
2796
+ }[] | undefined;
2797
+ } | undefined;
2798
+ }>, "many">>;
752
2799
  }, zod0.ZodTypeAny, "passthrough">>]>>;
753
2800
  activeCpuDurationMs: zod0.ZodOptional<zod0.ZodNumber>;
754
2801
  networkTransfer: zod0.ZodOptional<zod0.ZodObject<{
@@ -762,7 +2809,7 @@ declare class Sandbox {
762
2809
  egress: number;
763
2810
  }>>;
764
2811
  }, zod0.ZodTypeAny, "passthrough">[];
765
- }>;
2812
+ }, "sessions">>;
766
2813
  /**
767
2814
  * List snapshots that belong to this sandbox.
768
2815
  *
@@ -774,22 +2821,22 @@ declare class Sandbox {
774
2821
  cursor?: string;
775
2822
  sortOrder?: "asc" | "desc";
776
2823
  signal?: AbortSignal;
777
- }): Promise<{
2824
+ }): Promise<Paginator<{
778
2825
  pagination: {
779
2826
  count: number;
780
2827
  next: string | null;
781
2828
  };
782
2829
  snapshots: {
783
2830
  status: "failed" | "created" | "deleted";
2831
+ id: string;
784
2832
  region: string;
785
2833
  createdAt: number;
786
2834
  updatedAt: number;
787
- id: string;
788
2835
  sourceSessionId: string;
789
2836
  sizeBytes: number;
790
2837
  expiresAt?: number | undefined;
791
2838
  }[];
792
- }>;
2839
+ }, "snapshots">>;
793
2840
  }
794
2841
  //#endregion
795
2842
  export { Sandbox, SerializedSandbox };