langchain 1.0.0-alpha.8 → 1.0.0-alpha.9

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 (442) hide show
  1. package/LICENSE +6 -6
  2. package/dist/agents/ReactAgent.cjs +497 -104
  3. package/dist/agents/ReactAgent.cjs.map +1 -1
  4. package/dist/agents/ReactAgent.d.cts +140 -17
  5. package/dist/agents/ReactAgent.d.cts.map +1 -1
  6. package/dist/agents/ReactAgent.d.ts +140 -17
  7. package/dist/agents/ReactAgent.d.ts.map +1 -1
  8. package/dist/agents/ReactAgent.js +500 -107
  9. package/dist/agents/ReactAgent.js.map +1 -1
  10. package/dist/agents/annotation.cjs +32 -149
  11. package/dist/agents/annotation.cjs.map +1 -1
  12. package/dist/agents/annotation.js +34 -147
  13. package/dist/agents/annotation.js.map +1 -1
  14. package/dist/agents/constants.cjs.map +1 -1
  15. package/dist/agents/constants.d.cts +9 -0
  16. package/dist/agents/constants.d.cts.map +1 -0
  17. package/dist/agents/constants.d.ts +9 -0
  18. package/dist/agents/constants.d.ts.map +1 -0
  19. package/dist/agents/constants.js.map +1 -1
  20. package/dist/agents/errors.cjs +2 -1
  21. package/dist/agents/errors.cjs.map +1 -1
  22. package/dist/agents/errors.js +2 -1
  23. package/dist/agents/errors.js.map +1 -1
  24. package/dist/agents/index.cjs +5 -29
  25. package/dist/agents/index.cjs.map +1 -1
  26. package/dist/agents/index.d.cts +157 -128
  27. package/dist/agents/index.d.cts.map +1 -1
  28. package/dist/agents/index.d.ts +157 -128
  29. package/dist/agents/index.d.ts.map +1 -1
  30. package/dist/agents/index.js +5 -27
  31. package/dist/agents/index.js.map +1 -1
  32. package/dist/agents/{middlewareAgent/middleware → middleware}/callLimit.cjs +2 -2
  33. package/dist/agents/middleware/callLimit.cjs.map +1 -0
  34. package/dist/agents/{middlewareAgent/middleware → middleware}/callLimit.d.cts +3 -3
  35. package/dist/agents/middleware/callLimit.d.cts.map +1 -0
  36. package/dist/agents/{middlewareAgent/middleware → middleware}/callLimit.d.ts +3 -3
  37. package/dist/agents/middleware/callLimit.d.ts.map +1 -0
  38. package/dist/agents/{middlewareAgent/middleware → middleware}/callLimit.js +1 -1
  39. package/dist/agents/middleware/callLimit.js.map +1 -0
  40. package/dist/agents/{middlewareAgent/middleware → middleware}/contextEditing.cjs +5 -5
  41. package/dist/agents/middleware/contextEditing.cjs.map +1 -0
  42. package/dist/agents/{middlewareAgent/middleware → middleware}/contextEditing.d.cts +2 -2
  43. package/dist/agents/middleware/contextEditing.d.cts.map +1 -0
  44. package/dist/agents/{middlewareAgent/middleware → middleware}/contextEditing.d.ts +2 -2
  45. package/dist/agents/middleware/contextEditing.d.ts.map +1 -0
  46. package/dist/agents/{middlewareAgent/middleware → middleware}/contextEditing.js +4 -4
  47. package/dist/agents/middleware/contextEditing.js.map +1 -0
  48. package/dist/agents/{middlewareAgent/middleware → middleware}/dynamicSystemPrompt.cjs +6 -6
  49. package/dist/agents/middleware/dynamicSystemPrompt.cjs.map +1 -0
  50. package/dist/agents/{middlewareAgent/middleware → middleware}/dynamicSystemPrompt.d.cts +3 -2
  51. package/dist/agents/middleware/dynamicSystemPrompt.d.cts.map +1 -0
  52. package/dist/agents/{middlewareAgent/middleware → middleware}/dynamicSystemPrompt.d.ts +3 -2
  53. package/dist/agents/middleware/dynamicSystemPrompt.d.ts.map +1 -0
  54. package/dist/agents/{middlewareAgent/middleware → middleware}/dynamicSystemPrompt.js +6 -6
  55. package/dist/agents/middleware/dynamicSystemPrompt.js.map +1 -0
  56. package/dist/agents/middleware/hitl.cjs +404 -0
  57. package/dist/agents/middleware/hitl.cjs.map +1 -0
  58. package/dist/agents/middleware/hitl.d.cts +611 -0
  59. package/dist/agents/middleware/hitl.d.cts.map +1 -0
  60. package/dist/agents/middleware/hitl.d.ts +611 -0
  61. package/dist/agents/middleware/hitl.d.ts.map +1 -0
  62. package/dist/agents/middleware/hitl.js +403 -0
  63. package/dist/agents/middleware/hitl.js.map +1 -0
  64. package/dist/agents/middleware/index.cjs +12 -0
  65. package/dist/agents/middleware/index.js +12 -0
  66. package/dist/agents/{middlewareAgent/middleware → middleware}/llmToolSelector.cjs +7 -7
  67. package/dist/agents/middleware/llmToolSelector.cjs.map +1 -0
  68. package/dist/agents/{middlewareAgent/middleware → middleware}/llmToolSelector.d.cts +2 -2
  69. package/dist/agents/middleware/llmToolSelector.d.cts.map +1 -0
  70. package/dist/agents/{middlewareAgent/middleware → middleware}/llmToolSelector.d.ts +2 -2
  71. package/dist/agents/middleware/llmToolSelector.d.ts.map +1 -0
  72. package/dist/agents/{middlewareAgent/middleware → middleware}/llmToolSelector.js +6 -6
  73. package/dist/agents/middleware/llmToolSelector.js.map +1 -0
  74. package/dist/agents/{middlewareAgent/middleware → middleware}/modelFallback.cjs +28 -21
  75. package/dist/agents/middleware/modelFallback.cjs.map +1 -0
  76. package/dist/agents/{middlewareAgent/middleware → middleware}/modelFallback.d.cts +2 -2
  77. package/dist/agents/middleware/modelFallback.d.cts.map +1 -0
  78. package/dist/agents/{middlewareAgent/middleware → middleware}/modelFallback.d.ts +2 -2
  79. package/dist/agents/middleware/modelFallback.d.ts.map +1 -0
  80. package/dist/agents/{middlewareAgent/middleware → middleware}/modelFallback.js +28 -21
  81. package/dist/agents/middleware/modelFallback.js.map +1 -0
  82. package/dist/agents/{middlewareAgent/middleware → middleware}/piiRedaction.cjs +12 -12
  83. package/dist/agents/middleware/piiRedaction.cjs.map +1 -0
  84. package/dist/agents/{middlewareAgent/middleware → middleware}/piiRedaction.d.cts +4 -4
  85. package/dist/agents/middleware/piiRedaction.d.cts.map +1 -0
  86. package/dist/agents/{middlewareAgent/middleware → middleware}/piiRedaction.d.ts +4 -4
  87. package/dist/agents/middleware/piiRedaction.d.ts.map +1 -0
  88. package/dist/agents/{middlewareAgent/middleware → middleware}/piiRedaction.js +10 -10
  89. package/dist/agents/middleware/piiRedaction.js.map +1 -0
  90. package/dist/agents/{middlewareAgent/middleware → middleware}/promptCaching.cjs +27 -24
  91. package/dist/agents/middleware/promptCaching.cjs.map +1 -0
  92. package/dist/agents/{middlewareAgent/middleware → middleware}/promptCaching.d.cts +3 -3
  93. package/dist/agents/middleware/promptCaching.d.cts.map +1 -0
  94. package/dist/agents/{middlewareAgent/middleware → middleware}/promptCaching.d.ts +3 -3
  95. package/dist/agents/middleware/promptCaching.d.ts.map +1 -0
  96. package/dist/agents/{middlewareAgent/middleware → middleware}/promptCaching.js +26 -23
  97. package/dist/agents/middleware/promptCaching.js.map +1 -0
  98. package/dist/agents/{middlewareAgent/middleware → middleware}/summarization.cjs +7 -12
  99. package/dist/agents/middleware/summarization.cjs.map +1 -0
  100. package/dist/agents/{middlewareAgent/middleware → middleware}/summarization.d.cts +3 -3
  101. package/dist/agents/middleware/summarization.d.cts.map +1 -0
  102. package/dist/agents/{middlewareAgent/middleware → middleware}/summarization.d.ts +3 -3
  103. package/dist/agents/middleware/summarization.d.ts.map +1 -0
  104. package/dist/agents/{middlewareAgent/middleware → middleware}/summarization.js +4 -9
  105. package/dist/agents/middleware/summarization.js.map +1 -0
  106. package/dist/agents/middleware/todoListMiddleware.cjs +314 -0
  107. package/dist/agents/middleware/todoListMiddleware.cjs.map +1 -0
  108. package/dist/agents/middleware/todoListMiddleware.d.cts +75 -0
  109. package/dist/agents/middleware/todoListMiddleware.d.cts.map +1 -0
  110. package/dist/agents/middleware/todoListMiddleware.d.ts +75 -0
  111. package/dist/agents/middleware/todoListMiddleware.d.ts.map +1 -0
  112. package/dist/agents/middleware/todoListMiddleware.js +312 -0
  113. package/dist/agents/middleware/todoListMiddleware.js.map +1 -0
  114. package/dist/agents/{middlewareAgent/middleware → middleware}/toolCallLimit.cjs +2 -2
  115. package/dist/agents/middleware/toolCallLimit.cjs.map +1 -0
  116. package/dist/agents/{middlewareAgent/middleware → middleware}/toolCallLimit.d.cts +3 -3
  117. package/dist/agents/middleware/toolCallLimit.d.cts.map +1 -0
  118. package/dist/agents/{middlewareAgent/middleware → middleware}/toolCallLimit.d.ts +3 -3
  119. package/dist/agents/middleware/toolCallLimit.d.ts.map +1 -0
  120. package/dist/agents/{middlewareAgent/middleware → middleware}/toolCallLimit.js +1 -1
  121. package/dist/agents/middleware/toolCallLimit.js.map +1 -0
  122. package/dist/agents/middleware/types.d.cts +208 -0
  123. package/dist/agents/middleware/types.d.cts.map +1 -0
  124. package/dist/agents/middleware/types.d.ts +208 -0
  125. package/dist/agents/middleware/types.d.ts.map +1 -0
  126. package/dist/agents/{middlewareAgent/middleware → middleware}/utils.cjs +1 -1
  127. package/dist/agents/middleware/utils.cjs.map +1 -0
  128. package/dist/agents/{middlewareAgent/middleware → middleware}/utils.d.cts +1 -1
  129. package/dist/agents/middleware/utils.d.cts.map +1 -0
  130. package/dist/agents/{middlewareAgent/middleware → middleware}/utils.d.ts +1 -1
  131. package/dist/agents/middleware/utils.d.ts.map +1 -0
  132. package/dist/agents/{middlewareAgent/middleware → middleware}/utils.js +1 -1
  133. package/dist/agents/middleware/utils.js.map +1 -0
  134. package/dist/agents/{middlewareAgent/middleware.cjs → middleware.cjs} +11 -4
  135. package/dist/agents/middleware.cjs.map +1 -0
  136. package/dist/agents/middleware.d.cts +205 -0
  137. package/dist/agents/middleware.d.cts.map +1 -0
  138. package/dist/agents/middleware.d.ts +205 -0
  139. package/dist/agents/middleware.d.ts.map +1 -0
  140. package/dist/agents/{middlewareAgent/middleware.js → middleware.js} +11 -4
  141. package/dist/agents/middleware.js.map +1 -0
  142. package/dist/agents/nodes/AfterAgentNode.cjs +27 -0
  143. package/dist/agents/nodes/AfterAgentNode.cjs.map +1 -0
  144. package/dist/agents/nodes/AfterAgentNode.js +27 -0
  145. package/dist/agents/nodes/AfterAgentNode.js.map +1 -0
  146. package/dist/agents/{middlewareAgent/nodes/AfterModalNode.cjs → nodes/AfterModelNode.cjs} +3 -5
  147. package/dist/agents/nodes/AfterModelNode.cjs.map +1 -0
  148. package/dist/agents/{middlewareAgent/nodes/AfterModalNode.js → nodes/AfterModelNode.js} +3 -5
  149. package/dist/agents/nodes/AfterModelNode.js.map +1 -0
  150. package/dist/agents/nodes/AgentNode.cjs +202 -71
  151. package/dist/agents/nodes/AgentNode.cjs.map +1 -1
  152. package/dist/agents/nodes/AgentNode.js +204 -73
  153. package/dist/agents/nodes/AgentNode.js.map +1 -1
  154. package/dist/agents/nodes/BeforeAgentNode.cjs +27 -0
  155. package/dist/agents/nodes/BeforeAgentNode.cjs.map +1 -0
  156. package/dist/agents/nodes/BeforeAgentNode.js +27 -0
  157. package/dist/agents/nodes/BeforeAgentNode.js.map +1 -0
  158. package/dist/agents/{middlewareAgent/nodes/BeforeModalNode.cjs → nodes/BeforeModelNode.cjs} +3 -3
  159. package/dist/agents/nodes/BeforeModelNode.cjs.map +1 -0
  160. package/dist/agents/{middlewareAgent/nodes/BeforeModalNode.js → nodes/BeforeModelNode.js} +3 -3
  161. package/dist/agents/nodes/BeforeModelNode.js.map +1 -0
  162. package/dist/agents/nodes/ToolNode.cjs +157 -47
  163. package/dist/agents/nodes/ToolNode.cjs.map +1 -1
  164. package/dist/agents/nodes/ToolNode.js +158 -48
  165. package/dist/agents/nodes/ToolNode.js.map +1 -1
  166. package/dist/agents/{middlewareAgent/nodes → nodes}/middleware.cjs +35 -10
  167. package/dist/agents/nodes/middleware.cjs.map +1 -0
  168. package/dist/agents/{middlewareAgent/nodes → nodes}/middleware.js +34 -9
  169. package/dist/agents/nodes/middleware.js.map +1 -0
  170. package/dist/agents/nodes/types.d.cts +57 -0
  171. package/dist/agents/nodes/types.d.cts.map +1 -0
  172. package/dist/agents/nodes/types.d.ts +57 -0
  173. package/dist/agents/nodes/types.d.ts.map +1 -0
  174. package/dist/agents/nodes/utils.cjs +64 -0
  175. package/dist/agents/nodes/utils.cjs.map +1 -1
  176. package/dist/agents/nodes/utils.js +62 -1
  177. package/dist/agents/nodes/utils.js.map +1 -1
  178. package/dist/agents/responses.cjs +1 -1
  179. package/dist/agents/responses.cjs.map +1 -1
  180. package/dist/agents/responses.d.cts +9 -2
  181. package/dist/agents/responses.d.cts.map +1 -1
  182. package/dist/agents/responses.d.ts +8 -1
  183. package/dist/agents/responses.d.ts.map +1 -1
  184. package/dist/agents/responses.js +1 -1
  185. package/dist/agents/responses.js.map +1 -1
  186. package/dist/agents/runtime.d.cts +123 -0
  187. package/dist/agents/runtime.d.cts.map +1 -0
  188. package/dist/agents/runtime.d.ts +123 -0
  189. package/dist/agents/runtime.d.ts.map +1 -0
  190. package/dist/agents/tests/utils.cjs +13 -5
  191. package/dist/agents/tests/utils.cjs.map +1 -1
  192. package/dist/agents/tests/utils.d.cts +17 -8
  193. package/dist/agents/tests/utils.d.cts.map +1 -1
  194. package/dist/agents/tests/utils.d.ts +14 -5
  195. package/dist/agents/tests/utils.d.ts.map +1 -1
  196. package/dist/agents/tests/utils.js +13 -5
  197. package/dist/agents/tests/utils.js.map +1 -1
  198. package/dist/agents/tools.d.cts +9 -0
  199. package/dist/agents/tools.d.cts.map +1 -0
  200. package/dist/agents/tools.d.ts +9 -0
  201. package/dist/agents/tools.d.ts.map +1 -0
  202. package/dist/agents/types.d.cts +125 -126
  203. package/dist/agents/types.d.cts.map +1 -1
  204. package/dist/agents/types.d.ts +125 -126
  205. package/dist/agents/types.d.ts.map +1 -1
  206. package/dist/agents/utils.cjs +141 -38
  207. package/dist/agents/utils.cjs.map +1 -1
  208. package/dist/agents/utils.js +142 -40
  209. package/dist/agents/utils.js.map +1 -1
  210. package/dist/chat_models/universal.cjs +4 -0
  211. package/dist/chat_models/universal.cjs.map +1 -1
  212. package/dist/chat_models/universal.d.cts +6 -2
  213. package/dist/chat_models/universal.d.cts.map +1 -1
  214. package/dist/chat_models/universal.d.ts +4 -0
  215. package/dist/chat_models/universal.d.ts.map +1 -1
  216. package/dist/chat_models/universal.js +4 -0
  217. package/dist/chat_models/universal.js.map +1 -1
  218. package/dist/hub/base.cjs +4 -3
  219. package/dist/hub/base.cjs.map +1 -1
  220. package/dist/hub/base.d.cts +0 -4
  221. package/dist/hub/base.d.cts.map +1 -1
  222. package/dist/hub/base.d.ts +0 -4
  223. package/dist/hub/base.d.ts.map +1 -1
  224. package/dist/hub/base.js +4 -3
  225. package/dist/hub/base.js.map +1 -1
  226. package/dist/index.cjs +18 -38
  227. package/dist/index.cjs.map +1 -1
  228. package/dist/index.d.cts +21 -21
  229. package/dist/index.d.ts +21 -21
  230. package/dist/index.js +17 -26
  231. package/dist/index.js.map +1 -1
  232. package/dist/load/import_map.cjs +0 -2
  233. package/dist/load/import_map.cjs.map +1 -1
  234. package/dist/load/import_map.js +0 -2
  235. package/dist/load/import_map.js.map +1 -1
  236. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/client.cjs +74 -18
  237. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.cjs.map +1 -0
  238. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/client.js +75 -19
  239. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.js.map +1 -0
  240. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/env.cjs +1 -1
  241. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/env.cjs.map +1 -1
  242. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/env.js +1 -1
  243. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/env.js.map +1 -1
  244. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/constants.cjs +1 -1
  245. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/constants.cjs.map +1 -1
  246. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/constants.js +1 -1
  247. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/constants.js.map +1 -1
  248. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/translator.cjs +1 -1
  249. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/translator.cjs.map +1 -1
  250. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/translator.js +1 -1
  251. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/translator.js.map +1 -1
  252. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/index.cjs +2 -2
  253. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/index.cjs.map +1 -1
  254. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/index.js +2 -2
  255. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/index.js.map +1 -1
  256. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/run_trees.cjs +7 -5
  257. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.cjs.map +1 -0
  258. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/run_trees.js +7 -5
  259. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.js.map +1 -0
  260. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/constants.cjs +1 -1
  261. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/constants.cjs.map +1 -1
  262. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/constants.js +1 -1
  263. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/constants.js.map +1 -1
  264. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/fetch.cjs +1 -1
  265. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/fetch.cjs.map +1 -1
  266. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/fetch.js +1 -1
  267. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/fetch.js.map +1 -1
  268. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/otel.cjs +1 -1
  269. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/otel.cjs.map +1 -1
  270. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/otel.js +1 -1
  271. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/otel.js.map +1 -1
  272. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/_uuid.cjs +1 -1
  273. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/_uuid.cjs.map +1 -1
  274. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/_uuid.js +1 -1
  275. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/_uuid.js.map +1 -1
  276. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/async_caller.cjs +1 -1
  277. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/async_caller.cjs.map +1 -1
  278. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/async_caller.js +1 -1
  279. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/async_caller.js.map +1 -1
  280. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/env.cjs +19 -23
  281. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.cjs.map +1 -0
  282. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/env.js +19 -23
  283. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.js.map +1 -0
  284. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/error.cjs +16 -3
  285. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.cjs.map +1 -0
  286. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/error.js +16 -3
  287. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.js.map +1 -0
  288. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs +1 -1
  289. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs.map +1 -1
  290. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js +1 -1
  291. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js.map +1 -1
  292. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/messages.cjs +1 -1
  293. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/messages.cjs.map +1 -1
  294. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/messages.js +1 -1
  295. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/messages.js.map +1 -1
  296. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/project.cjs +1 -1
  297. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/project.cjs.map +1 -1
  298. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/project.js +1 -1
  299. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/project.js.map +1 -1
  300. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/prompts.cjs +1 -1
  301. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/prompts.cjs.map +1 -1
  302. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/prompts.js +1 -1
  303. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/prompts.js.map +1 -1
  304. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/warn.cjs +1 -1
  305. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/warn.cjs.map +1 -1
  306. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/warn.js +1 -1
  307. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/warn.js.map +1 -1
  308. package/package.json +4 -18
  309. package/dist/agents/RunnableCallable.d.cts +0 -41
  310. package/dist/agents/RunnableCallable.d.cts.map +0 -1
  311. package/dist/agents/RunnableCallable.d.ts +0 -41
  312. package/dist/agents/RunnableCallable.d.ts.map +0 -1
  313. package/dist/agents/annotation.d.cts +0 -52
  314. package/dist/agents/annotation.d.cts.map +0 -1
  315. package/dist/agents/annotation.d.ts +0 -52
  316. package/dist/agents/annotation.d.ts.map +0 -1
  317. package/dist/agents/createAgent.cjs +0 -10
  318. package/dist/agents/createAgent.cjs.map +0 -1
  319. package/dist/agents/createAgent.js +0 -10
  320. package/dist/agents/createAgent.js.map +0 -1
  321. package/dist/agents/interrupt.cjs +0 -2
  322. package/dist/agents/interrupt.d.cts +0 -81
  323. package/dist/agents/interrupt.d.cts.map +0 -1
  324. package/dist/agents/interrupt.d.ts +0 -81
  325. package/dist/agents/interrupt.d.ts.map +0 -1
  326. package/dist/agents/interrupt.js +0 -3
  327. package/dist/agents/middlewareAgent/ReactAgent.cjs +0 -579
  328. package/dist/agents/middlewareAgent/ReactAgent.cjs.map +0 -1
  329. package/dist/agents/middlewareAgent/ReactAgent.d.cts +0 -234
  330. package/dist/agents/middlewareAgent/ReactAgent.d.cts.map +0 -1
  331. package/dist/agents/middlewareAgent/ReactAgent.d.ts +0 -234
  332. package/dist/agents/middlewareAgent/ReactAgent.d.ts.map +0 -1
  333. package/dist/agents/middlewareAgent/ReactAgent.js +0 -578
  334. package/dist/agents/middlewareAgent/ReactAgent.js.map +0 -1
  335. package/dist/agents/middlewareAgent/annotation.cjs +0 -45
  336. package/dist/agents/middlewareAgent/annotation.cjs.map +0 -1
  337. package/dist/agents/middlewareAgent/annotation.js +0 -44
  338. package/dist/agents/middlewareAgent/annotation.js.map +0 -1
  339. package/dist/agents/middlewareAgent/constants.d.cts +0 -5
  340. package/dist/agents/middlewareAgent/constants.d.cts.map +0 -1
  341. package/dist/agents/middlewareAgent/constants.d.ts +0 -5
  342. package/dist/agents/middlewareAgent/constants.d.ts.map +0 -1
  343. package/dist/agents/middlewareAgent/index.cjs +0 -11
  344. package/dist/agents/middlewareAgent/index.cjs.map +0 -1
  345. package/dist/agents/middlewareAgent/index.js +0 -11
  346. package/dist/agents/middlewareAgent/index.js.map +0 -1
  347. package/dist/agents/middlewareAgent/middleware/callLimit.cjs.map +0 -1
  348. package/dist/agents/middlewareAgent/middleware/callLimit.d.cts.map +0 -1
  349. package/dist/agents/middlewareAgent/middleware/callLimit.d.ts.map +0 -1
  350. package/dist/agents/middlewareAgent/middleware/callLimit.js.map +0 -1
  351. package/dist/agents/middlewareAgent/middleware/contextEditing.cjs.map +0 -1
  352. package/dist/agents/middlewareAgent/middleware/contextEditing.d.cts.map +0 -1
  353. package/dist/agents/middlewareAgent/middleware/contextEditing.d.ts.map +0 -1
  354. package/dist/agents/middlewareAgent/middleware/contextEditing.js.map +0 -1
  355. package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.cjs.map +0 -1
  356. package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.cts.map +0 -1
  357. package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.ts.map +0 -1
  358. package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.js.map +0 -1
  359. package/dist/agents/middlewareAgent/middleware/hitl.cjs +0 -341
  360. package/dist/agents/middlewareAgent/middleware/hitl.cjs.map +0 -1
  361. package/dist/agents/middlewareAgent/middleware/hitl.d.cts +0 -524
  362. package/dist/agents/middlewareAgent/middleware/hitl.d.cts.map +0 -1
  363. package/dist/agents/middlewareAgent/middleware/hitl.d.ts +0 -524
  364. package/dist/agents/middlewareAgent/middleware/hitl.d.ts.map +0 -1
  365. package/dist/agents/middlewareAgent/middleware/hitl.js +0 -340
  366. package/dist/agents/middlewareAgent/middleware/hitl.js.map +0 -1
  367. package/dist/agents/middlewareAgent/middleware/index.cjs +0 -52
  368. package/dist/agents/middlewareAgent/middleware/index.cjs.map +0 -1
  369. package/dist/agents/middlewareAgent/middleware/index.d.cts +0 -13
  370. package/dist/agents/middlewareAgent/middleware/index.d.ts +0 -13
  371. package/dist/agents/middlewareAgent/middleware/index.js +0 -34
  372. package/dist/agents/middlewareAgent/middleware/index.js.map +0 -1
  373. package/dist/agents/middlewareAgent/middleware/llmToolSelector.cjs.map +0 -1
  374. package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.cts.map +0 -1
  375. package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.ts.map +0 -1
  376. package/dist/agents/middlewareAgent/middleware/llmToolSelector.js.map +0 -1
  377. package/dist/agents/middlewareAgent/middleware/modelFallback.cjs.map +0 -1
  378. package/dist/agents/middlewareAgent/middleware/modelFallback.d.cts.map +0 -1
  379. package/dist/agents/middlewareAgent/middleware/modelFallback.d.ts.map +0 -1
  380. package/dist/agents/middlewareAgent/middleware/modelFallback.js.map +0 -1
  381. package/dist/agents/middlewareAgent/middleware/piiRedaction.cjs.map +0 -1
  382. package/dist/agents/middlewareAgent/middleware/piiRedaction.d.cts.map +0 -1
  383. package/dist/agents/middlewareAgent/middleware/piiRedaction.d.ts.map +0 -1
  384. package/dist/agents/middlewareAgent/middleware/piiRedaction.js.map +0 -1
  385. package/dist/agents/middlewareAgent/middleware/promptCaching.cjs.map +0 -1
  386. package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts.map +0 -1
  387. package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts.map +0 -1
  388. package/dist/agents/middlewareAgent/middleware/promptCaching.js.map +0 -1
  389. package/dist/agents/middlewareAgent/middleware/summarization.cjs.map +0 -1
  390. package/dist/agents/middlewareAgent/middleware/summarization.d.cts.map +0 -1
  391. package/dist/agents/middlewareAgent/middleware/summarization.d.ts.map +0 -1
  392. package/dist/agents/middlewareAgent/middleware/summarization.js.map +0 -1
  393. package/dist/agents/middlewareAgent/middleware/toolCallLimit.cjs.map +0 -1
  394. package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.cts.map +0 -1
  395. package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.ts.map +0 -1
  396. package/dist/agents/middlewareAgent/middleware/toolCallLimit.js.map +0 -1
  397. package/dist/agents/middlewareAgent/middleware/utils.cjs.map +0 -1
  398. package/dist/agents/middlewareAgent/middleware/utils.d.cts.map +0 -1
  399. package/dist/agents/middlewareAgent/middleware/utils.d.ts.map +0 -1
  400. package/dist/agents/middlewareAgent/middleware/utils.js.map +0 -1
  401. package/dist/agents/middlewareAgent/middleware.cjs.map +0 -1
  402. package/dist/agents/middlewareAgent/middleware.d.cts +0 -117
  403. package/dist/agents/middlewareAgent/middleware.d.cts.map +0 -1
  404. package/dist/agents/middlewareAgent/middleware.d.ts +0 -117
  405. package/dist/agents/middlewareAgent/middleware.d.ts.map +0 -1
  406. package/dist/agents/middlewareAgent/middleware.js.map +0 -1
  407. package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs.map +0 -1
  408. package/dist/agents/middlewareAgent/nodes/AfterModalNode.js.map +0 -1
  409. package/dist/agents/middlewareAgent/nodes/AgentNode.cjs +0 -468
  410. package/dist/agents/middlewareAgent/nodes/AgentNode.cjs.map +0 -1
  411. package/dist/agents/middlewareAgent/nodes/AgentNode.js +0 -467
  412. package/dist/agents/middlewareAgent/nodes/AgentNode.js.map +0 -1
  413. package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs.map +0 -1
  414. package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js.map +0 -1
  415. package/dist/agents/middlewareAgent/nodes/middleware.cjs.map +0 -1
  416. package/dist/agents/middlewareAgent/nodes/middleware.js.map +0 -1
  417. package/dist/agents/middlewareAgent/nodes/utils.cjs +0 -66
  418. package/dist/agents/middlewareAgent/nodes/utils.cjs.map +0 -1
  419. package/dist/agents/middlewareAgent/nodes/utils.js +0 -63
  420. package/dist/agents/middlewareAgent/nodes/utils.js.map +0 -1
  421. package/dist/agents/middlewareAgent/types.d.cts +0 -472
  422. package/dist/agents/middlewareAgent/types.d.cts.map +0 -1
  423. package/dist/agents/middlewareAgent/types.d.ts +0 -472
  424. package/dist/agents/middlewareAgent/types.d.ts.map +0 -1
  425. package/dist/agents/nodes/ToolNode.d.cts +0 -97
  426. package/dist/agents/nodes/ToolNode.d.cts.map +0 -1
  427. package/dist/agents/nodes/ToolNode.d.ts +0 -97
  428. package/dist/agents/nodes/ToolNode.d.ts.map +0 -1
  429. package/dist/agents/types.cjs +0 -7
  430. package/dist/agents/types.cjs.map +0 -1
  431. package/dist/agents/types.js +0 -6
  432. package/dist/agents/types.js.map +0 -1
  433. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.cjs.map +0 -1
  434. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.js.map +0 -1
  435. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.cjs.map +0 -1
  436. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.js.map +0 -1
  437. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.cjs.map +0 -1
  438. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.js.map +0 -1
  439. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.cjs.map +0 -1
  440. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.js.map +0 -1
  441. /package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/index.cjs +0 -0
  442. /package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/index.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.cts","names":["InteropZodObject","InteropZodDefault","InteropZodOptional","InteropZodType","InferInteropZodInput","InferInteropZodOutput","LangGraphRunnableConfig","START","PregelOptions","Runtime","LangGraphRuntime","END","LanguageModelLike","BaseMessage","BaseCheckpointSaver","BaseStore","Messages","JUMP_TO_TARGETS","AnyAnnotationRoot","ToAnnotationRoot","ResponseFormat","ToolStrategy","TypedToolStrategy","ProviderStrategy","JsonSchemaFormat","ResponseFormatUndefined","ToolNode","ClientTool","ServerTool","N","Interrupt","TValue","BuiltInState","JumpToTarget","UserInput","ToolCall","Record","ToolResult","ModelRequest","IsOptionalZodObject","T","IsDefaultZodObject","WithMaybeContext","TContext","Omit","Partial","PrivateState","MiddlewareResult","TState","AgentBuiltInState","FilterPrivateProps","K","InferMiddlewareState","AgentMiddleware","S","InferMiddlewareInputState","InferMiddlewareStates","First","Rest","InferMiddlewareInputStates","InferMergedState","InferMergedInputState","InferMiddlewareContext","C","InferMiddlewareContextInput","Inner","InferMiddlewareContexts","MergeContextTypes","A","B","InferMiddlewareContextInputs","JumpTo","TSchema","TContextSchema","TFullContext","Promise","Error","ExecutedToolCall","CreateAgentParams","StructuredResponseType","ContextSchema","ResponseFormatType","AbortSignal","IsOptionalType","ExtractNonUndefined","IsAllOptional","InferContextInput","IsDefaultContext","InferAgentConfig","TMiddleware","RunLevelPrivateState","ThreadLevelPrivateState","InternalAgentState","CreateAgentPregelOptions","InvokeConfiguration","Pick","StreamConfiguration"],"sources":["../../../src/agents/middlewareAgent/types.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { InteropZodObject, InteropZodDefault, InteropZodOptional, InteropZodType, InferInteropZodInput, InferInteropZodOutput } from \"@langchain/core/utils/types\";\nimport type { LangGraphRunnableConfig, START, PregelOptions, Runtime as LangGraphRuntime, END } from \"@langchain/langgraph\";\nimport type { LanguageModelLike } from \"@langchain/core/language_models/base\";\nimport type { BaseMessage } from \"@langchain/core/messages\";\nimport type { BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport type { Messages } from \"@langchain/langgraph/\";\nimport { JUMP_TO_TARGETS } from \"./constants.js\";\nimport type { AnyAnnotationRoot, ToAnnotationRoot } from \"../annotation.js\";\nimport type { ResponseFormat, ToolStrategy, TypedToolStrategy, ProviderStrategy, JsonSchemaFormat } from \"../responses.js\";\nimport type { ResponseFormatUndefined } from \"../annotation.js\";\nimport type { ToolNode } from \"../nodes/ToolNode.js\";\nimport type { ClientTool, ServerTool } from \"../types.js\";\nexport type N = typeof START | \"model_request\" | \"tools\";\n/**\n * Represents information about an interrupt.\n */\nexport interface Interrupt<TValue = unknown> {\n /**\n * The ID of the interrupt.\n */\n id: string;\n /**\n * The requests for human input.\n */\n value: TValue;\n}\nexport interface BuiltInState {\n messages: BaseMessage[];\n __interrupt__?: Interrupt[];\n /**\n * Optional property to control routing after afterModel middleware execution.\n * When set by middleware, the agent will jump to the specified node instead of\n * following normal routing logic. The property is automatically cleared after use.\n *\n * - \"model_request\": Jump back to the model for another LLM call\n * - \"tools\": Jump to tool execution (requires tools to be available)\n */\n jumpTo?: JumpToTarget;\n}\n/**\n * Base input type for `.invoke` and `.stream` methods.\n */\nexport type UserInput = {\n messages: Messages;\n};\n/**\n * Information about a tool call that has been executed.\n */\nexport interface ToolCall {\n /**\n * The ID of the tool call.\n */\n id: string;\n /**\n * The name of the tool that was called.\n */\n name: string;\n /**\n * The arguments that were passed to the tool.\n */\n args: Record<string, any>;\n /**\n * The result of the tool call.\n */\n result?: unknown;\n /**\n * An optional error message if the tool call failed.\n */\n error?: string;\n}\n/**\n * Information about a tool result from a tool execution.\n */\nexport interface ToolResult {\n /**\n * The ID of the tool call.\n */\n id: string;\n /**\n * The result of the tool call.\n */\n result: any;\n /**\n * An optional error message if the tool call failed.\n */\n error?: string;\n}\n/**\n * Configuration for modifying a model call at runtime.\n * All fields are optional and only provided fields will override defaults.\n */\nexport interface ModelRequest {\n /**\n * The model to use for this step.\n */\n model: LanguageModelLike;\n /**\n * The messages to send to the model.\n */\n messages: BaseMessage[];\n /**\n * The system message for this step.\n */\n systemPrompt?: string;\n /**\n * Tool choice configuration (model-specific format).\n * Can be one of:\n * - `\"auto\"`: means the model can pick between generating a message or calling one or more tools.\n * - `\"none\"`: means the model will not call any tool and instead generates a message.\n * - `\"required\"`: means the model must call one or more tools.\n * - `{ type: \"function\", function: { name: string } }`: The model will use the specified function.\n */\n toolChoice?: \"auto\" | \"none\" | \"required\" | {\n type: \"function\";\n function: {\n name: string;\n };\n };\n /**\n * The tools to make available for this step.\n */\n tools: (ServerTool | ClientTool)[];\n}\n/**\n * Type helper to check if TContext is an optional Zod schema\n */\ntype IsOptionalZodObject<T> = T extends InteropZodOptional<any> ? true : false;\ntype IsDefaultZodObject<T> = T extends InteropZodDefault<any> ? true : false;\nexport type WithMaybeContext<TContext> = undefined extends TContext ? {\n readonly context?: TContext;\n} : IsOptionalZodObject<TContext> extends true ? {\n readonly context?: TContext;\n} : IsDefaultZodObject<TContext> extends true ? {\n readonly context?: TContext;\n} : {\n readonly context: TContext;\n};\n/**\n * Runtime information available to middleware (readonly).\n */\nexport type Runtime<TContext = unknown> = Partial<Omit<LangGraphRuntime<TContext>, \"context\" | \"configurable\">> & WithMaybeContext<TContext> & PrivateState;\n/**\n * Result type for middleware functions.\n */\nexport type MiddlewareResult<TState> = TState | void;\n/**\n * Type for the agent's built-in state properties.\n */\nexport type AgentBuiltInState = {\n messages: BaseMessage[];\n};\n/**\n * Helper type to filter out properties that start with underscore (private properties)\n */\ntype FilterPrivateProps<T> = {\n [K in keyof T as K extends `_${string}` ? never : K]: T[K];\n};\n/**\n * Helper type to infer the state schema type from a middleware\n * This filters out private properties (those starting with underscore)\n */\nexport type InferMiddlewareState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodOutput<S>> : {} : {};\n/**\n * Helper type to infer the input state schema type from a middleware (all properties optional)\n * This filters out private properties (those starting with underscore)\n */\nexport type InferMiddlewareInputState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodInput<S>> : {} : {};\n/**\n * Helper type to infer merged state from an array of middleware (just the middleware states)\n */\nexport type InferMiddlewareStates<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareState<First> & InferMiddlewareStates<Rest> : InferMiddlewareState<First> : {} : {};\n/**\n * Helper type to infer merged input state from an array of middleware (with optional defaults)\n */\nexport type InferMiddlewareInputStates<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareInputState<First> & InferMiddlewareInputStates<Rest> : InferMiddlewareInputState<First> : {} : {};\n/**\n * Helper type to infer merged state from an array of middleware (includes built-in state)\n */\nexport type InferMergedState<T extends readonly AgentMiddleware<any, any, any>[]> = InferMiddlewareStates<T> & AgentBuiltInState;\n/**\n * Helper type to infer merged input state from an array of middleware (includes built-in state)\n */\nexport type InferMergedInputState<T extends readonly AgentMiddleware<any, any, any>[]> = InferMiddlewareInputStates<T> & AgentBuiltInState;\n/**\n * Helper type to infer the context schema type from a middleware\n */\nexport type InferMiddlewareContext<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<any, infer C, any> ? C extends InteropZodObject ? InferInteropZodInput<C> : {} : {};\n/**\n * Helper type to infer the input context schema type from a middleware (with optional defaults)\n */\nexport type InferMiddlewareContextInput<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<any, infer C, any> ? C extends InteropZodOptional<infer Inner> ? InferInteropZodInput<Inner> | undefined : C extends InteropZodObject ? InferInteropZodInput<C> : {} : {};\n/**\n * Helper type to infer merged context from an array of middleware\n */\nexport type InferMiddlewareContexts<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareContext<First> & InferMiddlewareContexts<Rest> : InferMiddlewareContext<First> : {} : {};\n/**\n * Helper to merge two context types, preserving undefined unions\n */\ntype MergeContextTypes<A, B> = [A] extends [undefined] ? [B] extends [undefined] ? undefined : B | undefined : [B] extends [undefined] ? A | undefined : [A] extends [B] ? A : [B] extends [A] ? B : A & B;\n/**\n * Helper type to infer merged input context from an array of middleware (with optional defaults)\n */\nexport type InferMiddlewareContextInputs<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? MergeContextTypes<InferMiddlewareContextInput<First>, InferMiddlewareContextInputs<Rest>> : InferMiddlewareContextInput<First> : {} : {};\n/**\n * jump targets (user facing)\n */\nexport type JumpToTarget = (typeof JUMP_TO_TARGETS)[number];\n/**\n * jump targets (internal)\n */\nexport type JumpTo = \"model_request\" | \"tools\" | typeof END;\n/**\n * Base middleware interface.\n */\nexport interface AgentMiddleware<TSchema extends InteropZodObject | undefined = undefined, TContextSchema extends InteropZodObject | InteropZodDefault<InteropZodObject> | InteropZodOptional<InteropZodObject> | undefined = undefined, TFullContext = any> {\n stateSchema?: TSchema;\n contextSchema?: TContextSchema;\n name: string;\n beforeModelJumpTo?: JumpToTarget[];\n afterModelJumpTo?: JumpToTarget[];\n tools?: (ClientTool | ServerTool)[];\n /**\n * Runs before each LLM call, can modify call parameters, changes are not persistent\n * e.g. if you change `model`, it will only be changed for the next model call\n *\n * @param options - Current call options (can be modified by previous middleware)\n * @param state - Current state (read-only in this phase)\n * @param runtime - Runtime context and metadata\n * @returns Modified options or undefined to pass through\n */\n modifyModelRequest?(request: ModelRequest, state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<Partial<ModelRequest> | void> | Partial<ModelRequest> | void;\n /**\n * Logic to handle model invocation errors and optionally retry.\n *\n * @param error - The exception that occurred during model invocation.\n * @param request - The original model request that failed.\n * @param state - The current agent state.\n * @param runtime - The runtime context.\n * @param attempt - The current attempt number (1-indexed).\n * @returns Modified request to retry with, or undefined/null to propagate the error (re-raise).\n */\n retryModelRequest?(error: Error, request: ModelRequest, state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>, attempt: number): Promise<ModelRequest | void> | ModelRequest | void;\n beforeModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;\n afterModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;\n}\n/**\n * Information about a tool call that has been executed.\n */\nexport interface ExecutedToolCall {\n /**\n * The name of the tool that was called.\n */\n name: string;\n /**\n * The arguments that were passed to the tool.\n */\n args: Record<string, unknown>;\n /**\n * The ID of the tool call.\n */\n tool_id: string;\n /**\n * The result of the tool call (if available).\n */\n result?: unknown;\n}\nexport type CreateAgentParams<StructuredResponseType extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, ResponseFormatType = InteropZodType<StructuredResponseType> | InteropZodType<unknown>[] | JsonSchemaFormat | JsonSchemaFormat[] | ResponseFormat | TypedToolStrategy<StructuredResponseType> | ToolStrategy<StructuredResponseType> | ProviderStrategy<StructuredResponseType> | ResponseFormatUndefined> = {\n /**\n * Defines a model to use for the agent. You can either pass in an instance of a LangChain chat model\n * or a string. If a string is provided the agent initializes a ChatModel based on the provided model name and provider.\n * It supports various model providers and allows for runtime configuration of model parameters.\n *\n * @uses {@link initChatModel}\n * @example\n * ```ts\n * const agent = createAgent({\n * model: \"anthropic:claude-3-7-sonnet-latest\",\n * // ...\n * });\n * ```\n *\n * @example\n * ```ts\n * import { ChatOpenAI } from \"@langchain/openai\";\n * const agent = createAgent({\n * model: new ChatOpenAI({ model: \"gpt-4o\" }),\n * // ...\n * });\n * ```\n */\n model: string | LanguageModelLike;\n /**\n * A list of tools or a ToolNode.\n *\n * @example\n * ```ts\n * import { tool } from \"langchain\";\n *\n * const weatherTool = tool(() => \"Sunny!\", {\n * name: \"get_weather\",\n * description: \"Get the weather for a location\",\n * schema: z.object({\n * location: z.string().describe(\"The location to get weather for\"),\n * }),\n * });\n *\n * const agent = createAgent({\n * tools: [weatherTool],\n * // ...\n * });\n * ```\n */\n tools?: ToolNode | (ServerTool | ClientTool)[];\n /**\n * An optional prompt for the LLM. This takes full graph state BEFORE the LLM is called and prepares the input to LLM.\n *\n * Can take a few different forms:\n *\n * - str: This is converted to a SystemMessage and added to the beginning of the list of messages in state[\"messages\"].\n * - SystemMessage: this is added to the beginning of the list of messages in state[\"messages\"].\n * - Function: This function should take in full graph state and the output is then passed to the language model.\n * - Runnable: This runnable should take in full graph state and the output is then passed to the language model.\n *\n * Note:\n * Prior to `v0.2.46`, the prompt was set using `stateModifier` / `messagesModifier` parameters.\n * This is now deprecated and will be removed in a future release.\n *\n * Cannot be used together with `modifyModelRequest`.\n */\n systemPrompt?: string;\n /**\n * An optional schema for the context. It allows to pass in a typed context object into the agent\n * invocation and allows to access it in hooks such as `prompt` and middleware.\n * As opposed to the agent state, defined in `stateSchema`, the context is not persisted between\n * agent invocations.\n *\n * @example\n * ```ts\n * const agent = createAgent({\n * llm: model,\n * tools: [getWeather],\n * contextSchema: z.object({\n * capital: z.string(),\n * }),\n * prompt: (state, config) => {\n * return [\n * new SystemMessage(`You are a helpful assistant. The capital of France is ${config.context.capital}.`),\n * ];\n * },\n * });\n *\n * const result = await agent.invoke({\n * messages: [\n * new SystemMessage(\"You are a helpful assistant.\"),\n * new HumanMessage(\"What is the capital of France?\"),\n * ],\n * }, {\n * context: {\n * capital: \"Paris\",\n * },\n * });\n * ```\n */\n contextSchema?: ContextSchema;\n /** An optional checkpoint saver to persist the agent's state. */\n checkpointSaver?: BaseCheckpointSaver | boolean;\n /** An optional checkpoint saver to persist the agent's state. Alias of \"checkpointSaver\". */\n checkpointer?: BaseCheckpointSaver | boolean;\n /**\n * An optional store to persist the agent's state.\n * @see {@link https://docs.langchain.com/oss/javascript/langgraph/memory#memory-storage | Long-term memory}\n */\n store?: BaseStore;\n /**\n * An optional schema for the final agent output.\n *\n * If provided, output will be formatted to match the given schema and returned in the 'structuredResponse' state key.\n * If not provided, `structuredResponse` will not be present in the output state.\n *\n * Can be passed in as:\n * - Zod schema\n * ```ts\n * const agent = createAgent({\n * responseFormat: z.object({\n * capital: z.string(),\n * }),\n * // ...\n * });\n * ```\n * - JSON schema\n * ```ts\n * const agent = createAgent({\n * responseFormat: {\n * type: \"json_schema\",\n * schema: {\n * type: \"object\",\n * properties: {\n * capital: { type: \"string\" },\n * },\n * required: [\"capital\"],\n * },\n * },\n * // ...\n * });\n * ```\n * - Create React Agent ResponseFormat\n * ```ts\n * import { providerStrategy, toolStrategy } from \"langchain\";\n * const agent = createAgent({\n * responseFormat: providerStrategy(\n * z.object({\n * capital: z.string(),\n * })\n * ),\n * // or\n * responseFormat: [\n * toolStrategy({ ... }),\n * toolStrategy({ ... }),\n * ]\n * // ...\n * });\n * ```\n *\n * **Note**: The graph will make a separate call to the LLM to generate the structured response after the agent loop is finished.\n * This is not the only strategy to get structured responses, see more options in [this guide](https://langchain-ai.github.io/langgraph/how-tos/react-agent-structured-output/).\n */\n responseFormat?: ResponseFormatType;\n /**\n * Middleware instances to run during agent execution.\n * Each middleware can define its own state schema and hook into the agent lifecycle.\n */\n middleware?: readonly AgentMiddleware<any, any, any>[];\n /**\n * An optional name for the agent.\n */\n name?: string;\n /**\n * An optional description for the agent.\n * This can be used to describe the agent to the underlying supervisor LLM.\n */\n description?: string;\n /**\n * Use to specify how to expose the agent name to the underlying supervisor LLM.\n * - `undefined`: Relies on the LLM provider {@link AIMessage#name}. Currently, only OpenAI supports this.\n * - `\"inline\"`: Add the agent name directly into the content field of the {@link AIMessage} using XML-style tags.\n * Example: `\"How can I help you\"` -> `\"<name>agent_name</name><content>How can I help you?</content>\"`\n */\n includeAgentName?: \"inline\" | undefined;\n /**\n * An optional abort signal that indicates that the overall operation should be aborted.\n */\n signal?: AbortSignal;\n /**\n * Determines the version of the graph to create.\n *\n * Can be one of\n * - `\"v1\"`: The tool node processes a single message. All tool calls in the message are\n * executed in parallel within the tool node.\n * - `\"v2\"`: The tool node processes a single tool call. Tool calls are distributed across\n * multiple instances of the tool node using the Send API.\n *\n * @default `\"v2\"`\n */\n version?: \"v1\" | \"v2\";\n};\n/**\n * Helper type to check if a type is optional (includes undefined)\n */\ntype IsOptionalType<T> = undefined extends T ? true : false;\n/**\n * Extract non-undefined part of a union that includes undefined\n */\ntype ExtractNonUndefined<T> = T extends undefined ? never : T;\n/**\n * Helper type to check if all properties of a type are optional\n */\nexport type IsAllOptional<T> = \n// If T includes undefined, then it's optional (can be omitted entirely)\nundefined extends T ? true : IsOptionalType<T> extends true ? true : ExtractNonUndefined<T> extends Record<string, any> ? {} extends ExtractNonUndefined<T> ? true : false : IsOptionalType<T>;\n/**\n * Helper type to extract input type from context schema (with optional defaults)\n */\nexport type InferContextInput<ContextSchema extends AnyAnnotationRoot | InteropZodObject> = ContextSchema extends InteropZodObject ? InferInteropZodInput<ContextSchema> : ContextSchema extends AnyAnnotationRoot ? ToAnnotationRoot<ContextSchema>[\"State\"] : {};\n/**\n * Helper to check if ContextSchema is the default (AnyAnnotationRoot)\n */\ntype IsDefaultContext<T> = [T] extends [AnyAnnotationRoot] ? any extends T ? true : false : false;\n/**\n * Helper type to get the required config type based on context schema\n */\nexport type InferAgentConfig<ContextSchema extends AnyAnnotationRoot | InteropZodObject, TMiddleware extends readonly AgentMiddleware<any, any, any>[]> = IsDefaultContext<ContextSchema> extends true ? TMiddleware extends readonly [] ? LangGraphRunnableConfig | undefined // No middleware, no context needed\n : WithMaybeContext<InferMiddlewareContextInputs<TMiddleware>> extends {\n readonly context?: any;\n} ? LangGraphRunnableConfig<{\n context?: InferMiddlewareContextInputs<TMiddleware>;\n}> | undefined : LangGraphRunnableConfig<{\n context: InferMiddlewareContextInputs<TMiddleware>;\n}> : WithMaybeContext<InferContextInput<ContextSchema> & InferMiddlewareContextInputs<TMiddleware>> extends {\n readonly context?: any;\n} ? LangGraphRunnableConfig<{\n context?: InferContextInput<ContextSchema> & InferMiddlewareContextInputs<TMiddleware>;\n}> | undefined : LangGraphRunnableConfig<{\n context: InferContextInput<ContextSchema> & InferMiddlewareContextInputs<TMiddleware>;\n}>;\nexport interface RunLevelPrivateState {\n /**\n * The number of times the model has been called at the run level.\n * This includes multiple agent invocations.\n */\n runModelCallCount: number;\n}\nexport interface ThreadLevelPrivateState {\n /**\n * The number of times the model has been called at the thread level.\n * This includes multiple agent invocations within different environments\n * using the same thread.\n */\n threadLevelCallCount: number;\n}\n/**\n * As private state we consider all information we want to track within\n * the lifecycle of the agent, without exposing it to the user. These informations\n * are propagated to the user as _readonly_ runtime properties.\n */\nexport interface PrivateState extends ThreadLevelPrivateState, RunLevelPrivateState {\n}\nexport type InternalAgentState<StructuredResponseType extends Record<string, unknown> | undefined = Record<string, unknown>> = {\n messages: BaseMessage[];\n _privateState?: PrivateState;\n} & (StructuredResponseType extends ResponseFormatUndefined ? Record<string, never> : {\n structuredResponse: StructuredResponseType;\n});\n/**\n * Pregel options that are propagated to the agent\n */\ntype CreateAgentPregelOptions = \"configurable\" | \"durability\" | \"store\" | \"cache\" | \"signal\" | \"recursionLimit\" | \"maxConcurrency\" | \"timeout\";\n/**\n * Decide whether provided configuration requires a context\n */\nexport type InvokeConfiguration<ContextSchema extends Record<string, any>> = \n/**\n * If the context schema is a default object, `context` can be optional\n */\nContextSchema extends InteropZodDefault<any> ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {\n context?: Partial<ContextSchema>;\n} : IsAllOptional<ContextSchema> extends true ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {\n context?: Partial<ContextSchema>;\n} : Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & WithMaybeContext<ContextSchema>;\nexport type StreamConfiguration<ContextSchema extends Record<string, any>> = \n/**\n * If the context schema is a default object, `context` can be optional\n */\nContextSchema extends InteropZodDefault<any> ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {\n context?: Partial<ContextSchema>;\n} : IsAllOptional<ContextSchema> extends true ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions | \"streamMode\">> & {\n context?: Partial<ContextSchema>;\n} : Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions | \"streamMode\">> & WithMaybeContext<ContextSchema>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;AA2BA;;;AAEoB8B,UAZHA,SAYGA,CAAAA,SAAAA,OAAAA,CAAAA,CAAAA;EAAS;AASJ;AAKzB;EAiDiBQ,EAAAA,EAAAA,MAAAA;EAAY;;;EAQJ,KAsBbV,EAjGDG,MAiGCH;;AAAuB,U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iBAAiBA,sBAAsB9D,oBAAoBC,iBAAiB6D;;;;;UAsBrNU,oBAAAA;;;;;;;UAOAC,uBAAAA;;;;;;;;;;;;;UAaA7C,YAAAA,SAAqB6C,yBAAyBD;;;;KAW1DG,wBAAAA;;;;KAIOC,0CAA0C1D;;;;AAItD4C,sBAAsB/E,yBAAyB4C,QAAQkD,KAAKvF,8BAA8BqF;YAC5EhD,QAAQmC;IAClBK,cAAcL,8BAA8BnC,QAAQkD,KAAKvF,8BAA8BqF;YAC7EhD,QAAQmC;IAClBnC,QAAQkD,KAAKvF,8BAA8BqF,6BAA6BnD,iBAAiBsC;KACjFgB,0CAA0C5D;;;;AAItD4C,sBAAsB/E,yBAAyB4C,QAAQkD,KAAKvF,8BAA8BqF;YAC5EhD,QAAQmC;IAClBK,cAAcL,8BAA8BnC,QAAQkD,KAAKvF,8BAA8BqF;YAC7EhD,QAAQmC;IAClBnC,QAAQkD,KAAKvF,8BAA8BqF,4CAA4CnD,iBAAiBsC"}
