@langchain/langgraph-checkpoint 0.1.1 → 1.0.0

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 (121) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/_virtual/rolldown_runtime.cjs +25 -0
  3. package/dist/base.cjs +74 -88
  4. package/dist/base.cjs.map +1 -0
  5. package/dist/base.d.cts +95 -0
  6. package/dist/base.d.cts.map +1 -0
  7. package/dist/base.d.ts +79 -73
  8. package/dist/base.d.ts.map +1 -0
  9. package/dist/base.js +69 -80
  10. package/dist/base.js.map +1 -1
  11. package/dist/cache/base.cjs +17 -21
  12. package/dist/cache/base.cjs.map +1 -0
  13. package/dist/cache/base.d.cts +43 -0
  14. package/dist/cache/base.d.cts.map +1 -0
  15. package/dist/cache/base.d.ts +41 -36
  16. package/dist/cache/base.d.ts.map +1 -0
  17. package/dist/cache/base.js +16 -16
  18. package/dist/cache/base.js.map +1 -1
  19. package/dist/cache/index.cjs +2 -19
  20. package/dist/cache/index.js +4 -3
  21. package/dist/cache/memory.cjs +53 -58
  22. package/dist/cache/memory.cjs.map +1 -0
  23. package/dist/cache/memory.d.cts +19 -0
  24. package/dist/cache/memory.d.cts.map +1 -0
  25. package/dist/cache/memory.d.ts +18 -13
  26. package/dist/cache/memory.d.ts.map +1 -0
  27. package/dist/cache/memory.js +52 -53
  28. package/dist/cache/memory.js.map +1 -1
  29. package/dist/id.cjs +12 -16
  30. package/dist/id.cjs.map +1 -0
  31. package/dist/id.d.cts +10 -0
  32. package/dist/id.d.cts.map +1 -0
  33. package/dist/id.d.ts +10 -2
  34. package/dist/id.d.ts.map +1 -0
  35. package/dist/id.js +10 -12
  36. package/dist/id.js.map +1 -1
  37. package/dist/index.cjs +36 -27
  38. package/dist/index.d.cts +12 -0
  39. package/dist/index.d.ts +12 -8
  40. package/dist/index.js +12 -9
  41. package/dist/memory.cjs +194 -268
  42. package/dist/memory.cjs.map +1 -0
  43. package/dist/memory.d.cts +22 -0
  44. package/dist/memory.d.cts.map +1 -0
  45. package/dist/memory.d.ts +19 -12
  46. package/dist/memory.d.ts.map +1 -0
  47. package/dist/memory.js +193 -263
  48. package/dist/memory.js.map +1 -1
  49. package/dist/serde/base.d.cts +10 -0
  50. package/dist/serde/base.d.cts.map +1 -0
  51. package/dist/serde/base.d.ts +9 -3
  52. package/dist/serde/base.d.ts.map +1 -0
  53. package/dist/serde/jsonplus.cjs +92 -141
  54. package/dist/serde/jsonplus.cjs.map +1 -0
  55. package/dist/serde/jsonplus.js +90 -136
  56. package/dist/serde/jsonplus.js.map +1 -1
  57. package/dist/serde/types.cjs +15 -9
  58. package/dist/serde/types.cjs.map +1 -0
  59. package/dist/serde/types.d.cts +55 -0
  60. package/dist/serde/types.d.cts.map +1 -0
  61. package/dist/serde/types.d.ts +53 -47
  62. package/dist/serde/types.d.ts.map +1 -0
  63. package/dist/serde/types.js +9 -5
  64. package/dist/serde/types.js.map +1 -1
  65. package/dist/serde/utils/fast-safe-stringify/index.cjs +88 -208
  66. package/dist/serde/utils/fast-safe-stringify/index.cjs.map +1 -0
  67. package/dist/serde/utils/fast-safe-stringify/index.js +87 -205
  68. package/dist/serde/utils/fast-safe-stringify/index.js.map +1 -1
  69. package/dist/store/base.cjs +200 -209
  70. package/dist/store/base.cjs.map +1 -0
  71. package/dist/store/base.d.cts +392 -0
  72. package/dist/store/base.d.cts.map +1 -0
  73. package/dist/store/base.d.ts +336 -332
  74. package/dist/store/base.d.ts.map +1 -0
  75. package/dist/store/base.js +198 -204
  76. package/dist/store/base.js.map +1 -1
  77. package/dist/store/batch.cjs +116 -147
  78. package/dist/store/batch.cjs.map +1 -0
  79. package/dist/store/batch.d.cts +49 -0
  80. package/dist/store/batch.d.cts.map +1 -0
  81. package/dist/store/batch.d.ts +48 -40
  82. package/dist/store/batch.d.ts.map +1 -0
  83. package/dist/store/batch.js +116 -143
  84. package/dist/store/batch.js.map +1 -1
  85. package/dist/store/memory.cjs +262 -363
  86. package/dist/store/memory.cjs.map +1 -0
  87. package/dist/store/memory.d.cts +64 -0
  88. package/dist/store/memory.d.cts.map +1 -0
  89. package/dist/store/memory.d.ts +30 -24
  90. package/dist/store/memory.d.ts.map +1 -0
  91. package/dist/store/memory.js +261 -358
  92. package/dist/store/memory.js.map +1 -1
  93. package/dist/store/utils.cjs +141 -249
  94. package/dist/store/utils.cjs.map +1 -0
  95. package/dist/store/utils.js +140 -245
  96. package/dist/store/utils.js.map +1 -1
  97. package/dist/types.d.cts +35 -0
  98. package/dist/types.d.cts.map +1 -0
  99. package/dist/types.d.ts +29 -28
  100. package/dist/types.d.ts.map +1 -0
  101. package/package.json +16 -18
  102. package/dist/cache/index.d.ts +0 -2
  103. package/dist/cache/index.js.map +0 -1
  104. package/dist/index.js.map +0 -1
  105. package/dist/serde/base.cjs +0 -3
  106. package/dist/serde/base.js +0 -2
  107. package/dist/serde/base.js.map +0 -1
  108. package/dist/serde/jsonplus.d.ts +0 -7
  109. package/dist/serde/utils/fast-safe-stringify/index.d.ts +0 -1
  110. package/dist/store/index.cjs +0 -20
  111. package/dist/store/index.d.ts +0 -3
  112. package/dist/store/index.js +0 -4
  113. package/dist/store/index.js.map +0 -1
  114. package/dist/store/utils.d.ts +0 -26
  115. package/dist/types.cjs +0 -3
  116. package/dist/types.js +0 -2
  117. package/dist/types.js.map +0 -1
  118. package/index.cjs +0 -1
  119. package/index.d.cts +0 -1
  120. package/index.d.ts +0 -1
  121. package/index.js +0 -1
