langsmith 0.10.11 → 0.10.12

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 (83) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +198 -198
  3. package/lib/sandbox/index.d.mts +1 -1
  4. package/lib/sandbox/index.d.mts.map +1 -1
  5. package/lib/sandbox/index.d.ts +1 -1
  6. package/lib/sandbox/index.d.ts.map +1 -1
  7. package/lib/sandbox/index.js.map +1 -1
  8. package/lib/sandbox/index.mjs.map +1 -1
  9. package/lib/sandbox/mounts.d.mts +3 -2
  10. package/lib/sandbox/mounts.d.mts.map +1 -1
  11. package/lib/sandbox/mounts.d.ts +3 -2
  12. package/lib/sandbox/mounts.d.ts.map +1 -1
  13. package/lib/sandbox/mounts.js +6 -1
  14. package/lib/sandbox/mounts.js.map +1 -1
  15. package/lib/sandbox/mounts.mjs +6 -1
  16. package/lib/sandbox/mounts.mjs.map +1 -1
  17. package/lib/sandbox/types.d.mts +7 -0
  18. package/lib/sandbox/types.d.mts.map +1 -1
  19. package/lib/sandbox/types.d.ts +7 -0
  20. package/lib/sandbox/types.d.ts.map +1 -1
  21. package/lib/sandbox/verify.d.mts.map +1 -1
  22. package/lib/sandbox/verify.d.ts.map +1 -1
  23. package/lib/sandbox/verify.js +81 -19
  24. package/lib/sandbox/verify.js.map +1 -1
  25. package/lib/sandbox/verify.mjs +81 -19
  26. package/lib/sandbox/verify.mjs.map +1 -1
  27. package/package.json +13 -4
  28. package/resources/annotation-queues/annotation-queues.d.mts +33 -2
  29. package/resources/annotation-queues/annotation-queues.d.mts.map +1 -1
  30. package/resources/annotation-queues/annotation-queues.d.ts +33 -2
  31. package/resources/annotation-queues/annotation-queues.d.ts.map +1 -1
  32. package/resources/annotation-queues/annotation-queues.js.map +1 -1
  33. package/resources/annotation-queues/annotation-queues.mjs.map +1 -1
  34. package/resources/runs/runs.d.mts +14 -1
  35. package/resources/runs/runs.d.mts.map +1 -1
  36. package/resources/runs/runs.d.ts +14 -1
  37. package/resources/runs/runs.d.ts.map +1 -1
  38. package/resources/runs/runs.js +4 -0
  39. package/resources/runs/runs.js.map +1 -1
  40. package/resources/runs/runs.mjs +4 -0
  41. package/resources/runs/runs.mjs.map +1 -1
  42. package/resources/sandboxes/boxes.d.mts +32 -0
  43. package/resources/sandboxes/boxes.d.mts.map +1 -1
  44. package/resources/sandboxes/boxes.d.ts +32 -0
  45. package/resources/sandboxes/boxes.d.ts.map +1 -1
  46. package/resources/sandboxes/sandboxes.d.mts +32 -0
  47. package/resources/sandboxes/sandboxes.d.mts.map +1 -1
  48. package/resources/sandboxes/sandboxes.d.ts +32 -0
  49. package/resources/sandboxes/sandboxes.d.ts.map +1 -1
  50. package/resources/sandboxes/sandboxes.js.map +1 -1
  51. package/resources/sandboxes/sandboxes.mjs.map +1 -1
  52. package/resources/threads/threads.d.mts +13 -1
  53. package/resources/threads/threads.d.mts.map +1 -1
  54. package/resources/threads/threads.d.ts +13 -1
  55. package/resources/threads/threads.d.ts.map +1 -1
  56. package/resources/threads/threads.js +4 -0
  57. package/resources/threads/threads.js.map +1 -1
  58. package/resources/threads/threads.mjs +4 -0
  59. package/resources/threads/threads.mjs.map +1 -1
  60. package/resources/traces.d.mts +34 -16
  61. package/resources/traces.d.mts.map +1 -1
  62. package/resources/traces.d.ts +34 -16
  63. package/resources/traces.d.ts.map +1 -1
  64. package/resources/traces.js +7 -1
  65. package/resources/traces.js.map +1 -1
  66. package/resources/traces.mjs +7 -1
  67. package/resources/traces.mjs.map +1 -1
  68. package/src/lib/sandbox/README.md +3 -2
  69. package/src/lib/sandbox/index.ts +1 -0
  70. package/src/lib/sandbox/mounts.ts +8 -0
  71. package/src/lib/sandbox/types.ts +8 -0
  72. package/src/lib/sandbox/verify.ts +107 -28
  73. package/src/resources/annotation-queues/annotation-queues.ts +46 -2
  74. package/src/resources/runs/runs.ts +15 -1
  75. package/src/resources/sandboxes/boxes.ts +40 -0
  76. package/src/resources/sandboxes/sandboxes.ts +40 -0
  77. package/src/resources/threads/threads.ts +14 -1
  78. package/src/resources/traces.ts +38 -16
  79. package/src/version.ts +1 -1
  80. package/version.d.mts +1 -1
  81. package/version.d.ts +1 -1
  82. package/version.js +1 -1
  83. package/version.mjs +1 -1
@@ -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.12'; // 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.12";
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.12";
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.12'; // 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.12'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map