@langchain/langgraph 0.4.9 → 1.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (505) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +1 -2
  3. package/dist/_virtual/rolldown_runtime.cjs +25 -0
  4. package/dist/channels/any_value.cjs +44 -63
  5. package/dist/channels/any_value.cjs.map +1 -0
  6. package/dist/channels/any_value.d.cts +24 -0
  7. package/dist/channels/any_value.d.cts.map +1 -0
  8. package/dist/channels/any_value.d.ts +16 -11
  9. package/dist/channels/any_value.d.ts.map +1 -0
  10. package/dist/channels/any_value.js +42 -57
  11. package/dist/channels/any_value.js.map +1 -1
  12. package/dist/channels/base.cjs +93 -133
  13. package/dist/channels/base.cjs.map +1 -0
  14. package/dist/channels/base.d.cts +79 -0
  15. package/dist/channels/base.d.cts.map +1 -0
  16. package/dist/channels/base.d.ts +77 -73
  17. package/dist/channels/base.d.ts.map +1 -0
  18. package/dist/channels/base.js +90 -127
  19. package/dist/channels/base.js.map +1 -1
  20. package/dist/channels/binop.cjs +47 -77
  21. package/dist/channels/binop.cjs.map +1 -0
  22. package/dist/channels/binop.d.cts +22 -0
  23. package/dist/channels/binop.d.cts.map +1 -0
  24. package/dist/channels/binop.d.ts +17 -12
  25. package/dist/channels/binop.d.ts.map +1 -0
  26. package/dist/channels/binop.js +45 -71
  27. package/dist/channels/binop.js.map +1 -1
  28. package/dist/channels/dynamic_barrier_value.cjs +72 -208
  29. package/dist/channels/dynamic_barrier_value.cjs.map +1 -0
  30. package/dist/channels/dynamic_barrier_value.d.cts +42 -0
  31. package/dist/channels/dynamic_barrier_value.d.cts.map +1 -0
  32. package/dist/channels/dynamic_barrier_value.d.ts +20 -35
  33. package/dist/channels/dynamic_barrier_value.d.ts.map +1 -0
  34. package/dist/channels/dynamic_barrier_value.js +69 -200
  35. package/dist/channels/dynamic_barrier_value.js.map +1 -1
  36. package/dist/channels/ephemeral_value.cjs +44 -70
  37. package/dist/channels/ephemeral_value.cjs.map +1 -0
  38. package/dist/channels/ephemeral_value.d.cts +22 -0
  39. package/dist/channels/ephemeral_value.d.cts.map +1 -0
  40. package/dist/channels/ephemeral_value.d.ts +18 -12
  41. package/dist/channels/ephemeral_value.d.ts.map +1 -0
  42. package/dist/channels/ephemeral_value.js +43 -65
  43. package/dist/channels/ephemeral_value.js.map +1 -1
  44. package/dist/channels/index.cjs +21 -10
  45. package/dist/channels/index.d.cts +9 -0
  46. package/dist/channels/index.d.ts +9 -7
  47. package/dist/channels/index.js +10 -3
  48. package/dist/channels/last_value.cjs +90 -140
  49. package/dist/channels/last_value.cjs.map +1 -0
  50. package/dist/channels/last_value.d.cts +42 -0
  51. package/dist/channels/last_value.d.cts.map +1 -0
  52. package/dist/channels/last_value.d.ts +27 -23
  53. package/dist/channels/last_value.d.ts.map +1 -0
  54. package/dist/channels/last_value.js +87 -133
  55. package/dist/channels/last_value.js.map +1 -1
  56. package/dist/channels/named_barrier_value.cjs +114 -170
  57. package/dist/channels/named_barrier_value.cjs.map +1 -0
  58. package/dist/channels/named_barrier_value.d.cts +46 -0
  59. package/dist/channels/named_barrier_value.d.cts.map +1 -0
  60. package/dist/channels/named_barrier_value.d.ts +32 -29
  61. package/dist/channels/named_barrier_value.d.ts.map +1 -0
  62. package/dist/channels/named_barrier_value.js +111 -163
  63. package/dist/channels/named_barrier_value.js.map +1 -1
  64. package/dist/channels/topic.cjs +63 -96
  65. package/dist/channels/topic.cjs.map +1 -0
  66. package/dist/channels/topic.d.cts +32 -0
  67. package/dist/channels/topic.d.cts.map +1 -0
  68. package/dist/channels/topic.d.ts +28 -19
  69. package/dist/channels/topic.d.ts.map +1 -0
  70. package/dist/channels/topic.js +61 -90
  71. package/dist/channels/topic.js.map +1 -1
  72. package/dist/constants.cjs +376 -452
  73. package/dist/constants.cjs.map +1 -0
  74. package/dist/constants.d.cts +285 -0
  75. package/dist/constants.d.cts.map +1 -0
  76. package/dist/constants.d.ts +113 -148
  77. package/dist/constants.d.ts.map +1 -0
  78. package/dist/constants.js +336 -444
  79. package/dist/constants.js.map +1 -1
  80. package/dist/errors.cjs +151 -179
  81. package/dist/errors.cjs.map +1 -0
  82. package/dist/errors.d.cts +81 -0
  83. package/dist/errors.d.cts.map +1 -0
  84. package/dist/errors.d.ts +56 -46
  85. package/dist/errors.d.ts.map +1 -0
  86. package/dist/errors.js +140 -165
  87. package/dist/errors.js.map +1 -1
  88. package/dist/func/index.cjs +292 -290
  89. package/dist/func/index.cjs.map +1 -0
  90. package/dist/func/index.d.cts +293 -0
  91. package/dist/func/index.d.cts.map +1 -0
  92. package/dist/func/index.d.ts +86 -72
  93. package/dist/func/index.d.ts.map +1 -0
  94. package/dist/func/index.js +288 -284
  95. package/dist/func/index.js.map +1 -1
  96. package/dist/func/types.d.cts +64 -0
  97. package/dist/func/types.d.cts.map +1 -0
  98. package/dist/func/types.d.ts +24 -19
  99. package/dist/func/types.d.ts.map +1 -0
  100. package/dist/graph/annotation.cjs +96 -120
  101. package/dist/graph/annotation.cjs.map +1 -0
  102. package/dist/graph/annotation.d.cts +116 -0
  103. package/dist/graph/annotation.d.cts.map +1 -0
  104. package/dist/graph/annotation.d.ts +33 -34
  105. package/dist/graph/annotation.d.ts.map +1 -0
  106. package/dist/graph/annotation.js +91 -112
  107. package/dist/graph/annotation.js.map +1 -1
  108. package/dist/graph/graph.cjs +419 -723
  109. package/dist/graph/graph.cjs.map +1 -0
  110. package/dist/graph/graph.d.cts +133 -0
  111. package/dist/graph/graph.d.cts.map +1 -0
  112. package/dist/graph/graph.d.ts +124 -91
  113. package/dist/graph/graph.d.ts.map +1 -0
  114. package/dist/graph/graph.js +412 -713
  115. package/dist/graph/graph.js.map +1 -1
  116. package/dist/graph/index.cjs +4 -17
  117. package/dist/graph/index.js +6 -5
  118. package/dist/graph/message.cjs +59 -104
  119. package/dist/graph/message.cjs.map +1 -0
  120. package/dist/graph/message.d.cts +19 -0
  121. package/dist/graph/message.d.cts.map +1 -0
  122. package/dist/graph/message.d.ts +11 -10
  123. package/dist/graph/message.d.ts.map +1 -0
  124. package/dist/graph/message.js +56 -98
  125. package/dist/graph/message.js.map +1 -1
  126. package/dist/graph/messages_annotation.cjs +106 -106
  127. package/dist/graph/messages_annotation.cjs.map +1 -0
  128. package/dist/graph/messages_annotation.d.cts +111 -0
  129. package/dist/graph/messages_annotation.d.cts.map +1 -0
  130. package/dist/graph/messages_annotation.d.ts +18 -9
  131. package/dist/graph/messages_annotation.d.ts.map +1 -0
  132. package/dist/graph/messages_annotation.js +100 -100
  133. package/dist/graph/messages_annotation.js.map +1 -1
  134. package/dist/graph/state.cjs +475 -779
  135. package/dist/graph/state.cjs.map +1 -0
  136. package/dist/graph/state.d.cts +231 -0
  137. package/dist/graph/state.d.cts.map +1 -0
  138. package/dist/graph/state.d.ts +148 -138
  139. package/dist/graph/state.d.ts.map +1 -0
  140. package/dist/graph/state.js +469 -769
  141. package/dist/graph/state.js.map +1 -1
  142. package/dist/graph/zod/index.cjs +10 -21
  143. package/dist/graph/zod/index.d.cts +3 -0
  144. package/dist/graph/zod/index.d.ts +3 -3
  145. package/dist/graph/zod/index.js +4 -4
  146. package/dist/graph/zod/meta.cjs +142 -177
  147. package/dist/graph/zod/meta.cjs.map +1 -0
  148. package/dist/graph/zod/meta.d.cts +116 -0
  149. package/dist/graph/zod/meta.d.cts.map +1 -0
  150. package/dist/graph/zod/meta.d.ts +99 -97
  151. package/dist/graph/zod/meta.d.ts.map +1 -0
  152. package/dist/graph/zod/meta.js +136 -170
  153. package/dist/graph/zod/meta.js.map +1 -1
  154. package/dist/graph/zod/plugin.cjs +36 -39
  155. package/dist/graph/zod/plugin.cjs.map +1 -0
  156. package/dist/graph/zod/plugin.js +34 -35
  157. package/dist/graph/zod/plugin.js.map +1 -1
  158. package/dist/graph/zod/schema.cjs +82 -110
  159. package/dist/graph/zod/schema.cjs.map +1 -0
  160. package/dist/graph/zod/schema.d.cts +38 -0
  161. package/dist/graph/zod/schema.d.cts.map +1 -0
  162. package/dist/graph/zod/schema.d.ts +12 -6
  163. package/dist/graph/zod/schema.d.ts.map +1 -0
  164. package/dist/graph/zod/schema.js +77 -103
  165. package/dist/graph/zod/schema.js.map +1 -1
  166. package/dist/graph/zod/zod-registry.cjs +41 -47
  167. package/dist/graph/zod/zod-registry.cjs.map +1 -0
  168. package/dist/graph/zod/zod-registry.d.cts +51 -0
  169. package/dist/graph/zod/zod-registry.d.cts.map +1 -0
  170. package/dist/graph/zod/zod-registry.d.ts +34 -26
  171. package/dist/graph/zod/zod-registry.d.ts.map +1 -0
  172. package/dist/graph/zod/zod-registry.js +37 -41
  173. package/dist/graph/zod/zod-registry.js.map +1 -1
  174. package/dist/hash.cjs +205 -267
  175. package/dist/hash.cjs.map +1 -0
  176. package/dist/hash.js +205 -265
  177. package/dist/hash.js.map +1 -1
  178. package/dist/index.cjs +111 -33
  179. package/dist/index.cjs.map +1 -0
  180. package/dist/index.d.cts +26 -0
  181. package/dist/index.d.ts +26 -5
  182. package/dist/index.js +19 -7
  183. package/dist/index.js.map +1 -1
  184. package/dist/interrupt.cjs +79 -85
  185. package/dist/interrupt.cjs.map +1 -0
  186. package/dist/interrupt.d.cts +49 -0
  187. package/dist/interrupt.d.cts.map +1 -0
  188. package/dist/interrupt.d.ts +6 -1
  189. package/dist/interrupt.d.ts.map +1 -0
  190. package/dist/interrupt.js +76 -80
  191. package/dist/interrupt.js.map +1 -1
  192. package/dist/prebuilt/agentName.cjs +139 -172
  193. package/dist/prebuilt/agentName.cjs.map +1 -0
  194. package/dist/prebuilt/agentName.d.cts +42 -0
  195. package/dist/prebuilt/agentName.d.cts.map +1 -0
  196. package/dist/prebuilt/agentName.d.ts +13 -21
  197. package/dist/prebuilt/agentName.d.ts.map +1 -0
  198. package/dist/prebuilt/agentName.js +139 -168
  199. package/dist/prebuilt/agentName.js.map +1 -1
  200. package/dist/prebuilt/agent_executor.cjs +42 -80
  201. package/dist/prebuilt/agent_executor.cjs.map +1 -0
  202. package/dist/prebuilt/agent_executor.d.cts +57 -0
  203. package/dist/prebuilt/agent_executor.d.cts.map +1 -0
  204. package/dist/prebuilt/agent_executor.d.ts +47 -38
  205. package/dist/prebuilt/agent_executor.d.ts.map +1 -0
  206. package/dist/prebuilt/agent_executor.js +40 -75
  207. package/dist/prebuilt/agent_executor.js.map +1 -1
  208. package/dist/prebuilt/chat_agent_executor.cjs +66 -128
  209. package/dist/prebuilt/chat_agent_executor.cjs.map +1 -0
  210. package/dist/prebuilt/chat_agent_executor.d.cts +23 -0
  211. package/dist/prebuilt/chat_agent_executor.d.cts.map +1 -0
  212. package/dist/prebuilt/chat_agent_executor.d.ts +18 -10
  213. package/dist/prebuilt/chat_agent_executor.d.ts.map +1 -0
  214. package/dist/prebuilt/chat_agent_executor.js +63 -123
  215. package/dist/prebuilt/chat_agent_executor.js.map +1 -1
  216. package/dist/prebuilt/index.cjs +15 -18
  217. package/dist/prebuilt/index.d.cts +8 -0
  218. package/dist/prebuilt/index.d.ts +8 -8
  219. package/dist/prebuilt/index.js +8 -7
  220. package/dist/prebuilt/interrupt.d.cts +73 -0
  221. package/dist/prebuilt/interrupt.d.cts.map +1 -0
  222. package/dist/prebuilt/interrupt.d.ts +32 -15
  223. package/dist/prebuilt/interrupt.d.ts.map +1 -0
  224. package/dist/prebuilt/react_agent_executor.cjs +317 -473
  225. package/dist/prebuilt/react_agent_executor.cjs.map +1 -0
  226. package/dist/prebuilt/react_agent_executor.d.cts +229 -0
  227. package/dist/prebuilt/react_agent_executor.d.cts.map +1 -0
  228. package/dist/prebuilt/react_agent_executor.d.ts +171 -143
  229. package/dist/prebuilt/react_agent_executor.d.ts.map +1 -0
  230. package/dist/prebuilt/react_agent_executor.js +315 -465
  231. package/dist/prebuilt/react_agent_executor.js.map +1 -1
  232. package/dist/prebuilt/tool_executor.cjs +45 -67
  233. package/dist/prebuilt/tool_executor.cjs.map +1 -0
  234. package/dist/prebuilt/tool_executor.d.cts +42 -0
  235. package/dist/prebuilt/tool_executor.d.cts.map +1 -0
  236. package/dist/prebuilt/tool_executor.d.ts +30 -24
  237. package/dist/prebuilt/tool_executor.d.ts.map +1 -0
  238. package/dist/prebuilt/tool_executor.js +44 -63
  239. package/dist/prebuilt/tool_executor.js.map +1 -1
  240. package/dist/prebuilt/tool_node.cjs +213 -275
  241. package/dist/prebuilt/tool_node.cjs.map +1 -0
  242. package/dist/prebuilt/tool_node.d.cts +151 -0
  243. package/dist/prebuilt/tool_node.d.cts.map +1 -0
  244. package/dist/prebuilt/tool_node.d.ts +30 -17
  245. package/dist/prebuilt/tool_node.d.ts.map +1 -0
  246. package/dist/prebuilt/tool_node.js +209 -268
  247. package/dist/prebuilt/tool_node.js.map +1 -1
  248. package/dist/pregel/algo.cjs +551 -692
  249. package/dist/pregel/algo.cjs.map +1 -0
  250. package/dist/pregel/algo.d.cts +13 -0
  251. package/dist/pregel/algo.d.cts.map +1 -0
  252. package/dist/pregel/algo.d.ts +8 -38
  253. package/dist/pregel/algo.d.ts.map +1 -0
  254. package/dist/pregel/algo.js +546 -683
  255. package/dist/pregel/algo.js.map +1 -1
  256. package/dist/pregel/call.cjs +46 -42
  257. package/dist/pregel/call.cjs.map +1 -0
  258. package/dist/pregel/call.js +43 -37
  259. package/dist/pregel/call.js.map +1 -1
  260. package/dist/pregel/debug.cjs +153 -223
  261. package/dist/pregel/debug.cjs.map +1 -0
  262. package/dist/pregel/debug.js +152 -215
  263. package/dist/pregel/debug.js.map +1 -1
  264. package/dist/pregel/index.cjs +1138 -1604
  265. package/dist/pregel/index.cjs.map +1 -0
  266. package/dist/pregel/index.d.cts +536 -0
  267. package/dist/pregel/index.d.cts.map +1 -0
  268. package/dist/pregel/index.d.ts +460 -422
  269. package/dist/pregel/index.d.ts.map +1 -0
  270. package/dist/pregel/index.js +1129 -1592
  271. package/dist/pregel/index.js.map +1 -1
  272. package/dist/pregel/io.cjs +127 -234
  273. package/dist/pregel/io.cjs.map +1 -0
  274. package/dist/pregel/io.js +122 -225
  275. package/dist/pregel/io.js.map +1 -1
  276. package/dist/pregel/loop.cjs +542 -954
  277. package/dist/pregel/loop.cjs.map +1 -0
  278. package/dist/pregel/loop.js +539 -948
  279. package/dist/pregel/loop.js.map +1 -1
  280. package/dist/pregel/messages.cjs +104 -196
  281. package/dist/pregel/messages.cjs.map +1 -0
  282. package/dist/pregel/messages.js +102 -191
  283. package/dist/pregel/messages.js.map +1 -1
  284. package/dist/pregel/read.cjs +150 -280
  285. package/dist/pregel/read.cjs.map +1 -0
  286. package/dist/pregel/read.d.cts +51 -0
  287. package/dist/pregel/read.d.cts.map +1 -0
  288. package/dist/pregel/read.d.ts +48 -46
  289. package/dist/pregel/read.d.ts.map +1 -0
  290. package/dist/pregel/read.js +147 -274
  291. package/dist/pregel/read.js.map +1 -1
  292. package/dist/pregel/remote.cjs +339 -458
  293. package/dist/pregel/remote.cjs.map +1 -0
  294. package/dist/pregel/remote.d.cts +121 -0
  295. package/dist/pregel/remote.d.cts.map +1 -0
  296. package/dist/pregel/remote.d.ts +79 -69
  297. package/dist/pregel/remote.d.ts.map +1 -0
  298. package/dist/pregel/remote.js +337 -453
  299. package/dist/pregel/remote.js.map +1 -1
  300. package/dist/pregel/retry.cjs +87 -138
  301. package/dist/pregel/retry.cjs.map +1 -0
  302. package/dist/pregel/retry.js +83 -130
  303. package/dist/pregel/retry.js.map +1 -1
  304. package/dist/pregel/runnable_types.d.cts +49 -0
  305. package/dist/pregel/runnable_types.d.cts.map +1 -0
  306. package/dist/pregel/runnable_types.d.ts +47 -17
  307. package/dist/pregel/runnable_types.d.ts.map +1 -0
  308. package/dist/pregel/runner.cjs +222 -315
  309. package/dist/pregel/runner.cjs.map +1 -0
  310. package/dist/pregel/runner.js +219 -308
  311. package/dist/pregel/runner.js.map +1 -1
  312. package/dist/pregel/stream.cjs +89 -130
  313. package/dist/pregel/stream.cjs.map +1 -0
  314. package/dist/pregel/stream.js +87 -125
  315. package/dist/pregel/stream.js.map +1 -1
  316. package/dist/pregel/types.cjs +25 -62
  317. package/dist/pregel/types.cjs.map +1 -0
  318. package/dist/pregel/types.d.cts +440 -0
  319. package/dist/pregel/types.d.cts.map +1 -0
  320. package/dist/pregel/types.d.ts +381 -432
  321. package/dist/pregel/types.d.ts.map +1 -0
  322. package/dist/pregel/types.js +23 -57
  323. package/dist/pregel/types.js.map +1 -1
  324. package/dist/pregel/utils/config.cjs +101 -147
  325. package/dist/pregel/utils/config.cjs.map +1 -0
  326. package/dist/pregel/utils/config.d.cts +36 -0
  327. package/dist/pregel/utils/config.d.cts.map +1 -0
  328. package/dist/pregel/utils/config.d.ts +12 -9
  329. package/dist/pregel/utils/config.d.ts.map +1 -0
  330. package/dist/pregel/utils/config.js +99 -143
  331. package/dist/pregel/utils/config.js.map +1 -1
  332. package/dist/pregel/utils/index.cjs +87 -125
  333. package/dist/pregel/utils/index.cjs.map +1 -0
  334. package/dist/pregel/utils/index.d.cts +51 -0
  335. package/dist/pregel/utils/index.d.cts.map +1 -0
  336. package/dist/pregel/utils/index.d.ts +45 -61
  337. package/dist/pregel/utils/index.d.ts.map +1 -0
  338. package/dist/pregel/utils/index.js +86 -120
  339. package/dist/pregel/utils/index.js.map +1 -1
  340. package/dist/pregel/utils/subgraph.cjs +15 -26
  341. package/dist/pregel/utils/subgraph.cjs.map +1 -0
  342. package/dist/pregel/utils/subgraph.js +12 -21
  343. package/dist/pregel/utils/subgraph.js.map +1 -1
  344. package/dist/pregel/validate.cjs +42 -92
  345. package/dist/pregel/validate.cjs.map +1 -0
  346. package/dist/pregel/validate.js +39 -84
  347. package/dist/pregel/validate.js.map +1 -1
  348. package/dist/pregel/write.cjs +87 -137
  349. package/dist/pregel/write.cjs.map +1 -0
  350. package/dist/pregel/write.d.cts +35 -0
  351. package/dist/pregel/write.d.cts.map +1 -0
  352. package/dist/pregel/write.d.ts +27 -23
  353. package/dist/pregel/write.d.ts.map +1 -0
  354. package/dist/pregel/write.js +83 -131
  355. package/dist/pregel/write.js.map +1 -1
  356. package/dist/remote.cjs +3 -6
  357. package/dist/remote.d.cts +2 -0
  358. package/dist/remote.d.ts +2 -1
  359. package/dist/remote.js +3 -2
  360. package/dist/setup/async_local_storage.cjs +10 -7
  361. package/dist/setup/async_local_storage.cjs.map +1 -0
  362. package/dist/setup/async_local_storage.js +7 -2
  363. package/dist/setup/async_local_storage.js.map +1 -1
  364. package/dist/ui/index.cjs +4 -0
  365. package/dist/ui/index.d.cts +5 -0
  366. package/dist/ui/index.d.ts +5 -0
  367. package/dist/ui/index.js +3 -0
  368. package/dist/ui/stream.cjs +145 -0
  369. package/dist/ui/stream.cjs.map +1 -0
  370. package/dist/ui/stream.d.cts +25 -0
  371. package/dist/ui/stream.d.cts.map +1 -0
  372. package/dist/ui/stream.d.ts +25 -0
  373. package/dist/ui/stream.d.ts.map +1 -0
  374. package/dist/ui/stream.js +143 -0
  375. package/dist/ui/stream.js.map +1 -0
  376. package/dist/ui/types.infer.d.cts +53 -0
  377. package/dist/ui/types.infer.d.cts.map +1 -0
  378. package/dist/ui/types.infer.d.ts +53 -0
  379. package/dist/ui/types.infer.d.ts.map +1 -0
  380. package/dist/ui/types.message.d.cts +95 -0
  381. package/dist/ui/types.message.d.cts.map +1 -0
  382. package/dist/ui/types.message.d.ts +95 -0
  383. package/dist/ui/types.message.d.ts.map +1 -0
  384. package/dist/ui/types.schema.d.cts +228 -0
  385. package/dist/ui/types.schema.d.cts.map +1 -0
  386. package/dist/ui/types.schema.d.ts +228 -0
  387. package/dist/ui/types.schema.d.ts.map +1 -0
  388. package/dist/utils.cjs +77 -147
  389. package/dist/utils.cjs.map +1 -0
  390. package/dist/utils.d.cts +32 -0
  391. package/dist/utils.d.cts.map +1 -0
  392. package/dist/utils.d.ts +29 -25
  393. package/dist/utils.d.ts.map +1 -0
  394. package/dist/utils.js +73 -140
  395. package/dist/utils.js.map +1 -1
  396. package/dist/web.cjs +96 -55
  397. package/dist/web.d.cts +23 -0
  398. package/dist/web.d.ts +23 -14
  399. package/dist/web.js +15 -8
  400. package/dist/writer.cjs +15 -0
  401. package/dist/writer.cjs.map +1 -0
  402. package/dist/writer.d.cts +5 -0
  403. package/dist/writer.d.cts.map +1 -0
  404. package/dist/writer.d.ts +5 -0
  405. package/dist/writer.d.ts.map +1 -0
  406. package/dist/writer.js +14 -0
  407. package/dist/writer.js.map +1 -0
  408. package/package.json +90 -83
  409. package/dist/channels/index.js.map +0 -1
  410. package/dist/func/types.cjs +0 -15
  411. package/dist/func/types.js +0 -12
  412. package/dist/func/types.js.map +0 -1
  413. package/dist/graph/index.d.ts +0 -4
  414. package/dist/graph/index.js.map +0 -1
  415. package/dist/graph/message.test.cjs +0 -196
  416. package/dist/graph/message.test.d.ts +0 -1
  417. package/dist/graph/message.test.js +0 -194
  418. package/dist/graph/message.test.js.map +0 -1
  419. package/dist/graph/zod/index.js.map +0 -1
  420. package/dist/graph/zod/plugin.d.ts +0 -28
  421. package/dist/hash.d.ts +0 -2
  422. package/dist/prebuilt/index.js.map +0 -1
  423. package/dist/prebuilt/interrupt.cjs +0 -3
  424. package/dist/prebuilt/interrupt.js +0 -2
  425. package/dist/prebuilt/interrupt.js.map +0 -1
  426. package/dist/pregel/call.d.ts +0 -16
  427. package/dist/pregel/debug.d.ts +0 -41
  428. package/dist/pregel/debug.test.cjs +0 -258
  429. package/dist/pregel/debug.test.d.ts +0 -1
  430. package/dist/pregel/debug.test.js +0 -256
  431. package/dist/pregel/debug.test.js.map +0 -1
  432. package/dist/pregel/io.d.ts +0 -30
  433. package/dist/pregel/io.mapCommand.test.cjs +0 -150
  434. package/dist/pregel/io.mapCommand.test.d.ts +0 -1
  435. package/dist/pregel/io.mapCommand.test.js +0 -148
  436. package/dist/pregel/io.mapCommand.test.js.map +0 -1
  437. package/dist/pregel/loop.d.ts +0 -147
  438. package/dist/pregel/messages.d.ts +0 -30
  439. package/dist/pregel/messages.test.cjs +0 -369
  440. package/dist/pregel/messages.test.d.ts +0 -1
  441. package/dist/pregel/messages.test.js +0 -367
  442. package/dist/pregel/messages.test.js.map +0 -1
  443. package/dist/pregel/read.test.cjs +0 -194
  444. package/dist/pregel/read.test.d.ts +0 -1
  445. package/dist/pregel/read.test.js +0 -192
  446. package/dist/pregel/read.test.js.map +0 -1
  447. package/dist/pregel/retry.d.ts +0 -17
  448. package/dist/pregel/runnable_types.cjs +0 -3
  449. package/dist/pregel/runnable_types.js +0 -2
  450. package/dist/pregel/runnable_types.js.map +0 -1
  451. package/dist/pregel/runner.d.ts +0 -79
  452. package/dist/pregel/runner.test.cjs +0 -66
  453. package/dist/pregel/runner.test.d.ts +0 -1
  454. package/dist/pregel/runner.test.js +0 -64
  455. package/dist/pregel/runner.test.js.map +0 -1
  456. package/dist/pregel/stream.d.ts +0 -40
  457. package/dist/pregel/utils/config.test.cjs +0 -214
  458. package/dist/pregel/utils/config.test.d.ts +0 -1
  459. package/dist/pregel/utils/config.test.js +0 -212
  460. package/dist/pregel/utils/config.test.js.map +0 -1
  461. package/dist/pregel/utils/subgraph.d.ts +0 -4
  462. package/dist/pregel/utils/subgraph.test.cjs +0 -83
  463. package/dist/pregel/utils/subgraph.test.d.ts +0 -1
  464. package/dist/pregel/utils/subgraph.test.js +0 -81
  465. package/dist/pregel/utils/subgraph.test.js.map +0 -1
  466. package/dist/pregel/validate.d.ts +0 -16
  467. package/dist/pregel/validate.test.cjs +0 -220
  468. package/dist/pregel/validate.test.d.ts +0 -1
  469. package/dist/pregel/validate.test.js +0 -218
  470. package/dist/pregel/validate.test.js.map +0 -1
  471. package/dist/pregel/write.test.cjs +0 -181
  472. package/dist/pregel/write.test.d.ts +0 -1
  473. package/dist/pregel/write.test.js +0 -179
  474. package/dist/pregel/write.test.js.map +0 -1
  475. package/dist/remote.js.map +0 -1
  476. package/dist/setup/async_local_storage.d.ts +0 -1
  477. package/dist/web.js.map +0 -1
  478. package/index.cjs +0 -1
  479. package/index.d.cts +0 -1
  480. package/index.d.ts +0 -1
  481. package/index.js +0 -1
  482. package/prebuilt.cjs +0 -1
  483. package/prebuilt.d.cts +0 -1
  484. package/prebuilt.d.ts +0 -1
  485. package/prebuilt.js +0 -1
  486. package/pregel.cjs +0 -1
  487. package/pregel.d.cts +0 -1
  488. package/pregel.d.ts +0 -1
  489. package/pregel.js +0 -1
  490. package/remote.cjs +0 -1
  491. package/remote.d.cts +0 -1
  492. package/remote.d.ts +0 -1
  493. package/remote.js +0 -1
  494. package/web.cjs +0 -1
  495. package/web.d.cts +0 -1
  496. package/web.d.ts +0 -1
  497. package/web.js +0 -1
  498. package/zod/schema.cjs +0 -1
  499. package/zod/schema.d.cts +0 -1
  500. package/zod/schema.d.ts +0 -1
  501. package/zod/schema.js +0 -1
  502. package/zod.cjs +0 -1
  503. package/zod.d.cts +0 -1
  504. package/zod.d.ts +0 -1
  505. package/zod.js +0 -1
