@blaxel/core 0.3.26-preview.311 → 0.3.26-preview.312

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.26-preview.311";
34
- const BUILD_COMMIT = "a62496fa4537136926770cdd0d6e48ceb8506491";
33
+ const BUILD_VERSION = "0.3.26-preview.312";
34
+ const BUILD_COMMIT = "45891cd9862d690bb6532b5758e75084083d511f";
35
35
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
36
36
  const BLAXEL_API_VERSION = "2026-09-22";
37
37
  // Bun < 1.3.11 never sends connection-level WINDOW_UPDATE: the pooled h2
@@ -294,7 +294,7 @@ const postFilesystemMultipartByUploadIdComplete = (options) => {
294
294
  exports.postFilesystemMultipartByUploadIdComplete = postFilesystemMultipartByUploadIdComplete;
295
295
  /**
296
296
  * Upload part
297
- * Upload a single part of a multipart upload
297
+ * Upload a single part of a multipart upload. Re-uploading a part number replaces that part. Wait for the previous request for that part to finish before retrying.
298
298
  */
299
299
  const putFilesystemMultipartByUploadIdPart = (options) => {
300
300
  return (options.client ?? client_gen_1.client).put({
@@ -354,7 +354,8 @@ const postFilesystemMultipartInitiateByPath = (options) => {
354
354
  exports.postFilesystemMultipartInitiateByPath = postFilesystemMultipartInitiateByPath;
355
355
  /**
356
356
  * Fuzzy search for files and directories
357
- * Performs fuzzy search on filesystem paths using fuzzy matching algorithm. Optimized alternative to find and grep commands.
357
+ * Ranks the files and directories under a path by how well their relative path fuzzy-matches `query` (fzf algorithm: the query's characters must appear in order, not necessarily next to each other), best match first.
358
+ * Fuzzy search is for "jump to file" lookups from a partial name. The `patterns` parameter is currently ignored by this endpoint; use find for exact glob filtering.
358
359
  */
359
360
  const getFilesystemSearchByPath = (options) => {
360
361
  return (options.client ?? client_gen_1.client).get({
@@ -405,7 +406,11 @@ const getFilesystemByPath = (options) => {
405
406
  exports.getFilesystemByPath = getFilesystemByPath;
406
407
  /**
407
408
  * Create or update a file or directory
408
- * Create or update a file or directory
409
+ * Create or update a file or directory.
410
+ *
411
+ * Idempotent: an existing file is overwritten (truncated, not appended to) and an existing directory is kept, so retrying the same request is safe.
412
+ *
413
+ * Send either a JSON body (FileRequest) or `multipart/form-data` for binary files. Multipart fields, in any order: `file` (required, the file content), `permissions` (optional octal mode such as `0755`, applied when the file is created, default `0644`; an existing file keeps its mode), `path` (optional, ignored: the target is always the URL path).
409
414
  */
410
415
  const putFilesystemByPath = (options) => {
411
416
  return (options.client ?? client_gen_1.client).put({
@@ -460,7 +465,7 @@ const getFilesystemTreeByPath = (options) => {
460
465
  exports.getFilesystemTreeByPath = getFilesystemTreeByPath;
461
466
  /**
462
467
  * Create or update directory tree
463
- * Create or update multiple files within a directory tree structure
468
+ * Create or update multiple files within a directory tree structure. Idempotent: existing files are overwritten, so retrying the same request is safe.
464
469
  */
465
470
  const putFilesystemTreeByPath = (options) => {
466
471
  return (options.client ?? client_gen_1.client).put({
@@ -609,7 +614,10 @@ const getProcess = (options) => {
609
614
  exports.getProcess = getProcess;
610
615
  /**
611
616
  * Execute a command
612
- * Execute a command and return process information. If Accept header is text/event-stream, streams logs in SSE format and returns the process response as a final event.
617
+ * Execute a command and return process information.
618
+ *
619
+ * Streaming: with `Accept: application/x-ndjson` (or `Accept: text/event-stream`, kept for compatibility) the response is NDJSON (`Content-Type: application/x-ndjson`), not SSE: one JSON object per line, `{"type": "...", "data": "..."}`.
620
+ * `type` is `stdout` or `stderr` (`data` is a raw output chunk, sent as soon as the process writes it, newlines included; if the process finished before any chunk was streamed, its output is sent instead as one event per line, without the newline), `keepalive` (every 5 seconds, no data), `error` (`data` is the message, ends the stream) or `result` (last event, `data` is the ProcessResponse as a JSON string).
613
621
  */
614
622
  const postProcess = (options) => {
615
623
  return (options.client ?? client_gen_1.client).post({
@@ -630,7 +638,7 @@ const postProcess = (options) => {
630
638
  exports.postProcess = postProcess;
631
639
  /**
632
640
  * Stop a process
633
- * Gracefully stop a running process
641
+ * Request graceful termination. Poll GET /process/{identifier} until terminal status confirms the managed process has exited.
634
642
  */
635
643
  const deleteProcessByIdentifier = (options) => {
636
644
  return (options.client ?? client_gen_1.client).delete({
@@ -664,7 +672,7 @@ const getProcessByIdentifier = (options) => {
664
672
  exports.getProcessByIdentifier = getProcessByIdentifier;
665
673
  /**
666
674
  * Kill a process
667
- * Forcefully kill a running process
675
+ * Request forceful termination. Poll GET /process/{identifier} until terminal status confirms the managed process has exited.
668
676
  */
669
677
  const deleteProcessByIdentifierKill = (options) => {
670
678
  return (options.client ?? client_gen_1.client).delete({
@@ -698,7 +706,8 @@ const getProcessByIdentifierLogs = (options) => {
698
706
  exports.getProcessByIdentifierLogs = getProcessByIdentifierLogs;
699
707
  /**
700
708
  * Stream process logs in real time
701
- * Streams the stdout and stderr output of a process in real time, one line per log, prefixed with 'stdout:' or 'stderr:'. Closes when the process exits or the client disconnects.
709
+ * Streams the stdout and stderr output of a process in real time: the output so far, then live output as the process writes it. Closes when the process exits or the client disconnects.
710
+ * Each output line starts with `stdout:` or `stderr:` and keeps its trailing newline. A partial line (e.g. a prompt) is sent as soon as it is written; when the process completes it, the rest follows without a new prefix. `[keepalive]` lines are sent every 30 seconds.
702
711
  */
703
712
  const getProcessByIdentifierLogsStream = (options) => {
704
713
  return (options.client ?? client_gen_1.client).get({
@@ -266,7 +266,7 @@ class SandboxFileSystem extends action_js_1.SandboxAction {
266
266
  }
267
267
  async search(query, path = "/", options) {
268
268
  const formattedPath = this.formatPath(path);
269
- const queryParams = {};
269
+ const queryParams = { query };
270
270
  if (options?.maxResults !== undefined) {
271
271
  queryParams.maxResults = options.maxResults;
272
272
  }
@@ -119,7 +119,7 @@ export declare const deleteFilesystemMultipartByUploadIdAbort: <ThrowOnError ext
119
119
  export declare const postFilesystemMultipartByUploadIdComplete: <ThrowOnError extends boolean = false>(options: Options<PostFilesystemMultipartByUploadIdCompleteData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
120
120
  /**
121
121
  * Upload part
122
- * Upload a single part of a multipart upload
122
+ * Upload a single part of a multipart upload. Re-uploading a part number replaces that part. Wait for the previous request for that part to finish before retrying.
123
123
  */
124
124
  export declare const putFilesystemMultipartByUploadIdPart: <ThrowOnError extends boolean = false>(options: Options<PutFilesystemMultipartByUploadIdPartData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").MultipartUploadPartResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
125
125
  /**
@@ -134,7 +134,8 @@ export declare const getFilesystemMultipartByUploadIdParts: <ThrowOnError extend
134
134
  export declare const postFilesystemMultipartInitiateByPath: <ThrowOnError extends boolean = false>(options: Options<PostFilesystemMultipartInitiateByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").MultipartInitiateResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
135
135
  /**
136
136
  * Fuzzy search for files and directories
137
- * Performs fuzzy search on filesystem paths using fuzzy matching algorithm. Optimized alternative to find and grep commands.
137
+ * Ranks the files and directories under a path by how well their relative path fuzzy-matches `query` (fzf algorithm: the query's characters must appear in order, not necessarily next to each other), best match first.
138
+ * Fuzzy search is for "jump to file" lookups from a partial name. The `patterns` parameter is currently ignored by this endpoint; use find for exact glob filtering.
138
139
  */
139
140
  export declare const getFilesystemSearchByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemSearchByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").FuzzySearchResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
140
141
  /**
@@ -149,7 +150,11 @@ export declare const deleteFilesystemByPath: <ThrowOnError extends boolean = fal
149
150
  export declare const getFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").File | import("./types.gen").Directory | import("./types.gen").FileWithContent | Blob, import("./types.gen").ErrorResponse, ThrowOnError>;
150
151
  /**
151
152
  * Create or update a file or directory
152
- * Create or update a file or directory
153
+ * Create or update a file or directory.
154
+ *
155
+ * Idempotent: an existing file is overwritten (truncated, not appended to) and an existing directory is kept, so retrying the same request is safe.
156
+ *
157
+ * Send either a JSON body (FileRequest) or `multipart/form-data` for binary files. Multipart fields, in any order: `file` (required, the file content), `permissions` (optional octal mode such as `0755`, applied when the file is created, default `0644`; an existing file keeps its mode), `path` (optional, ignored: the target is always the URL path).
153
158
  */
154
159
  export declare const putFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<PutFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
155
160
  /**
@@ -164,7 +169,7 @@ export declare const deleteFilesystemTreeByPath: <ThrowOnError extends boolean =
164
169
  export declare const getFilesystemTreeByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemTreeByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").File | import("./types.gen").Directory | import("./types.gen").FileWithContent | Blob, import("./types.gen").ErrorResponse, ThrowOnError>;
165
170
  /**
166
171
  * Create or update directory tree
167
- * Create or update multiple files within a directory tree structure
172
+ * Create or update multiple files within a directory tree structure. Idempotent: existing files are overwritten, so retrying the same request is safe.
168
173
  */
169
174
  export declare const putFilesystemTreeByPath: <ThrowOnError extends boolean = false>(options: Options<PutFilesystemTreeByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").File | import("./types.gen").Directory | import("./types.gen").FileWithContent | Blob, import("./types.gen").ErrorResponse, ThrowOnError>;
170
175
  /**
@@ -211,12 +216,15 @@ export declare const putNetworkTunnelConfig: <ThrowOnError extends boolean = fal
211
216
  export declare const getProcess: <ThrowOnError extends boolean = false>(options?: Options<GetProcessData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessResponse[], unknown, ThrowOnError>;
212
217
  /**
213
218
  * Execute a command
214
- * Execute a command and return process information. If Accept header is text/event-stream, streams logs in SSE format and returns the process response as a final event.
219
+ * Execute a command and return process information.
220
+ *
221
+ * Streaming: with `Accept: application/x-ndjson` (or `Accept: text/event-stream`, kept for compatibility) the response is NDJSON (`Content-Type: application/x-ndjson`), not SSE: one JSON object per line, `{"type": "...", "data": "..."}`.
222
+ * `type` is `stdout` or `stderr` (`data` is a raw output chunk, sent as soon as the process writes it, newlines included; if the process finished before any chunk was streamed, its output is sent instead as one event per line, without the newline), `keepalive` (every 5 seconds, no data), `error` (`data` is the message, ends the stream) or `result` (last event, `data` is the ProcessResponse as a JSON string).
215
223
  */
216
224
  export declare const postProcess: <ThrowOnError extends boolean = false>(options: Options<PostProcessData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
217
225
  /**
218
226
  * Stop a process
219
- * Gracefully stop a running process
227
+ * Request graceful termination. Poll GET /process/{identifier} until terminal status confirms the managed process has exited.
220
228
  */
221
229
  export declare const deleteProcessByIdentifier: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessByIdentifierData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
222
230
  /**
@@ -226,7 +234,7 @@ export declare const deleteProcessByIdentifier: <ThrowOnError extends boolean =
226
234
  export declare const getProcessByIdentifier: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
227
235
  /**
228
236
  * Kill a process
229
- * Forcefully kill a running process
237
+ * Request forceful termination. Poll GET /process/{identifier} until terminal status confirms the managed process has exited.
230
238
  */
231
239
  export declare const deleteProcessByIdentifierKill: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessByIdentifierKillData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
232
240
  /**
@@ -236,7 +244,8 @@ export declare const deleteProcessByIdentifierKill: <ThrowOnError extends boolea
236
244
  export declare const getProcessByIdentifierLogs: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierLogsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessLogs, import("./types.gen").ErrorResponse, ThrowOnError>;
237
245
  /**
238
246
  * Stream process logs in real time
239
- * Streams the stdout and stderr output of a process in real time, one line per log, prefixed with 'stdout:' or 'stderr:'. Closes when the process exits or the client disconnects.
247
+ * Streams the stdout and stderr output of a process in real time: the output so far, then live output as the process writes it. Closes when the process exits or the client disconnects.
248
+ * Each output line starts with `stdout:` or `stderr:` and keeps its trailing newline. A partial line (e.g. a prompt) is sent as soon as it is written; when the process completes it, the rest follows without a new prefix. `[keepalive]` lines are sent every 30 seconds.
240
249
  */
241
250
  export declare const getProcessByIdentifierLogsStream: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierLogsStreamData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<string, import("./types.gen").ErrorResponse, ThrowOnError>;
242
251
  /**
@@ -278,11 +278,17 @@ export type FuzzySearchResponse = {
278
278
  };
279
279
  export type HealthResponse = {
280
280
  arch: string;
281
+ /**
282
+ * Build time in RFC 3339 (UTC), or "unknown" for builds without it
283
+ */
281
284
  buildTime: string;
282
285
  gitCommit: string;
283
286
  goVersion: string;
284
287
  lastUpgrade: UpgradeStatus;
285
288
  os: string;
289
+ /**
290
+ * API start time in RFC 3339
291
+ */
286
292
  startedAt: string;
287
293
  status: string;
288
294
  upgradeCount: number;
@@ -377,6 +383,9 @@ export type ProcessRequest = {
377
383
  };
378
384
  export type ProcessResponse = {
379
385
  command: string;
386
+ /**
387
+ * Completion time, same format as startedAt. Empty string while the process runs
388
+ */
380
389
  completedAt: string;
381
390
  exitCode: number;
382
391
  /**
@@ -389,6 +398,9 @@ export type ProcessResponse = {
389
398
  pid: string;
390
399
  restartCount?: number;
391
400
  restartOnFailure?: boolean;
401
+ /**
402
+ * Start time as an HTTP date (RFC 1123, e.g. Wed, 01 Jan 2023 12:00:00 GMT)
403
+ */
392
404
  startedAt: string;
393
405
  status: 'failed' | 'killed' | 'stopped' | 'running' | 'completed';
394
406
  stderr: string;
@@ -1143,12 +1155,16 @@ export type GetFilesystemSearchByPathData = {
1143
1155
  path: string;
1144
1156
  };
1145
1157
  query?: {
1158
+ /**
1159
+ * Fuzzy pattern matched against each relative path (e.g., mngo for src/main.go). When omitted, the search path itself is used as the pattern.
1160
+ */
1161
+ query?: string;
1146
1162
  /**
1147
1163
  * Maximum number of results to return (default: 20)
1148
1164
  */
1149
1165
  maxResults?: number;
1150
1166
  /**
1151
- * Comma-separated file patterns to include (e.g., *.go,*.js)
1167
+ * Accepted for compatibility but currently ignored; use filesystem-find for glob filtering
1152
1168
  */
1153
1169
  patterns?: string;
1154
1170
  /**
@@ -1226,7 +1242,7 @@ export type GetFilesystemByPathData = {
1226
1242
  body?: never;
1227
1243
  path: {
1228
1244
  /**
1229
- * File or directory path
1245
+ * File or directory path. Relative paths are resolved against the filesystem working directory. For example, with a working directory of /app, GET /filesystem/workspace resolves to /app/workspace. To access the absolute path /workspace over HTTP, encode its leading slash as %2F: GET /filesystem/%2Fworkspace. The double-slash form GET /filesystem//workspace also addresses /workspace.
1230
1246
  */
1231
1247
  path: string;
1232
1248
  };
@@ -1651,7 +1667,7 @@ export type DeleteProcessByIdentifierErrors = {
1651
1667
  export type DeleteProcessByIdentifierError = DeleteProcessByIdentifierErrors[keyof DeleteProcessByIdentifierErrors];
1652
1668
  export type DeleteProcessByIdentifierResponses = {
1653
1669
  /**
1654
- * Process stopped
1670
+ * Process stop requested
1655
1671
  */
1656
1672
  200: SuccessResponse;
1657
1673
  };
@@ -1709,7 +1725,7 @@ export type DeleteProcessByIdentifierKillErrors = {
1709
1725
  export type DeleteProcessByIdentifierKillError = DeleteProcessByIdentifierKillErrors[keyof DeleteProcessByIdentifierKillErrors];
1710
1726
  export type DeleteProcessByIdentifierKillResponses = {
1711
1727
  /**
1712
- * Process killed
1728
+ * Process kill requested
1713
1729
  */
1714
1730
  200: SuccessResponse;
1715
1731
  };
@@ -1775,7 +1791,7 @@ export type GetProcessByIdentifierLogsStreamErrors = {
1775
1791
  export type GetProcessByIdentifierLogsStreamError = GetProcessByIdentifierLogsStreamErrors[keyof GetProcessByIdentifierLogsStreamErrors];
1776
1792
  export type GetProcessByIdentifierLogsStreamResponses = {
1777
1793
  /**
1778
- * Stream of process logs, one line per log (prefixed with stdout:/stderr:)
1794
+ * Process output, each line prefixed with stdout: or stderr:
1779
1795
  */
1780
1796
  200: string;
1781
1797
  };