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

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.
@@ -750,7 +750,7 @@ export const listImages = (options) => {
750
750
  };
751
751
  /**
752
752
  * Build a container image
753
- * Builds a container image without creating a deployment. Returns a presigned URL for uploading source code. After upload, the image will be built and stored in the registry, but no agent, function, sandbox, or job will be created or updated.
753
+ * Builds or imports a container image without creating a deployment. Provide a registry image reference to download and convert an existing image, or omit image to receive a presigned URL for uploading source code. Registry imports can specify memoryMb and volumeMb for the import worker. These settings do not change the resources of workloads using the image.
754
754
  */
755
755
  export const createImage = (options) => {
756
756
  return (options.client ?? _heyApiClient).post({
@@ -2306,7 +2306,7 @@ export const getTemplate = (options) => {
2306
2306
  };
2307
2307
  /**
2308
2308
  * List workspace team members
2309
- * Returns all team members in the workspace including their roles (admin or member) and invitation status.
2309
+ * Returns all team members in the workspace including their roles (admin, member or viewer) and invitation status.
2310
2310
  */
2311
2311
  export const listWorkspaceUsers = (options) => {
2312
2312
  return (options?.client ?? _heyApiClient).get({
@@ -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.312";
28
- const BUILD_COMMIT = "45891cd9862d690bb6532b5758e75084083d511f";
27
+ const BUILD_VERSION = "0.3.26-preview.313";
28
+ const BUILD_COMMIT = "74b7740c0709370950088f3244fe2eeb2e970fca";
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
@@ -5,6 +5,7 @@ import { client as _heyApiClient } from "./client.gen.js";
5
5
  * Export the filesystem changes to a presigned URL
6
6
  * Archives everything the sandbox changed on top of its base image and streams it, uncompressed, to a presigned S3 PUT URL. The memory of the sandbox is not archived.
7
7
  * The sandbox is quiesced first: the process list is saved (unless saveProcesses is false), every process is stopped, and the API then refuses the calls that would write to the filesystem. The freeze is not lifted afterwards, since an exported sandbox is meant to be restored elsewhere; call POST /archive/resume to lift it.
8
+ * A sandbox still frozen by an earlier export is exported as it is, with the process list that export saved.
8
9
  * Use dryRun to get the archive's content and exact size without stopping anything and without uploading.
9
10
  * Set async to start the export and answer immediately, which is what archiving a large filesystem needs: the export then reports itself through GET /archive/status.
10
11
  */
@@ -193,7 +194,7 @@ export const postEnvironmentReload = (options) => {
193
194
  };
194
195
  /**
195
196
  * Search for text content in files
196
- * Searches for text content inside files using ripgrep. Returns matching lines with context.
197
+ * Searches for text content inside files. Returns each matching line, with the lines around it when contextLines is set.
197
198
  */
198
199
  export const getFilesystemContentSearchByPath = (options) => {
199
200
  return (options.client ?? _heyApiClient).get({
@@ -381,6 +382,22 @@ export const getFilesystemByPath = (options) => {
381
382
  ...options
382
383
  });
383
384
  };
385
+ /**
386
+ * Stat a file or directory
387
+ * Returns the metadata of a file or directory as headers, with no body. This checks stat availability, not permission to read file contents or list a directory. When the path does not exist or its metadata cannot be accessed, the response is an empty 200 without the X-File-Type header.
388
+ */
389
+ export const headFilesystemByPath = (options) => {
390
+ return (options.client ?? _heyApiClient).head({
391
+ security: [
392
+ {
393
+ scheme: 'bearer',
394
+ type: 'http'
395
+ }
396
+ ],
397
+ url: '/filesystem/{path}',
398
+ ...options
399
+ });
400
+ };
384
401
  /**
385
402
  * Create or update a file or directory
386
403
  * Create or update a file or directory.
@@ -668,7 +685,10 @@ export const getProcessByIdentifierLogs = (options) => {
668
685
  /**
669
686
  * Stream process logs in real time
670
687
  * 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.
688
+ * By default, output is plain text with `stdout:` or `stderr:` prefixes at the start of each source stream's lines. Partial lines (e.g. prompts) are sent without waiting for a newline; their continuations have no new prefix. The other stream is not held back while a line is incomplete, and chronological order across stdout and stderr is not guaranteed.
689
+ * This format does not provide unambiguous framing: output from the other stream, or a `[keepalive]` marker sent every 30 seconds, can appear inside an unfinished line. A later continuation can therefore lack a prefix identifying its source. Do not rely on this text stream to reconstruct stdout and stderr separately; request NDJSON for source-preserving streaming, or use GET /process/{identifier}/logs for separate output snapshots.
690
+ * With `Accept: application/x-ndjson`, each line is a JSON object with `type` (`stdout`, `stderr`, `keepalive`, `restart`, `truncated`, or `error`) and optional `data`. Output records retain source identity and original bytes, including partial lines and newlines, for both retained history and live output. For `encoding: "base64"`, decode `data` before concatenating bytes per source; this occurs for binary data or a UTF-8 character split across chunks. Chunk boundaries are arbitrary and ordering is collection order, not a strict chronology across streams.
691
+ * `keepalive` has no output data. A quiet active stream sends an initial keepalive after attachment so clients can receive the response before sending stdin; subsequent keepalives are sent every 30 seconds. `restart` carries a supervisor restart notice, not process output. `truncated` reports a retention or slow-reader gap and must not be appended to stdout/stderr. `error` reports a streaming failure. The connection ends after the final process exit, including automatic restarts; there is no `result` record. Older processes without structured history return HTTP 409 for NDJSON; their text stream remains available.
672
692
  */
673
693
  export const getProcessByIdentifierLogsStream = (options) => {
674
694
  return (options.client ?? _heyApiClient).get({
@@ -744,7 +764,10 @@ export const postUpgrade = (options) => {
744
764
  };
745
765
  /**
746
766
  * Stream file modification events in a directory
747
- * Streams the path of modified files (one per line) in the given directory. Closes when the client disconnects.
767
+ * Streams change events for a directory until the client disconnects.
768
+ *
769
+ * The body is JSON lines (sent with `Content-Type: text/plain`): one event object per line, e.g. `{"op":"WRITE","name":"main.go","path":"/app/src","error":null}`. `op` is the fsnotify operation (CREATE, WRITE, REMOVE, RENAME or CHMOD, several can be joined with `|`), `name` the base name of the changed entry, `path` the directory containing it, and `error` is always null. A `[keepalive]` line (not JSON) is sent every 30 seconds.
770
+ * Only the directory's direct entries are watched. To also watch every subdirectory, including ones created later, end the path with `**`. The stream reports subsequent changes without an initial snapshot. When a new directory is detected, synthetic CREATE events are emitted for entries already present inside it to cover changes before its watch was registered.
748
771
  */
749
772
  export const getWatchFilesystemByPath = (options) => {
750
773
  return (options.client ?? _heyApiClient).get({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/core",
3
- "version": "0.3.26-preview.312",
3
+ "version": "0.3.26-preview.313",
4
4
  "description": "Blaxel Core SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",