langsmith 0.5.23 → 0.5.25

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 (89) hide show
  1. package/dist/client.cjs +102 -11
  2. package/dist/client.d.ts +38 -0
  3. package/dist/client.js +103 -12
  4. package/dist/evaluation/_runner.cjs +3 -3
  5. package/dist/evaluation/_runner.js +1 -1
  6. package/dist/evaluation/evaluate_comparative.cjs +10 -10
  7. package/dist/evaluation/evaluate_comparative.js +1 -1
  8. package/dist/evaluation/evaluator.cjs +2 -2
  9. package/dist/evaluation/evaluator.js +1 -1
  10. package/dist/index.cjs +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/run_trees.cjs +8 -7
  14. package/dist/run_trees.d.ts +7 -0
  15. package/dist/run_trees.js +7 -6
  16. package/dist/schemas.d.ts +4 -0
  17. package/dist/singletons/otel.cjs +3 -2
  18. package/dist/singletons/otel.js +4 -3
  19. package/dist/traceable.cjs +1 -2
  20. package/dist/traceable.js +1 -2
  21. package/dist/utils/_uuid.cjs +2 -2
  22. package/dist/utils/_uuid.js +1 -1
  23. package/dist/utils/env.cjs +33 -0
  24. package/dist/utils/env.d.ts +9 -0
  25. package/dist/utils/env.js +32 -0
  26. package/dist/utils/fast-safe-stringify/index.cjs +10 -35
  27. package/dist/utils/fast-safe-stringify/index.d.ts +14 -1
  28. package/dist/utils/fast-safe-stringify/index.js +10 -35
  29. package/dist/utils/jestlike/index.cjs +5 -5
  30. package/dist/utils/jestlike/index.js +1 -1
  31. package/dist/utils/jestlike/vendor/evaluatedBy.cjs +3 -3
  32. package/dist/utils/jestlike/vendor/evaluatedBy.js +1 -1
  33. package/dist/utils/serialize_worker.cjs +389 -0
  34. package/dist/utils/serialize_worker.d.ts +67 -0
  35. package/dist/utils/serialize_worker.js +383 -0
  36. package/dist/utils/uuid/src/index.cjs +24 -0
  37. package/dist/utils/uuid/src/index.d.ts +10 -0
  38. package/dist/utils/uuid/src/index.js +9 -0
  39. package/dist/utils/uuid/src/max.cjs +3 -0
  40. package/dist/utils/uuid/src/max.d.ts +2 -0
  41. package/dist/utils/uuid/src/max.js +1 -0
  42. package/dist/utils/uuid/src/nil.cjs +3 -0
  43. package/dist/utils/uuid/src/nil.d.ts +2 -0
  44. package/dist/utils/uuid/src/nil.js +1 -0
  45. package/dist/utils/uuid/src/parse.cjs +23 -0
  46. package/dist/utils/uuid/src/parse.d.ts +3 -0
  47. package/dist/utils/uuid/src/parse.js +18 -0
  48. package/dist/utils/uuid/src/regex.cjs +3 -0
  49. package/dist/utils/uuid/src/regex.d.ts +2 -0
  50. package/dist/utils/uuid/src/regex.js +1 -0
  51. package/dist/utils/uuid/src/rng.cjs +10 -0
  52. package/dist/utils/uuid/src/rng.d.ts +1 -0
  53. package/dist/utils/uuid/src/rng.js +7 -0
  54. package/dist/utils/uuid/src/sha1.cjs +75 -0
  55. package/dist/utils/uuid/src/sha1.d.ts +2 -0
  56. package/dist/utils/uuid/src/sha1.js +73 -0
  57. package/dist/utils/uuid/src/stringify.cjs +55 -0
  58. package/dist/utils/uuid/src/stringify.d.ts +3 -0
  59. package/dist/utils/uuid/src/stringify.js +49 -0
  60. package/dist/utils/uuid/src/types.cjs +2 -0
  61. package/dist/utils/uuid/src/types.d.ts +22 -0
  62. package/dist/utils/uuid/src/types.js +1 -0
  63. package/dist/utils/uuid/src/v35.cjs +52 -0
  64. package/dist/utils/uuid/src/v35.d.ts +7 -0
  65. package/dist/utils/uuid/src/v35.js +44 -0
  66. package/dist/utils/uuid/src/v4.cjs +40 -0
  67. package/dist/utils/uuid/src/v4.d.ts +4 -0
  68. package/dist/utils/uuid/src/v4.js +35 -0
  69. package/dist/utils/uuid/src/v5.cjs +50 -0
  70. package/dist/utils/uuid/src/v5.d.ts +9 -0
  71. package/dist/utils/uuid/src/v5.js +9 -0
  72. package/dist/utils/uuid/src/v7.cjs +88 -0
  73. package/dist/utils/uuid/src/v7.d.ts +9 -0
  74. package/dist/utils/uuid/src/v7.js +82 -0
  75. package/dist/utils/uuid/src/validate.cjs +10 -0
  76. package/dist/utils/uuid/src/validate.d.ts +2 -0
  77. package/dist/utils/uuid/src/validate.js +5 -0
  78. package/dist/utils/uuid/src/version.cjs +13 -0
  79. package/dist/utils/uuid/src/version.d.ts +2 -0
  80. package/dist/utils/uuid/src/version.js +8 -0
  81. package/dist/utils/worker_threads.browser.cjs +16 -0
  82. package/dist/utils/worker_threads.browser.d.ts +14 -0
  83. package/dist/utils/worker_threads.browser.js +13 -0
  84. package/dist/utils/worker_threads.cjs +16 -0
  85. package/dist/utils/worker_threads.d.ts +13 -0
  86. package/dist/utils/worker_threads.js +13 -0
  87. package/dist/uuid.cjs +2 -2
  88. package/dist/uuid.js +1 -1
  89. package/package.json +4 -4
