@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.
@@ -24,8 +24,8 @@ function missingCredentialsMessage() {
24
24
  return "No Blaxel credentials found. Set the BL_API_KEY and BL_WORKSPACE environment variables, or run `bl login`.";
25
25
  }
26
26
  // Build info - these placeholders are replaced at build time by build:replace-imports
27
- const BUILD_VERSION = "0.3.26-preview.311";
28
- const BUILD_COMMIT = "a62496fa4537136926770cdd0d6e48ceb8506491";
27
+ const BUILD_VERSION = "0.3.26-preview.312";
28
+ const BUILD_COMMIT = "45891cd9862d690bb6532b5758e75084083d511f";
29
29
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
30
30
  const BLAXEL_API_VERSION = "2026-09-22";
31
31
  // Bun < 1.3.11 never sends connection-level WINDOW_UPDATE: the pooled h2
@@ -277,7 +277,7 @@ export const postFilesystemMultipartByUploadIdComplete = (options) => {
277
277
  };
278
278
  /**
279
279
  * Upload part
280
- * Upload a single part of a multipart upload
280
+ * 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.
281
281
  */
282
282
  export const putFilesystemMultipartByUploadIdPart = (options) => {
283
283
  return (options.client ?? _heyApiClient).put({
@@ -334,7 +334,8 @@ export const postFilesystemMultipartInitiateByPath = (options) => {
334
334
  };
335
335
  /**
336
336
  * Fuzzy search for files and directories
337
- * Performs fuzzy search on filesystem paths using fuzzy matching algorithm. Optimized alternative to find and grep commands.
337
+ * 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.
338
+ * 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.
338
339
  */
339
340
  export const getFilesystemSearchByPath = (options) => {
340
341
  return (options.client ?? _heyApiClient).get({
@@ -382,7 +383,11 @@ export const getFilesystemByPath = (options) => {
382
383
  };
383
384
  /**
384
385
  * Create or update a file or directory
385
- * Create or update a file or directory
386
+ * Create or update a file or directory.
387
+ *
388
+ * Idempotent: an existing file is overwritten (truncated, not appended to) and an existing directory is kept, so retrying the same request is safe.
389
+ *
390
+ * 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).
386
391
  */
387
392
  export const putFilesystemByPath = (options) => {
388
393
  return (options.client ?? _heyApiClient).put({
@@ -434,7 +439,7 @@ export const getFilesystemTreeByPath = (options) => {
434
439
  };
435
440
  /**
436
441
  * Create or update directory tree
437
- * Create or update multiple files within a directory tree structure
442
+ * Create or update multiple files within a directory tree structure. Idempotent: existing files are overwritten, so retrying the same request is safe.
438
443
  */
439
444
  export const putFilesystemTreeByPath = (options) => {
440
445
  return (options.client ?? _heyApiClient).put({
@@ -575,7 +580,10 @@ export const getProcess = (options) => {
575
580
  };
576
581
  /**
577
582
  * Execute a command
578
- * 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.
583
+ * Execute a command and return process information.
584
+ *
585
+ * 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": "..."}`.
586
+ * `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).
579
587
  */
580
588
  export const postProcess = (options) => {
581
589
  return (options.client ?? _heyApiClient).post({
@@ -595,7 +603,7 @@ export const postProcess = (options) => {
595
603
  };
596
604
  /**
597
605
  * Stop a process
598
- * Gracefully stop a running process
606
+ * Request graceful termination. Poll GET /process/{identifier} until terminal status confirms the managed process has exited.
599
607
  */
600
608
  export const deleteProcessByIdentifier = (options) => {
601
609
  return (options.client ?? _heyApiClient).delete({
@@ -627,7 +635,7 @@ export const getProcessByIdentifier = (options) => {
627
635
  };
628
636
  /**
629
637
  * Kill a process
630
- * Forcefully kill a running process
638
+ * Request forceful termination. Poll GET /process/{identifier} until terminal status confirms the managed process has exited.
631
639
  */
632
640
  export const deleteProcessByIdentifierKill = (options) => {
633
641
  return (options.client ?? _heyApiClient).delete({
@@ -659,7 +667,8 @@ export const getProcessByIdentifierLogs = (options) => {
659
667
  };
660
668
  /**
661
669
  * Stream process logs in real time
662
- * 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.
670
+ * 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.
671
+ * 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.
663
672
  */
664
673
  export const getProcessByIdentifierLogsStream = (options) => {
665
674
  return (options.client ?? _heyApiClient).get({
@@ -262,7 +262,7 @@ export class SandboxFileSystem extends SandboxAction {
262
262
  }
263
263
  async search(query, path = "/", options) {
264
264
  const formattedPath = this.formatPath(path);
265
- const queryParams = {};
265
+ const queryParams = { query };
266
266
  if (options?.maxResults !== undefined) {
267
267
  queryParams.maxResults = options.maxResults;
268
268
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/core",
3
- "version": "0.3.26-preview.311",
3
+ "version": "0.3.26-preview.312",
4
4
  "description": "Blaxel Core SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",