@blaxel/core 0.3.12-preview.266 → 0.3.12

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.
@@ -30,8 +30,8 @@ function missingCredentialsMessage() {
30
30
  return "No Blaxel credentials found. Set the BL_API_KEY and BL_WORKSPACE environment variables, or run `bl login`.";
31
31
  }
32
32
  // Build info - these placeholders are replaced at build time by build:replace-imports
33
- const BUILD_VERSION = "0.3.12-preview.266";
34
- const BUILD_COMMIT = "3049e74b685f1456a0819bf69f4e50c964f2dfff";
33
+ const BUILD_VERSION = "0.3.12";
34
+ const BUILD_COMMIT = "4b5045ad4c5d7510d577039bb63f662efbfbf689";
35
35
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
36
36
  const BLAXEL_API_VERSION = "2026-04-28";
37
37
  // Bun < 1.3.11 never sends connection-level WINDOW_UPDATE: the pooled h2
@@ -28,6 +28,7 @@ class DriveInstance {
28
28
  get displayName() {
29
29
  return this.drive.metadata.displayName;
30
30
  }
31
+ /** @deprecated Only legacy drives created with a size still report one. */
31
32
  get size() {
32
33
  return this.drive.spec.size;
33
34
  }
@@ -53,7 +54,6 @@ class DriveInstance {
53
54
  labels: config.labels
54
55
  },
55
56
  spec: {
56
- size: config.size,
57
57
  region: config.region || settings_js_1.settings.region,
58
58
  permissions: config.permissions,
59
59
  }
@@ -155,8 +155,6 @@ class DriveInstance {
155
155
  metadataUpdates.labels = updates.metadata.labels;
156
156
  }
157
157
  if (updates.spec) {
158
- if (updates.spec.size !== undefined)
159
- specUpdates.size = updates.spec.size;
160
158
  if (updates.spec.region !== undefined)
161
159
  specUpdates.region = updates.spec.region;
162
160
  if (updates.spec.permissions !== undefined)
@@ -169,8 +167,6 @@ class DriveInstance {
169
167
  metadataUpdates.displayName = updates.displayName;
170
168
  if (updates.labels !== undefined)
171
169
  metadataUpdates.labels = updates.labels;
172
- if (updates.size !== undefined)
173
- specUpdates.size = updates.size;
174
170
  if (updates.region !== undefined)
175
171
  specUpdates.region = updates.region;
176
172
  if (updates.permissions !== undefined)
@@ -122,6 +122,15 @@ class SandboxInstance {
122
122
  get lastUsedAt() {
123
123
  return this.sandbox.lastUsedAt;
124
124
  }
125
+ /**
126
+ * Infrastructure failures the compute plane recorded for this sandbox, oldest
127
+ * first. Entries with `fatal: true` are the ones that moved it to FAILED; the
128
+ * others (e.g. a microVM that exited and restarted) are informational. Only
129
+ * returned when a single sandbox is read, never in listings.
130
+ */
131
+ get errors() {
132
+ return this.sandbox.errors ?? [];
133
+ }
125
134
  get h2Domain() {
126
135
  return this.sandbox.h2Domain ?? null;
127
136
  }
@@ -120,7 +120,7 @@ export type ApiKey = TimeFields & OwnerFields & {
120
120
  */
121
121
  readonly apiKey?: string;
122
122
  /**
123
- * Duration until expiration. Supports formats like '30d' (30 days), '24h' (24 hours), '1w' (1 week). If not set, the API key never expires.
123
+ * Duration until expiration. Supports formats like '30d' (30 days), '24h' (24 hours), '1w' (1 week). Must be positive and at most 10 years. If not set, the API key never expires.
124
124
  */
125
125
  expires_in?: string;
126
126
  /**
@@ -145,7 +145,7 @@ export type ApiKey = TimeFields & OwnerFields & {
145
145
  */
146
146
  export type ApiKeyWritable = TimeFields & OwnerFields & {
147
147
  /**
148
- * Duration until expiration. Supports formats like '30d' (30 days), '24h' (24 hours), '1w' (1 week). If not set, the API key never expires.
148
+ * Duration until expiration. Supports formats like '30d' (30 days), '24h' (24 hours), '1w' (1 week). Must be positive and at most 10 years. If not set, the API key never expires.
149
149
  */
150
150
  expires_in?: string;
151
151
  /**
@@ -720,7 +720,7 @@ export type Drive = {
720
720
  export type DriveWritable = {
721
721
  events?: CoreEventsWritable;
722
722
  metadata: MetadataWritable;
723
- spec: DriveSpecWritable;
723
+ spec: DriveSpec;
724
724
  state?: DriveStateWritable;
725
725
  };
726
726
  /**
@@ -766,27 +766,6 @@ export type DrivePermission = {
766
766
  * Immutable drive configuration set at creation time
767
767
  */
768
768
  export type DriveSpec = {
769
- /**
770
- * The internal infrastructure resource identifier for this drive (bucket name)
771
- */
772
- readonly infrastructureId?: string;
773
- /**
774
- * Permissions controlling which workloads can access this drive. Empty means all workloads in the workspace can access the drive. Maximum 3 permissions.
775
- */
776
- permissions?: Array<DrivePermission>;
777
- /**
778
- * Deployment region for the drive (e.g., us-pdx-1, eu-lon-1). Must match the region of resources it attaches to.
779
- */
780
- region?: string;
781
- /**
782
- * Optional size limit for the drive in GB. If not specified, drive has no size limit.
783
- */
784
- size?: number;
785
- };
786
- /**
787
- * Immutable drive configuration set at creation time
788
- */
789
- export type DriveSpecWritable = {
790
769
  /**
791
770
  * Permissions controlling which workloads can access this drive. Empty means all workloads in the workspace can access the drive. Maximum 3 permissions.
792
771
  */
@@ -795,10 +774,6 @@ export type DriveSpecWritable = {
795
774
  * Deployment region for the drive (e.g., us-pdx-1, eu-lon-1). Must match the region of resources it attaches to.
796
775
  */
797
776
  region?: string;
798
- /**
799
- * Optional size limit for the drive in GB. If not specified, drive has no size limit.
800
- */
801
- size?: number;
802
777
  };
803
778
  /**
804
779
  * Current runtime state of the drive
@@ -3515,6 +3490,10 @@ export type SsoDomainSpecWritable = {
3515
3490
  * Lightweight virtual machine for secure AI code execution. Sandboxes resume from standby in under 25ms and automatically scale to zero after inactivity, preserving memory state including running processes and filesystem.
3516
3491
  */
3517
3492
  export type Sandbox = {
3493
+ /**
3494
+ * Infrastructure failures recorded on the sandbox, oldest first (read-only, managed by the system)
3495
+ */
3496
+ readonly errors?: Array<SandboxInfrastructureError>;
3518
3497
  events?: CoreEvents;
3519
3498
  /**
3520
3499
  * Time in seconds until the sandbox is automatically deleted based on TTL and lifecycle policies. Only present for sandboxes with lifecycle configured.
@@ -3698,6 +3677,31 @@ export type SandboxForkResponse = {
3698
3677
  */
3699
3678
  type?: 'sandbox' | 'application';
3700
3679
  };
3680
+ /**
3681
+ * Infrastructure failure the compute plane reported for a sandbox
3682
+ */
3683
+ export type SandboxInfrastructureError = {
3684
+ /**
3685
+ * Stable code of the failure pattern
3686
+ */
3687
+ code?: string;
3688
+ /**
3689
+ * Whether the failure was terminal, putting the sandbox in FAILED, as opposed to being cleared by a restart
3690
+ */
3691
+ fatal?: boolean;
3692
+ /**
3693
+ * Instance the failure was reported for
3694
+ */
3695
+ instance?: string;
3696
+ /**
3697
+ * Reason reported with the failure
3698
+ */
3699
+ message?: string;
3700
+ /**
3701
+ * Time at which the failure was recorded
3702
+ */
3703
+ time?: string;
3704
+ };
3701
3705
  /**
3702
3706
  * Lifecycle configuration controlling automatic sandbox deletion based on idle time, max age, or specific dates
3703
3707
  */
@@ -3863,6 +3867,10 @@ export type SandboxScheduleExecution = {
3863
3867
  * Creation timestamp (read-only).
3864
3868
  */
3865
3869
  readonly createdAt?: string;
3870
+ /**
3871
+ * Reason the execution failed, naming the resource that could not be reached. Empty when the command was accepted by the sandbox.
3872
+ */
3873
+ error?: string;
3866
3874
  /**
3867
3875
  * RFC 3339 time at which the command was submitted.
3868
3876
  */
@@ -3892,6 +3900,10 @@ export type SandboxScheduleExecution = {
3892
3900
  * One recorded execution of a sandbox schedule. statusCode is the HTTP status from submitting the command to the sandbox (the scheduler does not wait for the command to finish). Stored in the dedicated scheduleexecutions table.
3893
3901
  */
3894
3902
  export type SandboxScheduleExecutionWritable = {
3903
+ /**
3904
+ * Reason the execution failed, naming the resource that could not be reached. Empty when the command was accepted by the sandbox.
3905
+ */
3906
+ error?: string;
3895
3907
  /**
3896
3908
  * RFC 3339 time at which the command was submitted.
3897
3909
  */
@@ -4294,7 +4306,7 @@ export type Volume = {
4294
4306
  export type VolumeWritable = {
4295
4307
  events?: CoreEventsWritable;
4296
4308
  metadata: MetadataWritable;
4297
- spec: VolumeSpecWritable;
4309
+ spec: VolumeSpec;
4298
4310
  state?: VolumeStateWritable;
4299
4311
  };
4300
4312
  /**
@@ -4347,27 +4359,6 @@ export type VolumeListWritable = {
4347
4359
  * Immutable volume configuration set at creation time (size and region cannot be changed after creation)
4348
4360
  */
4349
4361
  export type VolumeSpec = {
4350
- /**
4351
- * The internal infrastructure resource identifier for this volume
4352
- */
4353
- readonly infrastructureId?: string;
4354
- /**
4355
- * Deployment region for the volume (e.g., us-pdx-1, eu-lon-1). Must match the region of sandboxes it attaches to.
4356
- */
4357
- region?: string;
4358
- /**
4359
- * Storage capacity in megabytes. Can be increased after creation but not decreased.
4360
- */
4361
- size?: number;
4362
- /**
4363
- * Volume template to initialize from, with optional revision (e.g., "mytemplate:1" or "mytemplate:latest")
4364
- */
4365
- template?: string;
4366
- };
4367
- /**
4368
- * Immutable volume configuration set at creation time (size and region cannot be changed after creation)
4369
- */
4370
- export type VolumeSpecWritable = {
4371
4362
  /**
4372
4363
  * Deployment region for the volume (e.g., us-pdx-1, eu-lon-1). Must match the region of sandboxes it attaches to.
4373
4364
  */
@@ -4725,6 +4716,10 @@ export type WorkspaceUser = {
4725
4716
  * API version (e.g., 2026-04-16). Defaults to the earliest stable version if omitted. See https://docs.blaxel.ai/api-reference/introduction#api-versioning.
4726
4717
  */
4727
4718
  export type BlaxelVersion = string;
4719
+ /**
4720
+ * Comma-separated list of statuses to filter on (e.g. `DEPLOYED,FAILED`). Values are case-insensitive; unknown values are rejected with a 400. Selecting every status is equivalent to omitting the parameter. Bound into the cursor fingerprint so a cursor opened with one selection cannot be reused with another. Filtering itself requires the 2026-04-28 Blaxel-Version (the paginated listing); on earlier versions the value is still validated but the listing is unfiltered, except for sandboxes where it is applied on every version.
4721
+ */
4722
+ export type ListingStatus = string;
4728
4723
  /**
4729
4724
  * Start from a known pagination boundary. `end` is only supported for `createdAt` listings (asc or desc) and returns the tail page directly without walking every cursor from the first page.
4730
4725
  */
@@ -4769,6 +4764,10 @@ export type ListAgentsData = {
4769
4764
  * Start from a known pagination boundary. `end` is only supported for `createdAt` listings (asc or desc) and returns the tail page directly without walking every cursor from the first page.
4770
4765
  */
4771
4766
  anchor?: 'end';
4767
+ /**
4768
+ * Comma-separated list of statuses to filter on (e.g. `DEPLOYED,FAILED`). Values are case-insensitive; unknown values are rejected with a 400. Selecting every status is equivalent to omitting the parameter. Bound into the cursor fingerprint so a cursor opened with one selection cannot be reused with another. Filtering itself requires the 2026-04-28 Blaxel-Version (the paginated listing); on earlier versions the value is still validated but the listing is unfiltered, except for sandboxes where it is applied on every version.
4769
+ */
4770
+ status?: string;
4772
4771
  };
4773
4772
  url: '/agents';
4774
4773
  };
@@ -4992,6 +4991,10 @@ export type ListApplicationsData = {
4992
4991
  * Start from a known pagination boundary. `end` is only supported for `createdAt` listings (asc or desc) and returns the tail page directly without walking every cursor from the first page.
4993
4992
  */
4994
4993
  anchor?: 'end';
4994
+ /**
4995
+ * Comma-separated list of statuses to filter on (e.g. `DEPLOYED,FAILED`). Values are case-insensitive; unknown values are rejected with a 400. Selecting every status is equivalent to omitting the parameter. Bound into the cursor fingerprint so a cursor opened with one selection cannot be reused with another. Filtering itself requires the 2026-04-28 Blaxel-Version (the paginated listing); on earlier versions the value is still validated but the listing is unfiltered, except for sandboxes where it is applied on every version.
4996
+ */
4997
+ status?: string;
4995
4998
  };
4996
4999
  url: '/applications';
4997
5000
  };
@@ -5445,6 +5448,10 @@ export type ListDrivesData = {
5445
5448
  * Filter drives by external ID. When set, only drives matching this caller-owned identifier are returned.
5446
5449
  */
5447
5450
  externalId?: string;
5451
+ /**
5452
+ * Comma-separated list of statuses to filter on (e.g. `DEPLOYED,FAILED`). Values are case-insensitive; unknown values are rejected with a 400. Selecting every status is equivalent to omitting the parameter. Bound into the cursor fingerprint so a cursor opened with one selection cannot be reused with another. Filtering itself requires the 2026-04-28 Blaxel-Version (the paginated listing); on earlier versions the value is still validated but the listing is unfiltered, except for sandboxes where it is applied on every version.
5453
+ */
5454
+ status?: string;
5448
5455
  };
5449
5456
  url: '/drives';
5450
5457
  };
@@ -5788,6 +5795,10 @@ export type ListFunctionsData = {
5788
5795
  * Start from a known pagination boundary. `end` is only supported for `createdAt` listings (asc or desc) and returns the tail page directly without walking every cursor from the first page.
5789
5796
  */
5790
5797
  anchor?: 'end';
5798
+ /**
5799
+ * Comma-separated list of statuses to filter on (e.g. `DEPLOYED,FAILED`). Values are case-insensitive; unknown values are rejected with a 400. Selecting every status is equivalent to omitting the parameter. Bound into the cursor fingerprint so a cursor opened with one selection cannot be reused with another. Filtering itself requires the 2026-04-28 Blaxel-Version (the paginated listing); on earlier versions the value is still validated but the listing is unfiltered, except for sandboxes where it is applied on every version.
5800
+ */
5801
+ status?: string;
5791
5802
  };
5792
5803
  url: '/functions';
5793
5804
  };
@@ -6554,6 +6565,10 @@ export type ListJobsData = {
6554
6565
  * Start from a known pagination boundary. `end` is only supported for `createdAt` listings (asc or desc) and returns the tail page directly without walking every cursor from the first page.
6555
6566
  */
6556
6567
  anchor?: 'end';
6568
+ /**
6569
+ * Comma-separated list of statuses to filter on (e.g. `DEPLOYED,FAILED`). Values are case-insensitive; unknown values are rejected with a 400. Selecting every status is equivalent to omitting the parameter. Bound into the cursor fingerprint so a cursor opened with one selection cannot be reused with another. Filtering itself requires the 2026-04-28 Blaxel-Version (the paginated listing); on earlier versions the value is still validated but the listing is unfiltered, except for sandboxes where it is applied on every version.
6570
+ */
6571
+ status?: string;
6557
6572
  };
6558
6573
  url: '/jobs';
6559
6574
  };
@@ -6906,6 +6921,10 @@ export type ListModelsData = {
6906
6921
  * Start from a known pagination boundary. `end` is only supported for `createdAt` listings (asc or desc) and returns the tail page directly without walking every cursor from the first page.
6907
6922
  */
6908
6923
  anchor?: 'end';
6924
+ /**
6925
+ * Comma-separated list of statuses to filter on (e.g. `DEPLOYED,FAILED`). Values are case-insensitive; unknown values are rejected with a 400. Selecting every status is equivalent to omitting the parameter. Bound into the cursor fingerprint so a cursor opened with one selection cannot be reused with another. Filtering itself requires the 2026-04-28 Blaxel-Version (the paginated listing); on earlier versions the value is still validated but the listing is unfiltered, except for sandboxes where it is applied on every version.
6926
+ */
6927
+ status?: string;
6909
6928
  };
6910
6929
  url: '/models';
6911
6930
  };
@@ -7365,6 +7384,10 @@ export type ListSandboxesData = {
7365
7384
  * Start from a known pagination boundary. `end` is only supported for `createdAt` listings (asc or desc) and returns the tail page directly without walking every cursor from the first page.
7366
7385
  */
7367
7386
  anchor?: 'end';
7387
+ /**
7388
+ * Comma-separated list of statuses to filter on (e.g. `DEPLOYED,FAILED`). When set it takes precedence over `showTerminated`. Unknown values are rejected with a 400. Bound into the cursor fingerprint.
7389
+ */
7390
+ status?: string;
7368
7391
  /**
7369
7392
  * Filter sandboxes by external ID. When set, only sandboxes matching this caller-owned identifier are returned.
7370
7393
  */
@@ -8579,6 +8602,10 @@ export type ListVolumesData = {
8579
8602
  * Filter volumes by external ID. When set, only volumes matching this caller-owned identifier are returned.
8580
8603
  */
8581
8604
  externalId?: string;
8605
+ /**
8606
+ * Comma-separated list of statuses to filter on (e.g. `DEPLOYED,FAILED`). Values are case-insensitive; unknown values are rejected with a 400. Selecting every status is equivalent to omitting the parameter. Bound into the cursor fingerprint so a cursor opened with one selection cannot be reused with another. Filtering itself requires the 2026-04-28 Blaxel-Version (the paginated listing); on earlier versions the value is still validated but the listing is unfiltered, except for sandboxes where it is applied on every version.
8607
+ */
8608
+ status?: string;
8582
8609
  };
8583
8610
  url: '/volumes';
8584
8611
  };
@@ -4,6 +4,7 @@ export type DriveCreateConfiguration = {
4
4
  name?: string;
5
5
  displayName?: string;
6
6
  labels?: Record<string, string>;
7
+ /** @deprecated Drives have no size limit: the control plane ignores this. */
7
8
  size?: number;
8
9
  region?: string;
9
10
  permissions?: Array<DrivePermission>;
@@ -17,6 +18,7 @@ export declare class DriveInstance {
17
18
  get status(): string | undefined;
18
19
  get name(): string;
19
20
  get displayName(): string | undefined;
21
+ /** @deprecated Only legacy drives created with a size still report one. */
20
22
  get size(): number | undefined;
21
23
  get region(): string | undefined;
22
24
  get permissions(): DrivePermission[] | undefined;
@@ -53,6 +55,7 @@ export declare class DriveInstance {
53
55
  q?: string;
54
56
  anchor?: "end";
55
57
  externalId?: string;
58
+ status?: string;
56
59
  }>>;
57
60
  static delete(driveName: string): Promise<{
58
61
  message?: string;
@@ -47,6 +47,13 @@ export declare class SandboxInstance {
47
47
  get events(): import("../client/types.gen.js").CoreEvents | undefined;
48
48
  get spec(): import("../client/types.gen.js").SandboxSpec;
49
49
  get lastUsedAt(): string | undefined;
50
+ /**
51
+ * Infrastructure failures the compute plane recorded for this sandbox, oldest
52
+ * first. Entries with `fatal: true` are the ones that moved it to FAILED; the
53
+ * others (e.g. a microVM that exited and restarted) are informational. Only
54
+ * returned when a single sandbox is read, never in listings.
55
+ */
56
+ get errors(): import("../client/types.gen.js").SandboxInfrastructureError[];
50
57
  get h2Domain(): string | null;
51
58
  /**
52
59
  * Warm and attach an H2 session based on the sandbox's region.
@@ -131,6 +138,7 @@ export declare class SandboxInstance {
131
138
  sort?: "createdAt:desc" | "createdAt:asc" | "name:asc" | "name:desc";
132
139
  q?: string;
133
140
  anchor?: "end";
141
+ status?: string;
134
142
  externalId?: string;
135
143
  }>>;
136
144
  static delete(sandboxName: string): Promise<SandboxModel>;
@@ -53,6 +53,7 @@ export declare class VolumeInstance {
53
53
  q?: string;
54
54
  anchor?: "end";
55
55
  externalId?: string;
56
+ status?: string;
56
57
  }>>;
57
58
  static delete(volumeName: string): Promise<Volume>;
58
59
  delete(): Promise<Volume>;