langsmith 0.5.15 → 0.5.16

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.
package/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains the TypeScript client for interacting with the [LangSmith
8
8
  To install:
9
9
 
10
10
  ```bash
11
- yarn add langsmith
11
+ pnpm add langsmith
12
12
  ```
13
13
 
14
14
  LangSmith helps you and your team develop and evaluate language models and intelligent agents. It is compatible with any LLM Application and provides seamless integration with [LangChain](https://github.com/hwchase17/langchainjs), a widely recognized open-source framework that simplifies the process for developers to create powerful language model applications.
@@ -43,7 +43,7 @@ You can log traces natively in your LangChain application or using a LangSmith R
43
43
  LangSmith seamlessly integrates with the JavaScript LangChain library to record traces from your LLM applications.
44
44
 
45
45
  ```bash
46
- yarn add langchain
46
+ pnpm add langchain
47
47
  ```
48
48
 
49
49
  1. **Copy the environment variables from the Settings Page and add them to your application.**
package/dist/client.cjs CHANGED
@@ -603,6 +603,10 @@ class Client {
603
603
  this.webUrl = "https://eu.smith.langchain.com";
604
604
  return this.webUrl;
605
605
  }
606
+ else if (this.apiUrl.split(".", 1)[0].includes("aws")) {
607
+ this.webUrl = "https://aws.smith.langchain.com";
608
+ return this.webUrl;
609
+ }
606
610
  else if (this.apiUrl.split(".", 1)[0].includes("beta")) {
607
611
  this.webUrl = "https://beta.smith.langchain.com";
608
612
  return this.webUrl;
package/dist/client.js CHANGED
@@ -565,6 +565,10 @@ export class Client {
565
565
  this.webUrl = "https://eu.smith.langchain.com";
566
566
  return this.webUrl;
567
567
  }
568
+ else if (this.apiUrl.split(".", 1)[0].includes("aws")) {
569
+ this.webUrl = "https://aws.smith.langchain.com";
570
+ return this.webUrl;
571
+ }
568
572
  else if (this.apiUrl.split(".", 1)[0].includes("beta")) {
569
573
  this.webUrl = "https://beta.smith.langchain.com";
570
574
  return this.webUrl;
package/dist/index.cjs CHANGED
@@ -17,5 +17,5 @@ Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { r
17
17
  Object.defineProperty(exports, "PromptCache", { enumerable: true, get: function () { return index_js_1.PromptCache; } });
18
18
  Object.defineProperty(exports, "configureGlobalPromptCache", { enumerable: true, get: function () { return index_js_1.configureGlobalPromptCache; } });
19
19
  Object.defineProperty(exports, "promptCacheSingleton", { enumerable: true, get: function () { return index_js_1.promptCacheSingleton; } });
20
- // Update using yarn bump-version
21
- exports.__version__ = "0.5.15";
20
+ // Update using pnpm bump-version
21
+ exports.__version__ = "0.5.16";
package/dist/index.d.ts CHANGED
@@ -5,4 +5,4 @@ export { overrideFetchImplementation } from "./singletons/fetch.js";
5
5
  export { getDefaultProjectName } from "./utils/project.js";
6
6
  export { uuid7, uuid7FromTime } from "./uuid.js";
7
7
  export { Cache, PromptCache, type CacheConfig, type CacheMetrics, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
8
- export declare const __version__ = "0.5.15";
8
+ export declare const __version__ = "0.5.16";
package/dist/index.js CHANGED
@@ -4,5 +4,5 @@ export { overrideFetchImplementation } from "./singletons/fetch.js";
4
4
  export { getDefaultProjectName } from "./utils/project.js";
5
5
  export { uuid7, uuid7FromTime } from "./uuid.js";
6
6
  export { Cache, PromptCache, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
7
- // Update using yarn bump-version
8
- export const __version__ = "0.5.15";
7
+ // Update using pnpm bump-version
8
+ export const __version__ = "0.5.16";
@@ -5,7 +5,7 @@
5
5
  * via the package.json browser field.
6
6
  */
7
7
  import * as nodePath from "node:path";
8
- export declare const path: nodePath.PlatformPath;
8
+ export declare const path: typeof nodePath;
9
9
  export declare function mkdir(dir: string): Promise<void>;
10
10
  export declare function writeFileAtomic(filePath: string, content: string): Promise<void>;
11
11
  export declare function readdir(dir: string): Promise<string[]>;
@@ -325,6 +325,10 @@ const wrapAnthropic = (anthropic, options) => {
325
325
  Object.assign(tracedBeta.messages, anthropic.beta.messages);
326
326
  // Wrap beta.messages.create
327
327
  tracedBeta.messages.create = (0, traceable_js_1.traceable)(anthropic.beta.messages.create.bind(anthropic.beta.messages), messagesCreateConfig);
328
+ // Wrap beta.messages.parse if it exists
329
+ if (typeof anthropic.beta.messages.parse === "function") {
330
+ tracedBeta.messages.parse = (0, traceable_js_1.traceable)(anthropic.beta.messages.parse.bind(anthropic.beta.messages), messagesCreateConfig);
331
+ }
328
332
  // Wrap beta.messages.stream if it exists
329
333
  if (typeof anthropic.beta.messages.stream === "function") {
330
334
  tracedBeta.messages.stream = (0, traceable_js_1.traceable)(wrapStreamMethod(anthropic.beta.messages.stream.bind(anthropic.beta.messages)), {
@@ -6,6 +6,7 @@ import { KVMap } from "../schemas.js";
6
6
  type ExtraRunTreeConfig = Pick<Partial<RunTreeConfig>, "name" | "metadata" | "tags">;
7
7
  type MessagesNamespace = {
8
8
  create: (...args: any[]) => any;
9
+ parse?: (...args: any[]) => any;
9
10
  stream: (...args: any[]) => any;
10
11
  };
11
12
  type AnthropicType = {
@@ -321,6 +321,10 @@ export const wrapAnthropic = (anthropic, options) => {
321
321
  Object.assign(tracedBeta.messages, anthropic.beta.messages);
322
322
  // Wrap beta.messages.create
323
323
  tracedBeta.messages.create = traceable(anthropic.beta.messages.create.bind(anthropic.beta.messages), messagesCreateConfig);
324
+ // Wrap beta.messages.parse if it exists
325
+ if (typeof anthropic.beta.messages.parse === "function") {
326
+ tracedBeta.messages.parse = traceable(anthropic.beta.messages.parse.bind(anthropic.beta.messages), messagesCreateConfig);
327
+ }
324
328
  // Wrap beta.messages.stream if it exists
325
329
  if (typeof anthropic.beta.messages.stream === "function") {
326
330
  tracedBeta.messages.stream = traceable(wrapStreamMethod(anthropic.beta.messages.stream.bind(anthropic.beta.messages)), {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.5.15",
3
+ "version": "0.5.16",
4
4
  "description": "Client library to connect to the LangSmith Observability and Evaluation Platform.",
5
- "packageManager": "yarn@1.22.19",
5
+ "packageManager": "pnpm@10.33.0",
6
6
  "files": [
7
7
  "dist/",
8
8
  "client.cjs",
@@ -106,8 +106,8 @@
106
106
  "main": "./dist/index.js",
107
107
  "types": "./dist/index.d.ts",
108
108
  "scripts": {
109
- "build": "yarn clean && yarn build:esm && yarn build:cjs && node scripts/create-entrypoints.js",
110
- "build:typedoc": "yarn build && rm -rf ./_build/api_refs && npx typedoc",
109
+ "build": "pnpm clean && pnpm build:esm && pnpm build:cjs && node scripts/create-entrypoints.js",
110
+ "build:typedoc": "pnpm build && rm -rf ./_build/api_refs && npx typedoc",
111
111
  "bump-version": "node scripts/bump-version.js",
112
112
  "check-version": "node scripts/check-version.js",
113
113
  "check-npm-version": "node scripts/check-npm-version.js",
@@ -116,17 +116,17 @@
116
116
  "build:cjs": "echo '{}' > src/package.json && tsc --outDir dist-cjs/ -p tsconfig.cjs.json && node scripts/move-cjs-to-dist.js && rm -r dist-cjs src/package.json",
117
117
  "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --passWithNoTests --testPathIgnorePatterns='\\.int\\.test.[tj]s' --testTimeout 30000",
118
118
  "test:integration": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --testPathPattern=\\.int\\.test.ts --testTimeout 100000",
119
- "test:single": "NODE_OPTIONS=--experimental-vm-modules yarn run jest --config jest.config.cjs --testTimeout 100000",
120
- "watch:single": "NODE_OPTIONS=--experimental-vm-modules yarn run jest --watch --config jest.config.cjs --testTimeout 100000",
119
+ "test:single": "NODE_OPTIONS=--experimental-vm-modules pnpm jest --config jest.config.cjs --testTimeout 100000",
120
+ "watch:single": "NODE_OPTIONS=--experimental-vm-modules pnpm jest --watch --config jest.config.cjs --testTimeout 100000",
121
121
  "test:vitest": "vitest run --config vitest.config.ts",
122
122
  "test:eval:vitest": "vitest run --config ls.vitest.config.ts",
123
123
  "lint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/",
124
- "lint:fix": "yarn lint --fix",
124
+ "lint:fix": "pnpm lint --fix",
125
125
  "format": "prettier --write 'src/**/*.{ts,tsx,mts}'",
126
126
  "format:check": "prettier --check 'src/**/*.{ts,tsx,mts}'",
127
127
  "check:types": "tsc --noEmit",
128
128
  "precommit": "lint-staged",
129
- "prepublish": "yarn run build"
129
+ "prepublish": "pnpm run build"
130
130
  },
131
131
  "repository": {
132
132
  "type": "git",
@@ -145,7 +145,6 @@
145
145
  },
146
146
  "homepage": "https://github.com/langchain-ai/langsmith-sdk#readme",
147
147
  "dependencies": {
148
- "@types/uuid": "^10.0.0",
149
148
  "chalk": "^5.6.2",
150
149
  "console-table-printer": "^2.12.1",
151
150
  "p-queue": "^6.6.2",
@@ -167,13 +166,16 @@
167
166
  "@langchain/langgraph": "^0.3.6",
168
167
  "@langchain/openai": "^0.5.16",
169
168
  "@opentelemetry/api": "^1.9.0",
170
- "@opentelemetry/auto-instrumentations-node": "^0.71.0",
169
+ "@opentelemetry/auto-instrumentations-node": "^0.72.0",
170
+ "@opentelemetry/context-async-hooks": "^2.6.1",
171
171
  "@opentelemetry/sdk-node": "^0.214.0",
172
172
  "@opentelemetry/sdk-trace-base": "^2.0.0",
173
173
  "@opentelemetry/sdk-trace-node": "^2.0.0",
174
174
  "@tsconfig/recommended": "^1.0.2",
175
175
  "@types/jest": "^29.5.1",
176
176
  "@types/node-fetch": "^2.6.12",
177
+ "@types/semver": "^7.7.1",
178
+ "@types/uuid": "^10.0.0",
177
179
  "@types/ws": "^8.18.1",
178
180
  "@typescript-eslint/eslint-plugin": "^5.59.8",
179
181
  "@typescript-eslint/parser": "^5.59.8",
@@ -450,9 +452,10 @@
450
452
  },
451
453
  "./package.json": "./package.json"
452
454
  },
453
- "resolutions": {
454
- "js-yaml": "^4.1.1",
455
- "rimraf/**/glob": "10.5.0"
455
+ "pnpm": {
456
+ "overrides": {
457
+ "js-yaml": "^4.1.1"
458
+ }
456
459
  },
457
460
  "browser": {
458
461
  "./dist/utils/fs.js": "./dist/utils/fs.browser.js"