@langchain/langgraph 1.0.7 → 1.0.13

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 (304) hide show
  1. package/dist/channels/any_value.cjs.map +1 -1
  2. package/dist/channels/any_value.d.cts +0 -1
  3. package/dist/channels/any_value.d.cts.map +1 -1
  4. package/dist/channels/any_value.d.ts +0 -1
  5. package/dist/channels/any_value.d.ts.map +1 -1
  6. package/dist/channels/any_value.js.map +1 -1
  7. package/dist/channels/base.cjs +2 -3
  8. package/dist/channels/base.cjs.map +1 -1
  9. package/dist/channels/base.d.cts.map +1 -1
  10. package/dist/channels/base.d.ts.map +1 -1
  11. package/dist/channels/base.js.map +1 -1
  12. package/dist/channels/binop.cjs.map +1 -1
  13. package/dist/channels/binop.d.cts.map +1 -1
  14. package/dist/channels/binop.d.ts.map +1 -1
  15. package/dist/channels/binop.js.map +1 -1
  16. package/dist/channels/dynamic_barrier_value.cjs +0 -1
  17. package/dist/channels/dynamic_barrier_value.cjs.map +1 -1
  18. package/dist/channels/dynamic_barrier_value.d.cts +1 -3
  19. package/dist/channels/dynamic_barrier_value.d.cts.map +1 -1
  20. package/dist/channels/dynamic_barrier_value.d.ts +1 -3
  21. package/dist/channels/dynamic_barrier_value.d.ts.map +1 -1
  22. package/dist/channels/dynamic_barrier_value.js +0 -1
  23. package/dist/channels/dynamic_barrier_value.js.map +1 -1
  24. package/dist/channels/ephemeral_value.cjs.map +1 -1
  25. package/dist/channels/ephemeral_value.d.cts +0 -1
  26. package/dist/channels/ephemeral_value.d.cts.map +1 -1
  27. package/dist/channels/ephemeral_value.d.ts +0 -1
  28. package/dist/channels/ephemeral_value.d.ts.map +1 -1
  29. package/dist/channels/ephemeral_value.js.map +1 -1
  30. package/dist/channels/last_value.cjs.map +1 -1
  31. package/dist/channels/last_value.d.cts +0 -2
  32. package/dist/channels/last_value.d.cts.map +1 -1
  33. package/dist/channels/last_value.d.ts +0 -2
  34. package/dist/channels/last_value.d.ts.map +1 -1
  35. package/dist/channels/last_value.js.map +1 -1
  36. package/dist/channels/named_barrier_value.cjs +0 -2
  37. package/dist/channels/named_barrier_value.cjs.map +1 -1
  38. package/dist/channels/named_barrier_value.d.cts +2 -4
  39. package/dist/channels/named_barrier_value.d.cts.map +1 -1
  40. package/dist/channels/named_barrier_value.d.ts +2 -4
  41. package/dist/channels/named_barrier_value.d.ts.map +1 -1
  42. package/dist/channels/named_barrier_value.js +0 -2
  43. package/dist/channels/named_barrier_value.js.map +1 -1
  44. package/dist/channels/topic.cjs.map +1 -1
  45. package/dist/channels/topic.d.cts.map +1 -1
  46. package/dist/channels/topic.d.ts.map +1 -1
  47. package/dist/channels/topic.js.map +1 -1
  48. package/dist/constants.cjs.map +1 -1
  49. package/dist/constants.d.cts +2 -6
  50. package/dist/constants.d.cts.map +1 -1
  51. package/dist/constants.d.ts +2 -6
  52. package/dist/constants.d.ts.map +1 -1
  53. package/dist/constants.js.map +1 -1
  54. package/dist/errors.cjs.map +1 -1
  55. package/dist/errors.d.cts +0 -4
  56. package/dist/errors.d.cts.map +1 -1
  57. package/dist/errors.d.ts +0 -4
  58. package/dist/errors.d.ts.map +1 -1
  59. package/dist/errors.js.map +1 -1
  60. package/dist/func/index.cjs +2 -4
  61. package/dist/func/index.cjs.map +1 -1
  62. package/dist/func/index.d.cts +1 -6
  63. package/dist/func/index.d.cts.map +1 -1
  64. package/dist/func/index.d.ts +1 -6
  65. package/dist/func/index.d.ts.map +1 -1
  66. package/dist/func/index.js +1 -2
  67. package/dist/func/index.js.map +1 -1
  68. package/dist/func/types.d.cts +2 -4
  69. package/dist/func/types.d.cts.map +1 -1
  70. package/dist/func/types.d.ts +2 -4
  71. package/dist/func/types.d.ts.map +1 -1
  72. package/dist/graph/annotation.cjs.map +1 -1
  73. package/dist/graph/annotation.d.cts.map +1 -1
  74. package/dist/graph/annotation.d.ts.map +1 -1
  75. package/dist/graph/annotation.js.map +1 -1
  76. package/dist/graph/graph.cjs +15 -18
  77. package/dist/graph/graph.cjs.map +1 -1
  78. package/dist/graph/graph.d.cts +4 -28
  79. package/dist/graph/graph.d.cts.map +1 -1
  80. package/dist/graph/graph.d.ts +4 -28
  81. package/dist/graph/graph.d.ts.map +1 -1
  82. package/dist/graph/graph.js +4 -6
  83. package/dist/graph/graph.js.map +1 -1
  84. package/dist/graph/message.cjs +8 -10
  85. package/dist/graph/message.cjs.map +1 -1
  86. package/dist/graph/message.d.cts +2 -2
  87. package/dist/graph/message.d.cts.map +1 -1
  88. package/dist/graph/message.d.ts +2 -2
  89. package/dist/graph/message.d.ts.map +1 -1
  90. package/dist/graph/message.js +3 -4
  91. package/dist/graph/message.js.map +1 -1
  92. package/dist/graph/messages_annotation.cjs +1 -2
  93. package/dist/graph/messages_annotation.cjs.map +1 -1
  94. package/dist/graph/messages_annotation.d.cts +5 -5
  95. package/dist/graph/messages_annotation.d.cts.map +1 -1
  96. package/dist/graph/messages_annotation.d.ts +5 -5
  97. package/dist/graph/messages_annotation.d.ts.map +1 -1
  98. package/dist/graph/messages_annotation.js.map +1 -1
  99. package/dist/graph/state.cjs +23 -30
  100. package/dist/graph/state.cjs.map +1 -1
  101. package/dist/graph/state.d.cts +2 -9
  102. package/dist/graph/state.d.cts.map +1 -1
  103. package/dist/graph/state.d.ts +2 -9
  104. package/dist/graph/state.d.ts.map +1 -1
  105. package/dist/graph/state.js +6 -12
  106. package/dist/graph/state.js.map +1 -1
  107. package/dist/graph/zod/meta.cjs +8 -9
  108. package/dist/graph/zod/meta.cjs.map +1 -1
  109. package/dist/graph/zod/meta.d.cts +0 -1
  110. package/dist/graph/zod/meta.d.cts.map +1 -1
  111. package/dist/graph/zod/meta.d.ts +0 -1
  112. package/dist/graph/zod/meta.d.ts.map +1 -1
  113. package/dist/graph/zod/meta.js.map +1 -1
  114. package/dist/graph/zod/plugin.cjs +4 -6
  115. package/dist/graph/zod/plugin.cjs.map +1 -1
  116. package/dist/graph/zod/plugin.js +1 -2
  117. package/dist/graph/zod/plugin.js.map +1 -1
  118. package/dist/graph/zod/schema.cjs +2 -3
  119. package/dist/graph/zod/schema.cjs.map +1 -1
  120. package/dist/graph/zod/schema.d.cts.map +1 -1
  121. package/dist/graph/zod/schema.d.ts.map +1 -1
  122. package/dist/graph/zod/schema.js.map +1 -1
  123. package/dist/graph/zod/zod-registry.cjs +3 -4
  124. package/dist/graph/zod/zod-registry.cjs.map +1 -1
  125. package/dist/graph/zod/zod-registry.d.cts +0 -2
  126. package/dist/graph/zod/zod-registry.d.cts.map +1 -1
  127. package/dist/graph/zod/zod-registry.d.ts +0 -2
  128. package/dist/graph/zod/zod-registry.d.ts.map +1 -1
  129. package/dist/graph/zod/zod-registry.js.map +1 -1
  130. package/dist/hash.cjs +4 -10
  131. package/dist/hash.cjs.map +1 -1
  132. package/dist/hash.js +4 -10
  133. package/dist/hash.js.map +1 -1
  134. package/dist/index.cjs +8 -9
  135. package/dist/index.cjs.map +1 -1
  136. package/dist/index.js.map +1 -1
  137. package/dist/interrupt.cjs +4 -7
  138. package/dist/interrupt.cjs.map +1 -1
  139. package/dist/interrupt.d.cts +1 -4
  140. package/dist/interrupt.d.cts.map +1 -1
  141. package/dist/interrupt.d.ts +1 -4
  142. package/dist/interrupt.d.ts.map +1 -1
  143. package/dist/interrupt.js +2 -4
  144. package/dist/interrupt.js.map +1 -1
  145. package/dist/prebuilt/agentName.cjs +14 -19
  146. package/dist/prebuilt/agentName.cjs.map +1 -1
  147. package/dist/prebuilt/agentName.js +6 -10
  148. package/dist/prebuilt/agentName.js.map +1 -1
  149. package/dist/prebuilt/agent_executor.cjs +4 -7
  150. package/dist/prebuilt/agent_executor.cjs.map +1 -1
  151. package/dist/prebuilt/agent_executor.d.cts +5 -5
  152. package/dist/prebuilt/agent_executor.d.cts.map +1 -1
  153. package/dist/prebuilt/agent_executor.d.ts +5 -5
  154. package/dist/prebuilt/agent_executor.d.ts.map +1 -1
  155. package/dist/prebuilt/agent_executor.js +4 -7
  156. package/dist/prebuilt/agent_executor.js.map +1 -1
  157. package/dist/prebuilt/chat_agent_executor.cjs +11 -17
  158. package/dist/prebuilt/chat_agent_executor.cjs.map +1 -1
  159. package/dist/prebuilt/chat_agent_executor.d.cts.map +1 -1
  160. package/dist/prebuilt/chat_agent_executor.d.ts.map +1 -1
  161. package/dist/prebuilt/chat_agent_executor.js +7 -12
  162. package/dist/prebuilt/chat_agent_executor.js.map +1 -1
  163. package/dist/prebuilt/interrupt.d.cts +0 -1
  164. package/dist/prebuilt/interrupt.d.cts.map +1 -1
  165. package/dist/prebuilt/interrupt.d.ts +0 -1
  166. package/dist/prebuilt/interrupt.d.ts.map +1 -1
  167. package/dist/prebuilt/react_agent_executor.cjs +35 -40
  168. package/dist/prebuilt/react_agent_executor.cjs.map +1 -1
  169. package/dist/prebuilt/react_agent_executor.d.cts +8 -27
  170. package/dist/prebuilt/react_agent_executor.d.cts.map +1 -1
  171. package/dist/prebuilt/react_agent_executor.d.ts +8 -27
  172. package/dist/prebuilt/react_agent_executor.d.ts.map +1 -1
  173. package/dist/prebuilt/react_agent_executor.js +8 -12
  174. package/dist/prebuilt/react_agent_executor.js.map +1 -1
  175. package/dist/prebuilt/tool_executor.cjs +4 -9
  176. package/dist/prebuilt/tool_executor.cjs.map +1 -1
  177. package/dist/prebuilt/tool_executor.d.cts +0 -2
  178. package/dist/prebuilt/tool_executor.d.cts.map +1 -1
  179. package/dist/prebuilt/tool_executor.d.ts +0 -2
  180. package/dist/prebuilt/tool_executor.d.ts.map +1 -1
  181. package/dist/prebuilt/tool_executor.js +1 -5
  182. package/dist/prebuilt/tool_executor.js.map +1 -1
  183. package/dist/prebuilt/tool_node.cjs +7 -8
  184. package/dist/prebuilt/tool_node.cjs.map +1 -1
  185. package/dist/prebuilt/tool_node.d.cts +0 -2
  186. package/dist/prebuilt/tool_node.d.cts.map +1 -1
  187. package/dist/prebuilt/tool_node.d.ts +0 -2
  188. package/dist/prebuilt/tool_node.d.ts.map +1 -1
  189. package/dist/prebuilt/tool_node.js.map +1 -1
  190. package/dist/pregel/algo.cjs +33 -41
  191. package/dist/pregel/algo.cjs.map +1 -1
  192. package/dist/pregel/algo.d.cts.map +1 -1
  193. package/dist/pregel/algo.d.ts.map +1 -1
  194. package/dist/pregel/algo.js +22 -29
  195. package/dist/pregel/algo.js.map +1 -1
  196. package/dist/pregel/call.cjs +11 -14
  197. package/dist/pregel/call.cjs.map +1 -1
  198. package/dist/pregel/call.js +7 -9
  199. package/dist/pregel/call.js.map +1 -1
  200. package/dist/pregel/debug.cjs +6 -9
  201. package/dist/pregel/debug.cjs.map +1 -1
  202. package/dist/pregel/debug.js +6 -9
  203. package/dist/pregel/debug.js.map +1 -1
  204. package/dist/pregel/index.cjs +28 -35
  205. package/dist/pregel/index.cjs.map +1 -1
  206. package/dist/pregel/index.d.cts +6 -54
  207. package/dist/pregel/index.d.cts.map +1 -1
  208. package/dist/pregel/index.d.ts +6 -54
  209. package/dist/pregel/index.d.ts.map +1 -1
  210. package/dist/pregel/index.js +10 -16
  211. package/dist/pregel/index.js.map +1 -1
  212. package/dist/pregel/io.cjs.map +1 -1
  213. package/dist/pregel/io.js.map +1 -1
  214. package/dist/pregel/loop.cjs +9 -12
  215. package/dist/pregel/loop.cjs.map +1 -1
  216. package/dist/pregel/loop.js +2 -4
  217. package/dist/pregel/loop.js.map +1 -1
  218. package/dist/pregel/messages.cjs +13 -14
  219. package/dist/pregel/messages.cjs.map +1 -1
  220. package/dist/pregel/messages.js.map +1 -1
  221. package/dist/pregel/read.cjs +7 -8
  222. package/dist/pregel/read.cjs.map +1 -1
  223. package/dist/pregel/read.d.cts +0 -6
  224. package/dist/pregel/read.d.cts.map +1 -1
  225. package/dist/pregel/read.d.ts +0 -6
  226. package/dist/pregel/read.d.ts.map +1 -1
  227. package/dist/pregel/read.js +1 -1
  228. package/dist/pregel/read.js.map +1 -1
  229. package/dist/pregel/remote.cjs +24 -32
  230. package/dist/pregel/remote.cjs.map +1 -1
  231. package/dist/pregel/remote.d.cts +1 -6
  232. package/dist/pregel/remote.d.cts.map +1 -1
  233. package/dist/pregel/remote.d.ts +1 -6
  234. package/dist/pregel/remote.d.ts.map +1 -1
  235. package/dist/pregel/remote.js +12 -19
  236. package/dist/pregel/remote.js.map +1 -1
  237. package/dist/pregel/retry.cjs +1 -2
  238. package/dist/pregel/retry.cjs.map +1 -1
  239. package/dist/pregel/retry.js +1 -2
  240. package/dist/pregel/retry.js.map +1 -1
  241. package/dist/pregel/runnable_types.d.cts +2 -8
  242. package/dist/pregel/runnable_types.d.cts.map +1 -1
  243. package/dist/pregel/runnable_types.d.ts +2 -8
  244. package/dist/pregel/runnable_types.d.ts.map +1 -1
  245. package/dist/pregel/runner.cjs +1 -1
  246. package/dist/pregel/runner.cjs.map +1 -1
  247. package/dist/pregel/runner.js +1 -1
  248. package/dist/pregel/runner.js.map +1 -1
  249. package/dist/pregel/stream.cjs +4 -6
  250. package/dist/pregel/stream.cjs.map +1 -1
  251. package/dist/pregel/stream.js +1 -2
  252. package/dist/pregel/stream.js.map +1 -1
  253. package/dist/pregel/types.d.cts +5 -18
  254. package/dist/pregel/types.d.cts.map +1 -1
  255. package/dist/pregel/types.d.ts +5 -18
  256. package/dist/pregel/types.d.ts.map +1 -1
  257. package/dist/pregel/utils/config.cjs +6 -7
  258. package/dist/pregel/utils/config.cjs.map +1 -1
  259. package/dist/pregel/utils/config.d.cts.map +1 -1
  260. package/dist/pregel/utils/config.d.ts.map +1 -1
  261. package/dist/pregel/utils/config.js.map +1 -1
  262. package/dist/pregel/utils/index.cjs +1 -2
  263. package/dist/pregel/utils/index.cjs.map +1 -1
  264. package/dist/pregel/utils/index.d.cts +1 -1
  265. package/dist/pregel/utils/index.d.cts.map +1 -1
  266. package/dist/pregel/utils/index.d.ts +1 -1
  267. package/dist/pregel/utils/index.d.ts.map +1 -1
  268. package/dist/pregel/utils/index.js +1 -2
  269. package/dist/pregel/utils/index.js.map +1 -1
  270. package/dist/pregel/utils/subgraph.cjs +0 -1
  271. package/dist/pregel/utils/subgraph.cjs.map +1 -1
  272. package/dist/pregel/utils/subgraph.js +0 -1
  273. package/dist/pregel/utils/subgraph.js.map +1 -1
  274. package/dist/pregel/validate.cjs.map +1 -1
  275. package/dist/pregel/validate.js.map +1 -1
  276. package/dist/pregel/write.cjs +2 -3
  277. package/dist/pregel/write.cjs.map +1 -1
  278. package/dist/pregel/write.d.cts +1 -5
  279. package/dist/pregel/write.d.cts.map +1 -1
  280. package/dist/pregel/write.d.ts +1 -5
  281. package/dist/pregel/write.d.ts.map +1 -1
  282. package/dist/pregel/write.js.map +1 -1
  283. package/dist/setup/async_local_storage.cjs +3 -4
  284. package/dist/setup/async_local_storage.cjs.map +1 -1
  285. package/dist/setup/async_local_storage.js.map +1 -1
  286. package/dist/utils.cjs +9 -11
  287. package/dist/utils.cjs.map +1 -1
  288. package/dist/utils.d.cts +1 -8
  289. package/dist/utils.d.cts.map +1 -1
  290. package/dist/utils.d.ts +1 -8
  291. package/dist/utils.d.ts.map +1 -1
  292. package/dist/utils.js +1 -2
  293. package/dist/utils.js.map +1 -1
  294. package/dist/web.cjs +8 -9
  295. package/dist/writer.cjs +2 -3
  296. package/dist/writer.cjs.map +1 -1
  297. package/dist/writer.d.cts +1 -2
  298. package/dist/writer.d.cts.map +1 -1
  299. package/dist/writer.d.ts +1 -2
  300. package/dist/writer.d.ts.map +1 -1
  301. package/dist/writer.js.map +1 -1
  302. package/package.json +7 -7
  303. package/CHANGELOG.md +0 -286
  304. package/dist/_virtual/rolldown_runtime.cjs +0 -25
