@farukada/aws-langgraph-dynamodb-ts 0.2.0 → 0.3.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 (517) hide show
  1. package/README.md +226 -510
  2. package/dist/checkpointer/actions/delete-thread.d.ts +7 -6
  3. package/dist/checkpointer/actions/delete-thread.d.ts.map +1 -1
  4. package/dist/checkpointer/actions/delete-thread.js +47 -152
  5. package/dist/checkpointer/actions/delete-thread.js.map +1 -1
  6. package/dist/checkpointer/actions/get-tuple.d.ts +6 -14
  7. package/dist/checkpointer/actions/get-tuple.d.ts.map +1 -1
  8. package/dist/checkpointer/actions/get-tuple.js +13 -166
  9. package/dist/checkpointer/actions/get-tuple.js.map +1 -1
  10. package/dist/checkpointer/actions/list.d.ts +10 -0
  11. package/dist/checkpointer/actions/list.d.ts.map +1 -0
  12. package/dist/checkpointer/actions/list.js +51 -0
  13. package/dist/checkpointer/actions/list.js.map +1 -0
  14. package/dist/checkpointer/actions/put-writes.d.ts +6 -6
  15. package/dist/checkpointer/actions/put-writes.d.ts.map +1 -1
  16. package/dist/checkpointer/actions/put-writes.js +26 -75
  17. package/dist/checkpointer/actions/put-writes.js.map +1 -1
  18. package/dist/checkpointer/actions/put.d.ts +6 -11
  19. package/dist/checkpointer/actions/put.d.ts.map +1 -1
  20. package/dist/checkpointer/actions/put.js +29 -161
  21. package/dist/checkpointer/actions/put.js.map +1 -1
  22. package/dist/checkpointer/internal/assemble.d.ts +10 -0
  23. package/dist/checkpointer/internal/assemble.d.ts.map +1 -0
  24. package/dist/checkpointer/internal/assemble.js +37 -0
  25. package/dist/checkpointer/internal/assemble.js.map +1 -0
  26. package/dist/checkpointer/internal/configurable.d.ts +13 -0
  27. package/dist/checkpointer/internal/configurable.d.ts.map +1 -0
  28. package/dist/checkpointer/internal/configurable.js +23 -0
  29. package/dist/checkpointer/internal/configurable.js.map +1 -0
  30. package/dist/checkpointer/internal/fetch.d.ts +10 -0
  31. package/dist/checkpointer/internal/fetch.d.ts.map +1 -0
  32. package/dist/checkpointer/internal/fetch.js +46 -0
  33. package/dist/checkpointer/internal/fetch.js.map +1 -0
  34. package/dist/checkpointer/internal/filter-match.d.ts +12 -0
  35. package/dist/checkpointer/internal/filter-match.d.ts.map +1 -0
  36. package/dist/checkpointer/internal/filter-match.js +14 -0
  37. package/dist/checkpointer/internal/filter-match.js.map +1 -0
  38. package/dist/checkpointer/internal/item-reader.d.ts +10 -0
  39. package/dist/checkpointer/internal/item-reader.d.ts.map +1 -0
  40. package/dist/checkpointer/internal/item-reader.js +26 -0
  41. package/dist/checkpointer/internal/item-reader.js.map +1 -0
  42. package/dist/checkpointer/internal/item-writer.d.ts +14 -0
  43. package/dist/checkpointer/internal/item-writer.d.ts.map +1 -0
  44. package/dist/checkpointer/internal/item-writer.js +68 -0
  45. package/dist/checkpointer/internal/item-writer.js.map +1 -0
  46. package/dist/checkpointer/internal/keys.d.ts +15 -0
  47. package/dist/checkpointer/internal/keys.d.ts.map +1 -0
  48. package/dist/checkpointer/internal/keys.js +52 -0
  49. package/dist/checkpointer/internal/keys.js.map +1 -0
  50. package/dist/checkpointer/internal/query.d.ts +16 -0
  51. package/dist/checkpointer/internal/query.d.ts.map +1 -0
  52. package/dist/checkpointer/internal/query.js +33 -0
  53. package/dist/checkpointer/internal/query.js.map +1 -0
  54. package/dist/checkpointer/internal/setup.d.ts +31 -0
  55. package/dist/checkpointer/internal/setup.d.ts.map +1 -0
  56. package/dist/checkpointer/internal/setup.js +29 -0
  57. package/dist/checkpointer/internal/setup.js.map +1 -0
  58. package/dist/checkpointer/internal/validation.d.ts +9 -0
  59. package/dist/checkpointer/internal/validation.d.ts.map +1 -0
  60. package/dist/checkpointer/internal/validation.js +28 -0
  61. package/dist/checkpointer/internal/validation.js.map +1 -0
  62. package/dist/checkpointer/saver.d.ts +21 -0
  63. package/dist/checkpointer/saver.d.ts.map +1 -0
  64. package/dist/checkpointer/saver.js +49 -0
  65. package/dist/checkpointer/saver.js.map +1 -0
  66. package/dist/checkpointer/types.d.ts +43 -0
  67. package/dist/checkpointer/types.d.ts.map +1 -0
  68. package/dist/{store/types/index.js → checkpointer/types.js} +1 -1
  69. package/dist/checkpointer/types.js.map +1 -0
  70. package/dist/factory/factory.d.ts +41 -0
  71. package/dist/factory/factory.d.ts.map +1 -0
  72. package/dist/factory/factory.js +49 -0
  73. package/dist/factory/factory.js.map +1 -0
  74. package/dist/history/actions/add-messages.d.ts +12 -7
  75. package/dist/history/actions/add-messages.d.ts.map +1 -1
  76. package/dist/history/actions/add-messages.js +50 -48
  77. package/dist/history/actions/add-messages.js.map +1 -1
  78. package/dist/history/actions/clear.d.ts +5 -11
  79. package/dist/history/actions/clear.d.ts.map +1 -1
  80. package/dist/history/actions/clear.js +28 -62
  81. package/dist/history/actions/clear.js.map +1 -1
  82. package/dist/history/actions/get-messages.d.ts +6 -13
  83. package/dist/history/actions/get-messages.d.ts.map +1 -1
  84. package/dist/history/actions/get-messages.js +23 -59
  85. package/dist/history/actions/get-messages.js.map +1 -1
  86. package/dist/history/actions/list-sessions.d.ts +6 -22
  87. package/dist/history/actions/list-sessions.d.ts.map +1 -1
  88. package/dist/history/actions/list-sessions.js +26 -69
  89. package/dist/history/actions/list-sessions.js.map +1 -1
  90. package/dist/history/actions/reconcile-count.d.ts +10 -0
  91. package/dist/history/actions/reconcile-count.d.ts.map +1 -0
  92. package/dist/history/actions/reconcile-count.js +39 -0
  93. package/dist/history/actions/reconcile-count.js.map +1 -0
  94. package/dist/history/chat-message-history.d.ts +36 -0
  95. package/dist/history/chat-message-history.d.ts.map +1 -0
  96. package/dist/history/chat-message-history.js +67 -0
  97. package/dist/history/chat-message-history.js.map +1 -0
  98. package/dist/history/internal/append-saga.d.ts +17 -0
  99. package/dist/history/internal/append-saga.d.ts.map +1 -0
  100. package/dist/history/internal/append-saga.js +94 -0
  101. package/dist/history/internal/append-saga.js.map +1 -0
  102. package/dist/history/internal/item-mapper.d.ts +12 -0
  103. package/dist/history/internal/item-mapper.d.ts.map +1 -0
  104. package/dist/history/internal/item-mapper.js +33 -0
  105. package/dist/history/internal/item-mapper.js.map +1 -0
  106. package/dist/history/internal/keys.d.ts +9 -0
  107. package/dist/history/internal/keys.d.ts.map +1 -0
  108. package/dist/history/internal/keys.js +22 -0
  109. package/dist/history/internal/keys.js.map +1 -0
  110. package/dist/history/internal/message-chunker.d.ts +14 -0
  111. package/dist/history/internal/message-chunker.d.ts.map +1 -0
  112. package/dist/history/internal/message-chunker.js +60 -0
  113. package/dist/history/internal/message-chunker.js.map +1 -0
  114. package/dist/history/internal/message-transaction.d.ts +17 -0
  115. package/dist/history/internal/message-transaction.d.ts.map +1 -0
  116. package/dist/history/internal/message-transaction.js +27 -0
  117. package/dist/history/internal/message-transaction.js.map +1 -0
  118. package/dist/history/internal/query.d.ts +6 -0
  119. package/dist/history/internal/query.d.ts.map +1 -0
  120. package/dist/history/internal/query.js +28 -0
  121. package/dist/history/internal/query.js.map +1 -0
  122. package/dist/history/internal/session-update.d.ts +20 -0
  123. package/dist/history/internal/session-update.d.ts.map +1 -0
  124. package/dist/history/internal/session-update.js +46 -0
  125. package/dist/history/internal/session-update.js.map +1 -0
  126. package/dist/history/internal/setup.d.ts +28 -0
  127. package/dist/history/internal/setup.d.ts.map +1 -0
  128. package/dist/history/internal/setup.js +27 -0
  129. package/dist/history/internal/setup.js.map +1 -0
  130. package/dist/history/internal/title-generator.d.ts +7 -0
  131. package/dist/history/internal/title-generator.d.ts.map +1 -0
  132. package/dist/history/internal/title-generator.js +16 -0
  133. package/dist/history/internal/title-generator.js.map +1 -0
  134. package/dist/history/internal/ttl-anchor.d.ts +12 -0
  135. package/dist/history/internal/ttl-anchor.d.ts.map +1 -0
  136. package/dist/history/internal/ttl-anchor.js +26 -0
  137. package/dist/history/internal/ttl-anchor.js.map +1 -0
  138. package/dist/history/session-adapter.d.ts +10 -26
  139. package/dist/history/session-adapter.d.ts.map +1 -1
  140. package/dist/history/session-adapter.js +15 -57
  141. package/dist/history/session-adapter.js.map +1 -1
  142. package/dist/history/types.d.ts +36 -0
  143. package/dist/history/types.d.ts.map +1 -0
  144. package/dist/history/types.js +3 -0
  145. package/dist/history/types.js.map +1 -0
  146. package/dist/index.d.ts +18 -10
  147. package/dist/index.d.ts.map +1 -1
  148. package/dist/index.js +24 -16
  149. package/dist/index.js.map +1 -1
  150. package/dist/shared/clock.d.ts +3 -0
  151. package/dist/shared/clock.d.ts.map +1 -0
  152. package/dist/shared/clock.js +8 -0
  153. package/dist/shared/clock.js.map +1 -0
  154. package/dist/shared/codec/codec.d.ts +44 -0
  155. package/dist/shared/codec/codec.d.ts.map +1 -0
  156. package/dist/shared/codec/codec.js +44 -0
  157. package/dist/shared/codec/codec.js.map +1 -0
  158. package/dist/shared/codec/compression.d.ts +25 -0
  159. package/dist/shared/codec/compression.d.ts.map +1 -0
  160. package/dist/shared/codec/compression.js +49 -0
  161. package/dist/shared/codec/compression.js.map +1 -0
  162. package/dist/shared/codec/descriptor-keys.d.ts +4 -0
  163. package/dist/shared/codec/descriptor-keys.d.ts.map +1 -0
  164. package/dist/shared/codec/descriptor-keys.js +14 -0
  165. package/dist/shared/codec/descriptor-keys.js.map +1 -0
  166. package/dist/shared/codec/json-serde.d.ts +8 -0
  167. package/dist/shared/codec/json-serde.d.ts.map +1 -0
  168. package/dist/shared/codec/json-serde.js +18 -0
  169. package/dist/shared/codec/json-serde.js.map +1 -0
  170. package/dist/shared/codec/s3/client.d.ts +6 -0
  171. package/dist/shared/codec/s3/client.d.ts.map +1 -0
  172. package/dist/shared/codec/s3/client.js +18 -0
  173. package/dist/shared/codec/s3/client.js.map +1 -0
  174. package/dist/shared/codec/s3/config.d.ts +16 -0
  175. package/dist/shared/codec/s3/config.d.ts.map +1 -0
  176. package/dist/shared/codec/s3/config.js +14 -0
  177. package/dist/shared/codec/s3/config.js.map +1 -0
  178. package/dist/shared/codec/s3/delete.d.ts +8 -0
  179. package/dist/shared/codec/s3/delete.d.ts.map +1 -0
  180. package/dist/shared/codec/s3/delete.js +29 -0
  181. package/dist/shared/codec/s3/delete.js.map +1 -0
  182. package/dist/shared/codec/s3/lifecycle.d.ts +8 -0
  183. package/dist/shared/codec/s3/lifecycle.d.ts.map +1 -0
  184. package/dist/shared/codec/s3/lifecycle.js +47 -0
  185. package/dist/shared/codec/s3/lifecycle.js.map +1 -0
  186. package/dist/shared/codec/s3/offloader.d.ts +33 -0
  187. package/dist/shared/codec/s3/offloader.d.ts.map +1 -0
  188. package/dist/shared/codec/s3/offloader.js +80 -0
  189. package/dist/shared/codec/s3/offloader.js.map +1 -0
  190. package/dist/shared/codec/s3/orphans.d.ts +16 -0
  191. package/dist/shared/codec/s3/orphans.d.ts.map +1 -0
  192. package/dist/shared/codec/s3/orphans.js +73 -0
  193. package/dist/shared/codec/s3/orphans.js.map +1 -0
  194. package/dist/shared/codec/s3/read-write.d.ts +14 -0
  195. package/dist/shared/codec/s3/read-write.d.ts.map +1 -0
  196. package/dist/shared/codec/s3/read-write.js +42 -0
  197. package/dist/shared/codec/s3/read-write.js.map +1 -0
  198. package/dist/shared/constants.d.ts +37 -0
  199. package/dist/shared/constants.d.ts.map +1 -0
  200. package/dist/shared/constants.js +40 -0
  201. package/dist/shared/constants.js.map +1 -0
  202. package/dist/shared/dynamodb/backoff.d.ts +15 -0
  203. package/dist/shared/dynamodb/backoff.d.ts.map +1 -0
  204. package/dist/shared/dynamodb/backoff.js +48 -0
  205. package/dist/shared/dynamodb/backoff.js.map +1 -0
  206. package/dist/shared/dynamodb/batch-write.d.ts +10 -0
  207. package/dist/shared/dynamodb/batch-write.d.ts.map +1 -0
  208. package/dist/shared/dynamodb/batch-write.js +17 -0
  209. package/dist/shared/dynamodb/batch-write.js.map +1 -0
  210. package/dist/shared/dynamodb/client.d.ts +21 -0
  211. package/dist/shared/dynamodb/client.d.ts.map +1 -0
  212. package/dist/shared/dynamodb/client.js +19 -0
  213. package/dist/shared/dynamodb/client.js.map +1 -0
  214. package/dist/shared/dynamodb/drain-unprocessed.d.ts +15 -0
  215. package/dist/shared/dynamodb/drain-unprocessed.d.ts.map +1 -0
  216. package/dist/shared/dynamodb/drain-unprocessed.js +35 -0
  217. package/dist/shared/dynamodb/drain-unprocessed.js.map +1 -0
  218. package/dist/shared/dynamodb/paginate-core.d.ts +22 -0
  219. package/dist/shared/dynamodb/paginate-core.d.ts.map +1 -0
  220. package/dist/shared/dynamodb/paginate-core.js +52 -0
  221. package/dist/shared/dynamodb/paginate-core.js.map +1 -0
  222. package/dist/shared/dynamodb/paginate.d.ts +15 -0
  223. package/dist/shared/dynamodb/paginate.d.ts.map +1 -0
  224. package/dist/shared/dynamodb/paginate.js +20 -0
  225. package/dist/shared/dynamodb/paginate.js.map +1 -0
  226. package/dist/shared/dynamodb/retry-classifier.d.ts +9 -0
  227. package/dist/shared/dynamodb/retry-classifier.d.ts.map +1 -0
  228. package/dist/shared/dynamodb/retry-classifier.js +75 -0
  229. package/dist/shared/dynamodb/retry-classifier.js.map +1 -0
  230. package/dist/shared/dynamodb/retry.d.ts +18 -0
  231. package/dist/shared/dynamodb/retry.d.ts.map +1 -0
  232. package/dist/shared/dynamodb/retry.js +53 -0
  233. package/dist/shared/dynamodb/retry.js.map +1 -0
  234. package/dist/shared/dynamodb/scan.d.ts +15 -0
  235. package/dist/shared/dynamodb/scan.d.ts.map +1 -0
  236. package/dist/shared/dynamodb/scan.js +20 -0
  237. package/dist/shared/dynamodb/scan.js.map +1 -0
  238. package/dist/shared/dynamodb/types.d.ts +24 -0
  239. package/dist/shared/dynamodb/types.d.ts.map +1 -0
  240. package/dist/shared/dynamodb/types.js +3 -0
  241. package/dist/shared/dynamodb/types.js.map +1 -0
  242. package/dist/shared/errors/base-error.d.ts +22 -0
  243. package/dist/shared/errors/base-error.d.ts.map +1 -0
  244. package/dist/shared/errors/base-error.js +28 -0
  245. package/dist/shared/errors/base-error.js.map +1 -0
  246. package/dist/shared/errors/error-code.d.ts +13 -0
  247. package/dist/shared/errors/error-code.d.ts.map +1 -0
  248. package/dist/shared/errors/error-code.js +17 -0
  249. package/dist/shared/errors/error-code.js.map +1 -0
  250. package/dist/shared/errors/errors.d.ts +47 -0
  251. package/dist/shared/errors/errors.d.ts.map +1 -0
  252. package/dist/shared/errors/errors.js +82 -0
  253. package/dist/shared/errors/errors.js.map +1 -0
  254. package/dist/shared/errors/wrap-error.d.ts +16 -0
  255. package/dist/shared/errors/wrap-error.d.ts.map +1 -0
  256. package/dist/shared/errors/wrap-error.js +30 -0
  257. package/dist/shared/errors/wrap-error.js.map +1 -0
  258. package/dist/shared/logging/logger.d.ts +14 -0
  259. package/dist/shared/logging/logger.d.ts.map +1 -0
  260. package/dist/shared/logging/logger.js +16 -0
  261. package/dist/shared/logging/logger.js.map +1 -0
  262. package/dist/shared/logging/redaction.d.ts +19 -0
  263. package/dist/shared/logging/redaction.d.ts.map +1 -0
  264. package/dist/shared/logging/redaction.js +67 -0
  265. package/dist/shared/logging/redaction.js.map +1 -0
  266. package/dist/shared/options.d.ts +32 -0
  267. package/dist/shared/options.d.ts.map +1 -0
  268. package/dist/shared/options.js +3 -0
  269. package/dist/shared/options.js.map +1 -0
  270. package/dist/shared/ulid.d.ts +10 -0
  271. package/dist/shared/ulid.d.ts.map +1 -0
  272. package/dist/shared/ulid.js +65 -0
  273. package/dist/shared/ulid.js.map +1 -0
  274. package/dist/shared/validation/primitives.d.ts +17 -0
  275. package/dist/shared/validation/primitives.d.ts.map +1 -0
  276. package/dist/shared/validation/primitives.js +71 -0
  277. package/dist/shared/validation/primitives.js.map +1 -0
  278. package/dist/shared/validation/ttl.d.ts +16 -0
  279. package/dist/shared/validation/ttl.d.ts.map +1 -0
  280. package/dist/shared/validation/ttl.js +26 -0
  281. package/dist/shared/validation/ttl.js.map +1 -0
  282. package/dist/store/actions/get.d.ts +5 -0
  283. package/dist/store/actions/get.d.ts.map +1 -0
  284. package/dist/store/actions/get.js +21 -0
  285. package/dist/store/actions/get.js.map +1 -0
  286. package/dist/store/actions/list-namespaces.d.ts +9 -0
  287. package/dist/store/actions/list-namespaces.d.ts.map +1 -0
  288. package/dist/store/actions/list-namespaces.js +46 -0
  289. package/dist/store/actions/list-namespaces.js.map +1 -0
  290. package/dist/store/actions/put.d.ts +11 -0
  291. package/dist/store/actions/put.d.ts.map +1 -0
  292. package/dist/store/actions/put.js +81 -0
  293. package/dist/store/actions/put.js.map +1 -0
  294. package/dist/store/actions/reconcile-vector-index.d.ts +17 -0
  295. package/dist/store/actions/reconcile-vector-index.d.ts.map +1 -0
  296. package/dist/store/actions/reconcile-vector-index.js +27 -0
  297. package/dist/store/actions/reconcile-vector-index.js.map +1 -0
  298. package/dist/store/actions/search.d.ts +10 -0
  299. package/dist/store/actions/search.d.ts.map +1 -0
  300. package/dist/store/actions/search.js +72 -0
  301. package/dist/store/actions/search.js.map +1 -0
  302. package/dist/store/internal/filter.d.ts +10 -0
  303. package/dist/store/internal/filter.d.ts.map +1 -0
  304. package/dist/store/internal/filter.js +37 -0
  305. package/dist/store/internal/filter.js.map +1 -0
  306. package/dist/store/internal/index-reconcile.d.ts +22 -0
  307. package/dist/store/internal/index-reconcile.d.ts.map +1 -0
  308. package/dist/store/internal/index-reconcile.js +68 -0
  309. package/dist/store/internal/index-reconcile.js.map +1 -0
  310. package/dist/store/internal/index-sync.d.ts +11 -0
  311. package/dist/store/internal/index-sync.d.ts.map +1 -0
  312. package/dist/store/internal/index-sync.js +26 -0
  313. package/dist/store/internal/index-sync.js.map +1 -0
  314. package/dist/store/internal/item-mapper.d.ts +23 -0
  315. package/dist/store/internal/item-mapper.d.ts.map +1 -0
  316. package/dist/store/internal/item-mapper.js +51 -0
  317. package/dist/store/internal/item-mapper.js.map +1 -0
  318. package/dist/store/internal/keys.d.ts +18 -0
  319. package/dist/store/internal/keys.d.ts.map +1 -0
  320. package/dist/store/internal/keys.js +36 -0
  321. package/dist/store/internal/keys.js.map +1 -0
  322. package/dist/store/internal/namespace-match.d.ts +12 -0
  323. package/dist/store/internal/namespace-match.d.ts.map +1 -0
  324. package/dist/store/internal/namespace-match.js +41 -0
  325. package/dist/store/internal/namespace-match.js.map +1 -0
  326. package/dist/store/internal/query.d.ts +6 -0
  327. package/dist/store/internal/query.d.ts.map +1 -0
  328. package/dist/store/internal/query.js +32 -0
  329. package/dist/store/internal/query.js.map +1 -0
  330. package/dist/store/internal/ranker.d.ts +13 -0
  331. package/dist/store/internal/ranker.d.ts.map +1 -0
  332. package/dist/store/internal/ranker.js +29 -0
  333. package/dist/store/internal/ranker.js.map +1 -0
  334. package/dist/store/internal/semantic-search.d.ts +13 -0
  335. package/dist/store/internal/semantic-search.d.ts.map +1 -0
  336. package/dist/store/internal/semantic-search.js +47 -0
  337. package/dist/store/internal/semantic-search.js.map +1 -0
  338. package/dist/store/internal/setup.d.ts +31 -0
  339. package/dist/store/internal/setup.d.ts.map +1 -0
  340. package/dist/store/internal/setup.js +29 -0
  341. package/dist/store/internal/setup.js.map +1 -0
  342. package/dist/store/internal/validation.d.ts +7 -0
  343. package/dist/store/internal/validation.d.ts.map +1 -0
  344. package/dist/store/internal/validation.js +26 -0
  345. package/dist/store/internal/validation.js.map +1 -0
  346. package/dist/store/store.d.ts +24 -0
  347. package/dist/store/store.d.ts.map +1 -0
  348. package/dist/store/store.js +58 -0
  349. package/dist/store/store.js.map +1 -0
  350. package/dist/store/types.d.ts +28 -0
  351. package/dist/store/types.d.ts.map +1 -0
  352. package/dist/store/types.js +3 -0
  353. package/dist/store/types.js.map +1 -0
  354. package/dist/store/vector-backend.d.ts +27 -0
  355. package/dist/store/vector-backend.d.ts.map +1 -0
  356. package/dist/store/vector-backend.js +3 -0
  357. package/dist/store/vector-backend.js.map +1 -0
  358. package/package.json +32 -30
  359. package/dist/checkpointer/actions/index.d.ts +0 -5
  360. package/dist/checkpointer/actions/index.d.ts.map +0 -1
  361. package/dist/checkpointer/actions/index.js +0 -21
  362. package/dist/checkpointer/actions/index.js.map +0 -1
  363. package/dist/checkpointer/actions/validate-configurable.d.ts +0 -10
  364. package/dist/checkpointer/actions/validate-configurable.d.ts.map +0 -1
  365. package/dist/checkpointer/actions/validate-configurable.js +0 -39
  366. package/dist/checkpointer/actions/validate-configurable.js.map +0 -1
  367. package/dist/checkpointer/actions/writer.d.ts +0 -52
  368. package/dist/checkpointer/actions/writer.d.ts.map +0 -1
  369. package/dist/checkpointer/actions/writer.js +0 -109
  370. package/dist/checkpointer/actions/writer.js.map +0 -1
  371. package/dist/checkpointer/index.d.ts +0 -118
  372. package/dist/checkpointer/index.d.ts.map +0 -1
  373. package/dist/checkpointer/index.js +0 -393
  374. package/dist/checkpointer/index.js.map +0 -1
  375. package/dist/checkpointer/types/index.d.ts +0 -232
  376. package/dist/checkpointer/types/index.d.ts.map +0 -1
  377. package/dist/checkpointer/types/index.js +0 -13
  378. package/dist/checkpointer/types/index.js.map +0 -1
  379. package/dist/checkpointer/utils/deserialization.d.ts +0 -20
  380. package/dist/checkpointer/utils/deserialization.d.ts.map +0 -1
  381. package/dist/checkpointer/utils/deserialization.js +0 -81
  382. package/dist/checkpointer/utils/deserialization.js.map +0 -1
  383. package/dist/checkpointer/utils/index.d.ts +0 -7
  384. package/dist/checkpointer/utils/index.d.ts.map +0 -1
  385. package/dist/checkpointer/utils/index.js +0 -27
  386. package/dist/checkpointer/utils/index.js.map +0 -1
  387. package/dist/checkpointer/utils/validation.d.ts +0 -48
  388. package/dist/checkpointer/utils/validation.d.ts.map +0 -1
  389. package/dist/checkpointer/utils/validation.js +0 -235
  390. package/dist/checkpointer/utils/validation.js.map +0 -1
  391. package/dist/factory.d.ts +0 -153
  392. package/dist/factory.d.ts.map +0 -1
  393. package/dist/factory.js +0 -206
  394. package/dist/factory.js.map +0 -1
  395. package/dist/history/actions/add-message.d.ts +0 -10
  396. package/dist/history/actions/add-message.d.ts.map +0 -1
  397. package/dist/history/actions/add-message.js +0 -24
  398. package/dist/history/actions/add-message.js.map +0 -1
  399. package/dist/history/actions/index.d.ts +0 -9
  400. package/dist/history/actions/index.d.ts.map +0 -1
  401. package/dist/history/actions/index.js +0 -17
  402. package/dist/history/actions/index.js.map +0 -1
  403. package/dist/history/index.d.ts +0 -118
  404. package/dist/history/index.d.ts.map +0 -1
  405. package/dist/history/index.js +0 -179
  406. package/dist/history/index.js.map +0 -1
  407. package/dist/history/types/index.d.ts +0 -184
  408. package/dist/history/types/index.d.ts.map +0 -1
  409. package/dist/history/types/index.js +0 -7
  410. package/dist/history/types/index.js.map +0 -1
  411. package/dist/history/utils/index.d.ts +0 -9
  412. package/dist/history/utils/index.d.ts.map +0 -1
  413. package/dist/history/utils/index.js +0 -27
  414. package/dist/history/utils/index.js.map +0 -1
  415. package/dist/history/utils/optimistic-retry.d.ts +0 -31
  416. package/dist/history/utils/optimistic-retry.d.ts.map +0 -1
  417. package/dist/history/utils/optimistic-retry.js +0 -74
  418. package/dist/history/utils/optimistic-retry.js.map +0 -1
  419. package/dist/history/utils/title-generator.d.ts +0 -12
  420. package/dist/history/utils/title-generator.d.ts.map +0 -1
  421. package/dist/history/utils/title-generator.js +0 -57
  422. package/dist/history/utils/title-generator.js.map +0 -1
  423. package/dist/history/utils/update-expression-builder.d.ts +0 -55
  424. package/dist/history/utils/update-expression-builder.d.ts.map +0 -1
  425. package/dist/history/utils/update-expression-builder.js +0 -112
  426. package/dist/history/utils/update-expression-builder.js.map +0 -1
  427. package/dist/history/utils/validation.d.ts +0 -68
  428. package/dist/history/utils/validation.d.ts.map +0 -1
  429. package/dist/history/utils/validation.js +0 -213
  430. package/dist/history/utils/validation.js.map +0 -1
  431. package/dist/shared/index.d.ts +0 -5
  432. package/dist/shared/index.d.ts.map +0 -1
  433. package/dist/shared/index.js +0 -21
  434. package/dist/shared/index.js.map +0 -1
  435. package/dist/shared/utils/batch-write.d.ts +0 -74
  436. package/dist/shared/utils/batch-write.d.ts.map +0 -1
  437. package/dist/shared/utils/batch-write.js +0 -110
  438. package/dist/shared/utils/batch-write.js.map +0 -1
  439. package/dist/shared/utils/client-factory.d.ts +0 -25
  440. package/dist/shared/utils/client-factory.d.ts.map +0 -1
  441. package/dist/shared/utils/client-factory.js +0 -23
  442. package/dist/shared/utils/client-factory.js.map +0 -1
  443. package/dist/shared/utils/compressor.d.ts +0 -66
  444. package/dist/shared/utils/compressor.d.ts.map +0 -1
  445. package/dist/shared/utils/compressor.js +0 -133
  446. package/dist/shared/utils/compressor.js.map +0 -1
  447. package/dist/shared/utils/constants.d.ts +0 -13
  448. package/dist/shared/utils/constants.d.ts.map +0 -1
  449. package/dist/shared/utils/constants.js +0 -35
  450. package/dist/shared/utils/constants.js.map +0 -1
  451. package/dist/shared/utils/index.d.ts +0 -14
  452. package/dist/shared/utils/index.d.ts.map +0 -1
  453. package/dist/shared/utils/index.js +0 -30
  454. package/dist/shared/utils/index.js.map +0 -1
  455. package/dist/shared/utils/logger.d.ts +0 -75
  456. package/dist/shared/utils/logger.d.ts.map +0 -1
  457. package/dist/shared/utils/logger.js +0 -148
  458. package/dist/shared/utils/logger.js.map +0 -1
  459. package/dist/shared/utils/retry.d.ts +0 -26
  460. package/dist/shared/utils/retry.d.ts.map +0 -1
  461. package/dist/shared/utils/retry.js +0 -169
  462. package/dist/shared/utils/retry.js.map +0 -1
  463. package/dist/shared/utils/s3-offloader.d.ts +0 -153
  464. package/dist/shared/utils/s3-offloader.d.ts.map +0 -1
  465. package/dist/shared/utils/s3-offloader.js +0 -281
  466. package/dist/shared/utils/s3-offloader.js.map +0 -1
  467. package/dist/shared/utils/s3-orphans.d.ts +0 -16
  468. package/dist/shared/utils/s3-orphans.d.ts.map +0 -1
  469. package/dist/shared/utils/s3-orphans.js +0 -79
  470. package/dist/shared/utils/s3-orphans.js.map +0 -1
  471. package/dist/shared/utils/sleep.d.ts +0 -48
  472. package/dist/shared/utils/sleep.d.ts.map +0 -1
  473. package/dist/shared/utils/sleep.js +0 -82
  474. package/dist/shared/utils/sleep.js.map +0 -1
  475. package/dist/shared/utils/ttl.d.ts +0 -24
  476. package/dist/shared/utils/ttl.d.ts.map +0 -1
  477. package/dist/shared/utils/ttl.js +0 -43
  478. package/dist/shared/utils/ttl.js.map +0 -1
  479. package/dist/store/actions/get-operation.d.ts +0 -11
  480. package/dist/store/actions/get-operation.d.ts.map +0 -1
  481. package/dist/store/actions/get-operation.js +0 -42
  482. package/dist/store/actions/get-operation.js.map +0 -1
  483. package/dist/store/actions/index.d.ts +0 -5
  484. package/dist/store/actions/index.d.ts.map +0 -1
  485. package/dist/store/actions/index.js +0 -21
  486. package/dist/store/actions/index.js.map +0 -1
  487. package/dist/store/actions/list-namespaces-operation.d.ts +0 -10
  488. package/dist/store/actions/list-namespaces-operation.d.ts.map +0 -1
  489. package/dist/store/actions/list-namespaces-operation.js +0 -227
  490. package/dist/store/actions/list-namespaces-operation.js.map +0 -1
  491. package/dist/store/actions/put-operation.d.ts +0 -9
  492. package/dist/store/actions/put-operation.d.ts.map +0 -1
  493. package/dist/store/actions/put-operation.js +0 -107
  494. package/dist/store/actions/put-operation.js.map +0 -1
  495. package/dist/store/actions/search-operation.d.ts +0 -17
  496. package/dist/store/actions/search-operation.d.ts.map +0 -1
  497. package/dist/store/actions/search-operation.js +0 -203
  498. package/dist/store/actions/search-operation.js.map +0 -1
  499. package/dist/store/index.d.ts +0 -82
  500. package/dist/store/index.d.ts.map +0 -1
  501. package/dist/store/index.js +0 -172
  502. package/dist/store/index.js.map +0 -1
  503. package/dist/store/types/index.d.ts +0 -131
  504. package/dist/store/types/index.d.ts.map +0 -1
  505. package/dist/store/types/index.js.map +0 -1
  506. package/dist/store/utils/filter.d.ts +0 -16
  507. package/dist/store/utils/filter.d.ts.map +0 -1
  508. package/dist/store/utils/filter.js +0 -133
  509. package/dist/store/utils/filter.js.map +0 -1
  510. package/dist/store/utils/index.d.ts +0 -7
  511. package/dist/store/utils/index.d.ts.map +0 -1
  512. package/dist/store/utils/index.js +0 -27
  513. package/dist/store/utils/index.js.map +0 -1
  514. package/dist/store/utils/validation.d.ts +0 -61
  515. package/dist/store/utils/validation.d.ts.map +0 -1
  516. package/dist/store/utils/validation.js +0 -260
  517. package/dist/store/utils/validation.js.map +0 -1
