@blaxel/core 0.2.49-preview.110 → 0.2.49-preview.112
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 +143 -3
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/sandbox/index.js +1 -0
- package/dist/cjs/sandbox/interpreter.js +400 -0
- package/dist/cjs/tools/mcpTool.js +0 -4
- package/dist/cjs/types/client/sdk.gen.d.ts +41 -1
- package/dist/cjs/types/client/types.gen.d.ts +599 -16
- package/dist/cjs/types/sandbox/index.d.ts +1 -0
- package/dist/cjs/types/sandbox/interpreter.d.ts +71 -0
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/client/sdk.gen.js +143 -3
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/sandbox/index.js +1 -0
- package/dist/cjs-browser/sandbox/interpreter.js +400 -0
- package/dist/cjs-browser/tools/mcpTool.js +0 -4
- package/dist/cjs-browser/types/client/sdk.gen.d.ts +41 -1
- package/dist/cjs-browser/types/client/types.gen.d.ts +599 -16
- package/dist/cjs-browser/types/sandbox/index.d.ts +1 -0
- package/dist/cjs-browser/types/sandbox/interpreter.d.ts +71 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/client/sdk.gen.js +132 -0
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/sandbox/index.js +1 -0
- package/dist/esm/sandbox/interpreter.js +396 -0
- package/dist/esm/tools/mcpTool.js +0 -4
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/client/sdk.gen.js +132 -0
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/sandbox/index.js +1 -0
- package/dist/esm-browser/sandbox/interpreter.js +396 -0
- package/dist/esm-browser/tools/mcpTool.js +0 -4
- package/package.json +2 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Sandbox, SandboxLifecycle, Port } from "../client/types.gen.js";
|
|
2
|
+
import { SandboxInstance } from "./sandbox.js";
|
|
3
|
+
import { SandboxConfiguration, SandboxCreateConfiguration } from "./types.js";
|
|
4
|
+
export declare class CodeInterpreter extends SandboxInstance {
|
|
5
|
+
static readonly DEFAULT_IMAGE = "blaxel/jupyter-server";
|
|
6
|
+
static readonly DEFAULT_PORTS: Port[];
|
|
7
|
+
static readonly DEFAULT_LIFECYCLE: SandboxLifecycle;
|
|
8
|
+
private _sandboxConfig;
|
|
9
|
+
constructor(sandbox: SandboxConfiguration);
|
|
10
|
+
static get(sandboxName: string): Promise<CodeInterpreter>;
|
|
11
|
+
static create(sandbox?: Sandbox | SandboxCreateConfiguration | Record<string, any> | null, { safe }?: {
|
|
12
|
+
safe?: boolean;
|
|
13
|
+
}): Promise<CodeInterpreter>;
|
|
14
|
+
get _jupyterUrl(): string;
|
|
15
|
+
static OutputMessage: {
|
|
16
|
+
new (text: string, timestamp: number | null, isStderr: boolean): {
|
|
17
|
+
text: string;
|
|
18
|
+
timestamp: number | null;
|
|
19
|
+
isStderr: boolean;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
static Result: {
|
|
23
|
+
new (kwargs?: Record<string, unknown>): {
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
static ExecutionError: {
|
|
28
|
+
new (name: string, value: any, traceback: any): {
|
|
29
|
+
name: string;
|
|
30
|
+
value: any;
|
|
31
|
+
traceback: any;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
static Logs: {
|
|
35
|
+
new (): {
|
|
36
|
+
stdout: string[];
|
|
37
|
+
stderr: string[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
static Execution: {
|
|
41
|
+
new (): {
|
|
42
|
+
results: InstanceType<typeof CodeInterpreter.Result>[];
|
|
43
|
+
logs: InstanceType<typeof CodeInterpreter.Logs>;
|
|
44
|
+
error: InstanceType<typeof CodeInterpreter.ExecutionError> | null;
|
|
45
|
+
executionCount: number | null;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
static Context: {
|
|
49
|
+
new (id: string): {
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
fromJson(data: Record<string, any>): InstanceType<typeof CodeInterpreter.Context>;
|
|
53
|
+
};
|
|
54
|
+
private _parseOutput;
|
|
55
|
+
runCode(code: string, options?: {
|
|
56
|
+
language?: string | null;
|
|
57
|
+
context?: InstanceType<typeof CodeInterpreter.Context> | null;
|
|
58
|
+
onStdout?: (msg: InstanceType<typeof CodeInterpreter.OutputMessage>) => void;
|
|
59
|
+
onStderr?: (msg: InstanceType<typeof CodeInterpreter.OutputMessage>) => void;
|
|
60
|
+
onResult?: (result: InstanceType<typeof CodeInterpreter.Result>) => void;
|
|
61
|
+
onError?: (error: InstanceType<typeof CodeInterpreter.ExecutionError>) => void;
|
|
62
|
+
envs?: Record<string, string> | null;
|
|
63
|
+
timeout?: number | null;
|
|
64
|
+
requestTimeout?: number | null;
|
|
65
|
+
}): Promise<InstanceType<typeof CodeInterpreter.Execution>>;
|
|
66
|
+
createCodeContext(options?: {
|
|
67
|
+
cwd?: string | null;
|
|
68
|
+
language?: string | null;
|
|
69
|
+
requestTimeout?: number | null;
|
|
70
|
+
}): Promise<InstanceType<typeof CodeInterpreter.Context>>;
|
|
71
|
+
}
|