@langgraph-js/pure-graph 1.4.1 → 1.4.4

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 (50) hide show
  1. package/dist/__vite-browser-external-DGN5jhtd.js +4 -0
  2. package/dist/__vite-browser-external-DGN5jhtd.js.map +1 -0
  3. package/dist/checkpoint-BHKV54sL.js +386 -0
  4. package/dist/checkpoint-BHKV54sL.js.map +1 -0
  5. package/dist/checkpoint-DxiUsHMy.js +13 -0
  6. package/dist/checkpoint-DxiUsHMy.js.map +1 -0
  7. package/dist/global.d.ts +1 -1
  8. package/dist/index-DcXE-SZb.js +1264 -0
  9. package/dist/index-DcXE-SZb.js.map +1 -0
  10. package/dist/index.js +2 -5
  11. package/dist/index.js.map +1 -0
  12. package/dist/queue-C6iEVbd2.js +120 -0
  13. package/dist/queue-C6iEVbd2.js.map +1 -0
  14. package/dist/storage/index.d.ts +1 -1
  15. package/dist/threads-BUgBiCiK.js +302 -0
  16. package/dist/threads-BUgBiCiK.js.map +1 -0
  17. package/package.json +6 -3
  18. package/dist/adapter/hono/assistants.js +0 -21
  19. package/dist/adapter/hono/endpoint.js +0 -2
  20. package/dist/adapter/hono/index.js +0 -11
  21. package/dist/adapter/hono/runs.js +0 -54
  22. package/dist/adapter/hono/threads.js +0 -30
  23. package/dist/adapter/nextjs/endpoint.js +0 -2
  24. package/dist/adapter/nextjs/index.js +0 -2
  25. package/dist/adapter/nextjs/router.js +0 -179
  26. package/dist/adapter/zod.js +0 -127
  27. package/dist/createEndpoint.js +0 -77
  28. package/dist/global.js +0 -13
  29. package/dist/graph/stream.js +0 -195
  30. package/dist/graph/stringify.js +0 -214
  31. package/dist/queue/JsonPlusSerializer.js +0 -138
  32. package/dist/queue/event_message.js +0 -27
  33. package/dist/queue/stream_queue.js +0 -177
  34. package/dist/storage/index.js +0 -64
  35. package/dist/storage/memory/checkpoint.js +0 -2
  36. package/dist/storage/memory/queue.js +0 -81
  37. package/dist/storage/memory/threads.js +0 -145
  38. package/dist/storage/pg/checkpoint.js +0 -9
  39. package/dist/storage/pg/threads.js +0 -303
  40. package/dist/storage/redis/queue.js +0 -130
  41. package/dist/storage/sqlite/DB.js +0 -14
  42. package/dist/storage/sqlite/checkpoint.js +0 -374
  43. package/dist/storage/sqlite/threads.js +0 -299
  44. package/dist/storage/sqlite/type.js +0 -1
  45. package/dist/threads/index.js +0 -1
  46. package/dist/tsconfig.tsbuildinfo +0 -1
  47. package/dist/types.js +0 -1
  48. package/dist/utils/createEntrypointGraph.js +0 -11
  49. package/dist/utils/getGraph.js +0 -18
  50. package/dist/utils/getLangGraphCommand.js +0 -13
