@langchain/langgraph-checkpoint 0.1.1 → 1.0.1
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.cjs +73 -88
- package/dist/base.cjs.map +1 -0
- package/dist/base.d.cts +94 -0
- package/dist/base.d.cts.map +1 -0
- package/dist/base.d.ts +78 -73
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +68 -80
- package/dist/base.js.map +1 -1
- package/dist/cache/base.cjs +16 -21
- package/dist/cache/base.cjs.map +1 -0
- package/dist/cache/base.d.cts +43 -0
- package/dist/cache/base.d.cts.map +1 -0
- package/dist/cache/base.d.ts +41 -36
- package/dist/cache/base.d.ts.map +1 -0
- package/dist/cache/base.js +15 -16
- package/dist/cache/base.js.map +1 -1
- package/dist/cache/index.cjs +2 -19
- package/dist/cache/index.js +3 -3
- package/dist/cache/memory.cjs +50 -58
- package/dist/cache/memory.cjs.map +1 -0
- package/dist/cache/memory.d.cts +19 -0
- package/dist/cache/memory.d.cts.map +1 -0
- package/dist/cache/memory.d.ts +18 -13
- package/dist/cache/memory.d.ts.map +1 -0
- package/dist/cache/memory.js +49 -53
- package/dist/cache/memory.js.map +1 -1
- package/dist/id.cjs +10 -16
- package/dist/id.cjs.map +1 -0
- package/dist/id.d.cts +6 -0
- package/dist/id.d.cts.map +1 -0
- package/dist/id.d.ts +6 -2
- package/dist/id.d.ts.map +1 -0
- package/dist/id.js +9 -12
- package/dist/id.js.map +1 -1
- package/dist/index.cjs +36 -27
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -8
- package/dist/index.js +11 -9
- package/dist/memory.cjs +191 -268
- package/dist/memory.cjs.map +1 -0
- package/dist/memory.d.cts +21 -0
- package/dist/memory.d.cts.map +1 -0
- package/dist/memory.d.ts +18 -12
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +190 -263
- package/dist/memory.js.map +1 -1
- package/dist/serde/base.d.cts +8 -0
- package/dist/serde/base.d.cts.map +1 -0
- package/dist/serde/base.d.ts +7 -3
- package/dist/serde/base.d.ts.map +1 -0
- package/dist/serde/jsonplus.cjs +90 -141
- package/dist/serde/jsonplus.cjs.map +1 -0
- package/dist/serde/jsonplus.js +89 -136
- package/dist/serde/jsonplus.js.map +1 -1
- package/dist/serde/types.cjs +14 -9
- package/dist/serde/types.cjs.map +1 -0
- package/dist/serde/types.d.cts +52 -0
- package/dist/serde/types.d.cts.map +1 -0
- package/dist/serde/types.d.ts +50 -47
- package/dist/serde/types.d.ts.map +1 -0
- package/dist/serde/types.js +9 -5
- package/dist/serde/types.js.map +1 -1
- package/dist/serde/utils/fast-safe-stringify/index.cjs +87 -208
- package/dist/serde/utils/fast-safe-stringify/index.cjs.map +1 -0
- package/dist/serde/utils/fast-safe-stringify/index.js +87 -205
- package/dist/serde/utils/fast-safe-stringify/index.js.map +1 -1
- package/dist/store/base.cjs +199 -209
- package/dist/store/base.cjs.map +1 -0
- package/dist/store/base.d.cts +391 -0
- package/dist/store/base.d.cts.map +1 -0
- package/dist/store/base.d.ts +335 -332
- package/dist/store/base.d.ts.map +1 -0
- package/dist/store/base.js +198 -204
- package/dist/store/base.js.map +1 -1
- package/dist/store/batch.cjs +114 -147
- package/dist/store/batch.cjs.map +1 -0
- package/dist/store/batch.d.cts +46 -0
- package/dist/store/batch.d.cts.map +1 -0
- package/dist/store/batch.d.ts +45 -40
- package/dist/store/batch.d.ts.map +1 -0
- package/dist/store/batch.js +114 -143
- package/dist/store/batch.js.map +1 -1
- package/dist/store/memory.cjs +256 -363
- package/dist/store/memory.cjs.map +1 -0
- package/dist/store/memory.d.cts +62 -0
- package/dist/store/memory.d.cts.map +1 -0
- package/dist/store/memory.d.ts +28 -24
- package/dist/store/memory.d.ts.map +1 -0
- package/dist/store/memory.js +255 -358
- package/dist/store/memory.js.map +1 -1
- package/dist/store/utils.cjs +137 -249
- package/dist/store/utils.cjs.map +1 -0
- package/dist/store/utils.js +137 -245
- package/dist/store/utils.js.map +1 -1
- package/dist/types.d.cts +35 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.ts +29 -28
- package/dist/types.d.ts.map +1 -0
- package/package.json +33 -34
- package/CHANGELOG.md +0 -19
- package/dist/cache/index.d.ts +0 -2
- package/dist/cache/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/serde/base.cjs +0 -3
- package/dist/serde/base.js +0 -2
- package/dist/serde/base.js.map +0 -1
- package/dist/serde/jsonplus.d.ts +0 -7
- package/dist/serde/utils/fast-safe-stringify/index.d.ts +0 -1
- package/dist/store/index.cjs +0 -20
- package/dist/store/index.d.ts +0 -3
- package/dist/store/index.js +0 -4
- package/dist/store/index.js.map +0 -1
- package/dist/store/utils.d.ts +0 -26
- package/dist/types.cjs +0 -3
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/index.cjs +0 -1
- package/index.d.cts +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
package/dist/id.cjs
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.uuid6 = uuid6;
|
|
4
|
-
exports.uuid5 = uuid5;
|
|
5
|
-
const uuid_1 = require("uuid");
|
|
1
|
+
let uuid = require("uuid");
|
|
2
|
+
//#region src/id.ts
|
|
6
3
|
function uuid6(clockseq) {
|
|
7
|
-
|
|
4
|
+
return (0, uuid.v6)({ clockseq });
|
|
8
5
|
}
|
|
9
|
-
// Skip UUID validation check, since UUID6s
|
|
10
|
-
// generated with negative clockseq are not
|
|
11
|
-
// technically compliant, but still work.
|
|
12
|
-
// See: https://github.com/uuidjs/uuid/issues/511
|
|
13
6
|
function uuid5(name, namespace) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.match(/.{2}/g)
|
|
17
|
-
.map((byte) => parseInt(byte, 16));
|
|
18
|
-
return (0, uuid_1.v5)(name, new Uint8Array(namespaceBytes));
|
|
7
|
+
const namespaceBytes = namespace.replace(/-/g, "").match(/.{2}/g).map((byte) => parseInt(byte, 16));
|
|
8
|
+
return (0, uuid.v5)(name, new Uint8Array(namespaceBytes));
|
|
19
9
|
}
|
|
20
|
-
//#
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.uuid5 = uuid5;
|
|
12
|
+
exports.uuid6 = uuid6;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=id.cjs.map
|
package/dist/id.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.cjs","names":[],"sources":["../src/id.ts"],"sourcesContent":["import { v5, v6 } from \"uuid\";\n\nexport function uuid6(clockseq: number): string {\n return v6({ clockseq });\n}\n\n// Skip UUID validation check, since UUID6s\n// generated with negative clockseq are not\n// technically compliant, but still work.\n// See: https://github.com/uuidjs/uuid/issues/511\nexport function uuid5(name: string, namespace: string): string {\n const namespaceBytes = namespace\n .replace(/-/g, \"\")\n .match(/.{2}/g)!\n .map((byte) => parseInt(byte, 16));\n return v5(name, new Uint8Array(namespaceBytes));\n}\n"],"mappings":";;AAEA,SAAgB,MAAM,UAA0B;AAC9C,SAAA,GAAA,KAAA,IAAU,EAAE,UAAU,CAAC;;AAOzB,SAAgB,MAAM,MAAc,WAA2B;CAC7D,MAAM,iBAAiB,UACpB,QAAQ,MAAM,GAAG,CACjB,MAAM,QAAQ,CACd,KAAK,SAAS,SAAS,MAAM,GAAG,CAAC;AACpC,SAAA,GAAA,KAAA,IAAU,MAAM,IAAI,WAAW,eAAe,CAAC"}
|
package/dist/id.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.d.cts","names":[],"sources":["../src/id.ts"],"mappings":";iBAEgB,KAAA,CAAM,QAAA;AAAA,iBAQN,KAAA,CAAM,IAAA,UAAc,SAAA"}
|
package/dist/id.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/id.d.ts
|
|
2
|
+
declare function uuid6(clockseq: number): string;
|
|
3
|
+
declare function uuid5(name: string, namespace: string): string;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { uuid5, uuid6 };
|
|
6
|
+
//# sourceMappingURL=id.d.ts.map
|
package/dist/id.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.d.ts","names":[],"sources":["../src/id.ts"],"mappings":";iBAEgB,KAAA,CAAM,QAAA;AAAA,iBAQN,KAAA,CAAM,IAAA,UAAc,SAAA"}
|
package/dist/id.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { v5, v6 } from "uuid";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
//#region src/id.ts
|
|
3
|
+
function uuid6(clockseq) {
|
|
4
|
+
return v6({ clockseq });
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// See: https://github.com/uuidjs/uuid/issues/511
|
|
9
|
-
export function uuid5(name, namespace) {
|
|
10
|
-
const namespaceBytes = namespace
|
|
11
|
-
.replace(/-/g, "")
|
|
12
|
-
.match(/.{2}/g)
|
|
13
|
-
.map((byte) => parseInt(byte, 16));
|
|
14
|
-
return v5(name, new Uint8Array(namespaceBytes));
|
|
6
|
+
function uuid5(name, namespace) {
|
|
7
|
+
const namespaceBytes = namespace.replace(/-/g, "").match(/.{2}/g).map((byte) => parseInt(byte, 16));
|
|
8
|
+
return v5(name, new Uint8Array(namespaceBytes));
|
|
15
9
|
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { uuid5, uuid6 };
|
|
12
|
+
|
|
16
13
|
//# sourceMappingURL=id.js.map
|
package/dist/id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.js","
|
|
1
|
+
{"version":3,"file":"id.js","names":[],"sources":["../src/id.ts"],"sourcesContent":["import { v5, v6 } from \"uuid\";\n\nexport function uuid6(clockseq: number): string {\n return v6({ clockseq });\n}\n\n// Skip UUID validation check, since UUID6s\n// generated with negative clockseq are not\n// technically compliant, but still work.\n// See: https://github.com/uuidjs/uuid/issues/511\nexport function uuid5(name: string, namespace: string): string {\n const namespaceBytes = namespace\n .replace(/-/g, \"\")\n .match(/.{2}/g)!\n .map((byte) => parseInt(byte, 16));\n return v5(name, new Uint8Array(namespaceBytes));\n}\n"],"mappings":";;AAEA,SAAgB,MAAM,UAA0B;AAC9C,QAAO,GAAG,EAAE,UAAU,CAAC;;AAOzB,SAAgB,MAAM,MAAc,WAA2B;CAC7D,MAAM,iBAAiB,UACpB,QAAQ,MAAM,GAAG,CACjB,MAAM,QAAQ,CACd,KAAK,SAAS,SAAS,MAAM,GAAG,CAAC;AACpC,QAAO,GAAG,MAAM,IAAI,WAAW,eAAe,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
exports.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_id = require("./id.cjs");
|
|
3
|
+
const require_types = require("./serde/types.cjs");
|
|
4
|
+
const require_base = require("./base.cjs");
|
|
5
|
+
const require_memory = require("./memory.cjs");
|
|
6
|
+
const require_base$1 = require("./store/base.cjs");
|
|
7
|
+
const require_batch = require("./store/batch.cjs");
|
|
8
|
+
const require_memory$1 = require("./store/memory.cjs");
|
|
9
|
+
const require_base$2 = require("./cache/base.cjs");
|
|
10
|
+
const require_memory$2 = require("./cache/memory.cjs");
|
|
11
|
+
require("./cache/index.cjs");
|
|
12
|
+
exports.AsyncBatchedStore = require_batch.AsyncBatchedStore;
|
|
13
|
+
exports.BaseCache = require_base$2.BaseCache;
|
|
14
|
+
exports.BaseCheckpointSaver = require_base.BaseCheckpointSaver;
|
|
15
|
+
exports.BaseStore = require_base$1.BaseStore;
|
|
16
|
+
exports.ERROR = require_types.ERROR;
|
|
17
|
+
exports.INTERRUPT = require_types.INTERRUPT;
|
|
18
|
+
exports.InMemoryCache = require_memory$2.InMemoryCache;
|
|
19
|
+
exports.InMemoryStore = require_memory$1.InMemoryStore;
|
|
20
|
+
exports.InvalidNamespaceError = require_base$1.InvalidNamespaceError;
|
|
21
|
+
exports.MemorySaver = require_memory.MemorySaver;
|
|
22
|
+
exports.MemoryStore = require_memory$1.MemoryStore;
|
|
23
|
+
exports.RESUME = require_types.RESUME;
|
|
24
|
+
exports.SCHEDULED = require_types.SCHEDULED;
|
|
25
|
+
exports.TASKS = require_types.TASKS;
|
|
26
|
+
exports.WRITES_IDX_MAP = require_base.WRITES_IDX_MAP;
|
|
27
|
+
exports.compareChannelVersions = require_base.compareChannelVersions;
|
|
28
|
+
exports.copyCheckpoint = require_base.copyCheckpoint;
|
|
29
|
+
exports.deepCopy = require_base.deepCopy;
|
|
30
|
+
exports.emptyCheckpoint = require_base.emptyCheckpoint;
|
|
31
|
+
exports.getCheckpointId = require_base.getCheckpointId;
|
|
32
|
+
exports.getTextAtPath = require_base$1.getTextAtPath;
|
|
33
|
+
exports.maxChannelVersion = require_base.maxChannelVersion;
|
|
34
|
+
exports.tokenizePath = require_base$1.tokenizePath;
|
|
35
|
+
exports.uuid5 = require_id.uuid5;
|
|
36
|
+
exports.uuid6 = require_id.uuid6;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SerializerProtocol } from "./serde/base.cjs";
|
|
2
|
+
import { All, CheckpointMetadata, CheckpointPendingWrite, PendingWrite, PendingWriteValue } from "./types.cjs";
|
|
3
|
+
import { BaseCheckpointSaver, ChannelVersions, Checkpoint, CheckpointListOptions, CheckpointTuple, ReadonlyCheckpoint, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, maxChannelVersion } from "./base.cjs";
|
|
4
|
+
import { MemorySaver } from "./memory.cjs";
|
|
5
|
+
import { uuid5, uuid6 } from "./id.cjs";
|
|
6
|
+
import { ChannelProtocol, ERROR, INTERRUPT, RESUME, SCHEDULED, SendProtocol, TASKS } from "./serde/types.cjs";
|
|
7
|
+
import { BaseStore, GetOperation, IndexConfig, InvalidNamespaceError, Item, ListNamespacesOperation, MatchCondition, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchItem, SearchOperation, getTextAtPath, tokenizePath } from "./store/base.cjs";
|
|
8
|
+
import { AsyncBatchedStore } from "./store/batch.cjs";
|
|
9
|
+
import { InMemoryStore, MemoryStore } from "./store/memory.cjs";
|
|
10
|
+
import { BaseCache, CacheFullKey, CacheNamespace } from "./cache/base.cjs";
|
|
11
|
+
import { InMemoryCache } from "./cache/memory.cjs";
|
|
12
|
+
export { All, AsyncBatchedStore, BaseCache, BaseCheckpointSaver, BaseStore, CacheFullKey, CacheNamespace, ChannelProtocol, ChannelVersions, Checkpoint, CheckpointListOptions, CheckpointMetadata, CheckpointPendingWrite, CheckpointTuple, ERROR, GetOperation, INTERRUPT, InMemoryCache, InMemoryStore, IndexConfig, InvalidNamespaceError, Item, ListNamespacesOperation, MatchCondition, MemorySaver, MemoryStore, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PendingWrite, PendingWriteValue, PutOperation, RESUME, ReadonlyCheckpoint, SCHEDULED, SearchItem, SearchOperation, SendProtocol, SerializerProtocol, TASKS, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, getTextAtPath, maxChannelVersion, tokenizePath, uuid5, uuid6 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { SerializerProtocol } from "./serde/base.js";
|
|
2
|
+
import { All, CheckpointMetadata, CheckpointPendingWrite, PendingWrite, PendingWriteValue } from "./types.js";
|
|
3
|
+
import { BaseCheckpointSaver, ChannelVersions, Checkpoint, CheckpointListOptions, CheckpointTuple, ReadonlyCheckpoint, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, maxChannelVersion } from "./base.js";
|
|
4
|
+
import { MemorySaver } from "./memory.js";
|
|
5
|
+
import { uuid5, uuid6 } from "./id.js";
|
|
6
|
+
import { ChannelProtocol, ERROR, INTERRUPT, RESUME, SCHEDULED, SendProtocol, TASKS } from "./serde/types.js";
|
|
7
|
+
import { BaseStore, GetOperation, IndexConfig, InvalidNamespaceError, Item, ListNamespacesOperation, MatchCondition, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchItem, SearchOperation, getTextAtPath, tokenizePath } from "./store/base.js";
|
|
8
|
+
import { AsyncBatchedStore } from "./store/batch.js";
|
|
9
|
+
import { InMemoryStore, MemoryStore } from "./store/memory.js";
|
|
10
|
+
import { BaseCache, CacheFullKey, CacheNamespace } from "./cache/base.js";
|
|
11
|
+
import { InMemoryCache } from "./cache/memory.js";
|
|
12
|
+
export { All, AsyncBatchedStore, BaseCache, BaseCheckpointSaver, BaseStore, CacheFullKey, CacheNamespace, ChannelProtocol, ChannelVersions, Checkpoint, CheckpointListOptions, CheckpointMetadata, CheckpointPendingWrite, CheckpointTuple, ERROR, GetOperation, INTERRUPT, InMemoryCache, InMemoryStore, IndexConfig, InvalidNamespaceError, Item, ListNamespacesOperation, MatchCondition, MemorySaver, MemoryStore, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PendingWrite, PendingWriteValue, PutOperation, RESUME, ReadonlyCheckpoint, SCHEDULED, SearchItem, SearchOperation, SendProtocol, SerializerProtocol, TASKS, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, getTextAtPath, maxChannelVersion, tokenizePath, uuid5, uuid6 };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { uuid5, uuid6 } from "./id.js";
|
|
2
|
+
import { ERROR, INTERRUPT, RESUME, SCHEDULED, TASKS } from "./serde/types.js";
|
|
3
|
+
import { BaseCheckpointSaver, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, maxChannelVersion } from "./base.js";
|
|
4
|
+
import { MemorySaver } from "./memory.js";
|
|
5
|
+
import { BaseStore, InvalidNamespaceError, getTextAtPath, tokenizePath } from "./store/base.js";
|
|
6
|
+
import { AsyncBatchedStore } from "./store/batch.js";
|
|
7
|
+
import { InMemoryStore, MemoryStore } from "./store/memory.js";
|
|
8
|
+
import { BaseCache } from "./cache/base.js";
|
|
9
|
+
import { InMemoryCache } from "./cache/memory.js";
|
|
10
|
+
import "./cache/index.js";
|
|
11
|
+
export { AsyncBatchedStore, BaseCache, BaseCheckpointSaver, BaseStore, ERROR, INTERRUPT, InMemoryCache, InMemoryStore, InvalidNamespaceError, MemorySaver, MemoryStore, RESUME, SCHEDULED, TASKS, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, getTextAtPath, maxChannelVersion, tokenizePath, uuid5, uuid6 };
|