langsmith 0.6.3 → 0.7.1
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/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{experimental/sandbox → sandbox}/client.cjs +14 -60
- package/dist/{experimental/sandbox → sandbox}/client.d.ts +12 -29
- package/dist/{experimental/sandbox → sandbox}/client.js +14 -60
- package/dist/{experimental/sandbox → sandbox}/index.cjs +1 -1
- package/dist/{experimental/sandbox → sandbox}/index.d.ts +1 -1
- package/dist/{experimental/sandbox → sandbox}/index.js +1 -1
- package/dist/{experimental/sandbox → sandbox}/sandbox.cjs +0 -2
- package/dist/{experimental/sandbox → sandbox}/sandbox.d.ts +0 -2
- package/dist/{experimental/sandbox → sandbox}/sandbox.js +0 -2
- package/dist/{experimental/sandbox → sandbox}/types.d.ts +2 -2
- package/experimental/sandbox.cjs +1 -1
- package/experimental/sandbox.d.cts +1 -1
- package/experimental/sandbox.d.ts +1 -1
- package/experimental/sandbox.js +1 -1
- package/package.json +17 -4
- package/sandbox.cjs +1 -0
- package/sandbox.d.cts +1 -0
- package/sandbox.d.ts +1 -0
- package/sandbox.js +1 -0
- /package/dist/{experimental/sandbox → sandbox}/command_handle.cjs +0 -0
- /package/dist/{experimental/sandbox → sandbox}/command_handle.d.ts +0 -0
- /package/dist/{experimental/sandbox → sandbox}/command_handle.js +0 -0
- /package/dist/{experimental/sandbox → sandbox}/errors.cjs +0 -0
- /package/dist/{experimental/sandbox → sandbox}/errors.d.ts +0 -0
- /package/dist/{experimental/sandbox → sandbox}/errors.js +0 -0
- /package/dist/{experimental/sandbox → sandbox}/helpers.cjs +0 -0
- /package/dist/{experimental/sandbox → sandbox}/helpers.d.ts +0 -0
- /package/dist/{experimental/sandbox → sandbox}/helpers.js +0 -0
- /package/dist/{experimental/sandbox → sandbox}/types.cjs +0 -0
- /package/dist/{experimental/sandbox → sandbox}/types.js +0 -0
- /package/dist/{experimental/sandbox → sandbox}/ws_execute.cjs +0 -0
- /package/dist/{experimental/sandbox → sandbox}/ws_execute.d.ts +0 -0
- /package/dist/{experimental/sandbox → sandbox}/ws_execute.js +0 -0
package/dist/index.cjs
CHANGED
|
@@ -18,4 +18,4 @@ Object.defineProperty(exports, "PromptCache", { enumerable: true, get: function
|
|
|
18
18
|
Object.defineProperty(exports, "configureGlobalPromptCache", { enumerable: true, get: function () { return index_js_1.configureGlobalPromptCache; } });
|
|
19
19
|
Object.defineProperty(exports, "promptCacheSingleton", { enumerable: true, get: function () { return index_js_1.promptCacheSingleton; } });
|
|
20
20
|
// Update using pnpm bump-version
|
|
21
|
-
exports.__version__ = "0.
|
|
21
|
+
exports.__version__ = "0.7.1";
|
package/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export { overrideFetchImplementation } from "./singletons/fetch.js";
|
|
|
5
5
|
export { getDefaultProjectName } from "./utils/project.js";
|
|
6
6
|
export { uuid7, uuid7FromTime } from "./uuid.js";
|
|
7
7
|
export { Cache, PromptCache, type CacheConfig, type CacheMetrics, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
|
|
8
|
-
export declare const __version__ = "0.
|
|
8
|
+
export declare const __version__ = "0.7.1";
|
package/dist/index.js
CHANGED
|
@@ -5,4 +5,4 @@ export { getDefaultProjectName } from "./utils/project.js";
|
|
|
5
5
|
export { uuid7, uuid7FromTime } from "./uuid.js";
|
|
6
6
|
export { Cache, PromptCache, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
|
|
7
7
|
// Update using pnpm bump-version
|
|
8
|
-
export const __version__ = "0.
|
|
8
|
+
export const __version__ = "0.7.1";
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SandboxClient = void 0;
|
|
7
|
-
const env_js_1 = require("
|
|
8
|
-
const fetch_js_1 = require("
|
|
9
|
-
const async_caller_js_1 = require("
|
|
7
|
+
const env_js_1 = require("../utils/env.cjs");
|
|
8
|
+
const fetch_js_1 = require("../singletons/fetch.cjs");
|
|
9
|
+
const async_caller_js_1 = require("../utils/async_caller.cjs");
|
|
10
10
|
const sandbox_js_1 = require("./sandbox.cjs");
|
|
11
11
|
const errors_js_1 = require("./errors.cjs");
|
|
12
12
|
const helpers_js_1 = require("./helpers.cjs");
|
|
@@ -54,7 +54,7 @@ function getDefaultApiKey() {
|
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
56
56
|
* ```typescript
|
|
57
|
-
* import { SandboxClient } from "langsmith/
|
|
57
|
+
* import { SandboxClient } from "langsmith/sandbox";
|
|
58
58
|
*
|
|
59
59
|
* // Uses LANGSMITH_ENDPOINT and LANGSMITH_API_KEY from environment
|
|
60
60
|
* const client = new SandboxClient();
|
|
@@ -65,13 +65,8 @@ function getDefaultApiKey() {
|
|
|
65
65
|
* apiKey: "your-api-key",
|
|
66
66
|
* });
|
|
67
67
|
*
|
|
68
|
-
* //
|
|
69
|
-
* const
|
|
70
|
-
* "python",
|
|
71
|
-
* "python:3.12-slim",
|
|
72
|
-
* 1_073_741_824 // 1 GiB
|
|
73
|
-
* );
|
|
74
|
-
* const sandbox = await client.createSandbox(snapshot.id);
|
|
68
|
+
* // Create a sandbox with the default runtime
|
|
69
|
+
* const sandbox = await client.createSandbox();
|
|
75
70
|
* try {
|
|
76
71
|
* const result = await sandbox.run("python --version");
|
|
77
72
|
* console.log(result.stdout);
|
|
@@ -79,8 +74,6 @@ function getDefaultApiKey() {
|
|
|
79
74
|
* await sandbox.delete();
|
|
80
75
|
* }
|
|
81
76
|
* ```
|
|
82
|
-
*
|
|
83
|
-
* @experimental This feature is experimental, and breaking changes are expected.
|
|
84
77
|
*/
|
|
85
78
|
class SandboxClient {
|
|
86
79
|
constructor(config = {}) {
|
|
@@ -160,53 +153,14 @@ class SandboxClient {
|
|
|
160
153
|
}
|
|
161
154
|
return response;
|
|
162
155
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
* Exactly one of `snapshotId` (positional) or `options.snapshotName` must
|
|
172
|
-
* be provided. When `snapshotName` is used, the server resolves it to a
|
|
173
|
-
* snapshot owned by the caller's tenant.
|
|
174
|
-
*
|
|
175
|
-
* @param snapshotId - ID of the snapshot to boot from. Create one with
|
|
176
|
-
* `createSnapshot()` or `captureSnapshot()`, or pass an existing snapshot ID.
|
|
177
|
-
* Pass `undefined` when booting by name via `options.snapshotName`.
|
|
178
|
-
* @param options - Creation options. Use `options.snapshotName` to boot
|
|
179
|
-
* by snapshot name instead of ID.
|
|
180
|
-
* @returns Created Sandbox.
|
|
181
|
-
* @throws ResourceTimeoutError if timeout waiting for sandbox to be ready.
|
|
182
|
-
* @throws SandboxCreationError if sandbox creation fails.
|
|
183
|
-
* @throws LangSmithValidationError if TTL values are invalid, or if neither
|
|
184
|
-
* (or both) of `snapshotId` / `options.snapshotName` are provided.
|
|
185
|
-
*
|
|
186
|
-
* @example
|
|
187
|
-
* ```typescript
|
|
188
|
-
* const snapshot = await client.createSnapshot(
|
|
189
|
-
* "python",
|
|
190
|
-
* "python:3.12-slim",
|
|
191
|
-
* 1_073_741_824
|
|
192
|
-
* );
|
|
193
|
-
* const sandbox = await client.createSandbox(snapshot.id);
|
|
194
|
-
* // Or, resolve by snapshot name:
|
|
195
|
-
* const sandbox = await client.createSandbox(undefined, {
|
|
196
|
-
* snapshotName: "python",
|
|
197
|
-
* });
|
|
198
|
-
* try {
|
|
199
|
-
* const result = await sandbox.run("echo hello");
|
|
200
|
-
* console.log(result.stdout);
|
|
201
|
-
* } finally {
|
|
202
|
-
* await sandbox.delete();
|
|
203
|
-
* }
|
|
204
|
-
* ```
|
|
205
|
-
*/
|
|
206
|
-
async createSandbox(snapshotId, options = {}) {
|
|
207
|
-
const { snapshotName, name, timeout = 30, waitForReady = true, idleTtlSeconds, deleteAfterStopSeconds, vCpus, memBytes, fsCapacityBytes, proxyConfig, } = options;
|
|
208
|
-
if (!!snapshotId === !!snapshotName) {
|
|
209
|
-
throw new errors_js_1.LangSmithValidationError("Exactly one of snapshotId or options.snapshotName must be set", "snapshotId");
|
|
156
|
+
async createSandbox(snapshotIdOrOptions, options = {}) {
|
|
157
|
+
const snapshotId = typeof snapshotIdOrOptions === "string" ? snapshotIdOrOptions : undefined;
|
|
158
|
+
const resolvedOptions = typeof snapshotIdOrOptions === "object" && snapshotIdOrOptions !== null
|
|
159
|
+
? snapshotIdOrOptions
|
|
160
|
+
: options;
|
|
161
|
+
const { snapshotName, name, timeout = 30, waitForReady = true, idleTtlSeconds, deleteAfterStopSeconds, vCpus, memBytes, fsCapacityBytes, proxyConfig, } = resolvedOptions;
|
|
162
|
+
if (snapshotId && snapshotName) {
|
|
163
|
+
throw new errors_js_1.LangSmithValidationError("At most one of snapshotId or options.snapshotName may be set", "snapshotId");
|
|
210
164
|
}
|
|
211
165
|
(0, helpers_js_1.validateTtl)(idleTtlSeconds, "idleTtlSeconds");
|
|
212
166
|
(0, helpers_js_1.validateTtl)(deleteAfterStopSeconds, "deleteAfterStopSeconds");
|
|
@@ -10,7 +10,7 @@ import { Sandbox } from "./sandbox.js";
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```typescript
|
|
13
|
-
* import { SandboxClient } from "langsmith/
|
|
13
|
+
* import { SandboxClient } from "langsmith/sandbox";
|
|
14
14
|
*
|
|
15
15
|
* // Uses LANGSMITH_ENDPOINT and LANGSMITH_API_KEY from environment
|
|
16
16
|
* const client = new SandboxClient();
|
|
@@ -21,13 +21,8 @@ import { Sandbox } from "./sandbox.js";
|
|
|
21
21
|
* apiKey: "your-api-key",
|
|
22
22
|
* });
|
|
23
23
|
*
|
|
24
|
-
* //
|
|
25
|
-
* const
|
|
26
|
-
* "python",
|
|
27
|
-
* "python:3.12-slim",
|
|
28
|
-
* 1_073_741_824 // 1 GiB
|
|
29
|
-
* );
|
|
30
|
-
* const sandbox = await client.createSandbox(snapshot.id);
|
|
24
|
+
* // Create a sandbox with the default runtime
|
|
25
|
+
* const sandbox = await client.createSandbox();
|
|
31
26
|
* try {
|
|
32
27
|
* const result = await sandbox.run("python --version");
|
|
33
28
|
* console.log(result.stdout);
|
|
@@ -35,8 +30,6 @@ import { Sandbox } from "./sandbox.js";
|
|
|
35
30
|
* await sandbox.delete();
|
|
36
31
|
* }
|
|
37
32
|
* ```
|
|
38
|
-
*
|
|
39
|
-
* @experimental This feature is experimental, and breaking changes are expected.
|
|
40
33
|
*/
|
|
41
34
|
export declare class SandboxClient {
|
|
42
35
|
private _baseUrl;
|
|
@@ -45,35 +38,24 @@ export declare class SandboxClient {
|
|
|
45
38
|
private _caller;
|
|
46
39
|
constructor(config?: SandboxClientConfig);
|
|
47
40
|
/**
|
|
48
|
-
* Create a new Sandbox
|
|
41
|
+
* Create a new Sandbox.
|
|
49
42
|
*
|
|
50
43
|
* Remember to call `sandbox.delete()` when done to clean up resources.
|
|
51
44
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* snapshot
|
|
55
|
-
*
|
|
56
|
-
* @param snapshotId - ID of the snapshot to boot from. Create one with
|
|
57
|
-
* `createSnapshot()` or `captureSnapshot()`, or pass an existing snapshot ID.
|
|
58
|
-
* Pass `undefined` when booting by name via `options.snapshotName`.
|
|
59
|
-
* @param options - Creation options. Use `options.snapshotName` to boot
|
|
60
|
-
* by snapshot name instead of ID.
|
|
45
|
+
* @param snapshotId - Optional snapshot ID to boot from.
|
|
46
|
+
* @param options - Creation options. Use `options.snapshotName` to boot from
|
|
47
|
+
* a named snapshot instead of the default runtime.
|
|
61
48
|
* @returns Created Sandbox.
|
|
62
49
|
* @throws ResourceTimeoutError if timeout waiting for sandbox to be ready.
|
|
63
50
|
* @throws SandboxCreationError if sandbox creation fails.
|
|
64
|
-
* @throws LangSmithValidationError if TTL values are invalid, or if
|
|
65
|
-
*
|
|
51
|
+
* @throws LangSmithValidationError if TTL values are invalid, or if both
|
|
52
|
+
* `snapshotId` and `options.snapshotName` are provided.
|
|
66
53
|
*
|
|
67
54
|
* @example
|
|
68
55
|
* ```typescript
|
|
69
|
-
* const
|
|
70
|
-
* "python",
|
|
71
|
-
* "python:3.12-slim",
|
|
72
|
-
* 1_073_741_824
|
|
73
|
-
* );
|
|
74
|
-
* const sandbox = await client.createSandbox(snapshot.id);
|
|
56
|
+
* const sandbox = await client.createSandbox();
|
|
75
57
|
* // Or, resolve by snapshot name:
|
|
76
|
-
* const sandbox = await client.createSandbox(
|
|
58
|
+
* const sandbox = await client.createSandbox({
|
|
77
59
|
* snapshotName: "python",
|
|
78
60
|
* });
|
|
79
61
|
* try {
|
|
@@ -84,6 +66,7 @@ export declare class SandboxClient {
|
|
|
84
66
|
* }
|
|
85
67
|
* ```
|
|
86
68
|
*/
|
|
69
|
+
createSandbox(options?: CreateSandboxOptions): Promise<Sandbox>;
|
|
87
70
|
createSandbox(snapshotId?: string, options?: CreateSandboxOptions): Promise<Sandbox>;
|
|
88
71
|
/**
|
|
89
72
|
* Get a Sandbox by name.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Main SandboxClient class for interacting with the sandbox server API.
|
|
3
3
|
*/
|
|
4
|
-
import { getLangSmithEnvironmentVariable } from "
|
|
5
|
-
import { _getFetchImplementation } from "
|
|
6
|
-
import { AsyncCaller } from "
|
|
4
|
+
import { getLangSmithEnvironmentVariable } from "../utils/env.js";
|
|
5
|
+
import { _getFetchImplementation } from "../singletons/fetch.js";
|
|
6
|
+
import { AsyncCaller } from "../utils/async_caller.js";
|
|
7
7
|
import { Sandbox } from "./sandbox.js";
|
|
8
8
|
import { LangSmithResourceCreationError, LangSmithResourceNameConflictError, LangSmithResourceNotFoundError, LangSmithResourceTimeoutError, LangSmithSandboxAPIError, LangSmithValidationError, } from "./errors.js";
|
|
9
9
|
import { handleClientHttpError, handleSandboxCreationError, validateTtl, } from "./helpers.js";
|
|
@@ -51,7 +51,7 @@ function getDefaultApiKey() {
|
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* ```typescript
|
|
54
|
-
* import { SandboxClient } from "langsmith/
|
|
54
|
+
* import { SandboxClient } from "langsmith/sandbox";
|
|
55
55
|
*
|
|
56
56
|
* // Uses LANGSMITH_ENDPOINT and LANGSMITH_API_KEY from environment
|
|
57
57
|
* const client = new SandboxClient();
|
|
@@ -62,13 +62,8 @@ function getDefaultApiKey() {
|
|
|
62
62
|
* apiKey: "your-api-key",
|
|
63
63
|
* });
|
|
64
64
|
*
|
|
65
|
-
* //
|
|
66
|
-
* const
|
|
67
|
-
* "python",
|
|
68
|
-
* "python:3.12-slim",
|
|
69
|
-
* 1_073_741_824 // 1 GiB
|
|
70
|
-
* );
|
|
71
|
-
* const sandbox = await client.createSandbox(snapshot.id);
|
|
65
|
+
* // Create a sandbox with the default runtime
|
|
66
|
+
* const sandbox = await client.createSandbox();
|
|
72
67
|
* try {
|
|
73
68
|
* const result = await sandbox.run("python --version");
|
|
74
69
|
* console.log(result.stdout);
|
|
@@ -76,8 +71,6 @@ function getDefaultApiKey() {
|
|
|
76
71
|
* await sandbox.delete();
|
|
77
72
|
* }
|
|
78
73
|
* ```
|
|
79
|
-
*
|
|
80
|
-
* @experimental This feature is experimental, and breaking changes are expected.
|
|
81
74
|
*/
|
|
82
75
|
export class SandboxClient {
|
|
83
76
|
constructor(config = {}) {
|
|
@@ -157,53 +150,14 @@ export class SandboxClient {
|
|
|
157
150
|
}
|
|
158
151
|
return response;
|
|
159
152
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
* Exactly one of `snapshotId` (positional) or `options.snapshotName` must
|
|
169
|
-
* be provided. When `snapshotName` is used, the server resolves it to a
|
|
170
|
-
* snapshot owned by the caller's tenant.
|
|
171
|
-
*
|
|
172
|
-
* @param snapshotId - ID of the snapshot to boot from. Create one with
|
|
173
|
-
* `createSnapshot()` or `captureSnapshot()`, or pass an existing snapshot ID.
|
|
174
|
-
* Pass `undefined` when booting by name via `options.snapshotName`.
|
|
175
|
-
* @param options - Creation options. Use `options.snapshotName` to boot
|
|
176
|
-
* by snapshot name instead of ID.
|
|
177
|
-
* @returns Created Sandbox.
|
|
178
|
-
* @throws ResourceTimeoutError if timeout waiting for sandbox to be ready.
|
|
179
|
-
* @throws SandboxCreationError if sandbox creation fails.
|
|
180
|
-
* @throws LangSmithValidationError if TTL values are invalid, or if neither
|
|
181
|
-
* (or both) of `snapshotId` / `options.snapshotName` are provided.
|
|
182
|
-
*
|
|
183
|
-
* @example
|
|
184
|
-
* ```typescript
|
|
185
|
-
* const snapshot = await client.createSnapshot(
|
|
186
|
-
* "python",
|
|
187
|
-
* "python:3.12-slim",
|
|
188
|
-
* 1_073_741_824
|
|
189
|
-
* );
|
|
190
|
-
* const sandbox = await client.createSandbox(snapshot.id);
|
|
191
|
-
* // Or, resolve by snapshot name:
|
|
192
|
-
* const sandbox = await client.createSandbox(undefined, {
|
|
193
|
-
* snapshotName: "python",
|
|
194
|
-
* });
|
|
195
|
-
* try {
|
|
196
|
-
* const result = await sandbox.run("echo hello");
|
|
197
|
-
* console.log(result.stdout);
|
|
198
|
-
* } finally {
|
|
199
|
-
* await sandbox.delete();
|
|
200
|
-
* }
|
|
201
|
-
* ```
|
|
202
|
-
*/
|
|
203
|
-
async createSandbox(snapshotId, options = {}) {
|
|
204
|
-
const { snapshotName, name, timeout = 30, waitForReady = true, idleTtlSeconds, deleteAfterStopSeconds, vCpus, memBytes, fsCapacityBytes, proxyConfig, } = options;
|
|
205
|
-
if (!!snapshotId === !!snapshotName) {
|
|
206
|
-
throw new LangSmithValidationError("Exactly one of snapshotId or options.snapshotName must be set", "snapshotId");
|
|
153
|
+
async createSandbox(snapshotIdOrOptions, options = {}) {
|
|
154
|
+
const snapshotId = typeof snapshotIdOrOptions === "string" ? snapshotIdOrOptions : undefined;
|
|
155
|
+
const resolvedOptions = typeof snapshotIdOrOptions === "object" && snapshotIdOrOptions !== null
|
|
156
|
+
? snapshotIdOrOptions
|
|
157
|
+
: options;
|
|
158
|
+
const { snapshotName, name, timeout = 30, waitForReady = true, idleTtlSeconds, deleteAfterStopSeconds, vCpus, memBytes, fsCapacityBytes, proxyConfig, } = resolvedOptions;
|
|
159
|
+
if (snapshotId && snapshotName) {
|
|
160
|
+
throw new LangSmithValidationError("At most one of snapshotId or options.snapshotName may be set", "snapshotId");
|
|
207
161
|
}
|
|
208
162
|
validateTtl(idleTtlSeconds, "idleTtlSeconds");
|
|
209
163
|
validateTtl(deleteAfterStopSeconds, "deleteAfterStopSeconds");
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```typescript
|
|
10
|
-
* import { SandboxClient } from "langsmith/
|
|
10
|
+
* import { SandboxClient } from "langsmith/sandbox";
|
|
11
11
|
*
|
|
12
12
|
* // Uses LANGSMITH_ENDPOINT and LANGSMITH_API_KEY from environment
|
|
13
13
|
* const client = new SandboxClient();
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```typescript
|
|
9
|
-
* import { SandboxClient } from "langsmith/
|
|
9
|
+
* import { SandboxClient } from "langsmith/sandbox";
|
|
10
10
|
*
|
|
11
11
|
* // Uses LANGSMITH_ENDPOINT and LANGSMITH_API_KEY from environment
|
|
12
12
|
* const client = new SandboxClient();
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```typescript
|
|
9
|
-
* import { SandboxClient } from "langsmith/
|
|
9
|
+
* import { SandboxClient } from "langsmith/sandbox";
|
|
10
10
|
*
|
|
11
11
|
* // Uses LANGSMITH_ENDPOINT and LANGSMITH_API_KEY from environment
|
|
12
12
|
* const client = new SandboxClient();
|
|
@@ -20,8 +20,6 @@ import { CommandHandle } from "./command_handle.js";
|
|
|
20
20
|
* await sandbox.delete();
|
|
21
21
|
* }
|
|
22
22
|
* ```
|
|
23
|
-
*
|
|
24
|
-
* @experimental This feature is experimental, and breaking changes are expected.
|
|
25
23
|
*/
|
|
26
24
|
export declare class Sandbox {
|
|
27
25
|
/** Display name (can be updated). */
|
|
@@ -255,8 +255,8 @@ export interface SandboxProxyConfig {
|
|
|
255
255
|
*/
|
|
256
256
|
export interface CreateSandboxOptions {
|
|
257
257
|
/**
|
|
258
|
-
*
|
|
259
|
-
* `snapshotId
|
|
258
|
+
* Optional snapshot name to boot from. Mutually exclusive with the positional
|
|
259
|
+
* `snapshotId`.
|
|
260
260
|
* Resolved server-side to a snapshot owned by the caller's tenant.
|
|
261
261
|
*/
|
|
262
262
|
snapshotName?: string;
|
package/experimental/sandbox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('../dist/
|
|
1
|
+
module.exports = require('../dist/sandbox/index.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../dist/
|
|
1
|
+
export * from '../dist/sandbox/index.js'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../dist/
|
|
1
|
+
export * from '../dist/sandbox/index.js'
|
package/experimental/sandbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../dist/
|
|
1
|
+
export * from '../dist/sandbox/index.js'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langsmith",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Client library to connect to the LangSmith Observability and Evaluation Platform.",
|
|
5
5
|
"packageManager": "pnpm@10.33.0",
|
|
6
6
|
"files": [
|
|
@@ -101,6 +101,10 @@
|
|
|
101
101
|
"experimental/sandbox.js",
|
|
102
102
|
"experimental/sandbox.d.ts",
|
|
103
103
|
"experimental/sandbox.d.cts",
|
|
104
|
+
"sandbox.cjs",
|
|
105
|
+
"sandbox.js",
|
|
106
|
+
"sandbox.d.ts",
|
|
107
|
+
"sandbox.d.cts",
|
|
104
108
|
"index.cjs",
|
|
105
109
|
"index.js",
|
|
106
110
|
"index.d.ts",
|
|
@@ -156,7 +160,7 @@
|
|
|
156
160
|
"@ai-sdk/openai": "^3.0.0",
|
|
157
161
|
"@ai-sdk/provider": "^3.0.0",
|
|
158
162
|
"@anthropic-ai/claude-agent-sdk": "^0.2.83",
|
|
159
|
-
"@anthropic-ai/sdk": "^0.
|
|
163
|
+
"@anthropic-ai/sdk": "^0.94.0",
|
|
160
164
|
"@babel/preset-env": "^7.22.4",
|
|
161
165
|
"@faker-js/faker": "^8.4.1",
|
|
162
166
|
"@google/genai": "^1.29.0",
|
|
@@ -167,9 +171,9 @@
|
|
|
167
171
|
"@langchain/openai": "^0.6.17",
|
|
168
172
|
"@openai/agents": "^0.8.3",
|
|
169
173
|
"@opentelemetry/api": "^1.9.0",
|
|
170
|
-
"@opentelemetry/auto-instrumentations-node": "^0.
|
|
174
|
+
"@opentelemetry/auto-instrumentations-node": "^0.75.0",
|
|
171
175
|
"@opentelemetry/context-async-hooks": "^2.6.1",
|
|
172
|
-
"@opentelemetry/sdk-node": "^0.
|
|
176
|
+
"@opentelemetry/sdk-node": "^0.217.0",
|
|
173
177
|
"@opentelemetry/sdk-trace-base": "^2.0.0",
|
|
174
178
|
"@opentelemetry/sdk-trace-node": "^2.0.0",
|
|
175
179
|
"@tsconfig/recommended": "^1.0.2",
|
|
@@ -455,6 +459,15 @@
|
|
|
455
459
|
"import": "./experimental/sandbox.js",
|
|
456
460
|
"require": "./experimental/sandbox.cjs"
|
|
457
461
|
},
|
|
462
|
+
"./sandbox": {
|
|
463
|
+
"types": {
|
|
464
|
+
"import": "./sandbox.d.ts",
|
|
465
|
+
"require": "./sandbox.d.cts",
|
|
466
|
+
"default": "./sandbox.d.ts"
|
|
467
|
+
},
|
|
468
|
+
"import": "./sandbox.js",
|
|
469
|
+
"require": "./sandbox.cjs"
|
|
470
|
+
},
|
|
458
471
|
"./package.json": "./package.json"
|
|
459
472
|
},
|
|
460
473
|
"pnpm": {
|
package/sandbox.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/sandbox/index.cjs');
|
package/sandbox.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/sandbox/index.js'
|
package/sandbox.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/sandbox/index.js'
|
package/sandbox.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/sandbox/index.js'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|