langsmith 0.7.10 → 0.7.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 (103) hide show
  1. package/README.md +46 -15
  2. package/dist/_openapi_client/client.cjs +0 -80
  3. package/dist/_openapi_client/client.d.ts +2 -32
  4. package/dist/_openapi_client/client.js +0 -80
  5. package/dist/_openapi_client/core/pagination.cjs +2 -2
  6. package/dist/_openapi_client/core/pagination.js +2 -2
  7. package/dist/_openapi_client/internal/utils/query.cjs +1 -1
  8. package/dist/_openapi_client/internal/utils/query.js +1 -1
  9. package/dist/_openapi_client/resources/datasets/datasets.d.ts +52 -4
  10. package/dist/_openapi_client/resources/index.cjs +1 -21
  11. package/dist/_openapi_client/resources/index.d.ts +1 -11
  12. package/dist/_openapi_client/resources/index.js +0 -10
  13. package/dist/_openapi_client/resources/runs/index.cjs +9 -0
  14. package/dist/_openapi_client/resources/runs/index.d.ts +2 -0
  15. package/dist/_openapi_client/resources/runs/index.js +4 -0
  16. package/dist/_openapi_client/resources/runs/runs.cjs +54 -41
  17. package/dist/_openapi_client/resources/runs/runs.d.ts +571 -313
  18. package/dist/_openapi_client/resources/runs/runs.js +54 -41
  19. package/dist/_openapi_client/resources/runs.cjs +19 -0
  20. package/dist/_openapi_client/resources/runs.d.ts +1 -0
  21. package/dist/_openapi_client/resources/runs.js +3 -0
  22. package/dist/anonymizer/index.cjs +142 -0
  23. package/dist/anonymizer/index.d.ts +45 -0
  24. package/dist/anonymizer/index.js +140 -0
  25. package/dist/client.cjs +29 -1
  26. package/dist/client.d.ts +6 -1
  27. package/dist/client.js +28 -1
  28. package/dist/index.cjs +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/sandbox/client.cjs +5 -8
  32. package/dist/sandbox/client.js +5 -8
  33. package/dist/sandbox/index.cjs +2 -1
  34. package/dist/sandbox/index.d.ts +2 -2
  35. package/dist/sandbox/index.js +1 -1
  36. package/dist/sandbox/mounts.cjs +157 -18
  37. package/dist/sandbox/mounts.d.ts +10 -2
  38. package/dist/sandbox/mounts.js +155 -18
  39. package/dist/sandbox/proxy_config.cjs +19 -44
  40. package/dist/sandbox/proxy_config.d.ts +2 -4
  41. package/dist/sandbox/proxy_config.js +19 -43
  42. package/dist/sandbox/types.d.ts +56 -15
  43. package/dist/utils/constants.cjs +4 -0
  44. package/dist/utils/constants.d.ts +1 -0
  45. package/dist/utils/constants.js +1 -0
  46. package/package.json +5 -5
  47. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +0 -138
  48. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +0 -367
  49. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +0 -101
  50. package/dist/_openapi_client/resources/annotation-queues/runs.cjs +0 -46
  51. package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +0 -128
  52. package/dist/_openapi_client/resources/annotation-queues/runs.js +0 -42
  53. package/dist/_openapi_client/resources/commits.cjs +0 -44
  54. package/dist/_openapi_client/resources/commits.d.ts +0 -204
  55. package/dist/_openapi_client/resources/commits.js +0 -40
  56. package/dist/_openapi_client/resources/evaluators.cjs +0 -15
  57. package/dist/_openapi_client/resources/evaluators.d.ts +0 -125
  58. package/dist/_openapi_client/resources/evaluators.js +0 -11
  59. package/dist/_openapi_client/resources/examples/bulk.cjs +0 -24
  60. package/dist/_openapi_client/resources/examples/bulk.d.ts +0 -78
  61. package/dist/_openapi_client/resources/examples/bulk.js +0 -20
  62. package/dist/_openapi_client/resources/examples/examples.cjs +0 -124
  63. package/dist/_openapi_client/resources/examples/examples.d.ts +0 -182
  64. package/dist/_openapi_client/resources/examples/examples.js +0 -87
  65. package/dist/_openapi_client/resources/examples/validate.cjs +0 -21
  66. package/dist/_openapi_client/resources/examples/validate.d.ts +0 -38
  67. package/dist/_openapi_client/resources/examples/validate.js +0 -17
  68. package/dist/_openapi_client/resources/feedback/configs.cjs +0 -24
  69. package/dist/_openapi_client/resources/feedback/configs.d.ts +0 -18
  70. package/dist/_openapi_client/resources/feedback/configs.js +0 -20
  71. package/dist/_openapi_client/resources/feedback/feedback.cjs +0 -98
  72. package/dist/_openapi_client/resources/feedback/feedback.d.ts +0 -275
  73. package/dist/_openapi_client/resources/feedback/feedback.js +0 -61
  74. package/dist/_openapi_client/resources/feedback/tokens.cjs +0 -35
  75. package/dist/_openapi_client/resources/feedback/tokens.d.ts +0 -130
  76. package/dist/_openapi_client/resources/feedback/tokens.js +0 -31
  77. package/dist/_openapi_client/resources/public/datasets.cjs +0 -47
  78. package/dist/_openapi_client/resources/public/datasets.d.ts +0 -152
  79. package/dist/_openapi_client/resources/public/datasets.js +0 -43
  80. package/dist/_openapi_client/resources/public/public.cjs +0 -62
  81. package/dist/_openapi_client/resources/public/public.d.ts +0 -32
  82. package/dist/_openapi_client/resources/public/public.js +0 -25
  83. package/dist/_openapi_client/resources/repos/directories.cjs +0 -40
  84. package/dist/_openapi_client/resources/repos/directories.d.ts +0 -72
  85. package/dist/_openapi_client/resources/repos/directories.js +0 -36
  86. package/dist/_openapi_client/resources/repos/repos.cjs +0 -93
  87. package/dist/_openapi_client/resources/repos/repos.d.ts +0 -188
  88. package/dist/_openapi_client/resources/repos/repos.js +0 -56
  89. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +0 -86
  90. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +0 -1121
  91. package/dist/_openapi_client/resources/sandboxes/boxes.js +0 -82
  92. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +0 -63
  93. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +0 -13
  94. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +0 -26
  95. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +0 -39
  96. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +0 -130
  97. package/dist/_openapi_client/resources/sandboxes/snapshots.js +0 -35
  98. package/dist/_openapi_client/resources/settings.cjs +0 -15
  99. package/dist/_openapi_client/resources/settings.d.ts +0 -18
  100. package/dist/_openapi_client/resources/settings.js +0 -11
  101. package/dist/_openapi_client/resources/workspaces.cjs +0 -35
  102. package/dist/_openapi_client/resources/workspaces.d.ts +0 -84
  103. package/dist/_openapi_client/resources/workspaces.js +0 -31
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // @ts-nocheck
3
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Runs = exports.Rules = void 0;
6
+ var rules_js_1 = require("./rules.cjs");
7
+ Object.defineProperty(exports, "Rules", { enumerable: true, get: function () { return rules_js_1.Rules; } });
8
+ var runs_js_1 = require("./runs.cjs");
9
+ Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_js_1.Runs; } });
@@ -0,0 +1,2 @@
1
+ export { Rules } from './rules.js';
2
+ export { Runs, type QueryRunResponse, type ResponseBodyForRunsGenerateQuery, type Run, type RunSchema, type RunStatsQueryParams, type RunTypeEnum, type RunsFilterDataSourceTypeEnum, type RunQueryV2Params, type RunRetrieveV2Params, type RunRetrieveParams, type RunQueryParams, type QueryRunResponsesItemsCursorPostPagination, } from './runs.js';
@@ -0,0 +1,4 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ export { Rules } from './rules.js';
4
+ export { Runs, } from './runs.js';
@@ -39,6 +39,8 @@ exports.Runs = void 0;
39
39
  const resource_js_1 = require("../../core/resource.cjs");
