@langchain/langgraph 0.0.3-rc.0 → 0.0.3

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.
@@ -91,6 +91,9 @@ class Channel {
91
91
  }
92
92
  exports.Channel = Channel;
93
93
  class Pregel extends runnables_1.Runnable {
94
+ static lc_name() {
95
+ return "LangGraph";
96
+ }
94
97
  constructor(fields) {
95
98
  super();
96
99
  // Because Pregel extends `Runnable`.
@@ -57,6 +57,7 @@ export interface PregelOptions extends RunnableConfig {
57
57
  export type PregelInputType = any;
58
58
  export type PregelOutputType = any;
59
59
  export declare class Pregel extends Runnable<PregelInputType, PregelOutputType, PregelOptions> implements PregelInterface {
60
+ static lc_name(): string;
60
61
  lc_namespace: string[];
61
62
  channels: Record<string, BaseChannel>;
62
63
  output: string | Array<string>;
@@ -86,6 +86,9 @@ export class Channel {
86
86
  }
87
87
  }
88
88
  export class Pregel extends Runnable {
89
+ static lc_name() {
90
+ return "LangGraph";
91
+ }
89
92
  constructor(fields) {
90
93
  super();
91
94
  // Because Pregel extends `Runnable`.
package/index.d.cts ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/index.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph",
3
- "version": "0.0.3-rc.0",
3
+ "version": "0.0.3",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {
@@ -15,19 +15,24 @@
15
15
  "scripts": {
16
16
  "build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
17
17
  "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests",
18
- "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && node scripts/move-cjs-to-dist.js && rm -rf dist-cjs",
19
- "build:watch": "node scripts/create-entrypoints.js && tsc --outDir dist/ --watch",
20
- "build:scripts": "node scripts/create-entrypoints.js && node scripts/check-tree-shaking.js",
21
- "lint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/ && dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts --",
22
- "lint:fix": "yarn lint --fix",
23
- "clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 node scripts/create-entrypoints.js pre",
18
+ "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs",
19
+ "build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch",
20
+ "build:scripts": "yarn create-entrypoints && yarn check-tree-shaking",
21
+ "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/",
22
+ "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
23
+ "lint": "yarn lint:eslint && yarn lint:dpdm",
24
+ "lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
25
+ "clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn create-entrypoints -- --pre",
24
26
  "prepack": "yarn build",
25
27
  "test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
26
28
  "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
27
29
  "test:single": "NODE_OPTIONS=--experimental-vm-modules yarn run jest --config jest.config.cjs --testTimeout 100000",
28
30
  "test:int": "NODE_OPTIONS=--experimental-vm-modules jest --testPathPattern=\\.int\\.test.ts --testTimeout 100000 --maxWorkers=50%",
29
- "format": "prettier --write \"src\"",
30
- "format:check": "prettier --check \"src\""
31
+ "format": "prettier --config .prettierrc --write \"src\"",
32
+ "format:check": "prettier --config .prettierrc --check \"src\"",
33
+ "move-cjs-to-dist": "yarn lc-build --config ./langchain.config.js --move-cjs-dist",
34
+ "create-entrypoints": "yarn lc-build --config ./langchain.config.js --create-entrypoints",
35
+ "check-tree-shaking": "yarn lc-build --config ./langchain.config.js --tree-shaking"
31
36
  },
32
37
  "author": "LangChain",
33
38
  "license": "MIT",
@@ -38,6 +43,7 @@
38
43
  "@jest/globals": "^29.5.0",
39
44
  "@langchain/community": "^0.0.17",
40
45
  "@langchain/openai": "^0.0.12",
46
+ "@langchain/scripts": "~0.0",
41
47
  "@swc/core": "^1.3.90",
42
48
  "@swc/jest": "^0.2.29",
43
49
  "@tsconfig/recommended": "^1.0.3",
@@ -68,17 +74,29 @@
68
74
  },
69
75
  "exports": {
70
76
  ".": {
71
- "types": "./index.d.ts",
77
+ "types": {
78
+ "import": "./index.d.ts",
79
+ "require": "./index.d.cts",
80
+ "default": "./index.d.ts"
81
+ },
72
82
  "import": "./index.js",
73
83
  "require": "./index.cjs"
74
84
  },
75
85
  "./pregel": {
76
- "types": "./pregel.d.ts",
86
+ "types": {
87
+ "import": "./pregel.d.ts",
88
+ "require": "./pregel.d.cts",
89
+ "default": "./pregel.d.ts"
90
+ },
77
91
  "import": "./pregel.js",
78
92
  "require": "./pregel.cjs"
79
93
  },
80
94
  "./prebuilt": {
81
- "types": "./prebuilt.d.ts",
95
+ "types": {
96
+ "import": "./prebuilt.d.ts",
97
+ "require": "./prebuilt.d.cts",
98
+ "default": "./prebuilt.d.ts"
99
+ },
82
100
  "import": "./prebuilt.js",
83
101
  "require": "./prebuilt.cjs"
84
102
  },
@@ -89,11 +107,14 @@
89
107
  "index.cjs",
90
108
  "index.js",
91
109
  "index.d.ts",
110
+ "index.d.cts",
92
111
  "pregel.cjs",
93
112
  "pregel.js",
94
113
  "pregel.d.ts",
114
+ "pregel.d.cts",
95
115
  "prebuilt.cjs",
96
116
  "prebuilt.js",
97
- "prebuilt.d.ts"
117
+ "prebuilt.d.ts",
118
+ "prebuilt.d.cts"
98
119
  ]
99
120
  }
package/prebuilt.d.cts ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/prebuilt/index.js'
package/pregel.d.cts ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/pregel/index.js'