modal 0.11.1-dev.2 → 0.11.1-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -7659,7 +7659,16 @@ var AppListResponse = {
7659
7659
  }
7660
7660
  };
7661
7661
  function createBaseAppListResponse_AppListItem() {
7662
- return { appId: "", description: "", state: 0, createdAt: 0, stoppedAt: 0, nRunningTasks: 0, name: "" };
7662
+ return {
7663
+ appId: "",
7664
+ description: "",
7665
+ state: 0,
7666
+ createdAt: 0,
7667
+ stoppedAt: 0,
7668
+ nRunningTasks: 0,
7669
+ name: "",
7670
+ metadata: void 0
7671
+ };
7663
7672
  }
7664
7673
  var AppListResponse_AppListItem = {
7665
7674
  encode(message, writer = new BinaryWriter()) {
@@ -7684,6 +7693,9 @@ var AppListResponse_AppListItem = {
7684
7693
  if (message.name !== "") {
7685
7694
  writer.uint32(82).string(message.name);
7686
7695
  }
7696
+ if (message.metadata !== void 0) {
7697
+ AppHandleMetadata.encode(message.metadata, writer.uint32(90).fork()).join();
7698
+ }
7687
7699
  return writer;
7688
7700
  },
7689
7701
  decode(input, length) {
@@ -7742,6 +7754,13 @@ var AppListResponse_AppListItem = {
7742
7754
  message.name = reader.string();
7743
7755
  continue;
7744
7756
  }
7757
+ case 11: {
7758
+ if (tag !== 90) {
7759
+ break;
7760
+ }
7761
+ message.metadata = AppHandleMetadata.decode(reader, reader.uint32());
7762
+ continue;
7763
+ }
7745
7764
  }
7746
7765
  if ((tag & 7) === 4 || tag === 0) {
7747
7766
  break;
@@ -7758,7 +7777,8 @@ var AppListResponse_AppListItem = {
7758
7777
  createdAt: isSet5(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
7759
7778
  stoppedAt: isSet5(object.stoppedAt) ? globalThis.Number(object.stoppedAt) : 0,
7760
7779
  nRunningTasks: isSet5(object.nRunningTasks) ? globalThis.Number(object.nRunningTasks) : 0,
7761
- name: isSet5(object.name) ? globalThis.String(object.name) : ""
7780
+ name: isSet5(object.name) ? globalThis.String(object.name) : "",
7781
+ metadata: isSet5(object.metadata) ? AppHandleMetadata.fromJSON(object.metadata) : void 0
7762
7782
  };
7763
7783
  },
7764
7784
  toJSON(message) {
@@ -7784,6 +7804,9 @@ var AppListResponse_AppListItem = {
7784
7804
  if (message.name !== "") {
7785
7805
  obj.name = message.name;
7786
7806
  }
7807
+ if (message.metadata !== void 0) {
7808
+ obj.metadata = AppHandleMetadata.toJSON(message.metadata);
7809
+ }
7787
7810
  return obj;
7788
7811
  },
7789
7812
  create(base) {
@@ -7798,6 +7821,7 @@ var AppListResponse_AppListItem = {
7798
7821
  message.stoppedAt = object.stoppedAt ?? 0;
7799
7822
  message.nRunningTasks = object.nRunningTasks ?? 0;
7800
7823
  message.name = object.name ?? "";
7824
+ message.metadata = object.metadata !== void 0 && object.metadata !== null ? AppHandleMetadata.fromPartial(object.metadata) : void 0;
7801
7825
  return message;
7802
7826
  }
7803
7827
  };
@@ -29356,7 +29380,8 @@ function createBaseFunctionGetTimeRangeStatsResponse() {
29356
29380
  containerErrorCount: 0,
29357
29381
  containerCreatingAtEndCount: 0,
29358
29382
  containerPercentileStats: {},
29359
- variantCount: 0
29383
+ variantCount: 0,
29384
+ containerTotalCount: 0
29360
29385
  };
29361
29386
  }
29362
29387
  var FunctionGetTimeRangeStatsResponse = {
@@ -29403,6 +29428,9 @@ var FunctionGetTimeRangeStatsResponse = {
29403
29428
  if (message.variantCount !== 0) {
29404
29429
  writer.uint32(96).uint32(message.variantCount);
29405
29430
  }
29431
+ if (message.containerTotalCount !== 0) {
29432
+ writer.uint32(104).uint64(message.containerTotalCount);
29433
+ }
29406
29434
  return writer;
29407
29435
  },
29408
29436
  decode(input, length) {
@@ -29505,6 +29533,13 @@ var FunctionGetTimeRangeStatsResponse = {
29505
29533
  message.variantCount = reader.uint32();
29506
29534
  continue;
29507
29535
  }
29536
+ case 13: {
29537
+ if (tag !== 104) {
29538
+ break;
29539
+ }
29540
+ message.containerTotalCount = longToNumber2(reader.uint64());
29541
+ continue;
29542
+ }
29508
29543
  }
29509
29544
  if ((tag & 7) === 4 || tag === 0) {
29510
29545
  break;
@@ -29538,7 +29573,8 @@ var FunctionGetTimeRangeStatsResponse = {
29538
29573
  },
29539
29574
  {}
29540
29575
  ) : {},
29541
- variantCount: isSet5(object.variantCount) ? globalThis.Number(object.variantCount) : 0
29576
+ variantCount: isSet5(object.variantCount) ? globalThis.Number(object.variantCount) : 0,
29577
+ containerTotalCount: isSet5(object.containerTotalCount) ? globalThis.Number(object.containerTotalCount) : 0
29542
29578
  };
29543
29579
  },
29544
29580
  toJSON(message) {
@@ -29591,6 +29627,9 @@ var FunctionGetTimeRangeStatsResponse = {
29591
29627
  if (message.variantCount !== 0) {
29592
29628
  obj.variantCount = Math.round(message.variantCount);
29593
29629
  }
29630
+ if (message.containerTotalCount !== 0) {
29631
+ obj.containerTotalCount = Math.round(message.containerTotalCount);
29632
+ }
29594
29633
  return obj;
29595
29634
  },
29596
29635
  create(base) {
@@ -29620,6 +29659,7 @@ var FunctionGetTimeRangeStatsResponse = {
29620
29659
  return acc;
29621
29660
  }, {});
29622
29661
  message.variantCount = object.variantCount ?? 0;
29662
+ message.containerTotalCount = object.containerTotalCount ?? 0;
29623
29663
  return message;
29624
29664
  }
29625
29665
  };
@@ -44383,7 +44423,14 @@ var SandboxCreateV2Request_CloudBucketMountCredentialsEntry = {
44383
44423
  }
44384
44424
  };
