modal 0.7.3-dev.1 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -414,6 +414,31 @@ interface AppClientDisconnectRequest {
414
414
  exception: string;
415
415
  }
416
416
  declare const AppClientDisconnectRequest: MessageFns$1<AppClientDisconnectRequest>;
417
+ interface AppCountLogsRequest {
418
+ appId: string;
419
+ taskId: string;
420
+ functionId: string;
421
+ functionCallId: string;
422
+ sandboxId: string;
423
+ searchText: string;
424
+ since: Date | undefined;
425
+ until: Date | undefined;
426
+ bucketSecs: number;
427
+ source: FileDescriptor;
428
+ }
429
+ declare const AppCountLogsRequest: MessageFns$1<AppCountLogsRequest>;
430
+ interface AppCountLogsResponse {
431
+ appId: string;
432
+ buckets: AppCountLogsResponse_LogBucket[];
433
+ }
434
+ declare const AppCountLogsResponse: MessageFns$1<AppCountLogsResponse>;
435
+ interface AppCountLogsResponse_LogBucket {
436
+ bucketStartAt: Date | undefined;
437
+ stdoutLogs: number;
438
+ stderrLogs: number;
439
+ systemLogs: number;
440
+ }
441
+ declare const AppCountLogsResponse_LogBucket: MessageFns$1<AppCountLogsResponse_LogBucket>;
417
442
  interface AppCreateRequest {
418
443
  clientId: string;
419
444
  /** Human readable label for the app */
@@ -465,6 +490,23 @@ interface AppDeploymentHistoryResponse {
465
490
  appDeploymentHistories: AppDeploymentHistory[];
466
491
  }
467
492
  declare const AppDeploymentHistoryResponse: MessageFns$1<AppDeploymentHistoryResponse>;
493
+ interface AppFetchLogsRequest {
494
+ appId: string;
495
+ since: Date | undefined;
496
+ until: Date | undefined;
497
+ limit: number;
498
+ source: FileDescriptor;
499
+ functionId: string;
500
+ functionCallId: string;
501
+ taskId: string;
502
+ sandboxId: string;
503
+ searchText: string;
504
+ }
505
+ declare const AppFetchLogsRequest: MessageFns$1<AppFetchLogsRequest>;
506
+ interface AppFetchLogsResponse {
507
+ batches: TaskLogsBatch[];
508
+ }
509
+ declare const AppFetchLogsResponse: MessageFns$1<AppFetchLogsResponse>;
468
510
  interface AppGetByDeploymentNameRequest {
469
511
  name: string;
470
512
  environmentName: string;
@@ -482,6 +524,14 @@ interface AppGetLayoutResponse {
482
524
  appLayout: AppLayout | undefined;
483
525
  }
484
526
  declare const AppGetLayoutResponse: MessageFns$1<AppGetLayoutResponse>;
527
+ interface AppGetLifecycleRequest {
528
+ appId: string;
529
+ }
530
+ declare const AppGetLifecycleRequest: MessageFns$1<AppGetLifecycleRequest>;
531
+ interface AppGetLifecycleResponse {
532
+ lifecycle: AppLifecycle | undefined;
533
+ }
534
+ declare const AppGetLifecycleResponse: MessageFns$1<AppGetLifecycleResponse>;
485
535
  interface AppGetLogsRequest {
486
536
  appId: string;
487
537
  timeout: number;
@@ -493,6 +543,7 @@ interface AppGetLogsRequest {
493
543
  functionCallId: string;
494
544
  fileDescriptor: FileDescriptor;
495
545
  sandboxId: string;
546
+ searchText: string;
496
547
  }
497
548
  declare const AppGetLogsRequest: MessageFns$1<AppGetLogsRequest>;
498
549
  interface AppGetObjectsItem {
@@ -547,6 +598,23 @@ interface AppLayout {
547
598
  };
548
599
  }
549
600
  declare const AppLayout: MessageFns$1<AppLayout>;
601
+ interface AppLifecycle {
602
+ appState: AppState;
603
+ createdAt: number;
604
+ /** User or service user name */
605
+ createdBy: string;
606
+ /** Most recent deployment event */
607
+ deployedAt: number;
608
+ /** User or service user name */
609
+ deployedBy: string;
610
+ /** Only meaningful when App is deployed */
611
+ version: number;
612
+ /** Unset when App is still running */
613
+ stoppedAt: number;
614
+ /** User or service user name, null if running or ephemeral App that finished normally */
615
+ stoppedBy: string;
616
+ }
617
+ declare const AppLifecycle: MessageFns$1<AppLifecycle>;
550
618
  interface AppListRequest {
551
619
  environmentName: string;
552
620
  }
@@ -608,6 +676,7 @@ declare const AppPublishRequest: MessageFns$1<AppPublishRequest>;
608
676
  interface AppPublishResponse {
609
677
  url: string;
610
678
  serverWarnings: Warning[];
679
+ deployedAt: number;
611
680
  }
612
681
  declare const AppPublishResponse: MessageFns$1<AppPublishResponse>;
613
682
  interface AppRollbackRequest {
@@ -616,6 +685,16 @@ interface AppRollbackRequest {
616
685
  version: number;
617
686
  }
618
687
  declare const AppRollbackRequest: MessageFns$1<AppRollbackRequest>;
688
+ interface AppRolloverRequest {
689
+ appId: string;
690
+ }
691
+ declare const AppRolloverRequest: MessageFns$1<AppRolloverRequest>;
692
+ interface AppRolloverResponse {
693
+ url: string;
694
+ serverWarnings: Warning[];
695
+ deployedAt: number;
696
+ }
697
+ declare const AppRolloverResponse: MessageFns$1<AppRolloverResponse>;
619
698
  interface AppSetObjectsRequest {
620
699
  appId: string;
621
700
  indexedObjectIds: {
@@ -1126,6 +1205,7 @@ interface DictGetOrCreateRequest {
1126
1205
  deploymentName: string;
1127
1206
  environmentName: string;
1128
1207
  objectCreationType: ObjectCreationType;
1208
+ /** Unused after 1.4.0 */
1129
1209
  data: DictEntry[];
1130
1210
  }
1131
1211
  declare const DictGetOrCreateRequest: MessageFns$1<DictGetOrCreateRequest>;
@@ -2417,6 +2497,17 @@ interface PortSpecs {
2417
2497
  ports: PortSpec[];
2418
2498
  }
2419
2499
  declare const PortSpecs: MessageFns$1<PortSpecs>;
2500
+ interface Probe$1 {
2501
+ tcpPort?: number | undefined;
2502
+ execCommand?: Probe_ExecCommand | undefined;
2503
+ intervalMs?: number | undefined;
2504
+ }
2505
+ declare const Probe$1: MessageFns$1<Probe$1>;
2506
+ interface Probe_ExecCommand {
2507
+ /** Command and args to execute directly (argv form, not shell-parsed). */
2508
+ argv: string[];
2509
+ }
2510
+ declare const Probe_ExecCommand: MessageFns$1<Probe_ExecCommand>;
2420
2511
  interface Proxy$1 {
2421
2512
  name: string;
2422
2513
  createdAt: number;
@@ -2674,6 +2765,7 @@ interface Sandbox$1 {
2674
2765
  nfsMounts: SharedVolumeMount[];
2675
2766
  /** For internal debugging use only. */
2676
2767
  runtimeDebug: boolean;
2768
+ /** deprecated, use network_access instead */
2677
2769
  blockNetwork: boolean;
2678
2770
  s3Mounts: S3Mount[];
2679
2771
  cloudBucketMounts: CloudBucketMount$1[];
@@ -2738,6 +2830,8 @@ interface Sandbox$1 {
2738
2830
  * for OIDC-based authentication (e.g. to AWS, GCP).
2739
2831
  */
2740
2832
  includeOidcIdentityToken: boolean;
2833
+ /** Probe used to determine when the sandbox has become ready. */
2834
+ readinessProbe?: Probe$1 | undefined;
2741
2835
  }
2742
2836
  declare const Sandbox$1: MessageFns$1<Sandbox$1>;
2743
2837
  interface SandboxCreateConnectTokenRequest {
@@ -2761,6 +2855,30 @@ interface SandboxCreateResponse {
2761
2855
  sandboxId: string;
2762
2856
  }
2763
2857
  declare const SandboxCreateResponse: MessageFns$1<SandboxCreateResponse>;
2858
+ interface SandboxCreateV2Request {
2859
+ appId: string;
2860
+ definition: Sandbox$1 | undefined;
2861
+ }
2862
+ declare const SandboxCreateV2Request: MessageFns$1<SandboxCreateV2Request>;
2863
+ interface SandboxCreateV2Response {
2864
+ sandboxId: string;
2865
+ tunnels: TunnelData[];
2866
+ taskId: string;
2867
+ }
2868
+ declare const SandboxCreateV2Response: MessageFns$1<SandboxCreateV2Response>;
2869
+ /**
2870
+ * Used by the sandbox controller to get command router access for V2 sandboxes.
2871
+ * For all other use cases, use TaskGetCommandRouterAccess instead.
2872
+ */
2873
+ interface SandboxGetCommandRouterAccessRequest {
2874
+ sandboxId: string;
2875
+ }
2876
+ declare const SandboxGetCommandRouterAccessRequest: MessageFns$1<SandboxGetCommandRouterAccessRequest>;
2877
+ interface SandboxGetCommandRouterAccessResponse {
2878
+ jwt: string;
2879
+ url: string;
2880
+ }
2881
+ declare const SandboxGetCommandRouterAccessResponse: MessageFns$1<SandboxGetCommandRouterAccessResponse>;
2764
2882
  interface SandboxGetFromNameRequest {
2765
2883
  sandboxName: string;
2766
2884
  environmentName: string;
@@ -2831,6 +2949,7 @@ interface SandboxInfo {
2831
2949
  regions: string[];
2832
2950
  timeoutSecs: number;
2833
2951
  idleTimeoutSecs?: number | undefined;
2952
+ readyAt?: number | undefined;
2834
2953
  }
2835
2954
  declare const SandboxInfo: MessageFns$1<SandboxInfo>;
2836
2955
  interface SandboxListRequest {
@@ -2951,6 +3070,15 @@ interface SandboxWaitResponse {
2951
3070
  result: GenericResult | undefined;
2952
3071
  }
2953
3072
  declare const SandboxWaitResponse: MessageFns$1<SandboxWaitResponse>;
3073
+ interface SandboxWaitUntilReadyRequest {
3074
+ sandboxId: string;
3075
+ timeout: number;
3076
+ }
3077
+ declare const SandboxWaitUntilReadyRequest: MessageFns$1<SandboxWaitUntilReadyRequest>;
3078
+ interface SandboxWaitUntilReadyResponse {
3079
+ readyAt: number;
3080
+ }
3081
+ declare const SandboxWaitUntilReadyResponse: MessageFns$1<SandboxWaitUntilReadyResponse>;
2954
3082
  interface Schedule {
2955
3083
  cron?: Schedule_Cron | undefined;
2956
3084
  period?: Schedule_Period | undefined;
@@ -3167,6 +3295,15 @@ interface TaskGetCommandRouterAccessResponse {
3167
3295
  url: string;
3168
3296
  }
3169
3297
  declare const TaskGetCommandRouterAccessResponse: MessageFns$1<TaskGetCommandRouterAccessResponse>;
3298
+ interface TaskGetInfoRequest {
3299
+ taskId: string;
3300
+ }
3301
+ declare const TaskGetInfoRequest: MessageFns$1<TaskGetInfoRequest>;
3302
+ interface TaskGetInfoResponse {
3303
+ appId: string;
3304
+ info: TaskInfo | undefined;
3305
+ }
3306
+ declare const TaskGetInfoResponse: MessageFns$1<TaskGetInfoResponse>;
3170
3307
  interface TaskInfo {
3171
3308
  id: string;
3172
3309
  startedAt: number;
@@ -3181,6 +3318,7 @@ interface TaskInfo {
3181
3318
  declare const TaskInfo: MessageFns$1<TaskInfo>;
3182
3319
  interface TaskListRequest {
3183
3320
  environmentName: string;
3321
+ appId: string;
3184
3322
  }
3185
3323
  declare const TaskListRequest: MessageFns$1<TaskListRequest>;
3186
3324
  interface TaskListResponse {
@@ -3196,6 +3334,8 @@ interface TaskLogs {
3196
3334
  functionCallId: string;
3197
3335
  inputId: string;
3198
3336
  timestampNs: number;
3337
+ containerId: string;
3338
+ containerName: string;
3199
3339
  }
3200
3340
  declare const TaskLogs: MessageFns$1<TaskLogs>;
3201
3341
  interface TaskLogsBatch {
@@ -3230,6 +3370,7 @@ interface TaskStats {
3230
3370
  appId: string;
3231
3371
  appDescription: string;
3232
3372
  startedAt: number;
3373
+ enqueuedAt: number;
3233
3374
  }
3234
3375
  declare const TaskStats: MessageFns$1<TaskStats>;
3235
3376
  interface TaskTemplate {
@@ -3244,6 +3385,19 @@ interface TaskTemplate {
3244
3385
  index: number;
3245
3386
  }
3246
3387
  declare const TaskTemplate: MessageFns$1<TaskTemplate>;
3388
+ interface TemplateListRequest {
3389
+ }
3390
+ declare const TemplateListRequest: MessageFns$1<TemplateListRequest>;
3391
+ interface TemplateListResponse {
3392
+ items: TemplateListResponse_TemplateListItem[];
3393
+ }
3394
+ declare const TemplateListResponse: MessageFns$1<TemplateListResponse>;
3395
+ interface TemplateListResponse_TemplateListItem {
3396
+ name: string;
3397
+ repo: string;
3398
+ ref: string;
3399
+ }
3400
+ declare const TemplateListResponse_TemplateListItem: MessageFns$1<TemplateListResponse_TemplateListItem>;
3247
3401
  interface TokenFlowCreateRequest {
3248
3402
  utmSource: string;
3249
3403
  localhostPort: number;
@@ -3658,6 +3812,14 @@ declare const ModalClientDefinition: {
3658
3812
  readonly responseStream: false;
3659
3813
  readonly options: {};
3660
3814
  };
3815
+ readonly appCountLogs: {
3816
+ readonly name: "AppCountLogs";
3817
+ readonly requestType: MessageFns$1<AppCountLogsRequest>;
3818
+ readonly requestStream: false;
3819
+ readonly responseType: MessageFns$1<AppCountLogsResponse>;
3820
+ readonly responseStream: false;
3821
+ readonly options: {};
3822
+ };
3661
3823
  readonly appCreate: {
3662
3824
  readonly name: "AppCreate";
3663
3825
  readonly requestType: MessageFns$1<AppCreateRequest>;
@@ -3682,6 +3844,14 @@ declare const ModalClientDefinition: {
3682
3844
  readonly responseStream: false;
3683
3845
  readonly options: {};
3684
3846
  };
3847
+ readonly appFetchLogs: {
3848
+ readonly name: "AppFetchLogs";
3849
+ readonly requestType: MessageFns$1<AppFetchLogsRequest>;
3850
+ readonly requestStream: false;
3851
+ readonly responseType: MessageFns$1<AppFetchLogsResponse>;
3852
+ readonly responseStream: false;
3853
+ readonly options: {};
3854
+ };
3685
3855
  readonly appGetByDeploymentName: {
3686
3856
  readonly name: "AppGetByDeploymentName";
3687
3857
  readonly requestType: MessageFns$1<AppGetByDeploymentNameRequest>;
@@ -3698,6 +3868,14 @@ declare const ModalClientDefinition: {
3698
3868
  readonly responseStream: false;
3699
3869
  readonly options: {};
3700
3870
  };
3871
+ readonly appGetLifecycle: {
3872
+ readonly name: "AppGetLifecycle";
3873
+ readonly requestType: MessageFns$1<AppGetLifecycleRequest>;
3874
+ readonly requestStream: false;
3875
+ readonly responseType: MessageFns$1<AppGetLifecycleResponse>;
3876
+ readonly responseStream: false;
3877
+ readonly options: {};
3878
+ };
3701
3879
  readonly appGetLogs: {
3702
3880
  readonly name: "AppGetLogs";
3703
3881
  readonly requestType: MessageFns$1<AppGetLogsRequest>;
@@ -3770,6 +3948,14 @@ declare const ModalClientDefinition: {
3770
3948
  readonly responseStream: false;
3771
3949
  readonly options: {};
3772
3950
  };
3951
+ readonly appRollover: {
3952
+ readonly name: "AppRollover";
3953
+ readonly requestType: MessageFns$1<AppRolloverRequest>;
3954
+ readonly requestStream: false;
3955
+ readonly responseType: MessageFns$1<AppRolloverResponse>;
3956
+ readonly responseStream: false;
3957
+ readonly options: {};
3958
+ };
3773
3959
  readonly appSetObjects: {
3774
3960
  readonly name: "AppSetObjects";
3775
3961
  readonly requestType: MessageFns$1<AppSetObjectsRequest>;
@@ -4617,6 +4803,22 @@ declare const ModalClientDefinition: {
4617
4803
  readonly responseStream: false;
4618
4804
  readonly options: {};
4619
4805
  };
4806
+ readonly sandboxCreateV2: {
4807
+ readonly name: "SandboxCreateV2";
4808
+ readonly requestType: MessageFns$1<SandboxCreateV2Request>;
4809
+ readonly requestStream: false;
4810
+ readonly responseType: MessageFns$1<SandboxCreateV2Response>;
4811
+ readonly responseStream: false;
4812
+ readonly options: {};
4813
+ };
4814
+ readonly sandboxGetCommandRouterAccess: {
4815
+ readonly name: "SandboxGetCommandRouterAccess";
4816
+ readonly requestType: MessageFns$1<SandboxGetCommandRouterAccessRequest>;
4817
+ readonly requestStream: false;
4818
+ readonly responseType: MessageFns$1<SandboxGetCommandRouterAccessResponse>;
4819
+ readonly responseStream: false;
4820
+ readonly options: {};
4821
+ };
4620
4822
  readonly sandboxGetFromName: {
4621
4823
  readonly name: "SandboxGetFromName";
4622
4824
  readonly requestType: MessageFns$1<SandboxGetFromNameRequest>;
@@ -4650,6 +4852,14 @@ declare const ModalClientDefinition: {
4650
4852
  readonly responseStream: false;
4651
4853
  readonly options: {};
4652
4854
  };
4855
+ readonly sandboxGetTaskIdV2: {
4856
+ readonly name: "SandboxGetTaskIdV2";
4857
+ readonly requestType: MessageFns$1<SandboxGetTaskIdRequest>;
4858
+ readonly requestStream: false;
4859
+ readonly responseType: MessageFns$1<SandboxGetTaskIdResponse>;
4860
+ readonly responseStream: false;
4861
+ readonly options: {};
4862
+ };
4653
4863
  readonly sandboxGetTunnels: {
4654
4864
  readonly name: "SandboxGetTunnels";
4655
4865
  readonly requestType: MessageFns$1<SandboxGetTunnelsRequest>;
@@ -4658,6 +4868,14 @@ declare const ModalClientDefinition: {
4658
4868
  readonly responseStream: false;
4659
4869
  readonly options: {};
4660
4870
  };
4871
+ readonly sandboxGetTunnelsV2: {
4872
+ readonly name: "SandboxGetTunnelsV2";
4873
+ readonly requestType: MessageFns$1<SandboxGetTunnelsRequest>;
4874
+ readonly requestStream: false;
4875
+ readonly responseType: MessageFns$1<SandboxGetTunnelsResponse>;
4876
+ readonly responseStream: false;
4877
+ readonly options: {};
4878
+ };
4661
4879
  readonly sandboxList: {
4662
4880
  readonly name: "SandboxList";
4663
4881
  readonly requestType: MessageFns$1<SandboxListRequest>;
@@ -4754,6 +4972,14 @@ declare const ModalClientDefinition: {
4754
4972
  readonly responseStream: false;
4755
4973
  readonly options: {};
4756
4974
  };
4975
+ readonly sandboxTerminateV2: {
4976
+ readonly name: "SandboxTerminateV2";
4977
+ readonly requestType: MessageFns$1<SandboxTerminateRequest>;
4978
+ readonly requestStream: false;
4979
+ readonly responseType: MessageFns$1<SandboxTerminateResponse>;
4980
+ readonly responseStream: false;
4981
+ readonly options: {};
4982
+ };
4757
4983
  readonly sandboxWait: {
4758
4984
  readonly name: "SandboxWait";
4759
4985
  readonly requestType: MessageFns$1<SandboxWaitRequest>;
@@ -4762,6 +4988,22 @@ declare const ModalClientDefinition: {
4762
4988
  readonly responseStream: false;
4763
4989
  readonly options: {};
4764
4990
  };
4991
+ readonly sandboxWaitUntilReady: {
4992
+ readonly name: "SandboxWaitUntilReady";
4993
+ readonly requestType: MessageFns$1<SandboxWaitUntilReadyRequest>;
4994
+ readonly requestStream: false;
4995
+ readonly responseType: MessageFns$1<SandboxWaitUntilReadyResponse>;
4996
+ readonly responseStream: false;
4997
+ readonly options: {};
4998
+ };
4999
+ readonly sandboxWaitV2: {
5000
+ readonly name: "SandboxWaitV2";
5001
+ readonly requestType: MessageFns$1<SandboxWaitRequest>;
5002
+ readonly requestStream: false;
5003
+ readonly responseType: MessageFns$1<SandboxWaitResponse>;
5004
+ readonly responseStream: false;
5005
+ readonly options: {};
5006
+ };
4765
5007
  /** Secrets */
4766
5008
  readonly secretDelete: {
4767
5009
  readonly name: "SecretDelete";
@@ -4893,6 +5135,14 @@ declare const ModalClientDefinition: {
4893
5135
  readonly responseStream: false;
4894
5136
  readonly options: {};
4895
5137
  };
5138
+ readonly taskGetInfo: {
5139
+ readonly name: "TaskGetInfo";
5140
+ readonly requestType: MessageFns$1<TaskGetInfoRequest>;
5141
+ readonly requestStream: false;
5142
+ readonly responseType: MessageFns$1<TaskGetInfoResponse>;
5143
+ readonly responseStream: false;
5144
+ readonly options: {};
5145
+ };
4896
5146
  readonly taskList: {
4897
5147
  readonly name: "TaskList";
4898
5148
  readonly requestType: MessageFns$1<TaskListRequest>;
@@ -4909,6 +5159,15 @@ declare const ModalClientDefinition: {
4909
5159
  readonly responseStream: false;
4910
5160
  readonly options: {};
4911
5161
  };
5162
+ /** Templates */
5163
+ readonly templateList: {
5164
+ readonly name: "TemplateList";
5165
+ readonly requestType: MessageFns$1<TemplateListRequest>;
5166
+ readonly requestStream: false;
5167
+ readonly responseType: MessageFns$1<TemplateListResponse>;
5168
+ readonly responseStream: false;
5169
+ readonly options: {};
5170
+ };
4912
5171
  /** Tokens (web auth flow) */
4913
5172
  readonly tokenFlowCreate: {
4914
5173
  readonly name: "TokenFlowCreate";
@@ -5853,6 +6112,12 @@ interface TaskExecStartRequest {
5853
6112
  * internal debugging.
5854
6113
  */
5855
6114
  runtimeDebug: boolean;
6115
+ /** Fully qualified target container ID. Empty targets the main container. */
6116
+ containerId: string;
6117
+ /** Environment variables to set directly for the exec'd command. */
6118
+ env: {
6119
+ [key: string]: string;
6120
+ };
5856
6121
  }
5857
6122
  declare const TaskExecStartRequest: MessageFns<TaskExecStartRequest>;
5858
6123
  interface TaskExecStartResponse {
@@ -6026,6 +6291,19 @@ type StdioBehavior = "pipe" | "ignore";
6026
6291
  * means the data will be read as raw bytes (Uint8Array).
6027
6292
  */
6028
6293
  type StreamMode = "text" | "binary";
6294
+ /** Optional parameters for {@link Probe.withTcp} and {@link Probe.withExec}. */
6295
+ type ProbeParams = {
6296
+ intervalMs: number;
6297
+ };
6298
+ /** Probe configuration for sandbox readiness checks. */
6299
+ declare class Probe {
6300
+ #private;
6301
+ private constructor();
6302
+ static withTcp(port: number, params?: ProbeParams): Probe;
6303
+ static withExec(argv: string[], params?: ProbeParams): Probe;
6304
+ /** @ignore */
6305
+ toProto(): Probe$1;
6306
+ }
6029
6307
  /** Optional parameters for {@link SandboxService#create client.sandboxes.create()}. */
6030
6308
  type SandboxCreateParams = {
6031
6309
  /** Reservation of physical CPU cores for the Sandbox, can be fractional. */
@@ -6057,7 +6335,8 @@ type SandboxCreateParams = {
6057
6335
  volumes?: Record<string, Volume>;
6058
6336
  /** Mount points for {@link CloudBucketMount}s. */
6059
6337
  cloudBucketMounts?: Record<string, CloudBucketMount>;
6060
- /** Enable a PTY for the Sandbox. */
6338
+ /** Enable a PTY for the Sandbox entrypoint command. When enabled, all output (stdout and
6339
+ * stderr from the process) is multiplexed into stdout, and the stderr stream is effectively empty. */
6061
6340
  pty?: boolean;
6062
6341
  /** List of ports to tunnel into the Sandbox. Encrypted ports are tunneled with TLS. */
6063
6342
  encryptedPorts?: number[];
@@ -6077,6 +6356,8 @@ type SandboxCreateParams = {
6077
6356
  verbose?: boolean;
6078
6357
  /** Reference to a Modal {@link Proxy} to use in front of this Sandbox. */
6079
6358
  proxy?: Proxy;
6359
+ /** Probe used to determine when the Sandbox has become ready. */
6360
+ readinessProbe?: Probe;
6080
6361
  /** Optional name for the Sandbox. Unique within an App. */
6081
6362
  name?: string;
6082
6363
  /** Optional experimental options. */
@@ -6085,6 +6366,8 @@ type SandboxCreateParams = {
6085
6366
  * This requires prior manual setup by Modal and is only available for Enterprise customers.
6086
6367
  */
6087
6368
  customDomain?: string;
6369
+ /** If true, the sandbox will receive a MODAL_IDENTITY_TOKEN env var for OIDC-based auth (e.g. to AWS, GCP). */
6370
+ includeOidcIdentityToken?: boolean;
6088
6371
  };
6089
6372
  /**
6090
6373
  * Service for managing {@link Sandbox}es.
@@ -6153,7 +6436,8 @@ type SandboxExecParams = {
6153
6436
  env?: Record<string, string>;
6154
6437
  /** {@link Secret}s to inject as environment variables for the commmand.*/
6155
6438
  secrets?: Secret[];
6156
- /** Enable a PTY for the command. */
6439
+ /** Enable a PTY for the command. When enabled, all output (stdout and stderr from the
6440
+ * process) is multiplexed into stdout, and the stderr stream is effectively empty. */
6157
6441
  pty?: boolean;
6158
6442
  };
6159
6443
  /** Optional parameters for {@link Sandbox#createConnectToken Sandbox.createConnectToken()}. */
@@ -6234,6 +6518,16 @@ declare class Sandbox {
6234
6518
  */
6235
6519
  detach(): void;
6236
6520
  wait(): Promise<number>;
6521
+ /**
6522
+ * Wait until the Sandbox readiness probe reports the Sandbox is ready.
6523
+ *
6524
+ * This method only works for Sandboxes configured with a readiness probe.
6525
+ *
6526
+ * @param timeoutMs - Maximum total time to wait, in milliseconds.
6527
+ * @returns A promise that resolves once the Sandbox is ready.
6528
+ * @throws {@link TimeoutError} If readiness is not reported before `timeoutMs`.
6529
+ */
6530
+ waitUntilReady(timeoutMs?: number): Promise<void>;
6237
6531
  /** Get {@link Tunnel} metadata for the Sandbox.
6238
6532
  *
6239
6533
  * Raises {@link SandboxTimeoutError} if the tunnels are not available after the timeout.
@@ -6455,6 +6749,10 @@ declare class App {
6455
6749
  imageFromGcpArtifactRegistry(tag: string, secret: Secret): Promise<Image>;
6456
6750
  }
6457
6751
 
6752
+ /** An operation exceeds the allowed time limit. */
6753
+ declare class TimeoutError extends Error {
6754
+ constructor(message?: string);
6755
+ }
6458
6756
  /** Function execution exceeds the allowed time limit. */
6459
6757
  declare class FunctionTimeoutError extends Error {
6460
6758
  constructor(message: string);
@@ -6498,4 +6796,4 @@ declare class ClientClosedError extends Error {
6498
6796
 
6499
6797
  declare function checkForRenamedParams(params: any, renames: Record<string, string>): void;
6500
6798
 
6501
- export { AlreadyExistsError, App, type AppFromNameParams, AppService, ClientClosedError, type ClientOptions, CloudBucketMount, CloudBucketMountService, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LogLevel, type Logger, type LookupOptions, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateConnectCredentials, type SandboxCreateConnectTokenParams, type SandboxCreateParams, type SandboxExecParams, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, type SandboxTerminateParams, SandboxTimeoutError, Secret, type SecretDeleteParams, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, Tunnel, Volume, type VolumeDeleteParams, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, checkForRenamedParams, close, initializeClient };
6799
+ export { AlreadyExistsError, App, type AppFromNameParams, AppService, ClientClosedError, type ClientOptions, CloudBucketMount, CloudBucketMountService, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LogLevel, type Logger, type LookupOptions, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, Probe, type ProbeParams, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateConnectCredentials, type SandboxCreateConnectTokenParams, type SandboxCreateParams, type SandboxExecParams, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, type SandboxTerminateParams, SandboxTimeoutError, Secret, type SecretDeleteParams, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, TimeoutError, Tunnel, Volume, type VolumeDeleteParams, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, checkForRenamedParams, close, initializeClient };