langsmith 0.10.11 → 0.10.13

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.
Files changed (119) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +198 -198
  3. package/lib/address.d.mts +35 -56
  4. package/lib/address.d.mts.map +1 -1
  5. package/lib/address.d.ts +35 -56
  6. package/lib/address.d.ts.map +1 -1
  7. package/lib/address.js +91 -156
  8. package/lib/address.js.map +1 -1
  9. package/lib/address.mjs +83 -151
  10. package/lib/address.mjs.map +1 -1
  11. package/lib/client.d.mts +1 -1
  12. package/lib/client.d.mts.map +1 -1
  13. package/lib/client.d.ts +1 -1
  14. package/lib/client.d.ts.map +1 -1
  15. package/lib/client.js +11 -10
  16. package/lib/client.js.map +1 -1
  17. package/lib/client.mjs +4 -3
  18. package/lib/client.mjs.map +1 -1
  19. package/lib/run_trees.d.mts +1 -1
  20. package/lib/run_trees.d.mts.map +1 -1
  21. package/lib/run_trees.d.ts +1 -1
  22. package/lib/run_trees.d.ts.map +1 -1
  23. package/lib/run_trees.js +11 -9
  24. package/lib/run_trees.js.map +1 -1
  25. package/lib/run_trees.mjs +7 -5
  26. package/lib/run_trees.mjs.map +1 -1
  27. package/lib/sandbox/index.d.mts +1 -1
  28. package/lib/sandbox/index.d.mts.map +1 -1
  29. package/lib/sandbox/index.d.ts +1 -1
  30. package/lib/sandbox/index.d.ts.map +1 -1
  31. package/lib/sandbox/index.js.map +1 -1
  32. package/lib/sandbox/index.mjs.map +1 -1
  33. package/lib/sandbox/mounts.d.mts +3 -2
  34. package/lib/sandbox/mounts.d.mts.map +1 -1
  35. package/lib/sandbox/mounts.d.ts +3 -2
  36. package/lib/sandbox/mounts.d.ts.map +1 -1
  37. package/lib/sandbox/mounts.js +6 -1
  38. package/lib/sandbox/mounts.js.map +1 -1
  39. package/lib/sandbox/mounts.mjs +6 -1
  40. package/lib/sandbox/mounts.mjs.map +1 -1
  41. package/lib/sandbox/types.d.mts +7 -0
  42. package/lib/sandbox/types.d.mts.map +1 -1
  43. package/lib/sandbox/types.d.ts +7 -0
  44. package/lib/sandbox/types.d.ts.map +1 -1
  45. package/lib/sandbox/verify.d.mts.map +1 -1
  46. package/lib/sandbox/verify.d.ts.map +1 -1
  47. package/lib/sandbox/verify.js +81 -19
  48. package/lib/sandbox/verify.js.map +1 -1
  49. package/lib/sandbox/verify.mjs +81 -19
  50. package/lib/sandbox/verify.mjs.map +1 -1
  51. package/lib/utils/addressing.d.mts +1 -1
  52. package/lib/utils/addressing.d.mts.map +1 -1
  53. package/lib/utils/addressing.d.ts +1 -1
  54. package/lib/utils/addressing.d.ts.map +1 -1
  55. package/lib/utils/addressing.js +4 -4
  56. package/lib/utils/addressing.js.map +1 -1
  57. package/lib/utils/addressing.mjs +5 -5
  58. package/lib/utils/addressing.mjs.map +1 -1
  59. package/package.json +22 -10
  60. package/resources/annotation-queues/annotation-queues.d.mts +33 -2
  61. package/resources/annotation-queues/annotation-queues.d.mts.map +1 -1
  62. package/resources/annotation-queues/annotation-queues.d.ts +33 -2
  63. package/resources/annotation-queues/annotation-queues.d.ts.map +1 -1
  64. package/resources/annotation-queues/annotation-queues.js.map +1 -1
  65. package/resources/annotation-queues/annotation-queues.mjs.map +1 -1
  66. package/resources/runs/runs.d.mts +14 -1
  67. package/resources/runs/runs.d.mts.map +1 -1
  68. package/resources/runs/runs.d.ts +14 -1
  69. package/resources/runs/runs.d.ts.map +1 -1
  70. package/resources/runs/runs.js +4 -0
  71. package/resources/runs/runs.js.map +1 -1
  72. package/resources/runs/runs.mjs +4 -0
  73. package/resources/runs/runs.mjs.map +1 -1
  74. package/resources/sandboxes/boxes.d.mts +32 -0
  75. package/resources/sandboxes/boxes.d.mts.map +1 -1
  76. package/resources/sandboxes/boxes.d.ts +32 -0
  77. package/resources/sandboxes/boxes.d.ts.map +1 -1
  78. package/resources/sandboxes/sandboxes.d.mts +32 -0
  79. package/resources/sandboxes/sandboxes.d.mts.map +1 -1
  80. package/resources/sandboxes/sandboxes.d.ts +32 -0
  81. package/resources/sandboxes/sandboxes.d.ts.map +1 -1
  82. package/resources/sandboxes/sandboxes.js.map +1 -1
  83. package/resources/sandboxes/sandboxes.mjs.map +1 -1
  84. package/resources/threads/threads.d.mts +13 -1
  85. package/resources/threads/threads.d.mts.map +1 -1
  86. package/resources/threads/threads.d.ts +13 -1
  87. package/resources/threads/threads.d.ts.map +1 -1
  88. package/resources/threads/threads.js +4 -0
  89. package/resources/threads/threads.js.map +1 -1
  90. package/resources/threads/threads.mjs +4 -0
  91. package/resources/threads/threads.mjs.map +1 -1
  92. package/resources/traces.d.mts +34 -16
  93. package/resources/traces.d.mts.map +1 -1
  94. package/resources/traces.d.ts +34 -16
  95. package/resources/traces.d.ts.map +1 -1
  96. package/resources/traces.js +7 -1
  97. package/resources/traces.js.map +1 -1
  98. package/resources/traces.mjs +7 -1
  99. package/resources/traces.mjs.map +1 -1
  100. package/src/lib/address.ts +138 -180
  101. package/src/lib/client.ts +4 -5
  102. package/src/lib/run_trees.ts +8 -5
  103. package/src/lib/sandbox/README.md +3 -2
  104. package/src/lib/sandbox/index.ts +1 -0
  105. package/src/lib/sandbox/mounts.ts +8 -0
  106. package/src/lib/sandbox/types.ts +8 -0
  107. package/src/lib/sandbox/verify.ts +107 -28
  108. package/src/lib/utils/addressing.ts +8 -5
  109. package/src/resources/annotation-queues/annotation-queues.ts +46 -2
  110. package/src/resources/runs/runs.ts +15 -1
  111. package/src/resources/sandboxes/boxes.ts +40 -0
  112. package/src/resources/sandboxes/sandboxes.ts +40 -0
  113. package/src/resources/threads/threads.ts +14 -1
  114. package/src/resources/traces.ts +38 -16
  115. package/src/version.ts +1 -1
  116. package/version.d.mts +1 -1
  117. package/version.d.ts +1 -1
  118. package/version.js +1 -1
  119. package/version.mjs +1 -1