@@ -1,214 +0,0 @@
1
- /* eslint-disable */
2
- // @ts-nocheck
3
- // Stringify that can handle circular references.
4
- // Inlined due to ESM import issues
5
- // Source: https://www.npmjs.com/package/fast-safe-stringify
6
- var LIMIT_REPLACE_NODE = '[...]';
7
- var CIRCULAR_REPLACE_NODE = '[Circular]';
8
- var arr = [];
9
- var replacerStack = [];
10
- function defaultOptions() {
11
- return {
12
- depthLimit: Number.MAX_SAFE_INTEGER,
13
- edgesLimit: Number.MAX_SAFE_INTEGER,
14
- };
15
- }
16
- // Regular stringify
17
- export function stringify(obj, replacer, spacer, options) {
18
- if (typeof options === 'undefined') {
19
- options = defaultOptions();
20
- }
21
- decirc(obj, '', 0, [], undefined, 0, options);
22
- var res;
23
- try {
24
- if (replacerStack.length === 0) {
25
- res = JSON.stringify(obj, replacer, spacer);
26
- }
27
- else {
28
- res = JSON.stringify(obj, replaceGetterValues(replacer), spacer);
29
- }
30
- }
31
- catch (_) {
32
- return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]');
33
- }
34
- finally {
35
- while (arr.length !== 0) {
36
- var part = arr.pop();
37
- if (part.length === 4) {
38
- Object.defineProperty(part[0], part[1], part[3]);
39
- }
40
- else {
41
- part[0][part[1]] = part[2];
42
- }
43
- }
44
- }
45
- return res;
46
- }
47
- function setReplace(replace, val, k, parent) {
48
- var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);
49
- if (propertyDescriptor.get !== undefined) {
50
- if (propertyDescriptor.configurable) {
51
- Object.defineProperty(parent, k, { value: replace });
52
- arr.push([parent, k, val, propertyDescriptor]);
53
- }
54
- else {
55
- replacerStack.push([val, k, replace]);
56
- }
57
- }
58
- else {
59
- parent[k] = replace;
60
- arr.push([parent, k, val]);
61
- }
62
- }
63
- function decirc(val, k, edgeIndex, stack, parent, depth, options) {
64
- depth += 1;
65
- var i;
66
- if (typeof val === 'object' && val !== null) {
67
- for (i = 0; i < stack.length; i++) {
68
- if (stack[i] === val) {
69
- setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
70
- return;
71
- }
72
- }
73
- if (typeof options.depthLimit !== 'undefined' && depth > options.depthLimit) {
74
- setReplace(LIMIT_REPLACE_NODE, val, k, parent);
75
- return;
76
- }
77
- if (typeof options.edgesLimit !== 'undefined' && edgeIndex + 1 > options.edgesLimit) {
78
- setReplace(LIMIT_REPLACE_NODE, val, k, parent);
79
- return;
80
- }
81
- stack.push(val);
82
- // Optimize for Arrays. Big arrays could kill the performance otherwise!
83
- if (Array.isArray(val)) {
84
- for (i = 0; i < val.length; i++) {
85
- decirc(val[i], i, i, stack, val, depth, options);
86
- }
87
- }
88
- else {
89
- var keys = Object.keys(val);
90
- for (i = 0; i < keys.length; i++) {
91
- var key = keys[i];
92
- decirc(val[key], key, i, stack, val, depth, options);
93
- }
94
- }
95
- stack.pop();
96
- }
97
- }
98
- // Stable-stringify
99
- function compareFunction(a, b) {
100
- if (a < b) {
101
- return -1;
102
- }
103
- if (a > b) {
104
- return 1;
105
- }
106
- return 0;
107
- }
108
- function deterministicStringify(obj, replacer, spacer, options) {
109
- if (typeof options === 'undefined') {
110
- options = defaultOptions();
111
- }
112
- var tmp = deterministicDecirc(obj, '', 0, [], undefined, 0, options) || obj;
113
- var res;
114
- try {
115
- if (replacerStack.length === 0) {
116
- res = JSON.stringify(tmp, replacer, spacer);
117
- }
118
- else {
119
- res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer);
120
- }
121
- }
122
- catch (_) {
123
- return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]');
124
- }
125
- finally {
126
- // Ensure that we restore the object as it was.
127
- while (arr.length !== 0) {
128
- var part = arr.pop();
129
- if (part.length === 4) {
130
- Object.defineProperty(part[0], part[1], part[3]);
131
- }
132
- else {
133
- part[0][part[1]] = part[2];
134
- }
135
- }
136
- }
137
- return res;
138
- }
139
- function deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) {
140
- depth += 1;
141
- var i;
142
- if (typeof val === 'object' && val !== null) {
143
- for (i = 0; i < stack.length; i++) {
144
- if (stack[i] === val) {
145
- setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
146
- return;
147
- }
148
- }
149
- try {
150
- if (typeof val.toJSON === 'function') {
151
- return;
152
- }
153
- }
154
- catch (_) {
155
- return;
156
- }
157
- if (typeof options.depthLimit !== 'undefined' && depth > options.depthLimit) {
158
- setReplace(LIMIT_REPLACE_NODE, val, k, parent);
159
- return;
160
- }
161
- if (typeof options.edgesLimit !== 'undefined' && edgeIndex + 1 > options.edgesLimit) {
162
- setReplace(LIMIT_REPLACE_NODE, val, k, parent);
163
- return;
164
- }
165
- stack.push(val);
166
- // Optimize for Arrays. Big arrays could kill the performance otherwise!
167
- if (Array.isArray(val)) {
168
- for (i = 0; i < val.length; i++) {
169
- deterministicDecirc(val[i], i, i, stack, val, depth, options);
170
- }
171
- }
172
- else {
173
- // Create a temporary object in the required way
174
- var tmp = {};
175
- var keys = Object.keys(val).sort(compareFunction);
176
- for (i = 0; i < keys.length; i++) {
177
- var key = keys[i];
178
- deterministicDecirc(val[key], key, i, stack, val, depth, options);
179
- tmp[key] = val[key];
180
- }
181
- if (typeof parent !== 'undefined') {
182
- arr.push([parent, k, val]);
183
- parent[k] = tmp;
184
- }
185
- else {
186
- return tmp;
187
- }
188
- }
189
- stack.pop();
190
- }
191
- }
192
- // wraps replacer function to handle values we couldn't replace
193
- // and mark them as replaced value
194
- function replaceGetterValues(replacer) {
195
- replacer =
196
- typeof replacer !== 'undefined'
197
- ? replacer
198
- : function (k, v) {
199
- return v;
200
- };
201
- return function (key, val) {
202
- if (replacerStack.length > 0) {
203
- for (var i = 0; i < replacerStack.length; i++) {
204
- var part = replacerStack[i];
205
- if (part[1] === key && part[0] === val) {
206
- val = part[2];
207
- replacerStack.splice(i, 1);
208
- break;
209
- }
210
- }
211
- }
212
- return replacer.call(this, key, val);
213
- };
214
- }
@@ -1,138 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- /* eslint-disable no-instanceof/no-instanceof */
3
- import { load } from '@langchain/core/load';
4
- import { stringify } from '../graph/stringify.js';
5
- function isLangChainSerializedObject(value) {
6
- return value !== null && value.lc === 1 && value.type === 'constructor' && Array.isArray(value.id);
7
- }
8
- /**
9
- * The replacer in stringify does not allow delegation to built-in LangChain
10
- * serialization methods, and instead immediately calls `.toJSON()` and
11
- * continues to stringify subfields.
12
- *
13
- * We therefore must start from the most nested elements in the input and
14
- * deserialize upwards rather than top-down.
15
- */
16
- async function _reviver(value) {
17
- if (value && typeof value === 'object') {
18
- if (Array.isArray(value)) {
19
- const revivedArray = await Promise.all(value.map((item) => _reviver(item)));
20
- return revivedArray;
21
- }
22
- else {
23
- const revivedObj = {};
24
- for (const [k, v] of Object.entries(value)) {
25
- revivedObj[k] = await _reviver(v);
26
- }
27
- if (revivedObj.lc === 2 && revivedObj.type === 'undefined') {
28
- return undefined;
29
- }
30
- else if (revivedObj.lc === 2 && revivedObj.type === 'constructor' && Array.isArray(revivedObj.id)) {
31
- try {
32
- const constructorName = revivedObj.id[revivedObj.id.length - 1];
33
- let constructor;
34
- switch (constructorName) {
35
- case 'Set':
36
- constructor = Set;
37
- break;
38
- case 'Map':
39
- constructor = Map;
40
- break;
41
- case 'RegExp':
42
- constructor = RegExp;
43
- break;
44
- case 'Error':
45
- constructor = Error;
46
- break;
47
- default:
48
- return revivedObj;
49
- }
50
- if (revivedObj.method) {
51
- return constructor[revivedObj.method](...(revivedObj.args || []));
52
- }
53
- else {
54
- return new constructor(...(revivedObj.args || []));
55
- }
56
- }
57
- catch (error) {
58
- return revivedObj;
59
- }
60
- }
61
- else if (isLangChainSerializedObject(revivedObj)) {
62
- return load(JSON.stringify(revivedObj));
63
- }
64
- return revivedObj;
65
- }
66
- }
67
- return value;
68
- }
69
- function _encodeConstructorArgs(
70
- // eslint-disable-next-line @typescript-eslint/ban-types
71
- constructor, method, args, kwargs) {
72
- return {
73
- lc: 2,
74
- type: 'constructor',
75
- id: [constructor.name],
76
- method: method ?? null,
77
- args: args ?? [],
78
- kwargs: kwargs ?? {},
79
- };
80
- }
81
- function _default(obj) {
82
- if (obj === undefined) {
83
- return {
84
- lc: 2,
85
- type: 'undefined',
86
- };
87
- }
88
- else if (obj instanceof Set || obj instanceof Map) {
89
- return _encodeConstructorArgs(obj.constructor, undefined, [Array.from(obj)]);
90
- }
91
- else if (obj instanceof RegExp) {
92
- return _encodeConstructorArgs(RegExp, undefined, [obj.source, obj.flags]);
93
- }
94
- else if (obj instanceof Error) {
95
- return _encodeConstructorArgs(obj.constructor, undefined, [obj.message]);
96
- // TODO: Remove special case
97
- }
98
- else if (obj?.lg_name === 'Send') {
99
- return {
100
- node: obj.node,
101
- args: obj.args,
102
- };
103
- }
104
- else {
105
- return obj;
106
- }
107
- }
108
- export class JsonPlusSerializer {
109
- _dumps(obj) {
110
- const encoder = new TextEncoder();
111
- return encoder.encode(stringify(obj, (_, value) => {
112
- return _default(value);
113
- }));
114
- }
115
- async dumpsTyped(obj) {
116
- if (obj instanceof Uint8Array) {
117
- return ['bytes', obj];
118
- }
119
- else {
120
- return ['json', this._dumps(obj)];
121
- }
122
- }
123
- async _loads(data) {
124
- const parsed = JSON.parse(data);
125
- return _reviver(parsed);
126
- }
127
- async loadsTyped(type, data) {
128
- if (type === 'bytes') {
129
- return typeof data === 'string' ? new TextEncoder().encode(data) : data;
130
- }
131
- else if (type === 'json') {
132
- return this._loads(typeof data === 'string' ? data : new TextDecoder().decode(data));
133
- }
134
- else {
135
- throw new Error(`Unknown serialization type: ${type}`);
136
- }
137
- }
138
- }
@@ -1,27 +0,0 @@
1
- export class EventMessage {
2
- event;
3
- data;
4
- id;
5
- constructor(event, data) {
6
- this.event = event;
7
- this.data = data;
8
- }
9
- }
10
- export class CancelEventMessage extends EventMessage {
11
- constructor() {
12
- super('__system_cancel__', 'user cancel this run');
13
- }
14
- }
15
- export class StreamEndEventMessage extends EventMessage {
16
- constructor() {
17
- super('__stream_end__', 'stream end');
18
- }
19
- }
20
- export class StreamErrorEventMessage extends EventMessage {
21
- constructor(error) {
22
- super('__stream_error__', {
23
- error: error.name,
24
- message: error.message,
25
- });
26
- }
27
- }
@@ -1,177 +0,0 @@
1
- import { EventEmitter } from 'eventemitter3';
2
- import { JsonPlusSerializer } from './JsonPlusSerializer.js';
3
- /**
4
- * 基础流队列类
5
- * Base stream queue class
6
- */
7
- export class BaseStreamQueue extends EventEmitter {
8
- id;
9
- compressMessages;
10
- /** 序列化器实例 / Serializer instance */
11
- serializer = new JsonPlusSerializer();
12
- /**
13
- * 构造函数
14
- * Constructor
15
- * @param compressMessages 是否压缩消息 / Whether to compress messages
16
- */
17
- constructor(id, compressMessages = true) {
18
- super();
19
- this.id = id;
20
- this.compressMessages = compressMessages;
21
- }
22
- /**
23
- * 编码数据为 Uint8Array
24
- * Encode data to Uint8Array
25
- * @param message 要编码的消息 / Message to encode
26
- * @returns 编码后的 Uint8Array / Encoded Uint8Array
27
- */
28
- async encodeData(message) {
29
- const [_, serializedMessage] = await this.serializer.dumpsTyped(message);
30
- return serializedMessage;
31
- }
32
- /**
33
- * 解码数据为 EventMessage
34
- * Decode data to EventMessage
35
- * @param serializedMessage 要解码的消息 / Message to decode
36
- * @returns 解码后的 EventMessage / Decoded EventMessage
37
- */
38
- async decodeData(serializedMessage) {
39
- const message = (await this.serializer.loadsTyped('json', serializedMessage));
40
- return message;
41
- }
42
- }
43
- /**
44
- * StreamQueue 管理器,通过 id 管理多个队列实例
45
- * StreamQueue manager, manages multiple queue instances by id
46
- */
47
- export class StreamQueueManager {
48
- /** 存储队列实例的 Map / Map storing queue instances */
49
- queues = new Map();
50
- /** 默认是否压缩消息 / Default compress messages setting */
51
- defaultCompressMessages;
52
- /** 队列构造函数 / Queue constructor */
53
- queueConstructor;
54
- /**
55
- * 构造函数
56
- * Constructor
57
- * @param queueConstructor 队列构造函数 / Queue constructor
58
- * @param options 配置选项 / Configuration options
59
- */
60
- constructor(queueConstructor, options = {}) {
61
- this.defaultCompressMessages = options.defaultCompressMessages ?? true;
62
- this.queueConstructor = queueConstructor;
63
- }
64
- /**
65
- * 创建指定 id 的队列
66
- * Create queue with specified id
67
- * @param id 队列 ID / Queue ID
68
- * @param compressMessages 是否压缩消息 / Whether to compress messages
69
- * @returns 创建的队列实例 / Created queue instance
70
- */
71
- createQueue(id, compressMessages) {
72
- const compress = compressMessages ?? this.defaultCompressMessages;
73
- this.queues.set(id, new this.queueConstructor(id));
74
- return this.queues.get(id);
75
- }
76
- /**
77
- * 获取或创建指定 id 的队列
78
- * Get or create queue with specified id
79
- * @param id 队列 ID / Queue ID
80
- * @param compressMessages 是否压缩消息,默认为构造函数中的默认值 / Whether to compress messages, defaults to constructor default
81
- * @returns StreamQueue 实例 / StreamQueue instance
82
- */
83
- getQueue(id) {
84
- const queue = this.queues.get(id);
85
- if (!queue) {
86
- throw new Error(`Queue with id '${id}' does not exist`);
87
- }
88
- return queue;
89
- }
90
- /**
91
- * 取消指定 id 的队列
92
- * Cancel queue with specified id
93
- * @param id 队列 ID / Queue ID
94
- */
95
- cancelQueue(id) {
96
- const queue = this.queues.get(id);
97
- if (queue) {
98
- queue.cancel();
99
- this.removeQueue(id);
100
- }
101
- }
102
- /**
103
- * 向指定 id 的队列推送数据
104
- * Push data to queue with specified id
105
- * @param id 队列 ID / Queue ID
106
- * @param item 要推送的数据项 / Item to push
107
- * @param compressMessages 是否压缩消息,默认为构造函数中的默认值 / Whether to compress messages, defaults to constructor default
108
- */
109
- async pushToQueue(id, item, compressMessages) {
110
- const queue = this.getQueue(id);
111
- await queue.push(item);
112
- }
113
- /**
114
- * 获取指定 id 队列中的所有数据
115
- * Get all data from queue with specified id
116
- * @param id 队列 ID / Queue ID
117
- * @returns 队列中的所有数据 / All data in the queue
118
- */
119
- async getQueueData(id) {
120
- const queue = this.queues.get(id);
121
- if (!queue) {
122
- throw new Error(`Queue with id '${id}' does not exist`);
123
- }
124
- return await queue.getAll();
125
- }
126
- /**
127
- * 清空指定 id 的队列
128
- * Clear queue with specified id
129
- * @param id 队列 ID / Queue ID
130
- */
131
- clearQueue(id) {
132
- const queue = this.queues.get(id);
133
- if (queue) {
134
- queue.clear();
135
- }
136
- }
137
- /**
138
- * 删除指定 id 的队列
139
- * Remove queue with specified id
140
- * @param id 队列 ID / Queue ID
141
- * @returns 是否成功删除 / Whether successfully deleted
142
- */
143
- removeQueue(id) {
144
- setTimeout(() => {
145
- return this.queues.delete(id);
146
- }, 500);
147
- }
148
- /**
149
- * 获取所有队列的 ID
150
- * Get all queue IDs
151
- * @returns 所有队列 ID 的数组 / Array of all queue IDs
152
- */
153
- getAllQueueIds() {
154
- return Array.from(this.queues.keys());
155
- }
156
- /**
157
- * 获取所有队列及其数据的快照
158
- * Get snapshot of all queues and their data
159
- * @returns 包含所有队列数据的结果对象 / Result object containing all queue data
160
- */
161
- async getAllQueuesData() {
162
- const result = {};
163
- for (const [id, queue] of this.queues) {
164
- result[id] = await queue.getAll();
165
- }
166
- return result;
167
- }
168
- /**
169
- * 清空所有队列
170
- * Clear all queues
171
- */
172
- clearAllQueues() {
173
- for (const queue of this.queues.values()) {
174
- queue.clear();
175
- }
176
- }
177
- }
@@ -1,64 +0,0 @@
1
- import { StreamQueueManager } from '../queue/stream_queue';
2
- import { MemorySaver } from './memory/checkpoint';
3
- import { MemoryStreamQueue } from './memory/queue';
4
- import { MemoryThreadsManager } from './memory/threads';
5
- import { SQLiteThreadsManager } from './sqlite/threads';
6
- // 所有的适配实现,都请写到这里,通过环境变量进行判断使用哪种方式进行适配
7
- export const createCheckPointer = async () => {
8
- if ((process.env.REDIS_URL && process.env.CHECKPOINT_TYPE === 'redis') ||
9
- process.env.CHECKPOINT_TYPE === 'shallow/redis') {
10
- if (process.env.CHECKPOINT_TYPE === 'redis') {
11
- console.debug('LG | Using redis as checkpoint');
12
- const { RedisSaver } = await import('@langchain/langgraph-checkpoint-redis');
13
- return await RedisSaver.fromUrl(process.env.REDIS_URL, {
14
- defaultTTL: 60, // TTL in minutes
15
- refreshOnRead: true,
16
- });
17
- }
18
- if (process.env.CHECKPOINT_TYPE === 'shallow/redis') {
19
- console.debug('LG | Using shallow redis as checkpoint');
20
- const { ShallowRedisSaver } = await import('@langchain/langgraph-checkpoint-redis/shallow');
21
- return await ShallowRedisSaver.fromUrl(process.env.REDIS_URL);
22
- }
23
- }
24
- if (process.env.DATABASE_URL) {
25
- console.debug('LG | Using postgres as checkpoint');
26
- const { createPGCheckpoint } = await import('./pg/checkpoint');
27
- return createPGCheckpoint();
28
- }
29
- if (process.env.SQLITE_DATABASE_URI) {
30
- console.debug('LG | Using sqlite as checkpoint');
31
- const { SqliteSaver } = await import('./sqlite/checkpoint');
32
- const db = SqliteSaver.fromConnString(process.env.SQLITE_DATABASE_URI);
33
- return db;
34
- }
35
- return new MemorySaver();
36
- };
37
- export const createMessageQueue = async () => {
38
- let q;
39
- if (process.env.REDIS_URL) {
40
- console.debug('LG | Using redis as stream queue');
41
- const { RedisStreamQueue } = await import('./redis/queue');
42
- q = RedisStreamQueue;
43
- }
44
- else {
45
- q = MemoryStreamQueue;
46
- }
47
- return new StreamQueueManager(q);
48
- };
49
- export const createThreadManager = async (config) => {
50
- if (process.env.DATABASE_URL && config.checkpointer) {
51
- const { PostgresThreadsManager } = await import('./pg/threads');
52
- const threadsManager = new PostgresThreadsManager(config.checkpointer);
53
- if (process.env.DATABASE_INIT === 'true') {
54
- await threadsManager.setup();
55
- }
56
- return threadsManager;
57
- }
58
- if (process.env.SQLITE_DATABASE_URI && config.checkpointer) {
59
- const threadsManager = new SQLiteThreadsManager(config.checkpointer);
60
- await threadsManager.setup();
61
- return threadsManager;
62
- }
63
- return new MemoryThreadsManager();
64
- };
@@ -1,2 +0,0 @@
1
- import { MemorySaver } from '@langchain/langgraph-checkpoint';
2
- export { MemorySaver };