@@ -1,14 +1,19 @@
1
- import { BaseCache, type CacheFullKey, type CacheNamespace } from "./base.js";
2
- export declare class InMemoryCache<V = unknown> extends BaseCache<V> {
3
- private cache;
4
- get(keys: CacheFullKey[]): Promise<{
5
- key: CacheFullKey;
6
- value: V;
7
- }[]>;
8
- set(pairs: {
9
- key: CacheFullKey;
10
- value: V;
11
- ttl?: number;
12
- }[]): Promise<void>;
13
- clear(namespaces: CacheNamespace[]): Promise<void>;
1
+ import { BaseCache, CacheFullKey, CacheNamespace } from "./base.js";
2
+
3
+ //#region src/cache/memory.d.ts
4
+ declare class InMemoryCache<V = unknown> extends BaseCache<V> {
5
+ private cache;
6
+ get(keys: CacheFullKey[]): Promise<{
7
+ key: CacheFullKey;
8
+ value: V;
9
+ }[]>;
10
+ set(pairs: {
11
+ key: CacheFullKey;
12
+ value: V;
13
+ ttl?: number;
14
+ }[]): Promise<void>;
15
+ clear(namespaces: CacheNamespace[]): Promise<void>;
14
16
  }
17
+ //#endregion
18
+ export { InMemoryCache };
19
+ //# sourceMappingURL=memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.ts","names":["BaseCache","CacheFullKey","CacheNamespace","InMemoryCache","V","Promise"],"sources":["../../src/cache/memory.d.ts"],"sourcesContent":["import { BaseCache, type CacheFullKey, type CacheNamespace } from \"./base.js\";\nexport declare class InMemoryCache<V = unknown> extends BaseCache<V> {\n private cache;\n get(keys: CacheFullKey[]): Promise<{\n key: CacheFullKey;\n value: V;\n }[]>;\n set(pairs: {\n key: CacheFullKey;\n value: V;\n ttl?: number;\n }[]): Promise<void>;\n clear(namespaces: CacheNamespace[]): Promise<void>;\n}\n"],"mappings":";;;cACqBG,mCAAmCH,UAAUI;;EAA7CD,GAAAA,CAAAA,IAAAA,EAEPF,YAFoB,EAAA,CAAA,EAEHI,OAFG,CAAA;IAAA,GAAA,EAGrBJ,YAHqB;IAAgCG,KAAAA,EAInDA,CAJmDA;KAEpDH,CAAAA;KACDA,CAAAA,KAAAA,EAAAA;IACEG,GAAAA,EAGFH,YAHEG;IAFgBC,KAAAA,EAMhBD,CANgBC;IAKlBJ,GAAAA,CAAAA,EAAAA,MAAAA;KACEG,CAAAA,EAELC,OAFKD,CAAAA,IAAAA,CAAAA;OAELC,CAAAA,UAAAA,EACYH,cADZG,EAAAA,CAAAA,EAC+BA,OAD/BA,CAAAA,IAAAA,CAAAA"}
@@ -1,55 +1,54 @@
1
1
  import { BaseCache } from "./base.js";
2
- export class InMemoryCache extends BaseCache {
3
- constructor() {
4
- super(...arguments);
5
- Object.defineProperty(this, "cache", {
6
- enumerable: true,
7
- configurable: true,
8
- writable: true,
9
- value: {}
10
- });
11
- }
12
- async get(keys) {
13
- if (!keys.length)
14
- return [];
15
- const now = Date.now();
16
- return (await Promise.all(keys.map(async (fullKey) => {
17
- const [namespace, key] = fullKey;
18
- const strNamespace = namespace.join(",");
19
- if (strNamespace in this.cache && key in this.cache[strNamespace]) {
20
- const cached = this.cache[strNamespace][key];
21
- if (cached.exp == null || now < cached.exp) {
22
- const value = await this.serde.loadsTyped(cached.enc, cached.val);
23
- return [{ key: fullKey, value }];
24
- }
25
- else {
26
- delete this.cache[strNamespace][key];
27
- }
28
- }
29
- return [];
30
- }))).flat();
31
- }
32
- async set(pairs) {
33
- const now = Date.now();
34
- for (const { key: fullKey, value, ttl } of pairs) {
35
- const [namespace, key] = fullKey;
36
- const strNamespace = namespace.join(",");
37
- const [enc, val] = await this.serde.dumpsTyped(value);
38
- const exp = ttl != null ? ttl * 1000 + now : null;
39
- this.cache[strNamespace] ??= {};
40
- this.cache[strNamespace][key] = { enc, val, exp };
41
- }
42
- }
43
- async clear(namespaces) {
44
- if (!namespaces.length) {
45
- this.cache = {};
46
- return;
47
- }
48
- for (const namespace of namespaces) {
49
- const strNamespace = namespace.join(",");
50
- if (strNamespace in this.cache)
51
- delete this.cache[strNamespace];
52
- }
53
- }
54
- }
2
+
3
+ //#region src/cache/memory.ts
4
+ var InMemoryCache = class extends BaseCache {
5
+ cache = {};
6
+ async get(keys) {
7
+ if (!keys.length) return [];
8
+ const now = Date.now();
9
+ return (await Promise.all(keys.map(async (fullKey) => {
10
+ const [namespace, key] = fullKey;
11
+ const strNamespace = namespace.join(",");
12
+ if (strNamespace in this.cache && key in this.cache[strNamespace]) {
13
+ const cached = this.cache[strNamespace][key];
14
+ if (cached.exp == null || now < cached.exp) {
15
+ const value = await this.serde.loadsTyped(cached.enc, cached.val);
16
+ return [{
17
+ key: fullKey,
18
+ value
19
+ }];
20
+ } else delete this.cache[strNamespace][key];
21
+ }
22
+ return [];
23
+ }))).flat();
24
+ }
25
+ async set(pairs) {
26
+ const now = Date.now();
27
+ for (const { key: fullKey, value, ttl } of pairs) {
28
+ const [namespace, key] = fullKey;
29
+ const strNamespace = namespace.join(",");
30
+ const [enc, val] = await this.serde.dumpsTyped(value);
31
+ const exp = ttl != null ? ttl * 1e3 + now : null;
32
+ this.cache[strNamespace] ??= {};
33
+ this.cache[strNamespace][key] = {
34
+ enc,
35
+ val,
36
+ exp
37
+ };
38
+ }
39
+ }
40
+ async clear(namespaces) {
41
+ if (!namespaces.length) {
42
+ this.cache = {};
43
+ return;
44
+ }
45
+ for (const namespace of namespaces) {
46
+ const strNamespace = namespace.join(",");
47
+ if (strNamespace in this.cache) delete this.cache[strNamespace];
48
+ }
49
+ }
50
+ };
51
+
52
+ //#endregion
53
+ export { InMemoryCache };
55
54
  //# sourceMappingURL=memory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/cache/memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0C,MAAM,WAAW,CAAC;AAE9E,MAAM,OAAO,aAA2B,SAAQ,SAAY;IAA5D;;QACU;;;;mBAQJ,EAAE;WAAC;IA0DT,CAAC;IAxDC,KAAK,CAAC,GAAG,CAAC,IAAoB;QAC5B,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,OAAO,CACL,MAAM,OAAO,CAAC,GAAG,CACf,IAAI,CAAC,GAAG,CACN,KAAK,EAAE,OAAO,EAA8C,EAAE;YAC5D,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC;YACjC,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAEzC,IAAI,YAAY,IAAI,IAAI,CAAC,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC;gBAClE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC;gBAC7C,IAAI,MAAM,CAAC,GAAG,IAAI,IAAI,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;oBAC3C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CACvC,MAAM,CAAC,GAAG,EACV,MAAM,CAAC,GAAG,CACX,CAAC;oBACF,OAAO,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;gBACnC,CAAC;qBAAM,CAAC;oBACN,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC;gBACvC,CAAC;YACH,CAAC;YAED,OAAO,EAAE,CAAC;QACZ,CAAC,CACF,CACF,CACF,CAAC,IAAI,EAAE,CAAC;IACX,CAAC;IAED,KAAK,CAAC,GAAG,CACP,KAAsD;QAEtD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,KAAK,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,KAAK,EAAE,CAAC;YACjD,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC;YACjC,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACzC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACtD,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;YAElD,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;QACpD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,UAA4B;QACtC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YACvB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QAED,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACzC,IAAI,YAAY,IAAI,IAAI,CAAC,KAAK;gBAAE,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"memory.js","names":[],"sources":["../../src/cache/memory.ts"],"sourcesContent":["import { BaseCache, type CacheFullKey, type CacheNamespace } from \"./base.js\";\n\nexport class InMemoryCache<V = unknown> extends BaseCache<V> {\n private cache: {\n [namespace: string]: {\n [key: string]: {\n enc: string;\n val: Uint8Array | string;\n exp: number | null;\n };\n };\n } = {};\n\n async get(keys: CacheFullKey[]): Promise<{ key: CacheFullKey; value: V }[]> {\n if (!keys.length) return [];\n const now = Date.now();\n return (\n await Promise.all(\n keys.map(\n async (fullKey): Promise<{ key: CacheFullKey; value: V }[]> => {\n const [namespace, key] = fullKey;\n const strNamespace = namespace.join(\",\");\n\n if (strNamespace in this.cache && key in this.cache[strNamespace]) {\n const cached = this.cache[strNamespace][key];\n if (cached.exp == null || now < cached.exp) {\n const value = await this.serde.loadsTyped(\n cached.enc,\n cached.val\n );\n return [{ key: fullKey, value }];\n } else {\n delete this.cache[strNamespace][key];\n }\n }\n\n return [];\n }\n )\n )\n ).flat();\n }\n\n async set(\n pairs: { key: CacheFullKey; value: V; ttl?: number }[]\n ): Promise<void> {\n const now = Date.now();\n for (const { key: fullKey, value, ttl } of pairs) {\n const [namespace, key] = fullKey;\n const strNamespace = namespace.join(\",\");\n const [enc, val] = await this.serde.dumpsTyped(value);\n const exp = ttl != null ? ttl * 1000 + now : null;\n\n this.cache[strNamespace] ??= {};\n this.cache[strNamespace][key] = { enc, val, exp };\n }\n }\n\n async clear(namespaces: CacheNamespace[]): Promise<void> {\n if (!namespaces.length) {\n this.cache = {};\n return;\n }\n\n for (const namespace of namespaces) {\n const strNamespace = namespace.join(\",\");\n if (strNamespace in this.cache) delete this.cache[strNamespace];\n }\n }\n}\n"],"mappings":";;;AAEA,IAAa,gBAAb,cAAgD,UAAa;CAC3D,AAAQ,QAQJ;CAEJ,MAAM,IAAI,MAAkE;AAC1E,MAAI,CAAC,KAAK,OAAQ,QAAO;EACzB,MAAM,MAAM,KAAK;AACjB,UACE,MAAM,QAAQ,IACZ,KAAK,IACH,OAAO,YAAwD;GAC7D,MAAM,CAAC,WAAW,OAAO;GACzB,MAAM,eAAe,UAAU,KAAK;AAEpC,OAAI,gBAAgB,KAAK,SAAS,OAAO,KAAK,MAAM,eAAe;IACjE,MAAM,SAAS,KAAK,MAAM,cAAc;AACxC,QAAI,OAAO,OAAO,QAAQ,MAAM,OAAO,KAAK;KAC1C,MAAM,QAAQ,MAAM,KAAK,MAAM,WAC7B,OAAO,KACP,OAAO;AAET,YAAO,CAAC;MAAE,KAAK;MAAS;;UAExB,QAAO,KAAK,MAAM,cAAc;;AAIpC,UAAO;OAIb;;CAGJ,MAAM,IACJ,OACe;EACf,MAAM,MAAM,KAAK;AACjB,OAAK,MAAM,EAAE,KAAK,SAAS,OAAO,SAAS,OAAO;GAChD,MAAM,CAAC,WAAW,OAAO;GACzB,MAAM,eAAe,UAAU,KAAK;GACpC,MAAM,CAAC,KAAK,OAAO,MAAM,KAAK,MAAM,WAAW;GAC/C,MAAM,MAAM,OAAO,OAAO,MAAM,MAAO,MAAM;AAE7C,QAAK,MAAM,kBAAkB;AAC7B,QAAK,MAAM,cAAc,OAAO;IAAE;IAAK;IAAK;;;;CAIhD,MAAM,MAAM,YAA6C;AACvD,MAAI,CAAC,WAAW,QAAQ;AACtB,QAAK,QAAQ;AACb;;AAGF,OAAK,MAAM,aAAa,YAAY;GAClC,MAAM,eAAe,UAAU,KAAK;AACpC,OAAI,gBAAgB,KAAK,MAAO,QAAO,KAAK,MAAM"}
package/dist/id.cjs CHANGED
@@ -1,20 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.uuid6 = uuid6;
4
- exports.uuid5 = uuid5;
5
- const uuid_1 = require("uuid");
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const uuid = require_rolldown_runtime.__toESM(require("uuid"));
3
+
4
+ //#region src/id.ts
6
5
  function uuid6(clockseq) {
7
- return (0, uuid_1.v6)({ clockseq });
6
+ return (0, uuid.v6)({ clockseq });
8
7
  }
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
8
  function uuid5(name, namespace) {
14
- const namespaceBytes = namespace
15
- .replace(/-/g, "")
16
- .match(/.{2}/g)
17
- .map((byte) => parseInt(byte, 16));
18
- return (0, uuid_1.v5)(name, new Uint8Array(namespaceBytes));
9
+ const namespaceBytes = namespace.replace(/-/g, "").match(/.{2}/g).map((byte) => parseInt(byte, 16));
10
+ return (0, uuid.v5)(name, new Uint8Array(namespaceBytes));
19
11
  }
20
- //# sourceMappingURL=id.js.map
12
+
13
+ //#endregion
14
+ exports.uuid5 = uuid5;
15
+ exports.uuid6 = uuid6;
16
+ //# sourceMappingURL=id.cjs.map
@@ -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,qBAAU,EAAE;;AAOd,SAAgB,MAAM,MAAc,WAA2B;CAC7D,MAAM,iBAAiB,UACpB,QAAQ,MAAM,IACd,MAAM,SACN,KAAK,SAAS,SAAS,MAAM;AAChC,qBAAU,MAAM,IAAI,WAAW"}
package/dist/id.d.cts ADDED
@@ -0,0 +1,10 @@
1
+ //#region src/id.d.ts
2
+ declare function uuid6(clockseq: number): string;
3
+ // Skip UUID validation check, since UUID6s
4
+ // generated with negative clockseq are not
5
+ // technically compliant, but still work.
6
+ // See: https://github.com/uuidjs/uuid/issues/511
7
+ declare function uuid5(name: string, namespace: string): string;
8
+ //#endregion
9
+ export { uuid5, uuid6 };
10
+ //# sourceMappingURL=id.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.d.cts","names":["uuid6","uuid5"],"sources":["../src/id.d.ts"],"sourcesContent":["export declare function uuid6(clockseq: number): string;\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 declare function uuid5(name: string, namespace: string): string;\n"],"mappings":";iBAAwBA,KAAAA;AAAxB;AAKA;;;iBAAwBC,KAAAA"}
package/dist/id.d.ts CHANGED
@@ -1,2 +1,10 @@
1
- export declare function uuid6(clockseq: number): string;
2
- export declare function uuid5(name: string, namespace: string): string;
1
+ //#region src/id.d.ts
2
+ declare function uuid6(clockseq: number): string;
3
+ // Skip UUID validation check, since UUID6s
4
+ // generated with negative clockseq are not
5
+ // technically compliant, but still work.
6
+ // See: https://github.com/uuidjs/uuid/issues/511
7
+ declare function uuid5(name: string, namespace: string): string;
8
+ //#endregion
9
+ export { uuid5, uuid6 };
10
+ //# sourceMappingURL=id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.d.ts","names":["uuid6","uuid5"],"sources":["../src/id.d.ts"],"sourcesContent":["export declare function uuid6(clockseq: number): string;\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 declare function uuid5(name: string, namespace: string): string;\n"],"mappings":";iBAAwBA,KAAAA;AAAxB;AAKA;;;iBAAwBC,KAAAA"}
package/dist/id.js CHANGED
@@ -1,16 +1,14 @@
1
1
  import { v5, v6 } from "uuid";
2
- export function uuid6(clockseq) {
3
- return v6({ clockseq });
2
+
3
+ //#region src/id.ts
4
+ function uuid6(clockseq) {
5
+ return v6({ clockseq });
4
6
  }
5
- // Skip UUID validation check, since UUID6s
6
- // generated with negative clockseq are not
7
- // technically compliant, but still work.
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));
7
+ function uuid5(name, namespace) {
8
+ const namespaceBytes = namespace.replace(/-/g, "").match(/.{2}/g).map((byte) => parseInt(byte, 16));
9
+ return v5(name, new Uint8Array(namespaceBytes));
15
10
  }