40
40
  const RulesAPI = __importStar(require("./rules.cjs"));
41
41
  const rules_js_1 = require("./rules.cjs");
42
+ const pagination_js_1 = require("../../core/pagination.cjs");
43
+ const headers_js_1 = require("../../internal/headers.cjs");
42
44
  const path_js_1 = require("../../internal/utils/path.cjs");
43
45
  class Runs extends resource_js_1.APIResource {
44
46
  constructor() {
@@ -49,53 +51,64 @@ class Runs extends resource_js_1.APIResource {
49
51
  writable: true,
50
52
  value: new RulesAPI.Rules(this._client)
51
53
  });
54
+ Object.defineProperty(this, "retrieve", {
55
+ enumerable: true,
56
+ configurable: true,
57
+ writable: true,
58
+ value: this.retrieveV2
59
+ });
60
+ Object.defineProperty(this, "query", {
61
+ enumerable: true,
62
+ configurable: true,
63
+ writable: true,
64
+ value: this.queryV2
65
+ });
52
66
  }
53
67
  /**
54
- * Queues a single run for ingestion. The request body must be a JSON-encoded run
55
- * object that follows the Run schema.
56
- */
57
- create(body, options) {
58
- return this._client.post('/runs', { body, ...options });
59
- }
60
- /**
61
- * Get a specific run.
62
- */
63
- retrieve(runID, query = {}, options) {
64
- return this._client.get((0, path_js_1.path) `/api/v1/runs/${runID}`, { query, ...options });
65
- }
66
- /**
67
- * Updates a run identified by its ID. The body should contain only the fields to
68
- * be changed; unknown fields are ignored.
69
- */
70
- update(runID, body, options) {
71
- return this._client.patch((0, path_js_1.path) `/runs/${runID}`, { body, ...options });
72
- }
73
- /**
74
- * Ingests a batch of runs in a single JSON payload. The payload must have `post`
75
- * and/or `patch` arrays containing run objects. Prefer this endpoint over
76
- * single‑run ingestion when submitting hundreds of runs, but `/runs/multipart`
77
- * offers better handling for very large fields and attachments.
78
- */
79
- ingestBatch(body, options) {
80
- return this._client.post('/runs/batch', { body, ...options });
81
- }
82
- /**
83
- * Query Runs
84
- */
85
- query(body, options) {
86
- return this._client.post('/api/v1/runs/query', { body, ...options });
87
- }
88
- /**
89
- * Get all runs by query in body payload.
68
+ * **Alpha:** The request and response contract may change; Returns a paginated
69
+ * list of runs for the given projects within min/max start_time. Supports filters,
70
+ * cursor pagination, and `selects` to select fields to return.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * // Automatically fetches more pages as needed.
75
+ * for await (const queryRunResponse of client.runs.queryV2()) {
76
+ * // ...
77
+ * }
78
+ * ```
90
79
  */
