langsmith 0.5.20 → 0.5.21
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/experimental/sandbox/client.cjs +4 -1
- package/dist/experimental/sandbox/client.js +4 -1
- package/dist/experimental/sandbox/index.d.ts +1 -1
- package/dist/experimental/sandbox/types.d.ts +34 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -580,7 +580,7 @@ class SandboxClient {
|
|
|
580
580
|
* ```
|
|
581
581
|
*/
|
|
582
582
|
async createSandbox(templateName, options = {}) {
|
|
583
|
-
const { snapshotId, name, timeout = 30, waitForReady = true, ttlSeconds, idleTtlSeconds, vCpus, memBytes, fsCapacityBytes, } = options;
|
|
583
|
+
const { snapshotId, name, timeout = 30, waitForReady = true, ttlSeconds, idleTtlSeconds, vCpus, memBytes, fsCapacityBytes, proxyConfig, } = options;
|
|
584
584
|
if (!templateName && !snapshotId) {
|
|
585
585
|
throw new Error("Either templateName or snapshotId is required");
|
|
586
586
|
}
|
|
@@ -620,6 +620,9 @@ class SandboxClient {
|
|
|
620
620
|
if (fsCapacityBytes !== undefined) {
|
|
621
621
|
payload.fs_capacity_bytes = fsCapacityBytes;
|
|
622
622
|
}
|
|
623
|
+
if (proxyConfig !== undefined) {
|
|
624
|
+
payload.proxy_config = proxyConfig;
|
|
625
|
+
}
|
|
623
626
|
const httpTimeout = waitForReady ? (timeout + 30) * 1000 : 30 * 1000;
|
|
624
627
|
const response = await this._fetch(url, {
|
|
625
628
|
method: "POST",
|
|
@@ -577,7 +577,7 @@ export class SandboxClient {
|
|
|
577
577
|
* ```
|
|
578
578
|
*/
|
|
579
579
|
async createSandbox(templateName, options = {}) {
|
|
580
|
-
const { snapshotId, name, timeout = 30, waitForReady = true, ttlSeconds, idleTtlSeconds, vCpus, memBytes, fsCapacityBytes, } = options;
|
|
580
|
+
const { snapshotId, name, timeout = 30, waitForReady = true, ttlSeconds, idleTtlSeconds, vCpus, memBytes, fsCapacityBytes, proxyConfig, } = options;
|
|
581
581
|
if (!templateName && !snapshotId) {
|
|
582
582
|
throw new Error("Either templateName or snapshotId is required");
|
|
583
583
|
}
|
|
@@ -617,6 +617,9 @@ export class SandboxClient {
|
|
|
617
617
|
if (fsCapacityBytes !== undefined) {
|
|
618
618
|
payload.fs_capacity_bytes = fsCapacityBytes;
|
|
619
619
|
}
|
|
620
|
+
if (proxyConfig !== undefined) {
|
|
621
|
+
payload.proxy_config = proxyConfig;
|
|
622
|
+
}
|
|
620
623
|
const httpTimeout = waitForReady ? (timeout + 30) * 1000 : 30 * 1000;
|
|
621
624
|
const response = await this._fetch(url, {
|
|
622
625
|
method: "POST",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
export { SandboxClient } from "./client.js";
|
|
26
26
|
export { Sandbox } from "./sandbox.js";
|
|
27
27
|
export { CommandHandle } from "./command_handle.js";
|
|
28
|
-
export type { ExecutionResult, OutputChunk, WsMessage, WsRunOptions, ResourceSpec, ResourceStatus, Snapshot, VolumeMountSpec, Volume, SandboxTemplate, Pool, SandboxData, SandboxClientConfig, RunOptions, CreateSandboxOptions, CreateSnapshotOptions, CaptureSnapshotOptions, WaitForSnapshotOptions, StartSandboxOptions, UpdateSandboxOptions, WaitForSandboxOptions, CreateVolumeOptions, CreateTemplateOptions, UpdateTemplateOptions, CreatePoolOptions, UpdateVolumeOptions, UpdatePoolOptions, } from "./types.js";
|
|
28
|
+
export type { ExecutionResult, OutputChunk, WsMessage, WsRunOptions, ResourceSpec, ResourceStatus, Snapshot, VolumeMountSpec, Volume, SandboxTemplate, Pool, SandboxData, SandboxClientConfig, RunOptions, CreateSandboxOptions, SandboxAccessControl, SandboxProxyConfig, CreateSnapshotOptions, CaptureSnapshotOptions, WaitForSnapshotOptions, StartSandboxOptions, UpdateSandboxOptions, WaitForSandboxOptions, CreateVolumeOptions, CreateTemplateOptions, UpdateTemplateOptions, CreatePoolOptions, UpdateVolumeOptions, UpdatePoolOptions, } from "./types.js";
|
|
29
29
|
export { LangSmithSandboxError, LangSmithSandboxAPIError, LangSmithSandboxAuthenticationError, LangSmithSandboxConnectionError, LangSmithSandboxServerReloadError, LangSmithResourceNotFoundError, LangSmithResourceTimeoutError, LangSmithResourceInUseError, LangSmithResourceAlreadyExistsError, LangSmithResourceNameConflictError, LangSmithValidationError, LangSmithQuotaExceededError, LangSmithResourceCreationError, LangSmithSandboxCreationError, LangSmithSandboxNotReadyError, LangSmithSandboxOperationError, LangSmithCommandTimeoutError, LangSmithDataplaneNotConfiguredError, } from "./errors.js";
|
|
@@ -265,6 +265,33 @@ export interface RunOptions {
|
|
|
265
265
|
*/
|
|
266
266
|
pty?: boolean;
|
|
267
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Network access-control rules for a sandbox's proxy sidecar.
|
|
270
|
+
*
|
|
271
|
+
* Supported pattern types: exact domains, globs (e.g. `*.example.com`),
|
|
272
|
+
* IPs, CIDR ranges (e.g. `10.0.0.0/8`), and regex (`~pattern`).
|
|
273
|
+
*
|
|
274
|
+
* Only one of `allow_list` and `deny_list` may be populated.
|
|
275
|
+
*/
|
|
276
|
+
export interface SandboxAccessControl {
|
|
277
|
+
/** Hosts the sandbox is allowed to reach. */
|
|
278
|
+
allow_list?: string[];
|
|
279
|
+
/** Hosts the sandbox is blocked from reaching. */
|
|
280
|
+
deny_list?: string[];
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Full proxy configuration forwarded to the sandbox server as-is (snake_case
|
|
284
|
+
* so it's wire-compatible with the backend). Mirrors the server's
|
|
285
|
+
* `ProxyConfig` type.
|
|
286
|
+
*/
|
|
287
|
+
export interface SandboxProxyConfig {
|
|
288
|
+
/** Header-injection rules keyed by host pattern. */
|
|
289
|
+
rules?: unknown[];
|
|
290
|
+
/** Hosts that bypass the proxy entirely. */
|
|
291
|
+
no_proxy?: string[];
|
|
292
|
+
/** Allow/deny list enforced at the proxy sidecar. */
|
|
293
|
+
access_control?: SandboxAccessControl;
|
|
294
|
+
}
|
|
268
295
|
/**
|
|
269
296
|
* Options for creating a sandbox.
|
|
270
297
|
*/
|
|
@@ -305,6 +332,13 @@ export interface CreateSandboxOptions {
|
|
|
305
332
|
memBytes?: number;
|
|
306
333
|
/** Root filesystem capacity in bytes. */
|
|
307
334
|
fsCapacityBytes?: number;
|
|
335
|
+
/**
|
|
336
|
+
* Per-sandbox proxy configuration. Use
|
|
337
|
+
* `{ access_control: { allow_list: ["github.com", "*.example.com"] } }`
|
|
338
|
+
* to restrict outbound HTTPS to a set of host patterns. Forwarded to the
|
|
339
|
+
* server as-is on the wire.
|
|
340
|
+
*/
|
|
341
|
+
proxyConfig?: SandboxProxyConfig;
|
|
308
342
|
}
|
|
309
343
|
/**
|
|
310
344
|
* Options for creating a snapshot from a Docker image.
|
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.5.
|
|
21
|
+
exports.__version__ = "0.5.21";
|
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.5.
|
|
8
|
+
export declare const __version__ = "0.5.21";
|
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.5.
|
|
8
|
+
export const __version__ = "0.5.21";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langsmith",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.21",
|
|
4
4
|
"description": "Client library to connect to the LangSmith Observability and Evaluation Platform.",
|
|
5
5
|
"packageManager": "pnpm@10.33.0",
|
|
6
6
|
"files": [
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"@ai-sdk/openai": "^3.0.0",
|
|
154
154
|
"@ai-sdk/provider": "^3.0.0",
|
|
155
155
|
"@anthropic-ai/claude-agent-sdk": "^0.2.83",
|
|
156
|
-
"@anthropic-ai/sdk": "^0.
|
|
156
|
+
"@anthropic-ai/sdk": "^0.89.0",
|
|
157
157
|
"@babel/preset-env": "^7.22.4",
|
|
158
158
|
"@faker-js/faker": "^8.4.1",
|
|
159
159
|
"@google/genai": "^1.29.0",
|