modal 0.3.17 → 0.3.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2188,6 +2188,41 @@ function systemErrorCodeToJSON(object) {
2188
2188
  return "UNRECOGNIZED";
2189
2189
  }
2190
2190
  }
2191
+ function taskSnapshotBehaviorFromJSON(object) {
2192
+ switch (object) {
2193
+ case 0:
2194
+ case "TASK_SNAPSHOT_BEHAVIOR_UNSPECIFIED":
2195
+ return 0 /* TASK_SNAPSHOT_BEHAVIOR_UNSPECIFIED */;
2196
+ case 1:
2197
+ case "TASK_SNAPSHOT_BEHAVIOR_SNAPSHOT":
2198
+ return 1 /* TASK_SNAPSHOT_BEHAVIOR_SNAPSHOT */;
2199
+ case 2:
2200
+ case "TASK_SNAPSHOT_BEHAVIOR_RESTORE":
2201
+ return 2 /* TASK_SNAPSHOT_BEHAVIOR_RESTORE */;
2202
+ case 3:
2203
+ case "TASK_SNAPSHOT_BEHAVIOR_NONE":
2204
+ return 3 /* TASK_SNAPSHOT_BEHAVIOR_NONE */;
2205
+ case -1:
2206
+ case "UNRECOGNIZED":
2207
+ default:
2208
+ return -1 /* UNRECOGNIZED */;
2209
+ }
2210
+ }
2211
+ function taskSnapshotBehaviorToJSON(object) {
2212
+ switch (object) {
2213
+ case 0 /* TASK_SNAPSHOT_BEHAVIOR_UNSPECIFIED */:
2214
+ return "TASK_SNAPSHOT_BEHAVIOR_UNSPECIFIED";
2215
+ case 1 /* TASK_SNAPSHOT_BEHAVIOR_SNAPSHOT */:
2216
+ return "TASK_SNAPSHOT_BEHAVIOR_SNAPSHOT";
2217
+ case 2 /* TASK_SNAPSHOT_BEHAVIOR_RESTORE */:
2218
+ return "TASK_SNAPSHOT_BEHAVIOR_RESTORE";
2219
+ case 3 /* TASK_SNAPSHOT_BEHAVIOR_NONE */:
2220
+ return "TASK_SNAPSHOT_BEHAVIOR_NONE";
2221
+ case -1 /* UNRECOGNIZED */:
2222
+ default:
2223
+ return "UNRECOGNIZED";
2224
+ }
2225
+ }
2191
2226
  function taskStateFromJSON(object) {
2192
2227
  switch (object) {
2193
2228
  case 0:
@@ -2611,6 +2646,9 @@ function genericResult_GenericStatusFromJSON(object) {
2611
2646
  case 6:
2612
2647
  case "GENERIC_STATUS_INTERNAL_FAILURE":
2613
2648
  return 6 /* GENERIC_STATUS_INTERNAL_FAILURE */;
2649
+ case 7:
2650
+ case "GENERIC_STATUS_IDLE_TIMEOUT":
2651
+ return 7 /* GENERIC_STATUS_IDLE_TIMEOUT */;
2614
2652
  case -1:
2615
2653
  case "UNRECOGNIZED":
2616
2654
  default:
@@ -2633,6 +2671,8 @@ function genericResult_GenericStatusToJSON(object) {
2633
2671
  return "GENERIC_STATUS_INIT_FAILURE";
2634
2672
  case 6 /* GENERIC_STATUS_INTERNAL_FAILURE */:
2635
2673
  return "GENERIC_STATUS_INTERNAL_FAILURE";
2674
+ case 7 /* GENERIC_STATUS_IDLE_TIMEOUT */:
2675
+ return "GENERIC_STATUS_IDLE_TIMEOUT";
2636
2676
  case -1 /* UNRECOGNIZED */:
2637
2677
  default:
2638
2678
  return "UNRECOGNIZED";
@@ -2703,6 +2743,36 @@ function pTYInfo_PTYTypeToJSON(object) {
2703
2743
  return "UNRECOGNIZED";
2704
2744
  }
2705
2745
  }
2746
+ function sandboxRestoreRequest_SandboxNameOverrideTypeFromJSON(object) {
2747
+ switch (object) {
2748
+ case 0:
2749
+ case "SANDBOX_NAME_OVERRIDE_TYPE_UNSPECIFIED":
2750
+ return 0 /* SANDBOX_NAME_OVERRIDE_TYPE_UNSPECIFIED */;
2751
+ case 1:
2752
+ case "SANDBOX_NAME_OVERRIDE_TYPE_NONE":
2753
+ return 1 /* SANDBOX_NAME_OVERRIDE_TYPE_NONE */;
2754
+ case 2:
2755
+ case "SANDBOX_NAME_OVERRIDE_TYPE_STRING":
2756
+ return 2 /* SANDBOX_NAME_OVERRIDE_TYPE_STRING */;
2757
+ case -1:
2758
+ case "UNRECOGNIZED":
2759
+ default:
2760
+ return -1 /* UNRECOGNIZED */;
2761
+ }
2762
+ }
2763
+ function sandboxRestoreRequest_SandboxNameOverrideTypeToJSON(object) {
2764
+ switch (object) {
2765
+ case 0 /* SANDBOX_NAME_OVERRIDE_TYPE_UNSPECIFIED */:
2766
+ return "SANDBOX_NAME_OVERRIDE_TYPE_UNSPECIFIED";
2767
+ case 1 /* SANDBOX_NAME_OVERRIDE_TYPE_NONE */:
2768
+ return "SANDBOX_NAME_OVERRIDE_TYPE_NONE";
2769
+ case 2 /* SANDBOX_NAME_OVERRIDE_TYPE_STRING */:
2770
+ return "SANDBOX_NAME_OVERRIDE_TYPE_STRING";
2771
+ case -1 /* UNRECOGNIZED */:
2772
+ default:
2773
+ return "UNRECOGNIZED";
2774
+ }
2775
+ }
2706
2776
  function warning_WarningTypeFromJSON(object) {
2707
2777
  switch (object) {
2708
2778
  case 0:
@@ -6183,6 +6253,94 @@ var AttemptStartResponse = {
6183
6253
  return message;
6184
6254
  }
6185
6255
  };
6256
+ function createBaseAuthTokenGetRequest() {
6257
+ return {};
6258
+ }
6259
+ var AuthTokenGetRequest = {
6260
+ encode(_, writer = new BinaryWriter()) {
6261
+ return writer;
6262
+ },
6263
+ decode(input, length) {
6264
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6265
+ let end = length === void 0 ? reader.len : reader.pos + length;
6266
+ const message = createBaseAuthTokenGetRequest();
6267
+ while (reader.pos < end) {
6268
+ const tag = reader.uint32();
6269
+ switch (tag >>> 3) {
6270
+ }
6271
+ if ((tag & 7) === 4 || tag === 0) {
6272
+ break;
6273
+ }
6274
+ reader.skip(tag & 7);
6275
+ }
6276
+ return message;
6277
+ },
6278
+ fromJSON(_) {
6279
+ return {};
6280
+ },
6281
+ toJSON(_) {
6282
+ const obj = {};
6283
+ return obj;
6284
+ },
6285
+ create(base) {
6286
+ return AuthTokenGetRequest.fromPartial(base ?? {});
6287
+ },
6288
+ fromPartial(_) {
6289
+ const message = createBaseAuthTokenGetRequest();
6290
+ return message;
6291
+ }
6292
+ };
6293
+ function createBaseAuthTokenGetResponse() {
6294
+ return { token: "" };
6295
+ }
6296
+ var AuthTokenGetResponse = {
6297
+ encode(message, writer = new BinaryWriter()) {
6298
+ if (message.token !== "") {
6299
+ writer.uint32(10).string(message.token);
6300
+ }
6301
+ return writer;
6302
+ },
6303
+ decode(input, length) {
6304
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6305
+ let end = length === void 0 ? reader.len : reader.pos + length;
6306
+ const message = createBaseAuthTokenGetResponse();
6307
+ while (reader.pos < end) {
6308
+ const tag = reader.uint32();
6309
+ switch (tag >>> 3) {
6310
+ case 1: {
6311
+ if (tag !== 10) {
6312
+ break;
6313
+ }
6314
+ message.token = reader.string();
6315
+ continue;
6316
+ }
6317
+ }
6318
+ if ((tag & 7) === 4 || tag === 0) {
6319
+ break;
6320
+ }
6321
+ reader.skip(tag & 7);
6322
+ }
6323
+ return message;
6324
+ },
6325
+ fromJSON(object) {
6326
+ return { token: isSet3(object.token) ? globalThis.String(object.token) : "" };
6327
+ },
6328
+ toJSON(message) {
6329
+ const obj = {};
6330
+ if (message.token !== "") {
6331
+ obj.token = message.token;
6332
+ }
6333
+ return obj;
6334
+ },
6335
+ create(base) {
6336
+ return AuthTokenGetResponse.fromPartial(base ?? {});
6337
+ },
6338
+ fromPartial(object) {
6339
+ const message = createBaseAuthTokenGetResponse();
6340
+ message.token = object.token ?? "";
6341
+ return message;
6342
+ }
6343
+ };
6186
6344
  function createBaseAutoscalerSettings() {
6187
6345
  return {
6188
6346
  minContainers: void 0,
@@ -10986,6 +11144,74 @@ var ContainerStopResponse = {
10986
11144
  return message;
10987
11145
  }
10988
11146
  };
11147
+ function createBaseCreationInfo() {
11148
+ return { createdAt: 0, createdBy: "" };
11149
+ }
11150
+ var CreationInfo = {
11151
+ encode(message, writer = new BinaryWriter()) {
11152
+ if (message.createdAt !== 0) {
11153
+ writer.uint32(9).double(message.createdAt);
11154
+ }
11155
+ if (message.createdBy !== "") {
11156
+ writer.uint32(18).string(message.createdBy);
11157
+ }
11158
+ return writer;
11159
+ },
11160
+ decode(input, length) {
11161
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
11162
+ let end = length === void 0 ? reader.len : reader.pos + length;
11163
+ const message = createBaseCreationInfo();
11164
+ while (reader.pos < end) {
11165
+ const tag = reader.uint32();
11166
+ switch (tag >>> 3) {
11167
+ case 1: {
11168
+ if (tag !== 9) {
11169
+ break;
11170
+ }
11171
+ message.createdAt = reader.double();
11172
+ continue;
11173
+ }
11174
+ case 2: {
11175
+ if (tag !== 18) {
11176
+ break;
11177
+ }
11178
+ message.createdBy = reader.string();
11179
+ continue;
11180
+ }
11181
+ }
11182
+ if ((tag & 7) === 4 || tag === 0) {
11183
+ break;
11184
+ }
11185
+ reader.skip(tag & 7);
11186
+ }
11187
+ return message;
11188
+ },
11189
+ fromJSON(object) {
11190
+ return {
11191
+ createdAt: isSet3(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
11192
+ createdBy: isSet3(object.createdBy) ? globalThis.String(object.createdBy) : ""
11193
+ };
11194
+ },
11195
+ toJSON(message) {
11196
+ const obj = {};
11197
+ if (message.createdAt !== 0) {
11198
+ obj.createdAt = message.createdAt;
11199
+ }
11200
+ if (message.createdBy !== "") {
11201
+ obj.createdBy = message.createdBy;
11202
+ }
11203
+ return obj;
11204
+ },
11205
+ create(base) {
11206
+ return CreationInfo.fromPartial(base ?? {});
11207
+ },
11208
+ fromPartial(object) {
11209
+ const message = createBaseCreationInfo();
11210
+ message.createdAt = object.createdAt ?? 0;
11211
+ message.createdBy = object.createdBy ?? "";
11212
+ return message;
11213
+ }
11214
+ };
10989
11215
  function createBaseCustomDomainConfig() {
10990
11216
  return { name: "" };
10991
11217
  }
@@ -11740,13 +11966,16 @@ var DictGetOrCreateRequest = {
11740
11966
  }
11741
11967
  };
11742
11968
  function createBaseDictGetOrCreateResponse() {
11743
- return { dictId: "" };
11969
+ return { dictId: "", metadata: void 0 };
11744
11970
  }
11745
11971
  var DictGetOrCreateResponse = {
11746
11972
  encode(message, writer = new BinaryWriter()) {
11747
11973
  if (message.dictId !== "") {
11748
11974
  writer.uint32(10).string(message.dictId);
11749
11975
  }
11976
+ if (message.metadata !== void 0) {
11977
+ DictMetadata.encode(message.metadata, writer.uint32(18).fork()).join();
11978
+ }
11750
11979
  return writer;
11751
11980
  },
11752
11981
  decode(input, length) {
@@ -11763,6 +11992,13 @@ var DictGetOrCreateResponse = {
11763
11992
  message.dictId = reader.string();
11764
11993
  continue;
11765
11994
  }
11995
+ case 2: {
11996
+ if (tag !== 18) {
11997
+ break;
11998
+ }
11999
+ message.metadata = DictMetadata.decode(reader, reader.uint32());
12000
+ continue;
12001
+ }
11766
12002
  }
11767
12003
  if ((tag & 7) === 4 || tag === 0) {
11768
12004
  break;
@@ -11772,13 +12008,19 @@ var DictGetOrCreateResponse = {
11772
12008
  return message;
11773
12009
  },
11774
12010
  fromJSON(object) {
11775
- return { dictId: isSet3(object.dictId) ? globalThis.String(object.dictId) : "" };
12011
+ return {
12012
+ dictId: isSet3(object.dictId) ? globalThis.String(object.dictId) : "",
12013
+ metadata: isSet3(object.metadata) ? DictMetadata.fromJSON(object.metadata) : void 0
12014
+ };
11776
12015
  },
11777
12016
  toJSON(message) {
11778
12017
  const obj = {};
11779
12018
  if (message.dictId !== "") {
11780
12019
  obj.dictId = message.dictId;
11781
12020
  }
12021
+ if (message.metadata !== void 0) {
12022
+ obj.metadata = DictMetadata.toJSON(message.metadata);
12023
+ }
11782
12024
  return obj;
11783
12025
  },
11784
12026
  create(base) {
@@ -11787,6 +12029,7 @@ var DictGetOrCreateResponse = {
11787
12029
  fromPartial(object) {
11788
12030
  const message = createBaseDictGetOrCreateResponse();
11789
12031
  message.dictId = object.dictId ?? "";
12032
+ message.metadata = object.metadata !== void 0 && object.metadata !== null ? DictMetadata.fromPartial(object.metadata) : void 0;
11790
12033
  return message;
11791
12034
  }
11792
12035
  };
@@ -12080,13 +12323,16 @@ var DictLenResponse = {
12080
12323
  }
12081
12324
  };
12082
12325
  function createBaseDictListRequest() {
12083
- return { environmentName: "" };
12326
+ return { environmentName: "", pagination: void 0 };
12084
12327
  }
12085
12328
  var DictListRequest = {
12086
12329
  encode(message, writer = new BinaryWriter()) {
12087
12330
  if (message.environmentName !== "") {
12088
12331
  writer.uint32(10).string(message.environmentName);
12089
12332
  }
12333
+ if (message.pagination !== void 0) {
12334
+ ListPagination.encode(message.pagination, writer.uint32(18).fork()).join();
12335
+ }
12090
12336
  return writer;
12091
12337
  },
12092
12338
  decode(input, length) {
@@ -12103,6 +12349,13 @@ var DictListRequest = {
12103
12349
  message.environmentName = reader.string();
12104
12350
  continue;
12105
12351
  }
12352
+ case 2: {
12353
+ if (tag !== 18) {
12354
+ break;
12355
+ }
12356
+ message.pagination = ListPagination.decode(reader, reader.uint32());
12357
+ continue;
12358
+ }
12106
12359
  }
12107
12360
  if ((tag & 7) === 4 || tag === 0) {
12108
12361
  break;
@@ -12112,13 +12365,19 @@ var DictListRequest = {
12112
12365
  return message;
12113
12366
  },
12114
12367
  fromJSON(object) {
12115
- return { environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "" };
12368
+ return {
12369
+ environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
12370
+ pagination: isSet3(object.pagination) ? ListPagination.fromJSON(object.pagination) : void 0
12371
+ };
12116
12372
  },
12117
12373
  toJSON(message) {
12118
12374
  const obj = {};
12119
12375
  if (message.environmentName !== "") {
12120
12376
  obj.environmentName = message.environmentName;
12121
12377
  }
12378
+ if (message.pagination !== void 0) {
12379
+ obj.pagination = ListPagination.toJSON(message.pagination);
12380
+ }
12122
12381
  return obj;
12123
12382
  },
12124
12383
  create(base) {
@@ -12127,17 +12386,21 @@ var DictListRequest = {
12127
12386
  fromPartial(object) {
12128
12387
  const message = createBaseDictListRequest();
12129
12388
  message.environmentName = object.environmentName ?? "";
12389
+ message.pagination = object.pagination !== void 0 && object.pagination !== null ? ListPagination.fromPartial(object.pagination) : void 0;
12130
12390
  return message;
12131
12391
  }
12132
12392
  };
12133
12393
  function createBaseDictListResponse() {
12134
- return { dicts: [] };
12394
+ return { dicts: [], environmentName: "" };
12135
12395
  }
12136
12396
  var DictListResponse = {
12137
12397
  encode(message, writer = new BinaryWriter()) {
12138
12398
  for (const v of message.dicts) {
12139
12399
  DictListResponse_DictInfo.encode(v, writer.uint32(10).fork()).join();
12140
12400
  }
12401
+ if (message.environmentName !== "") {
12402
+ writer.uint32(18).string(message.environmentName);
12403
+ }
12141
12404
  return writer;
12142
12405
  },
12143
12406
  decode(input, length) {
@@ -12154,6 +12417,13 @@ var DictListResponse = {
12154
12417
  message.dicts.push(DictListResponse_DictInfo.decode(reader, reader.uint32()));
12155
12418
  continue;
12156
12419
  }
12420
+ case 2: {
12421
+ if (tag !== 18) {
12422
+ break;
12423
+ }
12424
+ message.environmentName = reader.string();
12425
+ continue;
12426
+ }
12157
12427
  }
12158
12428
  if ((tag & 7) === 4 || tag === 0) {
12159
12429
  break;
@@ -12164,7 +12434,8 @@ var DictListResponse = {
12164
12434
  },
12165
12435
  fromJSON(object) {
12166
12436
  return {
12167
- dicts: globalThis.Array.isArray(object?.dicts) ? object.dicts.map((e) => DictListResponse_DictInfo.fromJSON(e)) : []
12437
+ dicts: globalThis.Array.isArray(object?.dicts) ? object.dicts.map((e) => DictListResponse_DictInfo.fromJSON(e)) : [],
12438
+ environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : ""
12168
12439
  };
12169
12440
  },
12170
12441
  toJSON(message) {
@@ -12172,6 +12443,9 @@ var DictListResponse = {
12172
12443
  if (message.dicts?.length) {
12173
12444
  obj.dicts = message.dicts.map((e) => DictListResponse_DictInfo.toJSON(e));
12174
12445
  }
12446
+ if (message.environmentName !== "") {
12447
+ obj.environmentName = message.environmentName;
12448
+ }
12175
12449
  return obj;
12176
12450
  },
12177
12451
  create(base) {
@@ -12180,11 +12454,12 @@ var DictListResponse = {
12180
12454
  fromPartial(object) {
12181
12455
  const message = createBaseDictListResponse();
12182
12456
  message.dicts = object.dicts?.map((e) => DictListResponse_DictInfo.fromPartial(e)) || [];
12457
+ message.environmentName = object.environmentName ?? "";
12183
12458
  return message;
12184
12459
  }
12185
12460
  };
12186
12461
  function createBaseDictListResponse_DictInfo() {
12187
- return { name: "", createdAt: 0 };
12462
+ return { name: "", createdAt: 0, dictId: "", metadata: void 0 };
12188
12463
  }
12189
12464
  var DictListResponse_DictInfo = {
12190
12465
  encode(message, writer = new BinaryWriter()) {
@@ -12194,6 +12469,12 @@ var DictListResponse_DictInfo = {
12194
12469
  if (message.createdAt !== 0) {
12195
12470
  writer.uint32(17).double(message.createdAt);
12196
12471
  }
12472
+ if (message.dictId !== "") {
12473
+ writer.uint32(26).string(message.dictId);
12474
+ }
12475
+ if (message.metadata !== void 0) {
12476
+ DictMetadata.encode(message.metadata, writer.uint32(34).fork()).join();
12477
+ }
12197
12478
  return writer;
12198
12479
  },
12199
12480
  decode(input, length) {
@@ -12217,6 +12498,20 @@ var DictListResponse_DictInfo = {
12217
12498
  message.createdAt = reader.double();
12218
12499
  continue;
12219
12500
  }
12501
+ case 3: {
12502
+ if (tag !== 26) {
12503
+ break;
12504
+ }
12505
+ message.dictId = reader.string();
12506
+ continue;
12507
+ }
12508
+ case 4: {
12509
+ if (tag !== 34) {
12510
+ break;
12511
+ }
12512
+ message.metadata = DictMetadata.decode(reader, reader.uint32());
12513
+ continue;
12514
+ }
12220
12515
  }
12221
12516
  if ((tag & 7) === 4 || tag === 0) {
12222
12517
  break;
@@ -12228,7 +12523,9 @@ var DictListResponse_DictInfo = {
12228
12523
  fromJSON(object) {
12229
12524
  return {
12230
12525
  name: isSet3(object.name) ? globalThis.String(object.name) : "",
12231
- createdAt: isSet3(object.createdAt) ? globalThis.Number(object.createdAt) : 0
12526
+ createdAt: isSet3(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
12527
+ dictId: isSet3(object.dictId) ? globalThis.String(object.dictId) : "",
12528
+ metadata: isSet3(object.metadata) ? DictMetadata.fromJSON(object.metadata) : void 0
12232
12529
  };
12233
12530
  },
12234
12531
  toJSON(message) {
@@ -12239,6 +12536,12 @@ var DictListResponse_DictInfo = {
12239
12536
  if (message.createdAt !== 0) {
12240
12537
  obj.createdAt = message.createdAt;
12241
12538
  }
12539
+ if (message.dictId !== "") {
12540
+ obj.dictId = message.dictId;
12541
+ }
12542
+ if (message.metadata !== void 0) {
12543
+ obj.metadata = DictMetadata.toJSON(message.metadata);
12544
+ }
12242
12545
  return obj;
12243
12546
  },
12244
12547
  create(base) {
@@ -12248,6 +12551,76 @@ var DictListResponse_DictInfo = {
12248
12551
  const message = createBaseDictListResponse_DictInfo();
12249
12552
  message.name = object.name ?? "";
12250
12553
  message.createdAt = object.createdAt ?? 0;
12554
+ message.dictId = object.dictId ?? "";
12555
+ message.metadata = object.metadata !== void 0 && object.metadata !== null ? DictMetadata.fromPartial(object.metadata) : void 0;
12556
+ return message;
12557
+ }
12558
+ };
12559
+ function createBaseDictMetadata() {
12560
+ return { name: "", creationInfo: void 0 };
12561
+ }
12562
+ var DictMetadata = {
12563
+ encode(message, writer = new BinaryWriter()) {
12564
+ if (message.name !== "") {
12565
+ writer.uint32(10).string(message.name);
12566
+ }
12567
+ if (message.creationInfo !== void 0) {
12568
+ CreationInfo.encode(message.creationInfo, writer.uint32(18).fork()).join();
12569
+ }
12570
+ return writer;
12571
+ },
12572
+ decode(input, length) {
12573
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
12574
+ let end = length === void 0 ? reader.len : reader.pos + length;
12575
+ const message = createBaseDictMetadata();
12576
+ while (reader.pos < end) {
12577
+ const tag = reader.uint32();
12578
+ switch (tag >>> 3) {
12579
+ case 1: {
12580
+ if (tag !== 10) {
12581
+ break;
12582
+ }
12583
+ message.name = reader.string();
12584
+ continue;
12585
+ }
12586
+ case 2: {
12587
+ if (tag !== 18) {
12588
+ break;
12589
+ }
12590
+ message.creationInfo = CreationInfo.decode(reader, reader.uint32());
12591
+ continue;
12592
+ }
12593
+ }
12594
+ if ((tag & 7) === 4 || tag === 0) {
12595
+ break;
12596
+ }
12597
+ reader.skip(tag & 7);
12598
+ }
12599
+ return message;
12600
+ },
12601
+ fromJSON(object) {
12602
+ return {
12603
+ name: isSet3(object.name) ? globalThis.String(object.name) : "",
12604
+ creationInfo: isSet3(object.creationInfo) ? CreationInfo.fromJSON(object.creationInfo) : void 0
12605
+ };
12606
+ },
12607
+ toJSON(message) {
12608
+ const obj = {};
12609
+ if (message.name !== "") {
12610
+ obj.name = message.name;
12611
+ }
12612
+ if (message.creationInfo !== void 0) {
12613
+ obj.creationInfo = CreationInfo.toJSON(message.creationInfo);
12614
+ }
12615
+ return obj;
12616
+ },
12617
+ create(base) {
12618
+ return DictMetadata.fromPartial(base ?? {});
12619
+ },
12620
+ fromPartial(object) {
12621
+ const message = createBaseDictMetadata();
12622
+ message.name = object.name ?? "";
12623
+ message.creationInfo = object.creationInfo !== void 0 && object.creationInfo !== null ? CreationInfo.fromPartial(object.creationInfo) : void 0;
12251
12624
  return message;
12252
12625
  }
12253
12626
  };
@@ -13184,7 +13557,7 @@ var EnvironmentGetOrCreateResponse = {
13184
13557
  }
13185
13558
  };
13186
13559
  function createBaseEnvironmentListItem() {
13187
- return { name: "", webhookSuffix: "", createdAt: 0, default: false };
13560
+ return { name: "", webhookSuffix: "", createdAt: 0, default: false, isManaged: false, environmentId: "" };
13188
13561
  }
13189
13562
  var EnvironmentListItem = {
13190
13563
  encode(message, writer = new BinaryWriter()) {
@@ -13200,6 +13573,12 @@ var EnvironmentListItem = {
13200
13573
  if (message.default !== false) {
13201
13574
  writer.uint32(32).bool(message.default);
13202
13575
  }
13576
+ if (message.isManaged !== false) {
13577
+ writer.uint32(40).bool(message.isManaged);
13578
+ }
13579
+ if (message.environmentId !== "") {
13580
+ writer.uint32(50).string(message.environmentId);
13581
+ }
13203
13582
  return writer;
13204
13583
  },
13205
13584
  decode(input, length) {
@@ -13237,6 +13616,20 @@ var EnvironmentListItem = {
13237
13616
  message.default = reader.bool();
13238
13617
  continue;
13239
13618
  }
13619
+ case 5: {
13620
+ if (tag !== 40) {
13621
+ break;
13622
+ }
13623
+ message.isManaged = reader.bool();
13624
+ continue;
13625
+ }
13626
+ case 6: {
13627
+ if (tag !== 50) {
13628
+ break;
13629
+ }
13630
+ message.environmentId = reader.string();
13631
+ continue;
13632
+ }
13240
13633
  }
13241
13634
  if ((tag & 7) === 4 || tag === 0) {
13242
13635
  break;
@@ -13250,7 +13643,9 @@ var EnvironmentListItem = {
13250
13643
  name: isSet3(object.name) ? globalThis.String(object.name) : "",
13251
13644
  webhookSuffix: isSet3(object.webhookSuffix) ? globalThis.String(object.webhookSuffix) : "",
13252
13645
  createdAt: isSet3(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
13253
- default: isSet3(object.default) ? globalThis.Boolean(object.default) : false
13646
+ default: isSet3(object.default) ? globalThis.Boolean(object.default) : false,
13647
+ isManaged: isSet3(object.isManaged) ? globalThis.Boolean(object.isManaged) : false,
13648
+ environmentId: isSet3(object.environmentId) ? globalThis.String(object.environmentId) : ""
13254
13649
  };
13255
13650
  },
13256
13651
  toJSON(message) {
@@ -13267,6 +13662,12 @@ var EnvironmentListItem = {
13267
13662
  if (message.default !== false) {
13268
13663
  obj.default = message.default;
13269
13664
  }
13665
+ if (message.isManaged !== false) {
13666
+ obj.isManaged = message.isManaged;
13667
+ }
13668
+ if (message.environmentId !== "") {
13669
+ obj.environmentId = message.environmentId;
13670
+ }
13270
13671
  return obj;
13271
13672
  },
13272
13673
  create(base) {
@@ -13278,6 +13679,8 @@ var EnvironmentListItem = {
13278
13679
  message.webhookSuffix = object.webhookSuffix ?? "";
13279
13680
  message.createdAt = object.createdAt ?? 0;
13280
13681
  message.default = object.default ?? false;
13682
+ message.isManaged = object.isManaged ?? false;
13683
+ message.environmentId = object.environmentId ?? "";
13281
13684
  return message;
13282
13685
  }
13283
13686
  };
@@ -14222,7 +14625,10 @@ function createBaseFunctionMessage() {
14222
14625
  functionSchema: void 0,
14223
14626
  experimentalOptions: {},
14224
14627
  mountClientDependencies: false,
14225
- flashServiceUrls: []
14628
+ flashServiceUrls: [],
14629
+ flashServiceLabel: "",
14630
+ enableGpuSnapshot: false,
14631
+ startupTimeoutSecs: 0
14226
14632
  };
14227
14633
  }
14228
14634
  var FunctionMessage = {
@@ -14437,6 +14843,15 @@ var FunctionMessage = {
14437
14843
  for (const v of message.flashServiceUrls) {
14438
14844
  writer.uint32(666).string(v);
14439
14845
  }
14846
+ if (message.flashServiceLabel !== "") {
14847
+ writer.uint32(674).string(message.flashServiceLabel);
14848
+ }
14849
+ if (message.enableGpuSnapshot !== false) {
14850
+ writer.uint32(680).bool(message.enableGpuSnapshot);
14851
+ }
14852
+ if (message.startupTimeoutSecs !== 0) {
14853
+ writer.uint32(688).uint32(message.startupTimeoutSecs);
14854
+ }
14440
14855
  return writer;
14441
14856
  },
14442
14857
  decode(input, length) {
@@ -14942,6 +15357,27 @@ var FunctionMessage = {
14942
15357
  message.flashServiceUrls.push(reader.string());
14943
15358
  continue;
14944
15359
  }
15360
+ case 84: {
15361
+ if (tag !== 674) {
15362
+ break;
15363
+ }
15364
+ message.flashServiceLabel = reader.string();
15365
+ continue;
15366
+ }
15367
+ case 85: {
15368
+ if (tag !== 680) {
15369
+ break;
15370
+ }
15371
+ message.enableGpuSnapshot = reader.bool();
15372
+ continue;
15373
+ }
15374
+ case 86: {
15375
+ if (tag !== 688) {
15376
+ break;
15377
+ }
15378
+ message.startupTimeoutSecs = reader.uint32();
15379
+ continue;
15380
+ }
14945
15381
  }
14946
15382
  if ((tag & 7) === 4 || tag === 0) {
14947
15383
  break;
@@ -15027,7 +15463,10 @@ var FunctionMessage = {
15027
15463
  return acc;
15028
15464
  }, {}) : {},
15029
15465
  mountClientDependencies: isSet3(object.mountClientDependencies) ? globalThis.Boolean(object.mountClientDependencies) : false,
15030
- flashServiceUrls: globalThis.Array.isArray(object?.flashServiceUrls) ? object.flashServiceUrls.map((e) => globalThis.String(e)) : []
15466
+ flashServiceUrls: globalThis.Array.isArray(object?.flashServiceUrls) ? object.flashServiceUrls.map((e) => globalThis.String(e)) : [],
15467
+ flashServiceLabel: isSet3(object.flashServiceLabel) ? globalThis.String(object.flashServiceLabel) : "",
15468
+ enableGpuSnapshot: isSet3(object.enableGpuSnapshot) ? globalThis.Boolean(object.enableGpuSnapshot) : false,
15469
+ startupTimeoutSecs: isSet3(object.startupTimeoutSecs) ? globalThis.Number(object.startupTimeoutSecs) : 0
15031
15470
  };
15032
15471
  },
15033
15472
  toJSON(message) {
@@ -15254,6 +15693,15 @@ var FunctionMessage = {
15254
15693
  if (message.flashServiceUrls?.length) {
15255
15694
  obj.flashServiceUrls = message.flashServiceUrls;
15256
15695
  }
15696
+ if (message.flashServiceLabel !== "") {
15697
+ obj.flashServiceLabel = message.flashServiceLabel;
15698
+ }
15699
+ if (message.enableGpuSnapshot !== false) {
15700
+ obj.enableGpuSnapshot = message.enableGpuSnapshot;
15701
+ }
15702
+ if (message.startupTimeoutSecs !== 0) {
15703
+ obj.startupTimeoutSecs = Math.round(message.startupTimeoutSecs);
15704
+ }
15257
15705
  return obj;
15258
15706
  },
15259
15707
  create(base) {
@@ -15344,6 +15792,9 @@ var FunctionMessage = {
15344
15792
  );
15345
15793
  message.mountClientDependencies = object.mountClientDependencies ?? false;
15346
15794
  message.flashServiceUrls = object.flashServiceUrls?.map((e) => e) || [];
15795
+ message.flashServiceLabel = object.flashServiceLabel ?? "";
15796
+ message.enableGpuSnapshot = object.enableGpuSnapshot ?? false;
15797
+ message.startupTimeoutSecs = object.startupTimeoutSecs ?? 0;
15347
15798
  return message;
15348
15799
  }
15349
15800
  };
@@ -15635,7 +16086,13 @@ var FunctionAsyncInvokeResponse = {
15635
16086
  }
15636
16087
  };
15637
16088
  function createBaseFunctionBindParamsRequest() {
15638
- return { functionId: "", serializedParams: new Uint8Array(0), functionOptions: void 0, environmentName: "" };
16089
+ return {
16090
+ functionId: "",
16091
+ serializedParams: new Uint8Array(0),
16092
+ functionOptions: void 0,
16093
+ environmentName: "",
16094
+ authSecret: ""
16095
+ };
15639
16096
  }
15640
16097
  var FunctionBindParamsRequest = {
15641
16098
  encode(message, writer = new BinaryWriter()) {
@@ -15651,6 +16108,9 @@ var FunctionBindParamsRequest = {
15651
16108
  if (message.environmentName !== "") {
15652
16109
  writer.uint32(34).string(message.environmentName);
15653
16110
  }
16111
+ if (message.authSecret !== "") {
16112
+ writer.uint32(42).string(message.authSecret);
16113
+ }
15654
16114
  return writer;
15655
16115
  },
15656
16116
  decode(input, length) {
@@ -15688,6 +16148,13 @@ var FunctionBindParamsRequest = {
15688
16148
  message.environmentName = reader.string();
15689
16149
  continue;
15690
16150
  }
16151
+ case 5: {
16152
+ if (tag !== 42) {
16153
+ break;
16154
+ }
16155
+ message.authSecret = reader.string();
16156
+ continue;
16157
+ }
15691
16158
  }
15692
16159
  if ((tag & 7) === 4 || tag === 0) {
15693
16160
  break;
@@ -15701,7 +16168,8 @@ var FunctionBindParamsRequest = {
15701
16168
  functionId: isSet3(object.functionId) ? globalThis.String(object.functionId) : "",
15702
16169
  serializedParams: isSet3(object.serializedParams) ? bytesFromBase64(object.serializedParams) : new Uint8Array(0),
15703
16170
  functionOptions: isSet3(object.functionOptions) ? FunctionOptions.fromJSON(object.functionOptions) : void 0,
15704
- environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : ""
16171
+ environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
16172
+ authSecret: isSet3(object.authSecret) ? globalThis.String(object.authSecret) : ""
15705
16173
  };
15706
16174
  },
15707
16175
  toJSON(message) {
@@ -15718,6 +16186,9 @@ var FunctionBindParamsRequest = {
15718
16186
  if (message.environmentName !== "") {
15719
16187
  obj.environmentName = message.environmentName;
15720
16188
  }
16189
+ if (message.authSecret !== "") {
16190
+ obj.authSecret = message.authSecret;
16191
+ }
15721
16192
  return obj;
15722
16193
  },
15723
16194
  create(base) {
@@ -15729,6 +16200,7 @@ var FunctionBindParamsRequest = {
15729
16200
  message.serializedParams = object.serializedParams ?? new Uint8Array(0);
15730
16201
  message.functionOptions = object.functionOptions !== void 0 && object.functionOptions !== null ? FunctionOptions.fromPartial(object.functionOptions) : void 0;
15731
16202
  message.environmentName = object.environmentName ?? "";
16203
+ message.authSecret = object.authSecret ?? "";
15732
16204
  return message;
15733
16205
  }
15734
16206
  };
@@ -15899,7 +16371,7 @@ var FunctionCallCallGraphInfo = {
15899
16371
  }
15900
16372
  };
15901
16373
  function createBaseFunctionCallCancelRequest() {
15902
- return { functionCallId: "", terminateContainers: false };
16374
+ return { functionCallId: "", terminateContainers: false, functionId: void 0 };
15903
16375
  }
15904
16376
  var FunctionCallCancelRequest = {
15905
16377
  encode(message, writer = new BinaryWriter()) {
@@ -15909,6 +16381,9 @@ var FunctionCallCancelRequest = {
15909
16381
  if (message.terminateContainers !== false) {
15910
16382
  writer.uint32(16).bool(message.terminateContainers);
15911
16383
  }
16384
+ if (message.functionId !== void 0) {
16385
+ writer.uint32(26).string(message.functionId);
16386
+ }
15912
16387
  return writer;
15913
16388
  },
15914
16389
  decode(input, length) {
@@ -15932,6 +16407,13 @@ var FunctionCallCancelRequest = {
15932
16407
  message.terminateContainers = reader.bool();
15933
16408
  continue;
15934
16409
  }
16410
+ case 3: {
16411
+ if (tag !== 26) {
16412
+ break;
16413
+ }
16414
+ message.functionId = reader.string();
16415
+ continue;
16416
+ }
15935
16417
  }
15936
16418
  if ((tag & 7) === 4 || tag === 0) {
15937
16419
  break;
@@ -15943,7 +16425,8 @@ var FunctionCallCancelRequest = {
15943
16425
  fromJSON(object) {
15944
16426
  return {
15945
16427
  functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
15946
- terminateContainers: isSet3(object.terminateContainers) ? globalThis.Boolean(object.terminateContainers) : false
16428
+ terminateContainers: isSet3(object.terminateContainers) ? globalThis.Boolean(object.terminateContainers) : false,
16429
+ functionId: isSet3(object.functionId) ? globalThis.String(object.functionId) : void 0
15947
16430
  };
15948
16431
  },
15949
16432
  toJSON(message) {
@@ -15954,6 +16437,9 @@ var FunctionCallCancelRequest = {
15954
16437
  if (message.terminateContainers !== false) {
15955
16438
  obj.terminateContainers = message.terminateContainers;
15956
16439
  }
16440
+ if (message.functionId !== void 0) {
16441
+ obj.functionId = message.functionId;
16442
+ }
15957
16443
  return obj;
15958
16444
  },
15959
16445
  create(base) {
@@ -15963,17 +16449,140 @@ var FunctionCallCancelRequest = {
15963
16449
  const message = createBaseFunctionCallCancelRequest();
15964
16450
  message.functionCallId = object.functionCallId ?? "";
15965
16451
  message.terminateContainers = object.terminateContainers ?? false;
16452
+ message.functionId = object.functionId ?? void 0;
16453
+ return message;
16454
+ }
16455
+ };
16456
+ function createBaseFunctionCallFromIdRequest() {
16457
+ return { functionCallId: "" };
16458
+ }
16459
+ var FunctionCallFromIdRequest = {
16460
+ encode(message, writer = new BinaryWriter()) {
16461
+ if (message.functionCallId !== "") {
16462
+ writer.uint32(10).string(message.functionCallId);
16463
+ }
16464
+ return writer;
16465
+ },
16466
+ decode(input, length) {
16467
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
16468
+ let end = length === void 0 ? reader.len : reader.pos + length;
16469
+ const message = createBaseFunctionCallFromIdRequest();
16470
+ while (reader.pos < end) {
16471
+ const tag = reader.uint32();
16472
+ switch (tag >>> 3) {
16473
+ case 1: {
16474
+ if (tag !== 10) {
16475
+ break;
16476
+ }
16477
+ message.functionCallId = reader.string();
16478
+ continue;
16479
+ }
16480
+ }
16481
+ if ((tag & 7) === 4 || tag === 0) {
16482
+ break;
16483
+ }
16484
+ reader.skip(tag & 7);
16485
+ }
16486
+ return message;
16487
+ },
16488
+ fromJSON(object) {
16489
+ return { functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "" };
16490
+ },
16491
+ toJSON(message) {
16492
+ const obj = {};
16493
+ if (message.functionCallId !== "") {
16494
+ obj.functionCallId = message.functionCallId;
16495
+ }
16496
+ return obj;
16497
+ },
16498
+ create(base) {
16499
+ return FunctionCallFromIdRequest.fromPartial(base ?? {});
16500
+ },
16501
+ fromPartial(object) {
16502
+ const message = createBaseFunctionCallFromIdRequest();
16503
+ message.functionCallId = object.functionCallId ?? "";
16504
+ return message;
16505
+ }
16506
+ };
16507
+ function createBaseFunctionCallFromIdResponse() {
16508
+ return { functionCallId: "", numInputs: 0 };
16509
+ }
16510
+ var FunctionCallFromIdResponse = {
16511
+ encode(message, writer = new BinaryWriter()) {
16512
+ if (message.functionCallId !== "") {
16513
+ writer.uint32(10).string(message.functionCallId);
16514
+ }
16515
+ if (message.numInputs !== 0) {
16516
+ writer.uint32(16).int32(message.numInputs);
16517
+ }
16518
+ return writer;
16519
+ },
16520
+ decode(input, length) {
16521
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
16522
+ let end = length === void 0 ? reader.len : reader.pos + length;
16523
+ const message = createBaseFunctionCallFromIdResponse();
16524
+ while (reader.pos < end) {
16525
+ const tag = reader.uint32();
16526
+ switch (tag >>> 3) {
16527
+ case 1: {
16528
+ if (tag !== 10) {
16529
+ break;
16530
+ }
16531
+ message.functionCallId = reader.string();
16532
+ continue;
16533
+ }
16534
+ case 2: {
16535
+ if (tag !== 16) {
16536
+ break;
16537
+ }
16538
+ message.numInputs = reader.int32();
16539
+ continue;
16540
+ }
16541
+ }
16542
+ if ((tag & 7) === 4 || tag === 0) {
16543
+ break;
16544
+ }
16545
+ reader.skip(tag & 7);
16546
+ }
16547
+ return message;
16548
+ },
16549
+ fromJSON(object) {
16550
+ return {
16551
+ functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
16552
+ numInputs: isSet3(object.numInputs) ? globalThis.Number(object.numInputs) : 0
16553
+ };
16554
+ },
16555
+ toJSON(message) {
16556
+ const obj = {};
16557
+ if (message.functionCallId !== "") {
16558
+ obj.functionCallId = message.functionCallId;
16559
+ }
16560
+ if (message.numInputs !== 0) {
16561
+ obj.numInputs = Math.round(message.numInputs);
16562
+ }
16563
+ return obj;
16564
+ },
16565
+ create(base) {
16566
+ return FunctionCallFromIdResponse.fromPartial(base ?? {});
16567
+ },
16568
+ fromPartial(object) {
16569
+ const message = createBaseFunctionCallFromIdResponse();
16570
+ message.functionCallId = object.functionCallId ?? "";
16571
+ message.numInputs = object.numInputs ?? 0;
15966
16572
  return message;
15967
16573
  }
15968
16574
  };
15969
16575
  function createBaseFunctionCallGetDataRequest() {
15970
- return { functionCallId: "", lastIndex: 0 };
16576
+ return { functionCallId: void 0, attemptToken: void 0, lastIndex: 0 };
15971
16577
  }
15972
16578
  var FunctionCallGetDataRequest = {
15973
16579
  encode(message, writer = new BinaryWriter()) {
15974
- if (message.functionCallId !== "") {
16580
+ if (message.functionCallId !== void 0) {
15975
16581
  writer.uint32(10).string(message.functionCallId);
15976
16582
  }
16583
+ if (message.attemptToken !== void 0) {
16584
+ writer.uint32(26).string(message.attemptToken);
16585
+ }
15977
16586
  if (message.lastIndex !== 0) {
15978
16587
  writer.uint32(16).uint64(message.lastIndex);
15979
16588
  }
@@ -15993,6 +16602,13 @@ var FunctionCallGetDataRequest = {
15993
16602
  message.functionCallId = reader.string();
15994
16603
  continue;
15995
16604
  }
16605
+ case 3: {
16606
+ if (tag !== 26) {
16607
+ break;
16608
+ }
16609
+ message.attemptToken = reader.string();
16610
+ continue;
16611
+ }
15996
16612
  case 2: {
15997
16613
  if (tag !== 16) {
15998
16614
  break;
@@ -16010,15 +16626,19 @@ var FunctionCallGetDataRequest = {
16010
16626
  },
16011
16627
  fromJSON(object) {
16012
16628
  return {
16013
- functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
16629
+ functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : void 0,
16630
+ attemptToken: isSet3(object.attemptToken) ? globalThis.String(object.attemptToken) : void 0,
16014
16631
  lastIndex: isSet3(object.lastIndex) ? globalThis.Number(object.lastIndex) : 0
16015
16632
  };
16016
16633
  },
16017
16634
  toJSON(message) {
16018
16635
  const obj = {};
16019
- if (message.functionCallId !== "") {
16636
+ if (message.functionCallId !== void 0) {
16020
16637
  obj.functionCallId = message.functionCallId;
16021
16638
  }
16639
+ if (message.attemptToken !== void 0) {
16640
+ obj.attemptToken = message.attemptToken;
16641
+ }
16022
16642
  if (message.lastIndex !== 0) {
16023
16643
  obj.lastIndex = Math.round(message.lastIndex);
16024
16644
  }
@@ -16029,7 +16649,8 @@ var FunctionCallGetDataRequest = {
16029
16649
  },
16030
16650
  fromPartial(object) {
16031
16651
  const message = createBaseFunctionCallGetDataRequest();
16032
- message.functionCallId = object.functionCallId ?? "";
16652
+ message.functionCallId = object.functionCallId ?? void 0;
16653
+ message.attemptToken = object.attemptToken ?? void 0;
16033
16654
  message.lastIndex = object.lastIndex ?? 0;
16034
16655
  return message;
16035
16656
  }
@@ -16338,13 +16959,16 @@ var FunctionCallListResponse = {
16338
16959
  }
16339
16960
  };
16340
16961
  function createBaseFunctionCallPutDataRequest() {
16341
- return { functionCallId: "", dataChunks: [] };
16962
+ return { functionCallId: void 0, attemptToken: void 0, dataChunks: [] };
16342
16963
  }
16343
16964
  var FunctionCallPutDataRequest = {
16344
16965
  encode(message, writer = new BinaryWriter()) {
16345
- if (message.functionCallId !== "") {
16966
+ if (message.functionCallId !== void 0) {
16346
16967
  writer.uint32(10).string(message.functionCallId);
16347
16968
  }
16969
+ if (message.attemptToken !== void 0) {
16970
+ writer.uint32(26).string(message.attemptToken);
16971
+ }
16348
16972
  for (const v of message.dataChunks) {
16349
16973
  DataChunk.encode(v, writer.uint32(18).fork()).join();
16350
16974
  }
@@ -16364,6 +16988,13 @@ var FunctionCallPutDataRequest = {
16364
16988
  message.functionCallId = reader.string();
16365
16989
  continue;
16366
16990
  }
16991
+ case 3: {
16992
+ if (tag !== 26) {
16993
+ break;
16994
+ }
16995
+ message.attemptToken = reader.string();
16996
+ continue;
16997
+ }
16367
16998
  case 2: {
16368
16999
  if (tag !== 18) {
16369
17000
  break;
@@ -16381,15 +17012,19 @@ var FunctionCallPutDataRequest = {
16381
17012
  },
16382
17013
  fromJSON(object) {
16383
17014
  return {
16384
- functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
17015
+ functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : void 0,
17016
+ attemptToken: isSet3(object.attemptToken) ? globalThis.String(object.attemptToken) : void 0,
16385
17017
  dataChunks: globalThis.Array.isArray(object?.dataChunks) ? object.dataChunks.map((e) => DataChunk.fromJSON(e)) : []
16386
17018
  };
16387
17019
  },
16388
17020
  toJSON(message) {
16389
17021
  const obj = {};
16390
- if (message.functionCallId !== "") {
17022
+ if (message.functionCallId !== void 0) {
16391
17023
  obj.functionCallId = message.functionCallId;
16392
17024
  }
17025
+ if (message.attemptToken !== void 0) {
17026
+ obj.attemptToken = message.attemptToken;
17027
+ }
16393
17028
  if (message.dataChunks?.length) {
16394
17029
  obj.dataChunks = message.dataChunks.map((e) => DataChunk.toJSON(e));
16395
17030
  }
@@ -16400,7 +17035,8 @@ var FunctionCallPutDataRequest = {
16400
17035
  },
16401
17036
  fromPartial(object) {
16402
17037
  const message = createBaseFunctionCallPutDataRequest();
16403
- message.functionCallId = object.functionCallId ?? "";
17038
+ message.functionCallId = object.functionCallId ?? void 0;
17039
+ message.attemptToken = object.attemptToken ?? void 0;
16404
17040
  message.dataChunks = object.dataChunks?.map((e) => DataChunk.fromPartial(e)) || [];
16405
17041
  return message;
16406
17042
  }
@@ -16665,7 +17301,9 @@ function createBaseFunctionData() {
16665
17301
  autoscalerSettings: void 0,
16666
17302
  functionSchema: void 0,
16667
17303
  experimentalOptions: {},
16668
- flashServiceUrls: []
17304
+ flashServiceUrls: [],
17305
+ flashServiceLabel: "",
17306
+ startupTimeoutSecs: 0
16669
17307
  };
16670
17308
  }
16671
17309
  var FunctionData = {
@@ -16769,6 +17407,12 @@ var FunctionData = {
16769
17407
  for (const v of message.flashServiceUrls) {
16770
17408
  writer.uint32(274).string(v);
16771
17409
  }
17410
+ if (message.flashServiceLabel !== "") {
17411
+ writer.uint32(282).string(message.flashServiceLabel);
17412
+ }
17413
+ if (message.startupTimeoutSecs !== 0) {
17414
+ writer.uint32(288).uint32(message.startupTimeoutSecs);
17415
+ }
16772
17416
  return writer;
16773
17417
  },
16774
17418
  decode(input, length) {
@@ -17015,6 +17659,20 @@ var FunctionData = {
17015
17659
  message.flashServiceUrls.push(reader.string());
17016
17660
  continue;
17017
17661
  }
17662
+ case 35: {
17663
+ if (tag !== 282) {
17664
+ break;
17665
+ }
17666
+ message.flashServiceLabel = reader.string();
17667
+ continue;
17668
+ }
17669
+ case 36: {
17670
+ if (tag !== 288) {
17671
+ break;
17672
+ }
17673
+ message.startupTimeoutSecs = reader.uint32();
17674
+ continue;
17675
+ }
17018
17676
  }
17019
17677
  if ((tag & 7) === 4 || tag === 0) {
17020
17678
  break;
@@ -17063,7 +17721,9 @@ var FunctionData = {
17063
17721
  acc[key] = String(value);
17064
17722
  return acc;
17065
17723
  }, {}) : {},
17066
- flashServiceUrls: globalThis.Array.isArray(object?.flashServiceUrls) ? object.flashServiceUrls.map((e) => globalThis.String(e)) : []
17724
+ flashServiceUrls: globalThis.Array.isArray(object?.flashServiceUrls) ? object.flashServiceUrls.map((e) => globalThis.String(e)) : [],
17725
+ flashServiceLabel: isSet3(object.flashServiceLabel) ? globalThis.String(object.flashServiceLabel) : "",
17726
+ startupTimeoutSecs: isSet3(object.startupTimeoutSecs) ? globalThis.Number(object.startupTimeoutSecs) : 0
17067
17727
  };
17068
17728
  },
17069
17729
  toJSON(message) {
@@ -17179,6 +17839,12 @@ var FunctionData = {
17179
17839
  if (message.flashServiceUrls?.length) {
17180
17840
  obj.flashServiceUrls = message.flashServiceUrls;
17181
17841
  }
17842
+ if (message.flashServiceLabel !== "") {
17843
+ obj.flashServiceLabel = message.flashServiceLabel;
17844
+ }
17845
+ if (message.startupTimeoutSecs !== 0) {
17846
+ obj.startupTimeoutSecs = Math.round(message.startupTimeoutSecs);
17847
+ }
17182
17848
  return obj;
17183
17849
  },
17184
17850
  create(base) {
@@ -17232,6 +17898,8 @@ var FunctionData = {
17232
17898
  {}
17233
17899
  );
17234
17900
  message.flashServiceUrls = object.flashServiceUrls?.map((e) => e) || [];
17901
+ message.flashServiceLabel = object.flashServiceLabel ?? "";
17902
+ message.startupTimeoutSecs = object.startupTimeoutSecs ?? 0;
17235
17903
  return message;
17236
17904
  }
17237
17905
  };
@@ -17439,6 +18107,89 @@ var FunctionData_ExperimentalOptionsEntry = {
17439
18107
  return message;
17440
18108
  }
17441
18109
  };
18110
+ function createBaseFunctionFinishInputsRequest() {
18111
+ return { functionId: "", functionCallId: "", numInputs: 0 };
18112
+ }
18113
+ var FunctionFinishInputsRequest = {
18114
+ encode(message, writer = new BinaryWriter()) {
18115
+ if (message.functionId !== "") {
18116
+ writer.uint32(10).string(message.functionId);
18117
+ }
18118
+ if (message.functionCallId !== "") {
18119
+ writer.uint32(18).string(message.functionCallId);
18120
+ }
18121
+ if (message.numInputs !== 0) {
18122
+ writer.uint32(24).uint32(message.numInputs);
18123
+ }
18124
+ return writer;
18125
+ },
18126
+ decode(input, length) {
18127
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
18128
+ let end = length === void 0 ? reader.len : reader.pos + length;
18129
+ const message = createBaseFunctionFinishInputsRequest();
18130
+ while (reader.pos < end) {
18131
+ const tag = reader.uint32();
18132
+ switch (tag >>> 3) {
18133
+ case 1: {
18134
+ if (tag !== 10) {
18135
+ break;
18136
+ }
18137
+ message.functionId = reader.string();
18138
+ continue;
18139
+ }
18140
+ case 2: {
18141
+ if (tag !== 18) {
18142
+ break;
18143
+ }
18144
+ message.functionCallId = reader.string();
18145
+ continue;
18146
+ }
18147
+ case 3: {
18148
+ if (tag !== 24) {
18149
+ break;
18150
+ }
18151
+ message.numInputs = reader.uint32();
18152
+ continue;
18153
+ }
18154
+ }
18155
+ if ((tag & 7) === 4 || tag === 0) {
18156
+ break;
18157
+ }
18158
+ reader.skip(tag & 7);
18159
+ }
18160
+ return message;
18161
+ },
18162
+ fromJSON(object) {
18163
+ return {
18164
+ functionId: isSet3(object.functionId) ? globalThis.String(object.functionId) : "",
18165
+ functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
18166
+ numInputs: isSet3(object.numInputs) ? globalThis.Number(object.numInputs) : 0
18167
+ };
18168
+ },
18169
+ toJSON(message) {
18170
+ const obj = {};
18171
+ if (message.functionId !== "") {
18172
+ obj.functionId = message.functionId;
18173
+ }
18174
+ if (message.functionCallId !== "") {
18175
+ obj.functionCallId = message.functionCallId;
18176
+ }
18177
+ if (message.numInputs !== 0) {
18178
+ obj.numInputs = Math.round(message.numInputs);
18179
+ }
18180
+ return obj;
18181
+ },
18182
+ create(base) {
18183
+ return FunctionFinishInputsRequest.fromPartial(base ?? {});
18184
+ },
18185
+ fromPartial(object) {
18186
+ const message = createBaseFunctionFinishInputsRequest();
18187
+ message.functionId = object.functionId ?? "";
18188
+ message.functionCallId = object.functionCallId ?? "";
18189
+ message.numInputs = object.numInputs ?? 0;
18190
+ return message;
18191
+ }
18192
+ };
17442
18193
  function createBaseFunctionGetCallGraphRequest() {
17443
18194
  return { functionCallId: "" };
17444
18195
  }
@@ -17750,7 +18501,9 @@ function createBaseFunctionGetInputsItem() {
17750
18501
  killSwitch: false,
17751
18502
  functionCallId: "",
17752
18503
  functionCallInvocationType: 0,
17753
- retryCount: 0
18504
+ retryCount: 0,
18505
+ functionMapIdx: void 0,
18506
+ attemptToken: ""
17754
18507
  };
17755
18508
  }
17756
18509
  var FunctionGetInputsItem = {
@@ -17773,6 +18526,12 @@ var FunctionGetInputsItem = {
17773
18526
  if (message.retryCount !== 0) {
17774
18527
  writer.uint32(56).uint32(message.retryCount);
17775
18528
  }
18529
+ if (message.functionMapIdx !== void 0) {
18530
+ writer.uint32(64).int32(message.functionMapIdx);
18531
+ }
18532
+ if (message.attemptToken !== "") {
18533
+ writer.uint32(74).string(message.attemptToken);
18534
+ }
17776
18535
  return writer;
17777
18536
  },
17778
18537
  decode(input, length) {
@@ -17824,6 +18583,20 @@ var FunctionGetInputsItem = {
17824
18583
  message.retryCount = reader.uint32();
17825
18584
  continue;
17826
18585
  }
18586
+ case 8: {
18587
+ if (tag !== 64) {
18588
+ break;
18589
+ }
18590
+ message.functionMapIdx = reader.int32();
18591
+ continue;
18592
+ }
18593
+ case 9: {
18594
+ if (tag !== 74) {
18595
+ break;
18596
+ }
18597
+ message.attemptToken = reader.string();
18598
+ continue;
18599
+ }
17827
18600
  }
17828
18601
  if ((tag & 7) === 4 || tag === 0) {
17829
18602
  break;
@@ -17839,7 +18612,9 @@ var FunctionGetInputsItem = {
17839
18612
  killSwitch: isSet3(object.killSwitch) ? globalThis.Boolean(object.killSwitch) : false,
17840
18613
  functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
17841
18614
  functionCallInvocationType: isSet3(object.functionCallInvocationType) ? functionCallInvocationTypeFromJSON(object.functionCallInvocationType) : 0,
17842
- retryCount: isSet3(object.retryCount) ? globalThis.Number(object.retryCount) : 0
18615
+ retryCount: isSet3(object.retryCount) ? globalThis.Number(object.retryCount) : 0,
18616
+ functionMapIdx: isSet3(object.functionMapIdx) ? globalThis.Number(object.functionMapIdx) : void 0,
18617
+ attemptToken: isSet3(object.attemptToken) ? globalThis.String(object.attemptToken) : ""
17843
18618
  };
17844
18619
  },
17845
18620
  toJSON(message) {
@@ -17862,6 +18637,12 @@ var FunctionGetInputsItem = {
17862
18637
  if (message.retryCount !== 0) {
17863
18638
  obj.retryCount = Math.round(message.retryCount);
17864
18639
  }
18640
+ if (message.functionMapIdx !== void 0) {
18641
+ obj.functionMapIdx = Math.round(message.functionMapIdx);
18642
+ }
18643
+ if (message.attemptToken !== "") {
18644
+ obj.attemptToken = message.attemptToken;
18645
+ }
17865
18646
  return obj;
17866
18647
  },
17867
18648
  create(base) {
@@ -17875,6 +18656,8 @@ var FunctionGetInputsItem = {
17875
18656
  message.functionCallId = object.functionCallId ?? "";
17876
18657
  message.functionCallInvocationType = object.functionCallInvocationType ?? 0;
17877
18658
  message.retryCount = object.retryCount ?? 0;
18659
+ message.functionMapIdx = object.functionMapIdx ?? void 0;
18660
+ message.attemptToken = object.attemptToken ?? "";
17878
18661
  return message;
17879
18662
  }
17880
18663
  };
@@ -18265,7 +19048,9 @@ function createBaseFunctionGetOutputsRequest() {
18265
19048
  lastEntryId: "",
18266
19049
  clearOnSuccess: false,
18267
19050
  requestedAt: 0,
18268
- inputJwts: []
19051
+ inputJwts: [],
19052
+ startIdx: void 0,
19053
+ endIdx: void 0
18269
19054
  };
18270
19055
  }
18271
19056
  var FunctionGetOutputsRequest = {
@@ -18291,6 +19076,12 @@ var FunctionGetOutputsRequest = {
18291
19076
  for (const v of message.inputJwts) {
18292
19077
  writer.uint32(74).string(v);
18293
19078
  }
19079
+ if (message.startIdx !== void 0) {
19080
+ writer.uint32(80).int32(message.startIdx);
19081
+ }
19082
+ if (message.endIdx !== void 0) {
19083
+ writer.uint32(88).int32(message.endIdx);
19084
+ }
18294
19085
  return writer;
18295
19086
  },
18296
19087
  decode(input, length) {
@@ -18349,6 +19140,20 @@ var FunctionGetOutputsRequest = {
18349
19140
  message.inputJwts.push(reader.string());
18350
19141
  continue;
18351
19142
  }
19143
+ case 10: {
19144
+ if (tag !== 80) {
19145
+ break;
19146
+ }
19147
+ message.startIdx = reader.int32();
19148
+ continue;
19149
+ }
19150
+ case 11: {
19151
+ if (tag !== 88) {
19152
+ break;
19153
+ }
19154
+ message.endIdx = reader.int32();
19155
+ continue;
19156
+ }
18352
19157
  }
18353
19158
  if ((tag & 7) === 4 || tag === 0) {
18354
19159
  break;
@@ -18365,7 +19170,9 @@ var FunctionGetOutputsRequest = {
18365
19170
  lastEntryId: isSet3(object.lastEntryId) ? globalThis.String(object.lastEntryId) : "",
18366
19171
  clearOnSuccess: isSet3(object.clearOnSuccess) ? globalThis.Boolean(object.clearOnSuccess) : false,
18367
19172
  requestedAt: isSet3(object.requestedAt) ? globalThis.Number(object.requestedAt) : 0,
18368
- inputJwts: globalThis.Array.isArray(object?.inputJwts) ? object.inputJwts.map((e) => globalThis.String(e)) : []
19173
+ inputJwts: globalThis.Array.isArray(object?.inputJwts) ? object.inputJwts.map((e) => globalThis.String(e)) : [],
19174
+ startIdx: isSet3(object.startIdx) ? globalThis.Number(object.startIdx) : void 0,
19175
+ endIdx: isSet3(object.endIdx) ? globalThis.Number(object.endIdx) : void 0
18369
19176
  };
18370
19177
  },
18371
19178
  toJSON(message) {
@@ -18391,6 +19198,12 @@ var FunctionGetOutputsRequest = {
18391
19198
  if (message.inputJwts?.length) {
18392
19199
  obj.inputJwts = message.inputJwts;
18393
19200
  }
19201
+ if (message.startIdx !== void 0) {
19202
+ obj.startIdx = Math.round(message.startIdx);
19203
+ }
19204
+ if (message.endIdx !== void 0) {
19205
+ obj.endIdx = Math.round(message.endIdx);
19206
+ }
18394
19207
  return obj;
18395
19208
  },
18396
19209
  create(base) {
@@ -18405,6 +19218,8 @@ var FunctionGetOutputsRequest = {
18405
19218
  message.clearOnSuccess = object.clearOnSuccess ?? false;
18406
19219
  message.requestedAt = object.requestedAt ?? 0;
18407
19220
  message.inputJwts = object.inputJwts?.map((e) => e) || [];
19221
+ message.startIdx = object.startIdx ?? void 0;
19222
+ message.endIdx = object.endIdx ?? void 0;
18408
19223
  return message;
18409
19224
  }
18410
19225
  };
@@ -19551,7 +20366,9 @@ function createBaseFunctionOptions() {
19551
20366
  bufferContainers: void 0,
19552
20367
  maxConcurrentInputs: void 0,
19553
20368
  batchMaxSize: void 0,
19554
- batchLingerMs: void 0
20369
+ batchLingerMs: void 0,
20370
+ schedulerPlacement: void 0,
20371
+ cloudProviderStr: void 0
19555
20372
  };
19556
20373
  }
19557
20374
  var FunctionOptions = {
@@ -19604,6 +20421,12 @@ var FunctionOptions = {
19604
20421
  if (message.batchLingerMs !== void 0) {
19605
20422
  writer.uint32(128).uint64(message.batchLingerMs);
19606
20423
  }
20424
+ if (message.schedulerPlacement !== void 0) {
20425
+ SchedulerPlacement.encode(message.schedulerPlacement, writer.uint32(138).fork()).join();
20426
+ }
20427
+ if (message.cloudProviderStr !== void 0) {
20428
+ writer.uint32(146).string(message.cloudProviderStr);
20429
+ }
19607
20430
  return writer;
19608
20431
  },
19609
20432
  decode(input, length) {
@@ -19725,6 +20548,20 @@ var FunctionOptions = {
19725
20548
  message.batchLingerMs = longToNumber(reader.uint64());
19726
20549
  continue;
19727
20550
  }
20551
+ case 17: {
20552
+ if (tag !== 138) {
20553
+ break;
20554
+ }
20555
+ message.schedulerPlacement = SchedulerPlacement.decode(reader, reader.uint32());
20556
+ continue;
20557
+ }
20558
+ case 18: {
20559
+ if (tag !== 146) {
20560
+ break;
20561
+ }
20562
+ message.cloudProviderStr = reader.string();
20563
+ continue;
20564
+ }
19728
20565
  }
19729
20566
  if ((tag & 7) === 4 || tag === 0) {
19730
20567
  break;
@@ -19750,7 +20587,9 @@ var FunctionOptions = {
19750
20587
  bufferContainers: isSet3(object.bufferContainers) ? globalThis.Number(object.bufferContainers) : void 0,
19751
20588
  maxConcurrentInputs: isSet3(object.maxConcurrentInputs) ? globalThis.Number(object.maxConcurrentInputs) : void 0,
19752
20589
  batchMaxSize: isSet3(object.batchMaxSize) ? globalThis.Number(object.batchMaxSize) : void 0,
19753
- batchLingerMs: isSet3(object.batchLingerMs) ? globalThis.Number(object.batchLingerMs) : void 0
20590
+ batchLingerMs: isSet3(object.batchLingerMs) ? globalThis.Number(object.batchLingerMs) : void 0,
20591
+ schedulerPlacement: isSet3(object.schedulerPlacement) ? SchedulerPlacement.fromJSON(object.schedulerPlacement) : void 0,
20592
+ cloudProviderStr: isSet3(object.cloudProviderStr) ? globalThis.String(object.cloudProviderStr) : void 0
19754
20593
  };
19755
20594
  },
19756
20595
  toJSON(message) {
@@ -19803,6 +20642,12 @@ var FunctionOptions = {
19803
20642
  if (message.batchLingerMs !== void 0) {
19804
20643
  obj.batchLingerMs = Math.round(message.batchLingerMs);
19805
20644
  }
20645
+ if (message.schedulerPlacement !== void 0) {
20646
+ obj.schedulerPlacement = SchedulerPlacement.toJSON(message.schedulerPlacement);
20647
+ }
20648
+ if (message.cloudProviderStr !== void 0) {
20649
+ obj.cloudProviderStr = message.cloudProviderStr;
20650
+ }
19806
20651
  return obj;
19807
20652
  },
19808
20653
  create(base) {
@@ -19826,6 +20671,8 @@ var FunctionOptions = {
19826
20671
  message.maxConcurrentInputs = object.maxConcurrentInputs ?? void 0;
19827
20672
  message.batchMaxSize = object.batchMaxSize ?? void 0;
19828
20673
  message.batchLingerMs = object.batchLingerMs ?? void 0;
20674
+ message.schedulerPlacement = object.schedulerPlacement !== void 0 && object.schedulerPlacement !== null ? SchedulerPlacement.fromPartial(object.schedulerPlacement) : void 0;
20675
+ message.cloudProviderStr = object.cloudProviderStr ?? void 0;
19829
20676
  return message;
19830
20677
  }
19831
20678
  };
@@ -20166,7 +21013,7 @@ var FunctionPrecreateResponse = {
20166
21013
  }
20167
21014
  };
20168
21015
  function createBaseFunctionPutInputsItem() {
20169
- return { idx: 0, input: void 0, r2Failed: false, r2LatencyMs: 0 };
21016
+ return { idx: 0, input: void 0, r2Failed: false, r2ThroughputBytesS: 0 };
20170
21017
  }
20171
21018
  var FunctionPutInputsItem = {
20172
21019
  encode(message, writer = new BinaryWriter()) {
@@ -20179,8 +21026,8 @@ var FunctionPutInputsItem = {
20179
21026
  if (message.r2Failed !== false) {
20180
21027
  writer.uint32(24).bool(message.r2Failed);
20181
21028
  }
20182
- if (message.r2LatencyMs !== 0) {
20183
- writer.uint32(32).uint64(message.r2LatencyMs);
21029
+ if (message.r2ThroughputBytesS !== 0) {
21030
+ writer.uint32(40).uint64(message.r2ThroughputBytesS);
20184
21031
  }
20185
21032
  return writer;
20186
21033
  },
@@ -20212,11 +21059,11 @@ var FunctionPutInputsItem = {
20212
21059
  message.r2Failed = reader.bool();
20213
21060
  continue;
20214
21061
  }
20215
- case 4: {
20216
- if (tag !== 32) {
21062
+ case 5: {
21063
+ if (tag !== 40) {
20217
21064
  break;
20218
21065
  }
20219
- message.r2LatencyMs = longToNumber(reader.uint64());
21066
+ message.r2ThroughputBytesS = longToNumber(reader.uint64());
20220
21067
  continue;
20221
21068
  }
20222
21069
  }
@@ -20232,7 +21079,7 @@ var FunctionPutInputsItem = {
20232
21079
  idx: isSet3(object.idx) ? globalThis.Number(object.idx) : 0,
20233
21080
  input: isSet3(object.input) ? FunctionInput.fromJSON(object.input) : void 0,
20234
21081
  r2Failed: isSet3(object.r2Failed) ? globalThis.Boolean(object.r2Failed) : false,
20235
- r2LatencyMs: isSet3(object.r2LatencyMs) ? globalThis.Number(object.r2LatencyMs) : 0
21082
+ r2ThroughputBytesS: isSet3(object.r2ThroughputBytesS) ? globalThis.Number(object.r2ThroughputBytesS) : 0
20236
21083
  };
20237
21084
  },
20238
21085
  toJSON(message) {
@@ -20246,8 +21093,8 @@ var FunctionPutInputsItem = {
20246
21093
  if (message.r2Failed !== false) {
20247
21094
  obj.r2Failed = message.r2Failed;
20248
21095
  }
20249
- if (message.r2LatencyMs !== 0) {
20250
- obj.r2LatencyMs = Math.round(message.r2LatencyMs);
21096
+ if (message.r2ThroughputBytesS !== 0) {
21097
+ obj.r2ThroughputBytesS = Math.round(message.r2ThroughputBytesS);
20251
21098
  }
20252
21099
  return obj;
20253
21100
  },
@@ -20259,7 +21106,7 @@ var FunctionPutInputsItem = {
20259
21106
  message.idx = object.idx ?? 0;
20260
21107
  message.input = object.input !== void 0 && object.input !== null ? FunctionInput.fromPartial(object.input) : void 0;
20261
21108
  message.r2Failed = object.r2Failed ?? false;
20262
- message.r2LatencyMs = object.r2LatencyMs ?? 0;
21109
+ message.r2ThroughputBytesS = object.r2ThroughputBytesS ?? 0;
20263
21110
  return message;
20264
21111
  }
20265
21112
  };
@@ -20483,7 +21330,16 @@ var FunctionPutInputsResponseItem = {
20483
21330
  }
20484
21331
  };
20485
21332
  function createBaseFunctionPutOutputsItem() {
20486
- return { inputId: "", result: void 0, inputStartedAt: 0, outputCreatedAt: 0, dataFormat: 0, retryCount: 0 };
21333
+ return {
21334
+ inputId: "",
21335
+ result: void 0,
21336
+ inputStartedAt: 0,
21337
+ outputCreatedAt: 0,
21338
+ dataFormat: 0,
21339
+ retryCount: 0,
21340
+ functionCallId: "",
21341
+ functionMapIdx: void 0
21342
+ };
20487
21343
  }
20488
21344
  var FunctionPutOutputsItem = {
20489
21345
  encode(message, writer = new BinaryWriter()) {
@@ -20505,6 +21361,12 @@ var FunctionPutOutputsItem = {
20505
21361
  if (message.retryCount !== 0) {
20506
21362
  writer.uint32(64).uint32(message.retryCount);
20507
21363
  }
21364
+ if (message.functionCallId !== "") {
21365
+ writer.uint32(74).string(message.functionCallId);
21366
+ }
21367
+ if (message.functionMapIdx !== void 0) {
21368
+ writer.uint32(80).int32(message.functionMapIdx);
21369
+ }
20508
21370
  return writer;
20509
21371
  },
20510
21372
  decode(input, length) {
@@ -20556,6 +21418,20 @@ var FunctionPutOutputsItem = {
20556
21418
  message.retryCount = reader.uint32();
20557
21419
  continue;
20558
21420
  }
21421
+ case 9: {
21422
+ if (tag !== 74) {
21423
+ break;
21424
+ }
21425
+ message.functionCallId = reader.string();
21426
+ continue;
21427
+ }
21428
+ case 10: {
21429
+ if (tag !== 80) {
21430
+ break;
21431
+ }
21432
+ message.functionMapIdx = reader.int32();
21433
+ continue;
21434
+ }
20559
21435
  }
20560
21436
  if ((tag & 7) === 4 || tag === 0) {
20561
21437
  break;
@@ -20571,7 +21447,9 @@ var FunctionPutOutputsItem = {
20571
21447
  inputStartedAt: isSet3(object.inputStartedAt) ? globalThis.Number(object.inputStartedAt) : 0,
20572
21448
  outputCreatedAt: isSet3(object.outputCreatedAt) ? globalThis.Number(object.outputCreatedAt) : 0,
20573
21449
  dataFormat: isSet3(object.dataFormat) ? dataFormatFromJSON(object.dataFormat) : 0,
20574
- retryCount: isSet3(object.retryCount) ? globalThis.Number(object.retryCount) : 0
21450
+ retryCount: isSet3(object.retryCount) ? globalThis.Number(object.retryCount) : 0,
21451
+ functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
21452
+ functionMapIdx: isSet3(object.functionMapIdx) ? globalThis.Number(object.functionMapIdx) : void 0
20575
21453
  };
20576
21454
  },
20577
21455
  toJSON(message) {
@@ -20594,6 +21472,12 @@ var FunctionPutOutputsItem = {
20594
21472
  if (message.retryCount !== 0) {
20595
21473
  obj.retryCount = Math.round(message.retryCount);
20596
21474
  }
21475
+ if (message.functionCallId !== "") {
21476
+ obj.functionCallId = message.functionCallId;
21477
+ }
21478
+ if (message.functionMapIdx !== void 0) {
21479
+ obj.functionMapIdx = Math.round(message.functionMapIdx);
21480
+ }
20597
21481
  return obj;
20598
21482
  },
20599
21483
  create(base) {
@@ -20607,6 +21491,8 @@ var FunctionPutOutputsItem = {
20607
21491
  message.outputCreatedAt = object.outputCreatedAt ?? 0;
20608
21492
  message.dataFormat = object.dataFormat ?? 0;
20609
21493
  message.retryCount = object.retryCount ?? 0;
21494
+ message.functionCallId = object.functionCallId ?? "";
21495
+ message.functionMapIdx = object.functionMapIdx ?? void 0;
20610
21496
  return message;
20611
21497
  }
20612
21498
  };
@@ -23235,6 +24121,662 @@ var InputInfo = {
23235
24121
  return message;
23236
24122
  }
23237
24123
  };
24124
+ function createBaseListPagination() {
24125
+ return { maxObjects: 0, createdBefore: 0 };
24126
+ }
24127
+ var ListPagination = {
24128
+ encode(message, writer = new BinaryWriter()) {
24129
+ if (message.maxObjects !== 0) {
24130
+ writer.uint32(8).int32(message.maxObjects);
24131
+ }
24132
+ if (message.createdBefore !== 0) {
24133
+ writer.uint32(17).double(message.createdBefore);
24134
+ }
24135
+ return writer;
24136
+ },
24137
+ decode(input, length) {
24138
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24139
+ let end = length === void 0 ? reader.len : reader.pos + length;
24140
+ const message = createBaseListPagination();
24141
+ while (reader.pos < end) {
24142
+ const tag = reader.uint32();
24143
+ switch (tag >>> 3) {
24144
+ case 1: {
24145
+ if (tag !== 8) {
24146
+ break;
24147
+ }
24148
+ message.maxObjects = reader.int32();
24149
+ continue;
24150
+ }
24151
+ case 2: {
24152
+ if (tag !== 17) {
24153
+ break;
24154
+ }
24155
+ message.createdBefore = reader.double();
24156
+ continue;
24157
+ }
24158
+ }
24159
+ if ((tag & 7) === 4 || tag === 0) {
24160
+ break;
24161
+ }
24162
+ reader.skip(tag & 7);
24163
+ }
24164
+ return message;
24165
+ },
24166
+ fromJSON(object) {
24167
+ return {
24168
+ maxObjects: isSet3(object.maxObjects) ? globalThis.Number(object.maxObjects) : 0,
24169
+ createdBefore: isSet3(object.createdBefore) ? globalThis.Number(object.createdBefore) : 0
24170
+ };
24171
+ },
24172
+ toJSON(message) {
24173
+ const obj = {};
24174
+ if (message.maxObjects !== 0) {
24175
+ obj.maxObjects = Math.round(message.maxObjects);
24176
+ }
24177
+ if (message.createdBefore !== 0) {
24178
+ obj.createdBefore = message.createdBefore;
24179
+ }
24180
+ return obj;
24181
+ },
24182
+ create(base) {
24183
+ return ListPagination.fromPartial(base ?? {});
24184
+ },
24185
+ fromPartial(object) {
24186
+ const message = createBaseListPagination();
24187
+ message.maxObjects = object.maxObjects ?? 0;
24188
+ message.createdBefore = object.createdBefore ?? 0;
24189
+ return message;
24190
+ }
24191
+ };
24192
+ function createBaseMapAwaitRequest() {
24193
+ return { functionCallId: "", lastEntryId: "", requestedAt: 0, timeout: 0 };
24194
+ }
24195
+ var MapAwaitRequest = {
24196
+ encode(message, writer = new BinaryWriter()) {
24197
+ if (message.functionCallId !== "") {
24198
+ writer.uint32(10).string(message.functionCallId);
24199
+ }
24200
+ if (message.lastEntryId !== "") {
24201
+ writer.uint32(18).string(message.lastEntryId);
24202
+ }
24203
+ if (message.requestedAt !== 0) {
24204
+ writer.uint32(25).double(message.requestedAt);
24205
+ }
24206
+ if (message.timeout !== 0) {
24207
+ writer.uint32(37).float(message.timeout);
24208
+ }
24209
+ return writer;
24210
+ },
24211
+ decode(input, length) {
24212
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24213
+ let end = length === void 0 ? reader.len : reader.pos + length;
24214
+ const message = createBaseMapAwaitRequest();
24215
+ while (reader.pos < end) {
24216
+ const tag = reader.uint32();
24217
+ switch (tag >>> 3) {
24218
+ case 1: {
24219
+ if (tag !== 10) {
24220
+ break;
24221
+ }
24222
+ message.functionCallId = reader.string();
24223
+ continue;
24224
+ }
24225
+ case 2: {
24226
+ if (tag !== 18) {
24227
+ break;
24228
+ }
24229
+ message.lastEntryId = reader.string();
24230
+ continue;
24231
+ }
24232
+ case 3: {
24233
+ if (tag !== 25) {
24234
+ break;
24235
+ }
24236
+ message.requestedAt = reader.double();
24237
+ continue;
24238
+ }
24239
+ case 4: {
24240
+ if (tag !== 37) {
24241
+ break;
24242
+ }
24243
+ message.timeout = reader.float();
24244
+ continue;
24245
+ }
24246
+ }
24247
+ if ((tag & 7) === 4 || tag === 0) {
24248
+ break;
24249
+ }
24250
+ reader.skip(tag & 7);
24251
+ }
24252
+ return message;
24253
+ },
24254
+ fromJSON(object) {
24255
+ return {
24256
+ functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
24257
+ lastEntryId: isSet3(object.lastEntryId) ? globalThis.String(object.lastEntryId) : "",
24258
+ requestedAt: isSet3(object.requestedAt) ? globalThis.Number(object.requestedAt) : 0,
24259
+ timeout: isSet3(object.timeout) ? globalThis.Number(object.timeout) : 0
24260
+ };
24261
+ },
24262
+ toJSON(message) {
24263
+ const obj = {};
24264
+ if (message.functionCallId !== "") {
24265
+ obj.functionCallId = message.functionCallId;
24266
+ }
24267
+ if (message.lastEntryId !== "") {
24268
+ obj.lastEntryId = message.lastEntryId;
24269
+ }
24270
+ if (message.requestedAt !== 0) {
24271
+ obj.requestedAt = message.requestedAt;
24272
+ }
24273
+ if (message.timeout !== 0) {
24274
+ obj.timeout = message.timeout;
24275
+ }
24276
+ return obj;
24277
+ },
24278
+ create(base) {
24279
+ return MapAwaitRequest.fromPartial(base ?? {});
24280
+ },
24281
+ fromPartial(object) {
24282
+ const message = createBaseMapAwaitRequest();
24283
+ message.functionCallId = object.functionCallId ?? "";
24284
+ message.lastEntryId = object.lastEntryId ?? "";
24285
+ message.requestedAt = object.requestedAt ?? 0;
24286
+ message.timeout = object.timeout ?? 0;
24287
+ return message;
24288
+ }
24289
+ };
24290
+ function createBaseMapAwaitResponse() {
24291
+ return { outputs: [], lastEntryId: "" };
24292
+ }
24293
+ var MapAwaitResponse = {
24294
+ encode(message, writer = new BinaryWriter()) {
24295
+ for (const v of message.outputs) {
24296
+ FunctionGetOutputsItem.encode(v, writer.uint32(10).fork()).join();
24297
+ }
24298
+ if (message.lastEntryId !== "") {
24299
+ writer.uint32(18).string(message.lastEntryId);
24300
+ }
24301
+ return writer;
24302
+ },
24303
+ decode(input, length) {
24304
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24305
+ let end = length === void 0 ? reader.len : reader.pos + length;
24306
+ const message = createBaseMapAwaitResponse();
24307
+ while (reader.pos < end) {
24308
+ const tag = reader.uint32();
24309
+ switch (tag >>> 3) {
24310
+ case 1: {
24311
+ if (tag !== 10) {
24312
+ break;
24313
+ }
24314
+ message.outputs.push(FunctionGetOutputsItem.decode(reader, reader.uint32()));
24315
+ continue;
24316
+ }
24317
+ case 2: {
24318
+ if (tag !== 18) {
24319
+ break;
24320
+ }
24321
+ message.lastEntryId = reader.string();
24322
+ continue;
24323
+ }
24324
+ }
24325
+ if ((tag & 7) === 4 || tag === 0) {
24326
+ break;
24327
+ }
24328
+ reader.skip(tag & 7);
24329
+ }
24330
+ return message;
24331
+ },
24332
+ fromJSON(object) {
24333
+ return {
24334
+ outputs: globalThis.Array.isArray(object?.outputs) ? object.outputs.map((e) => FunctionGetOutputsItem.fromJSON(e)) : [],
24335
+ lastEntryId: isSet3(object.lastEntryId) ? globalThis.String(object.lastEntryId) : ""
24336
+ };
24337
+ },
24338
+ toJSON(message) {
24339
+ const obj = {};
24340
+ if (message.outputs?.length) {
24341
+ obj.outputs = message.outputs.map((e) => FunctionGetOutputsItem.toJSON(e));
24342
+ }
24343
+ if (message.lastEntryId !== "") {
24344
+ obj.lastEntryId = message.lastEntryId;
24345
+ }
24346
+ return obj;
24347
+ },
24348
+ create(base) {
24349
+ return MapAwaitResponse.fromPartial(base ?? {});
24350
+ },
24351
+ fromPartial(object) {
24352
+ const message = createBaseMapAwaitResponse();
24353
+ message.outputs = object.outputs?.map((e) => FunctionGetOutputsItem.fromPartial(e)) || [];
24354
+ message.lastEntryId = object.lastEntryId ?? "";
24355
+ return message;
24356
+ }
24357
+ };
24358
+ function createBaseMapCheckInputsRequest() {
24359
+ return { lastEntryId: "", timeout: 0, attemptTokens: [] };
24360
+ }
24361
+ var MapCheckInputsRequest = {
24362
+ encode(message, writer = new BinaryWriter()) {
24363
+ if (message.lastEntryId !== "") {
24364
+ writer.uint32(10).string(message.lastEntryId);
24365
+ }
24366
+ if (message.timeout !== 0) {
24367
+ writer.uint32(21).float(message.timeout);
24368
+ }
24369
+ for (const v of message.attemptTokens) {
24370
+ writer.uint32(26).string(v);
24371
+ }
24372
+ return writer;
24373
+ },
24374
+ decode(input, length) {
24375
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24376
+ let end = length === void 0 ? reader.len : reader.pos + length;
24377
+ const message = createBaseMapCheckInputsRequest();
24378
+ while (reader.pos < end) {
24379
+ const tag = reader.uint32();
24380
+ switch (tag >>> 3) {
24381
+ case 1: {
24382
+ if (tag !== 10) {
24383
+ break;
24384
+ }
24385
+ message.lastEntryId = reader.string();
24386
+ continue;
24387
+ }
24388
+ case 2: {
24389
+ if (tag !== 21) {
24390
+ break;
24391
+ }
24392
+ message.timeout = reader.float();
24393
+ continue;
24394
+ }
24395
+ case 3: {
24396
+ if (tag !== 26) {
24397
+ break;
24398
+ }
24399
+ message.attemptTokens.push(reader.string());
24400
+ continue;
24401
+ }
24402
+ }
24403
+ if ((tag & 7) === 4 || tag === 0) {
24404
+ break;
24405
+ }
24406
+ reader.skip(tag & 7);
24407
+ }
24408
+ return message;
24409
+ },
24410
+ fromJSON(object) {
24411
+ return {
24412
+ lastEntryId: isSet3(object.lastEntryId) ? globalThis.String(object.lastEntryId) : "",
24413
+ timeout: isSet3(object.timeout) ? globalThis.Number(object.timeout) : 0,
24414
+ attemptTokens: globalThis.Array.isArray(object?.attemptTokens) ? object.attemptTokens.map((e) => globalThis.String(e)) : []
24415
+ };
24416
+ },
24417
+ toJSON(message) {
24418
+ const obj = {};
24419
+ if (message.lastEntryId !== "") {
24420
+ obj.lastEntryId = message.lastEntryId;
24421
+ }
24422
+ if (message.timeout !== 0) {
24423
+ obj.timeout = message.timeout;
24424
+ }
24425
+ if (message.attemptTokens?.length) {
24426
+ obj.attemptTokens = message.attemptTokens;
24427
+ }
24428
+ return obj;
24429
+ },
24430
+ create(base) {
24431
+ return MapCheckInputsRequest.fromPartial(base ?? {});
24432
+ },
24433
+ fromPartial(object) {
24434
+ const message = createBaseMapCheckInputsRequest();
24435
+ message.lastEntryId = object.lastEntryId ?? "";
24436
+ message.timeout = object.timeout ?? 0;
24437
+ message.attemptTokens = object.attemptTokens?.map((e) => e) || [];
24438
+ return message;
24439
+ }
24440
+ };
24441
+ function createBaseMapCheckInputsResponse() {
24442
+ return { lost: [] };
24443
+ }
24444
+ var MapCheckInputsResponse = {
24445
+ encode(message, writer = new BinaryWriter()) {
24446
+ writer.uint32(10).fork();
24447
+ for (const v of message.lost) {
24448
+ writer.bool(v);
24449
+ }
24450
+ writer.join();
24451
+ return writer;
24452
+ },
24453
+ decode(input, length) {
24454
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24455
+ let end = length === void 0 ? reader.len : reader.pos + length;
24456
+ const message = createBaseMapCheckInputsResponse();
24457
+ while (reader.pos < end) {
24458
+ const tag = reader.uint32();
24459
+ switch (tag >>> 3) {
24460
+ case 1: {
24461
+ if (tag === 8) {
24462
+ message.lost.push(reader.bool());
24463
+ continue;
24464
+ }
24465
+ if (tag === 10) {
24466
+ const end2 = reader.uint32() + reader.pos;
24467
+ while (reader.pos < end2) {
24468
+ message.lost.push(reader.bool());
24469
+ }
24470
+ continue;
24471
+ }
24472
+ break;
24473
+ }
24474
+ }
24475
+ if ((tag & 7) === 4 || tag === 0) {
24476
+ break;
24477
+ }
24478
+ reader.skip(tag & 7);
24479
+ }
24480
+ return message;
24481
+ },
24482
+ fromJSON(object) {
24483
+ return { lost: globalThis.Array.isArray(object?.lost) ? object.lost.map((e) => globalThis.Boolean(e)) : [] };
24484
+ },
24485
+ toJSON(message) {
24486
+ const obj = {};
24487
+ if (message.lost?.length) {
24488
+ obj.lost = message.lost;
24489
+ }
24490
+ return obj;
24491
+ },
24492
+ create(base) {
24493
+ return MapCheckInputsResponse.fromPartial(base ?? {});
24494
+ },
24495
+ fromPartial(object) {
24496
+ const message = createBaseMapCheckInputsResponse();
24497
+ message.lost = object.lost?.map((e) => e) || [];
24498
+ return message;
24499
+ }
24500
+ };
24501
+ function createBaseMapStartOrContinueItem() {
24502
+ return { input: void 0, attemptToken: void 0 };
24503
+ }
24504
+ var MapStartOrContinueItem = {
24505
+ encode(message, writer = new BinaryWriter()) {
24506
+ if (message.input !== void 0) {
24507
+ FunctionPutInputsItem.encode(message.input, writer.uint32(10).fork()).join();
24508
+ }
24509
+ if (message.attemptToken !== void 0) {
24510
+ writer.uint32(18).string(message.attemptToken);
24511
+ }
24512
+ return writer;
24513
+ },
24514
+ decode(input, length) {
24515
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24516
+ let end = length === void 0 ? reader.len : reader.pos + length;
24517
+ const message = createBaseMapStartOrContinueItem();
24518
+ while (reader.pos < end) {
24519
+ const tag = reader.uint32();
24520
+ switch (tag >>> 3) {
24521
+ case 1: {
24522
+ if (tag !== 10) {
24523
+ break;
24524
+ }
24525
+ message.input = FunctionPutInputsItem.decode(reader, reader.uint32());
24526
+ continue;
24527
+ }
24528
+ case 2: {
24529
+ if (tag !== 18) {
24530
+ break;
24531
+ }
24532
+ message.attemptToken = reader.string();
24533
+ continue;
24534
+ }
24535
+ }
24536
+ if ((tag & 7) === 4 || tag === 0) {
24537
+ break;
24538
+ }
24539
+ reader.skip(tag & 7);
24540
+ }
24541
+ return message;
24542
+ },
24543
+ fromJSON(object) {
24544
+ return {
24545
+ input: isSet3(object.input) ? FunctionPutInputsItem.fromJSON(object.input) : void 0,
24546
+ attemptToken: isSet3(object.attemptToken) ? globalThis.String(object.attemptToken) : void 0
24547
+ };
24548
+ },
24549
+ toJSON(message) {
24550
+ const obj = {};
24551
+ if (message.input !== void 0) {
24552
+ obj.input = FunctionPutInputsItem.toJSON(message.input);
24553
+ }
24554
+ if (message.attemptToken !== void 0) {
24555
+ obj.attemptToken = message.attemptToken;
24556
+ }
24557
+ return obj;
24558
+ },
24559
+ create(base) {
24560
+ return MapStartOrContinueItem.fromPartial(base ?? {});
24561
+ },
24562
+ fromPartial(object) {
24563
+ const message = createBaseMapStartOrContinueItem();
24564
+ message.input = object.input !== void 0 && object.input !== null ? FunctionPutInputsItem.fromPartial(object.input) : void 0;
24565
+ message.attemptToken = object.attemptToken ?? void 0;
24566
+ return message;
24567
+ }
24568
+ };
24569
+ function createBaseMapStartOrContinueRequest() {
24570
+ return { functionId: "", parentInputId: "", functionCallId: void 0, items: [] };
24571
+ }
24572
+ var MapStartOrContinueRequest = {
24573
+ encode(message, writer = new BinaryWriter()) {
24574
+ if (message.functionId !== "") {
24575
+ writer.uint32(10).string(message.functionId);
24576
+ }
24577
+ if (message.parentInputId !== "") {
24578
+ writer.uint32(18).string(message.parentInputId);
24579
+ }
24580
+ if (message.functionCallId !== void 0) {
24581
+ writer.uint32(26).string(message.functionCallId);
24582
+ }
24583
+ for (const v of message.items) {
24584
+ MapStartOrContinueItem.encode(v, writer.uint32(34).fork()).join();
24585
+ }
24586
+ return writer;
24587
+ },
24588
+ decode(input, length) {
24589
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24590
+ let end = length === void 0 ? reader.len : reader.pos + length;
24591
+ const message = createBaseMapStartOrContinueRequest();
24592
+ while (reader.pos < end) {
24593
+ const tag = reader.uint32();
24594
+ switch (tag >>> 3) {
24595
+ case 1: {
24596
+ if (tag !== 10) {
24597
+ break;
24598
+ }
24599
+ message.functionId = reader.string();
24600
+ continue;
24601
+ }
24602
+ case 2: {
24603
+ if (tag !== 18) {
24604
+ break;
24605
+ }
24606
+ message.parentInputId = reader.string();
24607
+ continue;
24608
+ }
24609
+ case 3: {
24610
+ if (tag !== 26) {
24611
+ break;
24612
+ }
24613
+ message.functionCallId = reader.string();
24614
+ continue;
24615
+ }
24616
+ case 4: {
24617
+ if (tag !== 34) {
24618
+ break;
24619
+ }
24620
+ message.items.push(MapStartOrContinueItem.decode(reader, reader.uint32()));
24621
+ continue;
24622
+ }
24623
+ }
24624
+ if ((tag & 7) === 4 || tag === 0) {
24625
+ break;
24626
+ }
24627
+ reader.skip(tag & 7);
24628
+ }
24629
+ return message;
24630
+ },
24631
+ fromJSON(object) {
24632
+ return {
24633
+ functionId: isSet3(object.functionId) ? globalThis.String(object.functionId) : "",
24634
+ parentInputId: isSet3(object.parentInputId) ? globalThis.String(object.parentInputId) : "",
24635
+ functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : void 0,
24636
+ items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => MapStartOrContinueItem.fromJSON(e)) : []
24637
+ };
24638
+ },
24639
+ toJSON(message) {
24640
+ const obj = {};
24641
+ if (message.functionId !== "") {
24642
+ obj.functionId = message.functionId;
24643
+ }
24644
+ if (message.parentInputId !== "") {
24645
+ obj.parentInputId = message.parentInputId;
24646
+ }
24647
+ if (message.functionCallId !== void 0) {
24648
+ obj.functionCallId = message.functionCallId;
24649
+ }
24650
+ if (message.items?.length) {
24651
+ obj.items = message.items.map((e) => MapStartOrContinueItem.toJSON(e));
24652
+ }
24653
+ return obj;
24654
+ },
24655
+ create(base) {
24656
+ return MapStartOrContinueRequest.fromPartial(base ?? {});
24657
+ },
24658
+ fromPartial(object) {
24659
+ const message = createBaseMapStartOrContinueRequest();
24660
+ message.functionId = object.functionId ?? "";
24661
+ message.parentInputId = object.parentInputId ?? "";
24662
+ message.functionCallId = object.functionCallId ?? void 0;
24663
+ message.items = object.items?.map((e) => MapStartOrContinueItem.fromPartial(e)) || [];
24664
+ return message;
24665
+ }
24666
+ };
24667
+ function createBaseMapStartOrContinueResponse() {
24668
+ return { functionId: "", functionCallId: "", maxInputsOutstanding: 0, attemptTokens: [], retryPolicy: void 0 };
24669
+ }
24670
+ var MapStartOrContinueResponse = {
24671
+ encode(message, writer = new BinaryWriter()) {
24672
+ if (message.functionId !== "") {
24673
+ writer.uint32(10).string(message.functionId);
24674
+ }
24675
+ if (message.functionCallId !== "") {
24676
+ writer.uint32(18).string(message.functionCallId);
24677
+ }
24678
+ if (message.maxInputsOutstanding !== 0) {
24679
+ writer.uint32(24).uint32(message.maxInputsOutstanding);
24680
+ }
24681
+ for (const v of message.attemptTokens) {
24682
+ writer.uint32(34).string(v);
24683
+ }
24684
+ if (message.retryPolicy !== void 0) {
24685
+ FunctionRetryPolicy.encode(message.retryPolicy, writer.uint32(42).fork()).join();
24686
+ }
24687
+ return writer;
24688
+ },
24689
+ decode(input, length) {
24690
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24691
+ let end = length === void 0 ? reader.len : reader.pos + length;
24692
+ const message = createBaseMapStartOrContinueResponse();
24693
+ while (reader.pos < end) {
24694
+ const tag = reader.uint32();
24695
+ switch (tag >>> 3) {
24696
+ case 1: {
24697
+ if (tag !== 10) {
24698
+ break;
24699
+ }
24700
+ message.functionId = reader.string();
24701
+ continue;
24702
+ }
24703
+ case 2: {
24704
+ if (tag !== 18) {
24705
+ break;
24706
+ }
24707
+ message.functionCallId = reader.string();
24708
+ continue;
24709
+ }
24710
+ case 3: {
24711
+ if (tag !== 24) {
24712
+ break;
24713
+ }
24714
+ message.maxInputsOutstanding = reader.uint32();
24715
+ continue;
24716
+ }
24717
+ case 4: {
24718
+ if (tag !== 34) {
24719
+ break;
24720
+ }
24721
+ message.attemptTokens.push(reader.string());
24722
+ continue;
24723
+ }
24724
+ case 5: {
24725
+ if (tag !== 42) {
24726
+ break;
24727
+ }
24728
+ message.retryPolicy = FunctionRetryPolicy.decode(reader, reader.uint32());
24729
+ continue;
24730
+ }
24731
+ }
24732
+ if ((tag & 7) === 4 || tag === 0) {
24733
+ break;
24734
+ }
24735
+ reader.skip(tag & 7);
24736
+ }
24737
+ return message;
24738
+ },
24739
+ fromJSON(object) {
24740
+ return {
24741
+ functionId: isSet3(object.functionId) ? globalThis.String(object.functionId) : "",
24742
+ functionCallId: isSet3(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
24743
+ maxInputsOutstanding: isSet3(object.maxInputsOutstanding) ? globalThis.Number(object.maxInputsOutstanding) : 0,
24744
+ attemptTokens: globalThis.Array.isArray(object?.attemptTokens) ? object.attemptTokens.map((e) => globalThis.String(e)) : [],
24745
+ retryPolicy: isSet3(object.retryPolicy) ? FunctionRetryPolicy.fromJSON(object.retryPolicy) : void 0
24746
+ };
24747
+ },
24748
+ toJSON(message) {
24749
+ const obj = {};
24750
+ if (message.functionId !== "") {
24751
+ obj.functionId = message.functionId;
24752
+ }
24753
+ if (message.functionCallId !== "") {
24754
+ obj.functionCallId = message.functionCallId;
24755
+ }
24756
+ if (message.maxInputsOutstanding !== 0) {
24757
+ obj.maxInputsOutstanding = Math.round(message.maxInputsOutstanding);
24758
+ }
24759
+ if (message.attemptTokens?.length) {
24760
+ obj.attemptTokens = message.attemptTokens;
24761
+ }
24762
+ if (message.retryPolicy !== void 0) {
24763
+ obj.retryPolicy = FunctionRetryPolicy.toJSON(message.retryPolicy);
24764
+ }
24765
+ return obj;
24766
+ },
24767
+ create(base) {
24768
+ return MapStartOrContinueResponse.fromPartial(base ?? {});
24769
+ },
24770
+ fromPartial(object) {
24771
+ const message = createBaseMapStartOrContinueResponse();
24772
+ message.functionId = object.functionId ?? "";
24773
+ message.functionCallId = object.functionCallId ?? "";
24774
+ message.maxInputsOutstanding = object.maxInputsOutstanding ?? 0;
24775
+ message.attemptTokens = object.attemptTokens?.map((e) => e) || [];
24776
+ message.retryPolicy = object.retryPolicy !== void 0 && object.retryPolicy !== null ? FunctionRetryPolicy.fromPartial(object.retryPolicy) : void 0;
24777
+ return message;
24778
+ }
24779
+ };
23238
24780
  function createBaseMethodDefinition() {
23239
24781
  return {
23240
24782
  functionName: "",
@@ -26256,13 +27798,16 @@ var QueueGetOrCreateRequest = {
26256
27798
  }
26257
27799
  };
26258
27800
  function createBaseQueueGetOrCreateResponse() {
26259
- return { queueId: "" };
27801
+ return { queueId: "", metadata: void 0 };
26260
27802
  }
26261
27803
  var QueueGetOrCreateResponse = {
26262
27804
  encode(message, writer = new BinaryWriter()) {
26263
27805
  if (message.queueId !== "") {
26264
27806
  writer.uint32(10).string(message.queueId);
26265
27807
  }
27808
+ if (message.metadata !== void 0) {
27809
+ QueueMetadata.encode(message.metadata, writer.uint32(18).fork()).join();
27810
+ }
26266
27811
  return writer;
26267
27812
  },
26268
27813
  decode(input, length) {
@@ -26279,6 +27824,13 @@ var QueueGetOrCreateResponse = {
26279
27824
  message.queueId = reader.string();
26280
27825
  continue;
26281
27826
  }
27827
+ case 2: {
27828
+ if (tag !== 18) {
27829
+ break;
27830
+ }
27831
+ message.metadata = QueueMetadata.decode(reader, reader.uint32());
27832
+ continue;
27833
+ }
26282
27834
  }
26283
27835
  if ((tag & 7) === 4 || tag === 0) {
26284
27836
  break;
@@ -26288,13 +27840,19 @@ var QueueGetOrCreateResponse = {
26288
27840
  return message;
26289
27841
  },
26290
27842
  fromJSON(object) {
26291
- return { queueId: isSet3(object.queueId) ? globalThis.String(object.queueId) : "" };
27843
+ return {
27844
+ queueId: isSet3(object.queueId) ? globalThis.String(object.queueId) : "",
27845
+ metadata: isSet3(object.metadata) ? QueueMetadata.fromJSON(object.metadata) : void 0
27846
+ };
26292
27847
  },
26293
27848
  toJSON(message) {
26294
27849
  const obj = {};
26295
27850
  if (message.queueId !== "") {
26296
27851
  obj.queueId = message.queueId;
26297
27852
  }
27853
+ if (message.metadata !== void 0) {
27854
+ obj.metadata = QueueMetadata.toJSON(message.metadata);
27855
+ }
26298
27856
  return obj;
26299
27857
  },
26300
27858
  create(base) {
@@ -26303,6 +27861,7 @@ var QueueGetOrCreateResponse = {
26303
27861
  fromPartial(object) {
26304
27862
  const message = createBaseQueueGetOrCreateResponse();
26305
27863
  message.queueId = object.queueId ?? "";
27864
+ message.metadata = object.metadata !== void 0 && object.metadata !== null ? QueueMetadata.fromPartial(object.metadata) : void 0;
26306
27865
  return message;
26307
27866
  }
26308
27867
  };
@@ -26711,7 +28270,7 @@ var QueueLenResponse = {
26711
28270
  }
26712
28271
  };
26713
28272
  function createBaseQueueListRequest() {
26714
- return { environmentName: "", totalSizeLimit: 0 };
28273
+ return { environmentName: "", totalSizeLimit: 0, pagination: void 0 };
26715
28274
  }
26716
28275
  var QueueListRequest = {
26717
28276
  encode(message, writer = new BinaryWriter()) {
@@ -26721,6 +28280,9 @@ var QueueListRequest = {
26721
28280
  if (message.totalSizeLimit !== 0) {
26722
28281
  writer.uint32(16).int32(message.totalSizeLimit);
26723
28282
  }
28283
+ if (message.pagination !== void 0) {
28284
+ ListPagination.encode(message.pagination, writer.uint32(26).fork()).join();
28285
+ }
26724
28286
  return writer;
26725
28287
  },
26726
28288
  decode(input, length) {
@@ -26744,6 +28306,13 @@ var QueueListRequest = {
26744
28306
  message.totalSizeLimit = reader.int32();
26745
28307
  continue;
26746
28308
  }
28309
+ case 3: {
28310
+ if (tag !== 26) {
28311
+ break;
28312
+ }
28313
+ message.pagination = ListPagination.decode(reader, reader.uint32());
28314
+ continue;
28315
+ }
26747
28316
  }
26748
28317
  if ((tag & 7) === 4 || tag === 0) {
26749
28318
  break;
@@ -26755,7 +28324,8 @@ var QueueListRequest = {
26755
28324
  fromJSON(object) {
26756
28325
  return {
26757
28326
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
26758
- totalSizeLimit: isSet3(object.totalSizeLimit) ? globalThis.Number(object.totalSizeLimit) : 0
28327
+ totalSizeLimit: isSet3(object.totalSizeLimit) ? globalThis.Number(object.totalSizeLimit) : 0,
28328
+ pagination: isSet3(object.pagination) ? ListPagination.fromJSON(object.pagination) : void 0
26759
28329
  };
26760
28330
  },
26761
28331
  toJSON(message) {
@@ -26766,6 +28336,9 @@ var QueueListRequest = {
26766
28336
  if (message.totalSizeLimit !== 0) {
26767
28337
  obj.totalSizeLimit = Math.round(message.totalSizeLimit);
26768
28338
  }
28339
+ if (message.pagination !== void 0) {
28340
+ obj.pagination = ListPagination.toJSON(message.pagination);
28341
+ }
26769
28342
  return obj;
26770
28343
  },
26771
28344
  create(base) {
@@ -26775,17 +28348,21 @@ var QueueListRequest = {
26775
28348
  const message = createBaseQueueListRequest();
26776
28349
  message.environmentName = object.environmentName ?? "";
26777
28350
  message.totalSizeLimit = object.totalSizeLimit ?? 0;
28351
+ message.pagination = object.pagination !== void 0 && object.pagination !== null ? ListPagination.fromPartial(object.pagination) : void 0;
26778
28352
  return message;
26779
28353
  }
26780
28354
  };
26781
28355
  function createBaseQueueListResponse() {
26782
- return { queues: [] };
28356
+ return { queues: [], environmentName: "" };
26783
28357
  }
26784
28358
  var QueueListResponse = {
26785
28359
  encode(message, writer = new BinaryWriter()) {
26786
28360
  for (const v of message.queues) {
26787
28361
  QueueListResponse_QueueInfo.encode(v, writer.uint32(10).fork()).join();
26788
28362
  }
28363
+ if (message.environmentName !== "") {
28364
+ writer.uint32(18).string(message.environmentName);
28365
+ }
26789
28366
  return writer;
26790
28367
  },
26791
28368
  decode(input, length) {
@@ -26802,6 +28379,13 @@ var QueueListResponse = {
26802
28379
  message.queues.push(QueueListResponse_QueueInfo.decode(reader, reader.uint32()));
26803
28380
  continue;
26804
28381
  }
28382
+ case 2: {
28383
+ if (tag !== 18) {
28384
+ break;
28385
+ }
28386
+ message.environmentName = reader.string();
28387
+ continue;
28388
+ }
26805
28389
  }
26806
28390
  if ((tag & 7) === 4 || tag === 0) {
26807
28391
  break;
@@ -26812,7 +28396,8 @@ var QueueListResponse = {
26812
28396
  },
26813
28397
  fromJSON(object) {
26814
28398
  return {
26815
- queues: globalThis.Array.isArray(object?.queues) ? object.queues.map((e) => QueueListResponse_QueueInfo.fromJSON(e)) : []
28399
+ queues: globalThis.Array.isArray(object?.queues) ? object.queues.map((e) => QueueListResponse_QueueInfo.fromJSON(e)) : [],
28400
+ environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : ""
26816
28401
  };
26817
28402
  },
26818
28403
  toJSON(message) {
@@ -26820,6 +28405,9 @@ var QueueListResponse = {
26820
28405
  if (message.queues?.length) {
26821
28406
  obj.queues = message.queues.map((e) => QueueListResponse_QueueInfo.toJSON(e));
26822
28407
  }
28408
+ if (message.environmentName !== "") {
28409
+ obj.environmentName = message.environmentName;
28410
+ }
26823
28411
  return obj;
26824
28412
  },
26825
28413
  create(base) {
@@ -26828,11 +28416,12 @@ var QueueListResponse = {
26828
28416
  fromPartial(object) {
26829
28417
  const message = createBaseQueueListResponse();
26830
28418
  message.queues = object.queues?.map((e) => QueueListResponse_QueueInfo.fromPartial(e)) || [];
28419
+ message.environmentName = object.environmentName ?? "";
26831
28420
  return message;
26832
28421
  }
26833
28422
  };
26834
28423
  function createBaseQueueListResponse_QueueInfo() {
26835
- return { name: "", createdAt: 0, numPartitions: 0, totalSize: 0 };
28424
+ return { name: "", createdAt: 0, numPartitions: 0, totalSize: 0, queueId: "", metadata: void 0 };
26836
28425
  }
26837
28426
  var QueueListResponse_QueueInfo = {
26838
28427
  encode(message, writer = new BinaryWriter()) {
@@ -26848,6 +28437,12 @@ var QueueListResponse_QueueInfo = {
26848
28437
  if (message.totalSize !== 0) {
26849
28438
  writer.uint32(32).int32(message.totalSize);
26850
28439
  }
28440
+ if (message.queueId !== "") {
28441
+ writer.uint32(42).string(message.queueId);
28442
+ }
28443
+ if (message.metadata !== void 0) {
28444
+ QueueMetadata.encode(message.metadata, writer.uint32(50).fork()).join();
28445
+ }
26851
28446
  return writer;
26852
28447
  },
26853
28448
  decode(input, length) {
@@ -26885,6 +28480,20 @@ var QueueListResponse_QueueInfo = {
26885
28480
  message.totalSize = reader.int32();
26886
28481
  continue;
26887
28482
  }
28483
+ case 5: {
28484
+ if (tag !== 42) {
28485
+ break;
28486
+ }
28487
+ message.queueId = reader.string();
28488
+ continue;
28489
+ }
28490
+ case 6: {
28491
+ if (tag !== 50) {
28492
+ break;
28493
+ }
28494
+ message.metadata = QueueMetadata.decode(reader, reader.uint32());
28495
+ continue;
28496
+ }
26888
28497
  }
26889
28498
  if ((tag & 7) === 4 || tag === 0) {
26890
28499
  break;
@@ -26898,7 +28507,9 @@ var QueueListResponse_QueueInfo = {
26898
28507
  name: isSet3(object.name) ? globalThis.String(object.name) : "",
26899
28508
  createdAt: isSet3(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
26900
28509
  numPartitions: isSet3(object.numPartitions) ? globalThis.Number(object.numPartitions) : 0,
26901
- totalSize: isSet3(object.totalSize) ? globalThis.Number(object.totalSize) : 0
28510
+ totalSize: isSet3(object.totalSize) ? globalThis.Number(object.totalSize) : 0,
28511
+ queueId: isSet3(object.queueId) ? globalThis.String(object.queueId) : "",
28512
+ metadata: isSet3(object.metadata) ? QueueMetadata.fromJSON(object.metadata) : void 0
26902
28513
  };
26903
28514
  },
26904
28515
  toJSON(message) {
@@ -26915,6 +28526,12 @@ var QueueListResponse_QueueInfo = {
26915
28526
  if (message.totalSize !== 0) {
26916
28527
  obj.totalSize = Math.round(message.totalSize);
26917
28528
  }
28529
+ if (message.queueId !== "") {
28530
+ obj.queueId = message.queueId;
28531
+ }
28532
+ if (message.metadata !== void 0) {
28533
+ obj.metadata = QueueMetadata.toJSON(message.metadata);
28534
+ }
26918
28535
  return obj;
26919
28536
  },
26920
28537
  create(base) {
@@ -26926,6 +28543,76 @@ var QueueListResponse_QueueInfo = {
26926
28543
  message.createdAt = object.createdAt ?? 0;
26927
28544
  message.numPartitions = object.numPartitions ?? 0;
26928
28545
  message.totalSize = object.totalSize ?? 0;
28546
+ message.queueId = object.queueId ?? "";
28547
+ message.metadata = object.metadata !== void 0 && object.metadata !== null ? QueueMetadata.fromPartial(object.metadata) : void 0;
28548
+ return message;
28549
+ }
28550
+ };
28551
+ function createBaseQueueMetadata() {
28552
+ return { name: "", creationInfo: void 0 };
28553
+ }
28554
+ var QueueMetadata = {
28555
+ encode(message, writer = new BinaryWriter()) {
28556
+ if (message.name !== "") {
28557
+ writer.uint32(10).string(message.name);
28558
+ }
28559
+ if (message.creationInfo !== void 0) {
28560
+ CreationInfo.encode(message.creationInfo, writer.uint32(18).fork()).join();
28561
+ }
28562
+ return writer;
28563
+ },
28564
+ decode(input, length) {
28565
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
28566
+ let end = length === void 0 ? reader.len : reader.pos + length;
28567
+ const message = createBaseQueueMetadata();
28568
+ while (reader.pos < end) {
28569
+ const tag = reader.uint32();
28570
+ switch (tag >>> 3) {
28571
+ case 1: {
28572
+ if (tag !== 10) {
28573
+ break;
28574
+ }
28575
+ message.name = reader.string();
28576
+ continue;
28577
+ }
28578
+ case 2: {
28579
+ if (tag !== 18) {
28580
+ break;
28581
+ }
28582
+ message.creationInfo = CreationInfo.decode(reader, reader.uint32());
28583
+ continue;
28584
+ }
28585
+ }
28586
+ if ((tag & 7) === 4 || tag === 0) {
28587
+ break;
28588
+ }
28589
+ reader.skip(tag & 7);
28590
+ }
28591
+ return message;
28592
+ },
28593
+ fromJSON(object) {
28594
+ return {
28595
+ name: isSet3(object.name) ? globalThis.String(object.name) : "",
28596
+ creationInfo: isSet3(object.creationInfo) ? CreationInfo.fromJSON(object.creationInfo) : void 0
28597
+ };
28598
+ },
28599
+ toJSON(message) {
28600
+ const obj = {};
28601
+ if (message.name !== "") {
28602
+ obj.name = message.name;
28603
+ }
28604
+ if (message.creationInfo !== void 0) {
28605
+ obj.creationInfo = CreationInfo.toJSON(message.creationInfo);
28606
+ }
28607
+ return obj;
28608
+ },
28609
+ create(base) {
28610
+ return QueueMetadata.fromPartial(base ?? {});
28611
+ },
28612
+ fromPartial(object) {
28613
+ const message = createBaseQueueMetadata();
28614
+ message.name = object.name ?? "";
28615
+ message.creationInfo = object.creationInfo !== void 0 && object.creationInfo !== null ? CreationInfo.fromPartial(object.creationInfo) : void 0;
26929
28616
  return message;
26930
28617
  }
26931
28618
  };
@@ -27817,7 +29504,11 @@ function createBaseSandbox() {
27817
29504
  cloudProviderStr: "",
27818
29505
  runscRuntimeVersion: void 0,
27819
29506
  runtime: void 0,
27820
- verbose: false
29507
+ verbose: false,
29508
+ name: void 0,
29509
+ experimentalOptions: {},
29510
+ preloadPathPrefixes: [],
29511
+ idleTimeoutSecs: void 0
27821
29512
  };
27822
29513
  }
27823
29514
  var Sandbox = {
@@ -27903,6 +29594,18 @@ var Sandbox = {
27903
29594
  if (message.verbose !== false) {
27904
29595
  writer.uint32(232).bool(message.verbose);
27905
29596
  }
29597
+ if (message.name !== void 0) {
29598
+ writer.uint32(242).string(message.name);
29599
+ }
29600
+ Object.entries(message.experimentalOptions).forEach(([key, value]) => {
29601
+ Sandbox_ExperimentalOptionsEntry.encode({ key, value }, writer.uint32(250).fork()).join();
29602
+ });
29603
+ for (const v of message.preloadPathPrefixes) {
29604
+ writer.uint32(258).string(v);
29605
+ }
29606
+ if (message.idleTimeoutSecs !== void 0) {
29607
+ writer.uint32(264).uint32(message.idleTimeoutSecs);
29608
+ }
27906
29609
  return writer;
27907
29610
  },
27908
29611
  decode(input, length) {
@@ -28101,6 +29804,37 @@ var Sandbox = {
28101
29804
  message.verbose = reader.bool();
28102
29805
  continue;
28103
29806
  }
29807
+ case 30: {
29808
+ if (tag !== 242) {
29809
+ break;
29810
+ }
29811
+ message.name = reader.string();
29812
+ continue;
29813
+ }
29814
+ case 31: {
29815
+ if (tag !== 250) {
29816
+ break;
29817
+ }
29818
+ const entry31 = Sandbox_ExperimentalOptionsEntry.decode(reader, reader.uint32());
29819
+ if (entry31.value !== void 0) {
29820
+ message.experimentalOptions[entry31.key] = entry31.value;
29821
+ }
29822
+ continue;
29823
+ }
29824
+ case 32: {
29825
+ if (tag !== 258) {
29826
+ break;
29827
+ }
29828
+ message.preloadPathPrefixes.push(reader.string());
29829
+ continue;
29830
+ }
29831
+ case 33: {
29832
+ if (tag !== 264) {
29833
+ break;
29834
+ }
29835
+ message.idleTimeoutSecs = reader.uint32();
29836
+ continue;
29837
+ }
28104
29838
  }
28105
29839
  if ((tag & 7) === 4 || tag === 0) {
28106
29840
  break;
@@ -28137,7 +29871,14 @@ var Sandbox = {
28137
29871
  cloudProviderStr: isSet3(object.cloudProviderStr) ? globalThis.String(object.cloudProviderStr) : "",
28138
29872
  runscRuntimeVersion: isSet3(object.runscRuntimeVersion) ? globalThis.String(object.runscRuntimeVersion) : void 0,
28139
29873
  runtime: isSet3(object.runtime) ? globalThis.String(object.runtime) : void 0,
28140
- verbose: isSet3(object.verbose) ? globalThis.Boolean(object.verbose) : false
29874
+ verbose: isSet3(object.verbose) ? globalThis.Boolean(object.verbose) : false,
29875
+ name: isSet3(object.name) ? globalThis.String(object.name) : void 0,
29876
+ experimentalOptions: isObject2(object.experimentalOptions) ? Object.entries(object.experimentalOptions).reduce((acc, [key, value]) => {
29877
+ acc[key] = Boolean(value);
29878
+ return acc;
29879
+ }, {}) : {},
29880
+ preloadPathPrefixes: globalThis.Array.isArray(object?.preloadPathPrefixes) ? object.preloadPathPrefixes.map((e) => globalThis.String(e)) : [],
29881
+ idleTimeoutSecs: isSet3(object.idleTimeoutSecs) ? globalThis.Number(object.idleTimeoutSecs) : void 0
28141
29882
  };
28142
29883
  },
28143
29884
  toJSON(message) {
@@ -28223,6 +29964,24 @@ var Sandbox = {
28223
29964
  if (message.verbose !== false) {
28224
29965
  obj.verbose = message.verbose;
28225
29966
  }
29967
+ if (message.name !== void 0) {
29968
+ obj.name = message.name;
29969
+ }
29970
+ if (message.experimentalOptions) {
29971
+ const entries = Object.entries(message.experimentalOptions);
29972
+ if (entries.length > 0) {
29973
+ obj.experimentalOptions = {};
29974
+ entries.forEach(([k, v]) => {
29975
+ obj.experimentalOptions[k] = v;
29976
+ });
29977
+ }
29978
+ }
29979
+ if (message.preloadPathPrefixes?.length) {
29980
+ obj.preloadPathPrefixes = message.preloadPathPrefixes;
29981
+ }
29982
+ if (message.idleTimeoutSecs !== void 0) {
29983
+ obj.idleTimeoutSecs = Math.round(message.idleTimeoutSecs);
29984
+ }
28226
29985
  return obj;
28227
29986
  },
28228
29987
  create(base) {
@@ -28257,6 +30016,86 @@ var Sandbox = {
28257
30016
  message.runscRuntimeVersion = object.runscRuntimeVersion ?? void 0;
28258
30017
  message.runtime = object.runtime ?? void 0;
28259
30018
  message.verbose = object.verbose ?? false;
30019
+ message.name = object.name ?? void 0;
30020
+ message.experimentalOptions = Object.entries(object.experimentalOptions ?? {}).reduce(
30021
+ (acc, [key, value]) => {
30022
+ if (value !== void 0) {
30023
+ acc[key] = globalThis.Boolean(value);
30024
+ }
30025
+ return acc;
30026
+ },
30027
+ {}
30028
+ );
30029
+ message.preloadPathPrefixes = object.preloadPathPrefixes?.map((e) => e) || [];
30030
+ message.idleTimeoutSecs = object.idleTimeoutSecs ?? void 0;
30031
+ return message;
30032
+ }
30033
+ };
30034
+ function createBaseSandbox_ExperimentalOptionsEntry() {
30035
+ return { key: "", value: false };
30036
+ }
30037
+ var Sandbox_ExperimentalOptionsEntry = {
30038
+ encode(message, writer = new BinaryWriter()) {
30039
+ if (message.key !== "") {
30040
+ writer.uint32(10).string(message.key);
30041
+ }
30042
+ if (message.value !== false) {
30043
+ writer.uint32(16).bool(message.value);
30044
+ }
30045
+ return writer;
30046
+ },
30047
+ decode(input, length) {
30048
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
30049
+ let end = length === void 0 ? reader.len : reader.pos + length;
30050
+ const message = createBaseSandbox_ExperimentalOptionsEntry();
30051
+ while (reader.pos < end) {
30052
+ const tag = reader.uint32();
30053
+ switch (tag >>> 3) {
30054
+ case 1: {
30055
+ if (tag !== 10) {
30056
+ break;
30057
+ }
30058
+ message.key = reader.string();
30059
+ continue;
30060
+ }
30061
+ case 2: {
30062
+ if (tag !== 16) {
30063
+ break;
30064
+ }
30065
+ message.value = reader.bool();
30066
+ continue;
30067
+ }
30068
+ }
30069
+ if ((tag & 7) === 4 || tag === 0) {
30070
+ break;
30071
+ }
30072
+ reader.skip(tag & 7);
30073
+ }
30074
+ return message;
30075
+ },
30076
+ fromJSON(object) {
30077
+ return {
30078
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
30079
+ value: isSet3(object.value) ? globalThis.Boolean(object.value) : false
30080
+ };
30081
+ },
30082
+ toJSON(message) {
30083
+ const obj = {};
30084
+ if (message.key !== "") {
30085
+ obj.key = message.key;
30086
+ }
30087
+ if (message.value !== false) {
30088
+ obj.value = message.value;
30089
+ }
30090
+ return obj;
30091
+ },
30092
+ create(base) {
30093
+ return Sandbox_ExperimentalOptionsEntry.fromPartial(base ?? {});
30094
+ },
30095
+ fromPartial(object) {
30096
+ const message = createBaseSandbox_ExperimentalOptionsEntry();
30097
+ message.key = object.key ?? "";
30098
+ message.value = object.value ?? false;
28260
30099
  return message;
28261
30100
  }
28262
30101
  };
@@ -28394,6 +30233,140 @@ var SandboxCreateResponse = {
28394
30233
  return message;
28395
30234
  }
28396
30235
  };
30236
+ function createBaseSandboxGetFromNameRequest() {
30237
+ return { sandboxName: "", environmentName: "", appName: "" };
30238
+ }
30239
+ var SandboxGetFromNameRequest = {
30240
+ encode(message, writer = new BinaryWriter()) {
30241
+ if (message.sandboxName !== "") {
30242
+ writer.uint32(10).string(message.sandboxName);
30243
+ }
30244
+ if (message.environmentName !== "") {
30245
+ writer.uint32(18).string(message.environmentName);
30246
+ }
30247
+ if (message.appName !== "") {
30248
+ writer.uint32(26).string(message.appName);
30249
+ }
30250
+ return writer;
30251
+ },
30252
+ decode(input, length) {
30253
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
30254
+ let end = length === void 0 ? reader.len : reader.pos + length;
30255
+ const message = createBaseSandboxGetFromNameRequest();
30256
+ while (reader.pos < end) {
30257
+ const tag = reader.uint32();
30258
+ switch (tag >>> 3) {
30259
+ case 1: {
30260
+ if (tag !== 10) {
30261
+ break;
30262
+ }
30263
+ message.sandboxName = reader.string();
30264
+ continue;
30265
+ }
30266
+ case 2: {
30267
+ if (tag !== 18) {
30268
+ break;
30269
+ }
30270
+ message.environmentName = reader.string();
30271
+ continue;
30272
+ }
30273
+ case 3: {
30274
+ if (tag !== 26) {
30275
+ break;
30276
+ }
30277
+ message.appName = reader.string();
30278
+ continue;
30279
+ }
30280
+ }
30281
+ if ((tag & 7) === 4 || tag === 0) {
30282
+ break;
30283
+ }
30284
+ reader.skip(tag & 7);
30285
+ }
30286
+ return message;
30287
+ },
30288
+ fromJSON(object) {
30289
+ return {
30290
+ sandboxName: isSet3(object.sandboxName) ? globalThis.String(object.sandboxName) : "",
30291
+ environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
30292
+ appName: isSet3(object.appName) ? globalThis.String(object.appName) : ""
30293
+ };
30294
+ },
30295
+ toJSON(message) {
30296
+ const obj = {};
30297
+ if (message.sandboxName !== "") {
30298
+ obj.sandboxName = message.sandboxName;
30299
+ }
30300
+ if (message.environmentName !== "") {
30301
+ obj.environmentName = message.environmentName;
30302
+ }
30303
+ if (message.appName !== "") {
30304
+ obj.appName = message.appName;
30305
+ }
30306
+ return obj;
30307
+ },
30308
+ create(base) {
30309
+ return SandboxGetFromNameRequest.fromPartial(base ?? {});
30310
+ },
30311
+ fromPartial(object) {
30312
+ const message = createBaseSandboxGetFromNameRequest();
30313
+ message.sandboxName = object.sandboxName ?? "";
30314
+ message.environmentName = object.environmentName ?? "";
30315
+ message.appName = object.appName ?? "";
30316
+ return message;
30317
+ }
30318
+ };
30319
+ function createBaseSandboxGetFromNameResponse() {
30320
+ return { sandboxId: "" };
30321
+ }
30322
+ var SandboxGetFromNameResponse = {
30323
+ encode(message, writer = new BinaryWriter()) {
30324
+ if (message.sandboxId !== "") {
30325
+ writer.uint32(10).string(message.sandboxId);
30326
+ }
30327
+ return writer;
30328
+ },
30329
+ decode(input, length) {
30330
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
30331
+ let end = length === void 0 ? reader.len : reader.pos + length;
30332
+ const message = createBaseSandboxGetFromNameResponse();
30333
+ while (reader.pos < end) {
30334
+ const tag = reader.uint32();
30335
+ switch (tag >>> 3) {
30336
+ case 1: {
30337
+ if (tag !== 10) {
30338
+ break;
30339
+ }
30340
+ message.sandboxId = reader.string();
30341
+ continue;
30342
+ }
30343
+ }
30344
+ if ((tag & 7) === 4 || tag === 0) {
30345
+ break;
30346
+ }
30347
+ reader.skip(tag & 7);
30348
+ }
30349
+ return message;
30350
+ },
30351
+ fromJSON(object) {
30352
+ return { sandboxId: isSet3(object.sandboxId) ? globalThis.String(object.sandboxId) : "" };
30353
+ },
30354
+ toJSON(message) {
30355
+ const obj = {};
30356
+ if (message.sandboxId !== "") {
30357
+ obj.sandboxId = message.sandboxId;
30358
+ }
30359
+ return obj;
30360
+ },
30361
+ create(base) {
30362
+ return SandboxGetFromNameResponse.fromPartial(base ?? {});
30363
+ },
30364
+ fromPartial(object) {
30365
+ const message = createBaseSandboxGetFromNameResponse();
30366
+ message.sandboxId = object.sandboxId ?? "";
30367
+ return message;
30368
+ }
30369
+ };
28397
30370
  function createBaseSandboxGetLogsRequest() {
28398
30371
  return { sandboxId: "", fileDescriptor: 0, timeout: 0, lastEntryId: "" };
28399
30372
  }
@@ -28980,7 +30953,7 @@ var SandboxHandleMetadata = {
28980
30953
  }
28981
30954
  };
28982
30955
  function createBaseSandboxInfo() {
28983
- return { id: "", createdAt: 0, taskInfo: void 0, appId: "", tags: [] };
30956
+ return { id: "", createdAt: 0, taskInfo: void 0, appId: "", tags: [], name: "" };
28984
30957
  }
28985
30958
  var SandboxInfo = {
28986
30959
  encode(message, writer = new BinaryWriter()) {
@@ -28999,6 +30972,9 @@ var SandboxInfo = {
28999
30972
  for (const v of message.tags) {
29000
30973
  SandboxTag.encode(v, writer.uint32(50).fork()).join();
29001
30974
  }
30975
+ if (message.name !== "") {
30976
+ writer.uint32(58).string(message.name);
30977
+ }
29002
30978
  return writer;
29003
30979
  },
29004
30980
  decode(input, length) {
@@ -29043,6 +31019,13 @@ var SandboxInfo = {
29043
31019
  message.tags.push(SandboxTag.decode(reader, reader.uint32()));
29044
31020
  continue;
29045
31021
  }
31022
+ case 7: {
31023
+ if (tag !== 58) {
31024
+ break;
31025
+ }
31026
+ message.name = reader.string();
31027
+ continue;
31028
+ }
29046
31029
  }
29047
31030
  if ((tag & 7) === 4 || tag === 0) {
29048
31031
  break;
@@ -29057,7 +31040,8 @@ var SandboxInfo = {
29057
31040
  createdAt: isSet3(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
29058
31041
  taskInfo: isSet3(object.taskInfo) ? TaskInfo.fromJSON(object.taskInfo) : void 0,
29059
31042
  appId: isSet3(object.appId) ? globalThis.String(object.appId) : "",
29060
- tags: globalThis.Array.isArray(object?.tags) ? object.tags.map((e) => SandboxTag.fromJSON(e)) : []
31043
+ tags: globalThis.Array.isArray(object?.tags) ? object.tags.map((e) => SandboxTag.fromJSON(e)) : [],
31044
+ name: isSet3(object.name) ? globalThis.String(object.name) : ""
29061
31045
  };
29062
31046
  },
29063
31047
  toJSON(message) {
@@ -29077,6 +31061,9 @@ var SandboxInfo = {
29077
31061
  if (message.tags?.length) {
29078
31062
  obj.tags = message.tags.map((e) => SandboxTag.toJSON(e));
29079
31063
  }
31064
+ if (message.name !== "") {
31065
+ obj.name = message.name;
31066
+ }
29080
31067
  return obj;
29081
31068
  },
29082
31069
  create(base) {
@@ -29089,6 +31076,7 @@ var SandboxInfo = {
29089
31076
  message.taskInfo = object.taskInfo !== void 0 && object.taskInfo !== null ? TaskInfo.fromPartial(object.taskInfo) : void 0;
29090
31077
  message.appId = object.appId ?? "";
29091
31078
  message.tags = object.tags?.map((e) => SandboxTag.fromPartial(e)) || [];
31079
+ message.name = object.name ?? "";
29092
31080
  return message;
29093
31081
  }
29094
31082
  };
@@ -29259,13 +31247,19 @@ var SandboxListResponse = {
29259
31247
  }
29260
31248
  };
29261
31249
  function createBaseSandboxRestoreRequest() {
29262
- return { snapshotId: "" };
31250
+ return { snapshotId: "", sandboxNameOverride: "", sandboxNameOverrideType: 0 };
29263
31251
  }
29264
31252
  var SandboxRestoreRequest = {
29265
31253
  encode(message, writer = new BinaryWriter()) {
29266
31254
  if (message.snapshotId !== "") {
29267
31255
  writer.uint32(10).string(message.snapshotId);
29268
31256
  }
31257
+ if (message.sandboxNameOverride !== "") {
31258
+ writer.uint32(18).string(message.sandboxNameOverride);
31259
+ }
31260
+ if (message.sandboxNameOverrideType !== 0) {
31261
+ writer.uint32(24).int32(message.sandboxNameOverrideType);
31262
+ }
29269
31263
  return writer;
29270
31264
  },
29271
31265
  decode(input, length) {
@@ -29282,6 +31276,20 @@ var SandboxRestoreRequest = {
29282
31276
  message.snapshotId = reader.string();
29283
31277
  continue;
29284
31278
  }
31279
+ case 2: {
31280
+ if (tag !== 18) {
31281
+ break;
31282
+ }
31283
+ message.sandboxNameOverride = reader.string();
31284
+ continue;
31285
+ }
31286
+ case 3: {
31287
+ if (tag !== 24) {
31288
+ break;
31289
+ }
31290
+ message.sandboxNameOverrideType = reader.int32();
31291
+ continue;
31292
+ }
29285
31293
  }
29286
31294
  if ((tag & 7) === 4 || tag === 0) {
29287
31295
  break;
@@ -29291,13 +31299,25 @@ var SandboxRestoreRequest = {
29291
31299
  return message;
29292
31300
  },
29293
31301
  fromJSON(object) {
29294
- return { snapshotId: isSet3(object.snapshotId) ? globalThis.String(object.snapshotId) : "" };
31302
+ return {
31303
+ snapshotId: isSet3(object.snapshotId) ? globalThis.String(object.snapshotId) : "",
31304
+ sandboxNameOverride: isSet3(object.sandboxNameOverride) ? globalThis.String(object.sandboxNameOverride) : "",
31305
+ sandboxNameOverrideType: isSet3(object.sandboxNameOverrideType) ? sandboxRestoreRequest_SandboxNameOverrideTypeFromJSON(object.sandboxNameOverrideType) : 0
31306
+ };
29295
31307
  },
29296
31308
  toJSON(message) {
29297
31309
  const obj = {};
29298
31310
  if (message.snapshotId !== "") {
29299
31311
  obj.snapshotId = message.snapshotId;
29300
31312
  }
31313
+ if (message.sandboxNameOverride !== "") {
31314
+ obj.sandboxNameOverride = message.sandboxNameOverride;
31315
+ }
31316
+ if (message.sandboxNameOverrideType !== 0) {
31317
+ obj.sandboxNameOverrideType = sandboxRestoreRequest_SandboxNameOverrideTypeToJSON(
31318
+ message.sandboxNameOverrideType
31319
+ );
31320
+ }
29301
31321
  return obj;
29302
31322
  },
29303
31323
  create(base) {
@@ -29306,6 +31326,8 @@ var SandboxRestoreRequest = {
29306
31326
  fromPartial(object) {
29307
31327
  const message = createBaseSandboxRestoreRequest();
29308
31328
  message.snapshotId = object.snapshotId ?? "";
31329
+ message.sandboxNameOverride = object.sandboxNameOverride ?? "";
31330
+ message.sandboxNameOverrideType = object.sandboxNameOverrideType ?? 0;
29309
31331
  return message;
29310
31332
  }
29311
31333
  };
@@ -29360,6 +31382,176 @@ var SandboxRestoreResponse = {
29360
31382
  return message;
29361
31383
  }
29362
31384
  };
31385
+ function createBaseSandboxSnapshotFsAsyncGetRequest() {
31386
+ return { imageId: "", timeout: 0 };
31387
+ }
31388
+ var SandboxSnapshotFsAsyncGetRequest = {
31389
+ encode(message, writer = new BinaryWriter()) {
31390
+ if (message.imageId !== "") {
31391
+ writer.uint32(10).string(message.imageId);
31392
+ }
31393
+ if (message.timeout !== 0) {
31394
+ writer.uint32(21).float(message.timeout);
31395
+ }
31396
+ return writer;
31397
+ },
31398
+ decode(input, length) {
31399
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
31400
+ let end = length === void 0 ? reader.len : reader.pos + length;
31401
+ const message = createBaseSandboxSnapshotFsAsyncGetRequest();
31402
+ while (reader.pos < end) {
31403
+ const tag = reader.uint32();
31404
+ switch (tag >>> 3) {
31405
+ case 1: {
31406
+ if (tag !== 10) {
31407
+ break;
31408
+ }
31409
+ message.imageId = reader.string();
31410
+ continue;
31411
+ }
31412
+ case 2: {
31413
+ if (tag !== 21) {
31414
+ break;
31415
+ }
31416
+ message.timeout = reader.float();
31417
+ continue;
31418
+ }
31419
+ }
31420
+ if ((tag & 7) === 4 || tag === 0) {
31421
+ break;
31422
+ }
31423
+ reader.skip(tag & 7);
31424
+ }
31425
+ return message;
31426
+ },
31427
+ fromJSON(object) {
31428
+ return {
31429
+ imageId: isSet3(object.imageId) ? globalThis.String(object.imageId) : "",
31430
+ timeout: isSet3(object.timeout) ? globalThis.Number(object.timeout) : 0
31431
+ };
31432
+ },
31433
+ toJSON(message) {
31434
+ const obj = {};
31435
+ if (message.imageId !== "") {
31436
+ obj.imageId = message.imageId;
31437
+ }
31438
+ if (message.timeout !== 0) {
31439
+ obj.timeout = message.timeout;
31440
+ }
31441
+ return obj;
31442
+ },
31443
+ create(base) {
31444
+ return SandboxSnapshotFsAsyncGetRequest.fromPartial(base ?? {});
31445
+ },
31446
+ fromPartial(object) {
31447
+ const message = createBaseSandboxSnapshotFsAsyncGetRequest();
31448
+ message.imageId = object.imageId ?? "";
31449
+ message.timeout = object.timeout ?? 0;
31450
+ return message;
31451
+ }
31452
+ };
31453
+ function createBaseSandboxSnapshotFsAsyncRequest() {
31454
+ return { sandboxId: "" };
31455
+ }
31456
+ var SandboxSnapshotFsAsyncRequest = {
31457
+ encode(message, writer = new BinaryWriter()) {
31458
+ if (message.sandboxId !== "") {
31459
+ writer.uint32(10).string(message.sandboxId);
31460
+ }
31461
+ return writer;
31462
+ },
31463
+ decode(input, length) {
31464
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
31465
+ let end = length === void 0 ? reader.len : reader.pos + length;
31466
+ const message = createBaseSandboxSnapshotFsAsyncRequest();
31467
+ while (reader.pos < end) {
31468
+ const tag = reader.uint32();
31469
+ switch (tag >>> 3) {
31470
+ case 1: {
31471
+ if (tag !== 10) {
31472
+ break;
31473
+ }
31474
+ message.sandboxId = reader.string();
31475
+ continue;
31476
+ }
31477
+ }
31478
+ if ((tag & 7) === 4 || tag === 0) {
31479
+ break;
31480
+ }
31481
+ reader.skip(tag & 7);
31482
+ }
31483
+ return message;
31484
+ },
31485
+ fromJSON(object) {
31486
+ return { sandboxId: isSet3(object.sandboxId) ? globalThis.String(object.sandboxId) : "" };
31487
+ },
31488
+ toJSON(message) {
31489
+ const obj = {};
31490
+ if (message.sandboxId !== "") {
31491
+ obj.sandboxId = message.sandboxId;
31492
+ }
31493
+ return obj;
31494
+ },
31495
+ create(base) {
31496
+ return SandboxSnapshotFsAsyncRequest.fromPartial(base ?? {});
31497
+ },
31498
+ fromPartial(object) {
31499
+ const message = createBaseSandboxSnapshotFsAsyncRequest();
31500
+ message.sandboxId = object.sandboxId ?? "";
31501
+ return message;
31502
+ }
31503
+ };
31504
+ function createBaseSandboxSnapshotFsAsyncResponse() {
31505
+ return { imageId: "" };
31506
+ }
31507
+ var SandboxSnapshotFsAsyncResponse = {
31508
+ encode(message, writer = new BinaryWriter()) {
31509
+ if (message.imageId !== "") {
31510
+ writer.uint32(10).string(message.imageId);
31511
+ }
31512
+ return writer;
31513
+ },
31514
+ decode(input, length) {
31515
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
31516
+ let end = length === void 0 ? reader.len : reader.pos + length;
31517
+ const message = createBaseSandboxSnapshotFsAsyncResponse();
31518
+ while (reader.pos < end) {
31519
+ const tag = reader.uint32();
31520
+ switch (tag >>> 3) {
31521
+ case 1: {
31522
+ if (tag !== 10) {
31523
+ break;
31524
+ }
31525
+ message.imageId = reader.string();
31526
+ continue;
31527
+ }
31528
+ }
31529
+ if ((tag & 7) === 4 || tag === 0) {
31530
+ break;
31531
+ }
31532
+ reader.skip(tag & 7);
31533
+ }
31534
+ return message;
31535
+ },
31536
+ fromJSON(object) {
31537
+ return { imageId: isSet3(object.imageId) ? globalThis.String(object.imageId) : "" };
31538
+ },
31539
+ toJSON(message) {
31540
+ const obj = {};
31541
+ if (message.imageId !== "") {
31542
+ obj.imageId = message.imageId;
31543
+ }
31544
+ return obj;
31545
+ },
31546
+ create(base) {
31547
+ return SandboxSnapshotFsAsyncResponse.fromPartial(base ?? {});
31548
+ },
31549
+ fromPartial(object) {
31550
+ const message = createBaseSandboxSnapshotFsAsyncResponse();
31551
+ message.imageId = object.imageId ?? "";
31552
+ return message;
31553
+ }
31554
+ };
29363
31555
  function createBaseSandboxSnapshotFsRequest() {
29364
31556
  return { sandboxId: "", timeout: 0 };
29365
31557
  }
@@ -30983,13 +33175,16 @@ var SecretGetOrCreateRequest_EnvDictEntry = {
30983
33175
  }
30984
33176
  };
30985
33177
  function createBaseSecretGetOrCreateResponse() {
30986
- return { secretId: "" };
33178
+ return { secretId: "", metadata: void 0 };
30987
33179
  }
30988
33180
  var SecretGetOrCreateResponse = {
30989
33181
  encode(message, writer = new BinaryWriter()) {
30990
33182
  if (message.secretId !== "") {
30991
33183
  writer.uint32(10).string(message.secretId);
30992
33184
  }
33185
+ if (message.metadata !== void 0) {
33186
+ SecretMetadata.encode(message.metadata, writer.uint32(18).fork()).join();
33187
+ }
30993
33188
  return writer;
30994
33189
  },
30995
33190
  decode(input, length) {
@@ -31006,6 +33201,13 @@ var SecretGetOrCreateResponse = {
31006
33201
  message.secretId = reader.string();
31007
33202
  continue;
31008
33203
  }
33204
+ case 2: {
33205
+ if (tag !== 18) {
33206
+ break;
33207
+ }
33208
+ message.metadata = SecretMetadata.decode(reader, reader.uint32());
33209
+ continue;
33210
+ }
31009
33211
  }
31010
33212
  if ((tag & 7) === 4 || tag === 0) {
31011
33213
  break;
@@ -31015,13 +33217,19 @@ var SecretGetOrCreateResponse = {
31015
33217
  return message;
31016
33218
  },
31017
33219
  fromJSON(object) {
31018
- return { secretId: isSet3(object.secretId) ? globalThis.String(object.secretId) : "" };
33220
+ return {
33221
+ secretId: isSet3(object.secretId) ? globalThis.String(object.secretId) : "",
33222
+ metadata: isSet3(object.metadata) ? SecretMetadata.fromJSON(object.metadata) : void 0
33223
+ };
31019
33224
  },
31020
33225
  toJSON(message) {
31021
33226
  const obj = {};
31022
33227
  if (message.secretId !== "") {
31023
33228
  obj.secretId = message.secretId;
31024
33229
  }
33230
+ if (message.metadata !== void 0) {
33231
+ obj.metadata = SecretMetadata.toJSON(message.metadata);
33232
+ }
31025
33233
  return obj;
31026
33234
  },
31027
33235
  create(base) {
@@ -31030,11 +33238,12 @@ var SecretGetOrCreateResponse = {
31030
33238
  fromPartial(object) {
31031
33239
  const message = createBaseSecretGetOrCreateResponse();
31032
33240
  message.secretId = object.secretId ?? "";
33241
+ message.metadata = object.metadata !== void 0 && object.metadata !== null ? SecretMetadata.fromPartial(object.metadata) : void 0;
31033
33242
  return message;
31034
33243
  }
31035
33244
  };
31036
33245
  function createBaseSecretListItem() {
31037
- return { label: "", createdAt: 0, lastUsedAt: 0, environmentName: "", secretId: "" };
33246
+ return { label: "", createdAt: 0, lastUsedAt: 0, environmentName: "", secretId: "", metadata: void 0 };
31038
33247
  }
31039
33248
  var SecretListItem = {
31040
33249
  encode(message, writer = new BinaryWriter()) {
@@ -31053,6 +33262,9 @@ var SecretListItem = {
31053
33262
  if (message.secretId !== "") {
31054
33263
  writer.uint32(42).string(message.secretId);
31055
33264
  }
33265
+ if (message.metadata !== void 0) {
33266
+ SecretMetadata.encode(message.metadata, writer.uint32(50).fork()).join();
33267
+ }
31056
33268
  return writer;
31057
33269
  },
31058
33270
  decode(input, length) {
@@ -31097,6 +33309,13 @@ var SecretListItem = {
31097
33309
  message.secretId = reader.string();
31098
33310
  continue;
31099
33311
  }
33312
+ case 6: {
33313
+ if (tag !== 50) {
33314
+ break;
33315
+ }
33316
+ message.metadata = SecretMetadata.decode(reader, reader.uint32());
33317
+ continue;
33318
+ }
31100
33319
  }
31101
33320
  if ((tag & 7) === 4 || tag === 0) {
31102
33321
  break;
@@ -31111,7 +33330,8 @@ var SecretListItem = {
31111
33330
  createdAt: isSet3(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
31112
33331
  lastUsedAt: isSet3(object.lastUsedAt) ? globalThis.Number(object.lastUsedAt) : 0,
31113
33332
  environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
31114
- secretId: isSet3(object.secretId) ? globalThis.String(object.secretId) : ""
33333
+ secretId: isSet3(object.secretId) ? globalThis.String(object.secretId) : "",
33334
+ metadata: isSet3(object.metadata) ? SecretMetadata.fromJSON(object.metadata) : void 0
31115
33335
  };
31116
33336
  },
31117
33337
  toJSON(message) {
@@ -31131,6 +33351,9 @@ var SecretListItem = {
31131
33351
  if (message.secretId !== "") {
31132
33352
  obj.secretId = message.secretId;
31133
33353
  }
33354
+ if (message.metadata !== void 0) {
33355
+ obj.metadata = SecretMetadata.toJSON(message.metadata);
33356
+ }
31134
33357
  return obj;
31135
33358
  },
31136
33359
  create(base) {
@@ -31143,17 +33366,21 @@ var SecretListItem = {
31143
33366
  message.lastUsedAt = object.lastUsedAt ?? 0;
31144
33367
  message.environmentName = object.environmentName ?? "";
31145
33368
  message.secretId = object.secretId ?? "";
33369
+ message.metadata = object.metadata !== void 0 && object.metadata !== null ? SecretMetadata.fromPartial(object.metadata) : void 0;
31146
33370
  return message;
31147
33371
  }
31148
33372
  };
31149
33373
  function createBaseSecretListRequest() {
31150
- return { environmentName: "" };
33374
+ return { environmentName: "", pagination: void 0 };
31151
33375
  }
31152
33376
  var SecretListRequest = {
31153
33377
  encode(message, writer = new BinaryWriter()) {
31154
33378
  if (message.environmentName !== "") {
31155
33379
  writer.uint32(10).string(message.environmentName);
31156
33380
  }
33381
+ if (message.pagination !== void 0) {
33382
+ ListPagination.encode(message.pagination, writer.uint32(18).fork()).join();
33383
+ }
31157
33384
  return writer;
31158
33385
  },
31159
33386
  decode(input, length) {
@@ -31170,6 +33397,13 @@ var SecretListRequest = {
31170
33397
  message.environmentName = reader.string();
31171
33398
  continue;
31172
33399
  }
33400
+ case 2: {
33401
+ if (tag !== 18) {
33402
+ break;
33403
+ }
33404
+ message.pagination = ListPagination.decode(reader, reader.uint32());
33405
+ continue;
33406
+ }
31173
33407
  }
31174
33408
  if ((tag & 7) === 4 || tag === 0) {
31175
33409
  break;
@@ -31179,13 +33413,19 @@ var SecretListRequest = {
31179
33413
  return message;
31180
33414
  },
31181
33415
  fromJSON(object) {
31182
- return { environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "" };
33416
+ return {
33417
+ environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
33418
+ pagination: isSet3(object.pagination) ? ListPagination.fromJSON(object.pagination) : void 0
33419
+ };
31183
33420
  },
31184
33421
  toJSON(message) {
31185
33422
  const obj = {};
31186
33423
  if (message.environmentName !== "") {
31187
33424
  obj.environmentName = message.environmentName;
31188
33425
  }
33426
+ if (message.pagination !== void 0) {
33427
+ obj.pagination = ListPagination.toJSON(message.pagination);
33428
+ }
31189
33429
  return obj;
31190
33430
  },
31191
33431
  create(base) {
@@ -31194,6 +33434,7 @@ var SecretListRequest = {
31194
33434
  fromPartial(object) {
31195
33435
  const message = createBaseSecretListRequest();
31196
33436
  message.environmentName = object.environmentName ?? "";
33437
+ message.pagination = object.pagination !== void 0 && object.pagination !== null ? ListPagination.fromPartial(object.pagination) : void 0;
31197
33438
  return message;
31198
33439
  }
31199
33440
  };
@@ -31265,6 +33506,74 @@ var SecretListResponse = {
31265
33506
  return message;
31266
33507
  }
31267
33508
  };
33509
+ function createBaseSecretMetadata() {
33510
+ return { name: "", creationInfo: void 0 };
33511
+ }
33512
+ var SecretMetadata = {
33513
+ encode(message, writer = new BinaryWriter()) {
33514
+ if (message.name !== "") {
33515
+ writer.uint32(10).string(message.name);
33516
+ }
33517
+ if (message.creationInfo !== void 0) {
33518
+ CreationInfo.encode(message.creationInfo, writer.uint32(18).fork()).join();
33519
+ }
33520
+ return writer;
33521
+ },
33522
+ decode(input, length) {
33523
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
33524
+ let end = length === void 0 ? reader.len : reader.pos + length;
33525
+ const message = createBaseSecretMetadata();
33526
+ while (reader.pos < end) {
33527
+ const tag = reader.uint32();
33528
+ switch (tag >>> 3) {
33529
+ case 1: {
33530
+ if (tag !== 10) {
33531
+ break;
33532
+ }
33533
+ message.name = reader.string();
33534
+ continue;
33535
+ }
33536
+ case 2: {
33537
+ if (tag !== 18) {
33538
+ break;
33539
+ }
33540
+ message.creationInfo = CreationInfo.decode(reader, reader.uint32());
33541
+ continue;
33542
+ }
33543
+ }
33544
+ if ((tag & 7) === 4 || tag === 0) {
33545
+ break;
33546
+ }
33547
+ reader.skip(tag & 7);
33548
+ }
33549
+ return message;
33550
+ },
33551
+ fromJSON(object) {
33552
+ return {
33553
+ name: isSet3(object.name) ? globalThis.String(object.name) : "",
33554
+ creationInfo: isSet3(object.creationInfo) ? CreationInfo.fromJSON(object.creationInfo) : void 0
33555
+ };
33556
+ },
33557
+ toJSON(message) {
33558
+ const obj = {};
33559
+ if (message.name !== "") {
33560
+ obj.name = message.name;
33561
+ }
33562
+ if (message.creationInfo !== void 0) {
33563
+ obj.creationInfo = CreationInfo.toJSON(message.creationInfo);
33564
+ }
33565
+ return obj;
33566
+ },
33567
+ create(base) {
33568
+ return SecretMetadata.fromPartial(base ?? {});
33569
+ },
33570
+ fromPartial(object) {
33571
+ const message = createBaseSecretMetadata();
33572
+ message.name = object.name ?? "";
33573
+ message.creationInfo = object.creationInfo !== void 0 && object.creationInfo !== null ? CreationInfo.fromPartial(object.creationInfo) : void 0;
33574
+ return message;
33575
+ }
33576
+ };
31268
33577
  function createBaseSharedVolumeDeleteRequest() {
31269
33578
  return { sharedVolumeId: "" };
31270
33579
  }
@@ -32487,7 +34796,7 @@ var TaskClusterHelloRequest = {
32487
34796
  }
32488
34797
  };
32489
34798
  function createBaseTaskClusterHelloResponse() {
32490
- return { clusterId: "", clusterRank: 0, containerIps: [] };
34799
+ return { clusterId: "", clusterRank: 0, containerIps: [], containerIpv4Ips: [] };
32491
34800
  }
32492
34801
  var TaskClusterHelloResponse = {
32493
34802
  encode(message, writer = new BinaryWriter()) {
@@ -32500,6 +34809,9 @@ var TaskClusterHelloResponse = {
32500
34809
  for (const v of message.containerIps) {
32501
34810
  writer.uint32(26).string(v);
32502
34811
  }
34812
+ for (const v of message.containerIpv4Ips) {
34813
+ writer.uint32(34).string(v);
34814
+ }
32503
34815
  return writer;
32504
34816
  },
32505
34817
  decode(input, length) {
@@ -32530,6 +34842,13 @@ var TaskClusterHelloResponse = {
32530
34842
  message.containerIps.push(reader.string());
32531
34843
  continue;
32532
34844
  }
34845
+ case 4: {
34846
+ if (tag !== 34) {
34847
+ break;
34848
+ }
34849
+ message.containerIpv4Ips.push(reader.string());
34850
+ continue;
34851
+ }
32533
34852
  }
32534
34853
  if ((tag & 7) === 4 || tag === 0) {
32535
34854
  break;
@@ -32542,7 +34861,8 @@ var TaskClusterHelloResponse = {
32542
34861
  return {
32543
34862
  clusterId: isSet3(object.clusterId) ? globalThis.String(object.clusterId) : "",
32544
34863
  clusterRank: isSet3(object.clusterRank) ? globalThis.Number(object.clusterRank) : 0,
32545
- containerIps: globalThis.Array.isArray(object?.containerIps) ? object.containerIps.map((e) => globalThis.String(e)) : []
34864
+ containerIps: globalThis.Array.isArray(object?.containerIps) ? object.containerIps.map((e) => globalThis.String(e)) : [],
34865
+ containerIpv4Ips: globalThis.Array.isArray(object?.containerIpv4Ips) ? object.containerIpv4Ips.map((e) => globalThis.String(e)) : []
32546
34866
  };
32547
34867
  },
32548
34868
  toJSON(message) {
@@ -32556,6 +34876,9 @@ var TaskClusterHelloResponse = {
32556
34876
  if (message.containerIps?.length) {
32557
34877
  obj.containerIps = message.containerIps;
32558
34878
  }
34879
+ if (message.containerIpv4Ips?.length) {
34880
+ obj.containerIpv4Ips = message.containerIpv4Ips;
34881
+ }
32559
34882
  return obj;
32560
34883
  },
32561
34884
  create(base) {
@@ -32566,6 +34889,7 @@ var TaskClusterHelloResponse = {
32566
34889
  message.clusterId = object.clusterId ?? "";
32567
34890
  message.clusterRank = object.clusterRank ?? 0;
32568
34891
  message.containerIps = object.containerIps?.map((e) => e) || [];
34892
+ message.containerIpv4Ips = object.containerIpv4Ips?.map((e) => e) || [];
32569
34893
  return message;
32570
34894
  }
32571
34895
  };
@@ -32623,7 +34947,17 @@ var TaskCurrentInputsResponse = {
32623
34947
  }
32624
34948
  };
32625
34949
  function createBaseTaskInfo() {
32626
- return { id: "", startedAt: 0, finishedAt: 0, result: void 0, enqueuedAt: 0, gpuType: "", sandboxId: "" };
34950
+ return {
34951
+ id: "",
34952
+ startedAt: 0,
34953
+ finishedAt: 0,
34954
+ result: void 0,
34955
+ enqueuedAt: 0,
34956
+ gpuType: "",
34957
+ sandboxId: "",
34958
+ snapshotBehavior: 0,
34959
+ gpuConfig: void 0
34960
+ };
32627
34961
  }
32628
34962
  var TaskInfo = {
32629
34963
  encode(message, writer = new BinaryWriter()) {
@@ -32648,6 +34982,12 @@ var TaskInfo = {
32648
34982
  if (message.sandboxId !== "") {
32649
34983
  writer.uint32(58).string(message.sandboxId);
32650
34984
  }
34985
+ if (message.snapshotBehavior !== 0) {
34986
+ writer.uint32(64).int32(message.snapshotBehavior);
34987
+ }
34988
+ if (message.gpuConfig !== void 0) {
34989
+ GPUConfig.encode(message.gpuConfig, writer.uint32(74).fork()).join();
34990
+ }
32651
34991
  return writer;
32652
34992
  },
32653
34993
  decode(input, length) {
@@ -32706,6 +35046,20 @@ var TaskInfo = {
32706
35046
  message.sandboxId = reader.string();
32707
35047
  continue;
32708
35048
  }
35049
+ case 8: {
35050
+ if (tag !== 64) {
35051
+ break;
35052
+ }
35053
+ message.snapshotBehavior = reader.int32();
35054
+ continue;
35055
+ }
35056
+ case 9: {
35057
+ if (tag !== 74) {
35058
+ break;
35059
+ }
35060
+ message.gpuConfig = GPUConfig.decode(reader, reader.uint32());
35061
+ continue;
35062
+ }
32709
35063
  }
32710
35064
  if ((tag & 7) === 4 || tag === 0) {
32711
35065
  break;
@@ -32722,7 +35076,9 @@ var TaskInfo = {
32722
35076
  result: isSet3(object.result) ? GenericResult.fromJSON(object.result) : void 0,
32723
35077
  enqueuedAt: isSet3(object.enqueuedAt) ? globalThis.Number(object.enqueuedAt) : 0,
32724
35078
  gpuType: isSet3(object.gpuType) ? globalThis.String(object.gpuType) : "",
32725
- sandboxId: isSet3(object.sandboxId) ? globalThis.String(object.sandboxId) : ""
35079
+ sandboxId: isSet3(object.sandboxId) ? globalThis.String(object.sandboxId) : "",
35080
+ snapshotBehavior: isSet3(object.snapshotBehavior) ? taskSnapshotBehaviorFromJSON(object.snapshotBehavior) : 0,
35081
+ gpuConfig: isSet3(object.gpuConfig) ? GPUConfig.fromJSON(object.gpuConfig) : void 0
32726
35082
  };
32727
35083
  },
32728
35084
  toJSON(message) {
@@ -32748,6 +35104,12 @@ var TaskInfo = {
32748
35104
  if (message.sandboxId !== "") {
32749
35105
  obj.sandboxId = message.sandboxId;
32750
35106
  }
35107
+ if (message.snapshotBehavior !== 0) {
35108
+ obj.snapshotBehavior = taskSnapshotBehaviorToJSON(message.snapshotBehavior);
35109
+ }
35110
+ if (message.gpuConfig !== void 0) {
35111
+ obj.gpuConfig = GPUConfig.toJSON(message.gpuConfig);
35112
+ }
32751
35113
  return obj;
32752
35114
  },
32753
35115
  create(base) {
@@ -32762,6 +35124,8 @@ var TaskInfo = {
32762
35124
  message.enqueuedAt = object.enqueuedAt ?? 0;
32763
35125
  message.gpuType = object.gpuType ?? "";
32764
35126
  message.sandboxId = object.sandboxId ?? "";
35127
+ message.snapshotBehavior = object.snapshotBehavior ?? 0;
35128
+ message.gpuConfig = object.gpuConfig !== void 0 && object.gpuConfig !== null ? GPUConfig.fromPartial(object.gpuConfig) : void 0;
32765
35129
  return message;
32766
35130
  }
32767
35131
  };
@@ -33047,7 +35411,8 @@ function createBaseTaskLogsBatch() {
33047
35411
  imageId: "",
33048
35412
  eof: false,
33049
35413
  ptyExecId: "",
33050
- rootFunctionId: ""
35414
+ rootFunctionId: "",
35415
+ ttlDays: 0
33051
35416
  };
33052
35417
  }
33053
35418
  var TaskLogsBatch = {
@@ -33082,6 +35447,9 @@ var TaskLogsBatch = {
33082
35447
  if (message.rootFunctionId !== "") {
33083
35448
  writer.uint32(130).string(message.rootFunctionId);
33084
35449
  }
35450
+ if (message.ttlDays !== 0) {
35451
+ writer.uint32(136).uint32(message.ttlDays);
35452
+ }
33085
35453
  return writer;
33086
35454
  },
33087
35455
  decode(input, length) {
@@ -33161,6 +35529,13 @@ var TaskLogsBatch = {
33161
35529
  message.rootFunctionId = reader.string();
33162
35530
  continue;
33163
35531
  }
35532
+ case 17: {
35533
+ if (tag !== 136) {
35534
+ break;
35535
+ }
35536
+ message.ttlDays = reader.uint32();
35537
+ continue;
35538
+ }
33164
35539
  }
33165
35540
  if ((tag & 7) === 4 || tag === 0) {
33166
35541
  break;
@@ -33180,7 +35555,8 @@ var TaskLogsBatch = {
33180
35555
  imageId: isSet3(object.imageId) ? globalThis.String(object.imageId) : "",
33181
35556
  eof: isSet3(object.eof) ? globalThis.Boolean(object.eof) : false,
33182
35557
  ptyExecId: isSet3(object.ptyExecId) ? globalThis.String(object.ptyExecId) : "",
33183
- rootFunctionId: isSet3(object.rootFunctionId) ? globalThis.String(object.rootFunctionId) : ""
35558
+ rootFunctionId: isSet3(object.rootFunctionId) ? globalThis.String(object.rootFunctionId) : "",
35559
+ ttlDays: isSet3(object.ttlDays) ? globalThis.Number(object.ttlDays) : 0
33184
35560
  };
33185
35561
  },
33186
35562
  toJSON(message) {
@@ -33215,6 +35591,9 @@ var TaskLogsBatch = {
33215
35591
  if (message.rootFunctionId !== "") {
33216
35592
  obj.rootFunctionId = message.rootFunctionId;
33217
35593
  }
35594
+ if (message.ttlDays !== 0) {
35595
+ obj.ttlDays = Math.round(message.ttlDays);
35596
+ }
33218
35597
  return obj;
33219
35598
  },
33220
35599
  create(base) {
@@ -33232,6 +35611,7 @@ var TaskLogsBatch = {
33232
35611
  message.eof = object.eof ?? false;
33233
35612
  message.ptyExecId = object.ptyExecId ?? "";
33234
35613
  message.rootFunctionId = object.rootFunctionId ?? "";
35614
+ message.ttlDays = object.ttlDays ?? 0;
33235
35615
  return message;
33236
35616
  }
33237
35617
  };
@@ -35727,7 +38107,7 @@ var VolumeListFilesResponse = {
35727
38107
  }
35728
38108
  };
35729
38109
  function createBaseVolumeListItem() {
35730
- return { label: "", volumeId: "", createdAt: 0 };
38110
+ return { label: "", volumeId: "", createdAt: 0, metadata: void 0 };
35731
38111
  }
35732
38112
  var VolumeListItem = {
35733
38113
  encode(message, writer = new BinaryWriter()) {
@@ -35740,6 +38120,9 @@ var VolumeListItem = {
35740
38120
  if (message.createdAt !== 0) {
35741
38121
  writer.uint32(25).double(message.createdAt);
35742
38122
  }
38123
+ if (message.metadata !== void 0) {
38124
+ VolumeMetadata.encode(message.metadata, writer.uint32(34).fork()).join();
38125
+ }
35743
38126
  return writer;
35744
38127
  },
35745
38128
  decode(input, length) {
@@ -35770,6 +38153,13 @@ var VolumeListItem = {
35770
38153
  message.createdAt = reader.double();
35771
38154
  continue;
35772
38155
  }
38156
+ case 4: {
38157
+ if (tag !== 34) {
38158
+ break;
38159
+ }
38160
+ message.metadata = VolumeMetadata.decode(reader, reader.uint32());
38161
+ continue;
38162
+ }
35773
38163
  }
35774
38164
  if ((tag & 7) === 4 || tag === 0) {
35775
38165
  break;
@@ -35782,7 +38172,8 @@ var VolumeListItem = {
35782
38172
  return {
35783
38173
  label: isSet3(object.label) ? globalThis.String(object.label) : "",
35784
38174
  volumeId: isSet3(object.volumeId) ? globalThis.String(object.volumeId) : "",
35785
- createdAt: isSet3(object.createdAt) ? globalThis.Number(object.createdAt) : 0
38175
+ createdAt: isSet3(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
38176
+ metadata: isSet3(object.metadata) ? VolumeMetadata.fromJSON(object.metadata) : void 0
35786
38177
  };
35787
38178
  },
35788
38179
  toJSON(message) {
@@ -35796,6 +38187,9 @@ var VolumeListItem = {
35796
38187
  if (message.createdAt !== 0) {
35797
38188
  obj.createdAt = message.createdAt;
35798
38189
  }
38190
+ if (message.metadata !== void 0) {
38191
+ obj.metadata = VolumeMetadata.toJSON(message.metadata);
38192
+ }
35799
38193
  return obj;
35800
38194
  },
35801
38195
  create(base) {
@@ -35806,17 +38200,21 @@ var VolumeListItem = {
35806
38200
  message.label = object.label ?? "";
35807
38201
  message.volumeId = object.volumeId ?? "";
35808
38202
  message.createdAt = object.createdAt ?? 0;
38203
+ message.metadata = object.metadata !== void 0 && object.metadata !== null ? VolumeMetadata.fromPartial(object.metadata) : void 0;
35809
38204
  return message;
35810
38205
  }
35811
38206
  };
35812
38207
  function createBaseVolumeListRequest() {
35813
- return { environmentName: "" };
38208
+ return { environmentName: "", pagination: void 0 };
35814
38209
  }
35815
38210
  var VolumeListRequest = {
35816
38211
  encode(message, writer = new BinaryWriter()) {
35817
38212
  if (message.environmentName !== "") {
35818
38213
  writer.uint32(10).string(message.environmentName);
35819
38214
  }
38215
+ if (message.pagination !== void 0) {
38216
+ ListPagination.encode(message.pagination, writer.uint32(18).fork()).join();
38217
+ }
35820
38218
  return writer;
35821
38219
  },
35822
38220
  decode(input, length) {
@@ -35833,6 +38231,13 @@ var VolumeListRequest = {
35833
38231
  message.environmentName = reader.string();
35834
38232
  continue;
35835
38233
  }
38234
+ case 2: {
38235
+ if (tag !== 18) {
38236
+ break;
38237
+ }
38238
+ message.pagination = ListPagination.decode(reader, reader.uint32());
38239
+ continue;
38240
+ }
35836
38241
  }
35837
38242
  if ((tag & 7) === 4 || tag === 0) {
35838
38243
  break;
@@ -35842,13 +38247,19 @@ var VolumeListRequest = {
35842
38247
  return message;
35843
38248
  },
35844
38249
  fromJSON(object) {
35845
- return { environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "" };
38250
+ return {
38251
+ environmentName: isSet3(object.environmentName) ? globalThis.String(object.environmentName) : "",
38252
+ pagination: isSet3(object.pagination) ? ListPagination.fromJSON(object.pagination) : void 0
38253
+ };
35846
38254
  },
35847
38255
  toJSON(message) {
35848
38256
  const obj = {};
35849
38257
  if (message.environmentName !== "") {
35850
38258
  obj.environmentName = message.environmentName;
35851
38259
  }
38260
+ if (message.pagination !== void 0) {
38261
+ obj.pagination = ListPagination.toJSON(message.pagination);
38262
+ }
35852
38263
  return obj;
35853
38264
  },
35854
38265
  create(base) {
@@ -35857,6 +38268,7 @@ var VolumeListRequest = {
35857
38268
  fromPartial(object) {
35858
38269
  const message = createBaseVolumeListRequest();
35859
38270
  message.environmentName = object.environmentName ?? "";
38271
+ message.pagination = object.pagination !== void 0 && object.pagination !== null ? ListPagination.fromPartial(object.pagination) : void 0;
35860
38272
  return message;
35861
38273
  }
35862
38274
  };
@@ -35929,13 +38341,19 @@ var VolumeListResponse = {
35929
38341
  }
35930
38342
  };
35931
38343
  function createBaseVolumeMetadata() {
35932
- return { version: 0 };
38344
+ return { version: 0, name: "", creationInfo: void 0 };
35933
38345
  }
35934
38346
  var VolumeMetadata = {
35935
38347
  encode(message, writer = new BinaryWriter()) {
35936
38348
  if (message.version !== 0) {
35937
38349
  writer.uint32(8).int32(message.version);
35938
38350
  }
38351
+ if (message.name !== "") {
38352
+ writer.uint32(18).string(message.name);
38353
+ }
38354
+ if (message.creationInfo !== void 0) {
38355
+ CreationInfo.encode(message.creationInfo, writer.uint32(26).fork()).join();
38356
+ }
35939
38357
  return writer;
35940
38358
  },
35941
38359
  decode(input, length) {
@@ -35952,6 +38370,20 @@ var VolumeMetadata = {
35952
38370
  message.version = reader.int32();
35953
38371
  continue;
35954
38372
  }
38373
+ case 2: {
38374
+ if (tag !== 18) {
38375
+ break;
38376
+ }
38377
+ message.name = reader.string();
38378
+ continue;
38379
+ }
38380
+ case 3: {
38381
+ if (tag !== 26) {
38382
+ break;
38383
+ }
38384
+ message.creationInfo = CreationInfo.decode(reader, reader.uint32());
38385
+ continue;
38386
+ }
35955
38387
  }
35956
38388
  if ((tag & 7) === 4 || tag === 0) {
35957
38389
  break;
@@ -35961,13 +38393,23 @@ var VolumeMetadata = {
35961
38393
  return message;
35962
38394
  },
35963
38395
  fromJSON(object) {
35964
- return { version: isSet3(object.version) ? volumeFsVersionFromJSON(object.version) : 0 };
38396
+ return {
38397
+ version: isSet3(object.version) ? volumeFsVersionFromJSON(object.version) : 0,
38398
+ name: isSet3(object.name) ? globalThis.String(object.name) : "",
38399
+ creationInfo: isSet3(object.creationInfo) ? CreationInfo.fromJSON(object.creationInfo) : void 0
38400
+ };
35965
38401
  },
35966
38402
  toJSON(message) {
35967
38403
  const obj = {};
35968
38404
  if (message.version !== 0) {
35969
38405
  obj.version = volumeFsVersionToJSON(message.version);
35970
38406
  }
38407
+ if (message.name !== "") {
38408
+ obj.name = message.name;
38409
+ }
38410
+ if (message.creationInfo !== void 0) {
38411
+ obj.creationInfo = CreationInfo.toJSON(message.creationInfo);
38412
+ }
35971
38413
  return obj;
35972
38414
  },
35973
38415
  create(base) {
@@ -35976,6 +38418,8 @@ var VolumeMetadata = {
35976
38418
  fromPartial(object) {
35977
38419
  const message = createBaseVolumeMetadata();
35978
38420
  message.version = object.version ?? 0;
38421
+ message.name = object.name ?? "";
38422
+ message.creationInfo = object.creationInfo !== void 0 && object.creationInfo !== null ? CreationInfo.fromPartial(object.creationInfo) : void 0;
35979
38423
  return message;
35980
38424
  }
35981
38425
  };
@@ -37365,11 +39809,7 @@ var ModalClientDefinition = {
37365
39809
  responseStream: false,
37366
39810
  options: {}
37367
39811
  },
37368
- /**
37369
- * Input Plane
37370
- * These RPCs are experimental, not deployed to production, and can be changed / removed
37371
- * without needing to worry about backwards compatibility.
37372
- */
39812
+ /** Input Plane */
37373
39813
  attemptAwait: {
37374
39814
  name: "AttemptAwait",
37375
39815
  requestType: AttemptAwaitRequest,
@@ -37394,6 +39834,15 @@ var ModalClientDefinition = {
37394
39834
  responseStream: false,
37395
39835
  options: {}
37396
39836
  },
39837
+ /** Auth Token */
39838
+ authTokenGet: {
39839
+ name: "AuthTokenGet",
39840
+ requestType: AuthTokenGetRequest,
39841
+ requestStream: false,
39842
+ responseType: AuthTokenGetResponse,
39843
+ responseStream: false,
39844
+ options: {}
39845
+ },
37397
39846
  /** Blobs */
37398
39847
  blobCreate: {
37399
39848
  name: "BlobCreate",
@@ -37756,6 +40205,14 @@ var ModalClientDefinition = {
37756
40205
  responseStream: false,
37757
40206
  options: {}
37758
40207
  },
40208
+ functionCallFromId: {
40209
+ name: "FunctionCallFromId",
40210
+ requestType: FunctionCallFromIdRequest,
40211
+ requestStream: false,
40212
+ responseType: FunctionCallFromIdResponse,
40213
+ responseStream: false,
40214
+ options: {}
40215
+ },
37759
40216
  functionCallGetDataIn: {
37760
40217
  name: "FunctionCallGetDataIn",
37761
40218
  requestType: FunctionCallGetDataRequest,
@@ -37796,6 +40253,15 @@ var ModalClientDefinition = {
37796
40253
  responseStream: false,
37797
40254
  options: {}
37798
40255
  },
40256
+ /** For map RPCs, to signal that all inputs have been sent */
40257
+ functionFinishInputs: {
40258
+ name: "FunctionFinishInputs",
40259
+ requestType: FunctionFinishInputsRequest,
40260
+ requestStream: false,
40261
+ responseType: Empty,
40262
+ responseStream: false,
40263
+ options: {}
40264
+ },
37799
40265
  functionGet: {
37800
40266
  name: "FunctionGet",
37801
40267
  requestType: FunctionGetRequest,
@@ -37936,6 +40402,31 @@ var ModalClientDefinition = {
37936
40402
  responseStream: true,
37937
40403
  options: {}
37938
40404
  },
40405
+ /** Input Plane Map */
40406
+ mapAwait: {
40407
+ name: "MapAwait",
40408
+ requestType: MapAwaitRequest,
40409
+ requestStream: false,
40410
+ responseType: MapAwaitResponse,
40411
+ responseStream: false,
40412
+ options: {}
40413
+ },
40414
+ mapCheckInputs: {
40415
+ name: "MapCheckInputs",
40416
+ requestType: MapCheckInputsRequest,
40417
+ requestStream: false,
40418
+ responseType: MapCheckInputsResponse,
40419
+ responseStream: false,
40420
+ options: {}
40421
+ },
40422
+ mapStartOrContinue: {
40423
+ name: "MapStartOrContinue",
40424
+ requestType: MapStartOrContinueRequest,
40425
+ requestStream: false,
40426
+ responseType: MapStartOrContinueResponse,
40427
+ responseStream: false,
40428
+ options: {}
40429
+ },
37939
40430
  /** Mounts */
37940
40431
  mountGetOrCreate: {
37941
40432
  name: "MountGetOrCreate",
@@ -38101,6 +40592,14 @@ var ModalClientDefinition = {
38101
40592
  responseStream: false,
38102
40593
  options: {}
38103
40594
  },
40595
+ sandboxGetFromName: {
40596
+ name: "SandboxGetFromName",
40597
+ requestType: SandboxGetFromNameRequest,
40598
+ requestStream: false,
40599
+ responseType: SandboxGetFromNameResponse,
40600
+ responseStream: false,
40601
+ options: {}
40602
+ },
38104
40603
  sandboxGetLogs: {
38105
40604
  name: "SandboxGetLogs",
38106
40605
  requestType: SandboxGetLogsRequest,
@@ -38166,6 +40665,22 @@ var ModalClientDefinition = {
38166
40665
  responseStream: false,
38167
40666
  options: {}
38168
40667
  },
40668
+ sandboxSnapshotFsAsync: {
40669
+ name: "SandboxSnapshotFsAsync",
40670
+ requestType: SandboxSnapshotFsAsyncRequest,
40671
+ requestStream: false,
40672
+ responseType: SandboxSnapshotFsAsyncResponse,
40673
+ responseStream: false,
40674
+ options: {}
40675
+ },
40676
+ sandboxSnapshotFsAsyncGet: {
40677
+ name: "SandboxSnapshotFsAsyncGet",
40678
+ requestType: SandboxSnapshotFsAsyncGetRequest,
40679
+ requestStream: false,
40680
+ responseType: SandboxSnapshotFsResponse,
40681
+ responseStream: false,
40682
+ options: {}
40683
+ },
38169
40684
  sandboxSnapshotGet: {
38170
40685
  name: "SandboxSnapshotGet",
38171
40686
  requestType: SandboxSnapshotGetRequest,
@@ -38825,6 +41340,12 @@ var NotFoundError = class extends Error {
38825
41340
  this.name = "NotFoundError";
38826
41341
  }
38827
41342
  };
41343
+ var AlreadyExistsError = class extends Error {
41344
+ constructor(message) {
41345
+ super(message);
41346
+ this.name = "AlreadyExistsError";
41347
+ }
41348
+ };
38828
41349
  var InvalidError = class extends Error {
38829
41350
  constructor(message) {
38830
41351
  super(message);
@@ -38920,6 +41441,14 @@ var Image2 = class _Image {
38920
41441
  get imageId() {
38921
41442
  return this.#imageId;
38922
41443
  }
41444
+ /**
41445
+ * Creates an `Image` instance from an image id
41446
+ *
41447
+ * @param imageId - Image id.
41448
+ */
41449
+ static fromId(imageId) {
41450
+ return new _Image(imageId, "");
41451
+ }
38923
41452
  /**
38924
41453
  * Creates an `Image` instance from a raw registry tag, optionally using a secret for authentication.
38925
41454
  *
@@ -38984,15 +41513,16 @@ var Image2 = class _Image {
38984
41513
  return new _Image("", tag, imageRegistryConfig);
38985
41514
  }
38986
41515
  /**
38987
- * @internal
38988
- * Build image object
41516
+ * Eagerly builds an `Image` on Modal.
41517
+ *
41518
+ * @param app - App to use to build image.
38989
41519
  */
38990
- async _build(appId) {
41520
+ async build(app) {
38991
41521
  if (this.imageId !== "") {
38992
41522
  return this;
38993
41523
  }
38994
41524
  const resp = await client.imageGetOrCreate({
38995
- appId,
41525
+ appId: app.appId,
38996
41526
  image: {
38997
41527
  dockerfileCommands: [`FROM ${this.#tag}`],
38998
41528
  imageRegistryConfig: this.#imageRegistryConfig
@@ -39349,6 +41879,32 @@ var Sandbox2 = class _Sandbox {
39349
41879
  }
39350
41880
  return new _Sandbox(sandboxId);
39351
41881
  }
41882
+ /** Get a running Sandbox by name from a deployed App.
41883
+ *
41884
+ * Raises a NotFoundError if no running Sandbox is found with the given name.
41885
+ * A Sandbox's name is the `name` argument passed to `App.createSandbox`.
41886
+ *
41887
+ * @param appName - Name of the deployed app
41888
+ * @param name - Name of the sandbox
41889
+ * @param environment - Optional override for the environment
41890
+ * @returns Promise that resolves to a Sandbox
41891
+ */
41892
+ static async fromName(appName, name, environment) {
41893
+ try {
41894
+ const resp = await client.sandboxGetFromName({
41895
+ sandboxName: name,
41896
+ appName,
41897
+ environmentName: environmentName(environment)
41898
+ });
41899
+ return new _Sandbox(resp.sandboxId);
41900
+ } catch (err) {
41901
+ if (err instanceof ClientError3 && err.code === Status3.NOT_FOUND)
41902
+ throw new NotFoundError(
41903
+ `Sandbox with name '${name}' not found in app '${appName}'`
41904
+ );
41905
+ throw err;
41906
+ }
41907
+ }
39352
41908
  /**
39353
41909
  * Open a file in the sandbox filesystem.
39354
41910
  * @param path - Path to the file to open
@@ -39793,7 +42349,7 @@ var App = class _App {
39793
42349
  `Timeout must be a multiple of 1000ms, got ${options.timeout}`
39794
42350
  );
39795
42351
  }
39796
- await image._build(this.appId);
42352
+ await image.build(this);
39797
42353
  if (options.workdir && !options.workdir.startsWith("/")) {
39798
42354
  throw new Error(
39799
42355
  `workdir must be an absolute path, got: ${options.workdir}`
@@ -39860,50 +42416,59 @@ var App = class _App {
39860
42416
  const schedulerPlacement = SchedulerPlacement.create({
39861
42417
  regions: options.regions ?? []
39862
42418
  });
39863
- const createResp = await client.sandboxCreate({
39864
- appId: this.appId,
39865
- definition: {
39866
- // Sleep default is implicit in image builder version <=2024.10
39867
- entrypointArgs: options.command ?? ["sleep", "48h"],
39868
- imageId: image.imageId,
39869
- timeoutSecs: options.timeout != void 0 ? options.timeout / 1e3 : 600,
39870
- workdir: options.workdir ?? void 0,
39871
- networkAccess,
39872
- resources: {
39873
- // https://modal.com/docs/guide/resources
39874
- milliCpu: Math.round(1e3 * (options.cpu ?? 0.125)),
39875
- memoryMb: options.memory ?? 128,
39876
- gpuConfig
39877
- },
39878
- volumeMounts,
39879
- cloudBucketMounts,
39880
- secretIds,
39881
- openPorts: openPorts.length > 0 ? { ports: openPorts } : void 0,
39882
- cloudProviderStr: options.cloud ?? "",
39883
- schedulerPlacement,
39884
- verbose: options.verbose ?? false,
39885
- proxyId: options.proxy?.proxyId
42419
+ let createResp;
42420
+ try {
42421
+ createResp = await client.sandboxCreate({
42422
+ appId: this.appId,
42423
+ definition: {
42424
+ // Sleep default is implicit in image builder version <=2024.10
42425
+ entrypointArgs: options.command ?? ["sleep", "48h"],
42426
+ imageId: image.imageId,
42427
+ timeoutSecs: options.timeout != void 0 ? options.timeout / 1e3 : 600,
42428
+ workdir: options.workdir ?? void 0,
42429
+ networkAccess,
42430
+ resources: {
42431
+ // https://modal.com/docs/guide/resources
42432
+ milliCpu: Math.round(1e3 * (options.cpu ?? 0.125)),
42433
+ memoryMb: options.memory ?? 128,
42434
+ gpuConfig
42435
+ },
42436
+ volumeMounts,
42437
+ cloudBucketMounts,
42438
+ secretIds,
42439
+ openPorts: openPorts.length > 0 ? { ports: openPorts } : void 0,
42440
+ cloudProviderStr: options.cloud ?? "",
42441
+ schedulerPlacement,
42442
+ verbose: options.verbose ?? false,
42443
+ proxyId: options.proxy?.proxyId,
42444
+ name: options.name
42445
+ }
42446
+ });
42447
+ } catch (err) {
42448
+ if (err instanceof ClientError4 && err.code === Status4.ALREADY_EXISTS) {
42449
+ throw new AlreadyExistsError(err.details || err.message);
39886
42450
  }
39887
- });
42451
+ throw err;
42452
+ }
39888
42453
  return new Sandbox2(createResp.sandboxId);
39889
42454
  }
39890
42455
  /**
39891
42456
  * @deprecated Use `Image.fromRegistry` instead.
39892
42457
  */
39893
42458
  async imageFromRegistry(tag, secret) {
39894
- return await Image2.fromRegistry(tag, secret)._build(this.appId);
42459
+ return await Image2.fromRegistry(tag, secret).build(this);
39895
42460
  }
39896
42461
  /**
39897
42462
  * @deprecated Use `Image.fromAwsEcr` instead.
39898
42463
  */
39899
42464
  async imageFromAwsEcr(tag, secret) {
39900
- return await Image2.fromAwsEcr(tag, secret)._build(this.appId);
42465
+ return await Image2.fromAwsEcr(tag, secret).build(this);
39901
42466
  }
39902
42467
  /**
39903
42468
  * @deprecated Use `Image.fromGcpArtifactRegistry` instead.
39904
42469
  */
39905
42470
  async imageFromGcpArtifactRegistry(tag, secret) {
39906
- return await Image2.fromGcpArtifactRegistry(tag, secret)._build(this.appId);
42471
+ return await Image2.fromGcpArtifactRegistry(tag, secret).build(this);
39907
42472
  }
39908
42473
  };
39909
42474
 
@@ -40274,10 +42839,10 @@ var ControlPlaneInvocation = class _ControlPlaneInvocation {
40274
42839
  this.inputJwt = inputJwt;
40275
42840
  }
40276
42841
  static async create(functionId, input, invocationType) {
40277
- const functionPutInputsItem = {
42842
+ const functionPutInputsItem = FunctionPutInputsItem.create({
40278
42843
  idx: 0,
40279
42844
  input
40280
- };
42845
+ });
40281
42846
  const functionMapResponse = await client.functionMap({
40282
42847
  functionId,
40283
42848
  functionCallType: 1 /* FUNCTION_CALL_TYPE_UNARY */,
@@ -40340,12 +42905,10 @@ var InputPlaneInvocation = class _InputPlaneInvocation {
40340
42905
  this.attemptToken = attemptToken;
40341
42906
  }
40342
42907
  static async create(inputPlaneUrl, functionId, input) {
40343
- const functionPutInputsItem = {
42908
+ const functionPutInputsItem = FunctionPutInputsItem.create({
40344
42909
  idx: 0,
40345
- input,
40346
- r2Failed: false,
40347
- r2LatencyMs: 0
40348
- };
42910
+ input
42911
+ });
40349
42912
  const client2 = getOrCreateInputPlaneClient(inputPlaneUrl);
40350
42913
  const attemptStartResponse = await client2.attemptStart({
40351
42914
  functionId,
@@ -40635,18 +43198,79 @@ async function blobUpload(data) {
40635
43198
  }
40636
43199
  }
40637
43200
 
43201
+ // src/retries.ts
43202
+ var Retries = class {
43203
+ maxRetries;
43204
+ backoffCoefficient;
43205
+ initialDelayMs;
43206
+ maxDelayMs;
43207
+ constructor(options) {
43208
+ const {
43209
+ maxRetries,
43210
+ backoffCoefficient = 2,
43211
+ initialDelayMs = 1e3,
43212
+ maxDelayMs = 6e4
43213
+ } = options;
43214
+ if (maxRetries < 0 || maxRetries > 10) {
43215
+ throw new Error(
43216
+ `Invalid maxRetries: ${maxRetries}. Must be between 0 and 10.`
43217
+ );
43218
+ }
43219
+ if (backoffCoefficient < 1 || backoffCoefficient > 10) {
43220
+ throw new Error(
43221
+ `Invalid backoffCoefficient: ${backoffCoefficient}. Must be between 1.0 and 10.0`
43222
+ );
43223
+ }
43224
+ if (initialDelayMs < 0 || initialDelayMs > 6e4) {
43225
+ throw new Error(
43226
+ `Invalid initialDelayMs: ${initialDelayMs}. Must be between 0 and 60000 ms.`
43227
+ );
43228
+ }
43229
+ if (maxDelayMs < 1e3 || maxDelayMs > 6e4) {
43230
+ throw new Error(
43231
+ `Invalid maxDelayMs: ${maxDelayMs}. Must be between 1000 and 60000 ms.`
43232
+ );
43233
+ }
43234
+ this.maxRetries = maxRetries;
43235
+ this.backoffCoefficient = backoffCoefficient;
43236
+ this.initialDelayMs = initialDelayMs;
43237
+ this.maxDelayMs = maxDelayMs;
43238
+ }
43239
+ };
43240
+ function parseRetries(retries) {
43241
+ if (retries === void 0) return void 0;
43242
+ if (typeof retries === "number") {
43243
+ if (!Number.isInteger(retries) || retries < 0 || retries > 10) {
43244
+ throw new Error(
43245
+ `Retries parameter must be an integer between 0 and 10. Found: ${retries}`
43246
+ );
43247
+ }
43248
+ return new Retries({
43249
+ maxRetries: retries,
43250
+ backoffCoefficient: 1,
43251
+ initialDelayMs: 1e3
43252
+ });
43253
+ }
43254
+ if (retries instanceof Retries) return retries;
43255
+ throw new Error(
43256
+ `Retries parameter must be an integer or instance of Retries. Found: ${typeof retries}.`
43257
+ );
43258
+ }
43259
+
40638
43260
  // src/cls.ts
40639
43261
  var Cls = class _Cls {
40640
43262
  #serviceFunctionId;
40641
43263
  #schema;
40642
43264
  #methodNames;
40643
43265
  #inputPlaneUrl;
43266
+ #options;
40644
43267
  /** @ignore */
40645
- constructor(serviceFunctionId, schema, methodNames, inputPlaneUrl) {
43268
+ constructor(serviceFunctionId, schema, methodNames, inputPlaneUrl, options) {
40646
43269
  this.#serviceFunctionId = serviceFunctionId;
40647
43270
  this.#schema = schema;
40648
43271
  this.#methodNames = methodNames;
40649
43272
  this.#inputPlaneUrl = inputPlaneUrl;
43273
+ this.#options = options;
40650
43274
  }
40651
43275
  static async lookup(appName, name, options = {}) {
40652
43276
  try {
@@ -40677,7 +43301,8 @@ var Cls = class _Cls {
40677
43301
  serviceFunction.functionId,
40678
43302
  schema,
40679
43303
  methodNames,
40680
- serviceFunction.handleMetadata?.inputPlaneUrl
43304
+ serviceFunction.handleMetadata?.inputPlaneUrl,
43305
+ void 0
40681
43306
  );
40682
43307
  } catch (err) {
40683
43308
  if (err instanceof ClientError6 && err.code === Status6.NOT_FOUND)
@@ -40685,10 +43310,10 @@ var Cls = class _Cls {
40685
43310
  throw err;
40686
43311
  }
40687
43312
  }
40688
- /** Create a new instance of the Cls with parameters. */
43313
+ /** Create a new instance of the Cls with parameters and/or runtime options. */
40689
43314
  async instance(params = {}) {
40690
43315
  let functionId;
40691
- if (this.#schema.length === 0) {
43316
+ if (this.#schema.length === 0 && this.#options === void 0) {
40692
43317
  functionId = this.#serviceFunctionId;
40693
43318
  } else {
40694
43319
  functionId = await this.#bindParameters(params);
@@ -40699,12 +43324,53 @@ var Cls = class _Cls {
40699
43324
  }
40700
43325
  return new ClsInstance(methods);
40701
43326
  }
43327
+ /** Override the static Function configuration at runtime. */
43328
+ withOptions(options) {
43329
+ const merged = mergeServiceOptions(this.#options, options);
43330
+ return new _Cls(
43331
+ this.#serviceFunctionId,
43332
+ this.#schema,
43333
+ this.#methodNames,
43334
+ this.#inputPlaneUrl,
43335
+ merged
43336
+ );
43337
+ }
43338
+ /** Create an instance of the Cls with input concurrency enabled or overridden with new values. */
43339
+ withConcurrency(options) {
43340
+ const merged = mergeServiceOptions(this.#options, {
43341
+ maxConcurrentInputs: options.maxInputs,
43342
+ targetConcurrentInputs: options.targetInputs
43343
+ });
43344
+ return new _Cls(
43345
+ this.#serviceFunctionId,
43346
+ this.#schema,
43347
+ this.#methodNames,
43348
+ this.#inputPlaneUrl,
43349
+ merged
43350
+ );
43351
+ }
43352
+ /** Create an instance of the Cls with dynamic batching enabled or overridden with new values. */
43353
+ withBatching(options) {
43354
+ const merged = mergeServiceOptions(this.#options, {
43355
+ batchMaxSize: options.maxBatchSize,
43356
+ batchWaitMs: options.waitMs
43357
+ });
43358
+ return new _Cls(
43359
+ this.#serviceFunctionId,
43360
+ this.#schema,
43361
+ this.#methodNames,
43362
+ this.#inputPlaneUrl,
43363
+ merged
43364
+ );
43365
+ }
40702
43366
  /** Bind parameters to the Cls function. */
40703
43367
  async #bindParameters(params) {
40704
43368
  const serializedParams = encodeParameterSet(this.#schema, params);
43369
+ const functionOptions = buildFunctionOptionsProto(this.#options);
40705
43370
  const bindResp = await client.functionBindParams({
40706
43371
  functionId: this.#serviceFunctionId,
40707
- serializedParams
43372
+ serializedParams,
43373
+ functionOptions
40708
43374
  });
40709
43375
  return bindResp.boundFunctionId;
40710
43376
  }
@@ -40718,6 +43384,62 @@ function encodeParameterSet(schema, params) {
40718
43384
  encoded.sort((a, b) => a.name.localeCompare(b.name));
40719
43385
  return ClassParameterSet.encode({ parameters: encoded }).finish();
40720
43386
  }
43387
+ function mergeServiceOptions(base, diff) {
43388
+ const filteredDiff = Object.fromEntries(
43389
+ Object.entries(diff).filter(([, value]) => value !== void 0)
43390
+ );
43391
+ const merged = { ...base ?? {}, ...filteredDiff };
43392
+ return Object.keys(merged).length === 0 ? void 0 : merged;
43393
+ }
43394
+ function buildFunctionOptionsProto(options) {
43395
+ if (!options) return void 0;
43396
+ const o = options ?? {};
43397
+ const gpuConfig = parseGpuConfig(o.gpu);
43398
+ const resources = o.cpu !== void 0 || o.memory !== void 0 || gpuConfig ? {
43399
+ milliCpu: o.cpu !== void 0 ? Math.round(1e3 * o.cpu) : void 0,
43400
+ memoryMb: o.memory,
43401
+ gpuConfig
43402
+ } : void 0;
43403
+ const secretIds = o.secrets ? o.secrets.map((s) => s.secretId) : [];
43404
+ const volumeMounts = o.volumes ? Object.entries(o.volumes).map(([mountPath, volume]) => ({
43405
+ volumeId: volume.volumeId,
43406
+ mountPath,
43407
+ allowBackgroundCommits: true,
43408
+ readOnly: volume.isReadOnly
43409
+ })) : [];
43410
+ const parsedRetries = parseRetries(o.retries);
43411
+ const retryPolicy = parsedRetries ? {
43412
+ retries: parsedRetries.maxRetries,
43413
+ backoffCoefficient: parsedRetries.backoffCoefficient,
43414
+ initialDelayMs: parsedRetries.initialDelayMs,
43415
+ maxDelayMs: parsedRetries.maxDelayMs
43416
+ } : void 0;
43417
+ if (o.scaledownWindow !== void 0 && o.scaledownWindow % 1e3 !== 0) {
43418
+ throw new Error(
43419
+ `scaledownWindow must be a multiple of 1000ms, got ${o.scaledownWindow}`
43420
+ );
43421
+ }
43422
+ if (o.timeout !== void 0 && o.timeout % 1e3 !== 0) {
43423
+ throw new Error(`timeout must be a multiple of 1000ms, got ${o.timeout}`);
43424
+ }
43425
+ const functionOptions = FunctionOptions.create({
43426
+ secretIds,
43427
+ replaceSecretIds: secretIds.length > 0,
43428
+ replaceVolumeMounts: volumeMounts.length > 0,
43429
+ volumeMounts,
43430
+ resources,
43431
+ retryPolicy,
43432
+ concurrencyLimit: o.maxContainers,
43433
+ bufferContainers: o.bufferContainers,
43434
+ taskIdleTimeoutSecs: o.scaledownWindow !== void 0 ? o.scaledownWindow / 1e3 : void 0,
43435
+ timeoutSecs: o.timeout !== void 0 ? o.timeout / 1e3 : void 0,
43436
+ maxConcurrentInputs: o.maxConcurrentInputs,
43437
+ targetConcurrentInputs: o.targetConcurrentInputs,
43438
+ batchMaxSize: o.batchMaxSize,
43439
+ batchLingerMs: o.batchWaitMs
43440
+ });
43441
+ return functionOptions;
43442
+ }
40721
43443
  function encodeParameter(paramSpec, value) {
40722
43444
  const name = paramSpec.name;
40723
43445
  const paramType = paramSpec.type;
@@ -40780,20 +43502,50 @@ var ClsInstance = class {
40780
43502
 
40781
43503
  // src/queue.ts
40782
43504
  import { ClientError as ClientError7, Status as Status7 } from "nice-grpc";
43505
+
43506
+ // src/ephemeral.ts
40783
43507
  var ephemeralObjectHeartbeatSleep = 3e5;
43508
+ var EphemeralHeartbeatManager = class {
43509
+ heartbeatFn;
43510
+ abortController;
43511
+ constructor(heartbeatFn) {
43512
+ this.heartbeatFn = heartbeatFn;
43513
+ this.abortController = new AbortController();
43514
+ this.start();
43515
+ }
43516
+ start() {
43517
+ const signal = this.abortController.signal;
43518
+ (async () => {
43519
+ while (!signal.aborted) {
43520
+ await this.heartbeatFn();
43521
+ await Promise.race([
43522
+ new Promise((resolve) => {
43523
+ setTimeout(resolve, ephemeralObjectHeartbeatSleep).unref();
43524
+ }),
43525
+ new Promise((resolve) => {
43526
+ signal.addEventListener("abort", resolve, { once: true });
43527
+ })
43528
+ ]);
43529
+ }
43530
+ })();
43531
+ }
43532
+ stop() {
43533
+ this.abortController.abort();
43534
+ }
43535
+ };
43536
+
43537
+ // src/queue.ts
40784
43538
  var queueInitialPutBackoff = 100;
40785
43539
  var queueDefaultPartitionTtl = 24 * 3600 * 1e3;
40786
43540
  var Queue = class _Queue {
40787
43541
  queueId;
40788
43542
  name;
40789
- #ephemeral;
40790
- #abortController;
43543
+ #ephemeralHbManager;
40791
43544
  /** @ignore */
40792
- constructor(queueId, name, ephemeral = false) {
43545
+ constructor(queueId, name, ephemeralHbManager) {
40793
43546
  this.queueId = queueId;
40794
43547
  this.name = name;
40795
- this.#ephemeral = ephemeral;
40796
- this.#abortController = ephemeral ? new AbortController() : void 0;
43548
+ this.#ephemeralHbManager = ephemeralHbManager;
40797
43549
  }
40798
43550
  static #validatePartitionKey(partition) {
40799
43551
  if (partition) {
@@ -40816,27 +43568,15 @@ var Queue = class _Queue {
40816
43568
  objectCreationType: 5 /* OBJECT_CREATION_TYPE_EPHEMERAL */,
40817
43569
  environmentName: environmentName(options.environment)
40818
43570
  });
40819
- const queue = new _Queue(resp.queueId, void 0, true);
40820
- const signal = queue.#abortController.signal;
40821
- (async () => {
40822
- while (true) {
40823
- await client.queueHeartbeat({ queueId: resp.queueId });
40824
- await Promise.race([
40825
- new Promise(
40826
- (resolve) => setTimeout(resolve, ephemeralObjectHeartbeatSleep)
40827
- ),
40828
- new Promise((resolve) => {
40829
- signal.addEventListener("abort", resolve, { once: true });
40830
- })
40831
- ]);
40832
- }
40833
- })();
40834
- return queue;
43571
+ const ephemeralHbManager = new EphemeralHeartbeatManager(
43572
+ () => client.queueHeartbeat({ queueId: resp.queueId })
43573
+ );
43574
+ return new _Queue(resp.queueId, void 0, ephemeralHbManager);
40835
43575
  }
40836
43576
  /** Delete the ephemeral queue. Only usable with `Queue.ephemeral()`. */
40837
43577
  closeEphemeral() {
40838
- if (this.#ephemeral) {
40839
- this.#abortController.abort();
43578
+ if (this.#ephemeralHbManager) {
43579
+ this.#ephemeralHbManager.stop();
40840
43580
  } else {
40841
43581
  throw new InvalidError("Queue is not ephemeral.");
40842
43582
  }
@@ -41032,11 +43772,13 @@ var Volume = class _Volume {
41032
43772
  volumeId;
41033
43773
  name;
41034
43774
  _readOnly = false;
43775
+ #ephemeralHbManager;
41035
43776
  /** @ignore */
41036
- constructor(volumeId, name, readOnly = false) {
43777
+ constructor(volumeId, name, readOnly = false, ephemeralHbManager) {
41037
43778
  this.volumeId = volumeId;
41038
43779
  this.name = name;
41039
43780
  this._readOnly = readOnly;
43781
+ this.#ephemeralHbManager = ephemeralHbManager;
41040
43782
  }
41041
43783
  static async fromName(name, options) {
41042
43784
  try {
@@ -41054,11 +43796,33 @@ var Volume = class _Volume {
41054
43796
  }
41055
43797
  /** Configure Volume to mount as read-only. */
41056
43798
  readOnly() {
41057
- return new _Volume(this.volumeId, this.name, true);
43799
+ return new _Volume(this.volumeId, this.name, true, this.#ephemeralHbManager);
41058
43800
  }
41059
43801
  get isReadOnly() {
41060
43802
  return this._readOnly;
41061
43803
  }
43804
+ /**
43805
+ * Create a nameless, temporary volume.
43806
+ * You will need to call `closeEphemeral()` to delete the volume.
43807
+ */
43808
+ static async ephemeral(options = {}) {
43809
+ const resp = await client.volumeGetOrCreate({
43810
+ objectCreationType: 5 /* OBJECT_CREATION_TYPE_EPHEMERAL */,
43811
+ environmentName: environmentName(options.environment)
43812
+ });
43813
+ const ephemeralHbManager = new EphemeralHeartbeatManager(
43814
+ () => client.volumeHeartbeat({ volumeId: resp.volumeId })
43815
+ );
43816
+ return new _Volume(resp.volumeId, void 0, false, ephemeralHbManager);
43817
+ }
43818
+ /** Delete the ephemeral volume. Only usable with `Volume.ephemeral()`. */
43819
+ closeEphemeral() {
43820
+ if (this.#ephemeralHbManager) {
43821
+ this.#ephemeralHbManager.stop();
43822
+ } else {
43823
+ throw new InvalidError("Volume is not ephemeral.");
43824
+ }
43825
+ }
41062
43826
  };
41063
43827
 
41064
43828
  // src/proxy.ts
@@ -41088,6 +43852,7 @@ var Proxy2 = class _Proxy {
41088
43852
  }
41089
43853
  };
41090
43854
  export {
43855
+ AlreadyExistsError,
41091
43856
  App,
41092
43857
  CloudBucketMount2 as CloudBucketMount,
41093
43858
  Cls,
@@ -41105,6 +43870,7 @@ export {
41105
43870
  QueueEmptyError,
41106
43871
  QueueFullError,
41107
43872
  RemoteError,
43873
+ Retries,
41108
43874
  Sandbox2 as Sandbox,
41109
43875
  SandboxFile,
41110
43876
  SandboxTimeoutError,