@@ -1,75 +0,0 @@
1
- /**
2
- * Configurable logger for the library
3
- *
4
- * Provides a pluggable logging interface so consumers can integrate
5
- * with their preferred logging framework (pino, winston, etc.)
6
- *
7
- * @example
8
- * ```TypeScript
9
- * import { setGlobalLogger } from '@farukada/aws-langgraph-dynamodb-ts';
10
- *
11
- * // Use a custom logger
12
- * setGlobalLogger({
13
- * info: (msg, ...args) => myLogger.info(msg, ...args),
14
- * warn: (msg, ...args) => myLogger.warn(msg, ...args),
15
- * error: (msg, ...args) => myLogger.error(msg, ...args),
16
- * debug: (msg, ...args) => myLogger.debug(msg, ...args),
17
- * });
18
- *
19
- * // Disable logging entirely
20
- * setGlobalLogger({ info: () => {}, warn: () => {}, error: () => {}, debug: () => {} });
21
- * ```
22
- */
23
- /**
24
- * Logger interface - consumers can provide their own implementation
25
- */
26
- export interface Logger {
27
- info(message: string, ...args: unknown[]): void;
28
- warn(message: string, ...args: unknown[]): void;
29
- error(message: string, ...args: unknown[]): void;
30
- debug(message: string, ...args: unknown[]): void;
31
- }
32
- /**
33
- * Set a custom global logger for the library
34
- *
35
- * @param logger - Custom logger implementation
36
- */
37
- export declare function setGlobalLogger(logger: Logger): void;
38
- /**
39
- * Get the current global logger
40
- *
41
- * @returns The currently configured logger
42
- */
43
- export declare function getLogger(): Logger;
44
- /**
45
- * Reset the logger to the default console-based implementation
46
- */
47
- export declare function resetLogger(): void;
48
- /**
49
- * Recursively clone an object, replacing values at any secret-looking key with
50
- * `[REDACTED]`. Cycles are broken with a WeakSet. Leaves primitives and non-
51
- * enumerable values untouched. Does not mutate the input.
52
- *
53
- * @param value - Arbitrary value to redact
54
- * @param patterns - Lower-cased substrings to match against each key
55
- */
56
- export declare function redactSecrets(value: unknown, patterns?: readonly string[]): unknown;
57
- /**
58
- * Wrap an existing logger with automatic secret redaction applied to the
59
- * variadic args (the message string itself is passed through unchanged — don't
60
- * interpolate secrets into messages). Strings in args are left as-is; only
61
- * object properties whose keys match a secret pattern are replaced.
62
- *
63
- * @example
64
- * ```ts
65
- * import { setGlobalLogger, redactLogger, getLogger } from '@farukada/aws-langgraph-dynamodb-ts';
66
- * setGlobalLogger(redactLogger(getLogger()));
67
- * ```
68
- *
69
- * @param inner - Logger to wrap
70
- * @param options.extraKeys - Additional lower-cased substrings to treat as secret keys
71
- */
72
- export declare function redactLogger(inner: Logger, options?: {
73
- extraKeys?: readonly string[];
74
- }): Logger;
75
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;CAClD;AAuBD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC;AA8BD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,OAAO,EACd,QAAQ,GAAE,SAAS,MAAM,EAAgC,GACxD,OAAO,CA0BT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAO,GAC9C,MAAM,CAWR"}
@@ -1,148 +0,0 @@
1
- "use strict";
2
- /**
3
- * Configurable logger for the library
4
- *
5
- * Provides a pluggable logging interface so consumers can integrate
6
- * with their preferred logging framework (pino, winston, etc.)
7
- *
8
- * @example
9
- * ```TypeScript
10
- * import { setGlobalLogger } from '@farukada/aws-langgraph-dynamodb-ts';
11
- *
12
- * // Use a custom logger
13
- * setGlobalLogger({
14
- * info: (msg, ...args) => myLogger.info(msg, ...args),
15
- * warn: (msg, ...args) => myLogger.warn(msg, ...args),
16
- * error: (msg, ...args) => myLogger.error(msg, ...args),
17
- * debug: (msg, ...args) => myLogger.debug(msg, ...args),
18
- * });
19
- *
20
- * // Disable logging entirely
21
- * setGlobalLogger({ info: () => {}, warn: () => {}, error: () => {}, debug: () => {} });
22
- * ```
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.setGlobalLogger = setGlobalLogger;
26
- exports.getLogger = getLogger;
27
- exports.resetLogger = resetLogger;
28
- exports.redactSecrets = redactSecrets;
29
- exports.redactLogger = redactLogger;
30
- /**
31
- * Default logger using console
32
- */
33
- /* eslint-disable no-console -- default logger intentionally uses console; override via setGlobalLogger() */
34
- const defaultLogger = {
35
- info: (message, ...args) => console.info(`[langgraph-dynamodb] ${message}`, ...args),
36
- warn: (message, ...args) => console.warn(`[langgraph-dynamodb] ${message}`, ...args),
37
- error: (message, ...args) => console.error(`[langgraph-dynamodb] ${message}`, ...args),
38
- debug: (message, ...args) => console.debug(`[langgraph-dynamodb] ${message}`, ...args),
39
- };
40
- /* eslint-enable no-console */
41
- let globalLogger = defaultLogger;
42
- /**
43
- * Set a custom global logger for the library
44
- *
45
- * @param logger - Custom logger implementation
46
- */
47
- function setGlobalLogger(logger) {
48
- globalLogger = logger;
49
- }
50
- /**
51
- * Get the current global logger
52
- *
53
- * @returns The currently configured logger
54
- */
55
- function getLogger() {
56
- return globalLogger;
57
- }
58
- /**
59
- * Reset the logger to the default console-based implementation
60
- */
61
- function resetLogger() {
62
- globalLogger = defaultLogger;
63
- }
64
- /**
65
- * Default field names treated as secrets. Case-insensitive substring match — so
66
- * `AccessKeyId`, `aws_access_key_id`, `X-Amz-Security-Token`, `authorization`
67
- * all get caught. Extend via {@link redactLogger}'s `extraKeys` option if your
68
- * workload introduces more sensitive fields (e.g. `api_key`, `bearer`).
69
- */
70
- const DEFAULT_SECRET_KEY_PATTERNS = [
71
- 'accesskey',
72
- 'secretkey',
73
- 'secret',
74
- 'sessiontoken',
75
- 'securitytoken',
76
- 'authorization',
77
- 'password',
78
- 'credential',
79
- 'apikey',
80
- 'bearer',
81
- 'token',
82
- 'privatekey',
83
- ];
84
- const REDACTED_PLACEHOLDER = '[REDACTED]';
85
- function isSecretKey(key, patterns) {
86
- const lc = key.toLowerCase();
87
- return patterns.some((p) => lc.includes(p));
88
- }
89
- /**
90
- * Recursively clone an object, replacing values at any secret-looking key with
91
- * `[REDACTED]`. Cycles are broken with a WeakSet. Leaves primitives and non-
92
- * enumerable values untouched. Does not mutate the input.
93
- *
94
- * @param value - Arbitrary value to redact
95
- * @param patterns - Lower-cased substrings to match against each key
96
- */
97
- function redactSecrets(value, patterns = DEFAULT_SECRET_KEY_PATTERNS) {
98
- const seen = new WeakSet();
99
- const walk = (v) => {
100
- if (v === null || typeof v !== 'object')
101
- return v;
102
- if (seen.has(v))
103
- return '[Circular]';
104
- seen.add(v);
105
- if (Array.isArray(v)) {
106
- return v.map((el) => walk(el));
107
- }
108
- // Preserve Error shapes so stack traces survive redaction.
109
- // eslint-disable-next-line no-instanceof/no-instanceof
110
- if (v instanceof Error) {
111
- return v;
112
- }
113
- const out = {};
114
- for (const [k, val] of Object.entries(v)) {
115
- out[k] = isSecretKey(k, patterns) ? REDACTED_PLACEHOLDER : walk(val);
116
- }
117
- return out;
118
- };
119
- return walk(value);
120
- }
121
- /**
122
- * Wrap an existing logger with automatic secret redaction applied to the
123
- * variadic args (the message string itself is passed through unchanged — don't
124
- * interpolate secrets into messages). Strings in args are left as-is; only
125
- * object properties whose keys match a secret pattern are replaced.
126
- *
127
- * @example
128
- * ```ts
129
- * import { setGlobalLogger, redactLogger, getLogger } from '@farukada/aws-langgraph-dynamodb-ts';
130
- * setGlobalLogger(redactLogger(getLogger()));
131
- * ```
132
- *
133
- * @param inner - Logger to wrap
134
- * @param options.extraKeys - Additional lower-cased substrings to treat as secret keys
135
- */
136
- function redactLogger(inner, options = {}) {
137
- const patterns = options.extraKeys
138
- ? [...DEFAULT_SECRET_KEY_PATTERNS, ...options.extraKeys.map((k) => k.toLowerCase())]
139
- : DEFAULT_SECRET_KEY_PATTERNS;
140
- const wrap = (args) => args.map((a) => redactSecrets(a, patterns));
141
- return {
142
- info: (msg, ...args) => inner.info(msg, ...wrap(args)),
143
- warn: (msg, ...args) => inner.warn(msg, ...wrap(args)),
144
- error: (msg, ...args) => inner.error(msg, ...wrap(args)),
145
- debug: (msg, ...args) => inner.debug(msg, ...wrap(args)),
146
- };
147
- }
148
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/shared/utils/logger.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;AAsCH,0CAEC;AAOD,8BAEC;AAKD,kCAEC;AAsCD,sCA6BC;AAiBD,oCAcC;AA9ID;;GAEG;AACH,4GAA4G;AAC5G,MAAM,aAAa,GAAW;IAC5B,IAAI,EAAE,CAAC,OAAe,EAAE,GAAG,IAAe,EAAE,EAAE,CAC5C,OAAO,CAAC,IAAI,CAAC,wBAAwB,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC;IAE1D,IAAI,EAAE,CAAC,OAAe,EAAE,GAAG,IAAe,EAAE,EAAE,CAC5C,OAAO,CAAC,IAAI,CAAC,wBAAwB,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC;IAE1D,KAAK,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AE,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzF,OAAO;QACL,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACxD,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;KACzD,CAAC;AACJ,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Retry utilities for handling transient DynamoDB errors
3
- * Shared between store and checkpointer
4
- */
5
- export interface RetryOptions {
6
- maxAttempts?: number;
7
- baseDelayMs?: number;
8
- maxDelayMs?: number;
9
- retryableErrors?: string[];
10
- /**
11
- * Optional abort signal. When aborted, any in-flight sleep between retries
12
- * resolves immediately and `withRetry` rejects with the signal's abort reason.
13
- * The signal is checked before every attempt, so an abort mid-backoff short-
14
- * circuits the remaining retries rather than consuming the full schedule.
15
- */
16
- signal?: AbortSignal;
17
- }
18
- /**
19
- * Retry a function with exponential backoff
20
- */
21
- export declare function withRetry<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<T>;
22
- /**
23
- * Specialized retry for DynamoDB operations
24
- */
25
- export declare function withDynamoDBRetry<T>(fn: () => Promise<T>, overrides?: Partial<RetryOptions>): Promise<T>;
26
- //# sourceMappingURL=retry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/retry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AA0FD;;GAEG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,CAkE/F;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,OAAO,CAAC,CAAC,CAAC,CAOZ"}
@@ -1,169 +0,0 @@
1
- "use strict";
2
- /**
3
- * Retry utilities for handling transient DynamoDB errors
4
- * Shared between store and checkpointer
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.withRetry = withRetry;
8
- exports.withDynamoDBRetry = withDynamoDBRetry;
9
- const sleep_1 = require("./sleep");
10
- // TransactionCanceledException is NOT retried here: its CancellationReasons include
11
- // permanent failures (ConditionalCheckFailed, ValidationError, ItemCollectionSizeLimitExceeded)
12
- // that must not be retried blindly. Callers that need to retry on specific sub-reasons
13
- // (e.g. ThrottlingError) must inspect CancellationReasons themselves.
14
- //
15
- // TransactionConflictException (the *transient* sibling — one row racing with another
16
- // concurrent transaction) IS retried. It's the recommended retry path for writes under
17
- // contention and is distinct from TransactionCanceledException.
18
- const DEFAULT_OPTIONS = {
19
- maxAttempts: 5,
20
- baseDelayMs: 100,
21
- maxDelayMs: 5000,
22
- retryableErrors: [
23
- // DynamoDB throttling / capacity
24
- 'ProvisionedThroughputExceededException',
25
- 'ThrottlingException',
26
- 'RequestLimitExceeded',
27
- // Service-side transient
28
- 'InternalServerError',
29
- 'ServiceUnavailable',
30
- // Transaction contention (transient — distinct from TransactionCanceledException)
31
- 'TransactionConflictException',
32
- // Node-level network transients. Matched against both the error `code` and
33
- // `name` fields so we catch plain socket errors as well as SDK-wrapped ones.
34
- 'ECONNRESET',
35
- 'ECONNREFUSED',
36
- 'ETIMEDOUT',
37
- 'EPIPE',
38
- 'EAI_AGAIN',
39
- 'NetworkingError',
40
- 'TimeoutError',
41
- ],
42
- };
43
- /**
44
- * Calculate delay with full jitter (AWS recommended) and a max-delay cap.
45
- *
46
- * `delay = random(0, min(cap, base * 2^(attempt-1)))` — spreads retries
47
- * uniformly across the backoff window so concurrent clients don't synchronize
48
- * into a thundering herd.
49
- * See https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
50
- */
51
- function calculateDelay(attempt, baseDelayMs, maxDelayMs) {
52
- const exponentialDelay = baseDelayMs * Math.pow(2, attempt - 1);
53
- const cap = Math.min(exponentialDelay, maxDelayMs);
54
- return Math.random() * cap;
55
- }
56
- /**
57
- * Check if an error is retryable.
58
- *
59
- * Matches against the error's `name` and `code` fields (and, when available,
60
- * a nested `$metadata`/`cause`) so we catch AWS SDK exceptions, Node socket
61
- * errors (`ECONNRESET`, `ETIMEDOUT`, …), and wrapped `cause` chains.
62
- */
63
- function isRetryableError(error, retryableErrors) {
64
- if (!error)
65
- return false;
66
- const seen = new WeakSet();
67
- const signals = [];
68
- // Bound recursion depth — WeakSet breaks cycles but does not bound unique chain
69
- // length. An attacker (or a buggy SDK middleware) could craft a 10k-deep
70
- // `cause` chain and stack-overflow the process. 32 is generous: realistic AWS
71
- // SDK wrapping nests 3-5 deep.
72
- const MAX_CAUSE_DEPTH = 32;
73
- const collect = (err, depth) => {
74
- if (depth > MAX_CAUSE_DEPTH)
75
- return;
76
- if (!err || typeof err !== 'object')
77
- return;
78
- if (seen.has(err))
79
- return;
80
- seen.add(err);
81
- const o = err;
82
- if (typeof o.name === 'string')
83
- signals.push(o.name);
84
- if (typeof o.code === 'string')
85
- signals.push(o.code);
86
- if (typeof o.errno === 'string')
87
- signals.push(o.errno);
88
- if (typeof o.syscall === 'string')
89
- signals.push(o.syscall);
90
- collect(o.cause, depth + 1);
91
- };
92
- collect(error, 0);
93
- if (signals.length === 0)
94
- return false;
95
- return retryableErrors.some((retryable) => signals.some((sig) => sig.includes(retryable)));
96
- }
97
- /**
98
- * Retry a function with exponential backoff
99
- */
100
- async function withRetry(fn, options = {}) {
101
- const { signal, ...rest } = options;
102
- const opts = { ...DEFAULT_OPTIONS, ...rest };
103
- let lastError;
104
- // Surface pre-aborted signals before consuming an attempt.
105
- if (signal?.aborted) {
106
- throw signal.reason ?? new Error('Aborted');
107
- }
108
- for (let attempt = 1; attempt <= opts.maxAttempts; attempt++) {
109
- try {
110
- return await fn();
111
- }
112
- catch (error) {
113
- lastError = error;
114
- // Don't retry if this is the last attempt
115
- if (attempt === opts.maxAttempts) {
116
- break;
117
- }
118
- // Don't retry if the error is not retryable
119
- if (!isRetryableError(error, opts.retryableErrors)) {
120
- // Convert to Error if needed, preserving properties
121
- // eslint-disable-next-line no-instanceof/no-instanceof
122
- if (error instanceof Error) {
123
- throw error;
124
- }
125
- const wrappedError = new Error(error && typeof error === 'object' && 'message' in error
126
- ? String(error.message)
127
- : String(error));
128
- // Preserve name and other properties from the original error
129
- if (error && typeof error === 'object') {
130
- Object.assign(wrappedError, error);
131
- }
132
- throw wrappedError;
133
- }
134
- // Abort mid-backoff short-circuits the remaining retries — sleep() rejects
135
- // with the signal's reason, which we re-throw so the caller sees the abort
136
- // rather than the last retry error.
137
- const delay = calculateDelay(attempt, opts.baseDelayMs, opts.maxDelayMs);
138
- await (0, sleep_1.sleep)(delay, signal);
139
- }
140
- }
141
- // Ensure we always throw an Error object
142
- if (!lastError) {
143
- throw new Error('Retry failed without error');
144
- }
145
- // eslint-disable-next-line no-instanceof/no-instanceof
146
- if (lastError instanceof Error) {
147
- throw lastError;
148
- }
149
- // Convert to Error while preserving properties
150
- const wrappedError = new Error(lastError && typeof lastError === 'object' && 'message' in lastError
151
- ? String(lastError.message)
152
- : String(lastError));
153
- if (lastError && typeof lastError === 'object') {
154
- Object.assign(wrappedError, lastError);
155
- }
156
- throw wrappedError;
157
- }
158
- /**
159
- * Specialized retry for DynamoDB operations
160
- */
161
- async function withDynamoDBRetry(fn, overrides) {
162
- return withRetry(fn, {
163
- maxAttempts: 5,
164
- baseDelayMs: 100,
165
- maxDelayMs: 5000,
166
- ...overrides,
167
- });
168
- }
169
- //# sourceMappingURL=retry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../src/shared/utils/retry.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA6GH,8BAkEC;AAKD,8CAUC;AA5LD,mCAAgC;AAgBhC,oFAAoF;AACpF,gGAAgG;AAChG,uFAAuF;AACvF,sEAAsE;AACtE,EAAE;AACF,sFAAsF;AACtF,uFAAuF;AACvF,gEAAgE;AAChE,MAAM,eAAe,GAA2C;IAC9D,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,IAAI;IAChB,eAAe,EAAE;QACf,iCAAiC;QACjC,wCAAwC;QACxC,qBAAqB;QACrB,sBAAsB;QACtB,yBAAyB;QACzB,qBAAqB;QACrB,oBAAoB;QACpB,kFAAkF;QAClF,8BAA8B;QAC9B,2EAA2E;QAC3E,6EAA6E;QAC7E,YAAY;QACZ,cAAc;QACd,WAAW;QACX,OAAO;QACP,WAAW;QACX,iBAAiB;QACjB,cAAc;KACf;CACF,CAAC;AAEF;;;;;;;GAOG;AACH,SAAS,cAAc,CAAC,OAAe,EAAE,WAAmB,EAAE,UAAkB;IAC9E,MAAM,gBAAgB,GAAG,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EA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Y,EAAE,SAAS,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,YAAY,CAAC;AACrB,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,iBAAiB,CACrC,EAAoB,EACpB,SAAiC;IAEjC,OAAO,SAAS,CAAC,EAAE,EAAE;QACnB,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,GAAG;QAChB,UAAU,EAAE,IAAI;QAChB,GAAG,SAAS;KACb,CAAC,CAAC;AACL,CAAC"}
@@ -1,153 +0,0 @@
1
- /**
2
- * S3 offloader for large checkpoint payloads
3
- *
4
- * DynamoDB has a hard 400KB item size limit. This utility transparently
5
- * offloads payloads exceeding a configurable threshold (default: 350KB)
6
- * to S3, storing only an S3 key reference in DynamoDB.
7
- *
8
- * Requires `@aws-sdk/client-s3` as an optional peer dependency.
9
- *
10
- * @remarks
11
- * This module uses synchronous `require()` for lazy loading of the S3 SDK
12
- * to avoid making the DynamoDBSaver constructor async. This means it
13
- * requires a CommonJS-compatible environment (Node.js with CJS, or a
14
- * bundler that polyfills require). Pure ESM environments are not supported.
15
- */
16
- /**
17
- * Configuration for S3 offloading
18
- */
19
- export interface S3OffloadConfig {
20
- /** S3 bucket name for storing offloaded payloads (required) */
21
- bucketName: string;
22
- /** Key prefix for S3 objects (default: 'langgraph-checkpoints/') */
23
- keyPrefix?: string;
24
- /** Payload size threshold in bytes that triggers offloading (default: 358400 = 350KB) */
25
- thresholdBytes?: number;
26
- /**
27
- * Server-side encryption algorithm (`'AES256'` or `'aws:kms'`).
28
- * Defaults to `'AES256'` — pass an explicit value to override (e.g. `'aws:kms'`
29
- * together with `sseKmsKeyId`).
30
- */
31
- serverSideEncryption?: string;
32
- /** KMS key ID or ARN. Only used when serverSideEncryption is 'aws:kms'. */
33
- sseKmsKeyId?: string;
34
- /**
35
- * Optional S3 client configuration (region, credentials, endpoint, etc.).
36
- * Accepts any valid S3ClientConfig properties from @aws-sdk/client-s3.
37
- */
38
- clientConfig?: {
39
- region?: string;
40
- endpoint?: string;
41
- credentials?: unknown;
42
- [key: string]: unknown;
43
- };
44
- }
45
- /**
46
- * S3 offloader for large checkpoint payloads
47
- *
48
- * Transparently uploads large payloads to S3 and returns S3 key references
49
- * for storage in DynamoDB. On read, downloads from S3 when a reference is present.
50
- *
51
- * @example
52
- * ```typescript
53
- * const offloader = new S3Offloader({
54
- * bucketName: 'my-checkpoints-bucket',
55
- * keyPrefix: 'langgraph/',
56
- * thresholdBytes: 350 * 1024,
57
- * });
58
- *
59
- * if (offloader.shouldOffload(data)) {
60
- * const key = await offloader.upload('thread/checkpoint/field.bin', data);
61
- * // Store `key` in DynamoDB instead of `data`
62
- * }
63
- * ```
64
- */
65
- export declare class S3Offloader {
66
- private s3Client?;
67
- private readonly bucketName;
68
- private readonly keyPrefix;
69
- private readonly thresholdBytes;
70
- private readonly serverSideEncryption;
71
- private readonly sseKmsKeyId?;
72
- private readonly clientConfig?;
73
- constructor(config: S3OffloadConfig);
74
- /**
75
- * Get or lazily create the S3 client on first use.
76
- * Defers S3Client construction so the constructor remains lightweight and sync.
77
- */
78
- private getClient;
79
- /**
80
- * Check whether a payload should be offloaded to S3
81
- *
82
- * @param data - Serialized payload
83
- * @returns true if the payload exceeds the threshold
84
- */
85
- shouldOffload(data: Uint8Array): boolean;
86
- /**
87
- * Build a fully-qualified S3 key for a checkpoint field
88
- *
89
- * @param threadId - Thread identifier
90
- * @param checkpointId - Checkpoint identifier
91
- * @param field - Field name (e.g., 'checkpoint', 'metadata', 'write-0')
92
- * @returns Fully-qualified S3 key
93
- */
94
- buildKey(threadId: string, checkpointId: string, field: string): string;
95
- /**
96
- * Upload data to S3
97
- *
98
- * @param key - S3 object key
99
- * @param data - Data to upload
100
- * @returns The S3 key that was used
101
- */
102
- upload(key: string, data: Uint8Array): Promise<string>;
103
- /**
104
- * Download data from S3
105
- *
106
- * @param key - S3 object key to download
107
- * @returns The downloaded data as Uint8Array
108
- * @throws Error if the download fails or body is empty
109
- */
110
- download(key: string): Promise<Uint8Array>;
111
- /**
112
- * Delete a single object from S3
113
- *
114
- * @param key - S3 object key to delete
115
- */
116
- delete(key: string): Promise<void>;
117
- /**
118
- * Batch delete multiple objects from S3
119
- *
120
- * @param keys - Array of S3 object keys to delete
121
- */
122
- deleteBatch(keys: string[]): Promise<void>;
123
- /**
124
- * Get the configured key prefix (useful for logging)
125
- */
126
- getKeyPrefix(): string;
127
- /**
128
- * Ensure an S3 lifecycle rule exists for automatic object expiration.
129
- *
130
- * This method is **idempotent**: it reads existing lifecycle rules and only
131
- * adds or updates the langgraph-specific rule. User-defined rules on the
132
- * bucket are preserved.
133
- *
134
- * @param ttlDays - Expiration in days (S3 lifecycle uses day-level precision)
135
- * @throws Error if the S3 API calls fail (callers should catch gracefully)
136
- */
137
- ensureLifecycleRule(ttlDays: number): Promise<void>;
138
- /**
139
- * Generate a deterministic lifecycle rule ID for idempotency.
140
- *
141
- * The ID is scoped to the configured key prefix but intentionally TTL-independent:
142
- * changing ttlDays updates the existing rule in place instead of leaving a stale
143
- * rule behind that would still expire objects at the old cadence.
144
- *
145
- * @returns Rule ID string
146
- */
147
- private buildLifecycleRuleId;
148
- /**
149
- * Release underlying S3 client resources
150
- */
151
- destroy(): void;
152
- }
153
- //# sourceMappingURL=s3-offloader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"s3-offloader.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/s3-offloader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA+BH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yFAAyF;IACzF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAA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