@@ -1,472 +0,0 @@
1
- import { JUMP_TO_TARGETS } from "./constants.js";
2
- import { AnyAnnotationRoot, ResponseFormatUndefined, ToAnnotationRoot } from "../annotation.js";
3
- import { JsonSchemaFormat, ProviderStrategy, ResponseFormat, ToolStrategy, TypedToolStrategy } from "../responses.js";
4
- import { ToolNode } from "../nodes/ToolNode.js";
5
- import { ClientTool, ServerTool } from "../types.js";
6
- import { BaseMessage } from "@langchain/core/messages";
7
- import { END, LangGraphRunnableConfig, PregelOptions, Runtime, START } from "@langchain/langgraph";
8
- import { InferInteropZodInput, InferInteropZodOutput, InteropZodDefault, InteropZodObject, InteropZodOptional, InteropZodType } from "@langchain/core/utils/types";
9
- import { BaseCheckpointSaver, BaseStore } from "@langchain/langgraph-checkpoint";
10
- import { LanguageModelLike } from "@langchain/core/language_models/base";
11
- import { Messages as Messages$1 } from "@langchain/langgraph/";
12
-
13
- //#region src/agents/middlewareAgent/types.d.ts
14
-
15
- /**
16
- * Represents information about an interrupt.
17
- */
18
- interface Interrupt<TValue = unknown> {
19
- /**
20
- * The ID of the interrupt.
21
- */
22
- id: string;
23
- /**
24
- * The requests for human input.
25
- */
26
- value: TValue;
27
- }
28
- interface BuiltInState {
29
- messages: BaseMessage[];
30
- __interrupt__?: Interrupt[];
31
- /**
32
- * Optional property to control routing after afterModel middleware execution.
33
- * When set by middleware, the agent will jump to the specified node instead of
34
- * following normal routing logic. The property is automatically cleared after use.
35
- *
36
- * - "model_request": Jump back to the model for another LLM call
37
- * - "tools": Jump to tool execution (requires tools to be available)
38
- */
39
- jumpTo?: JumpToTarget;
40
- }
41
- /**
42
- * Base input type for `.invoke` and `.stream` methods.
43
- */
44
- type UserInput = {
45
- messages: Messages$1;
46
- };
47
- /**
48
- * Information about a tool call that has been executed.
49
- */
50
-
51
- /**
52
- * Configuration for modifying a model call at runtime.
53
- * All fields are optional and only provided fields will override defaults.
54
- */
55
- interface ModelRequest {
56
- /**
57
- * The model to use for this step.
58
- */
59
- model: LanguageModelLike;
60
- /**
61
- * The messages to send to the model.
62
- */
63
- messages: BaseMessage[];
64
- /**
65
- * The system message for this step.
66
- */
67
- systemPrompt?: string;
68
- /**
69
- * Tool choice configuration (model-specific format).
70
- * Can be one of:
71
- * - `"auto"`: means the model can pick between generating a message or calling one or more tools.
72
- * - `"none"`: means the model will not call any tool and instead generates a message.
73
- * - `"required"`: means the model must call one or more tools.
74
- * - `{ type: "function", function: { name: string } }`: The model will use the specified function.
75
- */
76
- toolChoice?: "auto" | "none" | "required" | {
77
- type: "function";
78
- function: {
79
- name: string;
80
- };
81
- };
82
- /**
83
- * The tools to make available for this step.
84
- */
85
- tools: (ServerTool | ClientTool)[];
86
- }
87
- /**
88
- * Type helper to check if TContext is an optional Zod schema
89
- */
90
- type IsOptionalZodObject<T> = T extends InteropZodOptional<any> ? true : false;
91
- type IsDefaultZodObject<T> = T extends InteropZodDefault<any> ? true : false;
92
- type WithMaybeContext<TContext> = undefined extends TContext ? {
93
- readonly context?: TContext;
94
- } : IsOptionalZodObject<TContext> extends true ? {
95
- readonly context?: TContext;
96
- } : IsDefaultZodObject<TContext> extends true ? {
97
- readonly context?: TContext;
98
- } : {
99
- readonly context: TContext;
100
- };
101
- /**
102
- * Runtime information available to middleware (readonly).
103
- */
104
- type Runtime$1<TContext = unknown> = Partial<Omit<Runtime<TContext>, "context" | "configurable">> & WithMaybeContext<TContext> & PrivateState;
105
- /**
106
- * Result type for middleware functions.
107
- */
108
- type MiddlewareResult<TState> = TState | void;
109
- /**
110
- * Type for the agent's built-in state properties.
111
- */
112
- type AgentBuiltInState = {
113
- messages: BaseMessage[];
114
- };
115
- /**
116
- * Helper type to filter out properties that start with underscore (private properties)
117
- */
118
- type FilterPrivateProps<T> = { [K in keyof T as K extends `_${string}` ? never : K]: T[K] };
119
- /**
120
- * Helper type to infer the state schema type from a middleware
121
- * This filters out private properties (those starting with underscore)
122
- */
123
- type InferMiddlewareState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodOutput<S>> : {} : {};
124
- /**
125
- * Helper type to infer the input state schema type from a middleware (all properties optional)
126
- * This filters out private properties (those starting with underscore)
127
- */
128
- type InferMiddlewareInputState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodInput<S>> : {} : {};
129
- /**
130
- * Helper type to infer merged state from an array of middleware (just the middleware states)
131
- */
132
- type InferMiddlewareStates<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareState<First> & InferMiddlewareStates<Rest> : InferMiddlewareState<First> : {} : {};
133
- /**
134
- * Helper type to infer merged input state from an array of middleware (with optional defaults)
135
- */
136
- type InferMiddlewareInputStates<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareInputState<First> & InferMiddlewareInputStates<Rest> : InferMiddlewareInputState<First> : {} : {};
137
- /**
138
- * Helper type to infer merged state from an array of middleware (includes built-in state)
139
- */
140
-
141
- /**
142
- * Helper type to infer the input context schema type from a middleware (with optional defaults)
143
- */
144
- type InferMiddlewareContextInput<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<any, infer C, any> ? C extends InteropZodOptional<infer Inner> ? InferInteropZodInput<Inner> | undefined : C extends InteropZodObject ? InferInteropZodInput<C> : {} : {};
145
- /**
146
- * Helper type to infer merged context from an array of middleware
147
- */
148
-
149
- /**
150
- * Helper to merge two context types, preserving undefined unions
151
- */
152
- type MergeContextTypes<A, B> = [A] extends [undefined] ? [B] extends [undefined] ? undefined : B | undefined : [B] extends [undefined] ? A | undefined : [A] extends [B] ? A : [B] extends [A] ? B : A & B;
153
- /**
154
- * Helper type to infer merged input context from an array of middleware (with optional defaults)
155
- */
156
- type InferMiddlewareContextInputs<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? MergeContextTypes<InferMiddlewareContextInput<First>, InferMiddlewareContextInputs<Rest>> : InferMiddlewareContextInput<First> : {} : {};
157
- /**
158
- * jump targets (user facing)
159
- */
160
- type JumpToTarget = (typeof JUMP_TO_TARGETS)[number];
161
- /**
162
- * jump targets (internal)
163
- */
164
-
165
- /**
166
- * Base middleware interface.
167
- */
168
- interface AgentMiddleware<TSchema extends InteropZodObject | undefined = undefined, TContextSchema extends InteropZodObject | InteropZodDefault<InteropZodObject> | InteropZodOptional<InteropZodObject> | undefined = undefined, TFullContext = any> {
169
- stateSchema?: TSchema;
170
- contextSchema?: TContextSchema;
171
- name: string;
172
- beforeModelJumpTo?: JumpToTarget[];
173
- afterModelJumpTo?: JumpToTarget[];
174
- tools?: (ClientTool | ServerTool)[];
175
- /**
176
- * Runs before each LLM call, can modify call parameters, changes are not persistent
177
- * e.g. if you change `model`, it will only be changed for the next model call
178
- *
179
- * @param options - Current call options (can be modified by previous middleware)
180
- * @param state - Current state (read-only in this phase)
181
- * @param runtime - Runtime context and metadata
182
- * @returns Modified options or undefined to pass through
183
- */
184
- modifyModelRequest?(request: ModelRequest, state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime$1<TFullContext>): Promise<Partial<ModelRequest> | void> | Partial<ModelRequest> | void;
185
- /**
186
- * Logic to handle model invocation errors and optionally retry.
187
- *
188
- * @param error - The exception that occurred during model invocation.
189
- * @param request - The original model request that failed.
190
- * @param state - The current agent state.
191
- * @param runtime - The runtime context.
192
- * @param attempt - The current attempt number (1-indexed).
193
- * @returns Modified request to retry with, or undefined/null to propagate the error (re-raise).
194
- */
195
- retryModelRequest?(error: Error, request: ModelRequest, state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime$1<TFullContext>, attempt: number): Promise<ModelRequest | void> | ModelRequest | void;
196
- beforeModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime$1<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;
197
- afterModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime$1<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;
198
- }
199
- /**
200
- * Information about a tool call that has been executed.
201
- */
202
-
203
- type CreateAgentParams<StructuredResponseType extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, ResponseFormatType = InteropZodType<StructuredResponseType> | InteropZodType<unknown>[] | JsonSchemaFormat | JsonSchemaFormat[] | ResponseFormat | TypedToolStrategy<StructuredResponseType> | ToolStrategy<StructuredResponseType> | ProviderStrategy<StructuredResponseType> | ResponseFormatUndefined> = {
204
- /**
205
- * Defines a model to use for the agent. You can either pass in an instance of a LangChain chat model
206
- * or a string. If a string is provided the agent initializes a ChatModel based on the provided model name and provider.
207
- * It supports various model providers and allows for runtime configuration of model parameters.
208
- *
209
- * @uses {@link initChatModel}
210
- * @example
211
- * ```ts
212
- * const agent = createAgent({
213
- * model: "anthropic:claude-3-7-sonnet-latest",
214
- * // ...
215
- * });
216
- * ```
217
- *
218
- * @example
219
- * ```ts
220
- * import { ChatOpenAI } from "@langchain/openai";
221
- * const agent = createAgent({
222
- * model: new ChatOpenAI({ model: "gpt-4o" }),
223
- * // ...
224
- * });
225
- * ```
226
- */
227
- model: string | LanguageModelLike;
228
- /**
229
- * A list of tools or a ToolNode.
230
- *
231
- * @example
232
- * ```ts
233
- * import { tool } from "langchain";
234
- *
235
- * const weatherTool = tool(() => "Sunny!", {
236
- * name: "get_weather",
237
- * description: "Get the weather for a location",
238
- * schema: z.object({
239
- * location: z.string().describe("The location to get weather for"),
240
- * }),
241
- * });
242
- *
243
- * const agent = createAgent({
244
- * tools: [weatherTool],
245
- * // ...
246
- * });
247
- * ```
248
- */
249
- tools?: ToolNode | (ServerTool | ClientTool)[];
250
- /**
251
- * An optional prompt for the LLM. This takes full graph state BEFORE the LLM is called and prepares the input to LLM.
252
- *
253
- * Can take a few different forms:
254
- *
255
- * - str: This is converted to a SystemMessage and added to the beginning of the list of messages in state["messages"].
256
- * - SystemMessage: this is added to the beginning of the list of messages in state["messages"].
257
- * - Function: This function should take in full graph state and the output is then passed to the language model.
258
- * - Runnable: This runnable should take in full graph state and the output is then passed to the language model.
259
- *
260
- * Note:
261
- * Prior to `v0.2.46`, the prompt was set using `stateModifier` / `messagesModifier` parameters.
262
- * This is now deprecated and will be removed in a future release.
263
- *
264
- * Cannot be used together with `modifyModelRequest`.
265
- */
266
- systemPrompt?: string;
267
- /**
268
- * An optional schema for the context. It allows to pass in a typed context object into the agent
269
- * invocation and allows to access it in hooks such as `prompt` and middleware.
270
- * As opposed to the agent state, defined in `stateSchema`, the context is not persisted between
271
- * agent invocations.
272
- *
273
- * @example
274
- * ```ts
275
- * const agent = createAgent({
276
- * llm: model,
277
- * tools: [getWeather],
278
- * contextSchema: z.object({
279
- * capital: z.string(),
280
- * }),
281
- * prompt: (state, config) => {
282
- * return [
283
- * new SystemMessage(`You are a helpful assistant. The capital of France is ${config.context.capital}.`),
284
- * ];
285
- * },
286
- * });
287
- *
288
- * const result = await agent.invoke({
289
- * messages: [
290
- * new SystemMessage("You are a helpful assistant."),
291
- * new HumanMessage("What is the capital of France?"),
292
- * ],
293
- * }, {
294
- * context: {
295
- * capital: "Paris",
296
- * },
297
- * });
298
- * ```
299
- */
300
- contextSchema?: ContextSchema;
301
- /** An optional checkpoint saver to persist the agent's state. */
302
- checkpointSaver?: BaseCheckpointSaver | boolean;
303
- /** An optional checkpoint saver to persist the agent's state. Alias of "checkpointSaver". */
304
- checkpointer?: BaseCheckpointSaver | boolean;
305
- /**
306
- * An optional store to persist the agent's state.
307
- * @see {@link https://docs.langchain.com/oss/javascript/langgraph/memory#memory-storage | Long-term memory}
308
- */
309
- store?: BaseStore;
310
- /**
311
- * An optional schema for the final agent output.
312
- *
313
- * If provided, output will be formatted to match the given schema and returned in the 'structuredResponse' state key.
314
- * If not provided, `structuredResponse` will not be present in the output state.
315
- *
316
- * Can be passed in as:
317
- * - Zod schema
318
- * ```ts
319
- * const agent = createAgent({
320
- * responseFormat: z.object({
321
- * capital: z.string(),
322
- * }),
323
- * // ...
324
- * });
325
- * ```
326
- * - JSON schema
327
- * ```ts
328
- * const agent = createAgent({
329
- * responseFormat: {
330
- * type: "json_schema",
331
- * schema: {
332
- * type: "object",
333
- * properties: {
334
- * capital: { type: "string" },
335
- * },
336
- * required: ["capital"],
337
- * },
338
- * },
339
- * // ...
340
- * });
341
- * ```
342
- * - Create React Agent ResponseFormat
343
- * ```ts
344
- * import { providerStrategy, toolStrategy } from "langchain";
345
- * const agent = createAgent({
346
- * responseFormat: providerStrategy(
347
- * z.object({
348
- * capital: z.string(),
349
- * })
350
- * ),
351
- * // or
352
- * responseFormat: [
353
- * toolStrategy({ ... }),
354
- * toolStrategy({ ... }),
355
- * ]
356
- * // ...
357
- * });
358
- * ```
359
- *
360
- * **Note**: The graph will make a separate call to the LLM to generate the structured response after the agent loop is finished.
361
- * This is not the only strategy to get structured responses, see more options in [this guide](https://langchain-ai.github.io/langgraph/how-tos/react-agent-structured-output/).
362
- */
363
- responseFormat?: ResponseFormatType;
364
- /**
365
- * Middleware instances to run during agent execution.
366
- * Each middleware can define its own state schema and hook into the agent lifecycle.
367
- */
368
- middleware?: readonly AgentMiddleware<any, any, any>[];
369
- /**
370
- * An optional name for the agent.
371
- */
372
- name?: string;
373
- /**
374
- * An optional description for the agent.
375
- * This can be used to describe the agent to the underlying supervisor LLM.
376
- */
377
- description?: string;
378
- /**
379
- * Use to specify how to expose the agent name to the underlying supervisor LLM.
380
- * - `undefined`: Relies on the LLM provider {@link AIMessage#name}. Currently, only OpenAI supports this.
381
- * - `"inline"`: Add the agent name directly into the content field of the {@link AIMessage} using XML-style tags.
382
- * Example: `"How can I help you"` -> `"<name>agent_name</name><content>How can I help you?</content>"`
383
- */
384
- includeAgentName?: "inline" | undefined;
385
- /**
386
- * An optional abort signal that indicates that the overall operation should be aborted.
387
- */
388
- signal?: AbortSignal;
389
- /**
390
- * Determines the version of the graph to create.
391
- *
392
- * Can be one of
393
- * - `"v1"`: The tool node processes a single message. All tool calls in the message are
394
- * executed in parallel within the tool node.
395
- * - `"v2"`: The tool node processes a single tool call. Tool calls are distributed across
396
- * multiple instances of the tool node using the Send API.
397
- *
398
- * @default `"v2"`
399
- */
400
- version?: "v1" | "v2";
401
- };
402
- /**
403
- * Helper type to check if a type is optional (includes undefined)
404
- */
405
- type IsOptionalType<T> = undefined extends T ? true : false;
406
- /**
407
- * Extract non-undefined part of a union that includes undefined
408
- */
409
- type ExtractNonUndefined<T> = T extends undefined ? never : T;
410
- /**
411
- * Helper type to check if all properties of a type are optional
412
- */
413
- type IsAllOptional<T> =
414
- // If T includes undefined, then it's optional (can be omitted entirely)
415
- undefined extends T ? true : IsOptionalType<T> extends true ? true : ExtractNonUndefined<T> extends Record<string, any> ? {} extends ExtractNonUndefined<T> ? true : false : IsOptionalType<T>;
416
- /**
417
- * Helper type to extract input type from context schema (with optional defaults)
418
- */
419
- type InferContextInput<ContextSchema extends AnyAnnotationRoot | InteropZodObject> = ContextSchema extends InteropZodObject ? InferInteropZodInput<ContextSchema> : ContextSchema extends AnyAnnotationRoot ? ToAnnotationRoot<ContextSchema>["State"] : {};
420
- /**
421
- * Helper to check if ContextSchema is the default (AnyAnnotationRoot)
422
- */
423
-
424
- interface RunLevelPrivateState {
425
- /**
426
- * The number of times the model has been called at the run level.
427
- * This includes multiple agent invocations.
428
- */
429
- runModelCallCount: number;
430
- }
431
- interface ThreadLevelPrivateState {
432
- /**
433
- * The number of times the model has been called at the thread level.
434
- * This includes multiple agent invocations within different environments
435
- * using the same thread.
436
- */
437
- threadLevelCallCount: number;
438
- }
439
- /**
440
- * As private state we consider all information we want to track within
441
- * the lifecycle of the agent, without exposing it to the user. These informations
442
- * are propagated to the user as _readonly_ runtime properties.
443
- */
444
- interface PrivateState extends ThreadLevelPrivateState, RunLevelPrivateState {}
445
- /**
446
- * Pregel options that are propagated to the agent
447
- */
448
- type CreateAgentPregelOptions = "configurable" | "durability" | "store" | "cache" | "signal" | "recursionLimit" | "maxConcurrency" | "timeout";
449
- /**
450
- * Decide whether provided configuration requires a context
451
- */
452
- type InvokeConfiguration<ContextSchema extends Record<string, any>> =
453
- /**
454
- * If the context schema is a default object, `context` can be optional
455
- */
456
- ContextSchema extends InteropZodDefault<any> ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {
457
- context?: Partial<ContextSchema>;
458
- } : IsAllOptional<ContextSchema> extends true ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {
459
- context?: Partial<ContextSchema>;
460
- } : Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & WithMaybeContext<ContextSchema>;
461
- type StreamConfiguration<ContextSchema extends Record<string, any>> =
462
- /**
463
- * If the context schema is a default object, `context` can be optional
464
- */
465
- ContextSchema extends InteropZodDefault<any> ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {
466
- context?: Partial<ContextSchema>;
467
- } : IsAllOptional<ContextSchema> extends true ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions | "streamMode">> & {
468
- context?: Partial<ContextSchema>;
469
- } : Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions | "streamMode">> & WithMaybeContext<ContextSchema>;
470
- //#endregion
471
- export { AgentBuiltInState, AgentMiddleware, BuiltInState, CreateAgentParams, InferContextInput, InferMiddlewareContextInputs, InferMiddlewareInputStates, InferMiddlewareStates, InvokeConfiguration, JumpToTarget, MiddlewareResult, ModelRequest, Runtime$1 as Runtime, StreamConfiguration, UserInput };
472
- //# sourceMappingURL=types.d.ts.map