langsmith 0.5.20 → 0.5.22

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.
@@ -11,59 +11,6 @@ export interface ExecutionResult {
11
11
  stderr: string;
12
12
  exit_code: number;
13
13
  }
14
- /**
15
- * Resource specification for a sandbox.
16
- */
17
- export interface ResourceSpec {
18
- cpu?: string;
19
- memory?: string;
20
- storage?: string;
21
- }
22
- /**
23
- * Specification for mounting a volume in a sandbox template.
24
- */
25
- export interface VolumeMountSpec {
26
- volume_name: string;
27
- mount_path: string;
28
- }
29
- /**
30
- * Represents a persistent volume.
31
- */
32
- export interface Volume {
33
- id?: string;
34
- name: string;
35
- size: string;
36
- storage_class: string;
37
- created_at?: string;
38
- updated_at?: string;
39
- }
40
- /**
41
- * Represents a SandboxTemplate.
42
- *
43
- * Templates define the image, resource limits, and volume mounts for sandboxes.
44
- */
45
- export interface SandboxTemplate {
46
- id?: string;
47
- name: string;
48
- image: string;
49
- resources: ResourceSpec;
50
- volume_mounts?: VolumeMountSpec[];
51
- created_at?: string;
52
- updated_at?: string;
53
- }
54
- /**
55
- * Represents a Sandbox Pool for pre-provisioned sandboxes.
56
- *
57
- * Pools pre-provision sandboxes from a template for faster startup.
58
- */
59
- export interface Pool {
60
- id?: string;
61
- name: string;
62
- template_name: string;
63
- replicas: number;
64
- created_at?: string;
65
- updated_at?: string;
66
- }
67
14
  /**
68
15
  * Lightweight provisioning status for any async-created resource.
69
16
  */
