modal 0.11.1-dev.7 → 0.11.1-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -207,16 +207,22 @@ declare enum EnvironmentRole {
207
207
  ENVIRONMENT_ROLE_VIEWER = 1,
208
208
  ENVIRONMENT_ROLE_CONTRIBUTOR = 2,
209
209
  ENVIRONMENT_ROLE_NO_ACCESS = 3,
210
+ ENVIRONMENT_ROLE_MODAL_ADMINISTERED_OBSERVER = 4,
210
211
  UNRECOGNIZED = -1
211
212
  }
212
213
  /**
213
214
  * Creation-time environment classification. Captures whether an environment
214
- * is public. is_managed and machine_generated may be folded in as future
215
- * values.
215
+ * is public or administered by Modal. is_managed and machine_generated may be
216
+ * folded in as future values.
216
217
  */
217
218
  declare enum EnvironmentType {
218
219
  ENVIRONMENT_TYPE_UNSPECIFIED = 0,
219
220
  ENVIRONMENT_TYPE_PUBLIC = 1,
221
+ /**
222
+ * ENVIRONMENT_TYPE_MODAL_ADMINISTERED - Restricted environment whose roles are administered by Modal admins rather
223
+ * than the workspace's own managers.
224
+ */
225
+ ENVIRONMENT_TYPE_MODAL_ADMINISTERED = 2,
220
226
  UNRECOGNIZED = -1
221
227
  }