@@ -260,6 +260,8 @@ export namespace SandboxResponse {
260
260
 
261
261
  contexthub?: SandboxapiS3BucketMountSpec.Contexthub;
262
262
 
263
+ encryption?: SandboxapiS3BucketMountSpec.Encryption;
264
+
263
265
  gcs?: SandboxapiS3BucketMountSpec.Gcs;
264
266
 
265
267
  git?: SandboxapiS3BucketMountSpec.Git;
@@ -301,6 +303,14 @@ export namespace SandboxResponse {
301
303
  initial_pull_only?: boolean;
302
304
  }
303
305
 
306
+ export interface Encryption {
307
+ /**
308
+ * KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
309
+ * mount's region.
310
+ */
311
+ kms_key: string;
312
+ }
313
+
304
314
  export interface Gcs {
305
315
  bucket: string;
306
316
 
@@ -337,6 +347,8 @@ export namespace SandboxResponse {
337
347
 
338
348
  contexthub?: SandboxapiGcsBucketMountSpec.Contexthub;
339
349
 
350
+ encryption?: SandboxapiGcsBucketMountSpec.Encryption;
351
+
340
352
  git?: SandboxapiGcsBucketMountSpec.Git;
341
353
 
342
354
  read_only?: boolean;
@@ -372,6 +384,14 @@ export namespace SandboxResponse {
372
384
  initial_pull_only?: boolean;
373
385
  }
374
386
 
387
+ export interface Encryption {
388
+ /**
389
+ * KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
390
+ * mount's region.
391
+ */
392
+ kms_key: string;
393
+ }
394
+
375
395
  export interface Git {
376
396
  remote_url: string;
377
397
 
@@ -414,6 +434,8 @@ export namespace SandboxResponse {
414
434
 
415
435
  contexthub?: SandboxapiGitRepoMountSpec.Contexthub;
416
436
 
437
+ encryption?: SandboxapiGitRepoMountSpec.Encryption;
438
+
417
439
  gcs?: SandboxapiGitRepoMountSpec.Gcs;
418
440
 
419
441
  read_only?: boolean;
@@ -459,6 +481,14 @@ export namespace SandboxResponse {
459
481
  initial_pull_only?: boolean;
460
482
  }
461
483
 
484
+ export interface Encryption {
485
+ /**
486
+ * KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
487
+ * mount's region.
488
+ */
489
+ kms_key: string;
490
+ }
491
+
462
492
  export interface Gcs {
463
493
  bucket: string;
464
494
 
@@ -489,6 +519,8 @@ export namespace SandboxResponse {
489
519
 
490
520
  cache?: SandboxapiContextHubRepoMountSpec.Cache;
491
521
 
522
+ encryption?: SandboxapiContextHubRepoMountSpec.Encryption;
523
+
492
524
  gcs?: SandboxapiContextHubRepoMountSpec.Gcs;
493
525
 
494
526
  git?: SandboxapiContextHubRepoMountSpec.Git;
@@ -520,6 +552,14 @@ export namespace SandboxResponse {
520
552
  writeback_seconds?: number;
521
553
  }
522
554
 
555
+ export interface Encryption {
556
+ /**
557
+ * KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
558
+ * mount's region.
559
+ */
560
+ kms_key: string;
561
+ }
562
+
523
563
  export interface Gcs {
524
564
  bucket: string;
525
565
 
@@ -85,6 +85,10 @@ export class Threads extends APIResource {
85
85
  * Query threads within a project (session), with cursor-based pagination. Returns
86
86
  * threads matching the given time range and optional filters.
87
87
  *
88
+ * When `ai_search` is set, `Accept: text/event-stream` is required; requests
89
+ * without it return 406. AI search is unavailable on deployments that route
90
+ * queries to the v1 backend and returns 501 there.
91
+ *
88
92
  * Self-hosted deployments require LangSmith `v0.16` or later.
89
93
  *
90
94
  * @example
@@ -1087,6 +1091,14 @@ export interface ThreadListTracesParams extends ItemsCursorGetPaginationParams {
1087
1091
  }
1088
1092
 
1089
1093
  export interface ThreadQueryParams extends ItemsCursorPostPaginationParams {
1094
+ /**
1095
+ * Body param: `ai_search` is a plain-language criterion evaluated against the
1096
+ * messages from the agent trajectory scoped to the thread. AND-ed with the
1097
+ * ordinary filters. Requires semantic filtering enabled for the deployment. Must
1098
+ * contain nonempty text of at most 2000 UTF-8 bytes.
1099
+ */
1100
+ ai_search?: string;
1101
+
1090
1102
  /**
1091
1103
  * Body param: `filter` narrows which threads are returned, using a LangSmith
1092
1104
  * filter expression evaluated against each thread's root run. For example:
@@ -1143,7 +1155,8 @@ export interface ThreadQueryParams extends ItemsCursorPostPaginationParams {
1143
1155
  tree_filter?: string;
1144
1156
 
1145
1157
  /**
1146
- * Header param: application/json or text/event-stream
1158
+ * Header param: application/json, or text/event-stream (required when ai_search is
1159
+ * set)
1147
1160
  */
1148
1161
  Accept?: string;
1149
1162
  }
@@ -53,6 +53,10 @@ export class Traces extends APIResource {
53
53
  * Supports filters (`trace_filter`, `tree_filter`), cursor pagination (`cursor`),
54
54
  * and field projection (`selects`).
55
55
  *
56
+ * When `ai_search` is set, `Accept: text/event-stream` is required; requests
57
+ * without it return 406. AI search is unavailable on deployments that route
58
+ * queries to the v1 backend and returns 501 there.
59
+ *
56
60
  * Self-hosted deployments require LangSmith `v0.16` or later.
57
61
  *
58
62
  * @example
@@ -64,13 +68,15 @@ export class Traces extends APIResource {
64
68
  * ```
65
69
  */
66
70
  query(
67
- body: TraceQueryParams,
71
+ params: TraceQueryParams,
68
72
  options?: RequestOptions,
69
73
  ): PagePromise<TracesItemsCursorPostPagination, Trace> {
74
+ const { Accept, ...body } = params;
70
75
  return this._client.getAPIList('/api/v2/traces/query', ItemsCursorPostPagination<Trace>, {
71
76
  body,
72
77
  method: 'post',
73
78
  ...options,
79
+ headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
74
80
  });
75
81
  }
76
82
  }
@@ -217,25 +223,34 @@ export interface TraceListRunsParams {
217
223
 
218
224
  export interface TraceQueryParams extends ItemsCursorPostPaginationParams {
219
225
  /**
220
- * `max_start_time` is the exclusive upper bound for the root-run start time scan
221
- * (RFC3339). Defaults to the request time when omitted.
226
+ * Body param: `ai_search` is a plain-language criterion evaluated against the
227
+ * messages from the agent trajectory scoped to the trace. AND-ed with the ordinary
228
+ * filters. Requires semantic filtering enabled for the deployment. Must contain
229
+ * nonempty text of at most 2000 UTF-8 bytes.
230
+ */
231
+ ai_search?: string;
232
+
233
+ /**
234
+ * Body param: `max_start_time` is the exclusive upper bound for the root-run start
235
+ * time scan (RFC3339). Defaults to the request time when omitted.
222
236
  */
223
237
  max_start_time?: string;
224
238
 
225
239
  /**
226
- * `min_start_time` is the inclusive lower bound for the root-run start time scan
227
- * (RFC3339). Defaults to 24 hours before the request when omitted.
240
+ * Body param: `min_start_time` is the inclusive lower bound for the root-run start
241
+ * time scan (RFC3339). Defaults to 24 hours before the request when omitted.
228
242
  */
229
243
  min_start_time?: string;
230
244
 
231
245
  /**
232
- * `project_id` is the UUID of the tracing project that owns the traces. Required.
246
+ * Body param: `project_id` is the UUID of the tracing project that owns the
247
+ * traces. Required.
233
248
  */
234
249
  project_id?: string;
235
250
 
236
251
  /**
237
- * `selects` lists which properties to include on each returned trace. Properties
238
- * listed here are routed to the appropriate sub-object on each item:
252
+ * Body param: `selects` lists which properties to include on each returned trace.
253
+ * Properties listed here are routed to the appropriate sub-object on each item:
239
254
  * `total_tokens`, `total_cost`, and `first_token_time` appear under
240
255
  * `trace_aggregates`; everything else appears under `root_run`. If omitted, only
241
256
  * `id` is returned on `root_run`.
@@ -243,26 +258,33 @@ export interface TraceQueryParams extends ItemsCursorPostPaginationParams {
243
258
  selects?: Array<RunsAPI.RunSelectField>;
244
259
 
245
260
  /**
246
- * `trace_filter` narrows results to traces whose root run matches this LangSmith
247
- * filter expression. This filter targets root runs only — `is_root = true` is
248
- * implied. See
261
+ * Body param: `trace_filter` narrows results to traces whose root run matches this
262
+ * LangSmith filter expression. This filter targets root runs only —
263
+ * `is_root = true` is implied. See
249
264
  * https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language
250
265
  * for syntax.
251
266
  */
252
267
  trace_filter?: string;
253
268
 
254
269
  /**
255
- * `trace_ids` is an optional fast-path restriction to a known set of trace UUIDs.
256
- * Equivalent in result to including each UUID in a `trace_filter`, but more
257
- * efficient at scale.
270
+ * Body param: `trace_ids` is an optional fast-path restriction to a known set of
271
+ * trace UUIDs. Equivalent in result to including each UUID in a `trace_filter`,
272
+ * but more efficient at scale.
258
273
  */
259
274
  trace_ids?: Array<string>;
260
275
 
261
276
  /**
262
- * `tree_filter` narrows results to traces containing at least one run anywhere in
263
- * the run tree (root or descendant) that matches this LangSmith filter expression.
277
+ * Body param: `tree_filter` narrows results to traces containing at least one run
278
+ * anywhere in the run tree (root or descendant) that matches this LangSmith filter
279
+ * expression.
264
280
  */
265
281
  tree_filter?: string;
282
+
283
+ /**
284
+ * Header param: application/json, or text/event-stream (required when ai_search is
285
+ * set)
286
+ */
287
+ Accept?: string;
266
288
  }
267
289
 
268
290
  export declare namespace Traces {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.10.11'; // x-release-please-version
1
+ export const VERSION = '0.10.13'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.10.11";
1
+ export declare const VERSION = "0.10.13";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.10.11";
1
+ export declare const VERSION = "0.10.13";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.10.11'; // x-release-please-version
4
+ exports.VERSION = '0.10.13'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.10.11'; // x-release-please-version
1
+ export const VERSION = '0.10.13'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map