@langchain/langgraph-checkpoint 0.0.11 → 0.0.12
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/dist/base.d.ts +1 -1
- package/dist/memory.cjs +1 -4
- package/dist/memory.js +1 -4
- package/package.json +1 -1
package/dist/base.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ type ChannelVersion = number | string;
|
|
|
6
6
|
export type ChannelVersions = Record<string, ChannelVersion>;
|
|
7
7
|
export interface Checkpoint<N extends string = string, C extends string = string> {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* The version of the checkpoint format. Currently 1
|
|
10
10
|
*/
|
|
11
11
|
v: number;
|
|
12
12
|
/**
|
package/dist/memory.cjs
CHANGED
|
@@ -201,13 +201,10 @@ class MemorySaver extends base_js_1.BaseCheckpointSaver {
|
|
|
201
201
|
const preparedCheckpoint = (0, base_js_1.copyCheckpoint)(checkpoint);
|
|
202
202
|
delete preparedCheckpoint.pending_sends;
|
|
203
203
|
const threadId = config.configurable?.thread_id;
|
|
204
|
-
const checkpointNamespace = config.configurable?.checkpoint_ns;
|
|
204
|
+
const checkpointNamespace = config.configurable?.checkpoint_ns ?? "";
|
|
205
205
|
if (threadId === undefined) {
|
|
206
206
|
throw new Error(`Failed to put checkpoint. The passed RunnableConfig is missing a required "thread_id" field in its "configurable" property.`);
|
|
207
207
|
}
|
|
208
|
-
if (checkpointNamespace === undefined) {
|
|
209
|
-
throw new Error(`Failed to put checkpoint. The passed RunnableConfig is missing a required "checkpoint_ns" field in its "configurable" property.`);
|
|
210
|
-
}
|
|
211
208
|
if (!this.storage[threadId]) {
|
|
212
209
|
this.storage[threadId] = {};
|
|
213
210
|
}
|
package/dist/memory.js
CHANGED
|
@@ -198,13 +198,10 @@ export class MemorySaver extends BaseCheckpointSaver {
|
|
|
198
198
|
const preparedCheckpoint = copyCheckpoint(checkpoint);
|
|
199
199
|
delete preparedCheckpoint.pending_sends;
|
|
200
200
|
const threadId = config.configurable?.thread_id;
|
|
201
|
-
const checkpointNamespace = config.configurable?.checkpoint_ns;
|
|
201
|
+
const checkpointNamespace = config.configurable?.checkpoint_ns ?? "";
|
|
202
202
|
if (threadId === undefined) {
|
|
203
203
|
throw new Error(`Failed to put checkpoint. The passed RunnableConfig is missing a required "thread_id" field in its "configurable" property.`);
|
|
204
204
|
}
|
|
205
|
-
if (checkpointNamespace === undefined) {
|
|
206
|
-
throw new Error(`Failed to put checkpoint. The passed RunnableConfig is missing a required "checkpoint_ns" field in its "configurable" property.`);
|
|
207
|
-
}
|
|
208
205
|
if (!this.storage[threadId]) {
|
|
209
206
|
this.storage[threadId] = {};
|
|
210
207
|
}
|