@blaxel/core 0.2.70 → 0.2.71-dev.105
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/agents/index.js +2 -19
- package/dist/cjs/common/autoload.js +64 -0
- package/dist/cjs/common/h2fetch.js +207 -0
- package/dist/cjs/common/h2pool.js +137 -0
- package/dist/cjs/common/h2warm.js +54 -0
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/jobs/jobs.js +10 -28
- package/dist/cjs/mcp/server.js +4 -65
- package/dist/cjs/sandbox/action.js +33 -0
- package/dist/cjs/sandbox/drive/drive.js +3 -3
- package/dist/cjs/sandbox/filesystem/filesystem.js +1 -2
- package/dist/cjs/sandbox/interpreter.js +12 -2
- package/dist/cjs/sandbox/process/process.js +2 -2
- package/dist/cjs/sandbox/sandbox.js +84 -10
- package/dist/cjs/tools/index.js +3 -1
- package/dist/cjs/tools/mcpTool.js +15 -43
- package/dist/cjs/types/agents/index.d.ts +1 -2
- package/dist/cjs/types/common/autoload.d.ts +5 -0
- package/dist/cjs/types/common/h2fetch.d.ts +22 -0
- package/dist/cjs/types/common/h2pool.d.ts +38 -0
- package/dist/cjs/types/common/h2warm.d.ts +2 -0
- package/dist/cjs/types/jobs/jobs.d.ts +1 -2
- package/dist/cjs/types/sandbox/action.d.ts +8 -1
- package/dist/cjs/types/sandbox/client/types.gen.d.ts +11 -0
- package/dist/cjs/types/sandbox/interpreter.d.ts +1 -0
- package/dist/cjs/types/sandbox/sandbox.d.ts +6 -0
- package/dist/cjs/types/sandbox/types.d.ts +2 -0
- package/dist/cjs/types/tools/index.d.ts +1 -0
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/agents/index.js +2 -19
- package/dist/cjs-browser/common/autoload.js +64 -0
- package/dist/cjs-browser/common/h2fetch.js +4 -0
- package/dist/cjs-browser/common/h2pool.js +4 -0
- package/dist/cjs-browser/common/h2warm.js +2 -0
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/jobs/jobs.js +10 -28
- package/dist/cjs-browser/mcp/server.js +4 -65
- package/dist/cjs-browser/sandbox/action.js +33 -0
- package/dist/cjs-browser/sandbox/drive/drive.js +3 -3
- package/dist/cjs-browser/sandbox/filesystem/filesystem.js +1 -2
- package/dist/cjs-browser/sandbox/interpreter.js +12 -2
- package/dist/cjs-browser/sandbox/process/process.js +2 -2
- package/dist/cjs-browser/sandbox/sandbox.js +84 -10
- package/dist/cjs-browser/tools/index.js +3 -1
- package/dist/cjs-browser/tools/mcpTool.js +15 -43
- package/dist/cjs-browser/types/agents/index.d.ts +1 -2
- package/dist/cjs-browser/types/common/autoload.d.ts +5 -0
- package/dist/cjs-browser/types/common/h2fetch.d.ts +22 -0
- package/dist/cjs-browser/types/common/h2pool.d.ts +38 -0
- package/dist/cjs-browser/types/common/h2warm.d.ts +2 -0
- package/dist/cjs-browser/types/jobs/jobs.d.ts +1 -2
- package/dist/cjs-browser/types/sandbox/action.d.ts +8 -1
- package/dist/cjs-browser/types/sandbox/client/types.gen.d.ts +11 -0
- package/dist/cjs-browser/types/sandbox/interpreter.d.ts +1 -0
- package/dist/cjs-browser/types/sandbox/sandbox.d.ts +6 -0
- package/dist/cjs-browser/types/sandbox/types.d.ts +2 -0
- package/dist/cjs-browser/types/tools/index.d.ts +1 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/agents/index.js +1 -19
- package/dist/esm/common/autoload.js +30 -0
- package/dist/esm/common/h2fetch.js +202 -0
- package/dist/esm/common/h2pool.js +101 -0
- package/dist/esm/common/h2warm.js +48 -0
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/jobs/jobs.js +9 -28
- package/dist/esm/mcp/server.js +4 -65
- package/dist/esm/sandbox/action.js +33 -0
- package/dist/esm/sandbox/drive/drive.js +3 -3
- package/dist/esm/sandbox/filesystem/filesystem.js +1 -2
- package/dist/esm/sandbox/interpreter.js +12 -2
- package/dist/esm/sandbox/process/process.js +2 -2
- package/dist/esm/sandbox/sandbox.js +51 -10
- package/dist/esm/tools/index.js +1 -0
- package/dist/esm/tools/mcpTool.js +15 -43
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/agents/index.js +1 -19
- package/dist/esm-browser/common/autoload.js +30 -0
- package/dist/esm-browser/common/h2fetch.js +4 -0
- package/dist/esm-browser/common/h2pool.js +4 -0
- package/dist/esm-browser/common/h2warm.js +2 -0
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/jobs/jobs.js +9 -28
- package/dist/esm-browser/mcp/server.js +4 -65
- package/dist/esm-browser/sandbox/action.js +33 -0
- package/dist/esm-browser/sandbox/drive/drive.js +3 -3
- package/dist/esm-browser/sandbox/filesystem/filesystem.js +1 -2
- package/dist/esm-browser/sandbox/interpreter.js +12 -2
- package/dist/esm-browser/sandbox/process/process.js +2 -2
- package/dist/esm-browser/sandbox/sandbox.js +51 -10
- package/dist/esm-browser/tools/index.js +1 -0
- package/dist/esm-browser/tools/mcpTool.js +15 -43
- package/package.json +1 -1
|
@@ -137,9 +137,16 @@ export type ProcessRequest = {
|
|
|
137
137
|
env?: {
|
|
138
138
|
[key: string]: string;
|
|
139
139
|
};
|
|
140
|
+
/**
|
|
141
|
+
* Disable scale-to-zero while process runs. Default timeout is 600s (10 minutes). Set timeout to 0 for infinite.
|
|
142
|
+
*/
|
|
143
|
+
keepAlive?: boolean;
|
|
140
144
|
maxRestarts?: number;
|
|
141
145
|
name?: string;
|
|
142
146
|
restartOnFailure?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Timeout in seconds. When keepAlive is true, defaults to 600s (10 minutes). Set to 0 for infinite (no auto-kill).
|
|
149
|
+
*/
|
|
143
150
|
timeout?: number;
|
|
144
151
|
waitForCompletion?: boolean;
|
|
145
152
|
waitForPorts?: Array<number>;
|
|
@@ -149,6 +156,10 @@ export type ProcessResponse = {
|
|
|
149
156
|
command: string;
|
|
150
157
|
completedAt: string;
|
|
151
158
|
exitCode: number;
|
|
159
|
+
/**
|
|
160
|
+
* Whether scale-to-zero is disabled for this process
|
|
161
|
+
*/
|
|
162
|
+
keepAlive?: boolean;
|
|
152
163
|
logs: string;
|
|
153
164
|
maxRestarts?: number;
|
|
154
165
|
name: string;
|
|
@@ -12,6 +12,7 @@ export declare class CodeInterpreter extends SandboxInstance {
|
|
|
12
12
|
safe?: boolean;
|
|
13
13
|
}): Promise<CodeInterpreter>;
|
|
14
14
|
get _jupyterUrl(): string;
|
|
15
|
+
private _fetch;
|
|
15
16
|
static OutputMessage: {
|
|
16
17
|
new (text: string, timestamp: number | null, isStderr: boolean): {
|
|
17
18
|
text: string;
|
|
@@ -18,12 +18,18 @@ export declare class SandboxInstance {
|
|
|
18
18
|
codegen: SandboxCodegen;
|
|
19
19
|
system: SandboxSystem;
|
|
20
20
|
drives: SandboxDrive;
|
|
21
|
+
h2Session: any;
|
|
21
22
|
constructor(sandbox: SandboxConfiguration);
|
|
22
23
|
get metadata(): import("../client/types.gen.js").Metadata;
|
|
23
24
|
get status(): import("../client/types.gen.js").Status | undefined;
|
|
24
25
|
get events(): import("../client/types.gen.js").CoreEvents | undefined;
|
|
25
26
|
get spec(): import("../client/types.gen.js").SandboxSpec;
|
|
26
27
|
get lastUsedAt(): string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Warm and attach an H2 session based on the sandbox's region.
|
|
30
|
+
* Shared by create(), get(), list(), and update helpers.
|
|
31
|
+
*/
|
|
32
|
+
private static attachH2Session;
|
|
27
33
|
get expiresIn(): number | undefined;
|
|
28
34
|
wait({ maxWait, interval }?: {
|
|
29
35
|
maxWait?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type http2 from "http2";
|
|
1
2
|
import { Port, Sandbox, SandboxLifecycle, VolumeAttachment, SandboxNetwork } from "../client/types.gen";
|
|
2
3
|
import { PostProcessResponse, ProcessRequest } from "./client";
|
|
3
4
|
export interface SessionCreateOptions {
|
|
@@ -24,6 +25,7 @@ export type SandboxConfiguration = {
|
|
|
24
25
|
forceUrl?: string;
|
|
25
26
|
headers?: Record<string, string>;
|
|
26
27
|
params?: Record<string, string>;
|
|
28
|
+
h2Session?: http2.ClientHttp2Session | null;
|
|
27
29
|
} & Sandbox;
|
|
28
30
|
export type SandboxUpdateMetadata = {
|
|
29
31
|
labels?: Record<string, string>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Function } from "../client/client.js";
|
|
2
2
|
import { ToolOptions } from "./mcpTool.js";
|
|
3
3
|
import { Tool } from "./types.js";
|
|
4
|
+
export { McpTool } from "./mcpTool.js";
|
|
4
5
|
export type { ToolOptions };
|
|
5
6
|
export declare const getTool: (name: string, options?: number | ToolOptions) => Promise<Tool[]>;
|
|
6
7
|
export declare class BLTools {
|