modal 0.3.13 → 0.3.15

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.cjs CHANGED
@@ -47,6 +47,7 @@ __export(index_exports, {
47
47
  RemoteError: () => RemoteError,
48
48
  Sandbox: () => Sandbox2,
49
49
  SandboxFile: () => SandboxFile,
50
+ SandboxTimeoutError: () => SandboxTimeoutError,
50
51
  Secret: () => Secret,
51
52
  Volume: () => Volume,
52
53
  initializeClient: () => initializeClient
@@ -3058,16 +3059,13 @@ var AppCreateResponse = {
3058
3059
  }
3059
3060
  };
3060
3061
  function createBaseAppDeployRequest() {
3061
- return { appId: "", namespace: 0, name: "", objectEntity: "", visibility: 0, tag: "" };
3062
+ return { appId: "", name: "", objectEntity: "", visibility: 0, tag: "" };
3062
3063
  }
3063
3064
  var AppDeployRequest = {
3064
3065
  encode(message, writer = new BinaryWriter()) {
3065
3066
  if (message.appId !== "") {
3066
3067
  writer.uint32(10).string(message.appId);
3067
3068
  }
3068
- if (message.namespace !== 0) {
3069
- writer.uint32(16).int32(message.namespace);
3070
- }
3071
3069
  if (message.name !== "") {
3072
3070
  writer.uint32(26).string(message.name);
3073
3071
  }
@@ -3096,13 +3094,6 @@ var AppDeployRequest = {
3096
3094
  message.appId = reader.string();
3097
3095
  continue;
3098
3096
  }
3099
- case 2: {
3100
- if (tag !== 16) {
3101
- break;
3102
- }
3103
- message.namespace = reader.int32();
3104
- continue;
3105
- }
3106
3097
  case 3: {
3107
3098
  if (tag !== 26) {
3108
3099
  break;
@@ -3142,7 +3133,6 @@ var AppDeployRequest = {
3142
3133
  fromJSON(object) {
3143
3134
  return {
3144
3135
  appId: isSet3(object.appId) ? globalThis.String(object.appId) : "",
3145
- namespace: isSet3(object.namespace) ? deploymentNamespaceFromJSON(object.namespace) : 0,
3146
3136
  name: isSet3(object.name) ? globalThis.String(object.name) : "",
3147
3137
  objectEntity: isSet3(object.objectEntity) ? globalThis.String(object.objectEntity) : "",
3148
3138
  visibility: isSet3(object.visibility) ? appDeployVisibilityFromJSON(object.visibility) : 0,
@@ -3154,9 +3144,6 @@ var AppDeployRequest = {
3154
3144
  if (message.appId !== "") {
3155
3145
  obj.appId = message.appId;
3156
3146
  }
3157
- if (message.namespace !== 0) {
3158
- obj.namespace = deploymentNamespaceToJSON(message.namespace);
3159
- }
3160
3147
  if (message.name !== "") {
3161
3148
  obj.name = message.name;
3162
3149
  }
@@ -3177,7 +3164,6 @@ var AppDeployRequest = {
3177
3164
  fromPartial(object) {
3178
3165
  const message = createBaseAppDeployRequest();
3179
3166
  message.appId = object.appId ?? "";
3180
- message.namespace = object.namespace ?? 0;
3181
3167
  message.name = object.name ?? "";
3182
3168
  message.objectEntity = object.objectEntity ?? "";
3183
3169
  message.visibility = object.visibility ?? 0;
@@ -3540,13 +3526,10 @@ var AppDeploymentHistoryResponse = {
3540
3526
  }
3541
3527
  };
3542
3528
  function createBaseAppGetByDeploymentNameRequest() {
3543
- return { namespace: 0, name: "", environmentName: "" };
3529
+ return { name: "", environmentName: "" };
3544
3530
  }
3545
3531
  var AppGetByDeploymentNameRequest = {
3546
3532
  encode(message, writer = new BinaryWriter()) {
3547
- if (message.namespace !== 0) {
3548
- writer.uint32(8).int32(message.namespace);
3549
- }
3550
3533
  if (message.name !== "") {
3551
3534
  writer.uint32(18).string(message.name);
3552
3535
  }
@@ -3562,13 +3545,6 @@ var AppGetByDeploymentNameRequest = {
3562
3545
  while (reader.pos < end) {
3563
3546
  const tag = reader.uint32();
3564
3547
  switch (tag >>> 3) {
3565
- case 1: {
3566
- if (tag !== 8) {
3567
- break;
3568
- }
3569
- message.namespace = reader.int32();
3570
- continue;
3571
- }
3572
3548
  case 2: {
3573
3549
  if (tag !== 18) {
3574
3550
  break;
@@ -3593,16 +3569,12 @@ var AppGetByDeploymentNameRequest = {
3593
3569
  },
3594
3570
  fromJSON(object) {
3595
3571
  return {
3596
- namespace: isSet3(object.namespace) ? deploymentNamespaceFromJSON(object.namespace) : 0,
3597
3572
  name: isSet3(object.name) ? globalThis.String(object.name) : "",
3598
3573
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : ""
3599
3574
  };
3600
3575
  },
3601
3576
  toJSON(message) {
3602
3577
  const obj = {};
3603
- if (message.namespace !== 0) {
3604
- obj.namespace = deploymentNamespaceToJSON(message.namespace);
3605
- }
3606
3578
  if (message.name !== "") {
3607
3579
  obj.name = message.name;
3608
3580
  }
@@ -3616,7 +3588,6 @@ var AppGetByDeploymentNameRequest = {
3616
3588
  },
3617
3589
  fromPartial(object) {
3618
3590
  const message = createBaseAppGetByDeploymentNameRequest();
3619
- message.namespace = object.namespace ?? 0;
3620
3591
  message.name = object.name ?? "";
3621
3592
  message.environmentName = object.environmentName ?? "";
3622
3593
  return message;
@@ -3784,7 +3755,8 @@ function createBaseAppGetLogsRequest() {
3784
3755
  inputId: "",
3785
3756
  taskId: "",
3786
3757
  functionCallId: "",
3787
- fileDescriptor: 0
3758
+ fileDescriptor: 0,
3759
+ sandboxId: ""
3788
3760
  };
3789
3761
  }
3790
3762
  var AppGetLogsRequest = {
@@ -3813,6 +3785,9 @@ var AppGetLogsRequest = {
3813
3785
  if (message.fileDescriptor !== 0) {
3814
3786
  writer.uint32(64).int32(message.fileDescriptor);
3815
3787
  }
3788
+ if (message.sandboxId !== "") {
3789
+ writer.uint32(82).string(message.sandboxId);
3790
+ }
3816
3791
  return writer;
3817
3792
  },
3818
3793
  decode(input, length) {
@@ -3878,6 +3853,13 @@ var AppGetLogsRequest = {
3878
3853
  message.fileDescriptor = reader.int32();
3879
3854
  continue;
3880
3855
  }
3856
+ case 10: {
3857
+ if (tag !== 82) {
3858
+ break;
3859
+ }
3860
+ message.sandboxId = reader.string();
3861
+ continue;
3862
+ }
3881
3863
  }
3882
3864
  if ((tag & 7) === 4 || tag === 0) {
3883
3865
  break;
@@ -3895,7 +3877,8 @@ var AppGetLogsRequest = {
3895
3877
  inputId: isSet3(object.inputId) ? globalThis.String(object.inputId) : "",
3896
3878
  taskId: isSet3(object.taskId) ? globalThis.String(object.taskId) : "",
3897
3879
  functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
3898
- fileDescriptor: isSet3(object.fileDescriptor) ? fileDescriptorFromJSON(object.fileDescriptor) : 0
3880
+ fileDescriptor: isSet3(object.fileDescriptor) ? fileDescriptorFromJSON(object.fileDescriptor) : 0,
3881
+ sandboxId: isSet3(object.sandboxId) ? globalThis.String(object.sandboxId) : ""
3899
3882
  };
3900
3883
  },
3901
3884
  toJSON(message) {
@@ -3924,6 +3907,9 @@ var AppGetLogsRequest = {
3924
3907
  if (message.fileDescriptor !== 0) {
3925
3908
  obj.fileDescriptor = fileDescriptorToJSON(message.fileDescriptor);
3926
3909
  }
3910
+ if (message.sandboxId !== "") {
3911
+ obj.sandboxId = message.sandboxId;
3912
+ }
3927
3913
  return obj;
3928
3914
  },
3929
3915
  create(base) {
@@ -3939,6 +3925,7 @@ var AppGetLogsRequest = {
3939
3925
  message.taskId = object.taskId ?? "";
3940
3926
  message.functionCallId = object.functionCallId ?? "";
3941
3927
  message.fileDescriptor = object.fileDescriptor ?? 0;
3928
+ message.sandboxId = object.sandboxId ?? "";
3942
3929
  return message;
3943
3930
  }
3944
3931
  };
@@ -6523,7 +6510,14 @@ var BlobCreateRequest = {
6523
6510
  }
6524
6511
  };
6525
6512
  function createBaseBlobCreateResponse() {
6526
- return { blobId: "", uploadUrl: void 0, multipart: void 0 };
6513
+ return {
6514
+ blobId: "",
6515
+ uploadUrl: void 0,
6516
+ multipart: void 0,
6517
+ blobIds: [],
6518
+ uploadUrls: void 0,
6519
+ multiparts: void 0
6520
+ };
6527
6521
  }
6528
6522
  var BlobCreateResponse = {
6529
6523
  encode(message, writer = new BinaryWriter()) {
@@ -6536,6 +6530,15 @@ var BlobCreateResponse = {
6536
6530
  if (message.multipart !== void 0) {
6537
6531
  MultiPartUpload.encode(message.multipart, writer.uint32(26).fork()).join();
6538
6532
  }
6533
+ for (const v of message.blobIds) {
6534
+ writer.uint32(34).string(v);
6535
+ }
6536
+ if (message.uploadUrls !== void 0) {
6537
+ UploadUrlList.encode(message.uploadUrls, writer.uint32(42).fork()).join();
6538
+ }
6539
+ if (message.multiparts !== void 0) {
6540
+ MultiPartUploadList.encode(message.multiparts, writer.uint32(50).fork()).join();
6541
+ }
6539
6542
  return writer;
6540
6543
  },
6541
6544
  decode(input, length) {
@@ -6566,6 +6569,27 @@ var BlobCreateResponse = {
6566
6569
  message.multipart = MultiPartUpload.decode(reader, reader.uint32());
6567
6570
  continue;
6568
6571
  }
6572
+ case 4: {
6573
+ if (tag !== 34) {
6574
+ break;
6575
+ }
6576
+ message.blobIds.push(reader.string());
6577
+ continue;
6578
+ }
6579
+ case 5: {
6580
+ if (tag !== 42) {
6581
+ break;
6582
+ }
6583
+ message.uploadUrls = UploadUrlList.decode(reader, reader.uint32());
6584
+ continue;
6585
+ }
6586
+ case 6: {
6587
+ if (tag !== 50) {
6588
+ break;
6589
+ }
6590
+ message.multiparts = MultiPartUploadList.decode(reader, reader.uint32());
6591
+ continue;
6592
+ }
6569
6593
  }
6570
6594
  if ((tag & 7) === 4 || tag === 0) {
6571
6595
  break;
@@ -6578,7 +6602,10 @@ var BlobCreateResponse = {
6578
6602
  return {
6579
6603
  blobId: isSet3(object.blobId) ? globalThis.String(object.blobId) : "",
6580
6604
  uploadUrl: isSet3(object.uploadUrl) ? globalThis.String(object.uploadUrl) : void 0,
6581
- multipart: isSet3(object.multipart) ? MultiPartUpload.fromJSON(object.multipart) : void 0
6605
+ multipart: isSet3(object.multipart) ? MultiPartUpload.fromJSON(object.multipart) : void 0,
6606
+ blobIds: globalThis.Array.isArray(object?.blobIds) ? object.blobIds.map((e) => globalThis.String(e)) : [],
6607
+ uploadUrls: isSet3(object.uploadUrls) ? UploadUrlList.fromJSON(object.uploadUrls) : void 0,
6608
+ multiparts: isSet3(object.multiparts) ? MultiPartUploadList.fromJSON(object.multiparts) : void 0
6582
6609
  };
6583
6610
  },
6584
6611
  toJSON(message) {
@@ -6592,6 +6619,15 @@ var BlobCreateResponse = {
6592
6619
  if (message.multipart !== void 0) {
6593
6620
  obj.multipart = MultiPartUpload.toJSON(message.multipart);
6594
6621
  }
6622
+ if (message.blobIds?.length) {
6623
+ obj.blobIds = message.blobIds;
6624
+ }
6625
+ if (message.uploadUrls !== void 0) {
6626
+ obj.uploadUrls = UploadUrlList.toJSON(message.uploadUrls);
6627
+ }
6628
+ if (message.multiparts !== void 0) {
6629
+ obj.multiparts = MultiPartUploadList.toJSON(message.multiparts);
6630
+ }
6595
6631
  return obj;
6596
6632
  },
6597
6633
  create(base) {
@@ -6602,6 +6638,9 @@ var BlobCreateResponse = {
6602
6638
  message.blobId = object.blobId ?? "";
6603
6639
  message.uploadUrl = object.uploadUrl ?? void 0;
6604
6640
  message.multipart = object.multipart !== void 0 && object.multipart !== null ? MultiPartUpload.fromPartial(object.multipart) : void 0;
6641
+ message.blobIds = object.blobIds?.map((e) => e) || [];
6642
+ message.uploadUrls = object.uploadUrls !== void 0 && object.uploadUrls !== null ? UploadUrlList.fromPartial(object.uploadUrls) : void 0;
6643
+ message.multiparts = object.multiparts !== void 0 && object.multiparts !== null ? MultiPartUploadList.fromPartial(object.multiparts) : void 0;
6605
6644
  return message;
6606
6645
  }
6607
6646
  };
@@ -7192,7 +7231,7 @@ var ClassCreateResponse = {
7192
7231
  }
7193
7232
  };
7194
7233
  function createBaseClassGetRequest() {
7195
- return { appName: "", objectTag: "", namespace: 0, environmentName: "", onlyClassFunction: false };
7234
+ return { appName: "", objectTag: "", environmentName: "", onlyClassFunction: false };
7196
7235
  }
7197
7236
  var ClassGetRequest = {
7198
7237
  encode(message, writer = new BinaryWriter()) {
@@ -7202,9 +7241,6 @@ var ClassGetRequest = {
7202
7241
  if (message.objectTag !== "") {
7203
7242
  writer.uint32(18).string(message.objectTag);
7204
7243
  }
7205
- if (message.namespace !== 0) {
7206
- writer.uint32(24).int32(message.namespace);
7207
- }
7208
7244
  if (message.environmentName !== "") {
7209
7245
  writer.uint32(34).string(message.environmentName);
7210
7246
  }
@@ -7234,13 +7270,6 @@ var ClassGetRequest = {
7234
7270
  message.objectTag = reader.string();
7235
7271
  continue;
7236
7272
  }
7237
- case 3: {
7238
- if (tag !== 24) {
7239
- break;
7240
- }
7241
- message.namespace = reader.int32();
7242
- continue;
7243
- }
7244
7273
  case 4: {
7245
7274
  if (tag !== 34) {
7246
7275
  break;
@@ -7267,7 +7296,6 @@ var ClassGetRequest = {
7267
7296
  return {
7268
7297
  appName: isSet3(object.appName) ? globalThis.String(object.appName) : "",
7269
7298
  objectTag: isSet3(object.objectTag) ? globalThis.String(object.objectTag) : "",
7270
- namespace: isSet3(object.namespace) ? deploymentNamespaceFromJSON(object.namespace) : 0,
7271
7299
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
7272
7300
  onlyClassFunction: isSet3(object.onlyClassFunction) ? globalThis.Boolean(object.onlyClassFunction) : false
7273
7301
  };
@@ -7280,9 +7308,6 @@ var ClassGetRequest = {
7280
7308
  if (message.objectTag !== "") {
7281
7309
  obj.objectTag = message.objectTag;
7282
7310
  }
7283
- if (message.namespace !== 0) {
7284
- obj.namespace = deploymentNamespaceToJSON(message.namespace);
7285
- }
7286
7311
  if (message.environmentName !== "") {
7287
7312
  obj.environmentName = message.environmentName;
7288
7313
  }
@@ -7298,7 +7323,6 @@ var ClassGetRequest = {
7298
7323
  const message = createBaseClassGetRequest();
7299
7324
  message.appName = object.appName ?? "";
7300
7325
  message.objectTag = object.objectTag ?? "";
7301
- message.namespace = object.namespace ?? 0;
7302
7326
  message.environmentName = object.environmentName ?? "";
7303
7327
  message.onlyClassFunction = object.onlyClassFunction ?? false;
7304
7328
  return message;
@@ -10842,6 +10866,94 @@ var ContainerLogRequest = {
10842
10866
  return message;
10843
10867
  }
10844
10868
  };
10869
+ function createBaseContainerReloadVolumesRequest() {
10870
+ return { taskId: "" };
10871
+ }
10872
+ var ContainerReloadVolumesRequest = {
10873
+ encode(message, writer = new BinaryWriter()) {
10874
+ if (message.taskId !== "") {
10875
+ writer.uint32(10).string(message.taskId);
10876
+ }
10877
+ return writer;
10878
+ },
10879
+ decode(input, length) {
10880
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
10881
+ let end = length === void 0 ? reader.len : reader.pos + length;
10882
+ const message = createBaseContainerReloadVolumesRequest();
10883
+ while (reader.pos < end) {
10884
+ const tag = reader.uint32();
10885
+ switch (tag >>> 3) {
10886
+ case 1: {
10887
+ if (tag !== 10) {
10888
+ break;
10889
+ }
10890
+ message.taskId = reader.string();
10891
+ continue;
10892
+ }
10893
+ }
10894
+ if ((tag & 7) === 4 || tag === 0) {
10895
+ break;
10896
+ }
10897
+ reader.skip(tag & 7);
10898
+ }
10899
+ return message;
10900
+ },
10901
+ fromJSON(object) {
10902
+ return { taskId: isSet3(object.taskId) ? globalThis.String(object.taskId) : "" };
10903
+ },
10904
+ toJSON(message) {
10905
+ const obj = {};
10906
+ if (message.taskId !== "") {
10907
+ obj.taskId = message.taskId;
10908
+ }
10909
+ return obj;
10910
+ },
10911
+ create(base) {
10912
+ return ContainerReloadVolumesRequest.fromPartial(base ?? {});
10913
+ },
10914
+ fromPartial(object) {
10915
+ const message = createBaseContainerReloadVolumesRequest();
10916
+ message.taskId = object.taskId ?? "";
10917
+ return message;
10918
+ }
10919
+ };
10920
+ function createBaseContainerReloadVolumesResponse() {
10921
+ return {};
10922
+ }
10923
+ var ContainerReloadVolumesResponse = {
10924
+ encode(_, writer = new BinaryWriter()) {
10925
+ return writer;
10926
+ },
10927
+ decode(input, length) {
10928
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
10929
+ let end = length === void 0 ? reader.len : reader.pos + length;
10930
+ const message = createBaseContainerReloadVolumesResponse();
10931
+ while (reader.pos < end) {
10932
+ const tag = reader.uint32();
10933
+ switch (tag >>> 3) {
10934
+ }
10935
+ if ((tag & 7) === 4 || tag === 0) {
10936
+ break;
10937
+ }
10938
+ reader.skip(tag & 7);
10939
+ }
10940
+ return message;
10941
+ },
10942
+ fromJSON(_) {
10943
+ return {};
10944
+ },
10945
+ toJSON(_) {
10946
+ const obj = {};
10947
+ return obj;
10948
+ },
10949
+ create(base) {
10950
+ return ContainerReloadVolumesResponse.fromPartial(base ?? {});
10951
+ },
10952
+ fromPartial(_) {
10953
+ const message = createBaseContainerReloadVolumesResponse();
10954
+ return message;
10955
+ }
10956
+ };
10845
10957
  function createBaseContainerStopRequest() {
10846
10958
  return { taskId: "" };
10847
10959
  }
@@ -11586,16 +11698,13 @@ var DictEntry = {
11586
11698
  }
11587
11699
  };
11588
11700
  function createBaseDictGetOrCreateRequest() {
11589
- return { deploymentName: "", namespace: 0, environmentName: "", objectCreationType: 0, data: [] };
11701
+ return { deploymentName: "", environmentName: "", objectCreationType: 0, data: [] };
11590
11702
  }
11591
11703
  var DictGetOrCreateRequest = {
11592
11704
  encode(message, writer = new BinaryWriter()) {
11593
11705
  if (message.deploymentName !== "") {
11594
11706
  writer.uint32(10).string(message.deploymentName);
11595
11707
  }
11596
- if (message.namespace !== 0) {
11597
- writer.uint32(16).int32(message.namespace);
11598
- }
11599
11708
  if (message.environmentName !== "") {
11600
11709
  writer.uint32(26).string(message.environmentName);
11601
11710
  }
@@ -11621,13 +11730,6 @@ var DictGetOrCreateRequest = {
11621
11730
  message.deploymentName = reader.string();
11622
11731
  continue;
11623
11732
  }
11624
- case 2: {
11625
- if (tag !== 16) {
11626
- break;
11627
- }
11628
- message.namespace = reader.int32();
11629
- continue;
11630
- }
11631
11733
  case 3: {
11632
11734
  if (tag !== 26) {
11633
11735
  break;
@@ -11660,7 +11762,6 @@ var DictGetOrCreateRequest = {
11660
11762
  fromJSON(object) {
11661
11763
  return {
11662
11764
  deploymentName: isSet3(object.deploymentName) ? globalThis.String(object.deploymentName) : "",
11663
- namespace: isSet3(object.namespace) ? deploymentNamespaceFromJSON(object.namespace) : 0,
11664
11765
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
11665
11766
  objectCreationType: isSet3(object.objectCreationType) ? objectCreationTypeFromJSON(object.objectCreationType) : 0,
11666
11767
  data: globalThis.Array.isArray(object?.data) ? object.data.map((e) => DictEntry.fromJSON(e)) : []
@@ -11671,9 +11772,6 @@ var DictGetOrCreateRequest = {
11671
11772
  if (message.deploymentName !== "") {
11672
11773
  obj.deploymentName = message.deploymentName;
11673
11774
  }
11674
- if (message.namespace !== 0) {
11675
- obj.namespace = deploymentNamespaceToJSON(message.namespace);
11676
- }
11677
11775
  if (message.environmentName !== "") {
11678
11776
  obj.environmentName = message.environmentName;
11679
11777
  }
@@ -11691,7 +11789,6 @@ var DictGetOrCreateRequest = {
11691
11789
  fromPartial(object) {
11692
11790
  const message = createBaseDictGetOrCreateRequest();
11693
11791
  message.deploymentName = object.deploymentName ?? "";
11694
- message.namespace = object.namespace ?? 0;
11695
11792
  message.environmentName = object.environmentName ?? "";
11696
11793
  message.objectCreationType = object.objectCreationType ?? 0;
11697
11794
  message.data = object.data?.map((e) => DictEntry.fromPartial(e)) || [];
@@ -13708,6 +13805,408 @@ var FilesystemRuntimeOutputBatch = {
13708
13805
  return message;
13709
13806
  }
13710
13807
  };
13808
+ function createBaseFlashContainerDeregisterRequest() {
13809
+ return { serviceName: "" };
13810
+ }
13811
+ var FlashContainerDeregisterRequest = {
13812
+ encode(message, writer = new BinaryWriter()) {
13813
+ if (message.serviceName !== "") {
13814
+ writer.uint32(10).string(message.serviceName);
13815
+ }
13816
+ return writer;
13817
+ },
13818
+ decode(input, length) {
13819
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
13820
+ let end = length === void 0 ? reader.len : reader.pos + length;
13821
+ const message = createBaseFlashContainerDeregisterRequest();
13822
+ while (reader.pos < end) {
13823
+ const tag = reader.uint32();
13824
+ switch (tag >>> 3) {
13825
+ case 1: {
13826
+ if (tag !== 10) {
13827
+ break;
13828
+ }
13829
+ message.serviceName = reader.string();
13830
+ continue;
13831
+ }
13832
+ }
13833
+ if ((tag & 7) === 4 || tag === 0) {
13834
+ break;
13835
+ }
13836
+ reader.skip(tag & 7);
13837
+ }
13838
+ return message;
13839
+ },
13840
+ fromJSON(object) {
13841
+ return { serviceName: isSet3(object.serviceName) ? globalThis.String(object.serviceName) : "" };
13842
+ },
13843
+ toJSON(message) {
13844
+ const obj = {};
13845
+ if (message.serviceName !== "") {
13846
+ obj.serviceName = message.serviceName;
13847
+ }
13848
+ return obj;
13849
+ },
13850
+ create(base) {
13851
+ return FlashContainerDeregisterRequest.fromPartial(base ?? {});
13852
+ },
13853
+ fromPartial(object) {
13854
+ const message = createBaseFlashContainerDeregisterRequest();
13855
+ message.serviceName = object.serviceName ?? "";
13856
+ return message;
13857
+ }
13858
+ };
13859
+ function createBaseFlashContainerListRequest() {
13860
+ return { functionId: "" };
13861
+ }
13862
+ var FlashContainerListRequest = {
13863
+ encode(message, writer = new BinaryWriter()) {
13864
+ if (message.functionId !== "") {
13865
+ writer.uint32(10).string(message.functionId);
13866
+ }
13867
+ return writer;
13868
+ },
13869
+ decode(input, length) {
13870
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
13871
+ let end = length === void 0 ? reader.len : reader.pos + length;
13872
+ const message = createBaseFlashContainerListRequest();
13873
+ while (reader.pos < end) {
13874
+ const tag = reader.uint32();
13875
+ switch (tag >>> 3) {
13876
+ case 1: {
13877
+ if (tag !== 10) {
13878
+ break;
13879
+ }
13880
+ message.functionId = reader.string();
13881
+ continue;
13882
+ }
13883
+ }
13884
+ if ((tag & 7) === 4 || tag === 0) {
13885
+ break;
13886
+ }
13887
+ reader.skip(tag & 7);
13888
+ }
13889
+ return message;
13890
+ },
13891
+ fromJSON(object) {
13892
+ return { functionId: isSet3(object.functionId) ? globalThis.String(object.functionId) : "" };
13893
+ },
13894
+ toJSON(message) {
13895
+ const obj = {};
13896
+ if (message.functionId !== "") {
13897
+ obj.functionId = message.functionId;
13898
+ }
13899
+ return obj;
13900
+ },
13901
+ create(base) {
13902
+ return FlashContainerListRequest.fromPartial(base ?? {});
13903
+ },
13904
+ fromPartial(object) {
13905
+ const message = createBaseFlashContainerListRequest();
13906
+ message.functionId = object.functionId ?? "";
13907
+ return message;
13908
+ }
13909
+ };
13910
+ function createBaseFlashContainerListResponse() {
13911
+ return { containers: [] };
13912
+ }
13913
+ var FlashContainerListResponse = {
13914
+ encode(message, writer = new BinaryWriter()) {
13915
+ for (const v of message.containers) {
13916
+ FlashContainerListResponse_Container.encode(v, writer.uint32(10).fork()).join();
13917
+ }
13918
+ return writer;
13919
+ },
13920
+ decode(input, length) {
13921
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
13922
+ let end = length === void 0 ? reader.len : reader.pos + length;
13923
+ const message = createBaseFlashContainerListResponse();
13924
+ while (reader.pos < end) {
13925
+ const tag = reader.uint32();
13926
+ switch (tag >>> 3) {
13927
+ case 1: {
13928
+ if (tag !== 10) {
13929
+ break;
13930
+ }
13931
+ message.containers.push(FlashContainerListResponse_Container.decode(reader, reader.uint32()));
13932
+ continue;
13933
+ }
13934
+ }
13935
+ if ((tag & 7) === 4 || tag === 0) {
13936
+ break;
13937
+ }
13938
+ reader.skip(tag & 7);
13939
+ }
13940
+ return message;
13941
+ },
13942
+ fromJSON(object) {
13943
+ return {
13944
+ containers: globalThis.Array.isArray(object?.containers) ? object.containers.map((e) => FlashContainerListResponse_Container.fromJSON(e)) : []
13945
+ };
13946
+ },
13947
+ toJSON(message) {
13948
+ const obj = {};
13949
+ if (message.containers?.length) {
13950
+ obj.containers = message.containers.map((e) => FlashContainerListResponse_Container.toJSON(e));
13951
+ }
13952
+ return obj;
13953
+ },
13954
+ create(base) {
13955
+ return FlashContainerListResponse.fromPartial(base ?? {});
13956
+ },
13957
+ fromPartial(object) {
13958
+ const message = createBaseFlashContainerListResponse();
13959
+ message.containers = object.containers?.map((e) => FlashContainerListResponse_Container.fromPartial(e)) || [];
13960
+ return message;
13961
+ }
13962
+ };
13963
+ function createBaseFlashContainerListResponse_Container() {
13964
+ return { taskId: "", host: "", port: 0 };
13965
+ }
13966
+ var FlashContainerListResponse_Container = {
13967
+ encode(message, writer = new BinaryWriter()) {
13968
+ if (message.taskId !== "") {
13969
+ writer.uint32(10).string(message.taskId);
13970
+ }
13971
+ if (message.host !== "") {
13972
+ writer.uint32(18).string(message.host);
13973
+ }
13974
+ if (message.port !== 0) {
13975
+ writer.uint32(24).uint32(message.port);
13976
+ }
13977
+ return writer;
13978
+ },
13979
+ decode(input, length) {
13980
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
13981
+ let end = length === void 0 ? reader.len : reader.pos + length;
13982
+ const message = createBaseFlashContainerListResponse_Container();
13983
+ while (reader.pos < end) {
13984
+ const tag = reader.uint32();
13985
+ switch (tag >>> 3) {
13986
+ case 1: {
13987
+ if (tag !== 10) {
13988
+ break;
13989
+ }
13990
+ message.taskId = reader.string();
13991
+ continue;
13992
+ }
13993
+ case 2: {
13994
+ if (tag !== 18) {
13995
+ break;
13996
+ }
13997
+ message.host = reader.string();
13998
+ continue;
13999
+ }
14000
+ case 3: {
14001
+ if (tag !== 24) {
14002
+ break;
14003
+ }
14004
+ message.port = reader.uint32();
14005
+ continue;
14006
+ }
14007
+ }
14008
+ if ((tag & 7) === 4 || tag === 0) {
14009
+ break;
14010
+ }
14011
+ reader.skip(tag & 7);
14012
+ }
14013
+ return message;
14014
+ },
14015
+ fromJSON(object) {
14016
+ return {
14017
+ taskId: isSet3(object.taskId) ? globalThis.String(object.taskId) : "",
14018
+ host: isSet3(object.host) ? globalThis.String(object.host) : "",
14019
+ port: isSet3(object.port) ? globalThis.Number(object.port) : 0
14020
+ };
14021
+ },
14022
+ toJSON(message) {
14023
+ const obj = {};
14024
+ if (message.taskId !== "") {
14025
+ obj.taskId = message.taskId;
14026
+ }
14027
+ if (message.host !== "") {
14028
+ obj.host = message.host;
14029
+ }
14030
+ if (message.port !== 0) {
14031
+ obj.port = Math.round(message.port);
14032
+ }
14033
+ return obj;
14034
+ },
14035
+ create(base) {
14036
+ return FlashContainerListResponse_Container.fromPartial(base ?? {});
14037
+ },
14038
+ fromPartial(object) {
14039
+ const message = createBaseFlashContainerListResponse_Container();
14040
+ message.taskId = object.taskId ?? "";
14041
+ message.host = object.host ?? "";
14042
+ message.port = object.port ?? 0;
14043
+ return message;
14044
+ }
14045
+ };
14046
+ function createBaseFlashContainerRegisterRequest() {
14047
+ return { serviceName: "", priority: 0, weight: 0, host: "", port: 0 };
14048
+ }
14049
+ var FlashContainerRegisterRequest = {
14050
+ encode(message, writer = new BinaryWriter()) {
14051
+ if (message.serviceName !== "") {
14052
+ writer.uint32(10).string(message.serviceName);
14053
+ }
14054
+ if (message.priority !== 0) {
14055
+ writer.uint32(16).uint32(message.priority);
14056
+ }
14057
+ if (message.weight !== 0) {
14058
+ writer.uint32(24).uint32(message.weight);
14059
+ }
14060
+ if (message.host !== "") {
14061
+ writer.uint32(34).string(message.host);
14062
+ }
14063
+ if (message.port !== 0) {
14064
+ writer.uint32(40).uint32(message.port);
14065
+ }
14066
+ return writer;
14067
+ },
14068
+ decode(input, length) {
14069
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
14070
+ let end = length === void 0 ? reader.len : reader.pos + length;
14071
+ const message = createBaseFlashContainerRegisterRequest();
14072
+ while (reader.pos < end) {
14073
+ const tag = reader.uint32();
14074
+ switch (tag >>> 3) {
14075
+ case 1: {
14076
+ if (tag !== 10) {
14077
+ break;
14078
+ }
14079
+ message.serviceName = reader.string();
14080
+ continue;
14081
+ }
14082
+ case 2: {
14083
+ if (tag !== 16) {
14084
+ break;
14085
+ }
14086
+ message.priority = reader.uint32();
14087
+ continue;
14088
+ }
14089
+ case 3: {
14090
+ if (tag !== 24) {
14091
+ break;
14092
+ }
14093
+ message.weight = reader.uint32();
14094
+ continue;
14095
+ }
14096
+ case 4: {
14097
+ if (tag !== 34) {
14098
+ break;
14099
+ }
14100
+ message.host = reader.string();
14101
+ continue;
14102
+ }
14103
+ case 5: {
14104
+ if (tag !== 40) {
14105
+ break;
14106
+ }
14107
+ message.port = reader.uint32();
14108
+ continue;
14109
+ }
14110
+ }
14111
+ if ((tag & 7) === 4 || tag === 0) {
14112
+ break;
14113
+ }
14114
+ reader.skip(tag & 7);
14115
+ }
14116
+ return message;
14117
+ },
14118
+ fromJSON(object) {
14119
+ return {
14120
+ serviceName: isSet3(object.serviceName) ? globalThis.String(object.serviceName) : "",
14121
+ priority: isSet3(object.priority) ? globalThis.Number(object.priority) : 0,
14122
+ weight: isSet3(object.weight) ? globalThis.Number(object.weight) : 0,
14123
+ host: isSet3(object.host) ? globalThis.String(object.host) : "",
14124
+ port: isSet3(object.port) ? globalThis.Number(object.port) : 0
14125
+ };
14126
+ },
14127
+ toJSON(message) {
14128
+ const obj = {};
14129
+ if (message.serviceName !== "") {
14130
+ obj.serviceName = message.serviceName;
14131
+ }
14132
+ if (message.priority !== 0) {
14133
+ obj.priority = Math.round(message.priority);
14134
+ }
14135
+ if (message.weight !== 0) {
14136
+ obj.weight = Math.round(message.weight);
14137
+ }
14138
+ if (message.host !== "") {
14139
+ obj.host = message.host;
14140
+ }
14141
+ if (message.port !== 0) {
14142
+ obj.port = Math.round(message.port);
14143
+ }
14144
+ return obj;
14145
+ },
14146
+ create(base) {
14147
+ return FlashContainerRegisterRequest.fromPartial(base ?? {});
14148
+ },
14149
+ fromPartial(object) {
14150
+ const message = createBaseFlashContainerRegisterRequest();
14151
+ message.serviceName = object.serviceName ?? "";
14152
+ message.priority = object.priority ?? 0;
14153
+ message.weight = object.weight ?? 0;
14154
+ message.host = object.host ?? "";
14155
+ message.port = object.port ?? 0;
14156
+ return message;
14157
+ }
14158
+ };
14159
+ function createBaseFlashContainerRegisterResponse() {
14160
+ return { url: "" };
14161
+ }
14162
+ var FlashContainerRegisterResponse = {
14163
+ encode(message, writer = new BinaryWriter()) {
14164
+ if (message.url !== "") {
14165
+ writer.uint32(10).string(message.url);
14166
+ }
14167
+ return writer;
14168
+ },
14169
+ decode(input, length) {
14170
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
14171
+ let end = length === void 0 ? reader.len : reader.pos + length;
14172
+ const message = createBaseFlashContainerRegisterResponse();
14173
+ while (reader.pos < end) {
14174
+ const tag = reader.uint32();
14175
+ switch (tag >>> 3) {
14176
+ case 1: {
14177
+ if (tag !== 10) {
14178
+ break;
14179
+ }
14180
+ message.url = reader.string();
14181
+ continue;
14182
+ }
14183
+ }
14184
+ if ((tag & 7) === 4 || tag === 0) {
14185
+ break;
14186
+ }
14187
+ reader.skip(tag & 7);
14188
+ }
14189
+ return message;
14190
+ },
14191
+ fromJSON(object) {
14192
+ return { url: isSet3(object.url) ? globalThis.String(object.url) : "" };
14193
+ },
14194
+ toJSON(message) {
14195
+ const obj = {};
14196
+ if (message.url !== "") {
14197
+ obj.url = message.url;
14198
+ }
14199
+ return obj;
14200
+ },
14201
+ create(base) {
14202
+ return FlashContainerRegisterResponse.fromPartial(base ?? {});
14203
+ },
14204
+ fromPartial(object) {
14205
+ const message = createBaseFlashContainerRegisterResponse();
14206
+ message.url = object.url ?? "";
14207
+ return message;
14208
+ }
14209
+ };
13711
14210
  function createBaseFunctionMessage() {
13712
14211
  return {
13713
14212
  moduleName: "",
@@ -13778,7 +14277,8 @@ function createBaseFunctionMessage() {
13778
14277
  autoscalerSettings: void 0,
13779
14278
  functionSchema: void 0,
13780
14279
  experimentalOptions: {},
13781
- mountClientDependencies: false
14280
+ mountClientDependencies: false,
14281
+ flashServiceUrls: []
13782
14282
  };
13783
14283
  }
13784
14284
  var FunctionMessage = {
@@ -13990,6 +14490,9 @@ var FunctionMessage = {
13990
14490
  if (message.mountClientDependencies !== false) {
13991
14491
  writer.uint32(656).bool(message.mountClientDependencies);
13992
14492
  }
14493
+ for (const v of message.flashServiceUrls) {
14494
+ writer.uint32(666).string(v);
14495
+ }
13993
14496
  return writer;
13994
14497
  },
13995
14498
  decode(input, length) {
@@ -14488,6 +14991,13 @@ var FunctionMessage = {
14488
14991
  message.mountClientDependencies = reader.bool();
14489
14992
  continue;
14490
14993
  }
14994
+ case 83: {
14995
+ if (tag !== 666) {
14996
+ break;
14997
+ }
14998
+ message.flashServiceUrls.push(reader.string());
14999
+ continue;
15000
+ }
14491
15001
  }
14492
15002
  if ((tag & 7) === 4 || tag === 0) {
14493
15003
  break;
@@ -14572,7 +15082,8 @@ var FunctionMessage = {
14572
15082
  acc[key] = String(value);
14573
15083
  return acc;
14574
15084
  }, {}) : {},
14575
- mountClientDependencies: isSet3(object.mountClientDependencies) ? globalThis.Boolean(object.mountClientDependencies) : false
15085
+ mountClientDependencies: isSet3(object.mountClientDependencies) ? globalThis.Boolean(object.mountClientDependencies) : false,
15086
+ flashServiceUrls: globalThis.Array.isArray(object?.flashServiceUrls) ? object.flashServiceUrls.map((e) => globalThis.String(e)) : []
14576
15087
  };
14577
15088
  },
14578
15089
  toJSON(message) {
@@ -14796,6 +15307,9 @@ var FunctionMessage = {
14796
15307
  if (message.mountClientDependencies !== false) {
14797
15308
  obj.mountClientDependencies = message.mountClientDependencies;
14798
15309
  }
15310
+ if (message.flashServiceUrls?.length) {
15311
+ obj.flashServiceUrls = message.flashServiceUrls;
15312
+ }
14799
15313
  return obj;
14800
15314
  },
14801
15315
  create(base) {
@@ -14885,6 +15399,7 @@ var FunctionMessage = {
14885
15399
  {}
14886
15400
  );
14887
15401
  message.mountClientDependencies = object.mountClientDependencies ?? false;
15402
+ message.flashServiceUrls = object.flashServiceUrls?.map((e) => e) || [];
14888
15403
  return message;
14889
15404
  }
14890
15405
  };
@@ -16205,7 +16720,8 @@ function createBaseFunctionData() {
16205
16720
  runtimePerfRecord: false,
16206
16721
  autoscalerSettings: void 0,
16207
16722
  functionSchema: void 0,
16208
- experimentalOptions: {}
16723
+ experimentalOptions: {},
16724
+ flashServiceUrls: []
16209
16725
  };
16210
16726
  }
16211
16727
  var FunctionData = {
@@ -16306,6 +16822,9 @@ var FunctionData = {
16306
16822
  Object.entries(message.experimentalOptions).forEach(([key, value]) => {
16307
16823
  FunctionData_ExperimentalOptionsEntry.encode({ key, value }, writer.uint32(266).fork()).join();
16308
16824
  });
16825
+ for (const v of message.flashServiceUrls) {
16826
+ writer.uint32(274).string(v);
16827
+ }
16309
16828
  return writer;
16310
16829
  },
16311
16830
  decode(input, length) {
@@ -16545,6 +17064,13 @@ var FunctionData = {
16545
17064
  }
16546
17065
  continue;
16547
17066
  }
17067
+ case 34: {
17068
+ if (tag !== 274) {
17069
+ break;
17070
+ }
17071
+ message.flashServiceUrls.push(reader.string());
17072
+ continue;
17073
+ }
16548
17074
  }
16549
17075
  if ((tag & 7) === 4 || tag === 0) {
16550
17076
  break;
@@ -16592,7 +17118,8 @@ var FunctionData = {
16592
17118
  experimentalOptions: isObject2(object.experimentalOptions) ? Object.entries(object.experimentalOptions).reduce((acc, [key, value]) => {
16593
17119
  acc[key] = String(value);
16594
17120
  return acc;
16595
- }, {}) : {}
17121
+ }, {}) : {},
17122
+ flashServiceUrls: globalThis.Array.isArray(object?.flashServiceUrls) ? object.flashServiceUrls.map((e) => globalThis.String(e)) : []
16596
17123
  };
16597
17124
  },
16598
17125
  toJSON(message) {
@@ -16705,6 +17232,9 @@ var FunctionData = {
16705
17232
  });
16706
17233
  }
16707
17234
  }
17235
+ if (message.flashServiceUrls?.length) {
17236
+ obj.flashServiceUrls = message.flashServiceUrls;
17237
+ }
16708
17238
  return obj;
16709
17239
  },
16710
17240
  create(base) {
@@ -16757,6 +17287,7 @@ var FunctionData = {
16757
17287
  },
16758
17288
  {}
16759
17289
  );
17290
+ message.flashServiceUrls = object.flashServiceUrls?.map((e) => e) || [];
16760
17291
  return message;
16761
17292
  }
16762
17293
  };
@@ -18041,7 +18572,7 @@ var FunctionGetOutputsResponse = {
18041
18572
  }
18042
18573
  };
18043
18574
  function createBaseFunctionGetRequest() {
18044
- return { appName: "", objectTag: "", namespace: 0, environmentName: "" };
18575
+ return { appName: "", objectTag: "", environmentName: "" };
18045
18576
  }
18046
18577
  var FunctionGetRequest = {
18047
18578
  encode(message, writer = new BinaryWriter()) {
@@ -18051,9 +18582,6 @@ var FunctionGetRequest = {
18051
18582
  if (message.objectTag !== "") {
18052
18583
  writer.uint32(18).string(message.objectTag);
18053
18584
  }
18054
- if (message.namespace !== 0) {
18055
- writer.uint32(24).int32(message.namespace);
18056
- }
18057
18585
  if (message.environmentName !== "") {
18058
18586
  writer.uint32(34).string(message.environmentName);
18059
18587
  }
@@ -18080,13 +18608,6 @@ var FunctionGetRequest = {
18080
18608
  message.objectTag = reader.string();
18081
18609
  continue;
18082
18610
  }
18083
- case 3: {
18084
- if (tag !== 24) {
18085
- break;
18086
- }
18087
- message.namespace = reader.int32();
18088
- continue;
18089
- }
18090
18611
  case 4: {
18091
18612
  if (tag !== 34) {
18092
18613
  break;
@@ -18106,7 +18627,6 @@ var FunctionGetRequest = {
18106
18627
  return {
18107
18628
  appName: isSet3(object.appName) ? globalThis.String(object.appName) : "",
18108
18629
  objectTag: isSet3(object.objectTag) ? globalThis.String(object.objectTag) : "",
18109
- namespace: isSet3(object.namespace) ? deploymentNamespaceFromJSON(object.namespace) : 0,
18110
18630
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : ""
18111
18631
  };
18112
18632
  },
@@ -18118,9 +18638,6 @@ var FunctionGetRequest = {
18118
18638
  if (message.objectTag !== "") {
18119
18639
  obj.objectTag = message.objectTag;
18120
18640
  }
18121
- if (message.namespace !== 0) {
18122
- obj.namespace = deploymentNamespaceToJSON(message.namespace);
18123
- }
18124
18641
  if (message.environmentName !== "") {
18125
18642
  obj.environmentName = message.environmentName;
18126
18643
  }
@@ -18133,7 +18650,6 @@ var FunctionGetRequest = {
18133
18650
  const message = createBaseFunctionGetRequest();
18134
18651
  message.appName = object.appName ?? "";
18135
18652
  message.objectTag = object.objectTag ?? "";
18136
- message.namespace = object.namespace ?? 0;
18137
18653
  message.environmentName = object.environmentName ?? "";
18138
18654
  return message;
18139
18655
  }
@@ -18352,7 +18868,9 @@ function createBaseFunctionHandleMetadata() {
18352
18868
  classParameterInfo: void 0,
18353
18869
  methodHandleMetadata: {},
18354
18870
  functionSchema: void 0,
18355
- inputPlaneUrl: void 0
18871
+ inputPlaneUrl: void 0,
18872
+ inputPlaneRegion: void 0,
18873
+ maxObjectSizeBytes: void 0
18356
18874
  };
18357
18875
  }
18358
18876
  var FunctionHandleMetadata = {
@@ -18390,6 +18908,12 @@ var FunctionHandleMetadata = {
18390
18908
  if (message.inputPlaneUrl !== void 0) {
18391
18909
  writer.uint32(370).string(message.inputPlaneUrl);
18392
18910
  }
18911
+ if (message.inputPlaneRegion !== void 0) {
18912
+ writer.uint32(378).string(message.inputPlaneRegion);
18913
+ }
18914
+ if (message.maxObjectSizeBytes !== void 0) {
18915
+ writer.uint32(384).uint64(message.maxObjectSizeBytes);
18916
+ }
18393
18917
  return writer;
18394
18918
  },
18395
18919
  decode(input, length) {
@@ -18479,6 +19003,20 @@ var FunctionHandleMetadata = {
18479
19003
  message.inputPlaneUrl = reader.string();
18480
19004
  continue;
18481
19005
  }
19006
+ case 47: {
19007
+ if (tag !== 378) {
19008
+ break;
19009
+ }
19010
+ message.inputPlaneRegion = reader.string();
19011
+ continue;
19012
+ }
19013
+ case 48: {
19014
+ if (tag !== 384) {
19015
+ break;
19016
+ }
19017
+ message.maxObjectSizeBytes = longToNumber(reader.uint64());
19018
+ continue;
19019
+ }
18482
19020
  }
18483
19021
  if ((tag & 7) === 4 || tag === 0) {
18484
19022
  break;
@@ -18505,7 +19043,9 @@ var FunctionHandleMetadata = {
18505
19043
  {}
18506
19044
  ) : {},
18507
19045
  functionSchema: isSet3(object.functionSchema) ? FunctionSchema.fromJSON(object.functionSchema) : void 0,
18508
- inputPlaneUrl: isSet3(object.inputPlaneUrl) ? globalThis.String(object.inputPlaneUrl) : void 0
19046
+ inputPlaneUrl: isSet3(object.inputPlaneUrl) ? globalThis.String(object.inputPlaneUrl) : void 0,
19047
+ inputPlaneRegion: isSet3(object.inputPlaneRegion) ? globalThis.String(object.inputPlaneRegion) : void 0,
19048
+ maxObjectSizeBytes: isSet3(object.maxObjectSizeBytes) ? globalThis.Number(object.maxObjectSizeBytes) : void 0
18509
19049
  };
18510
19050
  },
18511
19051
  toJSON(message) {
@@ -18549,6 +19089,12 @@ var FunctionHandleMetadata = {
18549
19089
  if (message.inputPlaneUrl !== void 0) {
18550
19090
  obj.inputPlaneUrl = message.inputPlaneUrl;
18551
19091
  }
19092
+ if (message.inputPlaneRegion !== void 0) {
19093
+ obj.inputPlaneRegion = message.inputPlaneRegion;
19094
+ }
19095
+ if (message.maxObjectSizeBytes !== void 0) {
19096
+ obj.maxObjectSizeBytes = Math.round(message.maxObjectSizeBytes);
19097
+ }
18552
19098
  return obj;
18553
19099
  },
18554
19100
  create(base) {
@@ -18572,6 +19118,8 @@ var FunctionHandleMetadata = {
18572
19118
  }, {});
18573
19119
  message.functionSchema = object.functionSchema !== void 0 && object.functionSchema !== null ? FunctionSchema.fromPartial(object.functionSchema) : void 0;
18574
19120
  message.inputPlaneUrl = object.inputPlaneUrl ?? void 0;
19121
+ message.inputPlaneRegion = object.inputPlaneRegion ?? void 0;
19122
+ message.maxObjectSizeBytes = object.maxObjectSizeBytes ?? void 0;
18575
19123
  return message;
18576
19124
  }
18577
19125
  };
@@ -19674,7 +20222,7 @@ var FunctionPrecreateResponse = {
19674
20222
  }
19675
20223
  };
19676
20224
  function createBaseFunctionPutInputsItem() {
19677
- return { idx: 0, input: void 0 };
20225
+ return { idx: 0, input: void 0, r2Failed: false, r2LatencyMs: 0 };
19678
20226
  }
19679
20227
  var FunctionPutInputsItem = {
19680
20228
  encode(message, writer = new BinaryWriter()) {
@@ -19684,6 +20232,12 @@ var FunctionPutInputsItem = {
19684
20232
  if (message.input !== void 0) {
19685
20233
  FunctionInput.encode(message.input, writer.uint32(18).fork()).join();
19686
20234
  }
20235
+ if (message.r2Failed !== false) {
20236
+ writer.uint32(24).bool(message.r2Failed);
20237
+ }
20238
+ if (message.r2LatencyMs !== 0) {
20239
+ writer.uint32(32).uint64(message.r2LatencyMs);
20240
+ }
19687
20241
  return writer;
19688
20242
  },
19689
20243
  decode(input, length) {
@@ -19707,6 +20261,20 @@ var FunctionPutInputsItem = {
19707
20261
  message.input = FunctionInput.decode(reader, reader.uint32());
19708
20262
  continue;
19709
20263
  }
20264
+ case 3: {
20265
+ if (tag !== 24) {
20266
+ break;
20267
+ }
20268
+ message.r2Failed = reader.bool();
20269
+ continue;
20270
+ }
20271
+ case 4: {
20272
+ if (tag !== 32) {
20273
+ break;
20274
+ }
20275
+ message.r2LatencyMs = longToNumber(reader.uint64());
20276
+ continue;
20277
+ }
19710
20278
  }
19711
20279
  if ((tag & 7) === 4 || tag === 0) {
19712
20280
  break;
@@ -19718,7 +20286,9 @@ var FunctionPutInputsItem = {
19718
20286
  fromJSON(object) {
19719
20287
  return {
19720
20288
  idx: isSet3(object.idx) ? globalThis.Number(object.idx) : 0,
19721
- input: isSet3(object.input) ? FunctionInput.fromJSON(object.input) : void 0
20289
+ input: isSet3(object.input) ? FunctionInput.fromJSON(object.input) : void 0,
20290
+ r2Failed: isSet3(object.r2Failed) ? globalThis.Boolean(object.r2Failed) : false,
20291
+ r2LatencyMs: isSet3(object.r2LatencyMs) ? globalThis.Number(object.r2LatencyMs) : 0
19722
20292
  };
19723
20293
  },
19724
20294
  toJSON(message) {
@@ -19729,6 +20299,12 @@ var FunctionPutInputsItem = {
19729
20299
  if (message.input !== void 0) {
19730
20300
  obj.input = FunctionInput.toJSON(message.input);
19731
20301
  }
20302
+ if (message.r2Failed !== false) {
20303
+ obj.r2Failed = message.r2Failed;
20304
+ }
20305
+ if (message.r2LatencyMs !== 0) {
20306
+ obj.r2LatencyMs = Math.round(message.r2LatencyMs);
20307
+ }
19732
20308
  return obj;
19733
20309
  },
19734
20310
  create(base) {
@@ -19738,6 +20314,8 @@ var FunctionPutInputsItem = {
19738
20314
  const message = createBaseFunctionPutInputsItem();
19739
20315
  message.idx = object.idx ?? 0;
19740
20316
  message.input = object.input !== void 0 && object.input !== null ? FunctionInput.fromPartial(object.input) : void 0;
20317
+ message.r2Failed = object.r2Failed ?? false;
20318
+ message.r2LatencyMs = object.r2LatencyMs ?? 0;
19741
20319
  return message;
19742
20320
  }
19743
20321
  };
@@ -21128,7 +21706,8 @@ function createBaseImage() {
21128
21706
  buildFunctionGlobals: new Uint8Array(0),
21129
21707
  runtime: "",
21130
21708
  runtimeDebug: false,
21131
- buildFunction: void 0
21709
+ buildFunction: void 0,
21710
+ buildArgs: {}
21132
21711
  };
21133
21712
  }
21134
21713
  var Image = {
@@ -21172,6 +21751,9 @@ var Image = {
21172
21751
  if (message.buildFunction !== void 0) {
21173
21752
  BuildFunction.encode(message.buildFunction, writer.uint32(170).fork()).join();
21174
21753
  }
21754
+ Object.entries(message.buildArgs).forEach(([key, value]) => {
21755
+ Image_BuildArgsEntry.encode({ key, value }, writer.uint32(178).fork()).join();
21756
+ });
21175
21757
  return writer;
21176
21758
  },
21177
21759
  decode(input, length) {
@@ -21272,6 +21854,16 @@ var Image = {
21272
21854
  message.buildFunction = BuildFunction.decode(reader, reader.uint32());
21273
21855
  continue;
21274
21856
  }
21857
+ case 22: {
21858
+ if (tag !== 178) {
21859
+ break;
21860
+ }
21861
+ const entry22 = Image_BuildArgsEntry.decode(reader, reader.uint32());
21862
+ if (entry22.value !== void 0) {
21863
+ message.buildArgs[entry22.key] = entry22.value;
21864
+ }
21865
+ continue;
21866
+ }
21275
21867
  }
21276
21868
  if ((tag & 7) === 4 || tag === 0) {
21277
21869
  break;
@@ -21294,7 +21886,11 @@ var Image = {
21294
21886
  buildFunctionGlobals: isSet3(object.buildFunctionGlobals) ? bytesFromBase64(object.buildFunctionGlobals) : new Uint8Array(0),
21295
21887
  runtime: isSet3(object.runtime) ? globalThis.String(object.runtime) : "",
21296
21888
  runtimeDebug: isSet3(object.runtimeDebug) ? globalThis.Boolean(object.runtimeDebug) : false,
21297
- buildFunction: isSet3(object.buildFunction) ? BuildFunction.fromJSON(object.buildFunction) : void 0
21889
+ buildFunction: isSet3(object.buildFunction) ? BuildFunction.fromJSON(object.buildFunction) : void 0,
21890
+ buildArgs: isObject2(object.buildArgs) ? Object.entries(object.buildArgs).reduce((acc, [key, value]) => {
21891
+ acc[key] = String(value);
21892
+ return acc;
21893
+ }, {}) : {}
21298
21894
  };
21299
21895
  },
21300
21896
  toJSON(message) {
@@ -21338,6 +21934,15 @@ var Image = {
21338
21934
  if (message.buildFunction !== void 0) {
21339
21935
  obj.buildFunction = BuildFunction.toJSON(message.buildFunction);
21340
21936
  }
21937
+ if (message.buildArgs) {
21938
+ const entries = Object.entries(message.buildArgs);
21939
+ if (entries.length > 0) {
21940
+ obj.buildArgs = {};
21941
+ entries.forEach(([k, v]) => {
21942
+ obj.buildArgs[k] = v;
21943
+ });
21944
+ }
21945
+ }
21341
21946
  return obj;
21342
21947
  },
21343
21948
  create(base) {
@@ -21358,6 +21963,83 @@ var Image = {
21358
21963
  message.runtime = object.runtime ?? "";
21359
21964
  message.runtimeDebug = object.runtimeDebug ?? false;
21360
21965
  message.buildFunction = object.buildFunction !== void 0 && object.buildFunction !== null ? BuildFunction.fromPartial(object.buildFunction) : void 0;
21966
+ message.buildArgs = Object.entries(object.buildArgs ?? {}).reduce(
21967
+ (acc, [key, value]) => {
21968
+ if (value !== void 0) {
21969
+ acc[key] = globalThis.String(value);
21970
+ }
21971
+ return acc;
21972
+ },
21973
+ {}
21974
+ );
21975
+ return message;
21976
+ }
21977
+ };
21978
+ function createBaseImage_BuildArgsEntry() {
21979
+ return { key: "", value: "" };
21980
+ }
21981
+ var Image_BuildArgsEntry = {
21982
+ encode(message, writer = new BinaryWriter()) {
21983
+ if (message.key !== "") {
21984
+ writer.uint32(10).string(message.key);
21985
+ }
21986
+ if (message.value !== "") {
21987
+ writer.uint32(18).string(message.value);
21988
+ }
21989
+ return writer;
21990
+ },
21991
+ decode(input, length) {
21992
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
21993
+ let end = length === void 0 ? reader.len : reader.pos + length;
21994
+ const message = createBaseImage_BuildArgsEntry();
21995
+ while (reader.pos < end) {
21996
+ const tag = reader.uint32();
21997
+ switch (tag >>> 3) {
21998
+ case 1: {
21999
+ if (tag !== 10) {
22000
+ break;
22001
+ }
22002
+ message.key = reader.string();
22003
+ continue;
22004
+ }
22005
+ case 2: {
22006
+ if (tag !== 18) {
22007
+ break;
22008
+ }
22009
+ message.value = reader.string();
22010
+ continue;
22011
+ }
22012
+ }
22013
+ if ((tag & 7) === 4 || tag === 0) {
22014
+ break;
22015
+ }
22016
+ reader.skip(tag & 7);
22017
+ }
22018
+ return message;
22019
+ },
22020
+ fromJSON(object) {
22021
+ return {
22022
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
22023
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
22024
+ };
22025
+ },
22026
+ toJSON(message) {
22027
+ const obj = {};
22028
+ if (message.key !== "") {
22029
+ obj.key = message.key;
22030
+ }
22031
+ if (message.value !== "") {
22032
+ obj.value = message.value;
22033
+ }
22034
+ return obj;
22035
+ },
22036
+ create(base) {
22037
+ return Image_BuildArgsEntry.fromPartial(base ?? {});
22038
+ },
22039
+ fromPartial(object) {
22040
+ const message = createBaseImage_BuildArgsEntry();
22041
+ message.key = object.key ?? "";
22042
+ message.value = object.value ?? "";
21361
22043
  return message;
21362
22044
  }
21363
22045
  };
@@ -23324,6 +24006,59 @@ var MultiPartUpload = {
23324
24006
  return message;
23325
24007
  }
23326
24008
  };
24009
+ function createBaseMultiPartUploadList() {
24010
+ return { items: [] };
24011
+ }
24012
+ var MultiPartUploadList = {
24013
+ encode(message, writer = new BinaryWriter()) {
24014
+ for (const v of message.items) {
24015
+ MultiPartUpload.encode(v, writer.uint32(10).fork()).join();
24016
+ }
24017
+ return writer;
24018
+ },
24019
+ decode(input, length) {
24020
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24021
+ let end = length === void 0 ? reader.len : reader.pos + length;
24022
+ const message = createBaseMultiPartUploadList();
24023
+ while (reader.pos < end) {
24024
+ const tag = reader.uint32();
24025
+ switch (tag >>> 3) {
24026
+ case 1: {
24027
+ if (tag !== 10) {
24028
+ break;
24029
+ }
24030
+ message.items.push(MultiPartUpload.decode(reader, reader.uint32()));
24031
+ continue;
24032
+ }
24033
+ }
24034
+ if ((tag & 7) === 4 || tag === 0) {
24035
+ break;
24036
+ }
24037
+ reader.skip(tag & 7);
24038
+ }
24039
+ return message;
24040
+ },
24041
+ fromJSON(object) {
24042
+ return {
24043
+ items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => MultiPartUpload.fromJSON(e)) : []
24044
+ };
24045
+ },
24046
+ toJSON(message) {
24047
+ const obj = {};
24048
+ if (message.items?.length) {
24049
+ obj.items = message.items.map((e) => MultiPartUpload.toJSON(e));
24050
+ }
24051
+ return obj;
24052
+ },
24053
+ create(base) {
24054
+ return MultiPartUploadList.fromPartial(base ?? {});
24055
+ },
24056
+ fromPartial(object) {
24057
+ const message = createBaseMultiPartUploadList();
24058
+ message.items = object.items?.map((e) => MultiPartUpload.fromPartial(e)) || [];
24059
+ return message;
24060
+ }
24061
+ };
23327
24062
  function createBaseNetworkAccess() {
23328
24063
  return { networkAccessType: 0, allowedCidrs: [] };
23329
24064
  }
@@ -24905,16 +25640,13 @@ var ProxyDeleteRequest = {
24905
25640
  }
24906
25641
  };
24907
25642
  function createBaseProxyGetOrCreateRequest() {
24908
- return { deploymentName: "", namespace: 0, environmentName: "", objectCreationType: 0 };
25643
+ return { deploymentName: "", environmentName: "", objectCreationType: 0 };
24909
25644
  }
24910
25645
  var ProxyGetOrCreateRequest = {
24911
25646
  encode(message, writer = new BinaryWriter()) {
24912
25647
  if (message.deploymentName !== "") {
24913
25648
  writer.uint32(10).string(message.deploymentName);
24914
25649
  }
24915
- if (message.namespace !== 0) {
24916
- writer.uint32(16).int32(message.namespace);
24917
- }
24918
25650
  if (message.environmentName !== "") {
24919
25651
  writer.uint32(26).string(message.environmentName);
24920
25652
  }
@@ -24937,13 +25669,6 @@ var ProxyGetOrCreateRequest = {
24937
25669
  message.deploymentName = reader.string();
24938
25670
  continue;
24939
25671
  }
24940
- case 2: {
24941
- if (tag !== 16) {
24942
- break;
24943
- }
24944
- message.namespace = reader.int32();
24945
- continue;
24946
- }
24947
25672
  case 3: {
24948
25673
  if (tag !== 26) {
24949
25674
  break;
@@ -24969,7 +25694,6 @@ var ProxyGetOrCreateRequest = {
24969
25694
  fromJSON(object) {
24970
25695
  return {
24971
25696
  deploymentName: isSet3(object.deploymentName) ? globalThis.String(object.deploymentName) : "",
24972
- namespace: isSet3(object.namespace) ? deploymentNamespaceFromJSON(object.namespace) : 0,
24973
25697
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
24974
25698
  objectCreationType: isSet3(object.objectCreationType) ? objectCreationTypeFromJSON(object.objectCreationType) : 0
24975
25699
  };
@@ -24979,9 +25703,6 @@ var ProxyGetOrCreateRequest = {
24979
25703
  if (message.deploymentName !== "") {
24980
25704
  obj.deploymentName = message.deploymentName;
24981
25705
  }
24982
- if (message.namespace !== 0) {
24983
- obj.namespace = deploymentNamespaceToJSON(message.namespace);
24984
- }
24985
25706
  if (message.environmentName !== "") {
24986
25707
  obj.environmentName = message.environmentName;
24987
25708
  }
@@ -24996,7 +25717,6 @@ var ProxyGetOrCreateRequest = {
24996
25717
  fromPartial(object) {
24997
25718
  const message = createBaseProxyGetOrCreateRequest();
24998
25719
  message.deploymentName = object.deploymentName ?? "";
24999
- message.namespace = object.namespace ?? 0;
25000
25720
  message.environmentName = object.environmentName ?? "";
25001
25721
  message.objectCreationType = object.objectCreationType ?? 0;
25002
25722
  return message;
@@ -25509,16 +26229,13 @@ var QueueDeleteRequest = {
25509
26229
  }
25510
26230
  };
25511
26231
  function createBaseQueueGetOrCreateRequest() {
25512
- return { deploymentName: "", namespace: 0, environmentName: "", objectCreationType: 0 };
26232
+ return { deploymentName: "", environmentName: "", objectCreationType: 0 };
25513
26233
  }
25514
26234
  var QueueGetOrCreateRequest = {
25515
26235
  encode(message, writer = new BinaryWriter()) {
25516
26236
  if (message.deploymentName !== "") {
25517
26237
  writer.uint32(10).string(message.deploymentName);
25518
26238
  }
25519
- if (message.namespace !== 0) {
25520
- writer.uint32(16).int32(message.namespace);
25521
- }
25522
26239
  if (message.environmentName !== "") {
25523
26240
  writer.uint32(26).string(message.environmentName);
25524
26241
  }
@@ -25541,13 +26258,6 @@ var QueueGetOrCreateRequest = {
25541
26258
  message.deploymentName = reader.string();
25542
26259
  continue;
25543
26260
  }
25544
- case 2: {
25545
- if (tag !== 16) {
25546
- break;
25547
- }
25548
- message.namespace = reader.int32();
25549
- continue;
25550
- }
25551
26261
  case 3: {
25552
26262
  if (tag !== 26) {
25553
26263
  break;
@@ -25573,7 +26283,6 @@ var QueueGetOrCreateRequest = {
25573
26283
  fromJSON(object) {
25574
26284
  return {
25575
26285
  deploymentName: isSet3(object.deploymentName) ? globalThis.String(object.deploymentName) : "",
25576
- namespace: isSet3(object.namespace) ? deploymentNamespaceFromJSON(object.namespace) : 0,
25577
26286
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
25578
26287
  objectCreationType: isSet3(object.objectCreationType) ? objectCreationTypeFromJSON(object.objectCreationType) : 0
25579
26288
  };
@@ -25583,9 +26292,6 @@ var QueueGetOrCreateRequest = {
25583
26292
  if (message.deploymentName !== "") {
25584
26293
  obj.deploymentName = message.deploymentName;
25585
26294
  }
25586
- if (message.namespace !== 0) {
25587
- obj.namespace = deploymentNamespaceToJSON(message.namespace);
25588
- }
25589
26295
  if (message.environmentName !== "") {
25590
26296
  obj.environmentName = message.environmentName;
25591
26297
  }
@@ -25600,7 +26306,6 @@ var QueueGetOrCreateRequest = {
25600
26306
  fromPartial(object) {
25601
26307
  const message = createBaseQueueGetOrCreateRequest();
25602
26308
  message.deploymentName = object.deploymentName ?? "";
25603
- message.namespace = object.namespace ?? 0;
25604
26309
  message.environmentName = object.environmentName ?? "";
25605
26310
  message.objectCreationType = object.objectCreationType ?? 0;
25606
26311
  return message;
@@ -27167,7 +27872,8 @@ function createBaseSandbox() {
27167
27872
  snapshotVersion: void 0,
27168
27873
  cloudProviderStr: "",
27169
27874
  runscRuntimeVersion: void 0,
27170
- runtime: void 0
27875
+ runtime: void 0,
27876
+ verbose: false
27171
27877
  };
27172
27878
  }
27173
27879
  var Sandbox = {
@@ -27250,6 +27956,9 @@ var Sandbox = {
27250
27956
  if (message.runtime !== void 0) {
27251
27957
  writer.uint32(226).string(message.runtime);
27252
27958
  }
27959
+ if (message.verbose !== false) {
27960
+ writer.uint32(232).bool(message.verbose);
27961
+ }
27253
27962
  return writer;
27254
27963
  },
27255
27964
  decode(input, length) {
@@ -27441,6 +28150,13 @@ var Sandbox = {
27441
28150
  message.runtime = reader.string();
27442
28151
  continue;
27443
28152
  }
28153
+ case 29: {
28154
+ if (tag !== 232) {
28155
+ break;
28156
+ }
28157
+ message.verbose = reader.bool();
28158
+ continue;
28159
+ }
27444
28160
  }
27445
28161
  if ((tag & 7) === 4 || tag === 0) {
27446
28162
  break;
@@ -27476,7 +28192,8 @@ var Sandbox = {
27476
28192
  snapshotVersion: isSet3(object.snapshotVersion) ? globalThis.Number(object.snapshotVersion) : void 0,
27477
28193
  cloudProviderStr: isSet3(object.cloudProviderStr) ? globalThis.String(object.cloudProviderStr) : "",
27478
28194
  runscRuntimeVersion: isSet3(object.runscRuntimeVersion) ? globalThis.String(object.runscRuntimeVersion) : void 0,
27479
- runtime: isSet3(object.runtime) ? globalThis.String(object.runtime) : void 0
28195
+ runtime: isSet3(object.runtime) ? globalThis.String(object.runtime) : void 0,
28196
+ verbose: isSet3(object.verbose) ? globalThis.Boolean(object.verbose) : false
27480
28197
  };
27481
28198
  },
27482
28199
  toJSON(message) {
@@ -27559,6 +28276,9 @@ var Sandbox = {
27559
28276
  if (message.runtime !== void 0) {
27560
28277
  obj.runtime = message.runtime;
27561
28278
  }
28279
+ if (message.verbose !== false) {
28280
+ obj.verbose = message.verbose;
28281
+ }
27562
28282
  return obj;
27563
28283
  },
27564
28284
  create(base) {
@@ -27592,6 +28312,7 @@ var Sandbox = {
27592
28312
  message.cloudProviderStr = object.cloudProviderStr ?? "";
27593
28313
  message.runscRuntimeVersion = object.runscRuntimeVersion ?? void 0;
27594
28314
  message.runtime = object.runtime ?? void 0;
28315
+ message.verbose = object.verbose ?? false;
27595
28316
  return message;
27596
28317
  }
27597
28318
  };
@@ -28315,7 +29036,7 @@ var SandboxHandleMetadata = {
28315
29036
  }
28316
29037
  };
28317
29038
  function createBaseSandboxInfo() {
28318
- return { id: "", createdAt: 0, taskInfo: void 0, appId: "" };
29039
+ return { id: "", createdAt: 0, taskInfo: void 0, appId: "", tags: [] };
28319
29040
  }
28320
29041
  var SandboxInfo = {
28321
29042
  encode(message, writer = new BinaryWriter()) {
@@ -28331,6 +29052,9 @@ var SandboxInfo = {
28331
29052
  if (message.appId !== "") {
28332
29053
  writer.uint32(42).string(message.appId);
28333
29054
  }
29055
+ for (const v of message.tags) {
29056
+ SandboxTag.encode(v, writer.uint32(50).fork()).join();
29057
+ }
28334
29058
  return writer;
28335
29059
  },
28336
29060
  decode(input, length) {
@@ -28368,6 +29092,13 @@ var SandboxInfo = {
28368
29092
  message.appId = reader.string();
28369
29093
  continue;
28370
29094
  }
29095
+ case 6: {
29096
+ if (tag !== 50) {
29097
+ break;
29098
+ }
29099
+ message.tags.push(SandboxTag.decode(reader, reader.uint32()));
29100
+ continue;
29101
+ }
28371
29102
  }
28372
29103
  if ((tag & 7) === 4 || tag === 0) {
28373
29104
  break;
@@ -28381,7 +29112,8 @@ var SandboxInfo = {
28381
29112
  id: isSet3(object.id) ? globalThis.String(object.id) : "",
28382
29113
  createdAt: isSet3(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
28383
29114
  taskInfo: isSet3(object.taskInfo) ? TaskInfo.fromJSON(object.taskInfo) : void 0,
28384
- appId: isSet3(object.appId) ? globalThis.String(object.appId) : ""
29115
+ appId: isSet3(object.appId) ? globalThis.String(object.appId) : "",
29116
+ tags: globalThis.Array.isArray(object?.tags) ? object.tags.map((e) => SandboxTag.fromJSON(e)) : []
28385
29117
  };
28386
29118
  },
28387
29119
  toJSON(message) {
@@ -28398,6 +29130,9 @@ var SandboxInfo = {
28398
29130
  if (message.appId !== "") {
28399
29131
  obj.appId = message.appId;
28400
29132
  }
29133
+ if (message.tags?.length) {
29134
+ obj.tags = message.tags.map((e) => SandboxTag.toJSON(e));
29135
+ }
28401
29136
  return obj;
28402
29137
  },
28403
29138
  create(base) {
@@ -28409,6 +29144,7 @@ var SandboxInfo = {
28409
29144
  message.createdAt = object.createdAt ?? 0;
28410
29145
  message.taskInfo = object.taskInfo !== void 0 && object.taskInfo !== null ? TaskInfo.fromPartial(object.taskInfo) : void 0;
28411
29146
  message.appId = object.appId ?? "";
29147
+ message.tags = object.tags?.map((e) => SandboxTag.fromPartial(e)) || [];
28412
29148
  return message;
28413
29149
  }
28414
29150
  };
@@ -30090,24 +30826,13 @@ var SecretDeleteRequest = {
30090
30826
  }
30091
30827
  };
30092
30828
  function createBaseSecretGetOrCreateRequest() {
30093
- return {
30094
- deploymentName: "",
30095
- namespace: 0,
30096
- environmentName: "",
30097
- objectCreationType: 0,
30098
- envDict: {},
30099
- appId: "",
30100
- requiredKeys: []
30101
- };
30829
+ return { deploymentName: "", environmentName: "", objectCreationType: 0, envDict: {}, appId: "", requiredKeys: [] };
30102
30830
  }
30103
30831
  var SecretGetOrCreateRequest = {
30104
30832
  encode(message, writer = new BinaryWriter()) {
30105
30833
  if (message.deploymentName !== "") {
30106
30834
  writer.uint32(10).string(message.deploymentName);
30107
30835
  }
30108
- if (message.namespace !== 0) {
30109
- writer.uint32(16).int32(message.namespace);
30110
- }
30111
30836
  if (message.environmentName !== "") {
30112
30837
  writer.uint32(26).string(message.environmentName);
30113
30838
  }
@@ -30139,13 +30864,6 @@ var SecretGetOrCreateRequest = {
30139
30864
  message.deploymentName = reader.string();
30140
30865
  continue;
30141
30866
  }
30142
- case 2: {
30143
- if (tag !== 16) {
30144
- break;
30145
- }
30146
- message.namespace = reader.int32();
30147
- continue;
30148
- }
30149
30867
  case 3: {
30150
30868
  if (tag !== 26) {
30151
30869
  break;
@@ -30195,7 +30913,6 @@ var SecretGetOrCreateRequest = {
30195
30913
  fromJSON(object) {
30196
30914
  return {
30197
30915
  deploymentName: isSet3(object.deploymentName) ? globalThis.String(object.deploymentName) : "",
30198
- namespace: isSet3(object.namespace) ? deploymentNamespaceFromJSON(object.namespace) : 0,
30199
30916
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
30200
30917
  objectCreationType: isSet3(object.objectCreationType) ? objectCreationTypeFromJSON(object.objectCreationType) : 0,
30201
30918
  envDict: isObject2(object.envDict) ? Object.entries(object.envDict).reduce((acc, [key, value]) => {
@@ -30211,9 +30928,6 @@ var SecretGetOrCreateRequest = {
30211
30928
  if (message.deploymentName !== "") {
30212
30929
  obj.deploymentName = message.deploymentName;
30213
30930
  }
30214
- if (message.namespace !== 0) {
30215
- obj.namespace = deploymentNamespaceToJSON(message.namespace);
30216
- }
30217
30931
  if (message.environmentName !== "") {
30218
30932
  obj.environmentName = message.environmentName;
30219
30933
  }
@@ -30243,7 +30957,6 @@ var SecretGetOrCreateRequest = {
30243
30957
  fromPartial(object) {
30244
30958
  const message = createBaseSecretGetOrCreateRequest();
30245
30959
  message.deploymentName = object.deploymentName ?? "";
30246
- message.namespace = object.namespace ?? 0;
30247
30960
  message.environmentName = object.environmentName ?? "";
30248
30961
  message.objectCreationType = object.objectCreationType ?? 0;
30249
30962
  message.envDict = Object.entries(object.envDict ?? {}).reduce((acc, [key, value]) => {
@@ -30796,16 +31509,13 @@ var SharedVolumeGetFileResponse = {
30796
31509
  }
30797
31510
  };
30798
31511
  function createBaseSharedVolumeGetOrCreateRequest() {
30799
- return { deploymentName: "", namespace: 0, environmentName: "", objectCreationType: 0, appId: "" };
31512
+ return { deploymentName: "", environmentName: "", objectCreationType: 0, appId: "" };
30800
31513
  }
30801
31514
  var SharedVolumeGetOrCreateRequest = {
30802
31515
  encode(message, writer = new BinaryWriter()) {
30803
31516
  if (message.deploymentName !== "") {
30804
31517
  writer.uint32(10).string(message.deploymentName);
30805
31518
  }
30806
- if (message.namespace !== 0) {
30807
- writer.uint32(16).int32(message.namespace);
30808
- }
30809
31519
  if (message.environmentName !== "") {
30810
31520
  writer.uint32(26).string(message.environmentName);
30811
31521
  }
@@ -30831,13 +31541,6 @@ var SharedVolumeGetOrCreateRequest = {
30831
31541
  message.deploymentName = reader.string();
30832
31542
  continue;
30833
31543
  }
30834
- case 2: {
30835
- if (tag !== 16) {
30836
- break;
30837
- }
30838
- message.namespace = reader.int32();
30839
- continue;
30840
- }
30841
31544
  case 3: {
30842
31545
  if (tag !== 26) {
30843
31546
  break;
@@ -30870,7 +31573,6 @@ var SharedVolumeGetOrCreateRequest = {
30870
31573
  fromJSON(object) {
30871
31574
  return {
30872
31575
  deploymentName: isSet3(object.deploymentName) ? globalThis.String(object.deploymentName) : "",
30873
- namespace: isSet3(object.namespace) ? deploymentNamespaceFromJSON(object.namespace) : 0,
30874
31576
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
30875
31577
  objectCreationType: isSet3(object.objectCreationType) ? objectCreationTypeFromJSON(object.objectCreationType) : 0,
30876
31578
  appId: isSet3(object.appId) ? globalThis.String(object.appId) : ""
@@ -30881,9 +31583,6 @@ var SharedVolumeGetOrCreateRequest = {
30881
31583
  if (message.deploymentName !== "") {
30882
31584
  obj.deploymentName = message.deploymentName;
30883
31585
  }
30884
- if (message.namespace !== 0) {
30885
- obj.namespace = deploymentNamespaceToJSON(message.namespace);
30886
- }
30887
31586
  if (message.environmentName !== "") {
30888
31587
  obj.environmentName = message.environmentName;
30889
31588
  }
@@ -30901,7 +31600,6 @@ var SharedVolumeGetOrCreateRequest = {
30901
31600
  fromPartial(object) {
30902
31601
  const message = createBaseSharedVolumeGetOrCreateRequest();
30903
31602
  message.deploymentName = object.deploymentName ?? "";
30904
- message.namespace = object.namespace ?? 0;
30905
31603
  message.environmentName = object.environmentName ?? "";
30906
31604
  message.objectCreationType = object.objectCreationType ?? 0;
30907
31605
  message.appId = object.appId ?? "";
@@ -31981,7 +32679,7 @@ var TaskCurrentInputsResponse = {
31981
32679
  }
31982
32680
  };
31983
32681
  function createBaseTaskInfo() {
31984
- return { id: "", startedAt: 0, finishedAt: 0, result: void 0, enqueuedAt: 0, gpuType: "" };
32682
+ return { id: "", startedAt: 0, finishedAt: 0, result: void 0, enqueuedAt: 0, gpuType: "", sandboxId: "" };
31985
32683
  }
31986
32684
  var TaskInfo = {
31987
32685
  encode(message, writer = new BinaryWriter()) {
@@ -32003,6 +32701,9 @@ var TaskInfo = {
32003
32701
  if (message.gpuType !== "") {
32004
32702
  writer.uint32(50).string(message.gpuType);
32005
32703
  }
32704
+ if (message.sandboxId !== "") {
32705
+ writer.uint32(58).string(message.sandboxId);
32706
+ }
32006
32707
  return writer;
32007
32708
  },
32008
32709
  decode(input, length) {
@@ -32054,6 +32755,13 @@ var TaskInfo = {
32054
32755
  message.gpuType = reader.string();
32055
32756
  continue;
32056
32757
  }
32758
+ case 7: {
32759
+ if (tag !== 58) {
32760
+ break;
32761
+ }
32762
+ message.sandboxId = reader.string();
32763
+ continue;
32764
+ }
32057
32765
  }
32058
32766
  if ((tag & 7) === 4 || tag === 0) {
32059
32767
  break;
@@ -32069,7 +32777,8 @@ var TaskInfo = {
32069
32777
  finishedAt: isSet3(object.finishedAt) ? globalThis.Number(object.finishedAt) : 0,
32070
32778
  result: isSet3(object.result) ? GenericResult.fromJSON(object.result) : void 0,
32071
32779
  enqueuedAt: isSet3(object.enqueuedAt) ? globalThis.Number(object.enqueuedAt) : 0,
32072
- gpuType: isSet3(object.gpuType) ? globalThis.String(object.gpuType) : ""
32780
+ gpuType: isSet3(object.gpuType) ? globalThis.String(object.gpuType) : "",
32781
+ sandboxId: isSet3(object.sandboxId) ? globalThis.String(object.sandboxId) : ""
32073
32782
  };
32074
32783
  },
32075
32784
  toJSON(message) {
@@ -32092,6 +32801,9 @@ var TaskInfo = {
32092
32801
  if (message.gpuType !== "") {
32093
32802
  obj.gpuType = message.gpuType;
32094
32803
  }
32804
+ if (message.sandboxId !== "") {
32805
+ obj.sandboxId = message.sandboxId;
32806
+ }
32095
32807
  return obj;
32096
32808
  },
32097
32809
  create(base) {
@@ -32105,6 +32817,7 @@ var TaskInfo = {
32105
32817
  message.result = object.result !== void 0 && object.result !== null ? GenericResult.fromPartial(object.result) : void 0;
32106
32818
  message.enqueuedAt = object.enqueuedAt ?? 0;
32107
32819
  message.gpuType = object.gpuType ?? "";
32820
+ message.sandboxId = object.sandboxId ?? "";
32108
32821
  return message;
32109
32822
  }
32110
32823
  };
@@ -33696,6 +34409,57 @@ var TunnelStopResponse = {
33696
34409
  return message;
33697
34410
  }
33698
34411
  };
34412
+ function createBaseUploadUrlList() {
34413
+ return { items: [] };
34414
+ }
34415
+ var UploadUrlList = {
34416
+ encode(message, writer = new BinaryWriter()) {
34417
+ for (const v of message.items) {
34418
+ writer.uint32(10).string(v);
34419
+ }
34420
+ return writer;
34421
+ },
34422
+ decode(input, length) {
34423
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
34424
+ let end = length === void 0 ? reader.len : reader.pos + length;
34425
+ const message = createBaseUploadUrlList();
34426
+ while (reader.pos < end) {
34427
+ const tag = reader.uint32();
34428
+ switch (tag >>> 3) {
34429
+ case 1: {
34430
+ if (tag !== 10) {
34431
+ break;
34432
+ }
34433
+ message.items.push(reader.string());
34434
+ continue;
34435
+ }
34436
+ }
34437
+ if ((tag & 7) === 4 || tag === 0) {
34438
+ break;
34439
+ }
34440
+ reader.skip(tag & 7);
34441
+ }
34442
+ return message;
34443
+ },
34444
+ fromJSON(object) {
34445
+ return { items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => globalThis.String(e)) : [] };
34446
+ },
34447
+ toJSON(message) {
34448
+ const obj = {};
34449
+ if (message.items?.length) {
34450
+ obj.items = message.items;
34451
+ }
34452
+ return obj;
34453
+ },
34454
+ create(base) {
34455
+ return UploadUrlList.fromPartial(base ?? {});
34456
+ },
34457
+ fromPartial(object) {
34458
+ const message = createBaseUploadUrlList();
34459
+ message.items = object.items?.map((e) => e) || [];
34460
+ return message;
34461
+ }
34462
+ };
33699
34463
  function createBaseVolumeCommitRequest() {
33700
34464
  return { volumeId: "" };
33701
34465
  }
@@ -34470,16 +35234,13 @@ var VolumeGetFileResponse = {
34470
35234
  }
34471
35235
  };
34472
35236
  function createBaseVolumeGetOrCreateRequest() {
34473
- return { deploymentName: "", namespace: 0, environmentName: "", objectCreationType: 0, appId: "", version: 0 };
35237
+ return { deploymentName: "", environmentName: "", objectCreationType: 0, appId: "", version: 0 };
34474
35238
  }
34475
35239
  var VolumeGetOrCreateRequest = {
34476
35240
  encode(message, writer = new BinaryWriter()) {
34477
35241
  if (message.deploymentName !== "") {
34478
35242
  writer.uint32(10).string(message.deploymentName);
34479
35243
  }
34480
- if (message.namespace !== 0) {
34481
- writer.uint32(16).int32(message.namespace);
34482
- }
34483
35244
  if (message.environmentName !== "") {
34484
35245
  writer.uint32(26).string(message.environmentName);
34485
35246
  }
@@ -34508,13 +35269,6 @@ var VolumeGetOrCreateRequest = {
34508
35269
  message.deploymentName = reader.string();
34509
35270
  continue;
34510
35271
  }
34511
- case 2: {
34512
- if (tag !== 16) {
34513
- break;
34514
- }
34515
- message.namespace = reader.int32();
34516
- continue;
34517
- }
34518
35272
  case 3: {
34519
35273
  if (tag !== 26) {
34520
35274
  break;
@@ -34554,7 +35308,6 @@ var VolumeGetOrCreateRequest = {
34554
35308
  fromJSON(object) {
34555
35309
  return {
34556
35310
  deploymentName: isSet3(object.deploymentName) ? globalThis.String(object.deploymentName) : "",
34557
- namespace: isSet3(object.namespace) ? deploymentNamespaceFromJSON(object.namespace) : 0,
34558
35311
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
34559
35312
  objectCreationType: isSet3(object.objectCreationType) ? objectCreationTypeFromJSON(object.objectCreationType) : 0,
34560
35313
  appId: isSet3(object.appId) ? globalThis.String(object.appId) : "",
@@ -34566,9 +35319,6 @@ var VolumeGetOrCreateRequest = {
34566
35319
  if (message.deploymentName !== "") {
34567
35320
  obj.deploymentName = message.deploymentName;
34568
35321
  }
34569
- if (message.namespace !== 0) {
34570
- obj.namespace = deploymentNamespaceToJSON(message.namespace);
34571
- }
34572
35322
  if (message.environmentName !== "") {
34573
35323
  obj.environmentName = message.environmentName;
34574
35324
  }
@@ -34589,7 +35339,6 @@ var VolumeGetOrCreateRequest = {
34589
35339
  fromPartial(object) {
34590
35340
  const message = createBaseVolumeGetOrCreateRequest();
34591
35341
  message.deploymentName = object.deploymentName ?? "";
34592
- message.namespace = object.namespace ?? 0;
34593
35342
  message.environmentName = object.environmentName ?? "";
34594
35343
  message.objectCreationType = object.objectCreationType ?? 0;
34595
35344
  message.appId = object.appId ?? "";
@@ -36842,6 +37591,14 @@ var ModalClientDefinition = {
36842
37591
  responseStream: false,
36843
37592
  options: {}
36844
37593
  },
37594
+ containerReloadVolumes: {
37595
+ name: "ContainerReloadVolumes",
37596
+ requestType: ContainerReloadVolumesRequest,
37597
+ requestStream: false,
37598
+ responseType: ContainerReloadVolumesResponse,
37599
+ responseStream: false,
37600
+ options: {}
37601
+ },
36845
37602
  containerStop: {
36846
37603
  name: "ContainerStop",
36847
37604
  requestType: ContainerStopRequest,
@@ -37005,6 +37762,31 @@ var ModalClientDefinition = {
37005
37762
  responseStream: false,
37006
37763
  options: {}
37007
37764
  },
37765
+ /** Modal Flash (experimental) */
37766
+ flashContainerDeregister: {
37767
+ name: "FlashContainerDeregister",
37768
+ requestType: FlashContainerDeregisterRequest,
37769
+ requestStream: false,
37770
+ responseType: Empty,
37771
+ responseStream: false,
37772
+ options: {}
37773
+ },
37774
+ flashContainerList: {
37775
+ name: "FlashContainerList",
37776
+ requestType: FlashContainerListRequest,
37777
+ requestStream: false,
37778
+ responseType: FlashContainerListResponse,
37779
+ responseStream: false,
37780
+ options: {}
37781
+ },
37782
+ flashContainerRegister: {
37783
+ name: "FlashContainerRegister",
37784
+ requestType: FlashContainerRegisterRequest,
37785
+ requestStream: false,
37786
+ responseType: FlashContainerRegisterResponse,
37787
+ responseStream: false,
37788
+ options: {}
37789
+ },
37008
37790
  /** Functions */
37009
37791
  functionAsyncInvoke: {
37010
37792
  name: "FunctionAsyncInvoke",
@@ -37904,7 +38686,7 @@ function authMiddleware(profile) {
37904
38686
  options.metadata ??= new import_nice_grpc.Metadata();
37905
38687
  options.metadata.set(
37906
38688
  "x-modal-client-type",
37907
- String(7 /* CLIENT_TYPE_LIBMODAL */)
38689
+ String(8 /* CLIENT_TYPE_LIBMODAL_JS */)
37908
38690
  );
37909
38691
  options.metadata.set("x-modal-client-version", "1.0.0");
37910
38692
  options.metadata.set("x-modal-token-id", tokenId);
@@ -38177,6 +38959,12 @@ var SandboxFilesystemError = class extends Error {
38177
38959
  this.name = "SandboxFilesystemError";
38178
38960
  }
38179
38961
  };
38962
+ var SandboxTimeoutError = class extends Error {
38963
+ constructor(message = "Sandbox operation timed out") {
38964
+ super(message);
38965
+ this.name = "SandboxTimeoutError";
38966
+ }
38967
+ };
38180
38968
 
38181
38969
  // src/sandbox_filesystem.ts
38182
38970
  var SandboxFile = class {
@@ -38389,12 +39177,43 @@ async function consumeIterator(iter) {
38389
39177
  }
38390
39178
 
38391
39179
  // src/sandbox.ts
38392
- var Sandbox2 = class {
39180
+ var Tunnel = class {
39181
+ /** @ignore */
39182
+ constructor(host, port, unencryptedHost, unencryptedPort) {
39183
+ this.host = host;
39184
+ this.port = port;
39185
+ this.unencryptedHost = unencryptedHost;
39186
+ this.unencryptedPort = unencryptedPort;
39187
+ }
39188
+ /** Get the public HTTPS URL of the forwarded port. */
39189
+ get url() {
39190
+ let value = `https://${this.host}`;
39191
+ if (this.port !== 443) {
39192
+ value += `:${this.port}`;
39193
+ }
39194
+ return value;
39195
+ }
39196
+ /** Get the public TLS socket as a [host, port] tuple. */
39197
+ get tlsSocket() {
39198
+ return [this.host, this.port];
39199
+ }
39200
+ /** Get the public TCP socket as a [host, port] tuple. */
39201
+ get tcpSocket() {
39202
+ if (!this.unencryptedHost || this.unencryptedPort === void 0) {
39203
+ throw new InvalidError(
39204
+ "This tunnel is not configured for unencrypted TCP."
39205
+ );
39206
+ }
39207
+ return [this.unencryptedHost, this.unencryptedPort];
39208
+ }
39209
+ };
39210
+ var Sandbox2 = class _Sandbox {
38393
39211
  sandboxId;
38394
39212
  stdin;
38395
39213
  stdout;
38396
39214
  stderr;
38397
39215
  #taskId;
39216
+ #tunnels;
38398
39217
  /** @ignore */
38399
39218
  constructor(sandboxId) {
38400
39219
  this.sandboxId = sandboxId;
@@ -38430,11 +39249,13 @@ var Sandbox2 = class {
38430
39249
  }
38431
39250
  async exec(command, options) {
38432
39251
  const taskId = await this.#getTaskId();
39252
+ const secretIds = options?.secrets ? options.secrets.map((secret) => secret.secretId) : [];
38433
39253
  const resp = await client.containerExec({
38434
39254
  taskId,
38435
39255
  command,
38436
39256
  workdir: options?.workdir,
38437
- timeoutSecs: options?.timeout ? options.timeout / 1e3 : 0
39257
+ timeoutSecs: options?.timeout ? options.timeout / 1e3 : 0,
39258
+ secretIds
38438
39259
  });
38439
39260
  return new ContainerProcess(resp.execId, options);
38440
39261
  }
@@ -38468,10 +39289,86 @@ var Sandbox2 = class {
38468
39289
  timeout: 55
38469
39290
  });
38470
39291
  if (resp.result) {
38471
- return resp.result.exitcode;
39292
+ return _Sandbox.#getReturnCode(resp.result);
38472
39293
  }
38473
39294
  }
38474
39295
  }
39296
+ /** Get Tunnel metadata for the sandbox.
39297
+ *
39298
+ * Raises `SandboxTimeoutError` if the tunnels are not available after the timeout.
39299
+ *
39300
+ * @returns A dictionary of Tunnel objects which are keyed by the container port.
39301
+ */
39302
+ async tunnels(timeout = 5e4) {
39303
+ if (this.#tunnels) {
39304
+ return this.#tunnels;
39305
+ }
39306
+ const resp = await client.sandboxGetTunnels({
39307
+ sandboxId: this.sandboxId,
39308
+ timeout: timeout / 1e3
39309
+ // Convert to seconds
39310
+ });
39311
+ if (resp.result?.status === 4 /* GENERIC_STATUS_TIMEOUT */) {
39312
+ throw new SandboxTimeoutError();
39313
+ }
39314
+ this.#tunnels = {};
39315
+ for (const t of resp.tunnels) {
39316
+ this.#tunnels[t.containerPort] = new Tunnel(
39317
+ t.host,
39318
+ t.port,
39319
+ t.unencryptedHost,
39320
+ t.unencryptedPort
39321
+ );
39322
+ }
39323
+ return this.#tunnels;
39324
+ }
39325
+ /**
39326
+ * Snapshot the filesystem of the Sandbox.
39327
+ *
39328
+ * Returns an `Image` object which can be used to spawn a new Sandbox with the same filesystem.
39329
+ *
39330
+ * @param timeout - Timeout for the snapshot operation in milliseconds
39331
+ * @returns Promise that resolves to an Image
39332
+ */
39333
+ async snapshotFilesystem(timeout = 55e3) {
39334
+ const resp = await client.sandboxSnapshotFs({
39335
+ sandboxId: this.sandboxId,
39336
+ timeout: timeout / 1e3
39337
+ });
39338
+ if (resp.result?.status !== 1 /* GENERIC_STATUS_SUCCESS */) {
39339
+ throw new Error(
39340
+ `Sandbox snapshot failed: ${resp.result?.exception || "Unknown error"}`
39341
+ );
39342
+ }
39343
+ if (!resp.imageId) {
39344
+ throw new Error("Sandbox snapshot response missing image ID");
39345
+ }
39346
+ return new Image2(resp.imageId);
39347
+ }
39348
+ /**
39349
+ * Check if the Sandbox has finished running.
39350
+ *
39351
+ * Returns `null` if the Sandbox is still running, else returns the exit code.
39352
+ */
39353
+ async poll() {
39354
+ const resp = await client.sandboxWait({
39355
+ sandboxId: this.sandboxId,
39356
+ timeout: 0
39357
+ });
39358
+ return _Sandbox.#getReturnCode(resp.result);
39359
+ }
39360
+ static #getReturnCode(result) {
39361
+ if (result === void 0 || result.status === 0 /* GENERIC_STATUS_UNSPECIFIED */) {
39362
+ return null;
39363
+ }
39364
+ if (result.status === 4 /* GENERIC_STATUS_TIMEOUT */) {
39365
+ return 124;
39366
+ } else if (result.status === 3 /* GENERIC_STATUS_TERMINATED */) {
39367
+ return 137;
39368
+ } else {
39369
+ return result.exitcode;
39370
+ }
39371
+ }
38475
39372
  };
38476
39373
  var ContainerProcess = class {
38477
39374
  stdin;
@@ -38686,6 +39583,33 @@ var App = class _App {
38686
39583
  allowBackgroundCommits: true,
38687
39584
  readOnly: false
38688
39585
  })) : [];
39586
+ const openPorts = [];
39587
+ if (options.encryptedPorts) {
39588
+ openPorts.push(
39589
+ ...options.encryptedPorts.map((port) => ({
39590
+ port,
39591
+ unencrypted: false
39592
+ }))
39593
+ );
39594
+ }
39595
+ if (options.h2Ports) {
39596
+ openPorts.push(
39597
+ ...options.h2Ports.map((port) => ({
39598
+ port,
39599
+ unencrypted: false,
39600
+ tunnelType: 1 /* TUNNEL_TYPE_H2 */
39601
+ }))
39602
+ );
39603
+ }
39604
+ if (options.unencryptedPorts) {
39605
+ openPorts.push(
39606
+ ...options.unencryptedPorts.map((port) => ({
39607
+ port,
39608
+ unencrypted: true
39609
+ }))
39610
+ );
39611
+ }
39612
+ const secretIds = options.secrets ? options.secrets.map((secret) => secret.secretId) : [];
38689
39613
  const createResp = await client.sandboxCreate({
38690
39614
  appId: this.appId,
38691
39615
  definition: {
@@ -38701,7 +39625,9 @@ var App = class _App {
38701
39625
  milliCpu: Math.round(1e3 * (options.cpu ?? 0.125)),
38702
39626
  memoryMb: options.memory ?? 128
38703
39627
  },
38704
- volumeMounts
39628
+ volumeMounts,
39629
+ secretIds,
39630
+ openPorts: openPorts.length > 0 ? { ports: openPorts } : void 0
38705
39631
  }
38706
39632
  });
38707
39633
  return new Sandbox2(createResp.sandboxId);
@@ -39327,12 +40253,12 @@ var maxSystemRetries = 8;
39327
40253
  var Function_ = class _Function_ {
39328
40254
  functionId;
39329
40255
  methodName;
39330
- inputPlaneUrl;
40256
+ #inputPlaneUrl;
39331
40257
  /** @ignore */
39332
40258
  constructor(functionId, methodName, inputPlaneUrl) {
39333
40259
  this.functionId = functionId;
39334
40260
  this.methodName = methodName;
39335
- this.inputPlaneUrl = inputPlaneUrl;
40261
+ this.#inputPlaneUrl = inputPlaneUrl;
39336
40262
  }
39337
40263
  static async lookup(appName, name, options = {}) {
39338
40264
  try {
@@ -39371,9 +40297,9 @@ var Function_ = class _Function_ {
39371
40297
  }
39372
40298
  }
39373
40299
  async #createRemoteInvocation(input) {
39374
- if (this.inputPlaneUrl) {
40300
+ if (this.#inputPlaneUrl) {
39375
40301
  return await InputPlaneInvocation.create(
39376
- this.inputPlaneUrl,
40302
+ this.#inputPlaneUrl,
39377
40303
  this.functionId,
39378
40304
  input
39379
40305
  );
@@ -39871,6 +40797,7 @@ var Volume = class _Volume {
39871
40797
  RemoteError,
39872
40798
  Sandbox,
39873
40799
  SandboxFile,
40800
+ SandboxTimeoutError,
39874
40801
  Secret,
39875
40802
  Volume,
39876
40803
  initializeClient