222
228
  declare enum ExecOutputOption {
@@ -1207,6 +1213,41 @@ interface ClusterListResponse {
1207
1213
  clusters: ClusterStats[];
1208
1214
  }
1209
1215
  declare const ClusterListResponse: MessageFns$1<ClusterListResponse>;
1216
+ interface ClusterReservation {
1217
+ /** reservation name, as configured by Modal */
1218
+ name: string;
1219
+ /** e.g. "B300" */
1220
+ gpuType: string;
1221
+ region: string;
1222
+ /** workers Modal has committed to keep reserved */
1223
+ minReservedWorkers: number;
1224
+ /** healthy reserved workers currently present (active + idle) */
1225
+ reservedWorkers: number;
1226
+ /** reserved workers running this workspace's containers */
1227
+ activeWorkers: number;
1228
+ /** reserved workers available for new clusters */
1229
+ idleWorkers: number;
1230
+ /** max(0, min_reserved_workers - reserved_workers) */
1231
+ unfulfilledWorkers: number;
1232
+ /** containers on reserved workers, ordered by cluster then rank */
1233
+ tasks: ClusterReservation_Task[];
1234
+ }
1235
+ declare const ClusterReservation: MessageFns$1<ClusterReservation>;
1236
+ /** A container running on a worker reserved for this reservation. */
1237
+ interface ClusterReservation_Task {
1238
+ taskId: string;
1239
+ clusterRank: number;
1240
+ appId: string;
1241
+ functionId: string;
1242
+ }
1243
+ declare const ClusterReservation_Task: MessageFns$1<ClusterReservation_Task>;
1244
+ interface ClusterReservationListRequest {
1245
+ }
1246
+ declare const ClusterReservationListRequest: MessageFns$1<ClusterReservationListRequest>;
1247
+ interface ClusterReservationListResponse {
1248
+ reservations: ClusterReservation[];
1249
+ }
1250
+ declare const ClusterReservationListResponse: MessageFns$1<ClusterReservationListResponse>;
1210
1251
  interface ClusterStats {
1211
1252
  appId: string;
1212
1253
  taskIds: string[];
@@ -1632,6 +1673,8 @@ interface EndpointCreateRequest {
1632
1673
  unauthenticated: boolean;
1633
1674
  servingMode: EndpointServingMode;
1634
1675
  sharedEndpointNoticeAcknowledged: boolean;
1676
+ /** Requires Modal admin access. Dedicated endpoints only; must match model. */
1677
+ recipeId?: string | undefined;
1635
1678
  }
1636
1679
  declare const EndpointCreateRequest: MessageFns$1<EndpointCreateRequest>;
1637
1680
  interface EndpointCreateResponse {
@@ -5447,6 +5490,14 @@ declare const ModalClientDefinition: {
5447
5490
  readonly responseStream: false;
5448
5491
  readonly options: {};
5449
5492
  };
5493
+ readonly clusterReservationList: {
5494
+ readonly name: "ClusterReservationList";
5495
+ readonly requestType: MessageFns$1<ClusterReservationListRequest>;
5496
+ readonly requestStream: false;
5497
+ readonly responseType: MessageFns$1<ClusterReservationListResponse>;
5498
+ readonly responseStream: false;
5499
+ readonly options: {};
5500
+ };
5450
5501
  /** Container */
5451
5502
  readonly containerCheckpoint: {
5452
5503
  readonly name: "ContainerCheckpoint";
@@ -7308,7 +7359,7 @@ declare class Secret {
7308
7359
  #private;
7309
7360
  readonly name?: string;
7310
7361
  /** @ignore */
7311
- constructor(secretId: string, name?: string, hydrator?: SecretHydrator, keys?: readonly string[]);
7362
+ constructor(secretId: string, name?: string, hydrator?: SecretHydrator);
7312
7363
  /** The ID of the server-side Secret, or an empty string if not yet hydrated. */
7313
7364
  get secretId(): string;
7314
7365
  /**
@@ -7319,14 +7370,6 @@ declare class Secret {
7319
7370
  * @hidden
7320
7371
  */
7321
7372
  get _hydrator(): SecretHydrator | undefined;
7322
- /**
7323
- * Names of the env vars this server-side Secret defines, or `undefined` if
7324
- * unknown (e.g. for lazy fromObject Secrets or Secrets constructed by id).
7325
- *
7326
- * @internal
7327
- * @hidden
7328
- */
7329
- get _keys(): ReadonlySet<string> | undefined;
7330
7373
  /**
7331
7374
  * Lazily create the ephemeral server-side Secret backing a fromObject Secret
7332
7375
  * and populate {@link Secret#secretId secretId}. A no-op once secretId is set
package/dist/index.d.ts CHANGED
@@ -207,16 +207,22 @@ declare enum EnvironmentRole {
207
207
  ENVIRONMENT_ROLE_VIEWER = 1,
208
208
  ENVIRONMENT_ROLE_CONTRIBUTOR = 2,
209
209
  ENVIRONMENT_ROLE_NO_ACCESS = 3,
210
+ ENVIRONMENT_ROLE_MODAL_ADMINISTERED_OBSERVER = 4,
210
211
  UNRECOGNIZED = -1
211
212
  }
212
213
  /**
213
214
  * Creation-time environment classification. Captures whether an environment
214
- * is public. is_managed and machine_generated may be folded in as future
215
- * values.
215
+ * is public or administered by Modal. is_managed and machine_generated may be
216
+ * folded in as future values.
216
217
  */
217
218
  declare enum EnvironmentType {
218
219
  ENVIRONMENT_TYPE_UNSPECIFIED = 0,
219
220
  ENVIRONMENT_TYPE_PUBLIC = 1,
221
+ /**
222
+ * ENVIRONMENT_TYPE_MODAL_ADMINISTERED - Restricted environment whose roles are administered by Modal admins rather
223
+ * than the workspace's own managers.
224
+ */
225
+ ENVIRONMENT_TYPE_MODAL_ADMINISTERED = 2,
220
226
  UNRECOGNIZED = -1
221
227
  }
222
228
  declare enum ExecOutputOption {
@@ -1207,6 +1213,41 @@ interface ClusterListResponse {
1207
1213
  clusters: ClusterStats[];
1208
1214
  }
1209
1215
  declare const ClusterListResponse: MessageFns$1<ClusterListResponse>;
1216
+ interface ClusterReservation {
1217
+ /** reservation name, as configured by Modal */
1218
+ name: string;
1219
+ /** e.g. "B300" */
1220
+ gpuType: string;
1221
+ region: string;
1222
+ /** workers Modal has committed to keep reserved */
1223
+ minReservedWorkers: number;
1224
+ /** healthy reserved workers currently present (active + idle) */
1225
+ reservedWorkers: number;
1226
+ /** reserved workers running this workspace's containers */
1227
+ activeWorkers: number;
1228
+ /** reserved workers available for new clusters */
1229
+ idleWorkers: number;
1230
+ /** max(0, min_reserved_workers - reserved_workers) */
1231
+ unfulfilledWorkers: number;
1232
+ /** containers on reserved workers, ordered by cluster then rank */
1233
+ tasks: ClusterReservation_Task[];
1234
+ }
1235
+ declare const ClusterReservation: MessageFns$1<ClusterReservation>;
1236
+ /** A container running on a worker reserved for this reservation. */
1237
+ interface ClusterReservation_Task {
1238
+ taskId: string;
1239
+ clusterRank: number;
1240
+ appId: string;
1241
+ functionId: string;
1242
+ }
1243
+ declare const ClusterReservation_Task: MessageFns$1<ClusterReservation_Task>;
1244
+ interface ClusterReservationListRequest {
1245
+ }
1246
+ declare const ClusterReservationListRequest: MessageFns$1<ClusterReservationListRequest>;
1247
+ interface ClusterReservationListResponse {
1248
+ reservations: ClusterReservation[];
1249
+ }
1250
+ declare const ClusterReservationListResponse: MessageFns$1<ClusterReservationListResponse>;
1210
1251
  interface ClusterStats {
1211
1252
  appId: string;
1212
1253
  taskIds: string[];
@@ -1632,6 +1673,8 @@ interface EndpointCreateRequest {
1632
1673
  unauthenticated: boolean;
1633
1674
  servingMode: EndpointServingMode;
1634
1675
  sharedEndpointNoticeAcknowledged: boolean;
1676
+ /** Requires Modal admin access. Dedicated endpoints only; must match model. */
1677
+ recipeId?: string | undefined;
1635
1678
  }
1636
1679
  declare const EndpointCreateRequest: MessageFns$1<EndpointCreateRequest>;
1637
1680
  interface EndpointCreateResponse {
@@ -5447,6 +5490,14 @@ declare const ModalClientDefinition: {
5447
5490
  readonly responseStream: false;
5448
5491
  readonly options: {};
5449
5492
  };
5493
+ readonly clusterReservationList: {
5494
+ readonly name: "ClusterReservationList";
5495
+ readonly requestType: MessageFns$1<ClusterReservationListRequest>;
5496
+ readonly requestStream: false;
5497
+ readonly responseType: MessageFns$1<ClusterReservationListResponse>;
5498
+ readonly responseStream: false;
5499
+ readonly options: {};
5500
+ };
5450
5501
  /** Container */
5451
5502
  readonly containerCheckpoint: {
5452
5503
  readonly name: "ContainerCheckpoint";
@@ -7308,7 +7359,7 @@ declare class Secret {
7308
7359
  #private;
7309
7360
  readonly name?: string;
7310
7361
  /** @ignore */
7311
- constructor(secretId: string, name?: string, hydrator?: SecretHydrator, keys?: readonly string[]);
7362
+ constructor(secretId: string, name?: string, hydrator?: SecretHydrator);
7312
7363
  /** The ID of the server-side Secret, or an empty string if not yet hydrated. */
7313
7364
  get secretId(): string;
7314
7365
  /**
@@ -7319,14 +7370,6 @@ declare class Secret {
7319
7370
  * @hidden
7320
7371
  */
7321
7372
  get _hydrator(): SecretHydrator | undefined;
7322
- /**
7323
- * Names of the env vars this server-side Secret defines, or `undefined` if
7324
- * unknown (e.g. for lazy fromObject Secrets or Secrets constructed by id).
7325
- *
7326
- * @internal
7327
- * @hidden
7328
- */
7329
- get _keys(): ReadonlySet<string> | undefined;
7330
7373
  /**
7331
7374
  * Lazily create the ephemeral server-side Secret backing a fromObject Secret
7332
7375
  * and populate {@link Secret#secretId secretId}. A no-op once secretId is set