langsmith 0.10.8 → 0.10.9

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 (98) hide show
  1. package/dist/_openapi_client/client.cjs +26 -2
  2. package/dist/_openapi_client/client.d.ts +15 -6
  3. package/dist/_openapi_client/client.js +27 -3
  4. package/dist/_openapi_client/internal/detect-platform.cjs +1 -1
  5. package/dist/_openapi_client/internal/detect-platform.js +1 -1
  6. package/dist/_openapi_client/resources/annotation-queues/items.cjs +13 -6
  7. package/dist/_openapi_client/resources/annotation-queues/items.d.ts +33 -8
  8. package/dist/_openapi_client/resources/annotation-queues/items.js +13 -6
  9. package/dist/_openapi_client/resources/datasets/datasets.cjs +9 -0
  10. package/dist/_openapi_client/resources/datasets/datasets.d.ts +4 -0
  11. package/dist/_openapi_client/resources/datasets/datasets.js +9 -0
  12. package/dist/_openapi_client/resources/datasets/examples.cjs +26 -0
  13. package/dist/_openapi_client/resources/datasets/examples.d.ts +23 -0
  14. package/dist/_openapi_client/resources/datasets/examples.js +22 -0
  15. package/dist/_openapi_client/resources/fleet/fleet.cjs +54 -0
  16. package/dist/_openapi_client/resources/fleet/fleet.d.ts +9 -0
  17. package/dist/_openapi_client/resources/fleet/fleet.js +17 -0
  18. package/dist/_openapi_client/resources/fleet/threads.cjs +18 -0
  19. package/dist/_openapi_client/resources/fleet/threads.d.ts +19 -0
  20. package/dist/_openapi_client/resources/fleet/threads.js +14 -0
  21. package/dist/_openapi_client/resources/index.cjs +8 -2
  22. package/dist/_openapi_client/resources/index.d.ts +6 -3
  23. package/dist/_openapi_client/resources/index.js +5 -2
  24. package/dist/_openapi_client/resources/info.d.ts +6 -0
  25. package/dist/_openapi_client/resources/issues.cjs +2 -2
  26. package/dist/_openapi_client/resources/issues.d.ts +188 -4
  27. package/dist/_openapi_client/resources/issues.js +2 -2
  28. package/dist/_openapi_client/resources/online-evaluators.cjs +7 -4
  29. package/dist/_openapi_client/resources/online-evaluators.d.ts +63 -4
  30. package/dist/_openapi_client/resources/online-evaluators.js +7 -4
  31. package/dist/_openapi_client/resources/product-feedback.cjs +33 -0
  32. package/dist/_openapi_client/resources/product-feedback.d.ts +77 -0
  33. package/dist/_openapi_client/resources/product-feedback.js +29 -0
  34. package/dist/_openapi_client/resources/runs/runs.d.ts +26 -16
  35. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +44 -4
  36. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +256 -21
  37. package/dist/_openapi_client/resources/sandboxes/boxes.js +44 -4
  38. package/dist/_openapi_client/resources/sandboxes/registries.d.ts +10 -2
  39. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +13 -0
  40. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +169 -14
  41. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +13 -0
  42. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +10 -6
  43. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +37 -6
  44. package/dist/_openapi_client/resources/sandboxes/snapshots.js +10 -6
  45. package/dist/_openapi_client/resources/sessions.cjs +23 -0
  46. package/dist/_openapi_client/resources/sessions.d.ts +732 -0
  47. package/dist/_openapi_client/resources/sessions.js +19 -0
  48. package/dist/_openapi_client/resources/threads/index.cjs +9 -0
  49. package/dist/_openapi_client/resources/threads/index.d.ts +2 -0
  50. package/dist/_openapi_client/resources/threads/index.js +4 -0
  51. package/dist/_openapi_client/resources/threads/share.cjs +61 -0
  52. package/dist/_openapi_client/resources/threads/share.d.ts +71 -0
  53. package/dist/_openapi_client/resources/threads/share.js +57 -0
  54. package/dist/_openapi_client/resources/threads/threads.cjs +143 -0
  55. package/dist/_openapi_client/resources/threads/threads.d.ts +973 -0
  56. package/dist/_openapi_client/resources/threads/threads.js +106 -0
  57. package/dist/_openapi_client/resources/threads.cjs +15 -67
  58. package/dist/_openapi_client/resources/threads.d.ts +1 -709
  59. package/dist/_openapi_client/resources/threads.js +1 -65
  60. package/dist/_openapi_client/resources/traces.d.ts +7 -1
  61. package/dist/_openapi_client/version.cjs +1 -1
  62. package/dist/_openapi_client/version.js +1 -1
  63. package/dist/address.cjs +160 -59
  64. package/dist/address.d.ts +59 -26
  65. package/dist/address.js +154 -55
  66. package/dist/anonymizer/index.cjs +1 -1
  67. package/dist/anonymizer/index.js +1 -1
  68. package/dist/client.cjs +39 -19
  69. package/dist/client.d.ts +20 -4
  70. package/dist/client.js +34 -14
  71. package/dist/index.cjs +5 -3
  72. package/dist/index.d.ts +2 -2
  73. package/dist/index.js +2 -2
  74. package/dist/run_trees.cjs +18 -21
  75. package/dist/run_trees.d.ts +4 -4
  76. package/dist/run_trees.js +15 -18
  77. package/dist/sandbox/client.cjs +33 -4
  78. package/dist/sandbox/client.d.ts +4 -0
  79. package/dist/sandbox/client.js +34 -5
  80. package/dist/sandbox/command_handle.cjs +8 -0
  81. package/dist/sandbox/command_handle.js +8 -0
  82. package/dist/sandbox/sandbox.cjs +7 -0
  83. package/dist/sandbox/sandbox.js +7 -0
  84. package/dist/sandbox/service_url.cjs +9 -1
  85. package/dist/sandbox/service_url.d.ts +2 -1
  86. package/dist/sandbox/service_url.js +9 -1
  87. package/dist/sandbox/tracing.cjs +13 -0
  88. package/dist/sandbox/tracing.d.ts +1 -0
  89. package/dist/sandbox/tracing.js +10 -0
  90. package/dist/schemas.d.ts +3 -3
  91. package/dist/traceable.cjs +5 -4
  92. package/dist/traceable.js +4 -3
  93. package/dist/utils/{agent_addressing.cjs → addressing.cjs} +20 -11
  94. package/dist/utils/{agent_addressing.d.ts → addressing.d.ts} +4 -6
  95. package/dist/utils/{agent_addressing.js → addressing.js} +21 -11
  96. package/dist/utils/env.cjs +6 -4
  97. package/dist/utils/env.js +6 -4
  98. package/package.json +1 -1