44385
44425
  function createBaseSandboxCreateV2Response() {
44386
- return { sandboxId: "", tunnels: [], taskId: "", metadata: void 0, commandRouterAccess: void 0 };
44426
+ return {
44427
+ sandboxId: "",
44428
+ tunnels: [],
44429
+ taskId: "",
44430
+ metadata: void 0,
44431
+ commandRouterAccess: void 0,
44432
+ sandboxToken: ""
44433
+ };
44387
44434
  }
44388
44435
  var SandboxCreateV2Response = {
44389
44436
  encode(message, writer = new BinaryWriter()) {
@@ -44402,6 +44449,9 @@ var SandboxCreateV2Response = {
44402
44449
  if (message.commandRouterAccess !== void 0) {
44403
44450
  CommandRouterAccess.encode(message.commandRouterAccess, writer.uint32(42).fork()).join();
44404
44451
  }
44452
+ if (message.sandboxToken !== "") {
44453
+ writer.uint32(50).string(message.sandboxToken);
44454
+ }
44405
44455
  return writer;
44406
44456
  },
44407
44457
  decode(input, length) {
@@ -44446,6 +44496,13 @@ var SandboxCreateV2Response = {
44446
44496
  message.commandRouterAccess = CommandRouterAccess.decode(reader, reader.uint32());
44447
44497
  continue;
44448
44498
  }
44499
+ case 6: {
44500
+ if (tag !== 50) {
44501
+ break;
44502
+ }
44503
+ message.sandboxToken = reader.string();
44504
+ continue;
44505
+ }
44449
44506
  }
44450
44507
  if ((tag & 7) === 4 || tag === 0) {
44451
44508
  break;
@@ -44460,7 +44517,8 @@ var SandboxCreateV2Response = {
44460
44517
  tunnels: globalThis.Array.isArray(object?.tunnels) ? object.tunnels.map((e) => TunnelData.fromJSON(e)) : [],
44461
44518
  taskId: isSet5(object.taskId) ? globalThis.String(object.taskId) : "",
44462
44519
  metadata: isSet5(object.metadata) ? SandboxHandleMetadata.fromJSON(object.metadata) : void 0,
44463
- commandRouterAccess: isSet5(object.commandRouterAccess) ? CommandRouterAccess.fromJSON(object.commandRouterAccess) : void 0
44520
+ commandRouterAccess: isSet5(object.commandRouterAccess) ? CommandRouterAccess.fromJSON(object.commandRouterAccess) : void 0,
44521
+ sandboxToken: isSet5(object.sandboxToken) ? globalThis.String(object.sandboxToken) : ""
44464
44522
  };
44465
44523
  },
44466
44524
  toJSON(message) {
@@ -44480,6 +44538,9 @@ var SandboxCreateV2Response = {
44480
44538
  if (message.commandRouterAccess !== void 0) {
44481
44539
  obj.commandRouterAccess = CommandRouterAccess.toJSON(message.commandRouterAccess);
44482
44540
  }
44541
+ if (message.sandboxToken !== "") {
44542
+ obj.sandboxToken = message.sandboxToken;
44543
+ }
44483
44544
  return obj;
44484
44545
  },
44485
44546
  create(base) {
@@ -44492,6 +44553,7 @@ var SandboxCreateV2Response = {
44492
44553
  message.taskId = object.taskId ?? "";
44493
44554
  message.metadata = object.metadata !== void 0 && object.metadata !== null ? SandboxHandleMetadata.fromPartial(object.metadata) : void 0;
44494
44555
  message.commandRouterAccess = object.commandRouterAccess !== void 0 && object.commandRouterAccess !== null ? CommandRouterAccess.fromPartial(object.commandRouterAccess) : void 0;
44556
+ message.sandboxToken = object.sandboxToken ?? "";
44495
44557
  return message;
44496
44558
  }
44497
44559
  };
@@ -49616,7 +49678,8 @@ function createBaseServerGetTimeRangeStatsResponse() {
49616
49678
  inference: void 0,
49617
49679
  containerStartedCount: 0,
49618
49680
  containerErrorCount: 0,
49619
- containerCreatingAtEndCount: 0
49681
+ containerCreatingAtEndCount: 0,
49682
+ containerTotalCount: 0
49620
49683
  };
49621
49684
  }
49622
49685
  var ServerGetTimeRangeStatsResponse = {
@@ -49660,6 +49723,9 @@ var ServerGetTimeRangeStatsResponse = {
49660
49723
  if (message.containerCreatingAtEndCount !== 0) {
49661
49724
  writer.uint32(88).uint64(message.containerCreatingAtEndCount);
49662
49725
  }
49726
+ if (message.containerTotalCount !== 0) {
49727
+ writer.uint32(96).uint64(message.containerTotalCount);
49728
+ }
49663
49729
  return writer;
49664
49730
  },
49665
49731
  decode(input, length) {
@@ -49754,6 +49820,13 @@ var ServerGetTimeRangeStatsResponse = {
49754
49820
  message.containerCreatingAtEndCount = longToNumber2(reader.uint64());
49755
49821
  continue;
49756
49822
  }
49823
+ case 12: {
49824
+ if (tag !== 96) {
49825
+ break;
49826
+ }
49827
+ message.containerTotalCount = longToNumber2(reader.uint64());
49828
+ continue;
49829
+ }
49757
49830
  }
49758
49831
  if ((tag & 7) === 4 || tag === 0) {
49759
49832
  break;
@@ -49788,7 +49861,8 @@ var ServerGetTimeRangeStatsResponse = {
49788
49861
  inference: isSet5(object.inference) ? ServerGetTimeRangeStatsResponse_ServerInferenceStats.fromJSON(object.inference) : void 0,
49789
49862
  containerStartedCount: isSet5(object.containerStartedCount) ? globalThis.Number(object.containerStartedCount) : 0,
49790
49863
  containerErrorCount: isSet5(object.containerErrorCount) ? globalThis.Number(object.containerErrorCount) : 0,
49791
- containerCreatingAtEndCount: isSet5(object.containerCreatingAtEndCount) ? globalThis.Number(object.containerCreatingAtEndCount) : 0
49864
+ containerCreatingAtEndCount: isSet5(object.containerCreatingAtEndCount) ? globalThis.Number(object.containerCreatingAtEndCount) : 0,
49865
+ containerTotalCount: isSet5(object.containerTotalCount) ? globalThis.Number(object.containerTotalCount) : 0
49792
49866
  };
49793
49867
  },
49794
49868
  toJSON(message) {
@@ -49840,6 +49914,9 @@ var ServerGetTimeRangeStatsResponse = {
49840
49914
  if (message.containerCreatingAtEndCount !== 0) {
49841
49915
  obj.containerCreatingAtEndCount = Math.round(message.containerCreatingAtEndCount);
49842
49916
  }
49917
+ if (message.containerTotalCount !== 0) {
49918
+ obj.containerTotalCount = Math.round(message.containerTotalCount);
49919
+ }
49843
49920
  return obj;
49844
49921
  },
49845
49922
  create(base) {
@@ -49870,6 +49947,7 @@ var ServerGetTimeRangeStatsResponse = {
49870
49947
  message.containerStartedCount = object.containerStartedCount ?? 0;
49871
49948
  message.containerErrorCount = object.containerErrorCount ?? 0;
49872
49949
  message.containerCreatingAtEndCount = object.containerCreatingAtEndCount ?? 0;
49950
+ message.containerTotalCount = object.containerTotalCount ?? 0;
49873
49951
  return message;
49874
49952
  }
49875
49953
  };
@@ -71691,6 +71769,16 @@ var SidecarService = class {
71691
71769
  );
71692
71770
  }
71693
71771
  }
71772
+ if (params?.proxy) {
71773
+ if (getSandboxVersion(this.#access.sandboxId) !== "V2" /* V2 */) {
71774
+ throw new InvalidError("proxy is not supported for GPU Sandboxes");
71775
+ }
71776
+ if (!viaControlPlane) {
71777
+ throw new InvalidError(
71778
+ `proxy is not supported when ${CONTROL_PLANE_SIDECAR_CREATE_ENV_VAR}=0 is set; unset it to use a proxy`
71779
+ );
71780
+ }
71781
+ }
71694
71782
  validateEnvVarKeys(params?.env ?? {});
71695
71783
  const [envDict, resolvableSecrets] = splitEnvDictAndResolvableSecrets(
71696
71784
  params?.secrets ?? []
@@ -71729,6 +71817,7 @@ var SidecarService = class {
71729
71817
  cloudBucketMounts,
71730
71818
  networkAccess,
71731
71819
  includeOidcIdentityToken: params?.includeOidcIdentityToken ?? false,
71820
+ proxyId: params?.proxy?.proxyId,
71732
71821
  ptyInfo,
71733
71822
  resources: params?.experimentalMemoryReserveConsumeMiB !== void 0 ? Resources.create({
71734
71823
  memoryMb: params.experimentalMemoryReserveConsumeMiB
@@ -74487,7 +74576,7 @@ var AuthTokenManager = class {
74487
74576
  };
74488
74577
 
74489
74578
  // src/version.ts
74490
- var SDK_VERSION = "0.11.1-dev.2";
74579
+ var SDK_VERSION = "0.11.1-dev.3";
74491
74580
  function getSDKVersion() {
74492
74581
  return SDK_VERSION;
74493
74582
  }
package/dist/index.d.cts CHANGED
@@ -847,6 +847,7 @@ interface AppListResponse_AppListItem {
847
847
  stoppedAt: number;
848
848
  nRunningTasks: number;
849
849
  name: string;
850
+ metadata: AppHandleMetadata | undefined;
850
851
  }
851
852
  declare const AppListResponse_AppListItem: MessageFns$1<AppListResponse_AppListItem>;
852
853
  interface AppLookupRequest {
@@ -2577,6 +2578,8 @@ interface FunctionGetTimeRangeStatsResponse {
2577
2578
  * Zero when roll-up is disabled or the base Function has no variants.
2578
2579
  */
2579
2580
  variantCount: number;
2581
+ /** Number of containers that were active (published heartbeats) in the time range. */
2582
+ containerTotalCount: number;
2580
2583
  }
2581
2584
  declare const FunctionGetTimeRangeStatsResponse: MessageFns$1<FunctionGetTimeRangeStatsResponse>;
2582
2585
  /**
@@ -3811,6 +3814,8 @@ interface SandboxCreateV2Response {
3811
3814
  taskId: string;
3812
3815
  metadata: SandboxHandleMetadata | undefined;
3813
3816
  commandRouterAccess: CommandRouterAccess$1 | undefined;
3817
+ /** Signed app and workspace id of the sandbox. Sent as the x-modal-sandbox-token metadata header. */
3818
+ sandboxToken: string;
3814
3819
  }
3815
3820
  declare const SandboxCreateV2Response: MessageFns$1<SandboxCreateV2Response>;
3816
3821
  /**
@@ -4244,6 +4249,8 @@ interface ServerGetTimeRangeStatsResponse {
4244
4249
  containerStartedCount: number;
4245
4250
  containerErrorCount: number;
4246
4251
  containerCreatingAtEndCount: number;
4252
+ /** Number of containers that were active (published heartbeats) in the time range. */
4253
+ containerTotalCount: number;
4247
4254
  }
4248
4255
  declare const ServerGetTimeRangeStatsResponse: MessageFns$1<ServerGetTimeRangeStatsResponse>;
4249
4256
  interface ServerGetTimeRangeStatsResponse_ServerInferenceStats {
@@ -9090,6 +9097,12 @@ type SidecarCreateParams = {
9090
9097
  * Sandboxes.
9091
9098
  */
9092
9099
  includeOidcIdentityToken?: boolean;
9100
+ /**
9101
+ * {@link Proxy} to route the sidecar's outbound traffic through, giving it
9102
+ * a static outbound IP of its own, independent of the main container. Not
9103
+ * supported for GPU Sandboxes.
9104
+ */
9105
+ proxy?: Proxy;
9093
9106
  /** Enable a PTY for the sidecar. */
9094
9107
  pty?: boolean;
9095
9108
  /**
package/dist/index.d.ts CHANGED
@@ -847,6 +847,7 @@ interface AppListResponse_AppListItem {
847
847
  stoppedAt: number;
848
848
  nRunningTasks: number;
849
849
  name: string;
850
+ metadata: AppHandleMetadata | undefined;
850
851
  }
851
852
  declare const AppListResponse_AppListItem: MessageFns$1<AppListResponse_AppListItem>;
852
853
  interface AppLookupRequest {
@@ -2577,6 +2578,8 @@ interface FunctionGetTimeRangeStatsResponse {
2577
2578
  * Zero when roll-up is disabled or the base Function has no variants.
2578
2579
  */
2579
2580
  variantCount: number;
2581
+ /** Number of containers that were active (published heartbeats) in the time range. */
2582
+ containerTotalCount: number;
2580
2583
  }
2581
2584
  declare const FunctionGetTimeRangeStatsResponse: MessageFns$1<FunctionGetTimeRangeStatsResponse>;
2582
2585
  /**
@@ -3811,6 +3814,8 @@ interface SandboxCreateV2Response {
3811
3814
  taskId: string;
3812
3815
  metadata: SandboxHandleMetadata | undefined;
3813
3816
  commandRouterAccess: CommandRouterAccess$1 | undefined;
3817
+ /** Signed app and workspace id of the sandbox. Sent as the x-modal-sandbox-token metadata header. */
3818
+ sandboxToken: string;
3814
3819
  }
3815
3820
  declare const SandboxCreateV2Response: MessageFns$1<SandboxCreateV2Response>;
3816
3821
  /**
@@ -4244,6 +4249,8 @@ interface ServerGetTimeRangeStatsResponse {
4244
4249
  containerStartedCount: number;
4245
4250
  containerErrorCount: number;
4246
4251
  containerCreatingAtEndCount: number;
4252
+ /** Number of containers that were active (published heartbeats) in the time range. */
4253
+ containerTotalCount: number;
4247
4254
  }
4248
4255
  declare const ServerGetTimeRangeStatsResponse: MessageFns$1<ServerGetTimeRangeStatsResponse>;
4249
4256
  interface ServerGetTimeRangeStatsResponse_ServerInferenceStats {
@@ -9090,6 +9097,12 @@ type SidecarCreateParams = {
9090
9097
  * Sandboxes.
9091
9098
  */
9092
9099
  includeOidcIdentityToken?: boolean;
9100
+ /**
9101
+ * {@link Proxy} to route the sidecar's outbound traffic through, giving it
9102
+ * a static outbound IP of its own, independent of the main container. Not
9103
+ * supported for GPU Sandboxes.
9104
+ */
9105
+ proxy?: Proxy;
9093
9106
  /** Enable a PTY for the sidecar. */
9094
9107
  pty?: boolean;
9095
9108
  /**
package/dist/index.js CHANGED
@@ -7564,7 +7564,16 @@ var AppListResponse = {
7564
7564
  }
7565
7565
  };
7566
7566
  function createBaseAppListResponse_AppListItem() {
7567
- return { appId: "", description: "", state: 0, createdAt: 0, stoppedAt: 0, nRunningTasks: 0, name: "" };
7567
+ return {
7568
+ appId: "",
7569
+ description: "",
7570
+ state: 0,
7571
+ createdAt: 0,
7572
+ stoppedAt: 0,
7573
+ nRunningTasks: 0,
7574
+ name: "",
7575
+ metadata: void 0
7576
+ };
7568
7577
  }
7569
7578
  var AppListResponse_AppListItem = {
7570
7579
  encode(message, writer = new BinaryWriter()) {
@@ -7589,6 +7598,9 @@ var AppListResponse_AppListItem = {
7589
7598
  if (message.name !== "") {
7590
7599
  writer.uint32(82).string(message.name);
7591
7600
  }
7601
+ if (message.metadata !== void 0) {
7602
+ AppHandleMetadata.encode(message.metadata, writer.uint32(90).fork()).join();
7603
+ }
7592
7604
  return writer;
7593
7605
  },
7594
7606
  decode(input, length) {
@@ -7647,6 +7659,13 @@ var AppListResponse_AppListItem = {
7647
7659
  message.name = reader.string();
7648
7660
  continue;
7649
7661
  }
7662
+ case 11: {
7663
+ if (tag !== 90) {
7664
+ break;
7665
+ }
7666
+ message.metadata = AppHandleMetadata.decode(reader, reader.uint32());
7667
+ continue;
7668
+ }
7650
7669
  }
7651
7670
  if ((tag & 7) === 4 || tag === 0) {
7652
7671
  break;
@@ -7663,7 +7682,8 @@ var AppListResponse_AppListItem = {
7663
7682
  createdAt: isSet5(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
7664
7683
  stoppedAt: isSet5(object.stoppedAt) ? globalThis.Number(object.stoppedAt) : 0,
7665
7684
  nRunningTasks: isSet5(object.nRunningTasks) ? globalThis.Number(object.nRunningTasks) : 0,
7666
- name: isSet5(object.name) ? globalThis.String(object.name) : ""
7685
+ name: isSet5(object.name) ? globalThis.String(object.name) : "",
7686
+ metadata: isSet5(object.metadata) ? AppHandleMetadata.fromJSON(object.metadata) : void 0
7667
7687
  };
7668
7688
  },
7669
7689
  toJSON(message) {
@@ -7689,6 +7709,9 @@ var AppListResponse_AppListItem = {
7689
7709
  if (message.name !== "") {
7690
7710
  obj.name = message.name;
7691
7711
  }
7712
+ if (message.metadata !== void 0) {
7713
+ obj.metadata = AppHandleMetadata.toJSON(message.metadata);
7714
+ }
7692
7715
  return obj;
7693
7716
  },
7694
7717
  create(base) {
@@ -7703,6 +7726,7 @@ var AppListResponse_AppListItem = {
7703
7726
  message.stoppedAt = object.stoppedAt ?? 0;
7704
7727
  message.nRunningTasks = object.nRunningTasks ?? 0;
7705
7728
  message.name = object.name ?? "";
7729
+ message.metadata = object.metadata !== void 0 && object.metadata !== null ? AppHandleMetadata.fromPartial(object.metadata) : void 0;
7706
7730
  return message;
7707
7731
  }
7708
7732
  };
@@ -29261,7 +29285,8 @@ function createBaseFunctionGetTimeRangeStatsResponse() {
29261
29285
  containerErrorCount: 0,
29262
29286
  containerCreatingAtEndCount: 0,
29263
29287
  containerPercentileStats: {},
29264
- variantCount: 0
29288
+ variantCount: 0,
29289
+ containerTotalCount: 0
29265
29290
  };
29266
29291
  }
29267
29292
  var FunctionGetTimeRangeStatsResponse = {
@@ -29308,6 +29333,9 @@ var FunctionGetTimeRangeStatsResponse = {
29308
29333
  if (message.variantCount !== 0) {
29309
29334
  writer.uint32(96).uint32(message.variantCount);
29310
29335
  }
29336
+ if (message.containerTotalCount !== 0) {
29337
+ writer.uint32(104).uint64(message.containerTotalCount);
29338
+ }
29311
29339
  return writer;
29312
29340
  },
29313
29341
  decode(input, length) {
@@ -29410,6 +29438,13 @@ var FunctionGetTimeRangeStatsResponse = {
29410
29438
  message.variantCount = reader.uint32();
29411
29439
  continue;
29412
29440
  }
29441
+ case 13: {
29442
+ if (tag !== 104) {
29443
+ break;
29444
+ }
29445
+ message.containerTotalCount = longToNumber2(reader.uint64());
29446
+ continue;
29447
+ }
29413
29448
  }
29414
29449
  if ((tag & 7) === 4 || tag === 0) {
29415
29450
  break;
@@ -29443,7 +29478,8 @@ var FunctionGetTimeRangeStatsResponse = {
29443
29478
  },
29444
29479
  {}
29445
29480
  ) : {},
29446
- variantCount: isSet5(object.variantCount) ? globalThis.Number(object.variantCount) : 0
29481
+ variantCount: isSet5(object.variantCount) ? globalThis.Number(object.variantCount) : 0,
29482
+ containerTotalCount: isSet5(object.containerTotalCount) ? globalThis.Number(object.containerTotalCount) : 0
29447
29483
  };
29448
29484
  },
29449
29485
  toJSON(message) {
@@ -29496,6 +29532,9 @@ var FunctionGetTimeRangeStatsResponse = {
29496
29532
  if (message.variantCount !== 0) {
29497
29533
  obj.variantCount = Math.round(message.variantCount);
29498
29534
  }
29535
+ if (message.containerTotalCount !== 0) {
29536
+ obj.containerTotalCount = Math.round(message.containerTotalCount);
29537
+ }
29499
29538
  return obj;
29500
29539
  },
29501
29540
  create(base) {
@@ -29525,6 +29564,7 @@ var FunctionGetTimeRangeStatsResponse = {
29525
29564
  return acc;
29526
29565
  }, {});
29527
29566
  message.variantCount = object.variantCount ?? 0;
29567
+ message.containerTotalCount = object.containerTotalCount ?? 0;
29528
29568
  return message;
29529
29569
  }
29530
29570
  };
@@ -44288,7 +44328,14 @@ var SandboxCreateV2Request_CloudBucketMountCredentialsEntry = {
44288
44328
  }
44289
44329
  };
44290
44330
  function createBaseSandboxCreateV2Response() {
44291
- return { sandboxId: "", tunnels: [], taskId: "", metadata: void 0, commandRouterAccess: void 0 };
44331
+ return {
44332
+ sandboxId: "",
44333
+ tunnels: [],
44334
+ taskId: "",
44335
+ metadata: void 0,
44336
+ commandRouterAccess: void 0,
44337
+ sandboxToken: ""
44338
+ };
44292
44339
  }
44293
44340
  var SandboxCreateV2Response = {
44294
44341
  encode(message, writer = new BinaryWriter()) {
@@ -44307,6 +44354,9 @@ var SandboxCreateV2Response = {
44307
44354
  if (message.commandRouterAccess !== void 0) {
44308
44355
  CommandRouterAccess.encode(message.commandRouterAccess, writer.uint32(42).fork()).join();
44309
44356
  }
44357
+ if (message.sandboxToken !== "") {
44358
+ writer.uint32(50).string(message.sandboxToken);
44359
+ }
44310
44360
  return writer;
44311
44361
  },
44312
44362
  decode(input, length) {
@@ -44351,6 +44401,13 @@ var SandboxCreateV2Response = {
44351
44401
  message.commandRouterAccess = CommandRouterAccess.decode(reader, reader.uint32());
44352
44402
  continue;
44353
44403
  }
44404
+ case 6: {
44405
+ if (tag !== 50) {
44406
+ break;
44407
+ }
44408
+ message.sandboxToken = reader.string();
44409
+ continue;
44410
+ }
44354
44411
  }
44355
44412
  if ((tag & 7) === 4 || tag === 0) {
44356
44413
  break;
@@ -44365,7 +44422,8 @@ var SandboxCreateV2Response = {
44365
44422
  tunnels: globalThis.Array.isArray(object?.tunnels) ? object.tunnels.map((e) => TunnelData.fromJSON(e)) : [],
44366
44423
  taskId: isSet5(object.taskId) ? globalThis.String(object.taskId) : "",
44367
44424
  metadata: isSet5(object.metadata) ? SandboxHandleMetadata.fromJSON(object.metadata) : void 0,
44368
- commandRouterAccess: isSet5(object.commandRouterAccess) ? CommandRouterAccess.fromJSON(object.commandRouterAccess) : void 0
44425
+ commandRouterAccess: isSet5(object.commandRouterAccess) ? CommandRouterAccess.fromJSON(object.commandRouterAccess) : void 0,
44426
+ sandboxToken: isSet5(object.sandboxToken) ? globalThis.String(object.sandboxToken) : ""
44369
44427
  };
44370
44428
  },
44371
44429
  toJSON(message) {
@@ -44385,6 +44443,9 @@ var SandboxCreateV2Response = {
44385
44443
  if (message.commandRouterAccess !== void 0) {
44386
44444
  obj.commandRouterAccess = CommandRouterAccess.toJSON(message.commandRouterAccess);
44387
44445
  }
44446
+ if (message.sandboxToken !== "") {
44447
+ obj.sandboxToken = message.sandboxToken;
44448
+ }
44388
44449
  return obj;
44389
44450
  },
44390
44451
  create(base) {
@@ -44397,6 +44458,7 @@ var SandboxCreateV2Response = {
44397
44458
  message.taskId = object.taskId ?? "";
44398
44459
  message.metadata = object.metadata !== void 0 && object.metadata !== null ? SandboxHandleMetadata.fromPartial(object.metadata) : void 0;
44399
44460
  message.commandRouterAccess = object.commandRouterAccess !== void 0 && object.commandRouterAccess !== null ? CommandRouterAccess.fromPartial(object.commandRouterAccess) : void 0;
44461
+ message.sandboxToken = object.sandboxToken ?? "";
44400
44462
  return message;
44401
44463
  }
44402
44464
  };
@@ -49521,7 +49583,8 @@ function createBaseServerGetTimeRangeStatsResponse() {
49521
49583
  inference: void 0,
49522
49584
  containerStartedCount: 0,
49523
49585
  containerErrorCount: 0,
49524
- containerCreatingAtEndCount: 0
49586
+ containerCreatingAtEndCount: 0,
49587
+ containerTotalCount: 0
49525
49588
  };
49526
49589
  }
49527
49590
  var ServerGetTimeRangeStatsResponse = {
@@ -49565,6 +49628,9 @@ var ServerGetTimeRangeStatsResponse = {
49565
49628
  if (message.containerCreatingAtEndCount !== 0) {
49566
49629
  writer.uint32(88).uint64(message.containerCreatingAtEndCount);
49567
49630
  }
49631
+ if (message.containerTotalCount !== 0) {
49632
+ writer.uint32(96).uint64(message.containerTotalCount);
49633
+ }
49568
49634
  return writer;
49569
49635
  },
49570
49636
  decode(input, length) {
@@ -49659,6 +49725,13 @@ var ServerGetTimeRangeStatsResponse = {
49659
49725
  message.containerCreatingAtEndCount = longToNumber2(reader.uint64());
49660
49726
  continue;
49661
49727
  }
49728
+ case 12: {
49729
+ if (tag !== 96) {
49730
+ break;
49731
+ }
49732
+ message.containerTotalCount = longToNumber2(reader.uint64());
49733
+ continue;
49734
+ }
49662
49735
  }
49663
49736
  if ((tag & 7) === 4 || tag === 0) {
49664
49737
  break;
@@ -49693,7 +49766,8 @@ var ServerGetTimeRangeStatsResponse = {
49693
49766
  inference: isSet5(object.inference) ? ServerGetTimeRangeStatsResponse_ServerInferenceStats.fromJSON(object.inference) : void 0,
49694
49767
  containerStartedCount: isSet5(object.containerStartedCount) ? globalThis.Number(object.containerStartedCount) : 0,
49695
49768
  containerErrorCount: isSet5(object.containerErrorCount) ? globalThis.Number(object.containerErrorCount) : 0,
49696
- containerCreatingAtEndCount: isSet5(object.containerCreatingAtEndCount) ? globalThis.Number(object.containerCreatingAtEndCount) : 0
49769
+ containerCreatingAtEndCount: isSet5(object.containerCreatingAtEndCount) ? globalThis.Number(object.containerCreatingAtEndCount) : 0,
49770
+ containerTotalCount: isSet5(object.containerTotalCount) ? globalThis.Number(object.containerTotalCount) : 0
49697
49771
  };
49698
49772
  },
49699
49773
  toJSON(message) {
@@ -49745,6 +49819,9 @@ var ServerGetTimeRangeStatsResponse = {
49745
49819
  if (message.containerCreatingAtEndCount !== 0) {
49746
49820
  obj.containerCreatingAtEndCount = Math.round(message.containerCreatingAtEndCount);
49747
49821
  }
49822
+ if (message.containerTotalCount !== 0) {
49823
+ obj.containerTotalCount = Math.round(message.containerTotalCount);
49824
+ }
49748
49825
  return obj;
49749
49826
  },
49750
49827
  create(base) {
@@ -49775,6 +49852,7 @@ var ServerGetTimeRangeStatsResponse = {
49775
49852
  message.containerStartedCount = object.containerStartedCount ?? 0;
49776
49853
  message.containerErrorCount = object.containerErrorCount ?? 0;
49777
49854
  message.containerCreatingAtEndCount = object.containerCreatingAtEndCount ?? 0;
49855
+ message.containerTotalCount = object.containerTotalCount ?? 0;
49778
49856
  return message;
49779
49857
  }
49780
49858
  };
@@ -71609,6 +71687,16 @@ var SidecarService = class {
71609
71687
  );
71610
71688
  }
71611
71689
  }
71690
+ if (params?.proxy) {
71691
+ if (getSandboxVersion(this.#access.sandboxId) !== "V2" /* V2 */) {
71692
+ throw new InvalidError("proxy is not supported for GPU Sandboxes");
71693
+ }
71694
+ if (!viaControlPlane) {
71695
+ throw new InvalidError(
71696
+ `proxy is not supported when ${CONTROL_PLANE_SIDECAR_CREATE_ENV_VAR}=0 is set; unset it to use a proxy`
71697
+ );
71698
+ }
71699
+ }
71612
71700
  validateEnvVarKeys(params?.env ?? {});
71613
71701
  const [envDict, resolvableSecrets] = splitEnvDictAndResolvableSecrets(
71614
71702
  params?.secrets ?? []
@@ -71647,6 +71735,7 @@ var SidecarService = class {
71647
71735
  cloudBucketMounts,
71648
71736
  networkAccess,
71649
71737
  includeOidcIdentityToken: params?.includeOidcIdentityToken ?? false,
71738
+ proxyId: params?.proxy?.proxyId,
71650
71739
  ptyInfo,
71651
71740
  resources: params?.experimentalMemoryReserveConsumeMiB !== void 0 ? Resources.create({
71652
71741
  memoryMb: params.experimentalMemoryReserveConsumeMiB
@@ -74405,7 +74494,7 @@ var AuthTokenManager = class {
74405
74494
  };
74406
74495
 
74407
74496
  // src/version.ts
74408
- var SDK_VERSION = "0.11.1-dev.2";
74497
+ var SDK_VERSION = "0.11.1-dev.3";
74409
74498
  function getSDKVersion() {
74410
74499
  return SDK_VERSION;
74411
74500
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modal",
3
- "version": "0.11.1-dev.2",
3
+ "version": "0.11.1-dev.3",
4
4
  "description": "Modal SDK for JavaScript/TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://modal.com/docs/guide/sdk-javascript-go",