@langchain/langgraph 1.0.6 → 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 -280
  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 -346
  293. package/dist/pregel/remote.cjs.map +0 -1
  294. package/dist/pregel/remote.d.cts +0 -121
  295. package/dist/pregel/remote.d.cts.map +0 -1
  296. package/dist/pregel/remote.d.ts +0 -121
  297. package/dist/pregel/remote.d.ts.map +0 -1
  298. package/dist/pregel/remote.js +0 -345
  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,41 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_meta = require('./meta.cjs');
3
- const __langchain_core_utils_types = require_rolldown_runtime.__toESM(require("@langchain/core/utils/types"));
4
- const zod_v3 = require_rolldown_runtime.__toESM(require("zod/v3"));
5
- const zod = require_rolldown_runtime.__toESM(require("zod"));
6
-
7
- //#region src/graph/zod/plugin.ts
8
- const metaSymbol = Symbol.for("langgraph-zod");
9
- if (!(metaSymbol in globalThis)) globalThis[metaSymbol] = /* @__PURE__ */ new WeakSet();
10
- function applyPluginPrototype(prototype) {
11
- const cache = globalThis[metaSymbol];
12
- if (cache.has(prototype)) return;
13
- Object.defineProperty(prototype, "langgraph", { get() {
14
- const zodThis = this;
15
- return {
16
- metadata(jsonSchemaExtra) {
17
- return require_meta.withLangGraph(zodThis, { jsonSchemaExtra });
18
- },
19
- reducer(fn, schema) {
20
- const defaultFn = (0, __langchain_core_utils_types.getInteropZodDefaultGetter)(zodThis);
21
- return require_meta.withLangGraph(zodThis, {
22
- default: defaultFn,
23
- reducer: {
24
- schema,
25
- fn
26
- }
27
- });
28
- }
29
- };
30
- } });
31
- cache.add(prototype);
32
- }
33
- try {
34
- applyPluginPrototype(zod_v3.z.ZodType.prototype);
35
- applyPluginPrototype(zod.z.ZodType.prototype);
36
- } catch (error) {
37
- throw new Error("Failed to extend Zod with LangGraph-related methods. This is most likely a bug, consider opening an issue and/or using `withLangGraph` to augment your Zod schema.", { cause: error });
38
- }
39
-
40
- //#endregion
41
- //# sourceMappingURL=plugin.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.cjs","names":["withLangGraph","z3","zd"],"sources":["../../../src/graph/zod/plugin.ts"],"sourcesContent":["import { z as zd } from \"zod\";\nimport { z as z3 } from \"zod/v3\";\nimport { getInteropZodDefaultGetter } from \"@langchain/core/utils/types\";\nimport { SchemaMeta, withLangGraph } from \"./meta.js\";\n\nconst metaSymbol = Symbol.for(\"langgraph-zod\");\n\ninterface ZodLangGraphTypes<T extends zd.ZodTypeAny, Output> {\n reducer<Input = zd.output<T>>(\n transform: (a: Output, arg: Input) => Output,\n options?: zd.ZodType<Input>\n ): zd.ZodType<Output, zd.ZodEffectsDef<T>, Input>;\n\n metadata(payload: {\n langgraph_nodes?: string[];\n langgraph_type?: \"prompt\";\n\n [key: string]: unknown;\n }): T;\n}\n\ndeclare module \"zod\" {\n interface ZodType<Output> {\n /**\n * @deprecated Using the langgraph zod plugin is deprecated and will be removed in future versions\n * Consider upgrading to zod 4 and using the exported langgraph meta registry. {@link langgraphRegistry}\n */\n langgraph: ZodLangGraphTypes<this, Output>;\n }\n}\n\ndeclare module \"zod/v3\" {\n interface ZodType<Output> {\n /**\n * @deprecated Using the langgraph zod plugin is deprecated and will be removed in future versions\n * Consider upgrading to zod 4 and using the exported langgraph meta registry. {@link langgraphRegistry}\n */\n langgraph: ZodLangGraphTypes<this, Output>;\n }\n}\n\ninterface PluginGlobalType {\n [metaSymbol]?: WeakSet<object>;\n}\n\nif (!(metaSymbol in globalThis)) {\n (globalThis as PluginGlobalType)[metaSymbol] = new WeakSet();\n}\n\nfunction applyPluginPrototype<\n PrototypeToExtend extends\n | typeof zd.ZodType.prototype\n | typeof z3.ZodType.prototype\n>(prototype: PrototypeToExtend) {\n const cache = (globalThis as PluginGlobalType)[metaSymbol]!;\n if (cache.has(prototype)) {\n return; // Already applied\n }\n\n Object.defineProperty(\n prototype,\n \"langgraph\" satisfies keyof PrototypeToExtend,\n {\n get(): zd.ZodType[\"langgraph\"] {\n // Return type is any, actual type provided by module augmentation\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const zodThis = this as zd.ZodTypeAny;\n type Output = zd.infer<typeof zodThis>;\n\n return {\n metadata(\n jsonSchemaExtra: SchemaMeta<Output, Output>[\"jsonSchemaExtra\"]\n ) {\n return withLangGraph(zodThis, { jsonSchemaExtra });\n },\n reducer<Input>(\n fn: (a: Output, arg: Input) => Output,\n schema?: zd.ZodType<Input>\n ) {\n const defaultFn = getInteropZodDefaultGetter(zodThis);\n return withLangGraph(zodThis, {\n default: defaultFn,\n reducer: { schema, fn },\n });\n },\n };\n },\n }\n );\n cache.add(prototype);\n}\n\ntry {\n applyPluginPrototype(z3.ZodType.prototype);\n applyPluginPrototype(zd.ZodType.prototype);\n} catch (error) {\n throw new Error(\n \"Failed to extend Zod with LangGraph-related methods. This is most likely a bug, consider opening an issue and/or using `withLangGraph` to augment your Zod schema.\",\n { cause: error }\n );\n}\n"],"mappings":";;;;;;;AAKA,MAAM,aAAa,OAAO,IAAI;AAwC9B,IAAI,EAAE,cAAc,YAClB,CAAC,WAAgC,8BAAc,IAAI;AAGrD,SAAS,qBAIP,WAA8B;CAC9B,MAAM,QAAS,WAAgC;AAC/C,KAAI,MAAM,IAAI,WACZ;AAGF,QAAO,eACL,WACA,aACA,EACE,MAA+B;EAG7B,MAAM,UAAU;AAGhB,SAAO;GACL,SACE,iBACA;AACA,WAAOA,2BAAc,SAAS,EAAE;;GAElC,QACE,IACA,QACA;IACA,MAAM,yEAAuC;AAC7C,WAAOA,2BAAc,SAAS;KAC5B,SAAS;KACT,SAAS;MAAE;MAAQ;;;;;;AAO/B,OAAM,IAAI;;AAGZ,IAAI;AACF,sBAAqBC,SAAG,QAAQ;AAChC,sBAAqBC,MAAG,QAAQ;SACzB,OAAO;AACd,OAAM,IAAI,MACR,sKACA,EAAE,OAAO"}
@@ -1,41 +0,0 @@
1
- import { withLangGraph } from "./meta.js";
2
- import { getInteropZodDefaultGetter } from "@langchain/core/utils/types";
3
- import { z } from "zod/v3";
4
- import { z as z$1 } from "zod";
5
-
6
- //#region src/graph/zod/plugin.ts
7
- const metaSymbol = Symbol.for("langgraph-zod");
8
- if (!(metaSymbol in globalThis)) globalThis[metaSymbol] = /* @__PURE__ */ new WeakSet();
9
- function applyPluginPrototype(prototype) {
10
- const cache = globalThis[metaSymbol];
11
- if (cache.has(prototype)) return;
12
- Object.defineProperty(prototype, "langgraph", { get() {
13
- const zodThis = this;
14
- return {
15
- metadata(jsonSchemaExtra) {
16
- return withLangGraph(zodThis, { jsonSchemaExtra });
17
- },
18
- reducer(fn, schema) {
19
- const defaultFn = getInteropZodDefaultGetter(zodThis);
20
- return withLangGraph(zodThis, {
21
- default: defaultFn,
22
- reducer: {
23
- schema,
24
- fn
25
- }
26
- });
27
- }
28
- };
29
- } });
30
- cache.add(prototype);
31
- }
32
- try {
33
- applyPluginPrototype(z.ZodType.prototype);
34
- applyPluginPrototype(z$1.ZodType.prototype);
35
- } catch (error) {
36
- throw new Error("Failed to extend Zod with LangGraph-related methods. This is most likely a bug, consider opening an issue and/or using `withLangGraph` to augment your Zod schema.", { cause: error });
37
- }
38
-
39
- //#endregion
40
- export { };
41
- //# sourceMappingURL=plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.js","names":["z3","zd"],"sources":["../../../src/graph/zod/plugin.ts"],"sourcesContent":["import { z as zd } from \"zod\";\nimport { z as z3 } from \"zod/v3\";\nimport { getInteropZodDefaultGetter } from \"@langchain/core/utils/types\";\nimport { SchemaMeta, withLangGraph } from \"./meta.js\";\n\nconst metaSymbol = Symbol.for(\"langgraph-zod\");\n\ninterface ZodLangGraphTypes<T extends zd.ZodTypeAny, Output> {\n reducer<Input = zd.output<T>>(\n transform: (a: Output, arg: Input) => Output,\n options?: zd.ZodType<Input>\n ): zd.ZodType<Output, zd.ZodEffectsDef<T>, Input>;\n\n metadata(payload: {\n langgraph_nodes?: string[];\n langgraph_type?: \"prompt\";\n\n [key: string]: unknown;\n }): T;\n}\n\ndeclare module \"zod\" {\n interface ZodType<Output> {\n /**\n * @deprecated Using the langgraph zod plugin is deprecated and will be removed in future versions\n * Consider upgrading to zod 4 and using the exported langgraph meta registry. {@link langgraphRegistry}\n */\n langgraph: ZodLangGraphTypes<this, Output>;\n }\n}\n\ndeclare module \"zod/v3\" {\n interface ZodType<Output> {\n /**\n * @deprecated Using the langgraph zod plugin is deprecated and will be removed in future versions\n * Consider upgrading to zod 4 and using the exported langgraph meta registry. {@link langgraphRegistry}\n */\n langgraph: ZodLangGraphTypes<this, Output>;\n }\n}\n\ninterface PluginGlobalType {\n [metaSymbol]?: WeakSet<object>;\n}\n\nif (!(metaSymbol in globalThis)) {\n (globalThis as PluginGlobalType)[metaSymbol] = new WeakSet();\n}\n\nfunction applyPluginPrototype<\n PrototypeToExtend extends\n | typeof zd.ZodType.prototype\n | typeof z3.ZodType.prototype\n>(prototype: PrototypeToExtend) {\n const cache = (globalThis as PluginGlobalType)[metaSymbol]!;\n if (cache.has(prototype)) {\n return; // Already applied\n }\n\n Object.defineProperty(\n prototype,\n \"langgraph\" satisfies keyof PrototypeToExtend,\n {\n get(): zd.ZodType[\"langgraph\"] {\n // Return type is any, actual type provided by module augmentation\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const zodThis = this as zd.ZodTypeAny;\n type Output = zd.infer<typeof zodThis>;\n\n return {\n metadata(\n jsonSchemaExtra: SchemaMeta<Output, Output>[\"jsonSchemaExtra\"]\n ) {\n return withLangGraph(zodThis, { jsonSchemaExtra });\n },\n reducer<Input>(\n fn: (a: Output, arg: Input) => Output,\n schema?: zd.ZodType<Input>\n ) {\n const defaultFn = getInteropZodDefaultGetter(zodThis);\n return withLangGraph(zodThis, {\n default: defaultFn,\n reducer: { schema, fn },\n });\n },\n };\n },\n }\n );\n cache.add(prototype);\n}\n\ntry {\n applyPluginPrototype(z3.ZodType.prototype);\n applyPluginPrototype(zd.ZodType.prototype);\n} catch (error) {\n throw new Error(\n \"Failed to extend Zod with LangGraph-related methods. This is most likely a bug, consider opening an issue and/or using `withLangGraph` to augment your Zod schema.\",\n { cause: error }\n );\n}\n"],"mappings":";;;;;;AAKA,MAAM,aAAa,OAAO,IAAI;AAwC9B,IAAI,EAAE,cAAc,YAClB,CAAC,WAAgC,8BAAc,IAAI;AAGrD,SAAS,qBAIP,WAA8B;CAC9B,MAAM,QAAS,WAAgC;AAC/C,KAAI,MAAM,IAAI,WACZ;AAGF,QAAO,eACL,WACA,aACA,EACE,MAA+B;EAG7B,MAAM,UAAU;AAGhB,SAAO;GACL,SACE,iBACA;AACA,WAAO,cAAc,SAAS,EAAE;;GAElC,QACE,IACA,QACA;IACA,MAAM,YAAY,2BAA2B;AAC7C,WAAO,cAAc,SAAS;KAC5B,SAAS;KACT,SAAS;MAAE;MAAQ;;;;;;AAO/B,OAAM,IAAI;;AAGZ,IAAI;AACF,sBAAqBA,EAAG,QAAQ;AAChC,sBAAqBC,IAAG,QAAQ;SACzB,OAAO;AACd,OAAM,IAAI,MACR,sKACA,EAAE,OAAO"}
@@ -1,99 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_meta = require('./meta.cjs');
3
- const __langchain_core_utils_json_schema = require_rolldown_runtime.__toESM(require("@langchain/core/utils/json_schema"));
4
-
5
- //#region src/graph/zod/schema.ts
6
- const PartialStateSchema = Symbol.for("langgraph.state.partial");
7
- function isGraphWithZodLike(graph) {
8
- if (!graph || typeof graph !== "object") return false;
9
- if (!("builder" in graph) || typeof graph.builder !== "object" || graph.builder == null) return false;
10
- return true;
11
- }
12
- function applyJsonSchemaExtrasFromDescription(schema) {
13
- if (Array.isArray(schema)) return schema.map(applyJsonSchemaExtrasFromDescription);
14
- if (typeof schema === "object" && schema != null) {
15
- const output = Object.fromEntries(Object.entries(schema).map(([key, value]) => [key, applyJsonSchemaExtrasFromDescription(value)]));
16
- if ("description" in output && typeof output.description === "string" && output.description.startsWith(require_meta.META_EXTRAS_DESCRIPTION_PREFIX)) {
17
- const strMeta = output.description.slice(require_meta.META_EXTRAS_DESCRIPTION_PREFIX.length);
18
- delete output.description;
19
- Object.assign(output, JSON.parse(strMeta));
20
- }
21
- return output;
22
- }
23
- return schema;
24
- }
25
- function toJsonSchema(schema) {
26
- return applyJsonSchemaExtrasFromDescription((0, __langchain_core_utils_json_schema.toJsonSchema)(schema));
27
- }
28
- /**
29
- * Get the state schema for a graph.
30
- * @param graph - The graph to get the state schema for.
31
- * @returns The state schema for the graph.
32
- */
33
- function getStateTypeSchema(graph, registry = require_meta.schemaMetaRegistry) {
34
- if (!isGraphWithZodLike(graph)) return void 0;
35
- const schemaDef = graph.builder._schemaRuntimeDefinition;
36
- if (!schemaDef) return void 0;
37
- return toJsonSchema(registry.getExtendedChannelSchemas(schemaDef, { withJsonSchemaExtrasAsDescription: true }));
38
- }
39
- /**
40
- * Get the update schema for a graph.
41
- * @param graph - The graph to get the update schema for.
42
- * @returns The update schema for the graph.
43
- */
44
- function getUpdateTypeSchema(graph, registry = require_meta.schemaMetaRegistry) {
45
- if (!isGraphWithZodLike(graph)) return void 0;
46
- const schemaDef = graph.builder._schemaRuntimeDefinition;
47
- if (!schemaDef) return void 0;
48
- return toJsonSchema(registry.getExtendedChannelSchemas(schemaDef, {
49
- withReducerSchema: true,
50
- withJsonSchemaExtrasAsDescription: true,
51
- asPartial: true
52
- }));
53
- }
54
- /**
55
- * Get the input schema for a graph.
56
- * @param graph - The graph to get the input schema for.
57
- * @returns The input schema for the graph.
58
- */
59
- function getInputTypeSchema(graph, registry = require_meta.schemaMetaRegistry) {
60
- if (!isGraphWithZodLike(graph)) return void 0;
61
- let schemaDef = graph.builder._inputRuntimeDefinition;
62
- if (schemaDef === PartialStateSchema) schemaDef = graph.builder._schemaRuntimeDefinition;
63
- if (!schemaDef) return void 0;
64
- return toJsonSchema(registry.getExtendedChannelSchemas(schemaDef, {
65
- withReducerSchema: true,
66
- withJsonSchemaExtrasAsDescription: true,
67
- asPartial: true
68
- }));
69
- }
70
- /**
71
- * Get the output schema for a graph.
72
- * @param graph - The graph to get the output schema for.
73
- * @returns The output schema for the graph.
74
- */
75
- function getOutputTypeSchema(graph, registry = require_meta.schemaMetaRegistry) {
76
- if (!isGraphWithZodLike(graph)) return void 0;
77
- const schemaDef = graph.builder._outputRuntimeDefinition;
78
- if (!schemaDef) return void 0;
79
- return toJsonSchema(registry.getExtendedChannelSchemas(schemaDef, { withJsonSchemaExtrasAsDescription: true }));
80
- }
81
- /**
82
- * Get the config schema for a graph.
83
- * @param graph - The graph to get the config schema for.
84
- * @returns The config schema for the graph.
85
- */
86
- function getConfigTypeSchema(graph, registry = require_meta.schemaMetaRegistry) {
87
- if (!isGraphWithZodLike(graph)) return void 0;
88
- const configDef = graph.builder._configRuntimeSchema;
89
- if (!configDef) return void 0;
90
- return toJsonSchema(registry.getExtendedChannelSchemas(configDef, { withJsonSchemaExtrasAsDescription: true }));
91
- }
92
-
93
- //#endregion
94
- exports.getConfigTypeSchema = getConfigTypeSchema;
95
- exports.getInputTypeSchema = getInputTypeSchema;
96
- exports.getOutputTypeSchema = getOutputTypeSchema;
97
- exports.getStateTypeSchema = getStateTypeSchema;
98
- exports.getUpdateTypeSchema = getUpdateTypeSchema;
99
- //# sourceMappingURL=schema.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.cjs","names":["META_EXTRAS_DESCRIPTION_PREFIX","schemaMetaRegistry"],"sources":["../../../src/graph/zod/schema.ts"],"sourcesContent":["import {\n type JSONSchema,\n toJsonSchema as interopToJsonSchema,\n} from \"@langchain/core/utils/json_schema\";\nimport { InteropZodObject } from \"@langchain/core/utils/types\";\nimport {\n META_EXTRAS_DESCRIPTION_PREFIX,\n SchemaMetaRegistry,\n schemaMetaRegistry,\n} from \"./meta.js\";\n\nconst PartialStateSchema = Symbol.for(\"langgraph.state.partial\");\ntype PartialStateSchema = typeof PartialStateSchema;\n\ninterface GraphWithZodLike {\n builder: {\n _schemaRuntimeDefinition: InteropZodObject | undefined;\n _inputRuntimeDefinition: InteropZodObject | PartialStateSchema | undefined;\n _outputRuntimeDefinition: InteropZodObject | undefined;\n _configRuntimeSchema: InteropZodObject | undefined;\n };\n}\n\nfunction isGraphWithZodLike(graph: unknown): graph is GraphWithZodLike {\n if (!graph || typeof graph !== \"object\") return false;\n if (\n !(\"builder\" in graph) ||\n typeof graph.builder !== \"object\" ||\n graph.builder == null\n ) {\n return false;\n }\n return true;\n}\n\nfunction applyJsonSchemaExtrasFromDescription<T>(schema: T): unknown {\n if (Array.isArray(schema)) {\n return schema.map(applyJsonSchemaExtrasFromDescription);\n }\n if (typeof schema === \"object\" && schema != null) {\n const output = Object.fromEntries(\n Object.entries(schema).map(([key, value]) => [\n key,\n applyJsonSchemaExtrasFromDescription(value),\n ])\n );\n\n if (\n \"description\" in output &&\n typeof output.description === \"string\" &&\n output.description.startsWith(META_EXTRAS_DESCRIPTION_PREFIX)\n ) {\n const strMeta = output.description.slice(\n META_EXTRAS_DESCRIPTION_PREFIX.length\n );\n delete output.description;\n Object.assign(output, JSON.parse(strMeta));\n }\n\n return output as T;\n }\n return schema;\n}\n\nfunction toJsonSchema(schema: InteropZodObject): JSONSchema {\n return applyJsonSchemaExtrasFromDescription(\n interopToJsonSchema(schema)\n ) as JSONSchema;\n}\n\n/**\n * Get the state schema for a graph.\n * @param graph - The graph to get the state schema for.\n * @returns The state schema for the graph.\n */\nexport function getStateTypeSchema(\n graph: unknown,\n registry: SchemaMetaRegistry = schemaMetaRegistry\n): JSONSchema | undefined {\n if (!isGraphWithZodLike(graph)) return undefined;\n const schemaDef = graph.builder._schemaRuntimeDefinition;\n if (!schemaDef) return undefined;\n\n return toJsonSchema(\n registry.getExtendedChannelSchemas(schemaDef, {\n withJsonSchemaExtrasAsDescription: true,\n })\n );\n}\n\n/**\n * Get the update schema for a graph.\n * @param graph - The graph to get the update schema for.\n * @returns The update schema for the graph.\n */\nexport function getUpdateTypeSchema(\n graph: unknown,\n registry: SchemaMetaRegistry = schemaMetaRegistry\n): JSONSchema | undefined {\n if (!isGraphWithZodLike(graph)) return undefined;\n const schemaDef = graph.builder._schemaRuntimeDefinition;\n if (!schemaDef) return undefined;\n\n return toJsonSchema(\n registry.getExtendedChannelSchemas(schemaDef, {\n withReducerSchema: true,\n withJsonSchemaExtrasAsDescription: true,\n asPartial: true,\n })\n );\n}\n\n/**\n * Get the input schema for a graph.\n * @param graph - The graph to get the input schema for.\n * @returns The input schema for the graph.\n */\nexport function getInputTypeSchema(\n graph: unknown,\n registry: SchemaMetaRegistry = schemaMetaRegistry\n): JSONSchema | undefined {\n if (!isGraphWithZodLike(graph)) return undefined;\n let schemaDef = graph.builder._inputRuntimeDefinition;\n if (schemaDef === PartialStateSchema) {\n // No need to pass `.partial()` here, that's being done by `applyPlugin`\n schemaDef = graph.builder._schemaRuntimeDefinition;\n }\n if (!schemaDef) return undefined;\n\n return toJsonSchema(\n registry.getExtendedChannelSchemas(schemaDef, {\n withReducerSchema: true,\n withJsonSchemaExtrasAsDescription: true,\n asPartial: true,\n })\n );\n}\n\n/**\n * Get the output schema for a graph.\n * @param graph - The graph to get the output schema for.\n * @returns The output schema for the graph.\n */\nexport function getOutputTypeSchema(\n graph: unknown,\n registry: SchemaMetaRegistry = schemaMetaRegistry\n): JSONSchema | undefined {\n if (!isGraphWithZodLike(graph)) return undefined;\n const schemaDef = graph.builder._outputRuntimeDefinition;\n if (!schemaDef) return undefined;\n\n return toJsonSchema(\n registry.getExtendedChannelSchemas(schemaDef, {\n withJsonSchemaExtrasAsDescription: true,\n })\n );\n}\n\n/**\n * Get the config schema for a graph.\n * @param graph - The graph to get the config schema for.\n * @returns The config schema for the graph.\n */\nexport function getConfigTypeSchema(\n graph: unknown,\n registry: SchemaMetaRegistry = schemaMetaRegistry\n): JSONSchema | undefined {\n if (!isGraphWithZodLike(graph)) return undefined;\n const configDef = graph.builder._configRuntimeSchema;\n if (!configDef) return undefined;\n\n return toJsonSchema(\n registry.getExtendedChannelSchemas(configDef, {\n withJsonSchemaExtrasAsDescription: true,\n })\n );\n}\n"],"mappings":";;;;;AAWA,MAAM,qBAAqB,OAAO,IAAI;AAYtC,SAAS,mBAAmB,OAA2C;AACrE,KAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO;AAChD,KACE,EAAE,aAAa,UACf,OAAO,MAAM,YAAY,YACzB,MAAM,WAAW,KAEjB,QAAO;AAET,QAAO;;AAGT,SAAS,qCAAwC,QAAoB;AACnE,KAAI,MAAM,QAAQ,QAChB,QAAO,OAAO,IAAI;AAEpB,KAAI,OAAO,WAAW,YAAY,UAAU,MAAM;EAChD,MAAM,SAAS,OAAO,YACpB,OAAO,QAAQ,QAAQ,KAAK,CAAC,KAAK,WAAW,CAC3C,KACA,qCAAqC;AAIzC,MACE,iBAAiB,UACjB,OAAO,OAAO,gBAAgB,YAC9B,OAAO,YAAY,WAAWA,8CAC9B;GACA,MAAM,UAAU,OAAO,YAAY,MACjCA,4CAA+B;AAEjC,UAAO,OAAO;AACd,UAAO,OAAO,QAAQ,KAAK,MAAM;;AAGnC,SAAO;;AAET,QAAO;;AAGT,SAAS,aAAa,QAAsC;AAC1D,QAAO,0FACe;;;;;;;AASxB,SAAgB,mBACd,OACA,WAA+BC,iCACP;AACxB,KAAI,CAAC,mBAAmB,OAAQ,QAAO;CACvC,MAAM,YAAY,MAAM,QAAQ;AAChC,KAAI,CAAC,UAAW,QAAO;AAEvB,QAAO,aACL,SAAS,0BAA0B,WAAW,EAC5C,mCAAmC;;;;;;;AAUzC,SAAgB,oBACd,OACA,WAA+BA,iCACP;AACxB,KAAI,CAAC,mBAAmB,OAAQ,QAAO;CACvC,MAAM,YAAY,MAAM,QAAQ;AAChC,KAAI,CAAC,UAAW,QAAO;AAEvB,QAAO,aACL,SAAS,0BAA0B,WAAW;EAC5C,mBAAmB;EACnB,mCAAmC;EACnC,WAAW;;;;;;;;AAUjB,SAAgB,mBACd,OACA,WAA+BA,iCACP;AACxB,KAAI,CAAC,mBAAmB,OAAQ,QAAO;CACvC,IAAI,YAAY,MAAM,QAAQ;AAC9B,KAAI,cAAc,mBAEhB,aAAY,MAAM,QAAQ;AAE5B,KAAI,CAAC,UAAW,QAAO;AAEvB,QAAO,aACL,SAAS,0BAA0B,WAAW;EAC5C,mBAAmB;EACnB,mCAAmC;EACnC,WAAW;;;;;;;;AAUjB,SAAgB,oBACd,OACA,WAA+BA,iCACP;AACxB,KAAI,CAAC,mBAAmB,OAAQ,QAAO;CACvC,MAAM,YAAY,MAAM,QAAQ;AAChC,KAAI,CAAC,UAAW,QAAO;AAEvB,QAAO,aACL,SAAS,0BAA0B,WAAW,EAC5C,mCAAmC;;;;;;;AAUzC,SAAgB,oBACd,OACA,WAA+BA,iCACP;AACxB,KAAI,CAAC,mBAAmB,OAAQ,QAAO;CACvC,MAAM,YAAY,MAAM,QAAQ;AAChC,KAAI,CAAC,UAAW,QAAO;AAEvB,QAAO,aACL,SAAS,0BAA0B,WAAW,EAC5C,mCAAmC"}
@@ -1,38 +0,0 @@
1
- import { SchemaMetaRegistry } from "./meta.cjs";
2
- import { JSONSchema } from "@langchain/core/utils/json_schema";
3
-
4
- //#region src/graph/zod/schema.d.ts
5
-
6
- /**
7
- * Get the state schema for a graph.
8
- * @param graph - The graph to get the state schema for.
9
- * @returns The state schema for the graph.
10
- */
11
- declare function getStateTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;
12
- /**
13
- * Get the update schema for a graph.
14
- * @param graph - The graph to get the update schema for.
15
- * @returns The update schema for the graph.
16
- */
17
- declare function getUpdateTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;
18
- /**
19
- * Get the input schema for a graph.
20
- * @param graph - The graph to get the input schema for.
21
- * @returns The input schema for the graph.
22
- */
23
- declare function getInputTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;
24
- /**
25
- * Get the output schema for a graph.
26
- * @param graph - The graph to get the output schema for.
27
- * @returns The output schema for the graph.
28
- */
29
- declare function getOutputTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;
30
- /**
31
- * Get the config schema for a graph.
32
- * @param graph - The graph to get the config schema for.
33
- * @returns The config schema for the graph.
34
- */
35
- declare function getConfigTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;
36
- //#endregion
37
- export { getConfigTypeSchema, getInputTypeSchema, getOutputTypeSchema, getStateTypeSchema, getUpdateTypeSchema };
38
- //# sourceMappingURL=schema.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.cts","names":["JSONSchema","SchemaMetaRegistry","getStateTypeSchema","getUpdateTypeSchema","getInputTypeSchema","getOutputTypeSchema","getConfigTypeSchema"],"sources":["../../../src/graph/zod/schema.d.ts"],"sourcesContent":["import { type JSONSchema } from \"@langchain/core/utils/json_schema\";\nimport { SchemaMetaRegistry } from \"./meta.js\";\n/**\n * Get the state schema for a graph.\n * @param graph - The graph to get the state schema for.\n * @returns The state schema for the graph.\n */\nexport declare function getStateTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;\n/**\n * Get the update schema for a graph.\n * @param graph - The graph to get the update schema for.\n * @returns The update schema for the graph.\n */\nexport declare function getUpdateTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;\n/**\n * Get the input schema for a graph.\n * @param graph - The graph to get the input schema for.\n * @returns The input schema for the graph.\n */\nexport declare function getInputTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;\n/**\n * Get the output schema for a graph.\n * @param graph - The graph to get the output schema for.\n * @returns The output schema for the graph.\n */\nexport declare function getOutputTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;\n/**\n * Get the config schema for a graph.\n * @param graph - The graph to get the config schema for.\n * @returns The config schema for the graph.\n */\nexport declare function getConfigTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;\n"],"mappings":";;;;;;;AAOA;;;AAA2FA,iBAAnEE,kBAAAA,CAAmEF,KAAAA,EAAAA,OAAAA,EAAAA,QAAAA,CAAAA,EAArBC,kBAAqBD,CAAAA,EAAAA,UAAAA,GAAAA,SAAAA;;AAM3F;;;;iBAAwBG,mBAAAA,4BAA+CF,qBAAqBD;AAM5F;;;;;AAMwBK,iBANAD,kBAAAA,CAMmB,KAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAN2BH,kBAM3B,CAAA,EANgDD,UAMhD,GAAA,SAAA;;;;;AAM3C;AAA2C,iBANnBK,mBAAAA,CAMmB,KAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAN4BJ,kBAM5B,CAAA,EANiDD,UAMjD,GAAA,SAAA;;;;;;iBAAnBM,mBAAAA,4BAA+CL,qBAAqBD"}
@@ -1,38 +0,0 @@
1
- import { SchemaMetaRegistry } from "./meta.js";
2
- import { JSONSchema } from "@langchain/core/utils/json_schema";
3
-
4
- //#region src/graph/zod/schema.d.ts
5
-
6
- /**
7
- * Get the state schema for a graph.
8
- * @param graph - The graph to get the state schema for.
9
- * @returns The state schema for the graph.
10
- */
11
- declare function getStateTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;
12
- /**
13
- * Get the update schema for a graph.
14
- * @param graph - The graph to get the update schema for.
15
- * @returns The update schema for the graph.
16
- */
17
- declare function getUpdateTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;
18
- /**
19
- * Get the input schema for a graph.
20
- * @param graph - The graph to get the input schema for.
21
- * @returns The input schema for the graph.
22
- */
23
- declare function getInputTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;
24
- /**
25
- * Get the output schema for a graph.
26
- * @param graph - The graph to get the output schema for.
27
- * @returns The output schema for the graph.
28
- */
29
- declare function getOutputTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;
30
- /**
31
- * Get the config schema for a graph.
32
- * @param graph - The graph to get the config schema for.
33
- * @returns The config schema for the graph.
34
- */
35
- declare function getConfigTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;
36
- //#endregion
37
- export { getConfigTypeSchema, getInputTypeSchema, getOutputTypeSchema, getStateTypeSchema, getUpdateTypeSchema };
38
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","names":["JSONSchema","SchemaMetaRegistry","getStateTypeSchema","getUpdateTypeSchema","getInputTypeSchema","getOutputTypeSchema","getConfigTypeSchema"],"sources":["../../../src/graph/zod/schema.d.ts"],"sourcesContent":["import { type JSONSchema } from \"@langchain/core/utils/json_schema\";\nimport { SchemaMetaRegistry } from \"./meta.js\";\n/**\n * Get the state schema for a graph.\n * @param graph - The graph to get the state schema for.\n * @returns The state schema for the graph.\n */\nexport declare function getStateTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;\n/**\n * Get the update schema for a graph.\n * @param graph - The graph to get the update schema for.\n * @returns The update schema for the graph.\n */\nexport declare function getUpdateTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;\n/**\n * Get the input schema for a graph.\n * @param graph - The graph to get the input schema for.\n * @returns The input schema for the graph.\n */\nexport declare function getInputTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;\n/**\n * Get the output schema for a graph.\n * @param graph - The graph to get the output schema for.\n * @returns The output schema for the graph.\n */\nexport declare function getOutputTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;\n/**\n * Get the config schema for a graph.\n * @param graph - The graph to get the config schema for.\n * @returns The config schema for the graph.\n */\nexport declare function getConfigTypeSchema(graph: unknown, registry?: SchemaMetaRegistry): JSONSchema | undefined;\n"],"mappings":";;;;;;;AAOA;;;AAA2FA,iBAAnEE,kBAAAA,CAAmEF,KAAAA,EAAAA,OAAAA,EAAAA,QAAAA,CAAAA,EAArBC,kBAAqBD,CAAAA,EAAAA,UAAAA,GAAAA,SAAAA;;AAM3F;;;;iBAAwBG,mBAAAA,4BAA+CF,qBAAqBD;AAM5F;;;;;AAMwBK,iBANAD,kBAAAA,CAMmB,KAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAN2BH,kBAM3B,CAAA,EANgDD,UAMhD,GAAA,SAAA;;;;;AAM3C;AAA2C,iBANnBK,mBAAAA,CAMmB,KAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAN4BJ,kBAM5B,CAAA,EANiDD,UAMjD,GAAA,SAAA;;;;;;iBAAnBM,mBAAAA,4BAA+CL,qBAAqBD"}
@@ -1,94 +0,0 @@
1
- import { META_EXTRAS_DESCRIPTION_PREFIX, schemaMetaRegistry } from "./meta.js";
2
- import { toJsonSchema } from "@langchain/core/utils/json_schema";
3
-
4
- //#region src/graph/zod/schema.ts
5
- const PartialStateSchema = Symbol.for("langgraph.state.partial");
6
- function isGraphWithZodLike(graph) {
7
- if (!graph || typeof graph !== "object") return false;
8
- if (!("builder" in graph) || typeof graph.builder !== "object" || graph.builder == null) return false;
9
- return true;
10
- }
11
- function applyJsonSchemaExtrasFromDescription(schema) {
12
- if (Array.isArray(schema)) return schema.map(applyJsonSchemaExtrasFromDescription);
13
- if (typeof schema === "object" && schema != null) {
14
- const output = Object.fromEntries(Object.entries(schema).map(([key, value]) => [key, applyJsonSchemaExtrasFromDescription(value)]));
15
- if ("description" in output && typeof output.description === "string" && output.description.startsWith(META_EXTRAS_DESCRIPTION_PREFIX)) {
16
- const strMeta = output.description.slice(META_EXTRAS_DESCRIPTION_PREFIX.length);
17
- delete output.description;
18
- Object.assign(output, JSON.parse(strMeta));
19
- }
20
- return output;
21
- }
22
- return schema;
23
- }
24
- function toJsonSchema$1(schema) {
25
- return applyJsonSchemaExtrasFromDescription(toJsonSchema(schema));
26
- }
27
- /**
28
- * Get the state schema for a graph.
29
- * @param graph - The graph to get the state schema for.
30
- * @returns The state schema for the graph.
31
- */
32
- function getStateTypeSchema(graph, registry = schemaMetaRegistry) {
33
- if (!isGraphWithZodLike(graph)) return void 0;
34
- const schemaDef = graph.builder._schemaRuntimeDefinition;
35
- if (!schemaDef) return void 0;
36
- return toJsonSchema$1(registry.getExtendedChannelSchemas(schemaDef, { withJsonSchemaExtrasAsDescription: true }));
37
- }
38
- /**
39
- * Get the update schema for a graph.
40
- * @param graph - The graph to get the update schema for.
41
- * @returns The update schema for the graph.
42
- */
43
- function getUpdateTypeSchema(graph, registry = schemaMetaRegistry) {
44
- if (!isGraphWithZodLike(graph)) return void 0;
45
- const schemaDef = graph.builder._schemaRuntimeDefinition;
46
- if (!schemaDef) return void 0;
47
- return toJsonSchema$1(registry.getExtendedChannelSchemas(schemaDef, {
48
- withReducerSchema: true,
49
- withJsonSchemaExtrasAsDescription: true,
50
- asPartial: true
51
- }));
52
- }
53
- /**
54
- * Get the input schema for a graph.
55
- * @param graph - The graph to get the input schema for.
56
- * @returns The input schema for the graph.
57
- */
58
- function getInputTypeSchema(graph, registry = schemaMetaRegistry) {
59
- if (!isGraphWithZodLike(graph)) return void 0;
60
- let schemaDef = graph.builder._inputRuntimeDefinition;
61
- if (schemaDef === PartialStateSchema) schemaDef = graph.builder._schemaRuntimeDefinition;
62
- if (!schemaDef) return void 0;
63
- return toJsonSchema$1(registry.getExtendedChannelSchemas(schemaDef, {
64
- withReducerSchema: true,
65
- withJsonSchemaExtrasAsDescription: true,
66
- asPartial: true
67
- }));
68
- }
69
- /**
70
- * Get the output schema for a graph.
71
- * @param graph - The graph to get the output schema for.
72
- * @returns The output schema for the graph.
73
- */
74
- function getOutputTypeSchema(graph, registry = schemaMetaRegistry) {
75
- if (!isGraphWithZodLike(graph)) return void 0;
76
- const schemaDef = graph.builder._outputRuntimeDefinition;
77
- if (!schemaDef) return void 0;
78
- return toJsonSchema$1(registry.getExtendedChannelSchemas(schemaDef, { withJsonSchemaExtrasAsDescription: true }));
79
- }
80
- /**
81
- * Get the config schema for a graph.
82
- * @param graph - The graph to get the config schema for.
83
- * @returns The config schema for the graph.
84
- */
85
- function getConfigTypeSchema(graph, registry = schemaMetaRegistry) {
86
- if (!isGraphWithZodLike(graph)) return void 0;
87
- const configDef = graph.builder._configRuntimeSchema;
88
- if (!configDef) return void 0;
89
- return toJsonSchema$1(registry.getExtendedChannelSchemas(configDef, { withJsonSchemaExtrasAsDescription: true }));
90
- }
91
-
92
- //#endregion
93
- export { getConfigTypeSchema, getInputTypeSchema, getOutputTypeSchema, getStateTypeSchema, getUpdateTypeSchema };
94
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","names":["toJsonSchema","interopToJsonSchema"],"sources":["../../../src/graph/zod/schema.ts"],"sourcesContent":["import {\n type JSONSchema,\n toJsonSchema as interopToJsonSchema,\n} from \"@langchain/core/utils/json_schema\";\nimport { InteropZodObject } from \"@langchain/core/utils/types\";\nimport {\n META_EXTRAS_DESCRIPTION_PREFIX,\n SchemaMetaRegistry,\n schemaMetaRegistry,\n} from \"./meta.js\";\n\nconst PartialStateSchema = Symbol.for(\"langgraph.state.partial\");\ntype PartialStateSchema = typeof PartialStateSchema;\n\ninterface GraphWithZodLike {\n builder: {\n _schemaRuntimeDefinition: InteropZodObject | undefined;\n _inputRuntimeDefinition: InteropZodObject | PartialStateSchema | undefined;\n _outputRuntimeDefinition: InteropZodObject | undefined;\n _configRuntimeSchema: InteropZodObject | undefined;\n };\n}\n\nfunction isGraphWithZodLike(graph: unknown): graph is GraphWithZodLike {\n if (!graph || typeof graph !== \"object\") return false;\n if (\n !(\"builder\" in graph) ||\n typeof graph.builder !== \"object\" ||\n graph.builder == null\n ) {\n return false;\n }\n return true;\n}\n\nfunction applyJsonSchemaExtrasFromDescription<T>(schema: T): unknown {\n if (Array.isArray(schema)) {\n return schema.map(applyJsonSchemaExtrasFromDescription);\n }\n if (typeof schema === \"object\" && schema != null) {\n const output = Object.fromEntries(\n Object.entries(schema).map(([key, value]) => [\n key,\n applyJsonSchemaExtrasFromDescription(value),\n ])\n );\n\n if (\n \"description\" in output &&\n typeof output.description === \"string\" &&\n output.description.startsWith(META_EXTRAS_DESCRIPTION_PREFIX)\n ) {\n const strMeta = output.description.slice(\n META_EXTRAS_DESCRIPTION_PREFIX.length\n );\n delete output.description;\n Object.assign(output, JSON.parse(strMeta));\n }\n\n return output as T;\n }\n return schema;\n}\n\nfunction toJsonSchema(schema: InteropZodObject): JSONSchema {\n return applyJsonSchemaExtrasFromDescription(\n interopToJsonSchema(schema)\n ) as JSONSchema;\n}\n\n/**\n * Get the state schema for a graph.\n * @param graph - The graph to get the state schema for.\n * @returns The state schema for the graph.\n */\nexport function getStateTypeSchema(\n graph: unknown,\n registry: SchemaMetaRegistry = schemaMetaRegistry\n): JSONSchema | undefined {\n if (!isGraphWithZodLike(graph)) return undefined;\n const schemaDef = graph.builder._schemaRuntimeDefinition;\n if (!schemaDef) return undefined;\n\n return toJsonSchema(\n registry.getExtendedChannelSchemas(schemaDef, {\n withJsonSchemaExtrasAsDescription: true,\n })\n );\n}\n\n/**\n * Get the update schema for a graph.\n * @param graph - The graph to get the update schema for.\n * @returns The update schema for the graph.\n */\nexport function getUpdateTypeSchema(\n graph: unknown,\n registry: SchemaMetaRegistry = schemaMetaRegistry\n): JSONSchema | undefined {\n if (!isGraphWithZodLike(graph)) return undefined;\n const schemaDef = graph.builder._schemaRuntimeDefinition;\n if (!schemaDef) return undefined;\n\n return toJsonSchema(\n registry.getExtendedChannelSchemas(schemaDef, {\n withReducerSchema: true,\n withJsonSchemaExtrasAsDescription: true,\n asPartial: true,\n })\n );\n}\n\n/**\n * Get the input schema for a graph.\n * @param graph - The graph to get the input schema for.\n * @returns The input schema for the graph.\n */\nexport function getInputTypeSchema(\n graph: unknown,\n registry: SchemaMetaRegistry = schemaMetaRegistry\n): JSONSchema | undefined {\n if (!isGraphWithZodLike(graph)) return undefined;\n let schemaDef = graph.builder._inputRuntimeDefinition;\n if (schemaDef === PartialStateSchema) {\n // No need to pass `.partial()` here, that's being done by `applyPlugin`\n schemaDef = graph.builder._schemaRuntimeDefinition;\n }\n if (!schemaDef) return undefined;\n\n return toJsonSchema(\n registry.getExtendedChannelSchemas(schemaDef, {\n withReducerSchema: true,\n withJsonSchemaExtrasAsDescription: true,\n asPartial: true,\n })\n );\n}\n\n/**\n * Get the output schema for a graph.\n * @param graph - The graph to get the output schema for.\n * @returns The output schema for the graph.\n */\nexport function getOutputTypeSchema(\n graph: unknown,\n registry: SchemaMetaRegistry = schemaMetaRegistry\n): JSONSchema | undefined {\n if (!isGraphWithZodLike(graph)) return undefined;\n const schemaDef = graph.builder._outputRuntimeDefinition;\n if (!schemaDef) return undefined;\n\n return toJsonSchema(\n registry.getExtendedChannelSchemas(schemaDef, {\n withJsonSchemaExtrasAsDescription: true,\n })\n );\n}\n\n/**\n * Get the config schema for a graph.\n * @param graph - The graph to get the config schema for.\n * @returns The config schema for the graph.\n */\nexport function getConfigTypeSchema(\n graph: unknown,\n registry: SchemaMetaRegistry = schemaMetaRegistry\n): JSONSchema | undefined {\n if (!isGraphWithZodLike(graph)) return undefined;\n const configDef = graph.builder._configRuntimeSchema;\n if (!configDef) return undefined;\n\n return toJsonSchema(\n registry.getExtendedChannelSchemas(configDef, {\n withJsonSchemaExtrasAsDescription: true,\n })\n );\n}\n"],"mappings":";;;;AAWA,MAAM,qBAAqB,OAAO,IAAI;AAYtC,SAAS,mBAAmB,OAA2C;AACrE,KAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO;AAChD,KACE,EAAE,aAAa,UACf,OAAO,MAAM,YAAY,YACzB,MAAM,WAAW,KAEjB,QAAO;AAET,QAAO;;AAGT,SAAS,qCAAwC,QAAoB;AACnE,KAAI,MAAM,QAAQ,QAChB,QAAO,OAAO,IAAI;AAEpB,KAAI,OAAO,WAAW,YAAY,UAAU,MAAM;EAChD,MAAM,SAAS,OAAO,YACpB,OAAO,QAAQ,QAAQ,KAAK,CAAC,KAAK,WAAW,CAC3C,KACA,qCAAqC;AAIzC,MACE,iBAAiB,UACjB,OAAO,OAAO,gBAAgB,YAC9B,OAAO,YAAY,WAAW,iCAC9B;GACA,MAAM,UAAU,OAAO,YAAY,MACjC,+BAA+B;AAEjC,UAAO,OAAO;AACd,UAAO,OAAO,QAAQ,KAAK,MAAM;;AAGnC,SAAO;;AAET,QAAO;;AAGT,SAASA,eAAa,QAAsC;AAC1D,QAAO,qCACLC,aAAoB;;;;;;;AASxB,SAAgB,mBACd,OACA,WAA+B,oBACP;AACxB,KAAI,CAAC,mBAAmB,OAAQ,QAAO;CACvC,MAAM,YAAY,MAAM,QAAQ;AAChC,KAAI,CAAC,UAAW,QAAO;AAEvB,QAAOD,eACL,SAAS,0BAA0B,WAAW,EAC5C,mCAAmC;;;;;;;AAUzC,SAAgB,oBACd,OACA,WAA+B,oBACP;AACxB,KAAI,CAAC,mBAAmB,OAAQ,QAAO;CACvC,MAAM,YAAY,MAAM,QAAQ;AAChC,KAAI,CAAC,UAAW,QAAO;AAEvB,QAAOA,eACL,SAAS,0BAA0B,WAAW;EAC5C,mBAAmB;EACnB,mCAAmC;EACnC,WAAW;;;;;;;;AAUjB,SAAgB,mBACd,OACA,WAA+B,oBACP;AACxB,KAAI,CAAC,mBAAmB,OAAQ,QAAO;CACvC,IAAI,YAAY,MAAM,QAAQ;AAC9B,KAAI,cAAc,mBAEhB,aAAY,MAAM,QAAQ;AAE5B,KAAI,CAAC,UAAW,QAAO;AAEvB,QAAOA,eACL,SAAS,0BAA0B,WAAW;EAC5C,mBAAmB;EACnB,mCAAmC;EACnC,WAAW;;;;;;;;AAUjB,SAAgB,oBACd,OACA,WAA+B,oBACP;AACxB,KAAI,CAAC,mBAAmB,OAAQ,QAAO;CACvC,MAAM,YAAY,MAAM,QAAQ;AAChC,KAAI,CAAC,UAAW,QAAO;AAEvB,QAAOA,eACL,SAAS,0BAA0B,WAAW,EAC5C,mCAAmC;;;;;;;AAUzC,SAAgB,oBACd,OACA,WAA+B,oBACP;AACxB,KAAI,CAAC,mBAAmB,OAAQ,QAAO;CACvC,MAAM,YAAY,MAAM,QAAQ;AAChC,KAAI,CAAC,UAAW,QAAO;AAEvB,QAAOA,eACL,SAAS,0BAA0B,WAAW,EAC5C,mCAAmC"}
@@ -1,43 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_meta = require('./meta.cjs');
3
- const __langchain_core_utils_types = require_rolldown_runtime.__toESM(require("@langchain/core/utils/types"));
4
- const zod_v4_core = require_rolldown_runtime.__toESM(require("zod/v4/core"));
5
-
6
- //#region src/graph/zod/zod-registry.ts
7
- /**
8
- * A Zod v4-compatible meta registry that extends the base registry.
9
- *
10
- * This registry allows you to associate and retrieve metadata for Zod schemas,
11
- * leveraging the base registry for storage. It is compatible with Zod v4 and
12
- * interoperates with the base registry to ensure consistent metadata management
13
- * across different Zod versions.
14
- *
15
- * @template Meta - The type of metadata associated with each schema.
16
- * @template Schema - The Zod schema type.
17
- */
18
- var LanggraphZodMetaRegistry = class extends zod_v4_core.$ZodRegistry {
19
- /**
20
- * Creates a new LanggraphZodMetaRegistry instance.
21
- *
22
- * @param parent - The base SchemaMetaRegistry to use for metadata storage.
23
- */
24
- constructor(parent) {
25
- super();
26
- this.parent = parent;
27
- this._map = this.parent._map;
28
- }
29
- add(schema, ..._meta) {
30
- const firstMeta = _meta[0];
31
- if (firstMeta && !firstMeta?.default) {
32
- const defaultValueGetter = (0, __langchain_core_utils_types.getInteropZodDefaultGetter)(schema);
33
- if (defaultValueGetter != null) firstMeta.default = defaultValueGetter;
34
- }
35
- return super.add(schema, ..._meta);
36
- }
37
- };
38
- const registry = new LanggraphZodMetaRegistry(require_meta.schemaMetaRegistry);
39
-
40
- //#endregion
41
- exports.LanggraphZodMetaRegistry = LanggraphZodMetaRegistry;
42
- exports.registry = registry;
43
- //# sourceMappingURL=zod-registry.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zod-registry.cjs","names":["$ZodRegistry","parent: SchemaMetaRegistry","schemaMetaRegistry"],"sources":["../../../src/graph/zod/zod-registry.ts"],"sourcesContent":["// @ts-expect-error If zod/v4 is not imported, the module augmentation will fail in build\nimport type { ZodType } from \"zod/v4\"; // eslint-disable-line @typescript-eslint/no-unused-vars\n\n// @ts-expect-error If zod/v4-mini is not imported, the module augmentation will fail in build\nimport type { ZodMiniType } from \"zod/v4-mini\"; // eslint-disable-line @typescript-eslint/no-unused-vars\n\nimport type * as core from \"zod/v4/core\";\nimport { getInteropZodDefaultGetter } from \"@langchain/core/utils/types\";\nimport { $ZodType, $ZodRegistry, $replace } from \"zod/v4/core\";\nimport {\n type ReducedZodChannel,\n type SchemaMeta,\n type SchemaMetaRegistry,\n schemaMetaRegistry,\n} from \"./meta.js\";\n\n/**\n * A Zod v4-compatible meta registry that extends the base registry.\n *\n * This registry allows you to associate and retrieve metadata for Zod schemas,\n * leveraging the base registry for storage. It is compatible with Zod v4 and\n * interoperates with the base registry to ensure consistent metadata management\n * across different Zod versions.\n *\n * @template Meta - The type of metadata associated with each schema.\n * @template Schema - The Zod schema type.\n */\nexport class LanggraphZodMetaRegistry<\n Meta extends SchemaMeta = SchemaMeta,\n Schema extends $ZodType = $ZodType\n> extends $ZodRegistry<Meta & { [key: string]: unknown }, Schema> {\n /**\n * Creates a new LanggraphZodMetaRegistry instance.\n *\n * @param parent - The base SchemaMetaRegistry to use for metadata storage.\n */\n constructor(protected parent: SchemaMetaRegistry) {\n super();\n // Use the parent's map for metadata storage\n this._map = this.parent._map as Map<\n Schema,\n $replace<Meta & { [key: string]: unknown }, Schema>\n >;\n }\n\n add<S extends Schema>(\n schema: S,\n ..._meta: undefined extends Meta & { [key: string]: unknown }\n ? [$replace<Meta & { [key: string]: unknown }, S>?]\n : [$replace<Meta & { [key: string]: unknown }, S>]\n ): this {\n const firstMeta = _meta[0];\n if (firstMeta && !firstMeta?.default) {\n const defaultValueGetter = getInteropZodDefaultGetter(schema);\n if (defaultValueGetter != null) {\n // eslint-disable-next-line no-param-reassign\n firstMeta.default = defaultValueGetter;\n }\n }\n return super.add(schema, ..._meta);\n }\n}\n\n// Augment the zod/v4 module nudging the `register` method\n// to use the user provided input schema if specified.\ndeclare module \"zod/v4\" {\n export interface ZodType<\n out Output = unknown,\n out Input = unknown,\n out Internals extends core.$ZodTypeInternals<\n Output,\n Input\n > = core.$ZodTypeInternals<Output, Input>\n > extends core.$ZodType<Output, Input, Internals> {\n register<\n R extends LanggraphZodMetaRegistry,\n TOutput = core.output<this>,\n TInput = core.input<this>,\n TInternals extends core.$ZodTypeInternals<\n TOutput,\n TInput\n > = core.$ZodTypeInternals<TOutput, TInput>\n >(\n registry: R,\n meta: SchemaMeta<TOutput, TInput>\n ): ReducedZodChannel<this, ZodType<TOutput, TInput, TInternals>>;\n }\n}\n\ndeclare module \"zod/v4-mini\" {\n export interface ZodMiniType<\n out Output = unknown,\n out Input = unknown,\n out Internals extends core.$ZodTypeInternals<\n Output,\n Input\n > = core.$ZodTypeInternals<Output, Input>\n > extends core.$ZodType<Output, Input, Internals> {\n register<\n R extends LanggraphZodMetaRegistry,\n TOutput = core.output<this>,\n TInput = core.input<this>,\n TInternals extends core.$ZodTypeInternals<\n TOutput,\n TInput\n > = core.$ZodTypeInternals<TOutput, TInput>\n >(\n registry: R,\n meta: SchemaMeta<TOutput, TInput>\n ): ReducedZodChannel<this, ZodMiniType<TOutput, TInput, TInternals>>;\n }\n}\n\nexport const registry = new LanggraphZodMetaRegistry(schemaMetaRegistry);\n"],"mappings":";;;;;;;;;;;;;;;;;AA2BA,IAAa,2BAAb,cAGUA,yBAAwD;;;;;;CAMhE,YAAY,AAAUC,QAA4B;AAChD;EADoB;AAGpB,OAAK,OAAO,KAAK,OAAO;;CAM1B,IACE,QACA,GAAG,OAGG;EACN,MAAM,YAAY,MAAM;AACxB,MAAI,aAAa,CAAC,WAAW,SAAS;GACpC,MAAM,kFAAgD;AACtD,OAAI,sBAAsB,KAExB,WAAU,UAAU;;AAGxB,SAAO,MAAM,IAAI,QAAQ,GAAG;;;AAsDhC,MAAa,WAAW,IAAI,yBAAyBC"}
@@ -1,51 +0,0 @@
1
- import { ReducedZodChannel, SchemaMeta, SchemaMetaRegistry } from "./meta.cjs";
2
- import * as core from "zod/v4/core";
3
- import { $ZodRegistry, $ZodType, $replace } from "zod/v4/core";
4
-
5
- //#region src/graph/zod/zod-registry.d.ts
6
-
7
- /**
8
- * A Zod v4-compatible meta registry that extends the base registry.
9
- *
10
- * This registry allows you to associate and retrieve metadata for Zod schemas,
11
- * leveraging the base registry for storage. It is compatible with Zod v4 and
12
- * interoperates with the base registry to ensure consistent metadata management
13
- * across different Zod versions.
14
- *
15
- * @template Meta - The type of metadata associated with each schema.
16
- * @template Schema - The Zod schema type.
17
- */
18
- declare class LanggraphZodMetaRegistry<Meta extends SchemaMeta = SchemaMeta, Schema extends $ZodType = $ZodType> extends $ZodRegistry<Meta & {
19
- [key: string]: unknown;
20
- }, Schema> {
21
- protected parent: SchemaMetaRegistry;
22
- /**
23
- * Creates a new LanggraphZodMetaRegistry instance.
24
- *
25
- * @param parent - The base SchemaMetaRegistry to use for metadata storage.
26
- */
27
- constructor(parent: SchemaMetaRegistry);
28
- add<S extends Schema>(schema: S, ..._meta: undefined extends Meta & {
29
- [key: string]: unknown;
30
- } ? [$replace<Meta & {
31
- [key: string]: unknown;
32
- }, S>?] : [$replace<Meta & {
33
- [key: string]: unknown;
34
- }, S>]): this;
35
- }
36
- // Augment the zod/v4 module nudging the `register` method
37
- // to use the user provided input schema if specified.
38
- declare module "zod/v4" {
39
- interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
40
- register<R extends LanggraphZodMetaRegistry, TOutput = core.output<this>, TInput = core.input<this>, TInternals extends core.$ZodTypeInternals<TOutput, TInput> = core.$ZodTypeInternals<TOutput, TInput>>(registry: R, meta: SchemaMeta<TOutput, TInput>): ReducedZodChannel<this, ZodType<TOutput, TInput, TInternals>>;
41
- }
42
- }
43
- declare module "zod/v4-mini" {
44
- interface ZodMiniType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
45
- register<R extends LanggraphZodMetaRegistry, TOutput = core.output<this>, TInput = core.input<this>, TInternals extends core.$ZodTypeInternals<TOutput, TInput> = core.$ZodTypeInternals<TOutput, TInput>>(registry: R, meta: SchemaMeta<TOutput, TInput>): ReducedZodChannel<this, ZodMiniType<TOutput, TInput, TInternals>>;
46
- }
47
- }
48
- declare const registry: LanggraphZodMetaRegistry<SchemaMeta<any, any>, $ZodType<unknown, unknown, core.$ZodTypeInternals<unknown, unknown>>>;
49
- //#endregion
50
- export { LanggraphZodMetaRegistry, registry };
51
- //# sourceMappingURL=zod-registry.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zod-registry.d.cts","names":["core","$ZodType","$ZodRegistry","$replace","ReducedZodChannel","SchemaMeta","SchemaMetaRegistry","LanggraphZodMetaRegistry","Meta","Schema","S","_1","Output","Input","$ZodTypeInternals","Internals","output","input","TOutput","TInput","R","TInternals","ZodType","sideEffect","_2","ZodMiniType","registry"],"sources":["../../../src/graph/zod/zod-registry.d.ts"],"sourcesContent":["import type * as core from \"zod/v4/core\";\nimport { $ZodType, $ZodRegistry, $replace } from \"zod/v4/core\";\nimport { type ReducedZodChannel, type SchemaMeta, type SchemaMetaRegistry } from \"./meta.js\";\n/**\n * A Zod v4-compatible meta registry that extends the base registry.\n *\n * This registry allows you to associate and retrieve metadata for Zod schemas,\n * leveraging the base registry for storage. It is compatible with Zod v4 and\n * interoperates with the base registry to ensure consistent metadata management\n * across different Zod versions.\n *\n * @template Meta - The type of metadata associated with each schema.\n * @template Schema - The Zod schema type.\n */\nexport declare class LanggraphZodMetaRegistry<Meta extends SchemaMeta = SchemaMeta, Schema extends $ZodType = $ZodType> extends $ZodRegistry<Meta & {\n [key: string]: unknown;\n}, Schema> {\n protected parent: SchemaMetaRegistry;\n /**\n * Creates a new LanggraphZodMetaRegistry instance.\n *\n * @param parent - The base SchemaMetaRegistry to use for metadata storage.\n */\n constructor(parent: SchemaMetaRegistry);\n add<S extends Schema>(schema: S, ..._meta: undefined extends Meta & {\n [key: string]: unknown;\n } ? [$replace<Meta & {\n [key: string]: unknown;\n }, S>?] : [$replace<Meta & {\n [key: string]: unknown;\n }, S>]): this;\n}\n// Augment the zod/v4 module nudging the `register` method\n// to use the user provided input schema if specified.\ndeclare module \"zod/v4\" {\n interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {\n register<R extends LanggraphZodMetaRegistry, TOutput = core.output<this>, TInput = core.input<this>, TInternals extends core.$ZodTypeInternals<TOutput, TInput> = core.$ZodTypeInternals<TOutput, TInput>>(registry: R, meta: SchemaMeta<TOutput, TInput>): ReducedZodChannel<this, ZodType<TOutput, TInput, TInternals>>;\n }\n}\ndeclare module \"zod/v4-mini\" {\n interface ZodMiniType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {\n register<R extends LanggraphZodMetaRegistry, TOutput = core.output<this>, TInput = core.input<this>, TInternals extends core.$ZodTypeInternals<TOutput, TInput> = core.$ZodTypeInternals<TOutput, TInput>>(registry: R, meta: SchemaMeta<TOutput, TInput>): ReducedZodChannel<this, ZodMiniType<TOutput, TInput, TInternals>>;\n }\n}\nexport declare const registry: LanggraphZodMetaRegistry<SchemaMeta<any, any>, $ZodType<unknown, unknown, core.$ZodTypeInternals<unknown, unknown>>>;\n"],"mappings":"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"}
@@ -1,51 +0,0 @@
1
- import { ReducedZodChannel, SchemaMeta, SchemaMetaRegistry } from "./meta.js";
2
- import * as core from "zod/v4/core";
3
- import { $ZodRegistry, $ZodType, $replace } from "zod/v4/core";
4
-
5
- //#region src/graph/zod/zod-registry.d.ts
6
-
7
- /**
8
- * A Zod v4-compatible meta registry that extends the base registry.
9
- *
10
- * This registry allows you to associate and retrieve metadata for Zod schemas,
11
- * leveraging the base registry for storage. It is compatible with Zod v4 and
12
- * interoperates with the base registry to ensure consistent metadata management
13
- * across different Zod versions.
14
- *
15
- * @template Meta - The type of metadata associated with each schema.
16
- * @template Schema - The Zod schema type.
17
- */
18
- declare class LanggraphZodMetaRegistry<Meta extends SchemaMeta = SchemaMeta, Schema extends $ZodType = $ZodType> extends $ZodRegistry<Meta & {
19
- [key: string]: unknown;
20
- }, Schema> {
21
- protected parent: SchemaMetaRegistry;
22
- /**
23
- * Creates a new LanggraphZodMetaRegistry instance.
24
- *
25
- * @param parent - The base SchemaMetaRegistry to use for metadata storage.
26
- */
27
- constructor(parent: SchemaMetaRegistry);
28
- add<S extends Schema>(schema: S, ..._meta: undefined extends Meta & {
29
- [key: string]: unknown;
30
- } ? [$replace<Meta & {
31
- [key: string]: unknown;
32
- }, S>?] : [$replace<Meta & {
33
- [key: string]: unknown;
34
- }, S>]): this;
35
- }
36
- // Augment the zod/v4 module nudging the `register` method
37
- // to use the user provided input schema if specified.
38
- declare module "zod/v4" {
39
- interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
40
- register<R extends LanggraphZodMetaRegistry, TOutput = core.output<this>, TInput = core.input<this>, TInternals extends core.$ZodTypeInternals<TOutput, TInput> = core.$ZodTypeInternals<TOutput, TInput>>(registry: R, meta: SchemaMeta<TOutput, TInput>): ReducedZodChannel<this, ZodType<TOutput, TInput, TInternals>>;
41
- }
42
- }
43
- declare module "zod/v4-mini" {
44
- interface ZodMiniType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
45
- register<R extends LanggraphZodMetaRegistry, TOutput = core.output<this>, TInput = core.input<this>, TInternals extends core.$ZodTypeInternals<TOutput, TInput> = core.$ZodTypeInternals<TOutput, TInput>>(registry: R, meta: SchemaMeta<TOutput, TInput>): ReducedZodChannel<this, ZodMiniType<TOutput, TInput, TInternals>>;
46
- }
47
- }
48
- declare const registry: LanggraphZodMetaRegistry<SchemaMeta<any, any>, $ZodType<unknown, unknown, core.$ZodTypeInternals<unknown, unknown>>>;
49
- //#endregion
50
- export { LanggraphZodMetaRegistry, registry };
51
- //# sourceMappingURL=zod-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zod-registry.d.ts","names":["core","$ZodType","$ZodRegistry","$replace","ReducedZodChannel","SchemaMeta","SchemaMetaRegistry","LanggraphZodMetaRegistry","Meta","Schema","S","_1","Output","Input","$ZodTypeInternals","Internals","output","input","TOutput","TInput","R","TInternals","ZodType","sideEffect","_2","ZodMiniType","registry"],"sources":["../../../src/graph/zod/zod-registry.d.ts"],"sourcesContent":["import type * as core from \"zod/v4/core\";\nimport { $ZodType, $ZodRegistry, $replace } from \"zod/v4/core\";\nimport { type ReducedZodChannel, type SchemaMeta, type SchemaMetaRegistry } from \"./meta.js\";\n/**\n * A Zod v4-compatible meta registry that extends the base registry.\n *\n * This registry allows you to associate and retrieve metadata for Zod schemas,\n * leveraging the base registry for storage. It is compatible with Zod v4 and\n * interoperates with the base registry to ensure consistent metadata management\n * across different Zod versions.\n *\n * @template Meta - The type of metadata associated with each schema.\n * @template Schema - The Zod schema type.\n */\nexport declare class LanggraphZodMetaRegistry<Meta extends SchemaMeta = SchemaMeta, Schema extends $ZodType = $ZodType> extends $ZodRegistry<Meta & {\n [key: string]: unknown;\n}, Schema> {\n protected parent: SchemaMetaRegistry;\n /**\n * Creates a new LanggraphZodMetaRegistry instance.\n *\n * @param parent - The base SchemaMetaRegistry to use for metadata storage.\n */\n constructor(parent: SchemaMetaRegistry);\n add<S extends Schema>(schema: S, ..._meta: undefined extends Meta & {\n [key: string]: unknown;\n } ? [$replace<Meta & {\n [key: string]: unknown;\n }, S>?] : [$replace<Meta & {\n [key: string]: unknown;\n }, S>]): this;\n}\n// Augment the zod/v4 module nudging the `register` method\n// to use the user provided input schema if specified.\ndeclare module \"zod/v4\" {\n interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {\n register<R extends LanggraphZodMetaRegistry, TOutput = core.output<this>, TInput = core.input<this>, TInternals extends core.$ZodTypeInternals<TOutput, TInput> = core.$ZodTypeInternals<TOutput, TInput>>(registry: R, meta: SchemaMeta<TOutput, TInput>): ReducedZodChannel<this, ZodType<TOutput, TInput, TInternals>>;\n }\n}\ndeclare module \"zod/v4-mini\" {\n interface ZodMiniType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {\n register<R extends LanggraphZodMetaRegistry, TOutput = core.output<this>, TInput = core.input<this>, TInternals extends core.$ZodTypeInternals<TOutput, TInput> = core.$ZodTypeInternals<TOutput, TInput>>(registry: R, meta: SchemaMeta<TOutput, TInput>): ReducedZodChannel<this, ZodMiniType<TOutput, TInput, TInternals>>;\n }\n}\nexport declare const registry: LanggraphZodMetaRegistry<SchemaMeta<any, any>, $ZodType<unknown, unknown, core.$ZodTypeInternals<unknown, unknown>>>;\n"],"mappings":"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"}