@@ -0,0 +1,106 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ import { APIResource } from '../../core/resource.js';
4
+ import * as ShareAPI from './share.js';
5
+ import { Share, } from './share.js';
6
+ import { ItemsCursorGetPagination, ItemsCursorPostPagination, } from '../../core/pagination.js';
7
+ import { buildHeaders } from '../../internal/headers.js';
8
+ import { path } from '../../internal/utils/path.js';
9
+ export class Threads extends APIResource {
10
+ constructor() {
11
+ super(...arguments);
12
+ Object.defineProperty(this, "share", {
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true,
16
+ value: new ShareAPI.Share(this._client)
17
+ });
18
+ }
19
+ /**
20
+ * GET with body payload — no resources created. Returns aggregate statistics for
21
+ * threads in a tracing project. The response includes the thread counts, run
22
+ * counts, latency percentiles, rates, token totals, and cost totals requested in
23
+ * `select`.
24
+ *
25
+ * Self-hosted deployments require LangSmith `v0.17` or later.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const response = await client.threads.aggregateStats({
30
+ * project_id: '0190a1b2-c3d4-7ef0-a5b6-6ea3a82e9328',
31
+ * select: [
32
+ * 'THREAD_COUNT',
33
+ * 'TRACE_COUNT',
34
+ * 'TOTAL_TOKENS',
35
+ * 'TOTAL_COST',
36
+ * ],
37
+ * });
38
+ * ```
39
+ */
40
+ aggregateStats(body, options) {
41
+ return this._client.post('/api/v2/threads/stats', { body, ...options });
42
+ }
43
+ /**
44
+ * Retrieve all traces belonging to a specific thread within a project.
45
+ *
46
+ * Self-hosted deployments require LangSmith `v0.16` or later.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * // Automatically fetches more pages as needed.
51
+ * for await (const threadTrace of client.threads.listTraces(
52
+ * 'thread_id',
53
+ * { project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
54
+ * )) {
55
+ * // ...
56
+ * }
57
+ * ```
58
+ */
59
+ listTraces(threadID, query, options) {
60
+ return this._client.getAPIList(path `/api/v2/threads/${threadID}/traces`, (ItemsCursorGetPagination), { query, ...options });
61
+ }
62
+ /**
63
+ * Query threads within a project (session), with cursor-based pagination. Returns
64
+ * threads matching the given time range and optional filters.
65
+ *
66
+ * Self-hosted deployments require LangSmith `v0.16` or later.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * // Automatically fetches more pages as needed.
71
+ * for await (const thread of client.threads.query()) {
72
+ * // ...
73
+ * }
74
+ * ```
75
+ */
76
+ query(params, options) {
77
+ const { Accept, ...body } = params;
78
+ return this._client.getAPIList('/api/v2/threads/query', (ItemsCursorPostPagination), {
79
+ body,
80
+ method: 'post',
81
+ ...options,
82
+ headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
83
+ });
84
+ }
85
+ /**
86
+ * Compute aggregate stats for a single thread (turn count, latency percentiles,
87
+ * token/cost sums, and detail breakdowns) within a project.
88
+ *
89
+ * Self-hosted deployments require LangSmith `v0.16` or later.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * const threadStats = await client.threads.stats(
94
+ * 'thread_id',
95
+ * {
96
+ * selects: ['TURNS'],
97
+ * session_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
98
+ * },
99
+ * );
100
+ * ```
101
+ */
102
+ stats(threadID, query, options) {
103
+ return this._client.get(path `/api/v2/threads/${threadID}/stats`, { query, ...options });
104
+ }
105
+ }
106
+ Threads.Share = Share;
@@ -1,71 +1,19 @@
1
1
  "use strict";
