@langchain/langgraph 1.0.7 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/package.json +7 -7
  2. package/CHANGELOG.md +0 -286
  3. package/dist/_virtual/rolldown_runtime.cjs +0 -25
  4. package/dist/channels/any_value.cjs +0 -46
  5. package/dist/channels/any_value.cjs.map +0 -1
  6. package/dist/channels/any_value.d.cts +0 -24
  7. package/dist/channels/any_value.d.cts.map +0 -1
  8. package/dist/channels/any_value.d.ts +0 -24
  9. package/dist/channels/any_value.d.ts.map +0 -1
  10. package/dist/channels/any_value.js +0 -46
  11. package/dist/channels/any_value.js.map +0 -1
  12. package/dist/channels/base.cjs +0 -102
  13. package/dist/channels/base.cjs.map +0 -1
  14. package/dist/channels/base.d.cts +0 -79
  15. package/dist/channels/base.d.cts.map +0 -1
  16. package/dist/channels/base.d.ts +0 -79
  17. package/dist/channels/base.d.ts.map +0 -1
  18. package/dist/channels/base.js +0 -97
  19. package/dist/channels/base.js.map +0 -1
  20. package/dist/channels/binop.cjs +0 -49
  21. package/dist/channels/binop.cjs.map +0 -1
  22. package/dist/channels/binop.d.cts +0 -22
  23. package/dist/channels/binop.d.cts.map +0 -1
  24. package/dist/channels/binop.d.ts +0 -22
  25. package/dist/channels/binop.d.ts.map +0 -1
  26. package/dist/channels/binop.js +0 -49
  27. package/dist/channels/binop.js.map +0 -1
  28. package/dist/channels/dynamic_barrier_value.cjs +0 -76
  29. package/dist/channels/dynamic_barrier_value.cjs.map +0 -1
  30. package/dist/channels/dynamic_barrier_value.d.cts +0 -42
  31. package/dist/channels/dynamic_barrier_value.d.cts.map +0 -1
  32. package/dist/channels/dynamic_barrier_value.d.ts +0 -42
  33. package/dist/channels/dynamic_barrier_value.d.ts.map +0 -1
  34. package/dist/channels/dynamic_barrier_value.js +0 -76
  35. package/dist/channels/dynamic_barrier_value.js.map +0 -1
  36. package/dist/channels/ephemeral_value.cjs +0 -46
  37. package/dist/channels/ephemeral_value.cjs.map +0 -1
  38. package/dist/channels/ephemeral_value.d.cts +0 -22
  39. package/dist/channels/ephemeral_value.d.cts.map +0 -1
  40. package/dist/channels/ephemeral_value.d.ts +0 -22
  41. package/dist/channels/ephemeral_value.d.ts.map +0 -1
  42. package/dist/channels/ephemeral_value.js +0 -46
  43. package/dist/channels/ephemeral_value.js.map +0 -1
  44. package/dist/channels/index.cjs +0 -21
  45. package/dist/channels/index.d.cts +0 -9
  46. package/dist/channels/index.d.ts +0 -9
  47. package/dist/channels/index.js +0 -10
  48. package/dist/channels/last_value.cjs +0 -98
  49. package/dist/channels/last_value.cjs.map +0 -1
  50. package/dist/channels/last_value.d.cts +0 -44
  51. package/dist/channels/last_value.d.cts.map +0 -1
  52. package/dist/channels/last_value.d.ts +0 -44
  53. package/dist/channels/last_value.d.ts.map +0 -1
  54. package/dist/channels/last_value.js +0 -97
  55. package/dist/channels/last_value.js.map +0 -1
  56. package/dist/channels/named_barrier_value.cjs +0 -118
  57. package/dist/channels/named_barrier_value.cjs.map +0 -1
  58. package/dist/channels/named_barrier_value.d.cts +0 -46
  59. package/dist/channels/named_barrier_value.d.cts.map +0 -1
  60. package/dist/channels/named_barrier_value.d.ts +0 -46
  61. package/dist/channels/named_barrier_value.d.ts.map +0 -1
  62. package/dist/channels/named_barrier_value.js +0 -116
  63. package/dist/channels/named_barrier_value.js.map +0 -1
  64. package/dist/channels/topic.cjs +0 -65
  65. package/dist/channels/topic.cjs.map +0 -1
  66. package/dist/channels/topic.d.cts +0 -32
  67. package/dist/channels/topic.d.cts.map +0 -1
  68. package/dist/channels/topic.d.ts +0 -32
  69. package/dist/channels/topic.d.ts.map +0 -1
  70. package/dist/channels/topic.js +0 -65
  71. package/dist/channels/topic.js.map +0 -1
  72. package/dist/constants.cjs +0 -406
  73. package/dist/constants.cjs.map +0 -1
  74. package/dist/constants.d.cts +0 -285
  75. package/dist/constants.d.cts.map +0 -1
  76. package/dist/constants.d.ts +0 -285
  77. package/dist/constants.d.ts.map +0 -1
  78. package/dist/constants.js +0 -362
  79. package/dist/constants.js.map +0 -1
  80. package/dist/errors.cjs +0 -163
  81. package/dist/errors.cjs.map +0 -1
  82. package/dist/errors.d.cts +0 -81
  83. package/dist/errors.d.cts.map +0 -1
  84. package/dist/errors.d.ts +0 -81
  85. package/dist/errors.d.ts.map +0 -1
  86. package/dist/errors.js +0 -146
  87. package/dist/errors.js.map +0 -1
  88. package/dist/func/index.cjs +0 -301
  89. package/dist/func/index.cjs.map +0 -1
  90. package/dist/func/index.d.cts +0 -293
  91. package/dist/func/index.d.cts.map +0 -1
  92. package/dist/func/index.d.ts +0 -293
  93. package/dist/func/index.d.ts.map +0 -1
  94. package/dist/func/index.js +0 -298
  95. package/dist/func/index.js.map +0 -1
  96. package/dist/func/types.d.cts +0 -64
  97. package/dist/func/types.d.cts.map +0 -1
  98. package/dist/func/types.d.ts +0 -64
  99. package/dist/func/types.d.ts.map +0 -1
  100. package/dist/graph/annotation.cjs +0 -101
  101. package/dist/graph/annotation.cjs.map +0 -1
  102. package/dist/graph/annotation.d.cts +0 -116
  103. package/dist/graph/annotation.d.cts.map +0 -1
  104. package/dist/graph/annotation.d.ts +0 -116
  105. package/dist/graph/annotation.d.ts.map +0 -1
  106. package/dist/graph/annotation.js +0 -99
  107. package/dist/graph/annotation.js.map +0 -1
  108. package/dist/graph/graph.cjs +0 -423
  109. package/dist/graph/graph.cjs.map +0 -1
  110. package/dist/graph/graph.d.cts +0 -132
  111. package/dist/graph/graph.d.cts.map +0 -1
  112. package/dist/graph/graph.d.ts +0 -132
  113. package/dist/graph/graph.d.ts.map +0 -1
  114. package/dist/graph/graph.js +0 -420
  115. package/dist/graph/graph.js.map +0 -1
  116. package/dist/graph/index.cjs +0 -5
  117. package/dist/graph/index.js +0 -7
  118. package/dist/graph/message.cjs +0 -99
  119. package/dist/graph/message.cjs.map +0 -1
  120. package/dist/graph/message.d.cts +0 -40
  121. package/dist/graph/message.d.cts.map +0 -1
  122. package/dist/graph/message.d.ts +0 -40
  123. package/dist/graph/message.d.ts.map +0 -1
  124. package/dist/graph/message.js +0 -95
  125. package/dist/graph/message.js.map +0 -1
  126. package/dist/graph/messages_annotation.cjs +0 -110
  127. package/dist/graph/messages_annotation.cjs.map +0 -1
  128. package/dist/graph/messages_annotation.d.cts +0 -112
  129. package/dist/graph/messages_annotation.d.cts.map +0 -1
  130. package/dist/graph/messages_annotation.d.ts +0 -112
  131. package/dist/graph/messages_annotation.d.ts.map +0 -1
  132. package/dist/graph/messages_annotation.js +0 -107
  133. package/dist/graph/messages_annotation.js.map +0 -1
  134. package/dist/graph/state.cjs +0 -501
  135. package/dist/graph/state.cjs.map +0 -1
  136. package/dist/graph/state.d.cts +0 -236
  137. package/dist/graph/state.d.cts.map +0 -1
  138. package/dist/graph/state.d.ts +0 -236
  139. package/dist/graph/state.d.ts.map +0 -1
  140. package/dist/graph/state.js +0 -499
  141. package/dist/graph/state.js.map +0 -1
  142. package/dist/graph/zod/index.cjs +0 -10
  143. package/dist/graph/zod/index.d.cts +0 -3
  144. package/dist/graph/zod/index.d.ts +0 -3
  145. package/dist/graph/zod/index.js +0 -5
  146. package/dist/graph/zod/meta.cjs +0 -145
  147. package/dist/graph/zod/meta.cjs.map +0 -1
  148. package/dist/graph/zod/meta.d.cts +0 -116
  149. package/dist/graph/zod/meta.d.cts.map +0 -1
  150. package/dist/graph/zod/meta.d.ts +0 -116
  151. package/dist/graph/zod/meta.d.ts.map +0 -1
  152. package/dist/graph/zod/meta.js +0 -141
  153. package/dist/graph/zod/meta.js.map +0 -1
  154. package/dist/graph/zod/plugin.cjs +0 -41
  155. package/dist/graph/zod/plugin.cjs.map +0 -1
  156. package/dist/graph/zod/plugin.js +0 -41
  157. package/dist/graph/zod/plugin.js.map +0 -1
  158. package/dist/graph/zod/schema.cjs +0 -99
  159. package/dist/graph/zod/schema.cjs.map +0 -1
  160. package/dist/graph/zod/schema.d.cts +0 -38
  161. package/dist/graph/zod/schema.d.cts.map +0 -1
  162. package/dist/graph/zod/schema.d.ts +0 -38
  163. package/dist/graph/zod/schema.d.ts.map +0 -1
  164. package/dist/graph/zod/schema.js +0 -94
  165. package/dist/graph/zod/schema.js.map +0 -1
  166. package/dist/graph/zod/zod-registry.cjs +0 -43
  167. package/dist/graph/zod/zod-registry.cjs.map +0 -1
  168. package/dist/graph/zod/zod-registry.d.cts +0 -51
  169. package/dist/graph/zod/zod-registry.d.cts.map +0 -1
  170. package/dist/graph/zod/zod-registry.d.ts +0 -51
  171. package/dist/graph/zod/zod-registry.d.ts.map +0 -1
  172. package/dist/graph/zod/zod-registry.js +0 -41
  173. package/dist/graph/zod/zod-registry.js.map +0 -1
  174. package/dist/hash.cjs +0 -271
  175. package/dist/hash.cjs.map +0 -1
  176. package/dist/hash.js +0 -269
  177. package/dist/hash.js.map +0 -1
  178. package/dist/index.cjs +0 -112
  179. package/dist/index.cjs.map +0 -1
  180. package/dist/index.d.cts +0 -26
  181. package/dist/index.d.ts +0 -26
  182. package/dist/index.js +0 -22
  183. package/dist/index.js.map +0 -1
  184. package/dist/interrupt.cjs +0 -82
  185. package/dist/interrupt.cjs.map +0 -1
  186. package/dist/interrupt.d.cts +0 -58
  187. package/dist/interrupt.d.cts.map +0 -1
  188. package/dist/interrupt.d.ts +0 -58
  189. package/dist/interrupt.d.ts.map +0 -1
  190. package/dist/interrupt.js +0 -81
  191. package/dist/interrupt.js.map +0 -1
  192. package/dist/prebuilt/agentName.cjs +0 -153
  193. package/dist/prebuilt/agentName.cjs.map +0 -1
  194. package/dist/prebuilt/agentName.d.cts +0 -42
  195. package/dist/prebuilt/agentName.d.cts.map +0 -1
  196. package/dist/prebuilt/agentName.d.ts +0 -42
  197. package/dist/prebuilt/agentName.d.ts.map +0 -1
  198. package/dist/prebuilt/agentName.js +0 -152
  199. package/dist/prebuilt/agentName.js.map +0 -1
  200. package/dist/prebuilt/agent_executor.cjs +0 -44
  201. package/dist/prebuilt/agent_executor.cjs.map +0 -1
  202. package/dist/prebuilt/agent_executor.d.cts +0 -58
  203. package/dist/prebuilt/agent_executor.d.cts.map +0 -1
  204. package/dist/prebuilt/agent_executor.d.ts +0 -58
  205. package/dist/prebuilt/agent_executor.d.ts.map +0 -1
  206. package/dist/prebuilt/agent_executor.js +0 -44
  207. package/dist/prebuilt/agent_executor.js.map +0 -1
  208. package/dist/prebuilt/chat_agent_executor.cjs +0 -68
  209. package/dist/prebuilt/chat_agent_executor.cjs.map +0 -1
  210. package/dist/prebuilt/chat_agent_executor.d.cts +0 -23
  211. package/dist/prebuilt/chat_agent_executor.d.cts.map +0 -1
  212. package/dist/prebuilt/chat_agent_executor.d.ts +0 -23
  213. package/dist/prebuilt/chat_agent_executor.d.ts.map +0 -1
  214. package/dist/prebuilt/chat_agent_executor.js +0 -67
  215. package/dist/prebuilt/chat_agent_executor.js.map +0 -1
  216. package/dist/prebuilt/index.cjs +0 -15
  217. package/dist/prebuilt/index.d.cts +0 -8
  218. package/dist/prebuilt/index.d.ts +0 -8
  219. package/dist/prebuilt/index.js +0 -8
  220. package/dist/prebuilt/interrupt.d.cts +0 -61
  221. package/dist/prebuilt/interrupt.d.cts.map +0 -1
  222. package/dist/prebuilt/interrupt.d.ts +0 -61
  223. package/dist/prebuilt/interrupt.d.ts.map +0 -1
  224. package/dist/prebuilt/react_agent_executor.cjs +0 -344
  225. package/dist/prebuilt/react_agent_executor.cjs.map +0 -1
  226. package/dist/prebuilt/react_agent_executor.d.cts +0 -230
  227. package/dist/prebuilt/react_agent_executor.d.cts.map +0 -1
  228. package/dist/prebuilt/react_agent_executor.d.ts +0 -230
  229. package/dist/prebuilt/react_agent_executor.d.ts.map +0 -1
  230. package/dist/prebuilt/react_agent_executor.js +0 -342
  231. package/dist/prebuilt/react_agent_executor.js.map +0 -1
  232. package/dist/prebuilt/tool_executor.cjs +0 -48
  233. package/dist/prebuilt/tool_executor.cjs.map +0 -1
  234. package/dist/prebuilt/tool_executor.d.cts +0 -42
  235. package/dist/prebuilt/tool_executor.d.cts.map +0 -1
  236. package/dist/prebuilt/tool_executor.d.ts +0 -42
  237. package/dist/prebuilt/tool_executor.d.ts.map +0 -1
  238. package/dist/prebuilt/tool_executor.js +0 -47
  239. package/dist/prebuilt/tool_executor.js.map +0 -1
  240. package/dist/prebuilt/tool_node.cjs +0 -248
  241. package/dist/prebuilt/tool_node.cjs.map +0 -1
  242. package/dist/prebuilt/tool_node.d.cts +0 -182
  243. package/dist/prebuilt/tool_node.d.cts.map +0 -1
  244. package/dist/prebuilt/tool_node.d.ts +0 -182
  245. package/dist/prebuilt/tool_node.d.ts.map +0 -1
  246. package/dist/prebuilt/tool_node.js +0 -246
  247. package/dist/prebuilt/tool_node.js.map +0 -1
  248. package/dist/pregel/algo.cjs +0 -573
  249. package/dist/pregel/algo.cjs.map +0 -1
  250. package/dist/pregel/algo.d.cts +0 -13
  251. package/dist/pregel/algo.d.cts.map +0 -1
  252. package/dist/pregel/algo.d.ts +0 -13
  253. package/dist/pregel/algo.d.ts.map +0 -1
  254. package/dist/pregel/algo.js +0 -567
  255. package/dist/pregel/algo.js.map +0 -1
  256. package/dist/pregel/call.cjs +0 -53
  257. package/dist/pregel/call.cjs.map +0 -1
  258. package/dist/pregel/call.js +0 -50
  259. package/dist/pregel/call.js.map +0 -1
  260. package/dist/pregel/debug.cjs +0 -175
  261. package/dist/pregel/debug.cjs.map +0 -1
  262. package/dist/pregel/debug.js +0 -169
  263. package/dist/pregel/debug.js.map +0 -1
  264. package/dist/pregel/index.cjs +0 -1170
  265. package/dist/pregel/index.cjs.map +0 -1
  266. package/dist/pregel/index.d.cts +0 -546
  267. package/dist/pregel/index.d.cts.map +0 -1
  268. package/dist/pregel/index.d.ts +0 -546
  269. package/dist/pregel/index.d.ts.map +0 -1
  270. package/dist/pregel/index.js +0 -1168
  271. package/dist/pregel/index.js.map +0 -1
  272. package/dist/pregel/io.cjs +0 -140
  273. package/dist/pregel/io.cjs.map +0 -1
  274. package/dist/pregel/io.js +0 -135
  275. package/dist/pregel/io.js.map +0 -1
  276. package/dist/pregel/loop.cjs +0 -548
  277. package/dist/pregel/loop.cjs.map +0 -1
  278. package/dist/pregel/loop.js +0 -547
  279. package/dist/pregel/loop.js.map +0 -1
  280. package/dist/pregel/messages.cjs +0 -108
  281. package/dist/pregel/messages.cjs.map +0 -1
  282. package/dist/pregel/messages.js +0 -107
  283. package/dist/pregel/messages.js.map +0 -1
  284. package/dist/pregel/read.cjs +0 -152
  285. package/dist/pregel/read.cjs.map +0 -1
  286. package/dist/pregel/read.d.cts +0 -51
  287. package/dist/pregel/read.d.cts.map +0 -1
  288. package/dist/pregel/read.d.ts +0 -51
  289. package/dist/pregel/read.d.ts.map +0 -1
  290. package/dist/pregel/read.js +0 -150
  291. package/dist/pregel/read.js.map +0 -1
  292. package/dist/pregel/remote.cjs +0 -349
  293. package/dist/pregel/remote.cjs.map +0 -1
  294. package/dist/pregel/remote.d.cts +0 -123
  295. package/dist/pregel/remote.d.cts.map +0 -1
  296. package/dist/pregel/remote.d.ts +0 -123
  297. package/dist/pregel/remote.d.ts.map +0 -1
  298. package/dist/pregel/remote.js +0 -348
  299. package/dist/pregel/remote.js.map +0 -1
  300. package/dist/pregel/retry.cjs +0 -92
  301. package/dist/pregel/retry.cjs.map +0 -1
  302. package/dist/pregel/retry.js +0 -92
  303. package/dist/pregel/retry.js.map +0 -1
  304. package/dist/pregel/runnable_types.d.cts +0 -49
  305. package/dist/pregel/runnable_types.d.cts.map +0 -1
  306. package/dist/pregel/runnable_types.d.ts +0 -49
  307. package/dist/pregel/runnable_types.d.ts.map +0 -1
  308. package/dist/pregel/runner.cjs +0 -228
  309. package/dist/pregel/runner.cjs.map +0 -1
  310. package/dist/pregel/runner.js +0 -228
  311. package/dist/pregel/runner.js.map +0 -1
  312. package/dist/pregel/stream.cjs +0 -199
  313. package/dist/pregel/stream.cjs.map +0 -1
  314. package/dist/pregel/stream.js +0 -196
  315. package/dist/pregel/stream.js.map +0 -1
  316. package/dist/pregel/types.cjs +0 -27
  317. package/dist/pregel/types.cjs.map +0 -1
  318. package/dist/pregel/types.d.cts +0 -453
  319. package/dist/pregel/types.d.cts.map +0 -1
  320. package/dist/pregel/types.d.ts +0 -453
  321. package/dist/pregel/types.d.ts.map +0 -1
  322. package/dist/pregel/types.js +0 -25
  323. package/dist/pregel/types.js.map +0 -1
  324. package/dist/pregel/utils/config.cjs +0 -122
  325. package/dist/pregel/utils/config.cjs.map +0 -1
  326. package/dist/pregel/utils/config.d.cts +0 -36
  327. package/dist/pregel/utils/config.d.cts.map +0 -1
  328. package/dist/pregel/utils/config.d.ts +0 -36
  329. package/dist/pregel/utils/config.d.ts.map +0 -1
  330. package/dist/pregel/utils/config.js +0 -115
  331. package/dist/pregel/utils/config.js.map +0 -1
  332. package/dist/pregel/utils/index.cjs +0 -103
  333. package/dist/pregel/utils/index.cjs.map +0 -1
  334. package/dist/pregel/utils/index.d.cts +0 -51
  335. package/dist/pregel/utils/index.d.cts.map +0 -1
  336. package/dist/pregel/utils/index.d.ts +0 -51
  337. package/dist/pregel/utils/index.d.ts.map +0 -1
  338. package/dist/pregel/utils/index.js +0 -97
  339. package/dist/pregel/utils/index.js.map +0 -1
  340. package/dist/pregel/utils/subgraph.cjs +0 -19
  341. package/dist/pregel/utils/subgraph.cjs.map +0 -1
  342. package/dist/pregel/utils/subgraph.js +0 -17
  343. package/dist/pregel/utils/subgraph.js.map +0 -1
  344. package/dist/pregel/validate.cjs +0 -45
  345. package/dist/pregel/validate.cjs.map +0 -1
  346. package/dist/pregel/validate.js +0 -44
  347. package/dist/pregel/validate.js.map +0 -1
  348. package/dist/pregel/write.cjs +0 -97
  349. package/dist/pregel/write.cjs.map +0 -1
  350. package/dist/pregel/write.d.cts +0 -35
  351. package/dist/pregel/write.d.cts.map +0 -1
  352. package/dist/pregel/write.d.ts +0 -35
  353. package/dist/pregel/write.d.ts.map +0 -1
  354. package/dist/pregel/write.js +0 -95
  355. package/dist/pregel/write.js.map +0 -1
  356. package/dist/remote.cjs +0 -3
  357. package/dist/remote.d.cts +0 -2
  358. package/dist/remote.d.ts +0 -2
  359. package/dist/remote.js +0 -3
  360. package/dist/setup/async_local_storage.cjs +0 -12
  361. package/dist/setup/async_local_storage.cjs.map +0 -1
  362. package/dist/setup/async_local_storage.js +0 -11
  363. package/dist/setup/async_local_storage.js.map +0 -1
  364. package/dist/utils.cjs +0 -88
  365. package/dist/utils.cjs.map +0 -1
  366. package/dist/utils.d.cts +0 -32
  367. package/dist/utils.d.cts.map +0 -1
  368. package/dist/utils.d.ts +0 -32
  369. package/dist/utils.d.ts.map +0 -1
  370. package/dist/utils.js +0 -81
  371. package/dist/utils.js.map +0 -1
  372. package/dist/web.cjs +0 -96
  373. package/dist/web.d.cts +0 -23
  374. package/dist/web.d.ts +0 -23
  375. package/dist/web.js +0 -15
  376. package/dist/writer.cjs +0 -15
  377. package/dist/writer.cjs.map +0 -1
  378. package/dist/writer.d.cts +0 -7
  379. package/dist/writer.d.cts.map +0 -1
  380. package/dist/writer.d.ts +0 -7
  381. package/dist/writer.d.ts.map +0 -1
  382. package/dist/writer.js +0 -14
  383. package/dist/writer.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph",
