@daytonaio/sdk 0.171.0-alpha.9 → 0.171.0
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/package.json +8 -47
- package/{cjs → src}/CodeInterpreter.d.ts +0 -1
- package/src/CodeInterpreter.js.map +1 -0
- package/{cjs → src}/ComputerUse.d.ts +0 -1
- package/src/ComputerUse.js.map +1 -0
- package/{cjs → src}/Daytona.d.ts +0 -1
- package/{cjs → src}/Daytona.js +17 -19
- package/src/Daytona.js.map +1 -0
- package/{esm → src}/FileSystem.d.ts +0 -1
- package/src/FileSystem.js.map +1 -0
- package/{esm → src}/Git.d.ts +0 -1
- package/src/Git.js.map +1 -0
- package/{cjs → src}/Image.d.ts +0 -1
- package/src/Image.js.map +1 -0
- package/{esm → src}/LspServer.d.ts +0 -1
- package/src/LspServer.js.map +1 -0
- package/{cjs → src}/ObjectStorage.d.ts +0 -1
- package/src/ObjectStorage.js.map +1 -0
- package/{cjs → src}/Process.d.ts +0 -1
- package/src/Process.js.map +1 -0
- package/{cjs → src}/PtyHandle.d.ts +0 -1
- package/src/PtyHandle.js.map +1 -0
- package/{cjs → src}/Sandbox.d.ts +0 -1
- package/src/Sandbox.js.map +1 -0
- package/{cjs → src}/Snapshot.d.ts +0 -1
- package/src/Snapshot.js.map +1 -0
- package/{esm → src}/Volume.d.ts +0 -1
- package/src/Volume.js.map +1 -0
- package/src/__tests__/helpers.d.ts +5 -0
- package/src/__tests__/helpers.js +26 -0
- package/src/__tests__/helpers.js.map +1 -0
- package/{esm → src}/errors/DaytonaError.d.ts +0 -1
- package/src/errors/DaytonaError.js.map +1 -0
- package/{cjs → src}/index.d.ts +0 -1
- package/src/index.js.map +1 -0
- package/{esm → src}/types/Charts.d.ts +0 -1
- package/src/types/Charts.js.map +1 -0
- package/{esm → src}/types/CodeInterpreter.d.ts +0 -1
- package/src/types/CodeInterpreter.js.map +1 -0
- package/{cjs → src}/types/ExecuteResponse.d.ts +0 -1
- package/src/types/ExecuteResponse.js.map +1 -0
- package/{cjs → src}/types/Pty.d.ts +0 -1
- package/src/types/Pty.js.map +1 -0
- package/{esm → src}/utils/Binary.d.ts +0 -1
- package/src/utils/Binary.js.map +1 -0
- package/{cjs → src}/utils/FileTransfer.d.ts +0 -1
- package/src/utils/FileTransfer.js.map +1 -0
- package/src/utils/Import.d.ts +97 -0
- package/{cjs → src}/utils/Import.js +11 -41
- package/src/utils/Import.js.map +1 -0
- package/{esm → src}/utils/Multipart.d.ts +0 -1
- package/src/utils/Multipart.js.map +1 -0
- package/{esm → src}/utils/Runtime.d.ts +0 -1
- package/src/utils/Runtime.js.map +1 -0
- package/{cjs → src}/utils/Stream.d.ts +0 -1
- package/src/utils/Stream.js.map +1 -0
- package/{esm → src}/utils/WebSocket.d.ts +0 -1
- package/src/utils/WebSocket.js.map +1 -0
- package/{esm → src}/utils/otel.decorator.d.ts +0 -1
- package/src/utils/otel.decorator.js.map +1 -0
- package/LICENSE +0 -190
- package/cjs/CodeInterpreter.js.map +0 -1
- package/cjs/ComputerUse.js.map +0 -1
- package/cjs/Daytona.js.map +0 -1
- package/cjs/FileSystem.d.ts +0 -371
- package/cjs/FileSystem.js.map +0 -1
- package/cjs/Git.d.ts +0 -203
- package/cjs/Git.js.map +0 -1
- package/cjs/Image.js.map +0 -1
- package/cjs/LspServer.d.ts +0 -172
- package/cjs/LspServer.js.map +0 -1
- package/cjs/ObjectStorage.js.map +0 -1
- package/cjs/Process.js.map +0 -1
- package/cjs/PtyHandle.js.map +0 -1
- package/cjs/README.md +0 -180
- package/cjs/Sandbox.js.map +0 -1
- package/cjs/Snapshot.js.map +0 -1
- package/cjs/Volume.d.ts +0 -84
- package/cjs/Volume.js.map +0 -1
- package/cjs/errors/DaytonaError.d.ts +0 -171
- package/cjs/errors/DaytonaError.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/package.json +0 -3
- package/cjs/types/Charts.d.ts +0 -38
- package/cjs/types/Charts.js.map +0 -1
- package/cjs/types/CodeInterpreter.d.ts +0 -77
- package/cjs/types/CodeInterpreter.js.map +0 -1
- package/cjs/types/ExecuteResponse.js.map +0 -1
- package/cjs/types/Pty.js.map +0 -1
- package/cjs/utils/Binary.d.ts +0 -39
- package/cjs/utils/Binary.js.map +0 -1
- package/cjs/utils/FileTransfer.js.map +0 -1
- package/cjs/utils/Import.d.ts +0 -38
- package/cjs/utils/Import.js.map +0 -1
- package/cjs/utils/Multipart.d.ts +0 -29
- package/cjs/utils/Multipart.js.map +0 -1
- package/cjs/utils/Runtime.d.ts +0 -44
- package/cjs/utils/Runtime.js.map +0 -1
- package/cjs/utils/Stream.js.map +0 -1
- package/cjs/utils/WebSocket.d.ts +0 -10
- package/cjs/utils/WebSocket.js.map +0 -1
- package/cjs/utils/otel.decorator.d.ts +0 -83
- package/cjs/utils/otel.decorator.js.map +0 -1
- package/esm/CodeInterpreter.d.ts +0 -95
- package/esm/CodeInterpreter.js +0 -292
- package/esm/CodeInterpreter.js.map +0 -1
- package/esm/ComputerUse.d.ts +0 -539
- package/esm/ComputerUse.js +0 -799
- package/esm/ComputerUse.js.map +0 -1
- package/esm/Daytona.d.ts +0 -355
- package/esm/Daytona.js +0 -525
- package/esm/Daytona.js.map +0 -1
- package/esm/FileSystem.js +0 -485
- package/esm/FileSystem.js.map +0 -1
- package/esm/Git.js +0 -322
- package/esm/Git.js.map +0 -1
- package/esm/Image.d.ts +0 -265
- package/esm/Image.js +0 -581
- package/esm/Image.js.map +0 -1
- package/esm/LspServer.js +0 -255
- package/esm/LspServer.js.map +0 -1
- package/esm/ObjectStorage.d.ts +0 -79
- package/esm/ObjectStorage.js +0 -195
- package/esm/ObjectStorage.js.map +0 -1
- package/esm/Process.d.ts +0 -490
- package/esm/Process.js +0 -642
- package/esm/Process.js.map +0 -1
- package/esm/PtyHandle.d.ts +0 -155
- package/esm/PtyHandle.js +0 -412
- package/esm/PtyHandle.js.map +0 -1
- package/esm/README.md +0 -180
- package/esm/Sandbox.d.ts +0 -476
- package/esm/Sandbox.js +0 -901
- package/esm/Sandbox.js.map +0 -1
- package/esm/Snapshot.d.ts +0 -140
- package/esm/Snapshot.js +0 -244
- package/esm/Snapshot.js.map +0 -1
- package/esm/Volume.js +0 -115
- package/esm/Volume.js.map +0 -1
- package/esm/errors/DaytonaError.js +0 -243
- package/esm/errors/DaytonaError.js.map +0 -1
- package/esm/index.d.ts +0 -22
- package/esm/index.js +0 -21
- package/esm/index.js.map +0 -1
- package/esm/package.json +0 -3
- package/esm/types/Charts.js +0 -33
- package/esm/types/Charts.js.map +0 -1
- package/esm/types/CodeInterpreter.js +0 -6
- package/esm/types/CodeInterpreter.js.map +0 -1
- package/esm/types/ExecuteResponse.d.ts +0 -26
- package/esm/types/ExecuteResponse.js +0 -6
- package/esm/types/ExecuteResponse.js.map +0 -1
- package/esm/types/Pty.d.ts +0 -48
- package/esm/types/Pty.js +0 -6
- package/esm/types/Pty.js.map +0 -1
- package/esm/utils/Binary.js +0 -157
- package/esm/utils/Binary.js.map +0 -1
- package/esm/utils/FileTransfer.d.ts +0 -15
- package/esm/utils/FileTransfer.js +0 -254
- package/esm/utils/FileTransfer.js.map +0 -1
- package/esm/utils/Import.d.ts +0 -38
- package/esm/utils/Import.js +0 -106
- package/esm/utils/Import.js.map +0 -1
- package/esm/utils/Multipart.js +0 -109
- package/esm/utils/Multipart.js.map +0 -1
- package/esm/utils/Runtime.js +0 -89
- package/esm/utils/Runtime.js.map +0 -1
- package/esm/utils/Stream.d.ts +0 -20
- package/esm/utils/Stream.js +0 -360
- package/esm/utils/Stream.js.map +0 -1
- package/esm/utils/WebSocket.js +0 -22
- package/esm/utils/WebSocket.js.map +0 -1
- package/esm/utils/otel.decorator.js +0 -136
- package/esm/utils/otel.decorator.js.map +0 -1
- /package/{cjs → src}/CodeInterpreter.js +0 -0
- /package/{cjs → src}/ComputerUse.js +0 -0
- /package/{cjs → src}/FileSystem.js +0 -0
- /package/{cjs → src}/Git.js +0 -0
- /package/{cjs → src}/Image.js +0 -0
- /package/{cjs → src}/LspServer.js +0 -0
- /package/{cjs → src}/ObjectStorage.js +0 -0
- /package/{cjs → src}/Process.js +0 -0
- /package/{cjs → src}/PtyHandle.js +0 -0
- /package/{cjs → src}/Sandbox.js +0 -0
- /package/{cjs → src}/Snapshot.js +0 -0
- /package/{cjs → src}/Volume.js +0 -0
- /package/{cjs → src}/errors/DaytonaError.js +0 -0
- /package/{cjs → src}/index.js +0 -0
- /package/{cjs → src}/types/Charts.js +0 -0
- /package/{cjs → src}/types/CodeInterpreter.js +0 -0
- /package/{cjs → src}/types/ExecuteResponse.js +0 -0
- /package/{cjs → src}/types/Pty.js +0 -0
- /package/{cjs → src}/utils/Binary.js +0 -0
- /package/{cjs → src}/utils/FileTransfer.js +0 -0
- /package/{cjs → src}/utils/Multipart.js +0 -0
- /package/{cjs → src}/utils/Runtime.js +0 -0
- /package/{cjs → src}/utils/Stream.js +0 -0
- /package/{cjs → src}/utils/WebSocket.js +0 -0
- /package/{cjs → src}/utils/otel.decorator.js +0 -0
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration options for span instrumentation
|
|
3
|
-
*/
|
|
4
|
-
export interface SpanConfig {
|
|
5
|
-
/**
|
|
6
|
-
* Custom name for the span. If not provided, uses `ClassName.methodName` format
|
|
7
|
-
*/
|
|
8
|
-
name?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Additional attributes to attach to the span
|
|
11
|
-
*/
|
|
12
|
-
attributes?: Record<string, string>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Configuration options for metric instrumentation
|
|
16
|
-
*/
|
|
17
|
-
export interface MetricConfig {
|
|
18
|
-
/**
|
|
19
|
-
* Custom name for the metric. If not provided, uses `ClassName.methodName` format
|
|
20
|
-
*/
|
|
21
|
-
name?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Description for the metrics being collected
|
|
24
|
-
*/
|
|
25
|
-
description?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Additional labels to attach to the metrics
|
|
28
|
-
*/
|
|
29
|
-
labels?: Record<string, string>;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Configuration options for the combined instrumentation decorator
|
|
33
|
-
*/
|
|
34
|
-
export interface InstrumentationConfig {
|
|
35
|
-
/**
|
|
36
|
-
* Custom name for the span and metric. If not provided, uses `ClassName.methodName` format
|
|
37
|
-
*/
|
|
38
|
-
name?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Description for the metrics being collected
|
|
41
|
-
*/
|
|
42
|
-
description?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Additional labels/attributes to attach to spans and metrics
|
|
45
|
-
*/
|
|
46
|
-
labels?: Record<string, string>;
|
|
47
|
-
/**
|
|
48
|
-
* Enable trace collection (default: true)
|
|
49
|
-
*/
|
|
50
|
-
enableTraces?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Enable metrics collection (default: true)
|
|
53
|
-
*/
|
|
54
|
-
enableMetrics?: boolean;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Decorator for instrumenting methods with OpenTelemetry spans (traces only)
|
|
58
|
-
*
|
|
59
|
-
* @param config - Configuration object or string name for the span
|
|
60
|
-
*
|
|
61
|
-
*/
|
|
62
|
-
export declare function WithSpan(config?: string | SpanConfig): (target: object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => void;
|
|
63
|
-
/**
|
|
64
|
-
* Decorator for instrumenting methods with OpenTelemetry metrics (metrics only)
|
|
65
|
-
*
|
|
66
|
-
* Collects two metrics:
|
|
67
|
-
* - Counter: `{name}_executions` - tracks number of executions with status (success/error)
|
|
68
|
-
* - Histogram: `{name}_duration` - tracks execution duration in milliseconds
|
|
69
|
-
*
|
|
70
|
-
* @param config - Configuration object or string name for the metric
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
export declare function WithMetric(config?: string | MetricConfig): (target: object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => void;
|
|
74
|
-
/**
|
|
75
|
-
* Decorator for instrumenting methods with both OpenTelemetry traces and metrics
|
|
76
|
-
*
|
|
77
|
-
* This decorator composes @WithSpan and @WithMetric to provide both trace and metric collection.
|
|
78
|
-
* You can selectively enable/disable traces or metrics using the config options.
|
|
79
|
-
*
|
|
80
|
-
* @param config - Configuration object or string name for the instrumentation
|
|
81
|
-
*/
|
|
82
|
-
export declare function WithInstrumentation(config?: string | InstrumentationConfig): MethodDecorator;
|
|
83
|
-
//# sourceMappingURL=otel.decorator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"otel.decorator.js","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/utils/otel.decorator.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAqFH,4BA2CC;AAYD,gCA8CC;AAUD,kDAiBC;AAnND,4CAAuF;AAEvF,2EAA2E;AAC3E,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,WAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;AAC3C,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,aAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;AAE3C,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAqB,CAAA;AA4DxD;;GAEG;AACH,SAAS,WAAW,CAAC,GAAW;IAC9B,OAAO,GAAG;SACP,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;SAC1B,WAAW,EAAE;SACb,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;SACjB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AACxB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,MAA4B;IACnD,OAAO,CAAC,MAAc,EAAE,WAA4B,EAAE,UAA8B,EAAE,EAAE;QACtF,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAA;QACvC,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;QAEtC,UAAU,CAAC,K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,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IACzD,CAAC;IAED,IAAI,aAAa,EAAE,CAAC;QAClB,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IAC5D,CAAC;IAED,OAAO,CAAC,MAAc,EAAE,WAA4B,EAAE,UAA8B,EAAE,EAAE;QACtF,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAA;IAC/E,CAAC,CAAA;AACH,CAAC"}
|
package/esm/CodeInterpreter.d.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { InterpreterApi, InterpreterContext } from '@daytona/toolbox-api-client';
|
|
2
|
-
import { Configuration } from '@daytona/api-client';
|
|
3
|
-
import { ExecutionResult, RunCodeOptions } from './types/CodeInterpreter.js';
|
|
4
|
-
/**
|
|
5
|
-
* Handles Python code interpretation and execution within a Sandbox.
|
|
6
|
-
*
|
|
7
|
-
* Provides methods to execute code (currently only Python) in isolated interpreter contexts,
|
|
8
|
-
* manage contexts, and stream execution output via callbacks.
|
|
9
|
-
*
|
|
10
|
-
* For other languages, use the `codeRun` method from the `Process` interface, or execute the appropriate command directly in the sandbox terminal.
|
|
11
|
-
*/
|
|
12
|
-
export declare class CodeInterpreter {
|
|
13
|
-
private readonly clientConfig;
|
|
14
|
-
private readonly apiClient;
|
|
15
|
-
private readonly getPreviewToken;
|
|
16
|
-
constructor(clientConfig: Configuration, apiClient: InterpreterApi, getPreviewToken: () => Promise<string>);
|
|
17
|
-
/**
|
|
18
|
-
* Run Python code in the sandbox.
|
|
19
|
-
*
|
|
20
|
-
* @param {string} code - Code to run.
|
|
21
|
-
* @param {RunCodeOptions} options - Execution options (context, envs, callbacks, timeout).
|
|
22
|
-
* @returns {Promise<ExecutionResult>} ExecutionResult containing stdout, stderr and optional error info.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const handleStdout = (msg: OutputMessage) => process.stdout.write(`STDOUT: ${msg.output}`)
|
|
27
|
-
* const handleStderr = (msg: OutputMessage) => process.stdout.write(`STDERR: ${msg.output}`)
|
|
28
|
-
* const handleError = (err: ExecutionError) =>
|
|
29
|
-
* console.error(`ERROR: ${err.name}: ${err.value}\n${err.traceback ?? ''}`)
|
|
30
|
-
*
|
|
31
|
-
* const code = `
|
|
32
|
-
* import sys
|
|
33
|
-
* import time
|
|
34
|
-
* for i in range(5):
|
|
35
|
-
* print(i)
|
|
36
|
-
* time.sleep(1)
|
|
37
|
-
* sys.stderr.write("Counting done!")
|
|
38
|
-
* `
|
|
39
|
-
*
|
|
40
|
-
* const result = await codeInterpreter.runCode(code, {
|
|
41
|
-
* onStdout: handleStdout,
|
|
42
|
-
* onStderr: handleStderr,
|
|
43
|
-
* onError: handleError,
|
|
44
|
-
* timeout: 10,
|
|
45
|
-
* })
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
runCode(code: string, options?: RunCodeOptions): Promise<ExecutionResult>;
|
|
49
|
-
/**
|
|
50
|
-
* Create a new isolated interpreter context.
|
|
51
|
-
*
|
|
52
|
-
* @param {string} [cwd] - Working directory for the context. Uses sandbox working directory if omitted.
|
|
53
|
-
*
|
|
54
|
-
* @returns {Promise<InterpreterContext>} The created context.
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```ts
|
|
58
|
-
* const ctx = await sandbox.codeInterpreter.createContext()
|
|
59
|
-
* await sandbox.codeInterpreter.runCode('x = 10', { context: ctx })
|
|
60
|
-
* await sandbox.codeInterpreter.deleteContext(ctx.id!)
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
createContext(cwd?: string): Promise<InterpreterContext>;
|
|
64
|
-
/**
|
|
65
|
-
* List all user-created interpreter contexts (default context is excluded).
|
|
66
|
-
*
|
|
67
|
-
* @returns {Promise<InterpreterContext[]>} List of contexts.
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```ts
|
|
71
|
-
* const contexts = await sandbox.codeInterpreter.listContexts()
|
|
72
|
-
* for (const ctx of contexts) {
|
|
73
|
-
* console.log(ctx.id, ctx.language, ctx.cwd)
|
|
74
|
-
* }
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
listContexts(): Promise<InterpreterContext[]>;
|
|
78
|
-
/**
|
|
79
|
-
* Delete an interpreter context and shut down its worker process.
|
|
80
|
-
*
|
|
81
|
-
* @param {InterpreterContext} context - Context to delete.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```ts
|
|
85
|
-
* const ctx = await sandbox.codeInterpreter.createContext()
|
|
86
|
-
* // ... use context ...
|
|
87
|
-
* await sandbox.codeInterpreter.deleteContext(ctx)
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
deleteContext(context: InterpreterContext): Promise<void>;
|
|
91
|
-
private extractMessageText;
|
|
92
|
-
private normalizeCloseEvent;
|
|
93
|
-
private createCloseError;
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=CodeInterpreter.d.ts.map
|
package/esm/CodeInterpreter.js
DELETED
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Daytona Platforms Inc.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module code-interpreter
|
|
7
|
-
*/
|
|
8
|
-
import WebSocket from 'isomorphic-ws';
|
|
9
|
-
import { DaytonaConnectionError, DaytonaError, DaytonaTimeoutError, DaytonaValidationError, } from './errors/DaytonaError.js';
|
|
10
|
-
import { createSandboxWebSocket } from './utils/WebSocket.js';
|
|
11
|
-
const WEBSOCKET_TIMEOUT_CODE = 4008;
|
|
12
|
-
/**
|
|
13
|
-
* Handles Python code interpretation and execution within a Sandbox.
|
|
14
|
-
*
|
|
15
|
-
* Provides methods to execute code (currently only Python) in isolated interpreter contexts,
|
|
16
|
-
* manage contexts, and stream execution output via callbacks.
|
|
17
|
-
*
|
|
18
|
-
* For other languages, use the `codeRun` method from the `Process` interface, or execute the appropriate command directly in the sandbox terminal.
|
|
19
|
-
*/
|
|
20
|
-
export class CodeInterpreter {
|
|
21
|
-
clientConfig;
|
|
22
|
-
apiClient;
|
|
23
|
-
getPreviewToken;
|
|
24
|
-
constructor(clientConfig, apiClient, getPreviewToken) {
|
|
25
|
-
this.clientConfig = clientConfig;
|
|
26
|
-
this.apiClient = apiClient;
|
|
27
|
-
this.getPreviewToken = getPreviewToken;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Run Python code in the sandbox.
|
|
31
|
-
*
|
|
32
|
-
* @param {string} code - Code to run.
|
|
33
|
-
* @param {RunCodeOptions} options - Execution options (context, envs, callbacks, timeout).
|
|
34
|
-
* @returns {Promise<ExecutionResult>} ExecutionResult containing stdout, stderr and optional error info.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const handleStdout = (msg: OutputMessage) => process.stdout.write(`STDOUT: ${msg.output}`)
|
|
39
|
-
* const handleStderr = (msg: OutputMessage) => process.stdout.write(`STDERR: ${msg.output}`)
|
|
40
|
-
* const handleError = (err: ExecutionError) =>
|
|
41
|
-
* console.error(`ERROR: ${err.name}: ${err.value}\n${err.traceback ?? ''}`)
|
|
42
|
-
*
|
|
43
|
-
* const code = `
|
|
44
|
-
* import sys
|
|
45
|
-
* import time
|
|
46
|
-
* for i in range(5):
|
|
47
|
-
* print(i)
|
|
48
|
-
* time.sleep(1)
|
|
49
|
-
* sys.stderr.write("Counting done!")
|
|
50
|
-
* `
|
|
51
|
-
*
|
|
52
|
-
* const result = await codeInterpreter.runCode(code, {
|
|
53
|
-
* onStdout: handleStdout,
|
|
54
|
-
* onStderr: handleStderr,
|
|
55
|
-
* onError: handleError,
|
|
56
|
-
* timeout: 10,
|
|
57
|
-
* })
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
async runCode(code, options = {}) {
|
|
61
|
-
if (!code || !code.trim()) {
|
|
62
|
-
throw new DaytonaValidationError('Code is required for execution');
|
|
63
|
-
}
|
|
64
|
-
const url = `${this.clientConfig.basePath.replace(/^http/, 'ws')}/process/interpreter/execute`;
|
|
65
|
-
const ws = await createSandboxWebSocket(url, this.clientConfig.baseOptions?.headers || {}, this.getPreviewToken);
|
|
66
|
-
const result = { stdout: '', stderr: '' };
|
|
67
|
-
return new Promise((resolve, reject) => {
|
|
68
|
-
let settled = false;
|
|
69
|
-
const cleanup = () => {
|
|
70
|
-
detach();
|
|
71
|
-
try {
|
|
72
|
-
if (ws.readyState === WebSocket.OPEN || ws.readyState === WebSocket.CONNECTING) {
|
|
73
|
-
ws.close();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
catch {
|
|
77
|
-
/* ignore */
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
const fail = (error) => {
|
|
81
|
-
if (settled)
|
|
82
|
-
return;
|
|
83
|
-
settled = true;
|
|
84
|
-
cleanup();
|
|
85
|
-
reject(error);
|
|
86
|
-
};
|
|
87
|
-
const succeed = () => {
|
|
88
|
-
if (settled)
|
|
89
|
-
return;
|
|
90
|
-
settled = true;
|
|
91
|
-
cleanup();
|
|
92
|
-
resolve(result);
|
|
93
|
-
};
|
|
94
|
-
const handleOpen = () => {
|
|
95
|
-
const payload = { code };
|
|
96
|
-
const context = options.context;
|
|
97
|
-
if (context?.id) {
|
|
98
|
-
payload.contextId = context.id;
|
|
99
|
-
}
|
|
100
|
-
if (options.envs) {
|
|
101
|
-
payload.envs = options.envs;
|
|
102
|
-
}
|
|
103
|
-
payload.timeout = options.timeout;
|
|
104
|
-
ws.send(JSON.stringify(payload));
|
|
105
|
-
};
|
|
106
|
-
const handleMessage = async (event) => {
|
|
107
|
-
try {
|
|
108
|
-
const text = await this.extractMessageText(event);
|
|
109
|
-
if (!text) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
const chunk = JSON.parse(text);
|
|
113
|
-
const chunkType = chunk.type;
|
|
114
|
-
if (chunkType === 'stdout') {
|
|
115
|
-
const stdout = chunk.text ?? '';
|
|
116
|
-
result.stdout += stdout;
|
|
117
|
-
if (options.onStdout) {
|
|
118
|
-
await options.onStdout({ output: stdout });
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
else if (chunkType === 'stderr') {
|
|
122
|
-
const stderr = chunk.text ?? '';
|
|
123
|
-
result.stderr += stderr;
|
|
124
|
-
if (options.onStderr) {
|
|
125
|
-
await options.onStderr({ output: stderr });
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
else if (chunkType === 'error') {
|
|
129
|
-
const error = {
|
|
130
|
-
name: chunk.name ?? '',
|
|
131
|
-
value: chunk.value ?? '',
|
|
132
|
-
traceback: chunk.traceback ?? '',
|
|
133
|
-
};
|
|
134
|
-
result.error = error;
|
|
135
|
-
if (options.onError) {
|
|
136
|
-
await options.onError(error);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
else if (chunkType === 'control') {
|
|
140
|
-
const controlText = chunk.text ?? '';
|
|
141
|
-
if (controlText === 'completed' || controlText === 'interrupted') {
|
|
142
|
-
succeed();
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
catch {
|
|
147
|
-
// Ignore invalid JSON payloads
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
const handleClose = (event, reason) => {
|
|
151
|
-
if (settled)
|
|
152
|
-
return;
|
|
153
|
-
const { code, message } = this.normalizeCloseEvent(event, reason);
|
|
154
|
-
if (code !== 1000 && code !== 1001) {
|
|
155
|
-
fail(this.createCloseError(code, message));
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
succeed();
|
|
159
|
-
};
|
|
160
|
-
const handleError = (error) => {
|
|
161
|
-
fail(new DaytonaConnectionError(`Failed to execute code: ${error.message ?? String(error)}`));
|
|
162
|
-
};
|
|
163
|
-
const detach = () => {
|
|
164
|
-
if ('removeEventListener' in ws) {
|
|
165
|
-
ws.removeEventListener('open', handleOpen);
|
|
166
|
-
ws.removeEventListener('message', handleMessage);
|
|
167
|
-
ws.removeEventListener('close', handleClose);
|
|
168
|
-
ws.removeEventListener('error', handleError);
|
|
169
|
-
}
|
|
170
|
-
if ('off' in ws) {
|
|
171
|
-
;
|
|
172
|
-
ws.off('open', handleOpen);
|
|
173
|
-
ws.off('message', handleMessage);
|
|
174
|
-
ws.off('close', handleClose);
|
|
175
|
-
ws.off('error', handleError);
|
|
176
|
-
}
|
|
177
|
-
else if ('removeListener' in ws) {
|
|
178
|
-
;
|
|
179
|
-
ws.removeListener('open', handleOpen);
|
|
180
|
-
ws.removeListener('message', handleMessage);
|
|
181
|
-
ws.removeListener('close', handleClose);
|
|
182
|
-
ws.removeListener('error', handleError);
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
if ('addEventListener' in ws) {
|
|
186
|
-
ws.addEventListener('open', handleOpen);
|
|
187
|
-
ws.addEventListener('message', handleMessage);
|
|
188
|
-
ws.addEventListener('close', handleClose);
|
|
189
|
-
ws.addEventListener('error', handleError);
|
|
190
|
-
}
|
|
191
|
-
else if ('on' in ws) {
|
|
192
|
-
;
|
|
193
|
-
ws.on('open', handleOpen);
|
|
194
|
-
ws.on('message', handleMessage);
|
|
195
|
-
ws.on('close', handleClose);
|
|
196
|
-
ws.on('error', handleError);
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
throw new DaytonaError('Unsupported WebSocket implementation');
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Create a new isolated interpreter context.
|
|
205
|
-
*
|
|
206
|
-
* @param {string} [cwd] - Working directory for the context. Uses sandbox working directory if omitted.
|
|
207
|
-
*
|
|
208
|
-
* @returns {Promise<InterpreterContext>} The created context.
|
|
209
|
-
*
|
|
210
|
-
* @example
|
|
211
|
-
* ```ts
|
|
212
|
-
* const ctx = await sandbox.codeInterpreter.createContext()
|
|
213
|
-
* await sandbox.codeInterpreter.runCode('x = 10', { context: ctx })
|
|
214
|
-
* await sandbox.codeInterpreter.deleteContext(ctx.id!)
|
|
215
|
-
* ```
|
|
216
|
-
*/
|
|
217
|
-
async createContext(cwd) {
|
|
218
|
-
return (await this.apiClient.createInterpreterContext({ cwd })).data;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* List all user-created interpreter contexts (default context is excluded).
|
|
222
|
-
*
|
|
223
|
-
* @returns {Promise<InterpreterContext[]>} List of contexts.
|
|
224
|
-
*
|
|
225
|
-
* @example
|
|
226
|
-
* ```ts
|
|
227
|
-
* const contexts = await sandbox.codeInterpreter.listContexts()
|
|
228
|
-
* for (const ctx of contexts) {
|
|
229
|
-
* console.log(ctx.id, ctx.language, ctx.cwd)
|
|
230
|
-
* }
|
|
231
|
-
* ```
|
|
232
|
-
*/
|
|
233
|
-
async listContexts() {
|
|
234
|
-
return (await this.apiClient.listInterpreterContexts()).data.contexts ?? [];
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* Delete an interpreter context and shut down its worker process.
|
|
238
|
-
*
|
|
239
|
-
* @param {InterpreterContext} context - Context to delete.
|
|
240
|
-
*
|
|
241
|
-
* @example
|
|
242
|
-
* ```ts
|
|
243
|
-
* const ctx = await sandbox.codeInterpreter.createContext()
|
|
244
|
-
* // ... use context ...
|
|
245
|
-
* await sandbox.codeInterpreter.deleteContext(ctx)
|
|
246
|
-
* ```
|
|
247
|
-
*/
|
|
248
|
-
async deleteContext(context) {
|
|
249
|
-
await this.apiClient.deleteInterpreterContext(context.id);
|
|
250
|
-
}
|
|
251
|
-
async extractMessageText(event) {
|
|
252
|
-
const data = event && typeof event === 'object' && 'data' in event ? event.data : event;
|
|
253
|
-
if (typeof data === 'string') {
|
|
254
|
-
return data;
|
|
255
|
-
}
|
|
256
|
-
if (typeof ArrayBuffer !== 'undefined' && data instanceof ArrayBuffer) {
|
|
257
|
-
return new TextDecoder('utf-8').decode(new Uint8Array(data));
|
|
258
|
-
}
|
|
259
|
-
if (typeof Blob !== 'undefined' && data instanceof Blob) {
|
|
260
|
-
return await data.text();
|
|
261
|
-
}
|
|
262
|
-
if (ArrayBuffer.isView(data)) {
|
|
263
|
-
return new TextDecoder('utf-8').decode(new Uint8Array(data.buffer, data.byteOffset, data.byteLength));
|
|
264
|
-
}
|
|
265
|
-
if (data == null) {
|
|
266
|
-
return '';
|
|
267
|
-
}
|
|
268
|
-
return data.toString();
|
|
269
|
-
}
|
|
270
|
-
normalizeCloseEvent(event, reason) {
|
|
271
|
-
if (typeof event === 'number') {
|
|
272
|
-
return {
|
|
273
|
-
code: event,
|
|
274
|
-
message: reason ? reason.toString('utf-8') : '',
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
return {
|
|
278
|
-
code: event.code,
|
|
279
|
-
message: event.reason,
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
createCloseError(code, message) {
|
|
283
|
-
if (code === WEBSOCKET_TIMEOUT_CODE) {
|
|
284
|
-
return new DaytonaTimeoutError('Execution timed out: operation exceeded the configured `timeout`. Provide a larger value if needed.');
|
|
285
|
-
}
|
|
286
|
-
if (message) {
|
|
287
|
-
return new DaytonaConnectionError(message + ` (close code ${code})`);
|
|
288
|
-
}
|
|
289
|
-
return new DaytonaConnectionError(`Code execution failed: WebSocket closed with code ${code}`);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
//# sourceMappingURL=CodeInterpreter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInterpreter.js","sourceRoot":"","sources":["../../../../../libs/sdk-typescript/src/CodeInterpreter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,SAAS,MAA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