11
+
12
+ //#endregion
13
+ export { uuid5, uuid6 };
16
14
  //# sourceMappingURL=id.js.map
package/dist/id.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"id.js","sourceRoot":"","sources":["../src/id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE9B,MAAM,UAAU,KAAK,CAAC,QAAgB;IACpC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC1B,CAAC;AAED,2CAA2C;AAC3C,2CAA2C;AAC3C,yCAAyC;AACzC,iDAAiD;AACjD,MAAM,UAAU,KAAK,CAAC,IAAY,EAAE,SAAiB;IACnD,MAAM,cAAc,GAAG,SAAS;SAC7B,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;SACjB,KAAK,CAAC,OAAO,CAAE;SACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACrC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;AAClD,CAAC"}
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;;AAOd,SAAgB,MAAM,MAAc,WAA2B;CAC7D,MAAM,iBAAiB,UACpB,QAAQ,MAAM,IACd,MAAM,SACN,KAAK,SAAS,SAAS,MAAM;AAChC,QAAO,GAAG,MAAM,IAAI,WAAW"}
package/dist/index.cjs CHANGED
@@ -1,27 +1,36 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.MemorySaver = void 0;
18
- var memory_js_1 = require("./memory.cjs");
19
- Object.defineProperty(exports, "MemorySaver", { enumerable: true, get: function () { return memory_js_1.MemorySaver; } });
20
- __exportStar(require("./base.cjs"), exports);
21
- __exportStar(require("./id.cjs"), exports);
22
- __exportStar(require("./types.cjs"), exports);
23
- __exportStar(require("./serde/base.cjs"), exports);
24
- __exportStar(require("./serde/types.cjs"), exports);
25
- __exportStar(require("./store/index.cjs"), exports);
26
- __exportStar(require("./cache/index.cjs"), exports);
27
- //# sourceMappingURL=index.js.map
1
+ const require_id = require('./id.cjs');
2
+ const require_types = require('./serde/types.cjs');
3
+ const require_base = require('./base.cjs');
4
+ const require_memory = require('./memory.cjs');
5
+ const require_base$1 = require('./store/base.cjs');
6
+ const require_batch = require('./store/batch.cjs');
7
+ const require_memory$1 = require('./store/memory.cjs');
8
+ const require_base$2 = require('./cache/base.cjs');
9
+ const require_memory$2 = require('./cache/memory.cjs');
10
+ require('./cache/index.cjs');
11
+
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;
@@ -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
- export { MemorySaver } from "./memory.js";
2
- export * from "./base.js";
3
- export * from "./id.js";
4
- export * from "./types.js";
5
- export * from "./serde/base.js";
6
- export * from "./serde/types.js";
7
- export * from "./store/index.js";
8
- export * from "./cache/index.js";
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,12 @@
1
- export { MemorySaver } from "./memory.js";
2
- export * from "./base.js";
3
- export * from "./id.js";
4
- export * from "./types.js";
5
- export * from "./serde/base.js";
6
- export * from "./serde/types.js";
7
- export * from "./store/index.js";
8
- export * from "./cache/index.js";
9
- //# sourceMappingURL=index.js.map
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
+
12
+ 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 };