@@ -0,0 +1,440 @@
1
+ import { BaseChannel } from "../channels/base.cjs";
2
+ import { LangGraphRunnableConfig } from "./runnable_types.cjs";
3
+ import { CachePolicy, RetryPolicy } from "./utils/index.cjs";
4
+ import { PregelNode } from "./read.cjs";
5
+ import { Interrupt } from "../constants.cjs";
6
+ import { All, BaseCache, BaseCheckpointSaver, BaseStore, CheckpointListOptions, CheckpointMetadata, PendingWrite } from "@langchain/langgraph-checkpoint";
7
+ import { Runnable, RunnableConfig } from "@langchain/core/runnables";
8
+ import { Graph } from "@langchain/core/runnables/graph";
9
+ import { IterableReadableStream } from "@langchain/core/utils/stream";
10
+ import { BaseMessage } from "@langchain/core/messages";
11
+
12
+ //#region src/pregel/types.d.ts
13
+
14
+ /**
15
+ * Selects the type of output you'll receive when streaming from the graph. See [Streaming](/langgraphjs/how-tos/#streaming) for more details.
16
+ */
17
+ type StreamMode = "values" | "updates" | "debug" | "messages" | "checkpoints" | "tasks" | "custom";
18
+ type Durability = "exit" | "async" | "sync";
19
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
+ type PregelInputType = any;
21
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
+ type PregelOutputType = any;
23
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
+ type StreamMessageOutput = [BaseMessage, Record<string, any>];
25
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
+ type StreamDebugOutput = Record<string, any>;
27
+ type StreamCheckpointsOutput<StreamValues> = {
28
+ values: StreamValues;
29
+ next: string[];
30
+ config: RunnableConfig;
31
+ metadata?: CheckpointMetadata;
32
+ parentConfig?: RunnableConfig | undefined;
33
+ tasks: PregelTaskDescription[];
34
+ };
35
+ interface StreamTasksOutputBase {
36
+ id: string;
37
+ name: string;
38
+ interrupts: Interrupt[];
39
+ }
40
+ interface StreamTasksCreateOutput<StreamValues> extends StreamTasksOutputBase {
41
+ input: StreamValues;
42
+ triggers: string[];
43
+ }
44
+ interface StreamTasksResultOutput<Keys, StreamUpdates> extends StreamTasksOutputBase {
45
+ result: [Keys, StreamUpdates][];
46
+ }
47
+ type StreamTasksOutput<StreamUpdates, StreamValues, Nodes = string> = StreamTasksCreateOutput<StreamValues> | StreamTasksResultOutput<Nodes, StreamUpdates>;
48
+ type DefaultStreamMode = "updates";
49
+ type StreamOutputMap<TStreamMode extends StreamMode | StreamMode[] | undefined, TStreamSubgraphs extends boolean, StreamUpdates, StreamValues, Nodes, NodeReturnType, StreamCustom> = (undefined extends TStreamMode ? [] : StreamMode | StreamMode[] extends TStreamMode ? TStreamMode extends StreamMode[] ? TStreamMode[number] : TStreamMode : TStreamMode extends StreamMode[] ? TStreamMode[number] : []) extends infer Multiple extends StreamMode ? [TStreamSubgraphs] extends [true] ? {
50
+ values: [string[], "values", StreamValues];
51
+ updates: [string[], "updates", NodeReturnType extends Record<string, unknown> ? { [K in keyof NodeReturnType]?: NodeReturnType[K] } : Record<Nodes extends string ? Nodes : string, StreamUpdates>];
52
+ messages: [string[], "messages", StreamMessageOutput];
53
+ custom: [string[], "custom", StreamCustom];
54
+ checkpoints: [string[], "checkpoints", StreamCheckpointsOutput<StreamValues>];
55
+ tasks: [string[], "tasks", StreamTasksOutput<StreamUpdates, StreamValues>];
56
+ debug: [string[], "debug", StreamDebugOutput];
57
+ }[Multiple] : {
58
+ values: ["values", StreamValues];
59
+ updates: ["updates", NodeReturnType extends Record<string, unknown> ? { [K in keyof NodeReturnType]?: NodeReturnType[K] } : Record<Nodes extends string ? Nodes : string, StreamUpdates>];
60
+ messages: ["messages", StreamMessageOutput];
61
+ custom: ["custom", StreamCustom];
62
+ checkpoints: ["checkpoints", StreamCheckpointsOutput<StreamValues>];
63
+ tasks: ["tasks", StreamTasksOutput<StreamUpdates, StreamValues, Nodes>];
64
+ debug: ["debug", StreamDebugOutput];
65
+ }[Multiple] : (undefined extends TStreamMode ? DefaultStreamMode : TStreamMode) extends infer Single extends StreamMode ? [TStreamSubgraphs] extends [true] ? {
66
+ values: [string[], StreamValues];
67
+ updates: [string[], NodeReturnType extends Record<string, unknown> ? { [K in keyof NodeReturnType]?: NodeReturnType[K] } : Record<Nodes extends string ? Nodes : string, StreamUpdates>];
68
+ messages: [string[], StreamMessageOutput];
69
+ custom: [string[], StreamCustom];
70
+ checkpoints: [string[], StreamCheckpointsOutput<StreamValues>];
71
+ tasks: [string[], StreamTasksOutput<StreamUpdates, StreamValues, Nodes>];
72
+ debug: [string[], StreamDebugOutput];
73
+ }[Single] : {
74
+ values: StreamValues;
75
+ updates: NodeReturnType extends Record<string, unknown> ? { [K in keyof NodeReturnType]?: NodeReturnType[K] } : Record<Nodes extends string ? Nodes : string, StreamUpdates>;
76
+ messages: StreamMessageOutput;
77
+ custom: StreamCustom;
78
+ checkpoints: StreamCheckpointsOutput<StreamValues>;
79
+ tasks: StreamTasksOutput<StreamUpdates, StreamValues, Nodes>;
80
+ debug: StreamDebugOutput;
81
+ }[Single] : never;
82
+ /**
83
+ * Configuration options for executing a Pregel graph.
84
+ * These options control how the graph executes, what data is streamed, and how interrupts are handled.
85
+ *
86
+ * @typeParam Nodes - Mapping of node names to their {@link PregelNode} implementations
87
+ * @typeParam Channels - Mapping of channel names to their {@link BaseChannel} implementations
88
+ * @typeParam ContextType - Type of context that can be passed to the graph
89
+ */
90
+ interface PregelOptions<Nodes extends StrRecord<string, PregelNode>, Channels extends StrRecord<string, BaseChannel>,
91
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
92
+ ContextType extends Record<string, any> = Record<string, any>, TStreamMode extends StreamMode | StreamMode[] | undefined = StreamMode | StreamMode[] | undefined, TSubgraphs extends boolean = boolean> extends RunnableConfig<ContextType> {
93
+ /**
94
+ * Controls what information is streamed during graph execution.
95
+ * Multiple modes can be enabled simultaneously.
96
+ *
97
+ * Supported modes:
98
+ * - "values": Streams complete state after each step
99
+ * - "updates": Streams only state changes after each step
100
+ * - "messages": Streams messages from within nodes
101
+ * - "custom": Streams custom events from within nodes
102
+ * - "debug": Streams detailed execution events for tracing & debugging
103
+ *
104
+ * @example
105
+ * ```typescript
106
+ * // Stream only values
107
+ * streamMode: "values"
108
+ *
109
+ * // Stream both values and debug info
110
+ * streamMode: ["values", "debug"]
111
+ * ```
112
+ *
113
+ * @default ["values"]
114
+ */
115
+ streamMode?: TStreamMode;
116
+ /**
117
+ * Specifies which channel keys to retrieve from the checkpoint when resuming execution.
118
+ * This is an advanced option that you generally don't need to set manually.
119
+ * The graph will automatically determine the appropriate input keys based on its configuration.
120
+ */
121
+ inputKeys?: keyof Channels | Array<keyof Channels>;
122
+ /**
123
+ * Specifies which channel keys to include in the output stream and final result.
124
+ * Use this to filter which parts of the graph state you want to observe.
125
+ *
126
+ * @example
127
+ * ```typescript
128
+ * // Stream only the 'result' channel
129
+ * outputKeys: "result"
130
+ *
131
+ * // Stream multiple channels
132
+ * outputKeys: ["result", "intermediateState"]
133
+ * ```
134
+ */
135
+ outputKeys?: keyof Channels | Array<keyof Channels>;
136
+ /**
137
+ * List of nodes where execution should be interrupted BEFORE the node runs.
138
+ * Can be used for debugging and advanced state manipulation use cases. For
139
+ * human-in-the-loop workflows, developers should prefer the
140
+ * @link {interrupt} function instead.
141
+ *
142
+ * When interrupted, a resume @link {Command} must be provided to continue
143
+ * execution.
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * // Interrupt before specific nodes
148
+ * interruptBefore: ["humanReview", "qualityCheck"]
149
+ *
150
+ * // Interrupt before all nodes
151
+ * interruptBefore: "all"
152
+ * ```
153
+ */
154
+ interruptBefore?: All | Array<keyof Nodes>;
155
+ /**
156
+ * List of nodes where execution should be interrupted AFTER the node runs.
157
+ * Similar to interruptBefore, but interrupts after node completion.
158
+ * Useful when the node's output needs to be reviewed before proceeding.
159
+ *
160
+ * @example
161
+ * ```typescript
162
+ * // Interrupt after specific nodes
163
+ * interruptAfter: ["generateContent", "analyze"]
164
+ *
165
+ * // Interrupt after all nodes
166
+ * interruptAfter: "all"
167
+ * ```
168
+ */
169
+ interruptAfter?: All | Array<keyof Nodes>;
170
+ /**
171
+ * Enables detailed debug logging during graph execution.
172
+ * When enabled, prints information about:
173
+ * - Task execution
174
+ * - Channel updates
175
+ * - Checkpoint writes
176
+ *
177
+ * @default false
178
+ */
179
+ debug?: boolean;
180
+ /**
181
+ * Whether to include subgraph execution details in the stream.
182
+ * When true, state updates from nested graphs will also be streamed.
183
+ *
184
+ * @default false
185
+ */
186
+ subgraphs?: TSubgraphs;
187
+ /**
188
+ * Whether to checkpoint intermediate steps, defaults to `true`.
189
+ * If `false`, only the final checkpoint is saved.
190
+ * @deprecated Use `durability` instead.
191
+ */
192
+ checkpointDuring?: boolean;
193
+ /**
194
+ * Whether to checkpoint during the run (or only at the end/interruption).
195
+ * - `"async"`: Save checkpoint asynchronously while the next step executes (default).
196
+ * - `"sync"`: Save checkpoint synchronously before the next step starts.
197
+ * - `"exit"`: Save checkpoint only when the graph exits.
198
+ * @default "async"
199
+ */
200
+ durability?: Durability;
201
+ /**
202
+ * A shared value store that allows you to store and retrieve state across
203
+ * threads. Useful for implementing long-term memory patterns.
204
+ */
205
+ store?: BaseStore;
206
+ /**
207
+ * Optional cache for the graph, useful for caching tasks.
208
+ */
209
+ cache?: BaseCache;
210
+ /**
211
+ * Static context for the graph run, like `userId`, `dbConnection` etc.
212
+ */
213
+ context?: ContextType;
214
+ }
215
+ /**
216
+ * Construct a type with a set of properties K of type T
217
+ */
218
+ type StrRecord<K extends string, T> = { [P in K]: T };
219
+ interface PregelInterface<Nodes extends StrRecord<string, PregelNode>, Channels extends StrRecord<string, BaseChannel>,
220
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
221
+ ContextType extends Record<string, any> = StrRecord<string, any>> {
222
+ lg_is_pregel: boolean;
223
+ withConfig(config: RunnableConfig): PregelInterface<Nodes, Channels>;
224
+ getGraphAsync(config: RunnableConfig & {
225
+ xray?: boolean | number;
226
+ }): Promise<Graph>;
227
+ /** @deprecated Use getSubgraphsAsync instead. The async method will become the default in the next minor release. */
228
+ getSubgraphs(namespace?: string, recurse?: boolean
229
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
230
+ ): Generator<[string, PregelInterface<any, any>]>;
231
+ getSubgraphsAsync(namespace?: string, recurse?: boolean
232
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
233
+ ): AsyncGenerator<[string, PregelInterface<any, any>]>;
234
+ getState(config: RunnableConfig, options?: {
235
+ subgraphs?: boolean;
236
+ }): Promise<StateSnapshot>;
237
+ getStateHistory(config: RunnableConfig, options?: CheckpointListOptions): AsyncIterableIterator<StateSnapshot>;
238
+ updateState(inputConfig: LangGraphRunnableConfig, values: Record<string, unknown> | unknown, asNode?: keyof Nodes | string): Promise<RunnableConfig>;
239
+ stream(input: PregelInputType, options?: Partial<PregelOptions<Nodes, Channels, ContextType>>): Promise<IterableReadableStream<PregelOutputType>>;
240
+ invoke(input: PregelInputType, options?: Partial<PregelOptions<Nodes, Channels, ContextType>>): Promise<PregelOutputType>;
241
+ }
242
+ /**
243
+ * Parameters for creating a Pregel graph.
244
+ * @internal
245
+ */
246
+ type PregelParams<Nodes extends StrRecord<string, PregelNode>, Channels extends StrRecord<string, BaseChannel>> = {
247
+ /**
248
+ * The name of the graph. @see {@link Runnable.name}
249
+ */
250
+ name?: string;
251
+ /**
252
+ * The nodes in the graph.
253
+ */
254
+ nodes: Nodes;
255
+ /**
256
+ * The channels in the graph.
257
+ */
258
+ channels: Channels;
259
+ /**
260
+ * Whether to validate the graph.
261
+ *
262
+ * @default true
263
+ */
264
+ autoValidate?: boolean;
265
+ /**
266
+ * The stream mode for the graph run. See [Streaming](/langgraphjs/how-tos/#streaming) for more details.
267
+ *
268
+ * @default ["values"]
269
+ */
270
+ streamMode?: StreamMode | StreamMode[];
271
+ /**
272
+ * The input channels for the graph run.
273
+ */
274
+ inputChannels: keyof Channels | Array<keyof Channels>;
275
+ /**
276
+ * The output channels for the graph run.
277
+ */
278
+ outputChannels: keyof Channels | Array<keyof Channels>;
279
+ /**
280
+ * After processing one of the nodes named in this list, the graph will be interrupted and a resume {@link Command} must be provided to proceed with the execution of this thread.
281
+ * @default []
282
+ */
283
+ interruptAfter?: Array<keyof Nodes> | All;
284
+ /**
285
+ * Before processing one of the nodes named in this list, the graph will be interrupted and a resume {@link Command} must be provided to proceed with the execution of this thread.
286
+ * @default []
287
+ */
288
+ interruptBefore?: Array<keyof Nodes> | All;
289
+ /**
290
+ * The channels to stream from the graph run.
291
+ * @default []
292
+ */
293
+ streamChannels?: keyof Channels | Array<keyof Channels>;
294
+ /**
295
+ * @default undefined
296
+ */
297
+ stepTimeout?: number;
298
+ /**
299
+ * @default false
300
+ */
301
+ debug?: boolean;
302
+ /**
303
+ * The {@link BaseCheckpointSaver | checkpointer} to use for the graph run.
304
+ */
305
+ checkpointer?: BaseCheckpointSaver | boolean;
306
+ /**
307
+ * The default retry policy for this graph. For defaults, see {@link RetryPolicy}.
308
+ */
309
+ retryPolicy?: RetryPolicy;
310
+ /**
311
+ * The configuration for the graph run.
312
+ */
313
+ config?: LangGraphRunnableConfig;
314
+ /**
315
+ * External key-value store.
316
+ */
317
+ store?: BaseStore;
318
+ /**
319
+ * Storage used for node caching.
320
+ */
321
+ cache?: BaseCache;
322
+ /**
323
+ * The trigger to node mapping for the graph run.
324
+ * @internal
325
+ */
326
+ triggerToNodes?: Record<string, string[]>;
327
+ };
328
+ interface PregelTaskDescription {
329
+ readonly id: string;
330
+ readonly name: string;
331
+ readonly error?: unknown;
332
+ readonly interrupts: Interrupt[];
333
+ readonly state?: LangGraphRunnableConfig | StateSnapshot;
334
+ readonly path?: TaskPath;
335
+ readonly result?: unknown;
336
+ }
337
+ interface StateSnapshot {
338
+ /**
339
+ * Current values of channels
340
+ */
341
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
342
+ readonly values: Record<string, any> | any;
343
+ /**
344
+ * Nodes to execute in the next step, if any
345
+ */
346
+ readonly next: Array<string>;
347
+ /**
348
+ * Config used to fetch this snapshot
349
+ */
350
+ readonly config: RunnableConfig;
351
+ /**
352
+ * Metadata about the checkpoint
353
+ */
354
+ readonly metadata?: CheckpointMetadata;
355
+ /**
356
+ * Time when the snapshot was created
357
+ */
358
+ readonly createdAt?: string;
359
+ /**
360
+ * Config used to fetch the parent snapshot, if any
361
+ * @default undefined
362
+ */
363
+ readonly parentConfig?: RunnableConfig | undefined;
364
+ /**
365
+ * Tasks to execute in this step. If already attempted, may contain an error.
366
+ */
367
+ readonly tasks: PregelTaskDescription[];
368
+ }
369
+ /**
370
+ * Options for subscribing to multiple channels.
371
+ */
372
+ type MultipleChannelSubscriptionOptions = {
373
+ /**
374
+ * Optional tags to associate with the subscription.
375
+ */
376
+ tags?: string[];
377
+ };
378
+ /**
379
+ * Options for subscribing to a single channel.
380
+ */
381
+ type SingleChannelSubscriptionOptions = {
382
+ /**
383
+ * When specified, the channel mapping will be an object with this key pointing
384
+ * to the array of channels to subscribe to. Otherwise, the channel mapping
385
+ * will be an array of channels.
386
+ */
387
+ key?: string;
388
+ /**
389
+ * Optional tags to associate with the subscription.
390
+ */
391
+ tags?: string[];
392
+ };
393
+ /**
394
+ * Options for getting the state of the graph.
395
+ */
396
+ type GetStateOptions = {
397
+ /**
398
+ * Whether to include subgraph states.
399
+ * @default false
400
+ */
401
+ subgraphs?: boolean;
402
+ };
403
+ /**
404
+ * Used for storing/retrieving internal execution state.
405
+ *
406
+ * @internal
407
+ */
408
+
409
+ type CallOptions = {
410
+ func: (...args: unknown[]) => unknown | Promise<unknown>;
411
+ name: string;
412
+ input: unknown;
413
+ cache?: CachePolicy;
414
+ retry?: RetryPolicy;
415
+ callbacks?: unknown;
416
+ };
417
+ declare class Call {
418
+ func: (...args: unknown[]) => unknown | Promise<unknown>;
419
+ name: string;
420
+ input: unknown;
421
+ retry?: RetryPolicy;
422
+ cache?: CachePolicy;
423
+ callbacks?: unknown;
424
+ readonly __lg_type: string;
425
+ constructor({
426
+ func,
427
+ name,
428
+ input,
429
+ retry,
430
+ cache,
431
+ callbacks
432
+ }: CallOptions);
433
+ }
434
+ type SimpleTaskPath = [string, string | number];
435
+ type VariadicTaskPath = [string, ...(string | number)[], boolean];
436
+ type CallTaskPath = [string, ...(string | number)[], Call] | [string, TaskPath, ...(string | number)[], Call];
437
+ type TaskPath = SimpleTaskPath | CallTaskPath | VariadicTaskPath;
438
+ //#endregion
439
+ export { Durability, GetStateOptions, MultipleChannelSubscriptionOptions, PregelInputType, PregelInterface, PregelOptions, PregelOutputType, PregelParams, SingleChannelSubscriptionOptions, StateSnapshot, StreamMode, StreamOutputMap };
440
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":["Runnable","RunnableConfig","All","PendingWrite","CheckpointMetadata","BaseCheckpointSaver","BaseStore","CheckpointListOptions","BaseCache","Graph","DrawableGraph","IterableReadableStream","BaseMessage","BaseChannel","PregelNode","Interrupt","CachePolicy","RetryPolicy","LangGraphRunnableConfig","StreamMode","Durability","PregelInputType","PregelOutputType","StreamMessageOutput","Record","StreamDebugOutput","StreamCheckpointsOutput","StreamValues","PregelTaskDescription","StreamTasksOutputBase","StreamTasksCreateOutput","StreamTasksResultOutput","Keys","StreamUpdates","StreamTasksOutput","Nodes","DefaultStreamMode","StreamOutputMap","TStreamMode","TStreamSubgraphs","NodeReturnType","K","StreamCustom","Multiple","Single","PregelOptions","StrRecord","ContextType","Channels","Array","TSubgraphs","T","PregelInterface","Promise","Generator","AsyncGenerator","StateSnapshot","AsyncIterableIterator","Partial","PregelParams","TaskPath","CacheKey","PregelExecutableTask","PropertyKey","NodeKey","ChannelKey","MultipleChannelSubscriptionOptions","SingleChannelSubscriptionOptions","GetStateOptions","PregelScratchpad","Resume","PregelAbortSignals","AbortSignal","CallOptions","Call","func","name","input","retry","cache","callbacks","isCall","SimpleTaskPath","VariadicTaskPath","CallTaskPath"],"sources":["../../src/pregel/types.d.ts"],"sourcesContent":["import type { Runnable, RunnableConfig } from \"@langchain/core/runnables\";\nimport type { All, PendingWrite, CheckpointMetadata, BaseCheckpointSaver, BaseStore, CheckpointListOptions, BaseCache } from \"@langchain/langgraph-checkpoint\";\nimport { Graph as DrawableGraph } from \"@langchain/core/runnables/graph\";\nimport { IterableReadableStream } from \"@langchain/core/utils/stream\";\nimport type { BaseMessage } from \"@langchain/core/messages\";\nimport type { BaseChannel } from \"../channels/base.js\";\nimport type { PregelNode } from \"./read.js\";\nimport type { Interrupt } from \"../constants.js\";\nimport { CachePolicy, RetryPolicy } from \"./utils/index.js\";\nimport { LangGraphRunnableConfig } from \"./runnable_types.js\";\n/**\n * Selects the type of output you'll receive when streaming from the graph. See [Streaming](/langgraphjs/how-tos/#streaming) for more details.\n */\nexport type StreamMode = \"values\" | \"updates\" | \"debug\" | \"messages\" | \"checkpoints\" | \"tasks\" | \"custom\";\nexport type Durability = \"exit\" | \"async\" | \"sync\";\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type PregelInputType = any;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type PregelOutputType = any;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype StreamMessageOutput = [BaseMessage, Record<string, any>];\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype StreamDebugOutput = Record<string, any>;\ntype StreamCheckpointsOutput<StreamValues> = {\n values: StreamValues;\n next: string[];\n config: RunnableConfig;\n metadata?: CheckpointMetadata;\n parentConfig?: RunnableConfig | undefined;\n tasks: PregelTaskDescription[];\n};\ninterface StreamTasksOutputBase {\n id: string;\n name: string;\n interrupts: Interrupt[];\n}\ninterface StreamTasksCreateOutput<StreamValues> extends StreamTasksOutputBase {\n input: StreamValues;\n triggers: string[];\n}\ninterface StreamTasksResultOutput<Keys, StreamUpdates> extends StreamTasksOutputBase {\n result: [Keys, StreamUpdates][];\n}\ntype StreamTasksOutput<StreamUpdates, StreamValues, Nodes = string> = StreamTasksCreateOutput<StreamValues> | StreamTasksResultOutput<Nodes, StreamUpdates>;\ntype DefaultStreamMode = \"updates\";\nexport type StreamOutputMap<TStreamMode extends StreamMode | StreamMode[] | undefined, TStreamSubgraphs extends boolean, StreamUpdates, StreamValues, Nodes, NodeReturnType, StreamCustom> = (undefined extends TStreamMode ? [] : StreamMode | StreamMode[] extends TStreamMode ? TStreamMode extends StreamMode[] ? TStreamMode[number] : TStreamMode : TStreamMode extends StreamMode[] ? TStreamMode[number] : []) extends infer Multiple extends StreamMode ? [TStreamSubgraphs] extends [true] ? {\n values: [string[], \"values\", StreamValues];\n updates: [\n string[],\n \"updates\",\n NodeReturnType extends Record<string, unknown> ? {\n [K in keyof NodeReturnType]?: NodeReturnType[K];\n } : Record<Nodes extends string ? Nodes : string, StreamUpdates>\n ];\n messages: [string[], \"messages\", StreamMessageOutput];\n custom: [string[], \"custom\", StreamCustom];\n checkpoints: [\n string[],\n \"checkpoints\",\n StreamCheckpointsOutput<StreamValues>\n ];\n tasks: [\n string[],\n \"tasks\",\n StreamTasksOutput<StreamUpdates, StreamValues>\n ];\n debug: [string[], \"debug\", StreamDebugOutput];\n}[Multiple] : {\n values: [\"values\", StreamValues];\n updates: [\n \"updates\",\n NodeReturnType extends Record<string, unknown> ? {\n [K in keyof NodeReturnType]?: NodeReturnType[K];\n } : Record<Nodes extends string ? Nodes : string, StreamUpdates>\n ];\n messages: [\"messages\", StreamMessageOutput];\n custom: [\"custom\", StreamCustom];\n checkpoints: [\"checkpoints\", StreamCheckpointsOutput<StreamValues>];\n tasks: [\"tasks\", StreamTasksOutput<StreamUpdates, StreamValues, Nodes>];\n debug: [\"debug\", StreamDebugOutput];\n}[Multiple] : (undefined extends TStreamMode ? DefaultStreamMode : TStreamMode) extends infer Single extends StreamMode ? [TStreamSubgraphs] extends [true] ? {\n values: [string[], StreamValues];\n updates: [\n string[],\n NodeReturnType extends Record<string, unknown> ? {\n [K in keyof NodeReturnType]?: NodeReturnType[K];\n } : Record<Nodes extends string ? Nodes : string, StreamUpdates>\n ];\n messages: [string[], StreamMessageOutput];\n custom: [string[], StreamCustom];\n checkpoints: [string[], StreamCheckpointsOutput<StreamValues>];\n tasks: [\n string[],\n StreamTasksOutput<StreamUpdates, StreamValues, Nodes>\n ];\n debug: [string[], StreamDebugOutput];\n}[Single] : {\n values: StreamValues;\n updates: NodeReturnType extends Record<string, unknown> ? {\n [K in keyof NodeReturnType]?: NodeReturnType[K];\n } : Record<Nodes extends string ? Nodes : string, StreamUpdates>;\n messages: StreamMessageOutput;\n custom: StreamCustom;\n checkpoints: StreamCheckpointsOutput<StreamValues>;\n tasks: StreamTasksOutput<StreamUpdates, StreamValues, Nodes>;\n debug: StreamDebugOutput;\n}[Single] : never;\n/**\n * Configuration options for executing a Pregel graph.\n * These options control how the graph executes, what data is streamed, and how interrupts are handled.\n *\n * @typeParam Nodes - Mapping of node names to their {@link PregelNode} implementations\n * @typeParam Channels - Mapping of channel names to their {@link BaseChannel} implementations\n * @typeParam ContextType - Type of context that can be passed to the graph\n */\nexport interface PregelOptions<Nodes extends StrRecord<string, PregelNode>, Channels extends StrRecord<string, BaseChannel>, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nContextType extends Record<string, any> = Record<string, any>, TStreamMode extends StreamMode | StreamMode[] | undefined = StreamMode | StreamMode[] | undefined, TSubgraphs extends boolean = boolean> extends RunnableConfig<ContextType> {\n /**\n * Controls what information is streamed during graph execution.\n * Multiple modes can be enabled simultaneously.\n *\n * Supported modes:\n * - \"values\": Streams complete state after each step\n * - \"updates\": Streams only state changes after each step\n * - \"messages\": Streams messages from within nodes\n * - \"custom\": Streams custom events from within nodes\n * - \"debug\": Streams detailed execution events for tracing & debugging\n *\n * @example\n * ```typescript\n * // Stream only values\n * streamMode: \"values\"\n *\n * // Stream both values and debug info\n * streamMode: [\"values\", \"debug\"]\n * ```\n *\n * @default [\"values\"]\n */\n streamMode?: TStreamMode;\n /**\n * Specifies which channel keys to retrieve from the checkpoint when resuming execution.\n * This is an advanced option that you generally don't need to set manually.\n * The graph will automatically determine the appropriate input keys based on its configuration.\n */\n inputKeys?: keyof Channels | Array<keyof Channels>;\n /**\n * Specifies which channel keys to include in the output stream and final result.\n * Use this to filter which parts of the graph state you want to observe.\n *\n * @example\n * ```typescript\n * // Stream only the 'result' channel\n * outputKeys: \"result\"\n *\n * // Stream multiple channels\n * outputKeys: [\"result\", \"intermediateState\"]\n * ```\n */\n outputKeys?: keyof Channels | Array<keyof Channels>;\n /**\n * List of nodes where execution should be interrupted BEFORE the node runs.\n * Can be used for debugging and advanced state manipulation use cases. For\n * human-in-the-loop workflows, developers should prefer the\n * @link {interrupt} function instead.\n *\n * When interrupted, a resume @link {Command} must be provided to continue\n * execution.\n *\n * @example\n * ```typescript\n * // Interrupt before specific nodes\n * interruptBefore: [\"humanReview\", \"qualityCheck\"]\n *\n * // Interrupt before all nodes\n * interruptBefore: \"all\"\n * ```\n */\n interruptBefore?: All | Array<keyof Nodes>;\n /**\n * List of nodes where execution should be interrupted AFTER the node runs.\n * Similar to interruptBefore, but interrupts after node completion.\n * Useful when the node's output needs to be reviewed before proceeding.\n *\n * @example\n * ```typescript\n * // Interrupt after specific nodes\n * interruptAfter: [\"generateContent\", \"analyze\"]\n *\n * // Interrupt after all nodes\n * interruptAfter: \"all\"\n * ```\n */\n interruptAfter?: All | Array<keyof Nodes>;\n /**\n * Enables detailed debug logging during graph execution.\n * When enabled, prints information about:\n * - Task execution\n * - Channel updates\n * - Checkpoint writes\n *\n * @default false\n */\n debug?: boolean;\n /**\n * Whether to include subgraph execution details in the stream.\n * When true, state updates from nested graphs will also be streamed.\n *\n * @default false\n */\n subgraphs?: TSubgraphs;\n /**\n * Whether to checkpoint intermediate steps, defaults to `true`.\n * If `false`, only the final checkpoint is saved.\n * @deprecated Use `durability` instead.\n */\n checkpointDuring?: boolean;\n /**\n * Whether to checkpoint during the run (or only at the end/interruption).\n * - `\"async\"`: Save checkpoint asynchronously while the next step executes (default).\n * - `\"sync\"`: Save checkpoint synchronously before the next step starts.\n * - `\"exit\"`: Save checkpoint only when the graph exits.\n * @default \"async\"\n */\n durability?: Durability;\n /**\n * A shared value store that allows you to store and retrieve state across\n * threads. Useful for implementing long-term memory patterns.\n */\n store?: BaseStore;\n /**\n * Optional cache for the graph, useful for caching tasks.\n */\n cache?: BaseCache;\n /**\n * Static context for the graph run, like `userId`, `dbConnection` etc.\n */\n context?: ContextType;\n}\n/**\n * Construct a type with a set of properties K of type T\n */\ntype StrRecord<K extends string, T> = {\n [P in K]: T;\n};\nexport interface PregelInterface<Nodes extends StrRecord<string, PregelNode>, Channels extends StrRecord<string, BaseChannel>, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nContextType extends Record<string, any> = StrRecord<string, any>> {\n lg_is_pregel: boolean;\n withConfig(config: RunnableConfig): PregelInterface<Nodes, Channels>;\n getGraphAsync(config: RunnableConfig & {\n xray?: boolean | number;\n }): Promise<DrawableGraph>;\n /** @deprecated Use getSubgraphsAsync instead. The async method will become the default in the next minor release. */\n getSubgraphs(namespace?: string, recurse?: boolean\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Generator<[string, PregelInterface<any, any>]>;\n getSubgraphsAsync(namespace?: string, recurse?: boolean\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): AsyncGenerator<[string, PregelInterface<any, any>]>;\n getState(config: RunnableConfig, options?: {\n subgraphs?: boolean;\n }): Promise<StateSnapshot>;\n getStateHistory(config: RunnableConfig, options?: CheckpointListOptions): AsyncIterableIterator<StateSnapshot>;\n updateState(inputConfig: LangGraphRunnableConfig, values: Record<string, unknown> | unknown, asNode?: keyof Nodes | string): Promise<RunnableConfig>;\n stream(input: PregelInputType, options?: Partial<PregelOptions<Nodes, Channels, ContextType>>): Promise<IterableReadableStream<PregelOutputType>>;\n invoke(input: PregelInputType, options?: Partial<PregelOptions<Nodes, Channels, ContextType>>): Promise<PregelOutputType>;\n}\n/**\n * Parameters for creating a Pregel graph.\n * @internal\n */\nexport type PregelParams<Nodes extends StrRecord<string, PregelNode>, Channels extends StrRecord<string, BaseChannel>> = {\n /**\n * The name of the graph. @see {@link Runnable.name}\n */\n name?: string;\n /**\n * The nodes in the graph.\n */\n nodes: Nodes;\n /**\n * The channels in the graph.\n */\n channels: Channels;\n /**\n * Whether to validate the graph.\n *\n * @default true\n */\n autoValidate?: boolean;\n /**\n * The stream mode for the graph run. See [Streaming](/langgraphjs/how-tos/#streaming) for more details.\n *\n * @default [\"values\"]\n */\n streamMode?: StreamMode | StreamMode[];\n /**\n * The input channels for the graph run.\n */\n inputChannels: keyof Channels | Array<keyof Channels>;\n /**\n * The output channels for the graph run.\n */\n outputChannels: keyof Channels | Array<keyof Channels>;\n /**\n * After processing one of the nodes named in this list, the graph will be interrupted and a resume {@link Command} must be provided to proceed with the execution of this thread.\n * @default []\n */\n interruptAfter?: Array<keyof Nodes> | All;\n /**\n * Before processing one of the nodes named in this list, the graph will be interrupted and a resume {@link Command} must be provided to proceed with the execution of this thread.\n * @default []\n */\n interruptBefore?: Array<keyof Nodes> | All;\n /**\n * The channels to stream from the graph run.\n * @default []\n */\n streamChannels?: keyof Channels | Array<keyof Channels>;\n /**\n * @default undefined\n */\n stepTimeout?: number;\n /**\n * @default false\n */\n debug?: boolean;\n /**\n * The {@link BaseCheckpointSaver | checkpointer} to use for the graph run.\n */\n checkpointer?: BaseCheckpointSaver | boolean;\n /**\n * The default retry policy for this graph. For defaults, see {@link RetryPolicy}.\n */\n retryPolicy?: RetryPolicy;\n /**\n * The configuration for the graph run.\n */\n config?: LangGraphRunnableConfig;\n /**\n * External key-value store.\n */\n store?: BaseStore;\n /**\n * Storage used for node caching.\n */\n cache?: BaseCache;\n /**\n * The trigger to node mapping for the graph run.\n * @internal\n */\n triggerToNodes?: Record<string, string[]>;\n};\nexport interface PregelTaskDescription {\n readonly id: string;\n readonly name: string;\n readonly error?: unknown;\n readonly interrupts: Interrupt[];\n readonly state?: LangGraphRunnableConfig | StateSnapshot;\n readonly path?: TaskPath;\n readonly result?: unknown;\n}\ninterface CacheKey {\n ns: string[];\n key: string;\n ttl?: number;\n}\nexport interface PregelExecutableTask<NodeKey extends PropertyKey, ChannelKey extends PropertyKey> {\n readonly name: NodeKey;\n readonly input: unknown;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly proc: Runnable<any, any, LangGraphRunnableConfig>;\n readonly writes: PendingWrite<ChannelKey>[];\n readonly config?: LangGraphRunnableConfig;\n readonly triggers: Array<string>;\n readonly retry_policy?: RetryPolicy;\n readonly cache_key?: CacheKey;\n readonly id: string;\n readonly path?: TaskPath;\n readonly subgraphs?: Runnable[];\n readonly writers: Runnable[];\n}\nexport interface StateSnapshot {\n /**\n * Current values of channels\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly values: Record<string, any> | any;\n /**\n * Nodes to execute in the next step, if any\n */\n readonly next: Array<string>;\n /**\n * Config used to fetch this snapshot\n */\n readonly config: RunnableConfig;\n /**\n * Metadata about the checkpoint\n */\n readonly metadata?: CheckpointMetadata;\n /**\n * Time when the snapshot was created\n */\n readonly createdAt?: string;\n /**\n * Config used to fetch the parent snapshot, if any\n * @default undefined\n */\n readonly parentConfig?: RunnableConfig | undefined;\n /**\n * Tasks to execute in this step. If already attempted, may contain an error.\n */\n readonly tasks: PregelTaskDescription[];\n}\n/**\n * Options for subscribing to multiple channels.\n */\nexport type MultipleChannelSubscriptionOptions = {\n /**\n * Optional tags to associate with the subscription.\n */\n tags?: string[];\n};\n/**\n * Options for subscribing to a single channel.\n */\nexport type SingleChannelSubscriptionOptions = {\n /**\n * When specified, the channel mapping will be an object with this key pointing\n * to the array of channels to subscribe to. Otherwise, the channel mapping\n * will be an array of channels.\n */\n key?: string;\n /**\n * Optional tags to associate with the subscription.\n */\n tags?: string[];\n};\n/**\n * Options for getting the state of the graph.\n */\nexport type GetStateOptions = {\n /**\n * Whether to include subgraph states.\n * @default false\n */\n subgraphs?: boolean;\n};\n/**\n * Used for storing/retrieving internal execution state.\n *\n * @internal\n */\nexport type PregelScratchpad<Resume = unknown> = {\n /** Counter for tracking call invocations */\n callCounter: number;\n /** Counter for tracking interrupts */\n interruptCounter: number;\n /** List of resume values */\n resume: Resume[];\n /** Single resume value for null task ID */\n nullResume: Resume;\n consumeNullResume: () => Resume | undefined;\n /** Counter for tracking subgraph invocations */\n subgraphCounter: number;\n /** The input to the currently executing task */\n currentTaskInput: unknown;\n};\n/**\n * @internal\n */\nexport type PregelAbortSignals = {\n /** Aborts when the user calls `stream.cancel()` or aborts the {@link AbortSignal} that they passed in via the `signal` option */\n externalAbortSignal?: AbortSignal;\n /**\n * Aborts when the currently executing task throws any error other than a {@link GraphBubbleUp}\n */\n timeoutAbortSignal?: AbortSignal;\n /**\n * A reference to the AbortSignal that is passed to the node. Aborts on step timeout, stream cancel, or when an error is thrown.\n */\n composedAbortSignal?: AbortSignal;\n};\nexport type CallOptions = {\n func: (...args: unknown[]) => unknown | Promise<unknown>;\n name: string;\n input: unknown;\n cache?: CachePolicy;\n retry?: RetryPolicy;\n callbacks?: unknown;\n};\nexport declare class Call {\n func: (...args: unknown[]) => unknown | Promise<unknown>;\n name: string;\n input: unknown;\n retry?: RetryPolicy;\n cache?: CachePolicy;\n callbacks?: unknown;\n readonly __lg_type: string;\n constructor({ func, name, input, retry, cache, callbacks }: CallOptions);\n}\nexport declare function isCall(value: unknown): value is Call;\nexport type SimpleTaskPath = [string, string | number];\nexport type VariadicTaskPath = [string, ...(string | number)[], boolean];\nexport type CallTaskPath = [string, ...(string | number)[], Call] | [string, TaskPath, ...(string | number)[], Call];\nexport type TaskPath = SimpleTaskPath | CallTaskPath | VariadicTaskPath;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;AAaA;AACYoB,KADAD,UAAAA,GACU,QAAA,GAAA,SAAA,GAAA,OAAA,GAAA,UAAA,GAAA,aAAA,GAAA,OAAA,GAAA,QAAA;AAEVE,KAFAD,UAAAA,GAEe,MAAA,GAAA,OAAA,GAAA,MAAA;AAE3B;AAEKG,KAJOF,eAAAA,GAIY,GAAA;;AAAIT,KAFhBU,gBAAAA,GAEgBV,GAAAA;;KAAvBW,mBAAAA,IAAuBX,aAAaY;AAAM;AAEhB,KAA1BC,iBAAAA,GAAoBD,MACG,CAAA,MAAA,EAAA,GAAA,CAAA;KAAvBE,uBAAuB,CAAA,YAAA,CAAA,GAAA;QAChBC,EAAAA,YAAAA;MAEA1B,EAAAA,MAAAA,EAAAA;QACGG,EADHH,cACGG;UACIH,CAAAA,EADJG,kBACIH;cACR2B,CAAAA,EADQ3B,cACR2B,GAAAA,SAAAA;SAAAA;AAAqB,CAAA;AAKP,UAHfC,qBAAAA,CAKuB;EAAA,EAAA,EAAA,MAAA;MACtBF,EAAAA,MAAAA;YAD6CE,EAFxCd,SAEwCc,EAAAA;;AAAqB,UAAnEC,uBAIuB,CAAA,YAAA,CAAA,SAJuBD,qBAIvB,CAAA;EAAA,KAAA,EAHtBF,YAGsB;UACpBK,EAAAA,MAAAA,EAAAA;;UADHD,uBAAqDF,CAAAA,IAAAA,EAAAA,aAAAA,CAAAA,SAAAA,qBAAAA,CAAAA;WAClDG,MAAMC;AADiE;KAG/EC,iBAAiB,CAAA,aAAA,EAAA,YAAA,EAAA,QAAA,MAAA,CAAA,GAAgDJ,uBAAhD,CAAwEH,YAAxE,CAAA,GAAwFI,uBAAxF,CAAgHI,KAAhH,EAAuHF,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