@blaxel/core 0.3.26-preview.311 → 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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/client/sdk.gen.js +2 -2
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/sandbox/client/sdk.gen.js +44 -11
- package/dist/cjs/sandbox/filesystem/filesystem.js +1 -1
- package/dist/cjs/types/client/sdk.gen.d.ts +5 -2
- package/dist/cjs/types/client/types.gen.d.ts +80 -7
- package/dist/cjs/types/sandbox/client/sdk.gen.d.ts +34 -13
- package/dist/cjs/types/sandbox/client/types.gen.d.ts +66 -13
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/client/sdk.gen.js +2 -2
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/sandbox/client/sdk.gen.js +44 -11
- package/dist/cjs-browser/sandbox/filesystem/filesystem.js +1 -1
- package/dist/cjs-browser/types/client/sdk.gen.d.ts +5 -2
- package/dist/cjs-browser/types/client/types.gen.d.ts +80 -7
- package/dist/cjs-browser/types/sandbox/client/sdk.gen.d.ts +34 -13
- package/dist/cjs-browser/types/sandbox/client/types.gen.d.ts +66 -13
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/client/sdk.gen.js +2 -2
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/sandbox/client/sdk.gen.js +42 -10
- package/dist/esm/sandbox/filesystem/filesystem.js +1 -1
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/client/sdk.gen.js +2 -2
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/sandbox/client/sdk.gen.js +42 -10
- package/dist/esm-browser/sandbox/filesystem/filesystem.js +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
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
|
|
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.
|
|
28
|
-
const BUILD_COMMIT = "
|
|
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
|
|
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({
|
|
@@ -277,7 +278,7 @@ export const postFilesystemMultipartByUploadIdComplete = (options) => {
|
|
|
277
278
|
};
|
|
278
279
|
/**
|
|
279
280
|
* Upload part
|
|
280
|
-
* Upload a single part of a multipart upload
|
|
281
|
+
* 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
282
|
*/
|
|
282
283
|
export const putFilesystemMultipartByUploadIdPart = (options) => {
|
|
283
284
|
return (options.client ?? _heyApiClient).put({
|
|
@@ -334,7 +335,8 @@ export const postFilesystemMultipartInitiateByPath = (options) => {
|
|
|
334
335
|
};
|
|
335
336
|
/**
|
|
336
337
|
* Fuzzy search for files and directories
|
|
337
|
-
*
|
|
338
|
+
* 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.
|
|
339
|
+
* 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
340
|
*/
|
|
339
341
|
export const getFilesystemSearchByPath = (options) => {
|
|
340
342
|
return (options.client ?? _heyApiClient).get({
|
|
@@ -380,9 +382,29 @@ export const getFilesystemByPath = (options) => {
|
|
|
380
382
|
...options
|
|
381
383
|
});
|
|
382
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
|
+
};
|
|
383
401
|
/**
|
|
384
402
|
* Create or update a file or directory
|
|
385
|
-
* Create or update a file or directory
|
|
403
|
+
* Create or update a file or directory.
|
|
404
|
+
*
|
|
405
|
+
* Idempotent: an existing file is overwritten (truncated, not appended to) and an existing directory is kept, so retrying the same request is safe.
|
|
406
|
+
*
|
|
407
|
+
* 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
408
|
*/
|
|
387
409
|
export const putFilesystemByPath = (options) => {
|
|
388
410
|
return (options.client ?? _heyApiClient).put({
|
|
@@ -434,7 +456,7 @@ export const getFilesystemTreeByPath = (options) => {
|
|
|
434
456
|
};
|
|
435
457
|
/**
|
|
436
458
|
* Create or update directory tree
|
|
437
|
-
* Create or update multiple files within a directory tree structure
|
|
459
|
+
* Create or update multiple files within a directory tree structure. Idempotent: existing files are overwritten, so retrying the same request is safe.
|
|
438
460
|
*/
|
|
439
461
|
export const putFilesystemTreeByPath = (options) => {
|
|
440
462
|
return (options.client ?? _heyApiClient).put({
|
|
@@ -575,7 +597,10 @@ export const getProcess = (options) => {
|
|
|
575
597
|
};
|
|
576
598
|
/**
|
|
577
599
|
* Execute a command
|
|
578
|
-
* Execute a command and return process information.
|
|
600
|
+
* Execute a command and return process information.
|
|
601
|
+
*
|
|
602
|
+
* 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": "..."}`.
|
|
603
|
+
* `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
604
|
*/
|
|
580
605
|
export const postProcess = (options) => {
|
|
581
606
|
return (options.client ?? _heyApiClient).post({
|
|
@@ -595,7 +620,7 @@ export const postProcess = (options) => {
|
|
|
595
620
|
};
|
|
596
621
|
/**
|
|
597
622
|
* Stop a process
|
|
598
|
-
*
|
|
623
|
+
* Request graceful termination. Poll GET /process/{identifier} until terminal status confirms the managed process has exited.
|
|
599
624
|
*/
|
|
600
625
|
export const deleteProcessByIdentifier = (options) => {
|
|
601
626
|
return (options.client ?? _heyApiClient).delete({
|
|
@@ -627,7 +652,7 @@ export const getProcessByIdentifier = (options) => {
|
|
|
627
652
|
};
|
|
628
653
|
/**
|
|
629
654
|
* Kill a process
|
|
630
|
-
*
|
|
655
|
+
* Request forceful termination. Poll GET /process/{identifier} until terminal status confirms the managed process has exited.
|
|
631
656
|
*/
|
|
632
657
|
export const deleteProcessByIdentifierKill = (options) => {
|
|
633
658
|
return (options.client ?? _heyApiClient).delete({
|
|
@@ -659,7 +684,11 @@ export const getProcessByIdentifierLogs = (options) => {
|
|
|
659
684
|
};
|
|
660
685
|
/**
|
|
661
686
|
* Stream process logs in real time
|
|
662
|
-
* Streams the stdout and stderr output of a process in real time
|
|
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.
|
|
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.
|
|
663
692
|
*/
|
|
664
693
|
export const getProcessByIdentifierLogsStream = (options) => {
|
|
665
694
|
return (options.client ?? _heyApiClient).get({
|
|
@@ -735,7 +764,10 @@ export const postUpgrade = (options) => {
|
|
|
735
764
|
};
|
|
736
765
|
/**
|
|
737
766
|
* Stream file modification events in a directory
|
|
738
|
-
* Streams
|
|
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.
|
|
739
771
|
*/
|
|
740
772
|
export const getWatchFilesystemByPath = (options) => {
|
|
741
773
|
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
|
}
|