@@ -0,0 +1,2 @@
1
+ declare function validate(uuid: unknown): boolean;
2
+ export default validate;
@@ -0,0 +1,5 @@
1
+ import REGEX from "./regex.js";
2
+ function validate(uuid) {
3
+ return typeof uuid === "string" && REGEX.test(uuid);
4
+ }
5
+ export default validate;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const validate_js_1 = __importDefault(require("./validate.cjs"));
7
+ function version(uuid) {
8
+ if (!(0, validate_js_1.default)(uuid)) {
9
+ throw TypeError("Invalid UUID");
10
+ }
11
+ return parseInt(uuid.slice(14, 15), 16);
12
+ }
13
+ exports.default = version;
@@ -0,0 +1,2 @@
1
+ declare function version(uuid: string): number;
2
+ export default version;
@@ -0,0 +1,8 @@
1
+ import validate from "./validate.js";
2
+ function version(uuid) {
3
+ if (!validate(uuid)) {
4
+ throw TypeError("Invalid UUID");
5
+ }
6
+ return parseInt(uuid.slice(14, 15), 16);
7
+ }
8
+ export default version;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * worker_threads abstraction (browser / edge stub).
4
+ *
5
+ * Selected in browser / edge builds via the package.json `browser` field.
6
+ * Worker is null and WORKER_THREADS_AVAILABLE is false, so callers can
7
+ * bail out at construction time without referencing `node:worker_threads`.
8
+ *
9
+ * Intentionally does not import `node:worker_threads` -- bundlers that
10
+ * honor the browser field will never traverse the Node variant, so this
11
+ * file is what determines the browser-bundle surface.
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.WORKER_THREADS_AVAILABLE = exports.Worker = void 0;
15
+ exports.Worker = null;
16
+ exports.WORKER_THREADS_AVAILABLE = false;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * worker_threads abstraction (browser / edge stub).
3
+ *
4
+ * Selected in browser / edge builds via the package.json `browser` field.
5
+ * Worker is null and WORKER_THREADS_AVAILABLE is false, so callers can
6
+ * bail out at construction time without referencing `node:worker_threads`.
7
+ *
8
+ * Intentionally does not import `node:worker_threads` -- bundlers that
9
+ * honor the browser field will never traverse the Node variant, so this
10
+ * file is what determines the browser-bundle surface.
11
+ */
12
+ export type WorkerLike = unknown;
13
+ export declare const Worker: null;
14
+ export declare const WORKER_THREADS_AVAILABLE = false;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * worker_threads abstraction (browser / edge stub).
3
+ *
4
+ * Selected in browser / edge builds via the package.json `browser` field.
5
+ * Worker is null and WORKER_THREADS_AVAILABLE is false, so callers can
6
+ * bail out at construction time without referencing `node:worker_threads`.
7
+ *
8
+ * Intentionally does not import `node:worker_threads` -- bundlers that
9
+ * honor the browser field will never traverse the Node variant, so this
10
+ * file is what determines the browser-bundle surface.
11
+ */
12
+ export const Worker = null;
13
+ export const WORKER_THREADS_AVAILABLE = false;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * worker_threads abstraction (Node.js version).
4
+ *
5
+ * This file is swapped with worker_threads.browser.ts for browser / edge
6
+ * builds via the package.json `browser` field. Node gets the real module;
7
+ * browsers get a stub that signals unavailability.
8
+ *
9
+ * Only the surface actually used by SerializeWorker is re-exported.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.WORKER_THREADS_AVAILABLE = exports.Worker = void 0;
13
+ // eslint-disable-next-line import/no-unresolved
14
+ const node_worker_threads_1 = require("node:worker_threads");
15
+ exports.Worker = node_worker_threads_1.Worker;
16
+ exports.WORKER_THREADS_AVAILABLE = true;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * worker_threads abstraction (Node.js version).
3
+ *
4
+ * This file is swapped with worker_threads.browser.ts for browser / edge
5
+ * builds via the package.json `browser` field. Node gets the real module;
6
+ * browsers get a stub that signals unavailability.
7
+ *
8
+ * Only the surface actually used by SerializeWorker is re-exported.
9
+ */
10
+ import { Worker as NodeWorker } from "node:worker_threads";
11
+ export type WorkerLike = InstanceType<typeof NodeWorker>;
12
+ export declare const Worker: typeof NodeWorker | null;
13
+ export declare const WORKER_THREADS_AVAILABLE = true;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * worker_threads abstraction (Node.js version).
3
+ *
4
+ * This file is swapped with worker_threads.browser.ts for browser / edge
5
+ * builds via the package.json `browser` field. Node gets the real module;
6
+ * browsers get a stub that signals unavailability.
7
+ *
8
+ * Only the surface actually used by SerializeWorker is re-exported.
9
+ */
10
+ // eslint-disable-next-line import/no-unresolved
11
+ import { Worker as NodeWorker } from "node:worker_threads";
12
+ export const Worker = NodeWorker;
13
+ export const WORKER_THREADS_AVAILABLE = true;
package/dist/uuid.cjs CHANGED
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.uuid7FromTime = void 0;
4
4
  exports.uuid7 = uuid7;
