@langchain/langgraph 0.0.9-rc.0 → 0.0.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.
@@ -158,7 +158,8 @@ class Pregel extends runnables_1.Runnable {
158
158
  writable: true,
159
159
  value: []
160
160
  });
161
- (0, async_local_storage_js_1.initializeAsyncLocalStorage)();
161
+ // Initialize global async local storage instance for tracing
162
+ (0, async_local_storage_js_1.initializeAsyncLocalStorageSingleton)();
162
163
  this.channels = fields.channels ?? this.channels;
163
164
  this.output = fields.output ?? this.output;
164
165
  this.input = fields.input ?? this.input;
@@ -9,7 +9,7 @@ import { ReservedChannelsMap } from "./reserved.js";
9
9
  import { mapInput, mapOutput } from "./io.js";
10
10
  import { ChannelWrite } from "./write.js";
11
11
  import { CONFIG_KEY_READ, CONFIG_KEY_SEND } from "../constants.js";
12
- import { initializeAsyncLocalStorage } from "../setup/async_local_storage.js";
12
+ import { initializeAsyncLocalStorageSingleton } from "../setup/async_local_storage.js";
13
13
  const DEFAULT_RECURSION_LIMIT = 25;
14
14
  export class GraphRecursionError extends Error {
15
15
  constructor(message) {
@@ -153,7 +153,8 @@ export class Pregel extends Runnable {
153
153
  writable: true,
154
154
  value: []
155
155
  });
156
- initializeAsyncLocalStorage();
156
+ // Initialize global async local storage instance for tracing
157
+ initializeAsyncLocalStorageSingleton();
157
158
  this.channels = fields.channels ?? this.channels;
158
159
  this.output = fields.output ?? this.output;
159
160
  this.input = fields.input ?? this.input;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initializeAsyncLocalStorage = void 0;
3
+ exports.initializeAsyncLocalStorageSingleton = void 0;
4
4
  const singletons_1 = require("@langchain/core/singletons");
5
5
  const async_hooks_1 = require("async_hooks");
6
- function initializeAsyncLocalStorage() {
6
+ function initializeAsyncLocalStorageSingleton() {
7
7
  singletons_1.AsyncLocalStorageProviderSingleton.initializeGlobalInstance(new async_hooks_1.AsyncLocalStorage());
8
8
  }
9
- exports.initializeAsyncLocalStorage = initializeAsyncLocalStorage;
9
+ exports.initializeAsyncLocalStorageSingleton = initializeAsyncLocalStorageSingleton;
@@ -1 +1 @@
1
- export declare function initializeAsyncLocalStorage(): void;
1
+ export declare function initializeAsyncLocalStorageSingleton(): void;
@@ -1,5 +1,5 @@
1
1
  import { AsyncLocalStorageProviderSingleton } from "@langchain/core/singletons";
2
2
  import { AsyncLocalStorage } from "async_hooks";
3
- export function initializeAsyncLocalStorage() {
3
+ export function initializeAsyncLocalStorageSingleton() {
4
4
  AsyncLocalStorageProviderSingleton.initializeGlobalInstance(new AsyncLocalStorage());
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph",
3
- "version": "0.0.9-rc.0",
3
+ "version": "0.0.9",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {
@@ -43,7 +43,7 @@
43
43
  "@jest/globals": "^29.5.0",
44
44
  "@langchain/community": "^0.0.27",
45
45
  "@langchain/openai": "^0.0.14",
46
- "@langchain/scripts": "latest",
46
+ "@langchain/scripts": "~0.0",
47
47
  "@swc/core": "^1.3.90",
48
48
  "@swc/jest": "^0.2.29",
49
49
  "@tsconfig/recommended": "^1.0.3",