3
- "version": "1.0.7",
3
+ "version": "1.0.12",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {
@@ -34,7 +34,7 @@
34
34
  "license": "MIT",
35
35
  "dependencies": {
36
36
  "@langchain/langgraph-checkpoint": "^1.0.0",
37
- "@langchain/langgraph-sdk": "~1.3.1",
37
+ "@langchain/langgraph-sdk": "~1.4.4",
38
38
  "uuid": "^10.0.0"
39
39
  },
40
40
  "peerDependencies": {
@@ -50,10 +50,10 @@
50
50
  "devDependencies": {
51
51
  "@langchain/anthropic": "^1.0.0",
52
52
  "@langchain/core": "^1.0.1",
53
- "@langchain/langgraph-checkpoint": "1.0.0",
54
- "@langchain/langgraph-checkpoint-postgres": "1.0.0",
55
- "@langchain/langgraph-checkpoint-sqlite": "1.0.0",
56
- "@langchain/langgraph-sdk": "1.3.1",
53
+ "@langchain/langgraph-checkpoint": "workspace:*",
54
+ "@langchain/langgraph-checkpoint-postgres": "workspace:*",
55
+ "@langchain/langgraph-checkpoint-sqlite": "workspace:*",
56
+ "@langchain/langgraph-sdk": "workspace:*",
57
57
  "@langchain/openai": "^1.0.0",
58
58
  "@langchain/scripts": ">=0.1.3 <0.2.0",
59
59
  "@langchain/tavily": "^1.0.0",
@@ -192,4 +192,4 @@
192
192
  "files": [
193
193
  "dist/"
194
194
  ]
195
- }
195
+ }
package/CHANGELOG.md DELETED
@@ -1,286 +0,0 @@
1
- # @langchain/langgraph
2
-
3
- ## 1.0.7
4
-
5
- ### Patch Changes
6
-
7
- - f602df6: Adding support for resumableStreams on remote graphs.
8
-
9
- ## 1.0.6
10
-
11
- ### Patch Changes
12
-
13
- - de1454a: undeprecate toolsCondition
14
- - 2340a54: respect meta defaults in `LastValue`
15
-
16
- ## 1.0.5
17
-
18
- ### Patch Changes
19
-
20
- - Updated dependencies [1497df9]
21
- - @langchain/langgraph-sdk@1.3.0
22
-
23
- ## 1.0.4
24
-
25
- ### Patch Changes
26
-
27
- - Updated dependencies [379de5e]
28
- - Updated dependencies [d08e484]
29
- - Updated dependencies [d08e484]
30
- - @langchain/langgraph-sdk@1.2.0
31
-
32
- ## 1.0.3
33
-
34
- ### Patch Changes
35
-
36
- - Updated dependencies [e19e76c]
37
- - Updated dependencies [fa6c009]
38
- - Updated dependencies [35e8fc7]
39
- - Updated dependencies [b78a738]
40
- - @langchain/langgraph-sdk@1.1.0
41
-
42
- ## 1.0.2
43
-
44
- ### Patch Changes
45
-
46
- - 4a6bde2: remove interrupt deprecations docs
47
-
48
- ## 1.0.1
49
-
50
- ### Patch Changes
51
-
52
- - 4c4125c: undeprecate `ToolNode`
53
-
54
- ## 1.0.0
55
-
56
- ### Major Changes
57
-
58
- - 1e1ecbb: Make Zod a peer dependency of @langchain/langgraph
59
- - 1e1ecbb: This release updates the package for compatibility with LangGraph v1.0. See the [v1.0 release notes](https://docs.langchain.com/oss/javascript/releases/langgraph-v1) for details on what's new.
60
-
61
- ### Patch Changes
62
-
63
- - 1e1ecbb: Fix type issue with defining `interrupt` and `writer` in StateGraph constructor when using Annotation.Root
64
- - 1e1ecbb: Add `pushMessage` method for manually publishing to messages stream channel
65
- - 1e1ecbb: chore(prebuilt): deprecate createReactAgent
66
- - 1e1ecbb: Improve performance of scheduling tasks with large graphs
67
- - 1e1ecbb: Improve graph execution performance by avoiding unnecessary cloning of checkpoints after every tick
68
- - 1e1ecbb: fix(@langchain/langgraph): export missing `CommandParams` symbol
69
- - 1e1ecbb: Add `stream.encoding` option to emit LangGraph API events as Server-Sent Events. This allows for sending events through the wire by piping the stream to a `Response` object.
70
- - 1e1ecbb: fix(@langchain/langgraph): export missing `CommandInstance` symbol
71
- - 1e1ecbb: Update troubleshooting link for common errors, add MISSING_CHECKPOINTER troubleshooting page
72
- - 1e1ecbb: Fix `stateKey` property in `pushMessage` being ignored when RunnableConfig is automatically inherited
73
- - 1e1ecbb: Improve tick performance by detecting interrupts faster within a tick.
74
- - 1e1ecbb: Improve tick performance by calling `maxChannelMapVersion` only once
75
- - 1e1ecbb: feat(langgraph): add `toLangGraphEventStream` method to stream events in LGP compatible format
76
- - 1e1ecbb: fix(createReactAgent): update deprecation messages to contain reactAgent
77
- - 1e1ecbb: `writer`, `interrupt` and `signal` is no longer an optional property of `Runtime`
78
- - 1e1ecbb: Add support for defining multiple interrupts in StateGraph constructor. Interrupts from the map can be picked from the `Runtime` object, ensuring type-safety across multiple interrupts.
79
- - 1e1ecbb: Channels are now part of the public API, allowing users to customise behaviour of checkpointing per channel (#976)
80
- - 1e1ecbb: Allow defining types for interrupt and custom events upfront
81
- - 1e1ecbb: Fix performance regression due to deferred nodes
82
- - Updated dependencies [1e1ecbb]
83
- - @langchain/langgraph-checkpoint@1.0.0
84
- - @langchain/langgraph-sdk@1.0.0
85
-
86
- ## 1.0.0-alpha.5
87
-
88
- ### Patch Changes
89
-
90
- - b6d6701: fix(@langchain/langgraph): export missing `CommandParams` symbol
91
- - d5be09c: fix(@langchain/langgraph): export missing `CommandInstance` symbol
92
-
93
- ## 1.0.0-alpha.4
94
-
95
- ### Patch Changes
96
-
97
- - c3f326d: Add support for defining multiple interrupts in StateGraph constructor. Interrupts from the map can be picked from the `Runtime` object, ensuring type-safety across multiple interrupts.
98
-
99
- ## 1.0.0-alpha.3
100
-
101
- ### Patch Changes
102
-
103
- - 05619e2: Add `stream.encoding` option to emit LangGraph API events as Server-Sent Events. This allows for sending events through the wire by piping the stream to a `Response` object.
104
- - 14cb042: Fix `stateKey` property in `pushMessage` being ignored when RunnableConfig is automatically inherited
105
-
106
- ## 1.0.0-alpha.2
107
-
108
- ### Patch Changes
109
-
110
- - a5bcd74: Fix type issue with defining `interrupt` and `writer` in StateGraph constructor when using Annotation.Root
111
- - 5184725: Add `pushMessage` method for manually publishing to messages stream channel
112
-
113
- ## 1.0.0-alpha.1
114
-
115
- ### Patch Changes
116
-
117
- - a05436d: Improve performance of scheduling tasks with large graphs
118
- - d35db59: Improve graph execution performance by avoiding unnecessary cloning of checkpoints after every tick
119
- - 7e01d08: Update troubleshooting link for common errors, add MISSING_CHECKPOINTER troubleshooting page
120
- - a527fc7: Improve tick performance by detecting interrupts faster within a tick.
121
- - 27934c0: Improve tick performance by calling `maxChannelMapVersion` only once
122
- - dc2e5f2: fix(createReactAgent): update deprecation messages to contain reactAgent
123
- - e8f5084: `writer`, `interrupt` and `signal` is no longer an optional property of `Runtime`
124
- - 20f1d64: Channels are now part of the public API, allowing users to customise behaviour of checkpointing per channel (#976)
125
- - 2311efc: Allow defining types for interrupt and custom events upfront
126
- - c6f75b6: Fix performance regression due to deferred nodes
127
-
128
- ## 1.0.0-alpha.0
129
-
130
- ### Major Changes
131
-
132
- - 445c2ae: Make Zod a peer dependency of @langchain/langgraph
133
-
134
- ### Patch Changes
135
-
136
- - 5f9b5a0: Deprecate createReactAgent in favour of `langchain` package.
137
- - dcc117f: feat(langgraph): add `toLangGraphEventStream` method to stream events in LGP compatible format
138
-
139
- ## 0.4.9
140
-
141
- ### Patch Changes
142
-
143
- - Updated dependencies [35a0f1c]
144
- - Updated dependencies [35a0f1c]
145
- - Updated dependencies [35a0f1c]
146
- - Updated dependencies [35a0f1c]
147
- - @langchain/langgraph-sdk@0.1.0
148
-
149
- ## 0.4.8
150
-
151
- ### Patch Changes
152
-
153
- - bb0df7c: Fix "This stream has already been locked for exclusive reading by another reader" error when using `web-streams-polyfill`
154
-
155
- ## 0.4.7
156
-
157
- ### Patch Changes
158
-
159
- - 60e9258: fix(langgraph): task result from stream mode debug / tasks should match format from getStateHistory / getState
160
- - 07a5b2f: fix(langgraph): avoid accepting incorrect keys in withLangGraph
161
- - Updated dependencies [b5f14d0]
162
- - @langchain/langgraph-sdk@0.0.111
163
-
164
- ## 0.4.6
165
-
166
- ### Patch Changes
167
-
168
- - 5f1db81: fix(langgraph): `withConfig` should accept `context`
169
- - c53ca47: Avoid iterating on channels if no managed values are present
170
- - a3707fb: fix(langgraph): allow `updateState` after resuming from an interrupt
171
- - Updated dependencies [e8b4540]
172
- - Updated dependencies [9c57526]
173
- - @langchain/langgraph-sdk@0.0.109
174
-
175
- ## 0.4.5
176
-
177
- ### Patch Changes
178
-
179
- - d22113a: fix(pregel/utils): propagate abort reason in combineAbortSignals
180
- - 2284045: fix(langgraph): send checkpoint namespace when yielding custom events in subgraphs
181
- - 4774013: fix(langgraph): persist resume map values
182
-
183
- ## 0.4.4
184
-
185
- ### Patch Changes
186
-
187
- - 8f4acc0: feat(langgraph): speed up prepareSingleTask by 20x
188
- - 8152a15: Use return type of nodes for streamMode: updates types
189
- - 4e854b2: fix(langgraph): set status for tool messages generated by ToolNode
190
- - cb4b17a: feat(langgraph): use createReactAgent description for supervisor agent handoffs
191
- - Updated dependencies [72386a4]
192
- - Updated dependencies [3ee5c20]
193
- - @langchain/langgraph-sdk@0.0.107
194
-
195
- ## 0.4.3
196
-
197
- ### Patch Changes
198
-
199
- - f69bf6d: feat(langgraph): createReactAgent v2: use Send for each of the tool calls
200
- - 9940200: feat(langgraph): Allow partially applying tool calls via postModelHook
201
- - e8c61bb: feat(langgraph): add dynamic model choice to createReactAgent
202
-
203
- ## 0.4.2
204
-
205
- ### Patch Changes
206
-
207
- - c911c5f: fix(langgraph): handle empty messages
208
-
209
- ## 0.4.1
210
-
211
- ### Patch Changes
212
-
213
- - f2cc704: fix(langgraph): RemotePregel serialization fix
214
- - Updated dependencies [7054a6a]
215
- - @langchain/langgraph-sdk@0.0.105
216
-
217
- ## 0.4.0
218
-
219
- ### Minor Changes
220
-
221
- - 5f7ee26: feat(langgraph): cleanup of interrupt interface
222
- - 10432a4: chore(langgraph): remove SharedValue / managed values
223
- - f1bcec7: chore(langgraph): introduce `context` field and `Runtime` type
224
- - 14dd523: fix(langgraph): auto-inference of configurable fields
225
- - fa78796: Add `durability` checkpointer mode
226
- - 565f472: Mark StateGraph({ channel }) constructor deprecated
227
-
228
- ### Patch Changes
229
-
230
- - Updated dependencies [ccbcbc1]
231
- - Updated dependencies [10f292a]
232
- - Updated dependencies [f1bcec7]
233
- - Updated dependencies [3fd7f73]
234
- - Updated dependencies [773ec0d]
235
- - @langchain/langgraph-checkpoint@0.1.0
236
- - @langchain/langgraph-sdk@0.0.103
237
-
238
- ## 0.3.12
239
-
240
- ### Patch Changes
241
-
242
- - 034730f: fix(langgraph): add support for new interrupt ID
243
-
244
- ## 0.3.11
245
-
246
- ### Patch Changes
247
-
248
- - a0efb98: Relax `when` type for `Interrupt`
249
- - Updated dependencies [a0efb98]
250
- - @langchain/langgraph-sdk@0.0.100
251
-
252
- ## 0.3.10
253
-
254
- ### Patch Changes
255
-
256
- - a12c1fb: fix(langgraph): stop suggesting public properties and methods of Command when calling invoke
257
- - Updated dependencies [ee1defa]
258
- - @langchain/langgraph-sdk@0.0.98
259
-
260
- ## 0.3.9
261
-
262
- ### Patch Changes
263
-
264
- - 430ae93: feat(langgraph): validate if messages present in user provided schema
265
- - 4aed3f4: fix(langgraph): dispose unused combined signals
266
- - 02f9e02: fix(langgraph): preModelHook `llmInputMessages` should not keep concatenating messages
267
- - 6e616f5: fix(langgraph): respect strict option in responseFormat inside createReactAgent
268
- - 6812b50: feat(langgraph): allow extending state with Zod schema
269
- - 8166703: add UpdateType type utility for Zod, improve Zod 4 and Zod 4 mini support
270
- - Updated dependencies [53b8c30]
271
- - @langchain/langgraph-sdk@0.0.96
272
-
273
- ## 0.3.8
274
-
275
- ### Patch Changes
276
-
277
- - fix(langgraph): Ensure resuming only happens with matching run ids by @hinthornw in https://github.com/langchain-ai/langgraphjs/pull/1381
278
-
279
- ## 0.3.7
280
-
281
- ### Patch Changes
282
-
283
- - fix(langgraph): Handle wrapped LLM models in createReactAgent (RunnableSequence, withConfig, ...etc) by @dqbd in https://github.com/langchain-ai/langgraphjs/pull/1369
284
- - fix(langgraph): avoid calling \_emit for runs without metadata by @dqbd in https://github.com/langchain-ai/langgraphjs/pull/1340
285
- - fix(langgraph): fail fast when interrupt is called without checkpointer by @dqbd in https://github.com/langchain-ai/langgraphjs/pull/1343
286
- - fix(langgraph): handle wrapped LLM models in createReactAgent by @dqbd in https://github.com/langchain-ai/langgraphjs/pull/1369
@@ -1,25 +0,0 @@
1
- //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
- key = keys[i];
11
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: ((k) => from[k]).bind(null, key),
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
- value: mod,
20
- enumerable: true
21
- }) : target, mod));
22
-
23
- //#endregion
24
-
25
- exports.__toESM = __toESM;
@@ -1,46 +0,0 @@
1
- const require_errors = require('../errors.cjs');
2
- const require_base = require('./base.cjs');
3
-
4
- //#region src/channels/any_value.ts
5
- /**
6
- * Stores the last value received, assumes that if multiple values are received, they are all equal.
7
- *
8
- * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values
9
- * will be continuously overwritten.
10
- */
11
- var AnyValue = class AnyValue extends require_base.BaseChannel {
12
- lc_graph_name = "AnyValue";
13
- value = [];
14
- constructor() {
15
- super();
16
- }
17
- fromCheckpoint(checkpoint) {
18
- const empty = new AnyValue();
19
- if (typeof checkpoint !== "undefined") empty.value = [checkpoint];
20
- return empty;
21
- }
22
- update(values) {
23
- if (values.length === 0) {
24
- const updated = this.value.length > 0;
25
- this.value = [];
26
- return updated;
27
- }
28
- this.value = [values[values.length - 1]];
29
- return false;
30
- }
31
- get() {
32
- if (this.value.length === 0) throw new require_errors.EmptyChannelError();
33
- return this.value[0];
34
- }
35
- checkpoint() {
36
- if (this.value.length === 0) throw new require_errors.EmptyChannelError();
37
- return this.value[0];
38
- }
39
- isAvailable() {
40
- return this.value.length !== 0;
41
- }
42
- };
43
-
44
- //#endregion
45
- exports.AnyValue = AnyValue;
46
- //# sourceMappingURL=any_value.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"any_value.cjs","names":["BaseChannel","EmptyChannelError"],"sources":["../../src/channels/any_value.ts"],"sourcesContent":["import { EmptyChannelError } from \"../errors.js\";\nimport { BaseChannel } from \"./base.js\";\n\n/**\n * Stores the last value received, assumes that if multiple values are received, they are all equal.\n *\n * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values\n * will be continuously overwritten.\n */\nexport class AnyValue<Value> extends BaseChannel<Value, Value, Value> {\n lc_graph_name = \"AnyValue\";\n\n // value is an array so we don't misinterpret an update to undefined as no write\n value: [Value] | [] = [];\n\n constructor() {\n super();\n }\n\n fromCheckpoint(checkpoint?: Value) {\n const empty = new AnyValue<Value>();\n if (typeof checkpoint !== \"undefined\") {\n empty.value = [checkpoint];\n }\n return empty as this;\n }\n\n update(values: Value[]): boolean {\n if (values.length === 0) {\n const updated = this.value.length > 0;\n this.value = [];\n return updated;\n }\n\n // eslint-disable-next-line prefer-destructuring\n this.value = [values[values.length - 1]];\n return false;\n }\n\n get(): Value {\n if (this.value.length === 0) {\n throw new EmptyChannelError();\n }\n return this.value[0];\n }\n\n checkpoint(): Value {\n if (this.value.length === 0) {\n throw new EmptyChannelError();\n }\n return this.value[0];\n }\n\n isAvailable(): boolean {\n return this.value.length !== 0;\n }\n}\n"],"mappings":";;;;;;;;;;AASA,IAAa,WAAb,MAAa,iBAAwBA,yBAAiC;CACpE,gBAAgB;CAGhB,QAAsB;CAEtB,cAAc;AACZ;;CAGF,eAAe,YAAoB;EACjC,MAAM,QAAQ,IAAI;AAClB,MAAI,OAAO,eAAe,YACxB,OAAM,QAAQ,CAAC;AAEjB,SAAO;;CAGT,OAAO,QAA0B;AAC/B,MAAI,OAAO,WAAW,GAAG;GACvB,MAAM,UAAU,KAAK,MAAM,SAAS;AACpC,QAAK,QAAQ;AACb,UAAO;;AAIT,OAAK,QAAQ,CAAC,OAAO,OAAO,SAAS;AACrC,SAAO;;CAGT,MAAa;AACX,MAAI,KAAK,MAAM,WAAW,EACxB,OAAM,IAAIC;AAEZ,SAAO,KAAK,MAAM;;CAGpB,aAAoB;AAClB,MAAI,KAAK,MAAM,WAAW,EACxB,OAAM,IAAIA;AAEZ,SAAO,KAAK,MAAM;;CAGpB,cAAuB;AACrB,SAAO,KAAK,MAAM,WAAW"}
@@ -1,24 +0,0 @@
1
- import { BaseChannel } from "./base.cjs";
2
-
3
- //#region src/channels/any_value.d.ts
4
-
5
- /**
6
- * Stores the last value received, assumes that if multiple values are received, they are all equal.
7
- *
8
- * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values
9
- * will be continuously overwritten.
10
- */
11
- declare class AnyValue<Value> extends BaseChannel<Value, Value, Value> {
12
- lc_graph_name: string;
13
- // value is an array so we don't misinterpret an update to undefined as no write
14
- value: [Value] | [];
15
- constructor();
16
- fromCheckpoint(checkpoint?: Value): this;
17
- update(values: Value[]): boolean;
18
- get(): Value;
19
- checkpoint(): Value;
20
- isAvailable(): boolean;
21
- }
22
- //#endregion
23
- export { AnyValue };
24
- //# sourceMappingURL=any_value.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"any_value.d.cts","names":["BaseChannel","AnyValue","Value"],"sources":["../../src/channels/any_value.d.ts"],"sourcesContent":["import { BaseChannel } from \"./base.js\";\n/**\n * Stores the last value received, assumes that if multiple values are received, they are all equal.\n *\n * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values\n * will be continuously overwritten.\n */\nexport declare class AnyValue<Value> extends BaseChannel<Value, Value, Value> {\n lc_graph_name: string;\n // value is an array so we don't misinterpret an update to undefined as no write\n value: [Value] | [];\n constructor();\n fromCheckpoint(checkpoint?: Value): this;\n update(values: Value[]): boolean;\n get(): Value;\n checkpoint(): Value;\n isAvailable(): boolean;\n}\n"],"mappings":";;;;;;AAOA;;;;AAAuEE,cAAlDD,QAAkDC,CAAAA,KAAAA,CAAAA,SAA1BF,WAA0BE,CAAdA,KAAcA,EAAPA,KAAOA,EAAAA,KAAAA,CAAAA,CAAAA;eAG3DA,EAAAA,MAAAA;;OAGOA,EAAAA,CAHPA,KAGOA,CAAAA,GAAAA,EAAAA;aACRA,CAAAA;gBACOA,CAAAA,UAAAA,CAAAA,EAHcA,KAGdA,CAAAA,EAAAA,IAAAA;QAR2BF,CAAAA,MAAAA,EAM1BE,KAN0BF,EAAAA,CAAAA,EAAAA,OAAAA;SAOlCE;gBACOA"}
@@ -1,24 +0,0 @@
1
- import { BaseChannel } from "./base.js";
2
-
3
- //#region src/channels/any_value.d.ts
4
-
5
- /**
6
- * Stores the last value received, assumes that if multiple values are received, they are all equal.
7
- *
8
- * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values
9
- * will be continuously overwritten.
10
- */
11
- declare class AnyValue<Value> extends BaseChannel<Value, Value, Value> {
12
- lc_graph_name: string;
13
- // value is an array so we don't misinterpret an update to undefined as no write
14
- value: [Value] | [];
15
- constructor();
16
- fromCheckpoint(checkpoint?: Value): this;
17
- update(values: Value[]): boolean;
18
- get(): Value;
19
- checkpoint(): Value;
20
- isAvailable(): boolean;
21
- }
22
- //#endregion
23
- export { AnyValue };
24
- //# sourceMappingURL=any_value.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"any_value.d.ts","names":["BaseChannel","AnyValue","Value"],"sources":["../../src/channels/any_value.d.ts"],"sourcesContent":["import { BaseChannel } from \"./base.js\";\n/**\n * Stores the last value received, assumes that if multiple values are received, they are all equal.\n *\n * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values\n * will be continuously overwritten.\n */\nexport declare class AnyValue<Value> extends BaseChannel<Value, Value, Value> {\n lc_graph_name: string;\n // value is an array so we don't misinterpret an update to undefined as no write\n value: [Value] | [];\n constructor();\n fromCheckpoint(checkpoint?: Value): this;\n update(values: Value[]): boolean;\n get(): Value;\n checkpoint(): Value;\n isAvailable(): boolean;\n}\n"],"mappings":";;;;;;AAOA;;;;AAAuEE,cAAlDD,QAAkDC,CAAAA,KAAAA,CAAAA,SAA1BF,WAA0BE,CAAdA,KAAcA,EAAPA,KAAOA,EAAAA,KAAAA,CAAAA,CAAAA;eAG3DA,EAAAA,MAAAA;;OAGOA,EAAAA,CAHPA,KAGOA,CAAAA,GAAAA,EAAAA;aACRA,CAAAA;gBACOA,CAAAA,UAAAA,CAAAA,EAHcA,KAGdA,CAAAA,EAAAA,IAAAA;QAR2BF,CAAAA,MAAAA,EAM1BE,KAN0BF,EAAAA,CAAAA,EAAAA,OAAAA;SAOlCE;gBACOA"}
@@ -1,46 +0,0 @@
1
- import { EmptyChannelError } from "../errors.js";
2
- import { BaseChannel } from "./base.js";
3
-
4
- //#region src/channels/any_value.ts
5
- /**
6
- * Stores the last value received, assumes that if multiple values are received, they are all equal.
7
- *
8
- * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values
9
- * will be continuously overwritten.
10
- */
11
- var AnyValue = class AnyValue extends BaseChannel {
12
- lc_graph_name = "AnyValue";
13
- value = [];
14
- constructor() {
15
- super();
16
- }
17
- fromCheckpoint(checkpoint) {
18
- const empty = new AnyValue();
19
- if (typeof checkpoint !== "undefined") empty.value = [checkpoint];
20
- return empty;
21
- }
22
- update(values) {
23
- if (values.length === 0) {
24
- const updated = this.value.length > 0;
25
- this.value = [];
26
- return updated;
27
- }
28
- this.value = [values[values.length - 1]];
29
- return false;
30
- }
31
- get() {
32
- if (this.value.length === 0) throw new EmptyChannelError();
33
- return this.value[0];
34
- }
35
- checkpoint() {
36
- if (this.value.length === 0) throw new EmptyChannelError();
37
- return this.value[0];
38
- }
39
- isAvailable() {
40
- return this.value.length !== 0;
41
- }
42
- };
43
-
44
- //#endregion
45
- export { AnyValue };
46
- //# sourceMappingURL=any_value.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"any_value.js","names":[],"sources":["../../src/channels/any_value.ts"],"sourcesContent":["import { EmptyChannelError } from \"../errors.js\";\nimport { BaseChannel } from \"./base.js\";\n\n/**\n * Stores the last value received, assumes that if multiple values are received, they are all equal.\n *\n * Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values\n * will be continuously overwritten.\n */\nexport class AnyValue<Value> extends BaseChannel<Value, Value, Value> {\n lc_graph_name = \"AnyValue\";\n\n // value is an array so we don't misinterpret an update to undefined as no write\n value: [Value] | [] = [];\n\n constructor() {\n super();\n }\n\n fromCheckpoint(checkpoint?: Value) {\n const empty = new AnyValue<Value>();\n if (typeof checkpoint !== \"undefined\") {\n empty.value = [checkpoint];\n }\n return empty as this;\n }\n\n update(values: Value[]): boolean {\n if (values.length === 0) {\n const updated = this.value.length > 0;\n this.value = [];\n return updated;\n }\n\n // eslint-disable-next-line prefer-destructuring\n this.value = [values[values.length - 1]];\n return false;\n }\n\n get(): Value {\n if (this.value.length === 0) {\n throw new EmptyChannelError();\n }\n return this.value[0];\n }\n\n checkpoint(): Value {\n if (this.value.length === 0) {\n throw new EmptyChannelError();\n }\n return this.value[0];\n }\n\n isAvailable(): boolean {\n return this.value.length !== 0;\n }\n}\n"],"mappings":";;;;;;;;;;AASA,IAAa,WAAb,MAAa,iBAAwB,YAAiC;CACpE,gBAAgB;CAGhB,QAAsB;CAEtB,cAAc;AACZ;;CAGF,eAAe,YAAoB;EACjC,MAAM,QAAQ,IAAI;AAClB,MAAI,OAAO,eAAe,YACxB,OAAM,QAAQ,CAAC;AAEjB,SAAO;;CAGT,OAAO,QAA0B;AAC/B,MAAI,OAAO,WAAW,GAAG;GACvB,MAAM,UAAU,KAAK,MAAM,SAAS;AACpC,QAAK,QAAQ;AACb,UAAO;;AAIT,OAAK,QAAQ,CAAC,OAAO,OAAO,SAAS;AACrC,SAAO;;CAGT,MAAa;AACX,MAAI,KAAK,MAAM,WAAW,EACxB,OAAM,IAAI;AAEZ,SAAO,KAAK,MAAM;;CAGpB,aAAoB;AAClB,MAAI,KAAK,MAAM,WAAW,EACxB,OAAM,IAAI;AAEZ,SAAO,KAAK,MAAM;;CAGpB,cAAuB;AACrB,SAAO,KAAK,MAAM,WAAW"}
@@ -1,102 +0,0 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_errors = require('../errors.cjs');
3
- const __langchain_langgraph_checkpoint = require_rolldown_runtime.__toESM(require("@langchain/langgraph-checkpoint"));
4
-
5
- //#region src/channels/base.ts
6
- function isBaseChannel(obj) {
7
- return obj != null && obj.lg_is_channel === true;
8
- }
9
- /** @internal */
10
- var BaseChannel = class {
11
- ValueType;
12
- UpdateType;
13
- /** @ignore */
14
- lg_is_channel = true;
15
- /**
16
- * Mark the current value of the channel as consumed. By default, no-op.
17
- * A channel can use this method to modify its state, preventing the value
18
- * from being consumed again.
19
- *
20
- * Returns True if the channel was updated, False otherwise.
21
- */
22
- consume() {
23
- return false;
24
- }
25
- /**
26
- * Notify the channel that the Pregel run is finishing. By default, no-op.
27
- * A channel can use this method to modify its state, preventing finish.
28
- *
29
- * Returns True if the channel was updated, False otherwise.
30
- */
31
- finish() {
32
- return false;
33
- }
34
- /**
35
- * Return True if the channel is available (not empty), False otherwise.
36
- * Subclasses should override this method to provide a more efficient
37
- * implementation than calling get() and catching EmptyChannelError.
38
- */
39
- isAvailable() {
40
- try {
41
- this.get();
42
- return true;
43
- } catch (error) {
44
- if (error.name === require_errors.EmptyChannelError.unminifiable_name) return false;
45
- throw error;
46
- }
47
- }
48
- };
49
- const IS_ONLY_BASE_CHANNEL = Symbol.for("LG_IS_ONLY_BASE_CHANNEL");
50
- function getOnlyChannels(channels) {
51
- if (channels[IS_ONLY_BASE_CHANNEL] === true) return channels;
52
- const newChannels = {};
53
- for (const k in channels) {
54
- if (!Object.prototype.hasOwnProperty.call(channels, k)) continue;
55
- const value = channels[k];
56
- if (isBaseChannel(value)) newChannels[k] = value;
57
- }
58
- Object.assign(newChannels, { [IS_ONLY_BASE_CHANNEL]: true });
59
- return newChannels;
60
- }
61
- function emptyChannels(channels, checkpoint) {
62
- const filteredChannels = getOnlyChannels(channels);
63
- const newChannels = {};
64
- for (const k in filteredChannels) {
65
- if (!Object.prototype.hasOwnProperty.call(filteredChannels, k)) continue;
66
- const channelValue = checkpoint.channel_values[k];
67
- newChannels[k] = filteredChannels[k].fromCheckpoint(channelValue);
68
- }
69
- Object.assign(newChannels, { [IS_ONLY_BASE_CHANNEL]: true });
70
- return newChannels;
71
- }
72
- function createCheckpoint(checkpoint, channels, step, options) {
73
- let values;
74
- if (channels === void 0) values = checkpoint.channel_values;
75
- else {
76
- values = {};
77
- for (const k in channels) {
78
- if (!Object.prototype.hasOwnProperty.call(channels, k)) continue;
79
- try {
80
- values[k] = channels[k].checkpoint();
81
- } catch (error) {
82
- if (error.name === require_errors.EmptyChannelError.unminifiable_name) {} else throw error;
83
- }
84
- }
85
- }
86
- return {
87
- v: 4,
88
- id: options?.id ?? (0, __langchain_langgraph_checkpoint.uuid6)(step),
89
- ts: (/* @__PURE__ */ new Date()).toISOString(),
90
- channel_values: values,
91
- channel_versions: checkpoint.channel_versions,
92
- versions_seen: checkpoint.versions_seen
93
- };
94
- }
95
-
96
- //#endregion
97
- exports.BaseChannel = BaseChannel;
98
- exports.createCheckpoint = createCheckpoint;
99
- exports.emptyChannels = emptyChannels;
100
- exports.getOnlyChannels = getOnlyChannels;
101
- exports.isBaseChannel = isBaseChannel;
102
- //# sourceMappingURL=base.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.cjs","names":["error: any","EmptyChannelError","values: Record<string, any>"],"sources":["../../src/channels/base.ts"],"sourcesContent":["import {\n ReadonlyCheckpoint,\n uuid6,\n Checkpoint,\n} from \"@langchain/langgraph-checkpoint\";\nimport { EmptyChannelError } from \"../errors.js\";\n\nexport function isBaseChannel(obj: unknown): obj is BaseChannel {\n return obj != null && (obj as BaseChannel).lg_is_channel === true;\n}\n\n/** @internal */\nexport abstract class BaseChannel<\n ValueType = unknown,\n UpdateType = unknown,\n CheckpointType = unknown\n> {\n ValueType: ValueType;\n\n UpdateType: UpdateType;\n\n /**\n * The name of the channel.\n */\n abstract lc_graph_name: string;\n\n /** @ignore */\n lg_is_channel = true;\n\n /**\n * Return a new identical channel, optionally initialized from a checkpoint.\n * Can be thought of as a \"restoration\" from a checkpoint which is a \"snapshot\" of the channel's state.\n *\n * @param {CheckpointType | undefined} checkpoint\n * @param {CheckpointType | undefined} initialValue\n * @returns {this}\n */\n abstract fromCheckpoint(checkpoint?: CheckpointType): this;\n\n /**\n * Update the channel's value with the given sequence of updates.\n * The order of the updates in the sequence is arbitrary.\n * This method is called by Pregel for all channels at the end of each step.\n * If there are no updates, it is called with an empty sequence.\n *\n * Raises InvalidUpdateError if the sequence of updates is invalid.\n * Returns True if the channel was updated, False otherwise.\n *\n * @throws {InvalidUpdateError} if the sequence of updates is invalid.\n * @param {Array<UpdateType>} values\n * @returns {void}\n */\n abstract update(values: UpdateType[]): boolean;\n\n /**\n * Return the current value of the channel.\n *\n * @throws {EmptyChannelError} if the channel is empty (never updated yet).\n * @returns {ValueType}\n */\n abstract get(): ValueType;\n\n /**\n * Return a string representation of the channel's current state.\n *\n * @throws {EmptyChannelError} if the channel is empty (never updated yet), or doesn't support checkpoints.\n * @returns {CheckpointType | undefined}\n */\n abstract checkpoint(): CheckpointType | undefined;\n\n /**\n * Mark the current value of the channel as consumed. By default, no-op.\n * A channel can use this method to modify its state, preventing the value\n * from being consumed again.\n *\n * Returns True if the channel was updated, False otherwise.\n */\n consume(): boolean {\n return false;\n }\n\n /**\n * Notify the channel that the Pregel run is finishing. By default, no-op.\n * A channel can use this method to modify its state, preventing finish.\n *\n * Returns True if the channel was updated, False otherwise.\n */\n finish(): boolean {\n return false;\n }\n\n /**\n * Return True if the channel is available (not empty), False otherwise.\n * Subclasses should override this method to provide a more efficient\n * implementation than calling get() and catching EmptyChannelError.\n */\n isAvailable(): boolean {\n try {\n this.get();\n return true;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n if (error.name === EmptyChannelError.unminifiable_name) {\n return false;\n }\n throw error;\n }\n }\n}\n\nconst IS_ONLY_BASE_CHANNEL = Symbol.for(\"LG_IS_ONLY_BASE_CHANNEL\");\nexport function getOnlyChannels(\n channels: Record<string, BaseChannel>\n): Record<string, BaseChannel> {\n // @ts-expect-error - we know it's a record of base channels\n if (channels[IS_ONLY_BASE_CHANNEL] === true) return channels;\n\n const newChannels = {} as Record<string, BaseChannel>;\n for (const k in channels) {\n if (!Object.prototype.hasOwnProperty.call(channels, k)) continue;\n const value = channels[k];\n if (isBaseChannel(value)) newChannels[k] = value;\n }\n\n Object.assign(newChannels, { [IS_ONLY_BASE_CHANNEL]: true });\n return newChannels;\n}\n\nexport function emptyChannels<Cc extends Record<string, BaseChannel>>(\n channels: Cc,\n checkpoint: ReadonlyCheckpoint\n): Cc {\n const filteredChannels = getOnlyChannels(channels) as Cc;\n\n const newChannels = {} as Cc;\n for (const k in filteredChannels) {\n if (!Object.prototype.hasOwnProperty.call(filteredChannels, k)) continue;\n const channelValue = checkpoint.channel_values[k];\n newChannels[k] = filteredChannels[k].fromCheckpoint(channelValue);\n }\n Object.assign(newChannels, { [IS_ONLY_BASE_CHANNEL]: true });\n return newChannels;\n}\n\nexport function createCheckpoint<ValueType>(\n checkpoint: ReadonlyCheckpoint,\n channels: Record<string, BaseChannel<ValueType>> | undefined,\n step: number,\n options?: { id?: string }\n): Checkpoint {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let values: Record<string, any>;\n if (channels === undefined) {\n values = checkpoint.channel_values;\n } else {\n values = {};\n for (const k in channels) {\n if (!Object.prototype.hasOwnProperty.call(channels, k)) continue;\n try {\n values[k] = channels[k].checkpoint();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n if (error.name === EmptyChannelError.unminifiable_name) {\n // no-op\n } else {\n throw error; // Rethrow unexpected errors\n }\n }\n }\n }\n\n return {\n v: 4,\n id: options?.id ?? uuid6(step),\n ts: new Date().toISOString(),\n channel_values: values,\n channel_versions: checkpoint.channel_versions,\n versions_seen: checkpoint.versions_seen,\n };\n}\n"],"mappings":";;;;;AAOA,SAAgB,cAAc,KAAkC;AAC9D,QAAO,OAAO,QAAS,IAAoB,kBAAkB;;;AAI/D,IAAsB,cAAtB,MAIE;CACA;CAEA;;CAQA,gBAAgB;;;;;;;;CAkDhB,UAAmB;AACjB,SAAO;;;;;;;;CAST,SAAkB;AAChB,SAAO;;;;;;;CAQT,cAAuB;AACrB,MAAI;AACF,QAAK;AACL,UAAO;WAEAA,OAAY;AACnB,OAAI,MAAM,SAASC,iCAAkB,kBACnC,QAAO;AAET,SAAM;;;;AAKZ,MAAM,uBAAuB,OAAO,IAAI;AACxC,SAAgB,gBACd,UAC6B;AAE7B,KAAI,SAAS,0BAA0B,KAAM,QAAO;CAEpD,MAAM,cAAc;AACpB,MAAK,MAAM,KAAK,UAAU;AACxB,MAAI,CAAC,OAAO,UAAU,eAAe,KAAK,UAAU,GAAI;EACxD,MAAM,QAAQ,SAAS;AACvB,MAAI,cAAc,OAAQ,aAAY,KAAK;;AAG7C,QAAO,OAAO,aAAa,GAAG,uBAAuB;AACrD,QAAO;;AAGT,SAAgB,cACd,UACA,YACI;CACJ,MAAM,mBAAmB,gBAAgB;CAEzC,MAAM,cAAc;AACpB,MAAK,MAAM,KAAK,kBAAkB;AAChC,MAAI,CAAC,OAAO,UAAU,eAAe,KAAK,kBAAkB,GAAI;EAChE,MAAM,eAAe,WAAW,eAAe;AAC/C,cAAY,KAAK,iBAAiB,GAAG,eAAe;;AAEtD,QAAO,OAAO,aAAa,GAAG,uBAAuB;AACrD,QAAO;;AAGT,SAAgB,iBACd,YACA,UACA,MACA,SACY;CAEZ,IAAIC;AACJ,KAAI,aAAa,OACf,UAAS,WAAW;MACf;AACL,WAAS;AACT,OAAK,MAAM,KAAK,UAAU;AACxB,OAAI,CAAC,OAAO,UAAU,eAAe,KAAK,UAAU,GAAI;AACxD,OAAI;AACF,WAAO,KAAK,SAAS,GAAG;YAEjBF,OAAY;AACnB,QAAI,MAAM,SAASC,iCAAkB,mBAAmB,OAGtD,OAAM;;;;AAMd,QAAO;EACL,GAAG;EACH,IAAI,SAAS,kDAAY;EACzB,qBAAI,IAAI,QAAO;EACf,gBAAgB;EAChB,kBAAkB,WAAW;EAC7B,eAAe,WAAW"}