5
- const uuid_1 = require("uuid");
5
+ const index_js_1 = require("./utils/uuid/src/index.cjs");
6
6
  var _uuid_js_1 = require("./utils/_uuid.cjs");
7
7
  Object.defineProperty(exports, "uuid7FromTime", { enumerable: true, get: function () { return _uuid_js_1.uuid7FromTime; } });
8
8
  /**
9
9
  * Generate a random UUID v7 string.
10
10
  */
11
11
  function uuid7() {
12
- return (0, uuid_1.v7)();
12
+ return (0, index_js_1.v7)();
13
13
  }
package/dist/uuid.js CHANGED
@@ -1,4 +1,4 @@
1
- import { v7 as uuidv7 } from "uuid";
1
+ import { v7 as uuidv7 } from "./utils/uuid/src/index.js";
2
2
  export { uuid7FromTime } from "./utils/_uuid.js";
3
3
  /**
4
4
  * Generate a random UUID v7 string.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.5.23",
3
+ "version": "0.5.25",
4
4
  "description": "Client library to connect to the LangSmith Observability and Evaluation Platform.",
5
5
  "packageManager": "pnpm@10.33.0",
6
6
  "files": [
@@ -149,8 +149,7 @@
149
149
  },
150
150
  "homepage": "https://github.com/langchain-ai/langsmith-sdk#readme",
151
151
  "dependencies": {
152
- "p-queue": "6.6.2",
153
- "uuid": "10.0.0"
152
+ "p-queue": "6.6.2"
154
153
  },
155
154
  "devDependencies": {
156
155
  "@ai-sdk/anthropic": "^3.0.0",
@@ -472,6 +471,7 @@
472
471
  }
473
472
  },
474
473
  "browser": {
475
- "./dist/utils/fs.js": "./dist/utils/fs.browser.js"
474
+ "./dist/utils/fs.js": "./dist/utils/fs.browser.js",
475
+ "./dist/utils/worker_threads.js": "./dist/utils/worker_threads.browser.js"
476
476
  }
477
477
  }