91
- stats(body, options) {
92
- return this._client.post('/api/v1/runs/stats', { body, ...options });
80
+ queryV2(params, options) {
81
+ const { Accept, ...body } = params;
82
+ return this._client.getAPIList('/v2/runs/query', (pagination_js_1.ItemsCursorPostPagination), {
83
+ body,
84
+ method: 'post',
85
+ ...options,
86
+ headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
87
+ });
93
88
  }
94
89
  /**
95
- * Update a run.
90
+ * **Alpha:** The request and response contract may change; Returns one run by ID
91
+ * for the given session and start_time. Use the `selects` query parameter
92
+ * (repeatable) to select fields to return.
93
+ *
94
+ * @example
95
+ * ```ts
96
+ * const queryRunResponse = await client.runs.retrieveV2(
97
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
98
+ * {
99
+ * project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
100
+ * start_time: '2019-12-27T18:11:19.117Z',
101
+ * },
102
+ * );
103
+ * ```
96
104
  */
97
- update2(runID, options) {
98
- return this._client.patch((0, path_js_1.path) `/api/v1/runs/${runID}`, options);
105
+ retrieveV2(runID, params, options) {
106
+ const { Accept, ...query } = params;
107
+ return this._client.get((0, path_js_1.path) `/v2/runs/${runID}`, {
108
+ query,
109
+ ...options,
110
+ headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
111
+ });
99
112
  }
100
113
  }
101
114
  exports.Runs = Runs;