@blaxel/core 0.2.51-preview.124 → 0.2.51-preview.125

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.
@@ -138,6 +138,10 @@ export type Continent = {
138
138
  * Core event
139
139
  */
140
140
  export type CoreEvent = {
141
+ /**
142
+ * Canary revisionID link to the event
143
+ */
144
+ canaryRevision?: string;
141
145
  /**
142
146
  * Event message
143
147
  */
@@ -180,7 +184,6 @@ export type CoreSpec = {
180
184
  flavors?: Flavors;
181
185
  integrationConnections?: IntegrationConnectionsList;
182
186
  policies?: PoliciesList;
183
- privateClusters?: ModelPrivateCluster;
184
187
  revision?: RevisionConfiguration;
185
188
  runtime?: Runtime;
186
189
  /**
@@ -1331,6 +1334,7 @@ export type Metrics = {
1331
1334
  * Metrics for functions
1332
1335
  */
1333
1336
  functions?: unknown;
1337
+ inferenceErrorGlobal?: ArrayMetric;
1334
1338
  /**
1335
1339
  * Historical requests for all resources globally
1336
1340
  */
@@ -1339,6 +1343,10 @@ export type Metrics = {
1339
1343
  * Historical requests for all resources globally
1340
1344
  */
1341
1345
  items?: Array<RequestTotalResponseData>;
1346
+ /**
1347
+ * Metrics for jobs
1348
+ */
1349
+ jobs?: unknown;
1342
1350
  /**
1343
1351
  * Metric value
1344
1352
  */
@@ -1386,27 +1394,10 @@ export type Model = {
1386
1394
  */
1387
1395
  status?: string;
1388
1396
  };
1389
- /**
1390
- * Private cluster where the model deployment is deployed
1391
- */
1392
- export type ModelPrivateCluster = {
1393
- /**
1394
- * The base url of the model in the private cluster
1395
- */
1396
- baseUrl?: string;
1397
- /**
1398
- * If true, the private cluster is available
1399
- */
1400
- enabled?: boolean;
1401
- /**
1402
- * The name of the private cluster
1403
- */
1404
- name?: string;
1405
- };
1406
1397
  /**
1407
1398
  * Model specification
1408
1399
  */
1409
- export type ModelSpec = CoreSpec;
1400
+ export type ModelSpec = CoreSpec & unknown;
1410
1401
  /**
1411
1402
  * OAuth of the artifact
1412
1403
  */
@@ -1768,51 +1759,6 @@ export type PreviewTokenSpec = {
1768
1759
  */
1769
1760
  token?: string;
1770
1761
  };
1771
- /**
1772
- * A private cluster where models can be located on.
1773
- */
1774
- export type PrivateCluster = TimeFields & OwnerFields & {
1775
- /**
1776
- * The private cluster's continent, used to determine the closest private cluster to serve inference requests based on the user's location
1777
- */
1778
- continent?: string;
1779
- /**
1780
- * The country where the private cluster is located, used to determine the closest private cluster to serve inference requests based on the user's location
1781
- */
1782
- country?: string;
1783
- /**
1784
- * The private cluster's display Name
1785
- */
1786
- displayName?: string;
1787
- /**
1788
- * Whether the private cluster is healthy or not, used to determine if the private cluster is ready to run inference
1789
- */
1790
- healthy?: boolean;
1791
- /**
1792
- * The private cluster's unique name
1793
- */
1794
- lastHealthCheckTime?: string;
1795
- /**
1796
- * The private cluster's latitude, used to determine the closest private cluster to serve inference requests based on the user's location
1797
- */
1798
- latitude?: string;
1799
- /**
1800
- * The private cluster's longitude, used to determine the closest private cluster to serve inference requests based on the user's location
1801
- */
1802
- longitude?: string;
1803
- /**
1804
- * The name of the private cluster, it must be unique
1805
- */
1806
- name?: string;
1807
- /**
1808
- * The service account (operator) that owns the cluster
1809
- */
1810
- ownedBy?: string;
1811
- /**
1812
- * The workspace the private cluster belongs to
1813
- */
1814
- workspace?: string;
1815
- };
1816
1762
  /**
1817
1763
  * Private location available for policies
1818
1764
  */
@@ -2201,6 +2147,10 @@ export type RevisionConfiguration = {
2201
2147
  * Canary revision percent
2202
2148
  */
2203
2149
  canaryPercent?: number;
2150
+ /**
2151
+ * Sticky session TTL in seconds (0 = disabled)
2152
+ */
2153
+ stickySessionTtl?: number;
2204
2154
  /**
2205
2155
  * Traffic percentage
2206
2156
  */
@@ -2808,6 +2758,10 @@ export type TraceIdsResponse = {
2808
2758
  */
2809
2759
  export type Trigger = {
2810
2760
  configuration?: TriggerConfiguration;
2761
+ /**
2762
+ * Enable or disable the trigger (default: true)
2763
+ */
2764
+ enabled?: boolean;
2811
2765
  /**
2812
2766
  * The id of the trigger
2813
2767
  */
@@ -3008,6 +2962,10 @@ export type WebsocketChannel = TimeFields & {
3008
2962
  * Unique connection ID
3009
2963
  */
3010
2964
  connection_id?: string;
2965
+ /**
2966
+ * Source region the connection belongs to
2967
+ */
2968
+ sourceRegion?: string;
3011
2969
  /**
3012
2970
  * Workspace the connection belongs to
3013
2971
  */
@@ -3433,6 +3391,28 @@ export type ListFunctionRevisionsResponses = {
3433
3391
  200: Array<RevisionMetadata>;
3434
3392
  };
3435
3393
  export type ListFunctionRevisionsResponse = ListFunctionRevisionsResponses[keyof ListFunctionRevisionsResponses];
3394
+ export type CleanupImagesData = {
3395
+ body?: never;
3396
+ path?: never;
3397
+ query?: never;
3398
+ url: '/images';
3399
+ };
3400
+ export type CleanupImagesResponses = {
3401
+ /**
3402
+ * successful operation
3403
+ */
3404
+ 200: {
3405
+ /**
3406
+ * Number of images deleted
3407
+ */
3408
+ deleted?: number;
3409
+ /**
3410
+ * Result message
3411
+ */
3412
+ message?: string;
3413
+ };
3414
+ };
3415
+ export type CleanupImagesResponse = CleanupImagesResponses[keyof CleanupImagesResponses];
3436
3416
  export type ListImagesData = {
3437
3417
  body?: never;
3438
3418
  path?: never;
@@ -4133,198 +4113,6 @@ export type UpdatePolicyResponses = {
4133
4113
  200: Policy;
4134
4114
  };
4135
4115
  export type UpdatePolicyResponse = UpdatePolicyResponses[keyof UpdatePolicyResponses];
4136
- export type ListPrivateClustersData = {
4137
- body?: never;
4138
- path?: never;
4139
- query?: never;
4140
- url: '/privateclusters';
4141
- };
4142
- export type ListPrivateClustersErrors = {
4143
- /**
4144
- * unauthorized
4145
- */
4146
- 401: unknown;
4147
- /**
4148
- * Forbidden
4149
- */
4150
- 403: unknown;
4151
- /**
4152
- * workspace not found
4153
- */
4154
- 404: unknown;
4155
- };
4156
- export type ListPrivateClustersResponses = {
4157
- /**
4158
- * successful operation
4159
- */
4160
- 200: Array<PrivateCluster>;
4161
- };
4162
- export type ListPrivateClustersResponse = ListPrivateClustersResponses[keyof ListPrivateClustersResponses];
4163
- export type CreatePrivateClusterData = {
4164
- body?: never;
4165
- path?: never;
4166
- query?: never;
4167
- url: '/privateclusters';
4168
- };
4169
- export type CreatePrivateClusterErrors = {
4170
- /**
4171
- * unauthorized
4172
- */
4173
- 401: unknown;
4174
- /**
4175
- * Forbidden
4176
- */
4177
- 403: unknown;
4178
- };
4179
- export type CreatePrivateClusterResponses = {
4180
- /**
4181
- * successful operation
4182
- */
4183
- 200: PrivateCluster;
4184
- };
4185
- export type CreatePrivateClusterResponse = CreatePrivateClusterResponses[keyof CreatePrivateClusterResponses];
4186
- export type DeletePrivateClusterData = {
4187
- body?: never;
4188
- path: {
4189
- /**
4190
- * Name of the private cluster
4191
- */
4192
- privateClusterName: string;
4193
- };
4194
- query?: never;
4195
- url: '/privateclusters/{privateClusterName}';
4196
- };
4197
- export type DeletePrivateClusterErrors = {
4198
- /**
4199
- * unauthorized
4200
- */
4201
- 401: unknown;
4202
- /**
4203
- * Forbidden
4204
- */
4205
- 403: unknown;
4206
- };
4207
- export type DeletePrivateClusterResponses = {
4208
- /**
4209
- * successful operation
4210
- */
4211
- 200: PrivateCluster;
4212
- };
4213
- export type DeletePrivateClusterResponse = DeletePrivateClusterResponses[keyof DeletePrivateClusterResponses];
4214
- export type GetPrivateClusterData = {
4215
- body?: never;
4216
- path: {
4217
- /**
4218
- * Name of the private cluster
4219
- */
4220
- privateClusterName: string;
4221
- };
4222
- query?: never;
4223
- url: '/privateclusters/{privateClusterName}';
4224
- };
4225
- export type GetPrivateClusterErrors = {
4226
- /**
4227
- * unauthorized
4228
- */
4229
- 401: unknown;
4230
- /**
4231
- * Forbidden
4232
- */
4233
- 403: unknown;
4234
- /**
4235
- * private cluster not found
4236
- */
4237
- 404: unknown;
4238
- };
4239
- export type GetPrivateClusterResponses = {
4240
- /**
4241
- * successful operation
4242
- */
4243
- 200: PrivateCluster;
4244
- };
4245
- export type GetPrivateClusterResponse = GetPrivateClusterResponses[keyof GetPrivateClusterResponses];
4246
- export type UpdatePrivateClusterData = {
4247
- body?: never;
4248
- path: {
4249
- /**
4250
- * Name of the private cluster
4251
- */
4252
- privateClusterName: string;
4253
- };
4254
- query?: never;
4255
- url: '/privateclusters/{privateClusterName}';
4256
- };
4257
- export type UpdatePrivateClusterErrors = {
4258
- /**
4259
- * unauthorized
4260
- */
4261
- 401: unknown;
4262
- /**
4263
- * Forbidden
4264
- */
4265
- 403: unknown;
4266
- };
4267
- export type UpdatePrivateClusterResponses = {
4268
- /**
4269
- * successful operation
4270
- */
4271
- 200: PrivateCluster;
4272
- };
4273
- export type UpdatePrivateClusterResponse = UpdatePrivateClusterResponses[keyof UpdatePrivateClusterResponses];
4274
- export type GetPrivateClusterHealthData = {
4275
- body?: never;
4276
- path: {
4277
- /**
4278
- * Name of the private cluster
4279
- */
4280
- privateClusterName: string;
4281
- };
4282
- query?: never;
4283
- url: '/privateclusters/{privateClusterName}/health';
4284
- };
4285
- export type GetPrivateClusterHealthErrors = {
4286
- /**
4287
- * unauthorized
4288
- */
4289
- 401: unknown;
4290
- /**
4291
- * Forbidden
4292
- */
4293
- 403: unknown;
4294
- };
4295
- export type GetPrivateClusterHealthResponses = {
4296
- /**
4297
- * successful operation
4298
- */
4299
- 200: unknown;
4300
- };
4301
- export type UpdatePrivateClusterHealthData = {
4302
- body?: never;
4303
- path: {
4304
- /**
4305
- * Name of the private cluster
4306
- */
4307
- privateClusterName: string;
4308
- };
4309
- query?: never;
4310
- url: '/privateclusters/{privateClusterName}/health';
4311
- };
4312
- export type UpdatePrivateClusterHealthErrors = {
4313
- /**
4314
- * unauthorized
4315
- */
4316
- 401: unknown;
4317
- /**
4318
- * Forbidden
4319
- */
4320
- 403: unknown;
4321
- };
4322
- export type UpdatePrivateClusterHealthResponses = {
4323
- /**
4324
- * successful operation
4325
- */
4326
- 200: unknown;
4327
- };
4328
4116
  export type ListAllPendingInvitationsData = {
4329
4117
  body?: never;
4330
4118
  path?: never;
@@ -1,3 +1,4 @@
1
+ import { CreateJobExecutionRequest, JobExecution } from "../client/index.js";
1
2
  declare class BlJob {
2
3
  jobName: string;
3
4
  constructor(jobName: string);
@@ -8,6 +9,36 @@ declare class BlJob {
8
9
  get url(): import("url").URL;
9
10
  call(url: URL, tasks: Record<string, unknown>[]): Promise<Response>;
10
11
  run(tasks: Record<string, unknown>[]): Promise<string>;
12
+ /**
13
+ * Create a new execution for this job and return the execution ID
14
+ */
15
+ createExecution(request: CreateJobExecutionRequest): Promise<string>;
16
+ /**
17
+ * Get a specific execution by ID
18
+ */
19
+ getExecution(executionId: string): Promise<JobExecution>;
20
+ /**
21
+ * List all executions for this job
22
+ */
23
+ listExecutions(): Promise<JobExecution[]>;
24
+ /**
25
+ * Get the status of a specific execution
26
+ */
27
+ getExecutionStatus(executionId: string): Promise<string>;
28
+ /**
29
+ * Cancel a specific execution
30
+ */
31
+ cancelExecution(executionId: string): Promise<void>;
32
+ /**
33
+ * Wait for an execution to complete
34
+ * @param executionId The execution ID to wait for
35
+ * @param options.maxWait Maximum time to wait in milliseconds (default: 6 minutes)
36
+ * @param options.interval Polling interval in milliseconds (default: 3 seconds)
37
+ */
38
+ waitForExecution(executionId: string, options?: {
39
+ maxWait?: number;
40
+ interval?: number;
41
+ }): Promise<JobExecution>;
11
42
  }
12
43
  export declare const blJob: (jobName: string) => BlJob;
13
44
  export {};
@@ -101,11 +101,11 @@ export type ProcessResponse = {
101
101
  completedAt: string;
102
102
  exitCode: number;
103
103
  logs: string;
104
- maxRestarts: number;
104
+ maxRestarts?: number;
105
105
  name: string;
106
106
  pid: string;
107
- restartCount: number;
108
- restartOnFailure: boolean;
107
+ restartCount?: number;
108
+ restartOnFailure?: boolean;
109
109
  startedAt: string;
110
110
  status: 'failed' | 'killed' | 'stopped' | 'running' | 'completed';
111
111
  workingDir: string;
@@ -965,5 +965,5 @@ export type GetWatchFilesystemByPathResponses = {
965
965
  };
966
966
  export type GetWatchFilesystemByPathResponse = GetWatchFilesystemByPathResponses[keyof GetWatchFilesystemByPathResponses];
967
967
  export type ClientOptions = {
968
- baseUrl: 'https://run.blaxel.ai/{workspace_id}/sandboxes/{sandbox_id}' | (string & {});
968
+ baseUrl: 'https://sbx-{sandbox_id}-{workspace_id}.{region}.bl.run' | (string & {});
969
969
  };