2
2
  // @ts-nocheck
3
3
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.Threads = void 0;
6
- const resource_js_1 = require("../core/resource.cjs");
7
- const pagination_js_1 = require("../core/pagination.cjs");
8
- const path_js_1 = require("../internal/utils/path.cjs");
9
- class Threads extends resource_js_1.APIResource {
10
- /**
11
- * Retrieve all traces belonging to a specific thread within a project.
12
- *
13
- * Self-hosted deployments require LangSmith `v0.16` or later.
14
- *
15
- * @example
16
- * ```ts
17
- * // Automatically fetches more pages as needed.
18
- * for await (const threadTrace of client.threads.listTraces(
19
- * 'thread_id',
20
- * { project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
21
- * )) {
22
- * // ...
23
- * }
24
- * ```
25
- */
26
- listTraces(threadID, query, options) {
27
- return this._client.getAPIList((0, path_js_1.path) `/api/v2/threads/${threadID}/traces`, (pagination_js_1.ItemsCursorGetPagination), { query, ...options });
28
- }
29
- /**
30
- * Query threads within a project (session), with cursor-based pagination. Returns
31
- * threads matching the given time range and optional filters.
32
- *
33
- * Self-hosted deployments require LangSmith `v0.16` or later.
34
- *
35
- * @example
36
- * ```ts
37
- * // Automatically fetches more pages as needed.
38
- * for await (const thread of client.threads.query()) {
39
- * // ...
40
- * }
41
- * ```
42
- */
43
- query(body, options) {
44
- return this._client.getAPIList('/api/v2/threads/query', (pagination_js_1.ItemsCursorPostPagination), {
45
- body,
46
- method: 'post',
47
- ...options,
48
- });
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
49
9
  }
50
- /**
51
- * Compute aggregate stats for a single thread (turn count, latency percentiles,
52
- * token/cost sums, and detail breakdowns) within a project.
53
- *
54
- * Self-hosted deployments require LangSmith `v0.16` or later.
55
- *
56
- * @example
57
- * ```ts
58
- * const threadStats = await client.threads.stats(
59
- * 'thread_id',
60
- * {
61
- * selects: ['TURNS'],
62
- * session_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
63
- * },
64
- * );
65
- * ```
66
- */
67
- stats(threadID, query, options) {
68
- return this._client.get((0, path_js_1.path) `/api/v2/threads/${threadID}/stats`, { query, ...options });
69
- }
70
- }
71
- exports.Threads = Threads;
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ __exportStar(require("./threads/index.cjs"), exports);