@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
@@ -1,12 +0,0 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const __langchain_core_singletons = require_rolldown_runtime.__toESM(require("@langchain/core/singletons"));
3
- const node_async_hooks = require_rolldown_runtime.__toESM(require("node:async_hooks"));
4
-
5
- //#region src/setup/async_local_storage.ts
6
- function initializeAsyncLocalStorageSingleton() {
7
- __langchain_core_singletons.AsyncLocalStorageProviderSingleton.initializeGlobalInstance(new node_async_hooks.AsyncLocalStorage());
8
- }
9
-
10
- //#endregion
11
- exports.initializeAsyncLocalStorageSingleton = initializeAsyncLocalStorageSingleton;
12
- //# sourceMappingURL=async_local_storage.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"async_local_storage.cjs","names":["AsyncLocalStorage"],"sources":["../../src/setup/async_local_storage.ts"],"sourcesContent":["import { AsyncLocalStorageProviderSingleton } from \"@langchain/core/singletons\";\nimport { AsyncLocalStorage } from \"node:async_hooks\";\n\nexport function initializeAsyncLocalStorageSingleton() {\n AsyncLocalStorageProviderSingleton.initializeGlobalInstance(\n new AsyncLocalStorage()\n );\n}\n"],"mappings":";;;;;AAGA,SAAgB,uCAAuC;AACrD,gEAAmC,yBACjC,IAAIA"}
@@ -1,11 +0,0 @@
1
- import { AsyncLocalStorageProviderSingleton } from "@langchain/core/singletons";
2
- import { AsyncLocalStorage } from "node:async_hooks";
3
-
4
- //#region src/setup/async_local_storage.ts
5
- function initializeAsyncLocalStorageSingleton() {
6
- AsyncLocalStorageProviderSingleton.initializeGlobalInstance(new AsyncLocalStorage());
7
- }
8
-
9
- //#endregion
10
- export { initializeAsyncLocalStorageSingleton };
11
- //# sourceMappingURL=async_local_storage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"async_local_storage.js","names":[],"sources":["../../src/setup/async_local_storage.ts"],"sourcesContent":["import { AsyncLocalStorageProviderSingleton } from \"@langchain/core/singletons\";\nimport { AsyncLocalStorage } from \"node:async_hooks\";\n\nexport function initializeAsyncLocalStorageSingleton() {\n AsyncLocalStorageProviderSingleton.initializeGlobalInstance(\n new AsyncLocalStorage()\n );\n}\n"],"mappings":";;;;AAGA,SAAgB,uCAAuC;AACrD,oCAAmC,yBACjC,IAAI"}
package/dist/utils.cjs DELETED
@@ -1,88 +0,0 @@
1
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
- const require_config = require('./pregel/utils/config.cjs');
3
- const __langchain_core_singletons = require_rolldown_runtime.__toESM(require("@langchain/core/singletons"));
4
- const __langchain_core_runnables = require_rolldown_runtime.__toESM(require("@langchain/core/runnables"));
5
-
6
- //#region src/utils.ts
7
- var RunnableCallable = class extends __langchain_core_runnables.Runnable {
8
- lc_namespace = ["langgraph"];
9
- func;
10
- tags;
11
- config;
12
- trace = true;
13
- recurse = true;
14
- constructor(fields) {
15
- super();
16
- this.name = fields.name ?? fields.func.name;
17
- this.func = fields.func;
18
- this.config = fields.tags ? { tags: fields.tags } : void 0;
19
- this.trace = fields.trace ?? this.trace;
20
- this.recurse = fields.recurse ?? this.recurse;
21
- }
22
- async _tracedInvoke(input, config, runManager) {
23
- return new Promise((resolve, reject) => {
24
- const childConfig = (0, __langchain_core_runnables.patchConfig)(config, { callbacks: runManager?.getChild() });
25
- __langchain_core_singletons.AsyncLocalStorageProviderSingleton.runWithConfig(childConfig, async () => {
26
- try {
27
- const output = await this.func(input, childConfig);
28
- resolve(output);
29
- } catch (e) {
30
- reject(e);
31
- }
32
- });
33
- });
34
- }
35
- async invoke(input, options) {
36
- let returnValue;
37
- const config = require_config.ensureLangGraphConfig(options);
38
- const mergedConfig = (0, __langchain_core_runnables.mergeConfigs)(this.config, config);
39
- if (this.trace) returnValue = await this._callWithConfig(this._tracedInvoke, input, mergedConfig);
40
- else returnValue = await __langchain_core_singletons.AsyncLocalStorageProviderSingleton.runWithConfig(mergedConfig, async () => this.func(input, mergedConfig));
41
- if (__langchain_core_runnables.Runnable.isRunnable(returnValue) && this.recurse) return await __langchain_core_singletons.AsyncLocalStorageProviderSingleton.runWithConfig(mergedConfig, async () => returnValue.invoke(input, mergedConfig));
42
- return returnValue;
43
- }
44
- };
45
- function* prefixGenerator(generator, prefix) {
46
- if (prefix === void 0) yield* generator;
47
- else for (const value of generator) yield [prefix, value];
48
- }
49
- async function gatherIterator(i) {
50
- const out = [];
51
- for await (const item of await i) out.push(item);
52
- return out;
53
- }
54
- function gatherIteratorSync(i) {
55
- const out = [];
56
- for (const item of i) out.push(item);
57
- return out;
58
- }
59
- function patchConfigurable(config, patch) {
60
- if (!config) return { configurable: patch };
61
- else if (!("configurable" in config)) return {
62
- ...config,
63
- configurable: patch
64
- };
65
- else return {
66
- ...config,
67
- configurable: {
68
- ...config.configurable,
69
- ...patch
70
- }
71
- };
72
- }
73
- function isAsyncGeneratorFunction(val) {
74
- return val != null && typeof val === "function" && val instanceof Object.getPrototypeOf(async function* () {}).constructor;
75
- }
76
- function isGeneratorFunction(val) {
77
- return val != null && typeof val === "function" && val instanceof Object.getPrototypeOf(function* () {}).constructor;
78
- }
79
-
80
- //#endregion
81
- exports.RunnableCallable = RunnableCallable;
82
- exports.gatherIterator = gatherIterator;
83
- exports.gatherIteratorSync = gatherIteratorSync;
84
- exports.isAsyncGeneratorFunction = isAsyncGeneratorFunction;
85
- exports.isGeneratorFunction = isGeneratorFunction;
86
- exports.patchConfigurable = patchConfigurable;
87
- exports.prefixGenerator = prefixGenerator;
88
- //# sourceMappingURL=utils.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.cjs","names":["Runnable","AsyncLocalStorageProviderSingleton","returnValue: any","ensureLangGraphConfig","out: T[]"],"sources":["../src/utils.ts"],"sourcesContent":["import { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport {\n mergeConfigs,\n patchConfig,\n Runnable,\n RunnableConfig,\n} from \"@langchain/core/runnables\";\nimport { AsyncLocalStorageProviderSingleton } from \"@langchain/core/singletons\";\nimport { ensureLangGraphConfig } from \"./pregel/utils/config.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RunnableCallableArgs extends Partial<any> {\n name?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n func: (...args: any[]) => any;\n tags?: string[];\n trace?: boolean;\n recurse?: boolean;\n}\n\nexport class RunnableCallable<I = unknown, O = unknown> extends Runnable<I, O> {\n lc_namespace: string[] = [\"langgraph\"];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n func: (...args: any[]) => any;\n\n tags?: string[];\n\n config?: RunnableConfig;\n\n trace: boolean = true;\n\n recurse: boolean = true;\n\n constructor(fields: RunnableCallableArgs) {\n super();\n this.name = fields.name ?? fields.func.name;\n this.func = fields.func;\n this.config = fields.tags ? { tags: fields.tags } : undefined;\n this.trace = fields.trace ?? this.trace;\n this.recurse = fields.recurse ?? this.recurse;\n }\n\n protected async _tracedInvoke(\n input: I,\n config?: Partial<RunnableConfig>,\n runManager?: CallbackManagerForChainRun\n ) {\n return new Promise<O>((resolve, reject) => {\n const childConfig = patchConfig(config, {\n callbacks: runManager?.getChild(),\n });\n void AsyncLocalStorageProviderSingleton.runWithConfig(\n childConfig,\n async () => {\n try {\n const output = await this.func(input, childConfig);\n resolve(output);\n } catch (e) {\n reject(e);\n }\n }\n );\n });\n }\n\n async invoke(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n input: I,\n options?: Partial<RunnableConfig> | undefined\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise<O> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let returnValue: any;\n const config = ensureLangGraphConfig(options);\n const mergedConfig = mergeConfigs(this.config, config);\n\n if (this.trace) {\n returnValue = await this._callWithConfig(\n this._tracedInvoke,\n input,\n mergedConfig\n );\n } else {\n returnValue = await AsyncLocalStorageProviderSingleton.runWithConfig(\n mergedConfig,\n async () => this.func(input, mergedConfig)\n );\n }\n\n if (Runnable.isRunnable(returnValue) && this.recurse) {\n return await AsyncLocalStorageProviderSingleton.runWithConfig(\n mergedConfig,\n async () => returnValue.invoke(input, mergedConfig)\n );\n }\n\n return returnValue;\n }\n}\n\nexport function prefixGenerator<T, Prefix extends string>(\n generator: Generator<T>,\n prefix: Prefix\n): Generator<[Prefix, T]>;\n\nexport function prefixGenerator<T>(\n generator: Generator<T>,\n prefix?: undefined\n): Generator<T>;\n\nexport function prefixGenerator<\n T,\n Prefix extends string | undefined = undefined\n>(\n generator: Generator<T>,\n prefix?: Prefix | undefined\n): Generator<Prefix extends string ? [Prefix, T] : T>;\nexport function* prefixGenerator<\n T,\n Prefix extends string | undefined = undefined\n>(\n generator: Generator<T>,\n prefix?: Prefix | undefined\n): Generator<Prefix extends string ? [Prefix, T] : T> {\n if (prefix === undefined) {\n yield* generator as Generator<Prefix extends string ? [Prefix, T] : T>;\n } else {\n for (const value of generator) {\n yield [prefix, value] as Prefix extends string ? [Prefix, T] : T;\n }\n }\n}\n\n// https://github.com/tc39/proposal-array-from-async\nexport async function gatherIterator<T>(\n i:\n | AsyncIterable<T>\n | Promise<AsyncIterable<T>>\n | Iterable<T>\n | Promise<Iterable<T>>\n): Promise<Array<T>> {\n const out: T[] = [];\n for await (const item of await i) {\n out.push(item);\n }\n return out;\n}\n\nexport function gatherIteratorSync<T>(i: Iterable<T>): Array<T> {\n const out: T[] = [];\n for (const item of i) {\n out.push(item);\n }\n return out;\n}\n\nexport function patchConfigurable(\n config: RunnableConfig | undefined,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n patch: Record<string, any>\n): RunnableConfig {\n if (!config) {\n return {\n configurable: patch,\n };\n } else if (!(\"configurable\" in config)) {\n return {\n ...config,\n configurable: patch,\n };\n } else {\n return {\n ...config,\n configurable: {\n ...config.configurable,\n ...patch,\n },\n };\n }\n}\n\nexport function isAsyncGeneratorFunction(\n val: unknown\n): val is AsyncGeneratorFunction {\n return (\n val != null &&\n typeof val === \"function\" &&\n // eslint-disable-next-line no-instanceof/no-instanceof\n val instanceof Object.getPrototypeOf(async function* () {}).constructor\n );\n}\n\nexport function isGeneratorFunction(val: unknown): val is GeneratorFunction {\n return (\n val != null &&\n typeof val === \"function\" &&\n // eslint-disable-next-line no-instanceof/no-instanceof\n val instanceof Object.getPrototypeOf(function* () {}).constructor\n );\n}\n"],"mappings":";;;;;;AAoBA,IAAa,mBAAb,cAAgEA,oCAAe;CAC7E,eAAyB,CAAC;CAG1B;CAEA;CAEA;CAEA,QAAiB;CAEjB,UAAmB;CAEnB,YAAY,QAA8B;AACxC;AACA,OAAK,OAAO,OAAO,QAAQ,OAAO,KAAK;AACvC,OAAK,OAAO,OAAO;AACnB,OAAK,SAAS,OAAO,OAAO,EAAE,MAAM,OAAO,SAAS;AACpD,OAAK,QAAQ,OAAO,SAAS,KAAK;AAClC,OAAK,UAAU,OAAO,WAAW,KAAK;;CAGxC,MAAgB,cACd,OACA,QACA,YACA;AACA,SAAO,IAAI,SAAY,SAAS,WAAW;GACzC,MAAM,0DAA0B,QAAQ,EACtC,WAAW,YAAY;AAEzB,GAAKC,+DAAmC,cACtC,aACA,YAAY;AACV,QAAI;KACF,MAAM,SAAS,MAAM,KAAK,KAAK,OAAO;AACtC,aAAQ;aACD,GAAG;AACV,YAAO;;;;;CAOjB,MAAM,OAEJ,OACA,SAEY;EAEZ,IAAIC;EACJ,MAAM,SAASC,qCAAsB;EACrC,MAAM,4DAA4B,KAAK,QAAQ;AAE/C,MAAI,KAAK,MACP,eAAc,MAAM,KAAK,gBACvB,KAAK,eACL,OACA;MAGF,eAAc,MAAMF,+DAAmC,cACrD,cACA,YAAY,KAAK,KAAK,OAAO;AAIjC,MAAID,oCAAS,WAAW,gBAAgB,KAAK,QAC3C,QAAO,MAAMC,+DAAmC,cAC9C,cACA,YAAY,YAAY,OAAO,OAAO;AAI1C,SAAO;;;AAqBX,UAAiB,gBAIf,WACA,QACoD;AACpD,KAAI,WAAW,OACb,QAAO;KAEP,MAAK,MAAM,SAAS,UAClB,OAAM,CAAC,QAAQ;;AAMrB,eAAsB,eACpB,GAKmB;CACnB,MAAMG,MAAW;AACjB,YAAW,MAAM,QAAQ,MAAM,EAC7B,KAAI,KAAK;AAEX,QAAO;;AAGT,SAAgB,mBAAsB,GAA0B;CAC9D,MAAMA,MAAW;AACjB,MAAK,MAAM,QAAQ,EACjB,KAAI,KAAK;AAEX,QAAO;;AAGT,SAAgB,kBACd,QAEA,OACgB;AAChB,KAAI,CAAC,OACH,QAAO,EACL,cAAc;UAEP,EAAE,kBAAkB,QAC7B,QAAO;EACL,GAAG;EACH,cAAc;;KAGhB,QAAO;EACL,GAAG;EACH,cAAc;GACZ,GAAG,OAAO;GACV,GAAG;;;;AAMX,SAAgB,yBACd,KAC+B;AAC/B,QACE,OAAO,QACP,OAAO,QAAQ,cAEf,eAAe,OAAO,eAAe,mBAAmB,IAAI;;AAIhE,SAAgB,oBAAoB,KAAwC;AAC1E,QACE,OAAO,QACP,OAAO,QAAQ,cAEf,eAAe,OAAO,eAAe,aAAa,IAAI"}
package/dist/utils.d.cts DELETED
@@ -1,32 +0,0 @@
1
- import { Runnable, RunnableConfig } from "@langchain/core/runnables";
2
- import { CallbackManagerForChainRun } from "@langchain/core/callbacks/manager";
3
-
4
- //#region src/utils.d.ts
5
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
- interface RunnableCallableArgs extends Partial<any> {
7
- name?: string;
8
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
- func: (...args: any[]) => any;
10
- tags?: string[];
11
- trace?: boolean;
12
- recurse?: boolean;
13
- }
14
- declare class RunnableCallable<I = unknown, O = unknown> extends Runnable<I, O> {
15
- lc_namespace: string[];
16
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
- func: (...args: any[]) => any;
18
- tags?: string[];
19
- config?: RunnableConfig;
20
- trace: boolean;
21
- recurse: boolean;
22
- constructor(fields: RunnableCallableArgs);
23
- protected _tracedInvoke(input: I, config?: Partial<RunnableConfig>, runManager?: CallbackManagerForChainRun): Promise<O>;
24
- invoke(
25
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
- input: I, options?: Partial<RunnableConfig> | undefined
27
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
- ): Promise<O>;
29
- }
30
- //#endregion
31
- export { RunnableCallable };
32
- //# sourceMappingURL=utils.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.cts","names":["CallbackManagerForChainRun","Runnable","RunnableConfig","RunnableCallableArgs","Partial","RunnableCallable","I","O","Promise","prefixGenerator","T","Generator","Prefix","gatherIterator","AsyncIterable","Iterable","Array","gatherIteratorSync","patchConfigurable","Record","isAsyncGeneratorFunction","AsyncGeneratorFunction","isGeneratorFunction","GeneratorFunction"],"sources":["../src/utils.d.ts"],"sourcesContent":["import { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { Runnable, RunnableConfig } from \"@langchain/core/runnables\";\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RunnableCallableArgs extends Partial<any> {\n name?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n func: (...args: any[]) => any;\n tags?: string[];\n trace?: boolean;\n recurse?: boolean;\n}\nexport declare class RunnableCallable<I = unknown, O = unknown> extends Runnable<I, O> {\n lc_namespace: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n func: (...args: any[]) => any;\n tags?: string[];\n config?: RunnableConfig;\n trace: boolean;\n recurse: boolean;\n constructor(fields: RunnableCallableArgs);\n protected _tracedInvoke(input: I, config?: Partial<RunnableConfig>, runManager?: CallbackManagerForChainRun): Promise<O>;\n invoke(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n input: I, options?: Partial<RunnableConfig> | undefined\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise<O>;\n}\nexport declare function prefixGenerator<T, Prefix extends string>(generator: Generator<T>, prefix: Prefix): Generator<[Prefix, T]>;\nexport declare function prefixGenerator<T>(generator: Generator<T>, prefix?: undefined): Generator<T>;\nexport declare function prefixGenerator<T, Prefix extends string | undefined = undefined>(generator: Generator<T>, prefix?: Prefix | undefined): Generator<Prefix extends string ? [Prefix, T] : T>;\n// https://github.com/tc39/proposal-array-from-async\nexport declare function gatherIterator<T>(i: AsyncIterable<T> | Promise<AsyncIterable<T>> | Iterable<T> | Promise<Iterable<T>>): Promise<Array<T>>;\nexport declare function gatherIteratorSync<T>(i: Iterable<T>): Array<T>;\nexport declare function patchConfigurable(config: RunnableConfig | undefined, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\npatch: Record<string, any>): RunnableConfig;\nexport declare function isAsyncGeneratorFunction(val: unknown): val is AsyncGeneratorFunction;\nexport declare function isGeneratorFunction(val: unknown): val is GeneratorFunction;\n"],"mappings":";;;;;UAGiBG,oBAAAA,SAA6BC;EAA7BD,IAAAA,CAAAA,EAAAA,MAAAA;EAQIE;EAAgB,IAAA,EAAA,CAAA,GAAA,IAAA,EAAA,GAAA,EAAA,EAAA,GAAA,GAAA;MAA4CC,CAAAA,EAAAA,MAAAA,EAAAA;OAAGC,CAAAA,EAAAA,OAAAA;SAKvEL,CAAAA,EAAAA,OAAAA;;AAIsBI,cATdD,gBAScC,CAAAA,IAAAA,OAAAA,EAAAA,IAAAA,OAAAA,CAAAA,SATqCL,QASrCK,CAT8CA,CAS9CA,EATiDC,CASjDD,CAAAA,CAAAA;cAAoBJ,EAAAA,MAAAA,EAAAA;;MAA8BF,EAAAA,CAAAA,GAAAA,IAAAA,EAAAA,GAAAA,EAAAA,EAAAA,GAAAA,GAAAA;MAAqCO,CAAAA,EAAAA,MAAAA,EAAAA;QAARC,CAAAA,EAJrGN,cAIqGM;OAGvGF,EAAAA,OAAAA;SAAqBJ,EAAAA,OAAAA;aAARE,CAAAA,MAAAA,EAJAD,oBAIAC;YAETG,aAAAA,CAAAA,KAAAA,EALoBD,CAKpBC,EAAAA,MAAAA,CAAAA,EALgCH,OAKhCG,CALwCL,cAKxCK,CAAAA,EAAAA,UAAAA,CAAAA,EALsEP,0BAKtEO,CAAAA,EALmGC,OAKnGD,CAL2GA,CAK3GA,CAAAA;QAARC;;SAFIF,aAAaF,QAAQF;;KAEzBM,QAAQD"}
package/dist/utils.d.ts DELETED
@@ -1,32 +0,0 @@
1
- import { Runnable, RunnableConfig } from "@langchain/core/runnables";
2
- import { CallbackManagerForChainRun } from "@langchain/core/callbacks/manager";
3
-
4
- //#region src/utils.d.ts
5
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
- interface RunnableCallableArgs extends Partial<any> {
7
- name?: string;
8
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
- func: (...args: any[]) => any;
10
- tags?: string[];
11
- trace?: boolean;
12
- recurse?: boolean;
13
- }
14
- declare class RunnableCallable<I = unknown, O = unknown> extends Runnable<I, O> {
15
- lc_namespace: string[];
16
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
- func: (...args: any[]) => any;
18
- tags?: string[];
19
- config?: RunnableConfig;
20
- trace: boolean;
21
- recurse: boolean;
22
- constructor(fields: RunnableCallableArgs);
23
- protected _tracedInvoke(input: I, config?: Partial<RunnableConfig>, runManager?: CallbackManagerForChainRun): Promise<O>;
24
- invoke(
25
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
- input: I, options?: Partial<RunnableConfig> | undefined
27
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
- ): Promise<O>;
29
- }
30
- //#endregion
31
- export { RunnableCallable };
32
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","names":["CallbackManagerForChainRun","Runnable","RunnableConfig","RunnableCallableArgs","Partial","RunnableCallable","I","O","Promise","prefixGenerator","T","Generator","Prefix","gatherIterator","AsyncIterable","Iterable","Array","gatherIteratorSync","patchConfigurable","Record","isAsyncGeneratorFunction","AsyncGeneratorFunction","isGeneratorFunction","GeneratorFunction"],"sources":["../src/utils.d.ts"],"sourcesContent":["import { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { Runnable, RunnableConfig } from \"@langchain/core/runnables\";\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RunnableCallableArgs extends Partial<any> {\n name?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n func: (...args: any[]) => any;\n tags?: string[];\n trace?: boolean;\n recurse?: boolean;\n}\nexport declare class RunnableCallable<I = unknown, O = unknown> extends Runnable<I, O> {\n lc_namespace: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n func: (...args: any[]) => any;\n tags?: string[];\n config?: RunnableConfig;\n trace: boolean;\n recurse: boolean;\n constructor(fields: RunnableCallableArgs);\n protected _tracedInvoke(input: I, config?: Partial<RunnableConfig>, runManager?: CallbackManagerForChainRun): Promise<O>;\n invoke(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n input: I, options?: Partial<RunnableConfig> | undefined\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise<O>;\n}\nexport declare function prefixGenerator<T, Prefix extends string>(generator: Generator<T>, prefix: Prefix): Generator<[Prefix, T]>;\nexport declare function prefixGenerator<T>(generator: Generator<T>, prefix?: undefined): Generator<T>;\nexport declare function prefixGenerator<T, Prefix extends string | undefined = undefined>(generator: Generator<T>, prefix?: Prefix | undefined): Generator<Prefix extends string ? [Prefix, T] : T>;\n// https://github.com/tc39/proposal-array-from-async\nexport declare function gatherIterator<T>(i: AsyncIterable<T> | Promise<AsyncIterable<T>> | Iterable<T> | Promise<Iterable<T>>): Promise<Array<T>>;\nexport declare function gatherIteratorSync<T>(i: Iterable<T>): Array<T>;\nexport declare function patchConfigurable(config: RunnableConfig | undefined, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\npatch: Record<string, any>): RunnableConfig;\nexport declare function isAsyncGeneratorFunction(val: unknown): val is AsyncGeneratorFunction;\nexport declare function isGeneratorFunction(val: unknown): val is GeneratorFunction;\n"],"mappings":";;;;;UAGiBG,oBAAAA,SAA6BC;EAA7BD,IAAAA,CAAAA,EAAAA,MAAAA;EAQIE;EAAgB,IAAA,EAAA,CAAA,GAAA,IAAA,EAAA,GAAA,EAAA,EAAA,GAAA,GAAA;MAA4CC,CAAAA,EAAAA,MAAAA,EAAAA;OAAGC,CAAAA,EAAAA,OAAAA;SAKvEL,CAAAA,EAAAA,OAAAA;;AAIsBI,cATdD,gBAScC,CAAAA,IAAAA,OAAAA,EAAAA,IAAAA,OAAAA,CAAAA,SATqCL,QASrCK,CAT8CA,CAS9CA,EATiDC,CASjDD,CAAAA,CAAAA;cAAoBJ,EAAAA,MAAAA,EAAAA;;MAA8BF,EAAAA,CAAAA,GAAAA,IAAAA,EAAAA,GAAAA,EAAAA,EAAAA,GAAAA,GAAAA;MAAqCO,CAAAA,EAAAA,MAAAA,EAAAA;QAARC,CAAAA,EAJrGN,cAIqGM;OAGvGF,EAAAA,OAAAA;SAAqBJ,EAAAA,OAAAA;aAARE,CAAAA,MAAAA,EAJAD,oBAIAC;YAETG,aAAAA,CAAAA,KAAAA,EALoBD,CAKpBC,EAAAA,MAAAA,CAAAA,EALgCH,OAKhCG,CALwCL,cAKxCK,CAAAA,EAAAA,UAAAA,CAAAA,EALsEP,0BAKtEO,CAAAA,EALmGC,OAKnGD,CAL2GA,CAK3GA,CAAAA;QAARC;;SAFIF,aAAaF,QAAQF;;KAEzBM,QAAQD"}
package/dist/utils.js DELETED
@@ -1,81 +0,0 @@
1
- import { ensureLangGraphConfig } from "./pregel/utils/config.js";
2
- import { AsyncLocalStorageProviderSingleton } from "@langchain/core/singletons";
3
- import { Runnable, mergeConfigs, patchConfig } from "@langchain/core/runnables";
4
-
5
- //#region src/utils.ts
6
- var RunnableCallable = class extends Runnable {
7
- lc_namespace = ["langgraph"];
8
- func;
9
- tags;
10
- config;
11
- trace = true;
12
- recurse = true;
13
- constructor(fields) {
14
- super();
15
- this.name = fields.name ?? fields.func.name;
16
- this.func = fields.func;
17
- this.config = fields.tags ? { tags: fields.tags } : void 0;
18
- this.trace = fields.trace ?? this.trace;
19
- this.recurse = fields.recurse ?? this.recurse;
20
- }
21
- async _tracedInvoke(input, config, runManager) {
22
- return new Promise((resolve, reject) => {
23
- const childConfig = patchConfig(config, { callbacks: runManager?.getChild() });
24
- AsyncLocalStorageProviderSingleton.runWithConfig(childConfig, async () => {
25
- try {
26
- const output = await this.func(input, childConfig);
27
- resolve(output);
28
- } catch (e) {
29
- reject(e);
30
- }
31
- });
32
- });
33
- }
34
- async invoke(input, options) {
35
- let returnValue;
36
- const config = ensureLangGraphConfig(options);
37
- const mergedConfig = mergeConfigs(this.config, config);
38
- if (this.trace) returnValue = await this._callWithConfig(this._tracedInvoke, input, mergedConfig);
39
- else returnValue = await AsyncLocalStorageProviderSingleton.runWithConfig(mergedConfig, async () => this.func(input, mergedConfig));
40
- if (Runnable.isRunnable(returnValue) && this.recurse) return await AsyncLocalStorageProviderSingleton.runWithConfig(mergedConfig, async () => returnValue.invoke(input, mergedConfig));
41
- return returnValue;
42
- }
43
- };
44
- function* prefixGenerator(generator, prefix) {
45
- if (prefix === void 0) yield* generator;
46
- else for (const value of generator) yield [prefix, value];
47
- }
48
- async function gatherIterator(i) {
49
- const out = [];
50
- for await (const item of await i) out.push(item);
51
- return out;
52
- }
53
- function gatherIteratorSync(i) {
54
- const out = [];
55
- for (const item of i) out.push(item);
56
- return out;
57
- }
58
- function patchConfigurable(config, patch) {
59
- if (!config) return { configurable: patch };
60
- else if (!("configurable" in config)) return {
61
- ...config,
62
- configurable: patch
63
- };
64
- else return {
65
- ...config,
66
- configurable: {
67
- ...config.configurable,
68
- ...patch
69
- }
70
- };
71
- }
72
- function isAsyncGeneratorFunction(val) {
73
- return val != null && typeof val === "function" && val instanceof Object.getPrototypeOf(async function* () {}).constructor;
74
- }
75
- function isGeneratorFunction(val) {
76
- return val != null && typeof val === "function" && val instanceof Object.getPrototypeOf(function* () {}).constructor;
77
- }
78
-
79
- //#endregion
80
- export { RunnableCallable, gatherIterator, gatherIteratorSync, isAsyncGeneratorFunction, isGeneratorFunction, patchConfigurable, prefixGenerator };
81
- //# sourceMappingURL=utils.js.map
package/dist/utils.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","names":["returnValue: any","out: T[]"],"sources":["../src/utils.ts"],"sourcesContent":["import { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport {\n mergeConfigs,\n patchConfig,\n Runnable,\n RunnableConfig,\n} from \"@langchain/core/runnables\";\nimport { AsyncLocalStorageProviderSingleton } from \"@langchain/core/singletons\";\nimport { ensureLangGraphConfig } from \"./pregel/utils/config.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RunnableCallableArgs extends Partial<any> {\n name?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n func: (...args: any[]) => any;\n tags?: string[];\n trace?: boolean;\n recurse?: boolean;\n}\n\nexport class RunnableCallable<I = unknown, O = unknown> extends Runnable<I, O> {\n lc_namespace: string[] = [\"langgraph\"];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n func: (...args: any[]) => any;\n\n tags?: string[];\n\n config?: RunnableConfig;\n\n trace: boolean = true;\n\n recurse: boolean = true;\n\n constructor(fields: RunnableCallableArgs) {\n super();\n this.name = fields.name ?? fields.func.name;\n this.func = fields.func;\n this.config = fields.tags ? { tags: fields.tags } : undefined;\n this.trace = fields.trace ?? this.trace;\n this.recurse = fields.recurse ?? this.recurse;\n }\n\n protected async _tracedInvoke(\n input: I,\n config?: Partial<RunnableConfig>,\n runManager?: CallbackManagerForChainRun\n ) {\n return new Promise<O>((resolve, reject) => {\n const childConfig = patchConfig(config, {\n callbacks: runManager?.getChild(),\n });\n void AsyncLocalStorageProviderSingleton.runWithConfig(\n childConfig,\n async () => {\n try {\n const output = await this.func(input, childConfig);\n resolve(output);\n } catch (e) {\n reject(e);\n }\n }\n );\n });\n }\n\n async invoke(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n input: I,\n options?: Partial<RunnableConfig> | undefined\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise<O> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let returnValue: any;\n const config = ensureLangGraphConfig(options);\n const mergedConfig = mergeConfigs(this.config, config);\n\n if (this.trace) {\n returnValue = await this._callWithConfig(\n this._tracedInvoke,\n input,\n mergedConfig\n );\n } else {\n returnValue = await AsyncLocalStorageProviderSingleton.runWithConfig(\n mergedConfig,\n async () => this.func(input, mergedConfig)\n );\n }\n\n if (Runnable.isRunnable(returnValue) && this.recurse) {\n return await AsyncLocalStorageProviderSingleton.runWithConfig(\n mergedConfig,\n async () => returnValue.invoke(input, mergedConfig)\n );\n }\n\n return returnValue;\n }\n}\n\nexport function prefixGenerator<T, Prefix extends string>(\n generator: Generator<T>,\n prefix: Prefix\n): Generator<[Prefix, T]>;\n\nexport function prefixGenerator<T>(\n generator: Generator<T>,\n prefix?: undefined\n): Generator<T>;\n\nexport function prefixGenerator<\n T,\n Prefix extends string | undefined = undefined\n>(\n generator: Generator<T>,\n prefix?: Prefix | undefined\n): Generator<Prefix extends string ? [Prefix, T] : T>;\nexport function* prefixGenerator<\n T,\n Prefix extends string | undefined = undefined\n>(\n generator: Generator<T>,\n prefix?: Prefix | undefined\n): Generator<Prefix extends string ? [Prefix, T] : T> {\n if (prefix === undefined) {\n yield* generator as Generator<Prefix extends string ? [Prefix, T] : T>;\n } else {\n for (const value of generator) {\n yield [prefix, value] as Prefix extends string ? [Prefix, T] : T;\n }\n }\n}\n\n// https://github.com/tc39/proposal-array-from-async\nexport async function gatherIterator<T>(\n i:\n | AsyncIterable<T>\n | Promise<AsyncIterable<T>>\n | Iterable<T>\n | Promise<Iterable<T>>\n): Promise<Array<T>> {\n const out: T[] = [];\n for await (const item of await i) {\n out.push(item);\n }\n return out;\n}\n\nexport function gatherIteratorSync<T>(i: Iterable<T>): Array<T> {\n const out: T[] = [];\n for (const item of i) {\n out.push(item);\n }\n return out;\n}\n\nexport function patchConfigurable(\n config: RunnableConfig | undefined,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n patch: Record<string, any>\n): RunnableConfig {\n if (!config) {\n return {\n configurable: patch,\n };\n } else if (!(\"configurable\" in config)) {\n return {\n ...config,\n configurable: patch,\n };\n } else {\n return {\n ...config,\n configurable: {\n ...config.configurable,\n ...patch,\n },\n };\n }\n}\n\nexport function isAsyncGeneratorFunction(\n val: unknown\n): val is AsyncGeneratorFunction {\n return (\n val != null &&\n typeof val === \"function\" &&\n // eslint-disable-next-line no-instanceof/no-instanceof\n val instanceof Object.getPrototypeOf(async function* () {}).constructor\n );\n}\n\nexport function isGeneratorFunction(val: unknown): val is GeneratorFunction {\n return (\n val != null &&\n typeof val === \"function\" &&\n // eslint-disable-next-line no-instanceof/no-instanceof\n val instanceof Object.getPrototypeOf(function* () {}).constructor\n );\n}\n"],"mappings":";;;;;AAoBA,IAAa,mBAAb,cAAgE,SAAe;CAC7E,eAAyB,CAAC;CAG1B;CAEA;CAEA;CAEA,QAAiB;CAEjB,UAAmB;CAEnB,YAAY,QAA8B;AACxC;AACA,OAAK,OAAO,OAAO,QAAQ,OAAO,KAAK;AACvC,OAAK,OAAO,OAAO;AACnB,OAAK,SAAS,OAAO,OAAO,EAAE,MAAM,OAAO,SAAS;AACpD,OAAK,QAAQ,OAAO,SAAS,KAAK;AAClC,OAAK,UAAU,OAAO,WAAW,KAAK;;CAGxC,MAAgB,cACd,OACA,QACA,YACA;AACA,SAAO,IAAI,SAAY,SAAS,WAAW;GACzC,MAAM,cAAc,YAAY,QAAQ,EACtC,WAAW,YAAY;AAEzB,GAAK,mCAAmC,cACtC,aACA,YAAY;AACV,QAAI;KACF,MAAM,SAAS,MAAM,KAAK,KAAK,OAAO;AACtC,aAAQ;aACD,GAAG;AACV,YAAO;;;;;CAOjB,MAAM,OAEJ,OACA,SAEY;EAEZ,IAAIA;EACJ,MAAM,SAAS,sBAAsB;EACrC,MAAM,eAAe,aAAa,KAAK,QAAQ;AAE/C,MAAI,KAAK,MACP,eAAc,MAAM,KAAK,gBACvB,KAAK,eACL,OACA;MAGF,eAAc,MAAM,mCAAmC,cACrD,cACA,YAAY,KAAK,KAAK,OAAO;AAIjC,MAAI,SAAS,WAAW,gBAAgB,KAAK,QAC3C,QAAO,MAAM,mCAAmC,cAC9C,cACA,YAAY,YAAY,OAAO,OAAO;AAI1C,SAAO;;;AAqBX,UAAiB,gBAIf,WACA,QACoD;AACpD,KAAI,WAAW,OACb,QAAO;KAEP,MAAK,MAAM,SAAS,UAClB,OAAM,CAAC,QAAQ;;AAMrB,eAAsB,eACpB,GAKmB;CACnB,MAAMC,MAAW;AACjB,YAAW,MAAM,QAAQ,MAAM,EAC7B,KAAI,KAAK;AAEX,QAAO;;AAGT,SAAgB,mBAAsB,GAA0B;CAC9D,MAAMA,MAAW;AACjB,MAAK,MAAM,QAAQ,EACjB,KAAI,KAAK;AAEX,QAAO;;AAGT,SAAgB,kBACd,QAEA,OACgB;AAChB,KAAI,CAAC,OACH,QAAO,EACL,cAAc;UAEP,EAAE,kBAAkB,QAC7B,QAAO;EACL,GAAG;EACH,cAAc;;KAGhB,QAAO;EACL,GAAG;EACH,cAAc;GACZ,GAAG,OAAO;GACV,GAAG;;;;AAMX,SAAgB,yBACd,KAC+B;AAC/B,QACE,OAAO,QACP,OAAO,QAAQ,cAEf,eAAe,OAAO,eAAe,mBAAmB,IAAI;;AAIhE,SAAgB,oBAAoB,KAAwC;AAC1E,QACE,OAAO,QACP,OAAO,QAAQ,cAEf,eAAe,OAAO,eAAe,aAAa,IAAI"}
package/dist/web.cjs DELETED
@@ -1,96 +0,0 @@
1
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
- const require_errors = require('./errors.cjs');
3
- const require_base = require('./channels/base.cjs');
4
- const require_binop = require('./channels/binop.cjs');
5
- const require_annotation = require('./graph/annotation.cjs');
6
- const require_constants = require('./constants.cjs');
7
- const require_graph = require('./graph/graph.cjs');
8
- const require_state = require('./graph/state.cjs');
9
- const require_message = require('./graph/message.cjs');
10
- require('./graph/index.cjs');
11
- require('./channels/index.cjs');
12
- const require_index$1 = require('./func/index.cjs');
13
- const require_messages_annotation = require('./graph/messages_annotation.cjs');
14
- const __langchain_langgraph_checkpoint = require_rolldown_runtime.__toESM(require("@langchain/langgraph-checkpoint"));
15
-
16
- exports.Annotation = require_annotation.Annotation;
17
- Object.defineProperty(exports, 'AsyncBatchedStore', {
18
- enumerable: true,
19
- get: function () {
20
- return __langchain_langgraph_checkpoint.AsyncBatchedStore;
21
- }
22
- });
23
- exports.BaseChannel = require_base.BaseChannel;
24
- Object.defineProperty(exports, 'BaseCheckpointSaver', {
25
- enumerable: true,
26
- get: function () {
27
- return __langchain_langgraph_checkpoint.BaseCheckpointSaver;
28
- }
29
- });
30
- exports.BaseLangGraphError = require_errors.BaseLangGraphError;
31
- Object.defineProperty(exports, 'BaseStore', {
32
- enumerable: true,
33
- get: function () {
34
- return __langchain_langgraph_checkpoint.BaseStore;
35
- }
36
- });
37
- exports.BinaryOperatorAggregate = require_binop.BinaryOperatorAggregate;
38
- exports.Command = require_constants.Command;
39
- exports.CompiledStateGraph = require_state.CompiledStateGraph;
40
- exports.END = require_constants.END;
41
- exports.EmptyChannelError = require_errors.EmptyChannelError;
42
- exports.EmptyInputError = require_errors.EmptyInputError;
43
- exports.Graph = require_graph.Graph;
44
- exports.GraphBubbleUp = require_errors.GraphBubbleUp;
45
- exports.GraphInterrupt = require_errors.GraphInterrupt;
46
- exports.GraphRecursionError = require_errors.GraphRecursionError;
47
- exports.GraphValueError = require_errors.GraphValueError;
48
- exports.INTERRUPT = require_constants.INTERRUPT;
49
- Object.defineProperty(exports, 'InMemoryStore', {
50
- enumerable: true,
51
- get: function () {
52
- return __langchain_langgraph_checkpoint.InMemoryStore;
53
- }
54
- });
55
- exports.InvalidUpdateError = require_errors.InvalidUpdateError;
56
- Object.defineProperty(exports, 'MemorySaver', {
57
- enumerable: true,
58
- get: function () {
59
- return __langchain_langgraph_checkpoint.MemorySaver;
60
- }
61
- });
62
- exports.MessageGraph = require_message.MessageGraph;
63
- exports.MessagesAnnotation = require_messages_annotation.MessagesAnnotation;
64
- exports.MessagesZodMeta = require_messages_annotation.MessagesZodMeta;
65
- exports.MessagesZodState = require_messages_annotation.MessagesZodState;
66
- exports.MultipleSubgraphsError = require_errors.MultipleSubgraphsError;
67
- exports.NodeInterrupt = require_errors.NodeInterrupt;
68
- exports.ParentCommand = require_errors.ParentCommand;
69
- exports.REMOVE_ALL_MESSAGES = require_message.REMOVE_ALL_MESSAGES;
70
- exports.RemoteException = require_errors.RemoteException;
71
- exports.START = require_constants.START;
72
- exports.Send = require_constants.Send;
73
- exports.StateGraph = require_state.StateGraph;
74
- exports.UnreachableNodeError = require_errors.UnreachableNodeError;
75
- exports.addMessages = require_message.messagesStateReducer;
76
- Object.defineProperty(exports, 'copyCheckpoint', {
77
- enumerable: true,
78
- get: function () {
79
- return __langchain_langgraph_checkpoint.copyCheckpoint;
80
- }
81
- });
82
- Object.defineProperty(exports, 'emptyCheckpoint', {
83
- enumerable: true,
84
- get: function () {
85
- return __langchain_langgraph_checkpoint.emptyCheckpoint;
86
- }
87
- });
88
- exports.entrypoint = require_index$1.entrypoint;
89
- exports.getSubgraphsSeenSet = require_errors.getSubgraphsSeenSet;
90
- exports.isCommand = require_constants.isCommand;
91
- exports.isGraphBubbleUp = require_errors.isGraphBubbleUp;
92
- exports.isGraphInterrupt = require_errors.isGraphInterrupt;
93
- exports.isInterrupted = require_constants.isInterrupted;
94
- exports.isParentCommand = require_errors.isParentCommand;
95
- exports.messagesStateReducer = require_message.messagesStateReducer;
96
- exports.task = require_index$1.task;
package/dist/web.d.cts DELETED
@@ -1,23 +0,0 @@
1
- import { BaseChannel } from "./channels/base.cjs";
2
- import { BinaryOperator, BinaryOperatorAggregate } from "./channels/binop.cjs";
3
- import { AnyValue } from "./channels/any_value.cjs";
4
- import { LastValue } from "./channels/last_value.cjs";
5
- import { DynamicBarrierValue, WaitForNames } from "./channels/dynamic_barrier_value.cjs";
6
- import { EphemeralValue } from "./channels/ephemeral_value.cjs";
7
- import { NamedBarrierValue } from "./channels/named_barrier_value.cjs";
8
- import { Topic } from "./channels/topic.cjs";
9
- import { LangGraphRunnableConfig, Runtime } from "./pregel/runnable_types.cjs";
10
- import { Annotation, AnnotationRoot, NodeType, SingleReducer, StateDefinition, StateType, UpdateType } from "./graph/annotation.cjs";
11
- import { RetryPolicy } from "./pregel/utils/index.cjs";
12
- import { PregelNode } from "./pregel/read.cjs";
13
- import { Command, CommandParams, END, INTERRUPT, Interrupt, START, Send, isCommand, isInterrupted } from "./constants.cjs";
14
- import { GetStateOptions, MultipleChannelSubscriptionOptions, PregelOptions, PregelParams, SingleChannelSubscriptionOptions, StateSnapshot, StreamMode, StreamOutputMap } from "./pregel/types.cjs";
15
- import { Pregel } from "./pregel/index.cjs";
16
- import { CompiledGraph, Graph } from "./graph/graph.cjs";
17
- import { CompiledStateGraph, StateGraph, StateGraphArgs } from "./graph/state.cjs";
18
- import { MessageGraph, Messages, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/message.cjs";
19
- import { BaseLangGraphError, BaseLangGraphErrorFields, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt, ParentCommand, RemoteException, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphInterrupt, isParentCommand } from "./errors.cjs";
20
- import { EntrypointOptions, TaskOptions, entrypoint, task } from "./func/index.cjs";
21
- import { MessagesAnnotation, MessagesZodMeta, MessagesZodState } from "./graph/messages_annotation.cjs";
22
- import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, Checkpoint, CheckpointMetadata, CheckpointTuple, GetOperation, InMemoryStore, Item, ListNamespacesOperation, MatchCondition, MemorySaver, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchOperation, copyCheckpoint, emptyCheckpoint } from "@langchain/langgraph-checkpoint";
23
- export { Annotation, type AnnotationRoot, type AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, type BinaryOperator, BinaryOperatorAggregate, type Checkpoint, type CheckpointMetadata, type CheckpointTuple, Command, type CommandParams, type CompiledGraph, CompiledStateGraph, type DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, type EntrypointOptions, type EphemeralValue, type GetOperation, type GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, type Interrupt, InvalidUpdateError, type Item, type LangGraphRunnableConfig, type LastValue, type ListNamespacesOperation, type MatchCondition, MemorySaver, MessageGraph, type Messages, MessagesAnnotation, MessagesZodMeta, MessagesZodState, type MultipleChannelSubscriptionOptions, MultipleSubgraphsError, type NameSpacePath, type NamedBarrierValue, type NamespaceMatchType, NodeInterrupt, type NodeType, type Operation, type OperationResults, ParentCommand, type Pregel, type PregelNode, type PregelOptions, type PregelParams, type PutOperation, REMOVE_ALL_MESSAGES, RemoteException, type RetryPolicy, type Runtime, START, type SearchOperation, Send, type SingleChannelSubscriptionOptions, type SingleReducer, type StateDefinition, StateGraph, type StateGraphArgs, type StateSnapshot, type StateType, type StreamMode, type StreamOutputMap, type TaskOptions, type Topic, UnreachableNodeError, type UpdateType, type WaitForNames, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getSubgraphsSeenSet, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, messagesStateReducer, task };
package/dist/web.d.ts DELETED
@@ -1,23 +0,0 @@
1
- import { BaseChannel } from "./channels/base.js";
2
- import { BinaryOperator, BinaryOperatorAggregate } from "./channels/binop.js";
3
- import { AnyValue } from "./channels/any_value.js";
4
- import { LastValue } from "./channels/last_value.js";
5
- import { DynamicBarrierValue, WaitForNames } from "./channels/dynamic_barrier_value.js";
6
- import { EphemeralValue } from "./channels/ephemeral_value.js";
7
- import { NamedBarrierValue } from "./channels/named_barrier_value.js";
8
- import { Topic } from "./channels/topic.js";
9
- import { LangGraphRunnableConfig, Runtime } from "./pregel/runnable_types.js";
10
- import { Annotation, AnnotationRoot, NodeType, SingleReducer, StateDefinition, StateType, UpdateType } from "./graph/annotation.js";
11
- import { RetryPolicy } from "./pregel/utils/index.js";
12
- import { PregelNode } from "./pregel/read.js";
13
- import { Command, CommandParams, END, INTERRUPT, Interrupt, START, Send, isCommand, isInterrupted } from "./constants.js";
14
- import { GetStateOptions, MultipleChannelSubscriptionOptions, PregelOptions, PregelParams, SingleChannelSubscriptionOptions, StateSnapshot, StreamMode, StreamOutputMap } from "./pregel/types.js";
15
- import { Pregel } from "./pregel/index.js";
16
- import { CompiledGraph, Graph } from "./graph/graph.js";
17
- import { CompiledStateGraph, StateGraph, StateGraphArgs } from "./graph/state.js";
18
- import { MessageGraph, Messages, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/message.js";
19
- import { BaseLangGraphError, BaseLangGraphErrorFields, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt, ParentCommand, RemoteException, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphInterrupt, isParentCommand } from "./errors.js";
20
- import { EntrypointOptions, TaskOptions, entrypoint, task } from "./func/index.js";
21
- import { MessagesAnnotation, MessagesZodMeta, MessagesZodState } from "./graph/messages_annotation.js";
22
- import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, Checkpoint, CheckpointMetadata, CheckpointTuple, GetOperation, InMemoryStore, Item, ListNamespacesOperation, MatchCondition, MemorySaver, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchOperation, copyCheckpoint, emptyCheckpoint } from "@langchain/langgraph-checkpoint";
23
- export { Annotation, type AnnotationRoot, type AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, type BinaryOperator, BinaryOperatorAggregate, type Checkpoint, type CheckpointMetadata, type CheckpointTuple, Command, type CommandParams, type CompiledGraph, CompiledStateGraph, type DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, type EntrypointOptions, type EphemeralValue, type GetOperation, type GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, type Interrupt, InvalidUpdateError, type Item, type LangGraphRunnableConfig, type LastValue, type ListNamespacesOperation, type MatchCondition, MemorySaver, MessageGraph, type Messages, MessagesAnnotation, MessagesZodMeta, MessagesZodState, type MultipleChannelSubscriptionOptions, MultipleSubgraphsError, type NameSpacePath, type NamedBarrierValue, type NamespaceMatchType, NodeInterrupt, type NodeType, type Operation, type OperationResults, ParentCommand, type Pregel, type PregelNode, type PregelOptions, type PregelParams, type PutOperation, REMOVE_ALL_MESSAGES, RemoteException, type RetryPolicy, type Runtime, START, type SearchOperation, Send, type SingleChannelSubscriptionOptions, type SingleReducer, type StateDefinition, StateGraph, type StateGraphArgs, type StateSnapshot, type StateType, type StreamMode, type StreamOutputMap, type TaskOptions, type Topic, UnreachableNodeError, type UpdateType, type WaitForNames, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getSubgraphsSeenSet, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, messagesStateReducer, task };
package/dist/web.js DELETED
@@ -1,15 +0,0 @@
1
- import { BaseLangGraphError, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt, ParentCommand, RemoteException, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphInterrupt, isParentCommand } from "./errors.js";
2
- import { BaseChannel } from "./channels/base.js";
3
- import { BinaryOperatorAggregate } from "./channels/binop.js";
4
- import { Annotation } from "./graph/annotation.js";
5
- import { Command, END, INTERRUPT, START, Send, isCommand, isInterrupted } from "./constants.js";
6
- import { Graph } from "./graph/graph.js";
7
- import { CompiledStateGraph, StateGraph } from "./graph/state.js";
8
- import { MessageGraph, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/message.js";
9
- import "./graph/index.js";
10
- import "./channels/index.js";
11
- import { entrypoint, task } from "./func/index.js";
12
- import { MessagesAnnotation, MessagesZodMeta, MessagesZodState } from "./graph/messages_annotation.js";
13
- import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, InMemoryStore, MemorySaver, copyCheckpoint, emptyCheckpoint } from "@langchain/langgraph-checkpoint";
14
-
15
- export { Annotation, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseStore, BinaryOperatorAggregate, Command, CompiledStateGraph, END, EmptyChannelError, EmptyInputError, Graph, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, InvalidUpdateError, MemorySaver, MessageGraph, MessagesAnnotation, MessagesZodMeta, MessagesZodState, MultipleSubgraphsError, NodeInterrupt, ParentCommand, REMOVE_ALL_MESSAGES, RemoteException, START, Send, StateGraph, UnreachableNodeError, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getSubgraphsSeenSet, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, messagesStateReducer, task };
package/dist/writer.cjs DELETED
@@ -1,15 +0,0 @@
1
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
- const __langchain_core_singletons = require_rolldown_runtime.__toESM(require("@langchain/core/singletons"));
3
-
4
- //#region src/writer.ts
5
- function writer(chunk) {
6
- const config = __langchain_core_singletons.AsyncLocalStorageProviderSingleton.getRunnableConfig();
7
- if (!config) throw new Error("Called interrupt() outside the context of a graph.");
8
- const conf = config.configurable;
9
- if (!conf) throw new Error("No configurable found in config");
10
- return conf.writer?.(chunk);
11
- }
12
-
13
- //#endregion
14
- exports.writer = writer;
15
- //# sourceMappingURL=writer.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writer.cjs","names":["config: LangGraphRunnableConfig | undefined","AsyncLocalStorageProviderSingleton"],"sources":["../src/writer.ts"],"sourcesContent":["import { AsyncLocalStorageProviderSingleton } from \"@langchain/core/singletons\";\nimport { LangGraphRunnableConfig } from \"./pregel/runnable_types.js\";\n\nexport function writer<T>(chunk: T): void {\n const config: LangGraphRunnableConfig | undefined =\n AsyncLocalStorageProviderSingleton.getRunnableConfig();\n if (!config) {\n throw new Error(\"Called interrupt() outside the context of a graph.\");\n }\n\n const conf = config.configurable;\n if (!conf) {\n throw new Error(\"No configurable found in config\");\n }\n\n return conf.writer?.(chunk);\n}\n\nexport type InferWriterType<T> = T extends typeof writer<infer C> ? C : any; // eslint-disable-line @typescript-eslint/no-explicit-any\n"],"mappings":";;;;AAGA,SAAgB,OAAU,OAAgB;CACxC,MAAMA,SACJC,+DAAmC;AACrC,KAAI,CAAC,OACH,OAAM,IAAI,MAAM;CAGlB,MAAM,OAAO,OAAO;AACpB,KAAI,CAAC,KACH,OAAM,IAAI,MAAM;AAGlB,QAAO,KAAK,SAAS"}
package/dist/writer.d.cts DELETED
@@ -1,7 +0,0 @@
1
- //#region src/writer.d.ts
2
- declare function writer<T>(chunk: T): void;
3
- type InferWriterType<T> = T extends typeof writer<infer C> ? C : any; // eslint-disable-line @typescript-eslint/no-explicit-any
4
-
5
- //#endregion
6
- export { InferWriterType, writer };
7
- //# sourceMappingURL=writer.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writer.d.cts","names":["writer","T","InferWriterType","C"],"sources":["../src/writer.d.ts"],"sourcesContent":["export declare function writer<T>(chunk: T): void;\nexport type InferWriterType<T> = T extends typeof writer<infer C> ? C : any; // eslint-disable-line @typescript-eslint/no-explicit-any\n"],"mappings":";iBAAwBA,iBAAiBC;AAAjBD,KACZE,eAD6BD,CAAAA,CAAAA,CAAAA,GACRA,CADQA,SAAAA,OACSD,MADTC,CAAAA,KAAAA,EAAAA,CAAAA,GAC2BE,CAD3BF,GAAAA,GAAAA,CAAAA,CAAAA"}
package/dist/writer.d.ts DELETED
@@ -1,7 +0,0 @@
1
- //#region src/writer.d.ts
2
- declare function writer<T>(chunk: T): void;
3
- type InferWriterType<T> = T extends typeof writer<infer C> ? C : any; // eslint-disable-line @typescript-eslint/no-explicit-any
4
-
5
- //#endregion
6
- export { InferWriterType, writer };
7
- //# sourceMappingURL=writer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writer.d.ts","names":["writer","T","InferWriterType","C"],"sources":["../src/writer.d.ts"],"sourcesContent":["export declare function writer<T>(chunk: T): void;\nexport type InferWriterType<T> = T extends typeof writer<infer C> ? C : any; // eslint-disable-line @typescript-eslint/no-explicit-any\n"],"mappings":";iBAAwBA,iBAAiBC;AAAjBD,KACZE,eAD6BD,CAAAA,CAAAA,CAAAA,GACRA,CADQA,SAAAA,OACSD,MADTC,CAAAA,KAAAA,EAAAA,CAAAA,GAC2BE,CAD3BF,GAAAA,GAAAA,CAAAA,CAAAA"}
package/dist/writer.js DELETED
@@ -1,14 +0,0 @@
1
- import { AsyncLocalStorageProviderSingleton } from "@langchain/core/singletons";
2
-
3
- //#region src/writer.ts
4
- function writer(chunk) {
5
- const config = AsyncLocalStorageProviderSingleton.getRunnableConfig();
6
- if (!config) throw new Error("Called interrupt() outside the context of a graph.");
7
- const conf = config.configurable;
8
- if (!conf) throw new Error("No configurable found in config");
9
- return conf.writer?.(chunk);
10
- }
11
-
12
- //#endregion
13
- export { writer };
14
- //# sourceMappingURL=writer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writer.js","names":["config: LangGraphRunnableConfig | undefined"],"sources":["../src/writer.ts"],"sourcesContent":["import { AsyncLocalStorageProviderSingleton } from \"@langchain/core/singletons\";\nimport { LangGraphRunnableConfig } from \"./pregel/runnable_types.js\";\n\nexport function writer<T>(chunk: T): void {\n const config: LangGraphRunnableConfig | undefined =\n AsyncLocalStorageProviderSingleton.getRunnableConfig();\n if (!config) {\n throw new Error(\"Called interrupt() outside the context of a graph.\");\n }\n\n const conf = config.configurable;\n if (!conf) {\n throw new Error(\"No configurable found in config\");\n }\n\n return conf.writer?.(chunk);\n}\n\nexport type InferWriterType<T> = T extends typeof writer<infer C> ? C : any; // eslint-disable-line @typescript-eslint/no-explicit-any\n"],"mappings":";;;AAGA,SAAgB,OAAU,OAAgB;CACxC,MAAMA,SACJ,mCAAmC;AACrC,KAAI,CAAC,OACH,OAAM,IAAI,MAAM;CAGlB,MAAM,OAAO,OAAO;AACpB,KAAI,CAAC,KACH,OAAM,IAAI,MAAM;AAGlB,QAAO,KAAK,SAAS"}