package/dist/writer.cjs CHANGED
@@ -1,9 +1,8 @@
1
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
- const __langchain_core_singletons = require_rolldown_runtime.__toESM(require("@langchain/core/singletons"));
1
+ let _langchain_core_singletons = require("@langchain/core/singletons");
3
2
 
4
3
  //#region src/writer.ts
5
4
  function writer(chunk) {
6
- const config = __langchain_core_singletons.AsyncLocalStorageProviderSingleton.getRunnableConfig();
5
+ const config = _langchain_core_singletons.AsyncLocalStorageProviderSingleton.getRunnableConfig();
7
6
  if (!config) throw new Error("Called interrupt() outside the context of a graph.");
8
7
  const conf = config.configurable;
9
8
  if (!conf) throw new Error("No configurable found in config");
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"writer.cjs","names":["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,MAAM,SACJA,8DAAmC,mBAAmB;AACxD,KAAI,CAAC,OACH,OAAM,IAAI,MAAM,qDAAqD;CAGvE,MAAM,OAAO,OAAO;AACpB,KAAI,CAAC,KACH,OAAM,IAAI,MAAM,kCAAkC;AAGpD,QAAO,KAAK,SAAS,MAAM"}
package/dist/writer.d.cts CHANGED
@@ -1,7 +1,6 @@
1
1
  //#region src/writer.d.ts
2
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
-
3
+ type InferWriterType<T> = T extends typeof writer<infer C> ? C : any;
5
4
  //#endregion
6
5
  export { InferWriterType, writer };
7
6
  //# sourceMappingURL=writer.d.cts.map
@@ -1 +1 @@
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"}
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;\n"],"mappings":";iBAAwBA,iBAAiBC;AAAjBD,KACZE,eAD8B,CAAA,CAAA,CAAA,GACTD,CADS,SAAA,OACQD,MADR,CAAA,KAAA,EAAA,CAAA,GAC0BG,CAD1B,GAAA,GAAA"}
package/dist/writer.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  //#region src/writer.d.ts
2
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
-
3
+ type InferWriterType<T> = T extends typeof writer<infer C> ? C : any;
5
4
  //#endregion
6
5
  export { InferWriterType, writer };
7
6
  //# sourceMappingURL=writer.d.ts.map
@@ -1 +1 @@
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"}
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;\n"],"mappings":";iBAAwBA,iBAAiBC;AAAjBD,KACZE,eAD8B,CAAA,CAAA,CAAA,GACTD,CADS,SAAA,OACQD,MADR,CAAA,KAAA,EAAA,CAAA,GAC0BG,CAD1B,GAAA,GAAA"}
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"writer.js","names":[],"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,MAAM,SACJ,mCAAmC,mBAAmB;AACxD,KAAI,CAAC,OACH,OAAM,IAAI,MAAM,qDAAqD;CAGvE,MAAM,OAAO,OAAO;AACpB,KAAI,CAAC,KACH,OAAM,IAAI,MAAM,kCAAkC;AAGpD,QAAO,KAAK,SAAS,MAAM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph",
3
- "version": "1.0.7",
3
+ "version": "1.0.13",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {
@@ -34,7 +34,7 @@
34
34
  "license": "MIT",
35
35
  "dependencies": {
36
36
  "@langchain/langgraph-checkpoint": "^1.0.0",
37
- "@langchain/langgraph-sdk": "~1.3.1",
37
+ "@langchain/langgraph-sdk": "~1.4.5",
38
38
  "uuid": "^10.0.0"
39
39
  },
40
40
  "peerDependencies": {
@@ -50,10 +50,10 @@
50
50
  "devDependencies": {
51
51
  "@langchain/anthropic": "^1.0.0",
52
52
  "@langchain/core": "^1.0.1",
53
- "@langchain/langgraph-checkpoint": "1.0.0",
54
- "@langchain/langgraph-checkpoint-postgres": "1.0.0",
55
- "@langchain/langgraph-checkpoint-sqlite": "1.0.0",
56
- "@langchain/langgraph-sdk": "1.3.1",
53
+ "@langchain/langgraph-checkpoint": "workspace:*",
54
+ "@langchain/langgraph-checkpoint-postgres": "workspace:*",
55
+ "@langchain/langgraph-checkpoint-sqlite": "workspace:*",
56
+ "@langchain/langgraph-sdk": "workspace:*",
57
57
  "@langchain/openai": "^1.0.0",
58
58
  "@langchain/scripts": ">=0.1.3 <0.2.0",
59
59
  "@langchain/tavily": "^1.0.0",
@@ -192,4 +192,4 @@
192
192
  "files": [
193
193
  "dist/"
194
194
  ]
195
- }
195
+ }
package/CHANGELOG.md DELETED
@@ -1,286 +0,0 @@
1
- # @langchain/langgraph
2
-
3
- ## 1.0.7
4
-
5
- ### Patch Changes
6
-
7
- - f602df6: Adding support for resumableStreams on remote graphs.
8
-
9
- ## 1.0.6
10
-
11
- ### Patch Changes
12
-
13
- - de1454a: undeprecate toolsCondition
14
- - 2340a54: respect meta defaults in `LastValue`
15
-
16
- ## 1.0.5
17
-
18
- ### Patch Changes
19
-
20
- - Updated dependencies [1497df9]
21
- - @langchain/langgraph-sdk@1.3.0
22
-
23
- ## 1.0.4
24
-
25
- ### Patch Changes
26
-
27
- - Updated dependencies [379de5e]
28
- - Updated dependencies [d08e484]
29
- - Updated dependencies [d08e484]
30
- - @langchain/langgraph-sdk@1.2.0
31
-
32
- ## 1.0.3
33
-
34
- ### Patch Changes
35
-
36
- - Updated dependencies [e19e76c]
37
- - Updated dependencies [fa6c009]
38
- - Updated dependencies [35e8fc7]
39
- - Updated dependencies [b78a738]
40
- - @langchain/langgraph-sdk@1.1.0
41
-
42
- ## 1.0.2
43
-
44
- ### Patch Changes
45
-
46
- - 4a6bde2: remove interrupt deprecations docs
47
-
48
- ## 1.0.1
49
-
50
- ### Patch Changes
51
-
52
- - 4c4125c: undeprecate `ToolNode`
53
-
54
- ## 1.0.0
55
-
56
- ### Major Changes
57
-
58
- - 1e1ecbb: Make Zod a peer dependency of @langchain/langgraph
59
- - 1e1ecbb: This release updates the package for compatibility with LangGraph v1.0. See the [v1.0 release notes](https://docs.langchain.com/oss/javascript/releases/langgraph-v1) for details on what's new.
60
-
61
- ### Patch Changes
62
-
63
- - 1e1ecbb: Fix type issue with defining `interrupt` and `writer` in StateGraph constructor when using Annotation.Root
64
- - 1e1ecbb: Add `pushMessage` method for manually publishing to messages stream channel
65
- - 1e1ecbb: chore(prebuilt): deprecate createReactAgent
66
- - 1e1ecbb: Improve performance of scheduling tasks with large graphs
67
- - 1e1ecbb: Improve graph execution performance by avoiding unnecessary cloning of checkpoints after every tick
68
- - 1e1ecbb: fix(@langchain/langgraph): export missing `CommandParams` symbol
69
- - 1e1ecbb: Add `stream.encoding` option to emit LangGraph API events as Server-Sent Events. This allows for sending events through the wire by piping the stream to a `Response` object.
70
- - 1e1ecbb: fix(@langchain/langgraph): export missing `CommandInstance` symbol
71
- - 1e1ecbb: Update troubleshooting link for common errors, add MISSING_CHECKPOINTER troubleshooting page
72
- - 1e1ecbb: Fix `stateKey` property in `pushMessage` being ignored when RunnableConfig is automatically inherited
73
- - 1e1ecbb: Improve tick performance by detecting interrupts faster within a tick.
74
- - 1e1ecbb: Improve tick performance by calling `maxChannelMapVersion` only once
75
- - 1e1ecbb: feat(langgraph): add `toLangGraphEventStream` method to stream events in LGP compatible format
76
- - 1e1ecbb: fix(createReactAgent): update deprecation messages to contain reactAgent
77
- - 1e1ecbb: `writer`, `interrupt` and `signal` is no longer an optional property of `Runtime`
78
- - 1e1ecbb: Add support for defining multiple interrupts in StateGraph constructor. Interrupts from the map can be picked from the `Runtime` object, ensuring type-safety across multiple interrupts.
79
- - 1e1ecbb: Channels are now part of the public API, allowing users to customise behaviour of checkpointing per channel (#976)
80
- - 1e1ecbb: Allow defining types for interrupt and custom events upfront
81
- - 1e1ecbb: Fix performance regression due to deferred nodes
82
- - Updated dependencies [1e1ecbb]
83
- - @langchain/langgraph-checkpoint@1.0.0
84
- - @langchain/langgraph-sdk@1.0.0
85
-
86
- ## 1.0.0-alpha.5
87
-
88
- ### Patch Changes
89
-
90
- - b6d6701: fix(@langchain/langgraph): export missing `CommandParams` symbol
91
- - d5be09c: fix(@langchain/langgraph): export missing `CommandInstance` symbol
92
-
93
- ## 1.0.0-alpha.4
94
-
95
- ### Patch Changes
96
-
97
- - c3f326d: Add support for defining multiple interrupts in StateGraph constructor. Interrupts from the map can be picked from the `Runtime` object, ensuring type-safety across multiple interrupts.
98
-
99
- ## 1.0.0-alpha.3
100
-
101
- ### Patch Changes
102
-
103
- - 05619e2: Add `stream.encoding` option to emit LangGraph API events as Server-Sent Events. This allows for sending events through the wire by piping the stream to a `Response` object.
104
- - 14cb042: Fix `stateKey` property in `pushMessage` being ignored when RunnableConfig is automatically inherited
105
-
106
- ## 1.0.0-alpha.2
107
-
108
- ### Patch Changes
109
-
110
- - a5bcd74: Fix type issue with defining `interrupt` and `writer` in StateGraph constructor when using Annotation.Root
111
- - 5184725: Add `pushMessage` method for manually publishing to messages stream channel
112
-
113
- ## 1.0.0-alpha.1
114
-
115
- ### Patch Changes
116
-
117
- - a05436d: Improve performance of scheduling tasks with large graphs
118
- - d35db59: Improve graph execution performance by avoiding unnecessary cloning of checkpoints after every tick
119
- - 7e01d08: Update troubleshooting link for common errors, add MISSING_CHECKPOINTER troubleshooting page
120
- - a527fc7: Improve tick performance by detecting interrupts faster within a tick.
121
- - 27934c0: Improve tick performance by calling `maxChannelMapVersion` only once
122
- - dc2e5f2: fix(createReactAgent): update deprecation messages to contain reactAgent
123
- - e8f5084: `writer`, `interrupt` and `signal` is no longer an optional property of `Runtime`
124
- - 20f1d64: Channels are now part of the public API, allowing users to customise behaviour of checkpointing per channel (#976)
125
- - 2311efc: Allow defining types for interrupt and custom events upfront
126
- - c6f75b6: Fix performance regression due to deferred nodes
127
-
128
- ## 1.0.0-alpha.0
129
-
130
- ### Major Changes
131
-
132
- - 445c2ae: Make Zod a peer dependency of @langchain/langgraph
133
-
134
- ### Patch Changes
135
-
136
- - 5f9b5a0: Deprecate createReactAgent in favour of `langchain` package.
137
- - dcc117f: feat(langgraph): add `toLangGraphEventStream` method to stream events in LGP compatible format
138
-
139
- ## 0.4.9
140
-
141
- ### Patch Changes
142
-
143
- - Updated dependencies [35a0f1c]
144
- - Updated dependencies [35a0f1c]
145
- - Updated dependencies [35a0f1c]
146
- - Updated dependencies [35a0f1c]
147
- - @langchain/langgraph-sdk@0.1.0
148
-
149
- ## 0.4.8
150
-
151
- ### Patch Changes
152
-
153
- - bb0df7c: Fix "This stream has already been locked for exclusive reading by another reader" error when using `web-streams-polyfill`
154
-
155
- ## 0.4.7
156
-
157
- ### Patch Changes
158
-
159
- - 60e9258: fix(langgraph): task result from stream mode debug / tasks should match format from getStateHistory / getState
160
- - 07a5b2f: fix(langgraph): avoid accepting incorrect keys in withLangGraph
161
- - Updated dependencies [b5f14d0]
162
- - @langchain/langgraph-sdk@0.0.111
163
-
164
- ## 0.4.6
165
-
166
- ### Patch Changes
167
-
168
- - 5f1db81: fix(langgraph): `withConfig` should accept `context`
169
- - c53ca47: Avoid iterating on channels if no managed values are present
170
- - a3707fb: fix(langgraph): allow `updateState` after resuming from an interrupt
171
- - Updated dependencies [e8b4540]
172
- - Updated dependencies [9c57526]
173
- - @langchain/langgraph-sdk@0.0.109
174
-
175
- ## 0.4.5
176
-
177
- ### Patch Changes
178
-
179
- - d22113a: fix(pregel/utils): propagate abort reason in combineAbortSignals
180
- - 2284045: fix(langgraph): send checkpoint namespace when yielding custom events in subgraphs
181
- - 4774013: fix(langgraph): persist resume map values
182
-
183
- ## 0.4.4
184
-
185
- ### Patch Changes
186
-
187
- - 8f4acc0: feat(langgraph): speed up prepareSingleTask by 20x
188
- - 8152a15: Use return type of nodes for streamMode: updates types
189
- - 4e854b2: fix(langgraph): set status for tool messages generated by ToolNode
190
- - cb4b17a: feat(langgraph): use createReactAgent description for supervisor agent handoffs
191
- - Updated dependencies [72386a4]
192
- - Updated dependencies [3ee5c20]
193
- - @langchain/langgraph-sdk@0.0.107
194
-
195
- ## 0.4.3
196
-
197
- ### Patch Changes
198
-
199
- - f69bf6d: feat(langgraph): createReactAgent v2: use Send for each of the tool calls
200
- - 9940200: feat(langgraph): Allow partially applying tool calls via postModelHook
201
- - e8c61bb: feat(langgraph): add dynamic model choice to createReactAgent
202
-
203
- ## 0.4.2
204
-
205
- ### Patch Changes
206
-
207
- - c911c5f: fix(langgraph): handle empty messages
208
-
209
- ## 0.4.1
210
-
211
- ### Patch Changes
212
-
213
- - f2cc704: fix(langgraph): RemotePregel serialization fix
214
- - Updated dependencies [7054a6a]
215
- - @langchain/langgraph-sdk@0.0.105
216
-
217
- ## 0.4.0
218
-
219
- ### Minor Changes
220
-
221
- - 5f7ee26: feat(langgraph): cleanup of interrupt interface
222
- - 10432a4: chore(langgraph): remove SharedValue / managed values
223
- - f1bcec7: chore(langgraph): introduce `context` field and `Runtime` type
224
- - 14dd523: fix(langgraph): auto-inference of configurable fields
225
- - fa78796: Add `durability` checkpointer mode
226
- - 565f472: Mark StateGraph({ channel }) constructor deprecated
227
-
228
- ### Patch Changes
229
-
230
- - Updated dependencies [ccbcbc1]
231
- - Updated dependencies [10f292a]
232
- - Updated dependencies [f1bcec7]
233
- - Updated dependencies [3fd7f73]
234
- - Updated dependencies [773ec0d]
235
- - @langchain/langgraph-checkpoint@0.1.0
236
- - @langchain/langgraph-sdk@0.0.103
237
-
238
- ## 0.3.12
239
-
240
- ### Patch Changes
241
-
242
- - 034730f: fix(langgraph): add support for new interrupt ID
243
-
244
- ## 0.3.11
245
-
246
- ### Patch Changes
247
-
248
- - a0efb98: Relax `when` type for `Interrupt`
249
- - Updated dependencies [a0efb98]
250
- - @langchain/langgraph-sdk@0.0.100
251
-
252
- ## 0.3.10
253
-
254
- ### Patch Changes
255
-
256
- - a12c1fb: fix(langgraph): stop suggesting public properties and methods of Command when calling invoke
257
- - Updated dependencies [ee1defa]
258
- - @langchain/langgraph-sdk@0.0.98
259
-
260
- ## 0.3.9
261
-
262
- ### Patch Changes
263
-
264
- - 430ae93: feat(langgraph): validate if messages present in user provided schema
265
- - 4aed3f4: fix(langgraph): dispose unused combined signals
266
- - 02f9e02: fix(langgraph): preModelHook `llmInputMessages` should not keep concatenating messages
267
- - 6e616f5: fix(langgraph): respect strict option in responseFormat inside createReactAgent
268
- - 6812b50: feat(langgraph): allow extending state with Zod schema
269
- - 8166703: add UpdateType type utility for Zod, improve Zod 4 and Zod 4 mini support
270
- - Updated dependencies [53b8c30]
271
- - @langchain/langgraph-sdk@0.0.96
272
-
273
- ## 0.3.8
274
-
275
- ### Patch Changes
276
-
277
- - fix(langgraph): Ensure resuming only happens with matching run ids by @hinthornw in https://github.com/langchain-ai/langgraphjs/pull/1381
278
-
279
- ## 0.3.7
280
-
281
- ### Patch Changes
282
-
283
- - fix(langgraph): Handle wrapped LLM models in createReactAgent (RunnableSequence, withConfig, ...etc) by @dqbd in https://github.com/langchain-ai/langgraphjs/pull/1369
284
- - fix(langgraph): avoid calling \_emit for runs without metadata by @dqbd in https://github.com/langchain-ai/langgraphjs/pull/1340
285
- - fix(langgraph): fail fast when interrupt is called without checkpointer by @dqbd in https://github.com/langchain-ai/langgraphjs/pull/1343
286
- - fix(langgraph): handle wrapped LLM models in createReactAgent by @dqbd in https://github.com/langchain-ai/langgraphjs/pull/1369
@@ -1,25 +0,0 @@
1
- //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
- key = keys[i];
11
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: ((k) => from[k]).bind(null, key),
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
- value: mod,
20
- enumerable: true
21
- }) : target, mod));
22
-
23
- //#endregion
24
-
25
- exports.__toESM = __toESM;