@@ -101,7 +48,6 @@ export interface Snapshot {
101
48
  export interface SandboxData {
102
49
  id?: string;
103
50
  name: string;
104
- template_name?: string;
105
51
  dataplane_url?: string;
106
52
  status?: string;
107
53
  status_message?: string;
@@ -265,15 +211,43 @@ export interface RunOptions {
265
211
  */
266
212
  pty?: boolean;
267
213
  }
214
+ /**
215
+ * Network access-control rules for a sandbox's proxy sidecar.
216
+ *
217
+ * Supported pattern types: exact domains, globs (e.g. `*.example.com`),
218
+ * IPs, CIDR ranges (e.g. `10.0.0.0/8`), and regex (`~pattern`).
219
+ *
220
+ * Only one of `allow_list` and `deny_list` may be populated.
221
+ */
222
+ export interface SandboxAccessControl {
223
+ /** Hosts the sandbox is allowed to reach. */
224
+ allow_list?: string[];
225
+ /** Hosts the sandbox is blocked from reaching. */
226
+ deny_list?: string[];
227
+ }
228
+ /**
229
+ * Full proxy configuration forwarded to the sandbox server as-is (snake_case
230
+ * so it's wire-compatible with the backend). Mirrors the server's
231
+ * `ProxyConfig` type.
232
+ */
233
+ export interface SandboxProxyConfig {
234
+ /** Header-injection rules keyed by host pattern. */
235
+ rules?: unknown[];
236
+ /** Hosts that bypass the proxy entirely. */
237
+ no_proxy?: string[];
238
+ /** Allow/deny list enforced at the proxy sidecar. */
239
+ access_control?: SandboxAccessControl;
240
+ }
268
241
  /**
269
242
  * Options for creating a sandbox.
270
243
  */
271
244
  export interface CreateSandboxOptions {
272
245
  /**
273
- * Snapshot ID to boot from.
274
- * Mutually exclusive with the `templateName` positional arg.
246
+ * Snapshot name to boot from. Mutually exclusive with the positional
247
+ * `snapshotId` argument on `createSandbox`; exactly one must be provided.
248
+ * Resolved server-side to a snapshot owned by the caller's tenant.
275
249
  */
276
- snapshotId?: string;
250
+ snapshotName?: string;
277
251
  /**
278
252
  * Optional sandbox name (auto-generated if not provided).
279
253
  */
@@ -305,6 +279,13 @@ export interface CreateSandboxOptions {
305
279
  memBytes?: number;
306
280
  /** Root filesystem capacity in bytes. */
307
281
  fsCapacityBytes?: number;
282
+ /**
283
+ * Per-sandbox proxy configuration. Use
284
+ * `{ access_control: { allow_list: ["github.com", "*.example.com"] } }`
285
+ * to restrict outbound HTTPS to a set of host patterns. Forwarded to the
286
+ * server as-is on the wire.
287
+ */
288
+ proxyConfig?: SandboxProxyConfig;
308
289
  }
309
290
  /**
310
291
  * Options for creating a snapshot from a Docker image.
@@ -327,13 +308,39 @@ export interface CreateSnapshotOptions {
327
308
  * Options for capturing a snapshot from a running sandbox.
328
309
  */
329
310
  export interface CaptureSnapshotOptions {
330
- /** Checkpoint timestamp to use. If omitted, creates a fresh checkpoint. */
331
- checkpoint?: string;
332
311
  /** Timeout in seconds when waiting for ready. Default: 60. */
333
312
  timeout?: number;
334
313
  /** AbortSignal for cancellation. */
335
314
  signal?: AbortSignal;
336
315
  }
316
+ /**
317
+ * Options for listing snapshots. All fields are optional and independent.
318
+ *
319
+ * The backend always paginates: when `limit` is omitted the server applies
320
+ * a default page size (currently 50), so a single call will not necessarily
321
+ * return every snapshot visible to the caller's tenant.
322
+ */
323
+ export interface ListSnapshotsOptions {
324
+ /**
325
+ * Case-insensitive substring filter applied server-side to snapshot
326
+ * names.
327
+ */
328
+ nameContains?: string;
329
+ /**
330
+ * Maximum number of snapshots to return for a single request. Must be
331
+ * between 1 and 500 (inclusive); the server rejects values outside that
332
+ * range. Defaults to 50 server-side when omitted.
333
+ */
334
+ limit?: number;
335
+ /**
336
+ * Number of snapshots to skip before returning results. Must be `>= 0`.
337
+ * Useful for paginating through large result sets in combination with
338
+ * `limit`.
339
+ */
340
+ offset?: number;
341
+ /** AbortSignal for cancellation. */
342
+ signal?: AbortSignal;
343
+ }
337
344
  /**
338
345
  * Options for waiting for a snapshot to become ready.
339
346
  */
@@ -387,93 +394,3 @@ export interface WaitForSandboxOptions {
387
394
  /** AbortSignal for cancellation. */
388
395
  signal?: AbortSignal;
389
396
  }
390
- /**
391
- * Options for creating a volume.
392
- */
393
- export interface CreateVolumeOptions {
394
- /**
395
- * Storage size (e.g., "1Gi", "10Gi").
396
- */
397
- size: string;
398
- /**
399
- * Timeout in seconds when waiting for volume to be ready. Default: 60.
400
- */
401
- timeout?: number;
402
- }
403
- /**
404
- * Options for creating a template.
405
- */
406
- export interface CreateTemplateOptions {
407
- /**
408
- * Container image (e.g., "python:3.12-slim", "node:20-slim").
409
- */
410
- image: string;
411
- /**
412
- * CPU limit (e.g., "500m", "1", "2"). Default: "500m".
413
- */
414
- cpu?: string;
415
- /**
416
- * Memory limit (e.g., "256Mi", "1Gi"). Default: "512Mi".
417
- */
418
- memory?: string;
419
- /**
420
- * Ephemeral storage limit (e.g., "1Gi"). Optional.
421
- */
422
- storage?: string;
423
- /**
424
- * List of volumes to mount in the sandbox. Optional.
425
- */
426
- volumeMounts?: VolumeMountSpec[];
427
- }
428
- /**
429
- * Options for updating a template.
430
- */
431
- export interface UpdateTemplateOptions {
432
- /**
433
- * New display name (optional).
434
- */
435
- newName?: string;
436
- }
437
- /**
438
- * Options for creating a pool.
439
- */
440
- export interface CreatePoolOptions {
441
- /**
442
- * Name of the template to use for sandboxes in this pool.
443
- */
444
- templateName: string;
445
- /**
446
- * Number of pre-warmed sandboxes to maintain (0-100).
447
- */
448
- replicas: number;
449
- /**
450
- * Timeout in seconds when waiting for pool to be ready. Default: 30.
451
- */
452
- timeout?: number;
453
- }
454
- /**
455
- * Options for updating a volume.
456
- */
457
- export interface UpdateVolumeOptions {
458
- /**
459
- * New display name (optional).
460
- */
461
- newName?: string;
462
- /**
463
- * New storage size (must be >= current size). Optional.
464
- */
465
- size?: string;
466
- }
467
- /**
468
- * Options for updating a pool.
469
- */
470
- export interface UpdatePoolOptions {
471
- /**
472
- * New display name (optional).
473
- */
474
- newName?: string;
475
- /**
476
- * New number of replicas (0-100). Set to 0 to pause.
477
- */
478
- replicas?: number;
479
- }
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.20";
21
+ exports.__version__ = "0.5.22";
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.20";
8
+ export declare const __version__ = "0.5.22";
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.20";
8
+ export const __version__ = "0.5.22";