langchain 1.0.0-alpha.8 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (458) hide show
  1. package/CHANGELOG.md +260 -0
  2. package/LICENSE +6 -6
  3. package/README.md +29 -77
  4. package/dist/agents/ReactAgent.cjs +498 -104
  5. package/dist/agents/ReactAgent.cjs.map +1 -1
  6. package/dist/agents/ReactAgent.d.cts +140 -17
  7. package/dist/agents/ReactAgent.d.cts.map +1 -1
  8. package/dist/agents/ReactAgent.d.ts +140 -17
  9. package/dist/agents/ReactAgent.d.ts.map +1 -1
  10. package/dist/agents/ReactAgent.js +501 -107
  11. package/dist/agents/ReactAgent.js.map +1 -1
  12. package/dist/agents/annotation.cjs +34 -152
  13. package/dist/agents/annotation.cjs.map +1 -1
  14. package/dist/agents/annotation.js +36 -150
  15. package/dist/agents/annotation.js.map +1 -1
  16. package/dist/agents/constants.cjs.map +1 -1
  17. package/dist/agents/constants.d.cts +9 -0
  18. package/dist/agents/constants.d.cts.map +1 -0
  19. package/dist/agents/constants.d.ts +9 -0
  20. package/dist/agents/constants.d.ts.map +1 -0
  21. package/dist/agents/constants.js.map +1 -1
  22. package/dist/agents/errors.cjs +2 -1
  23. package/dist/agents/errors.cjs.map +1 -1
  24. package/dist/agents/errors.js +2 -1
  25. package/dist/agents/errors.js.map +1 -1
  26. package/dist/agents/index.cjs +5 -29
  27. package/dist/agents/index.cjs.map +1 -1
  28. package/dist/agents/index.d.cts +157 -128
  29. package/dist/agents/index.d.cts.map +1 -1
  30. package/dist/agents/index.d.ts +157 -128
  31. package/dist/agents/index.d.ts.map +1 -1
  32. package/dist/agents/index.js +5 -27
  33. package/dist/agents/index.js.map +1 -1
  34. package/dist/agents/{middlewareAgent/middleware → middleware}/callLimit.cjs +31 -29
  35. package/dist/agents/middleware/callLimit.cjs.map +1 -0
  36. package/dist/agents/{middlewareAgent/middleware → middleware}/callLimit.d.cts +3 -3
  37. package/dist/agents/middleware/callLimit.d.cts.map +1 -0
  38. package/dist/agents/{middlewareAgent/middleware → middleware}/callLimit.d.ts +3 -3
  39. package/dist/agents/middleware/callLimit.d.ts.map +1 -0
  40. package/dist/agents/{middlewareAgent/middleware → middleware}/callLimit.js +30 -28
  41. package/dist/agents/middleware/callLimit.js.map +1 -0
  42. package/dist/agents/{middlewareAgent/middleware → middleware}/contextEditing.cjs +6 -6
  43. package/dist/agents/middleware/contextEditing.cjs.map +1 -0
  44. package/dist/agents/{middlewareAgent/middleware → middleware}/contextEditing.d.cts +2 -2
  45. package/dist/agents/middleware/contextEditing.d.cts.map +1 -0
  46. package/dist/agents/{middlewareAgent/middleware → middleware}/contextEditing.d.ts +2 -2
  47. package/dist/agents/middleware/contextEditing.d.ts.map +1 -0
  48. package/dist/agents/{middlewareAgent/middleware → middleware}/contextEditing.js +5 -5
  49. package/dist/agents/middleware/contextEditing.js.map +1 -0
  50. package/dist/agents/{middlewareAgent/middleware → middleware}/dynamicSystemPrompt.cjs +6 -6
  51. package/dist/agents/middleware/dynamicSystemPrompt.cjs.map +1 -0
  52. package/dist/agents/{middlewareAgent/middleware → middleware}/dynamicSystemPrompt.d.cts +3 -2
  53. package/dist/agents/middleware/dynamicSystemPrompt.d.cts.map +1 -0
  54. package/dist/agents/{middlewareAgent/middleware → middleware}/dynamicSystemPrompt.d.ts +3 -2
  55. package/dist/agents/middleware/dynamicSystemPrompt.d.ts.map +1 -0
  56. package/dist/agents/{middlewareAgent/middleware → middleware}/dynamicSystemPrompt.js +6 -6
  57. package/dist/agents/middleware/dynamicSystemPrompt.js.map +1 -0
  58. package/dist/agents/middleware/hitl.cjs +406 -0
  59. package/dist/agents/middleware/hitl.cjs.map +1 -0
  60. package/dist/agents/middleware/hitl.d.cts +611 -0
  61. package/dist/agents/middleware/hitl.d.cts.map +1 -0
  62. package/dist/agents/middleware/hitl.d.ts +611 -0
  63. package/dist/agents/middleware/hitl.d.ts.map +1 -0
  64. package/dist/agents/middleware/hitl.js +405 -0
  65. package/dist/agents/middleware/hitl.js.map +1 -0
  66. package/dist/agents/middleware/index.cjs +12 -0
  67. package/dist/agents/middleware/index.js +12 -0
  68. package/dist/agents/{middlewareAgent/middleware → middleware}/llmToolSelector.cjs +7 -7
  69. package/dist/agents/middleware/llmToolSelector.cjs.map +1 -0
  70. package/dist/agents/{middlewareAgent/middleware → middleware}/llmToolSelector.d.cts +2 -2
  71. package/dist/agents/middleware/llmToolSelector.d.cts.map +1 -0
  72. package/dist/agents/{middlewareAgent/middleware → middleware}/llmToolSelector.d.ts +2 -2
  73. package/dist/agents/middleware/llmToolSelector.d.ts.map +1 -0
  74. package/dist/agents/{middlewareAgent/middleware → middleware}/llmToolSelector.js +6 -6
  75. package/dist/agents/middleware/llmToolSelector.js.map +1 -0
  76. package/dist/agents/{middlewareAgent/middleware → middleware}/modelFallback.cjs +29 -22
  77. package/dist/agents/middleware/modelFallback.cjs.map +1 -0
  78. package/dist/agents/{middlewareAgent/middleware → middleware}/modelFallback.d.cts +3 -3
  79. package/dist/agents/middleware/modelFallback.d.cts.map +1 -0
  80. package/dist/agents/{middlewareAgent/middleware → middleware}/modelFallback.d.ts +3 -3
  81. package/dist/agents/middleware/modelFallback.d.ts.map +1 -0
  82. package/dist/agents/{middlewareAgent/middleware → middleware}/modelFallback.js +29 -22
  83. package/dist/agents/middleware/modelFallback.js.map +1 -0
  84. package/dist/agents/{middlewareAgent/middleware → middleware}/piiRedaction.cjs +12 -12
  85. package/dist/agents/middleware/piiRedaction.cjs.map +1 -0
  86. package/dist/agents/{middlewareAgent/middleware → middleware}/piiRedaction.d.cts +4 -4
  87. package/dist/agents/middleware/piiRedaction.d.cts.map +1 -0
  88. package/dist/agents/{middlewareAgent/middleware → middleware}/piiRedaction.d.ts +4 -4
  89. package/dist/agents/middleware/piiRedaction.d.ts.map +1 -0
  90. package/dist/agents/{middlewareAgent/middleware → middleware}/piiRedaction.js +10 -10
  91. package/dist/agents/middleware/piiRedaction.js.map +1 -0
  92. package/dist/agents/{middlewareAgent/middleware → middleware}/promptCaching.cjs +27 -24
  93. package/dist/agents/middleware/promptCaching.cjs.map +1 -0
  94. package/dist/agents/{middlewareAgent/middleware → middleware}/promptCaching.d.cts +3 -3
  95. package/dist/agents/middleware/promptCaching.d.cts.map +1 -0
  96. package/dist/agents/{middlewareAgent/middleware → middleware}/promptCaching.d.ts +3 -3
  97. package/dist/agents/middleware/promptCaching.d.ts.map +1 -0
  98. package/dist/agents/{middlewareAgent/middleware → middleware}/promptCaching.js +26 -23
  99. package/dist/agents/middleware/promptCaching.js.map +1 -0
  100. package/dist/agents/{middlewareAgent/middleware → middleware}/summarization.cjs +7 -12
  101. package/dist/agents/middleware/summarization.cjs.map +1 -0
  102. package/dist/agents/{middlewareAgent/middleware → middleware}/summarization.d.cts +3 -3
  103. package/dist/agents/middleware/summarization.d.cts.map +1 -0
  104. package/dist/agents/{middlewareAgent/middleware → middleware}/summarization.d.ts +3 -3
  105. package/dist/agents/middleware/summarization.d.ts.map +1 -0
  106. package/dist/agents/{middlewareAgent/middleware → middleware}/summarization.js +5 -10
  107. package/dist/agents/middleware/summarization.js.map +1 -0
  108. package/dist/agents/middleware/todoListMiddleware.cjs +314 -0
  109. package/dist/agents/middleware/todoListMiddleware.cjs.map +1 -0
  110. package/dist/agents/middleware/todoListMiddleware.d.cts +75 -0
  111. package/dist/agents/middleware/todoListMiddleware.d.cts.map +1 -0
  112. package/dist/agents/middleware/todoListMiddleware.d.ts +75 -0
  113. package/dist/agents/middleware/todoListMiddleware.d.ts.map +1 -0
  114. package/dist/agents/middleware/todoListMiddleware.js +312 -0
  115. package/dist/agents/middleware/todoListMiddleware.js.map +1 -0
  116. package/dist/agents/{middlewareAgent/middleware → middleware}/toolCallLimit.cjs +32 -30
  117. package/dist/agents/middleware/toolCallLimit.cjs.map +1 -0
  118. package/dist/agents/{middlewareAgent/middleware → middleware}/toolCallLimit.d.cts +3 -3
  119. package/dist/agents/middleware/toolCallLimit.d.cts.map +1 -0
  120. package/dist/agents/{middlewareAgent/middleware → middleware}/toolCallLimit.d.ts +3 -3
  121. package/dist/agents/middleware/toolCallLimit.d.ts.map +1 -0
  122. package/dist/agents/{middlewareAgent/middleware → middleware}/toolCallLimit.js +31 -29
  123. package/dist/agents/middleware/toolCallLimit.js.map +1 -0
  124. package/dist/agents/middleware/types.d.cts +354 -0
  125. package/dist/agents/middleware/types.d.cts.map +1 -0
  126. package/dist/agents/middleware/types.d.ts +354 -0
  127. package/dist/agents/middleware/types.d.ts.map +1 -0
  128. package/dist/agents/{middlewareAgent/middleware → middleware}/utils.cjs +11 -1
  129. package/dist/agents/middleware/utils.cjs.map +1 -0
  130. package/dist/agents/{middlewareAgent/middleware → middleware}/utils.d.cts +1 -1
  131. package/dist/agents/middleware/utils.d.cts.map +1 -0
  132. package/dist/agents/{middlewareAgent/middleware → middleware}/utils.d.ts +1 -1
  133. package/dist/agents/middleware/utils.d.ts.map +1 -0
  134. package/dist/agents/{middlewareAgent/middleware → middleware}/utils.js +10 -2
  135. package/dist/agents/middleware/utils.js.map +1 -0
  136. package/dist/agents/{middlewareAgent/middleware.cjs → middleware.cjs} +11 -8
  137. package/dist/agents/middleware.cjs.map +1 -0
  138. package/dist/agents/middleware.d.cts +185 -0
  139. package/dist/agents/middleware.d.cts.map +1 -0
  140. package/dist/agents/middleware.d.ts +185 -0
  141. package/dist/agents/middleware.d.ts.map +1 -0
  142. package/dist/agents/{middlewareAgent/middleware.js → middleware.js} +11 -8
  143. package/dist/agents/middleware.js.map +1 -0
  144. package/dist/agents/nodes/AfterAgentNode.cjs +29 -0
  145. package/dist/agents/nodes/AfterAgentNode.cjs.map +1 -0
  146. package/dist/agents/nodes/AfterAgentNode.js +29 -0
  147. package/dist/agents/nodes/AfterAgentNode.js.map +1 -0
  148. package/dist/agents/{middlewareAgent/nodes/AfterModalNode.cjs → nodes/AfterModelNode.cjs} +6 -6
  149. package/dist/agents/nodes/AfterModelNode.cjs.map +1 -0
  150. package/dist/agents/{middlewareAgent/nodes/AfterModalNode.js → nodes/AfterModelNode.js} +6 -6
  151. package/dist/agents/nodes/AfterModelNode.js.map +1 -0
  152. package/dist/agents/nodes/AgentNode.cjs +203 -71
  153. package/dist/agents/nodes/AgentNode.cjs.map +1 -1
  154. package/dist/agents/nodes/AgentNode.js +205 -73
  155. package/dist/agents/nodes/AgentNode.js.map +1 -1
  156. package/dist/agents/nodes/BeforeAgentNode.cjs +29 -0
  157. package/dist/agents/nodes/BeforeAgentNode.cjs.map +1 -0
  158. package/dist/agents/nodes/BeforeAgentNode.js +29 -0
  159. package/dist/agents/nodes/BeforeAgentNode.js.map +1 -0
  160. package/dist/agents/{middlewareAgent/nodes/BeforeModalNode.cjs → nodes/BeforeModelNode.cjs} +6 -4
  161. package/dist/agents/nodes/BeforeModelNode.cjs.map +1 -0
  162. package/dist/agents/{middlewareAgent/nodes/BeforeModalNode.js → nodes/BeforeModelNode.js} +6 -4
  163. package/dist/agents/nodes/BeforeModelNode.js.map +1 -0
  164. package/dist/agents/nodes/ToolNode.cjs +163 -52
  165. package/dist/agents/nodes/ToolNode.cjs.map +1 -1
  166. package/dist/agents/nodes/ToolNode.js +164 -53
  167. package/dist/agents/nodes/ToolNode.js.map +1 -1
  168. package/dist/agents/{middlewareAgent/nodes → nodes}/middleware.cjs +36 -10
  169. package/dist/agents/nodes/middleware.cjs.map +1 -0
  170. package/dist/agents/{middlewareAgent/nodes → nodes}/middleware.js +35 -9
  171. package/dist/agents/nodes/middleware.js.map +1 -0
  172. package/dist/agents/nodes/types.d.cts +72 -0
  173. package/dist/agents/nodes/types.d.cts.map +1 -0
  174. package/dist/agents/nodes/types.d.ts +72 -0
  175. package/dist/agents/nodes/types.d.ts.map +1 -0
  176. package/dist/agents/nodes/utils.cjs +64 -0
  177. package/dist/agents/nodes/utils.cjs.map +1 -1
  178. package/dist/agents/nodes/utils.js +62 -1
  179. package/dist/agents/nodes/utils.js.map +1 -1
  180. package/dist/agents/responses.cjs +1 -1
  181. package/dist/agents/responses.cjs.map +1 -1
  182. package/dist/agents/responses.d.cts +9 -2
  183. package/dist/agents/responses.d.cts.map +1 -1
  184. package/dist/agents/responses.d.ts +8 -1
  185. package/dist/agents/responses.d.ts.map +1 -1
  186. package/dist/agents/responses.js +1 -1
  187. package/dist/agents/responses.js.map +1 -1
  188. package/dist/agents/runtime.d.cts +123 -0
  189. package/dist/agents/runtime.d.cts.map +1 -0
  190. package/dist/agents/runtime.d.ts +123 -0
  191. package/dist/agents/runtime.d.ts.map +1 -0
  192. package/dist/agents/tests/utils.cjs +13 -5
  193. package/dist/agents/tests/utils.cjs.map +1 -1
  194. package/dist/agents/tests/utils.d.cts +17 -8
  195. package/dist/agents/tests/utils.d.cts.map +1 -1
  196. package/dist/agents/tests/utils.d.ts +14 -5
  197. package/dist/agents/tests/utils.d.ts.map +1 -1
  198. package/dist/agents/tests/utils.js +13 -5
  199. package/dist/agents/tests/utils.js.map +1 -1
  200. package/dist/agents/tools.d.cts +9 -0
  201. package/dist/agents/tools.d.cts.map +1 -0
  202. package/dist/agents/tools.d.ts +9 -0
  203. package/dist/agents/tools.d.ts.map +1 -0
  204. package/dist/agents/types.d.cts +163 -119
  205. package/dist/agents/types.d.cts.map +1 -1
  206. package/dist/agents/types.d.ts +163 -119
  207. package/dist/agents/types.d.ts.map +1 -1
  208. package/dist/agents/utils.cjs +141 -38
  209. package/dist/agents/utils.cjs.map +1 -1
  210. package/dist/agents/utils.js +142 -40
  211. package/dist/agents/utils.js.map +1 -1
  212. package/dist/chat_models/universal.cjs +4 -0
  213. package/dist/chat_models/universal.cjs.map +1 -1
  214. package/dist/chat_models/universal.d.cts +6 -2
  215. package/dist/chat_models/universal.d.cts.map +1 -1
  216. package/dist/chat_models/universal.d.ts +4 -0
  217. package/dist/chat_models/universal.d.ts.map +1 -1
  218. package/dist/chat_models/universal.js +4 -0
  219. package/dist/chat_models/universal.js.map +1 -1
  220. package/dist/hub/base.cjs +4 -3
  221. package/dist/hub/base.cjs.map +1 -1
  222. package/dist/hub/base.d.cts +0 -4
  223. package/dist/hub/base.d.cts.map +1 -1
  224. package/dist/hub/base.d.ts +0 -4
  225. package/dist/hub/base.d.ts.map +1 -1
  226. package/dist/hub/base.js +4 -3
  227. package/dist/hub/base.js.map +1 -1
  228. package/dist/index.cjs +23 -43
  229. package/dist/index.cjs.map +1 -1
  230. package/dist/index.d.cts +21 -21
  231. package/dist/index.d.ts +21 -21
  232. package/dist/index.js +17 -26
  233. package/dist/index.js.map +1 -1
  234. package/dist/load/import_map.cjs +1 -7
  235. package/dist/load/import_map.cjs.map +1 -1
  236. package/dist/load/import_map.js +1 -7
  237. package/dist/load/import_map.js.map +1 -1
  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.cjs +74 -18
  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.cjs.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/client.js +75 -19
  241. 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
  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.cjs +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.cjs.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/env.js +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/env.js.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.cjs +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.cjs.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/constants.js +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/constants.js.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.cjs +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.cjs.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/experimental/otel/translator.js +1 -1
  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/experimental/otel/translator.js.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.cjs +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.cjs.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/index.js +2 -2
  257. 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
  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.cjs +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.cjs.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/run_trees.js +7 -5
  261. 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
  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.cjs +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.cjs.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/constants.js +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/constants.js.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.cjs +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.cjs.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/fetch.js +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/fetch.js.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.cjs +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.cjs.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/singletons/otel.js +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/singletons/otel.js.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.cjs +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.cjs.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/_uuid.js +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/_uuid.js.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.cjs +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.cjs.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/async_caller.js +1 -1
  281. 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
  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.cjs +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.cjs.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/env.js +19 -23
  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/env.js.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.cjs +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.cjs.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/error.js +16 -3
  289. 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
  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.cjs +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.cjs.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/fast-safe-stringify/index.js +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/fast-safe-stringify/index.js.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.cjs +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.cjs.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/messages.js +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/messages.js.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.cjs +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.cjs.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/project.js +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/project.js.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.cjs +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.cjs.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/prompts.js +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/prompts.js.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.cjs +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.cjs.map +1 -1
  308. 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
  309. 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
  310. package/package.json +30 -63
  311. package/dist/agents/RunnableCallable.d.cts +0 -41
  312. package/dist/agents/RunnableCallable.d.cts.map +0 -1
  313. package/dist/agents/RunnableCallable.d.ts +0 -41
  314. package/dist/agents/RunnableCallable.d.ts.map +0 -1
  315. package/dist/agents/annotation.d.cts +0 -52
  316. package/dist/agents/annotation.d.cts.map +0 -1
  317. package/dist/agents/annotation.d.ts +0 -52
  318. package/dist/agents/annotation.d.ts.map +0 -1
  319. package/dist/agents/createAgent.cjs +0 -10
  320. package/dist/agents/createAgent.cjs.map +0 -1
  321. package/dist/agents/createAgent.js +0 -10
  322. package/dist/agents/createAgent.js.map +0 -1
  323. package/dist/agents/interrupt.cjs +0 -2
  324. package/dist/agents/interrupt.d.cts +0 -81
  325. package/dist/agents/interrupt.d.cts.map +0 -1
  326. package/dist/agents/interrupt.d.ts +0 -81
  327. package/dist/agents/interrupt.d.ts.map +0 -1
  328. package/dist/agents/interrupt.js +0 -3
  329. package/dist/agents/middlewareAgent/ReactAgent.cjs +0 -579
  330. package/dist/agents/middlewareAgent/ReactAgent.cjs.map +0 -1
  331. package/dist/agents/middlewareAgent/ReactAgent.d.cts +0 -234
  332. package/dist/agents/middlewareAgent/ReactAgent.d.cts.map +0 -1
  333. package/dist/agents/middlewareAgent/ReactAgent.d.ts +0 -234
  334. package/dist/agents/middlewareAgent/ReactAgent.d.ts.map +0 -1
  335. package/dist/agents/middlewareAgent/ReactAgent.js +0 -578
  336. package/dist/agents/middlewareAgent/ReactAgent.js.map +0 -1
  337. package/dist/agents/middlewareAgent/annotation.cjs +0 -45
  338. package/dist/agents/middlewareAgent/annotation.cjs.map +0 -1
  339. package/dist/agents/middlewareAgent/annotation.js +0 -44
  340. package/dist/agents/middlewareAgent/annotation.js.map +0 -1
  341. package/dist/agents/middlewareAgent/constants.d.cts +0 -5
  342. package/dist/agents/middlewareAgent/constants.d.cts.map +0 -1
  343. package/dist/agents/middlewareAgent/constants.d.ts +0 -5
  344. package/dist/agents/middlewareAgent/constants.d.ts.map +0 -1
  345. package/dist/agents/middlewareAgent/index.cjs +0 -11
  346. package/dist/agents/middlewareAgent/index.cjs.map +0 -1
  347. package/dist/agents/middlewareAgent/index.js +0 -11
  348. package/dist/agents/middlewareAgent/index.js.map +0 -1
  349. package/dist/agents/middlewareAgent/middleware/callLimit.cjs.map +0 -1
  350. package/dist/agents/middlewareAgent/middleware/callLimit.d.cts.map +0 -1
  351. package/dist/agents/middlewareAgent/middleware/callLimit.d.ts.map +0 -1
  352. package/dist/agents/middlewareAgent/middleware/callLimit.js.map +0 -1
  353. package/dist/agents/middlewareAgent/middleware/contextEditing.cjs.map +0 -1
  354. package/dist/agents/middlewareAgent/middleware/contextEditing.d.cts.map +0 -1
  355. package/dist/agents/middlewareAgent/middleware/contextEditing.d.ts.map +0 -1
  356. package/dist/agents/middlewareAgent/middleware/contextEditing.js.map +0 -1
  357. package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.cjs.map +0 -1
  358. package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.cts.map +0 -1
  359. package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.ts.map +0 -1
  360. package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.js.map +0 -1
  361. package/dist/agents/middlewareAgent/middleware/hitl.cjs +0 -341
  362. package/dist/agents/middlewareAgent/middleware/hitl.cjs.map +0 -1
  363. package/dist/agents/middlewareAgent/middleware/hitl.d.cts +0 -524
  364. package/dist/agents/middlewareAgent/middleware/hitl.d.cts.map +0 -1
  365. package/dist/agents/middlewareAgent/middleware/hitl.d.ts +0 -524
  366. package/dist/agents/middlewareAgent/middleware/hitl.d.ts.map +0 -1
  367. package/dist/agents/middlewareAgent/middleware/hitl.js +0 -340
  368. package/dist/agents/middlewareAgent/middleware/hitl.js.map +0 -1
  369. package/dist/agents/middlewareAgent/middleware/index.cjs +0 -52
  370. package/dist/agents/middlewareAgent/middleware/index.cjs.map +0 -1
  371. package/dist/agents/middlewareAgent/middleware/index.d.cts +0 -13
  372. package/dist/agents/middlewareAgent/middleware/index.d.ts +0 -13
  373. package/dist/agents/middlewareAgent/middleware/index.js +0 -34
  374. package/dist/agents/middlewareAgent/middleware/index.js.map +0 -1
  375. package/dist/agents/middlewareAgent/middleware/llmToolSelector.cjs.map +0 -1
  376. package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.cts.map +0 -1
  377. package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.ts.map +0 -1
  378. package/dist/agents/middlewareAgent/middleware/llmToolSelector.js.map +0 -1
  379. package/dist/agents/middlewareAgent/middleware/modelFallback.cjs.map +0 -1
  380. package/dist/agents/middlewareAgent/middleware/modelFallback.d.cts.map +0 -1
  381. package/dist/agents/middlewareAgent/middleware/modelFallback.d.ts.map +0 -1
  382. package/dist/agents/middlewareAgent/middleware/modelFallback.js.map +0 -1
  383. package/dist/agents/middlewareAgent/middleware/piiRedaction.cjs.map +0 -1
  384. package/dist/agents/middlewareAgent/middleware/piiRedaction.d.cts.map +0 -1
  385. package/dist/agents/middlewareAgent/middleware/piiRedaction.d.ts.map +0 -1
  386. package/dist/agents/middlewareAgent/middleware/piiRedaction.js.map +0 -1
  387. package/dist/agents/middlewareAgent/middleware/promptCaching.cjs.map +0 -1
  388. package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts.map +0 -1
  389. package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts.map +0 -1
  390. package/dist/agents/middlewareAgent/middleware/promptCaching.js.map +0 -1
  391. package/dist/agents/middlewareAgent/middleware/summarization.cjs.map +0 -1
  392. package/dist/agents/middlewareAgent/middleware/summarization.d.cts.map +0 -1
  393. package/dist/agents/middlewareAgent/middleware/summarization.d.ts.map +0 -1
  394. package/dist/agents/middlewareAgent/middleware/summarization.js.map +0 -1
  395. package/dist/agents/middlewareAgent/middleware/toolCallLimit.cjs.map +0 -1
  396. package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.cts.map +0 -1
  397. package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.ts.map +0 -1
  398. package/dist/agents/middlewareAgent/middleware/toolCallLimit.js.map +0 -1
  399. package/dist/agents/middlewareAgent/middleware/utils.cjs.map +0 -1
  400. package/dist/agents/middlewareAgent/middleware/utils.d.cts.map +0 -1
  401. package/dist/agents/middlewareAgent/middleware/utils.d.ts.map +0 -1
  402. package/dist/agents/middlewareAgent/middleware/utils.js.map +0 -1
  403. package/dist/agents/middlewareAgent/middleware.cjs.map +0 -1
  404. package/dist/agents/middlewareAgent/middleware.d.cts +0 -117
  405. package/dist/agents/middlewareAgent/middleware.d.cts.map +0 -1
  406. package/dist/agents/middlewareAgent/middleware.d.ts +0 -117
  407. package/dist/agents/middlewareAgent/middleware.d.ts.map +0 -1
  408. package/dist/agents/middlewareAgent/middleware.js.map +0 -1
  409. package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs.map +0 -1
  410. package/dist/agents/middlewareAgent/nodes/AfterModalNode.js.map +0 -1
  411. package/dist/agents/middlewareAgent/nodes/AgentNode.cjs +0 -468
  412. package/dist/agents/middlewareAgent/nodes/AgentNode.cjs.map +0 -1
  413. package/dist/agents/middlewareAgent/nodes/AgentNode.js +0 -467
  414. package/dist/agents/middlewareAgent/nodes/AgentNode.js.map +0 -1
  415. package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs.map +0 -1
  416. package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js.map +0 -1
  417. package/dist/agents/middlewareAgent/nodes/middleware.cjs.map +0 -1
  418. package/dist/agents/middlewareAgent/nodes/middleware.js.map +0 -1
  419. package/dist/agents/middlewareAgent/nodes/utils.cjs +0 -66
  420. package/dist/agents/middlewareAgent/nodes/utils.cjs.map +0 -1
  421. package/dist/agents/middlewareAgent/nodes/utils.js +0 -63
  422. package/dist/agents/middlewareAgent/nodes/utils.js.map +0 -1
  423. package/dist/agents/middlewareAgent/types.d.cts +0 -472
  424. package/dist/agents/middlewareAgent/types.d.cts.map +0 -1
  425. package/dist/agents/middlewareAgent/types.d.ts +0 -472
  426. package/dist/agents/middlewareAgent/types.d.ts.map +0 -1
  427. package/dist/agents/nodes/ToolNode.d.cts +0 -97
  428. package/dist/agents/nodes/ToolNode.d.cts.map +0 -1
  429. package/dist/agents/nodes/ToolNode.d.ts +0 -97
  430. package/dist/agents/nodes/ToolNode.d.ts.map +0 -1
  431. package/dist/agents/types.cjs +0 -7
  432. package/dist/agents/types.cjs.map +0 -1
  433. package/dist/agents/types.js +0 -6
  434. package/dist/agents/types.js.map +0 -1
  435. package/dist/embeddings/cache_backed.cjs +0 -140
  436. package/dist/embeddings/cache_backed.cjs.map +0 -1
  437. package/dist/embeddings/cache_backed.d.cts +0 -107
  438. package/dist/embeddings/cache_backed.d.cts.map +0 -1
  439. package/dist/embeddings/cache_backed.d.ts +0 -107
  440. package/dist/embeddings/cache_backed.d.ts.map +0 -1
  441. package/dist/embeddings/cache_backed.js +0 -134
  442. package/dist/embeddings/cache_backed.js.map +0 -1
  443. package/dist/embeddings/fake.cjs +0 -22
  444. package/dist/embeddings/fake.cjs.map +0 -1
  445. package/dist/embeddings/fake.d.cts +0 -1
  446. package/dist/embeddings/fake.d.ts +0 -1
  447. package/dist/embeddings/fake.js +0 -12
  448. package/dist/embeddings/fake.js.map +0 -1
  449. 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
  450. 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
  451. 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
  452. 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
  453. 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
  454. 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
  455. 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
  456. 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
  457. /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
  458. /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
@@ -0,0 +1,611 @@
1
+ import { AgentBuiltInState, Runtime } from "../runtime.js";
2
+ import { AgentMiddleware } from "./types.js";
3
+ import { ToolCall } from "@langchain/core/messages";
4
+ import { z } from "zod/v3";
5
+ import { InferInteropZodInput } from "@langchain/core/utils/types";
6
+
7
+ //#region src/agents/middleware/hitl.d.ts
8
+ declare const DescriptionFunctionSchema: z.ZodFunction<z.ZodTuple<[z.ZodType<ToolCall<string, Record<string, any>>, z.ZodTypeDef, ToolCall<string, Record<string, any>>>, z.ZodType<AgentBuiltInState, z.ZodTypeDef, AgentBuiltInState>, z.ZodType<Runtime<unknown>, z.ZodTypeDef, Runtime<unknown>>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>;
9
+ /**
10
+ * Function type that dynamically generates a description for a tool call approval request.
11
+ *
12
+ * @param toolCall - The tool call being reviewed
13
+ * @param state - The current agent state
14
+ * @param runtime - The agent runtime context
15
+ * @returns A string description or Promise that resolves to a string description
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * import { type DescriptionFactory, type ToolCall } from "langchain";
20
+ *
21
+ * const descriptionFactory: DescriptionFactory = (toolCall, state, runtime) => {
22
+ * return `Please review: ${toolCall.name}(${JSON.stringify(toolCall.args)})`;
23
+ * };
24
+ * ```
25
+ */
26
+ type DescriptionFactory = z.infer<typeof DescriptionFunctionSchema>;
27
+ declare const DecisionType: z.ZodEnum<["approve", "edit", "reject"]>;
28
+ type DecisionType = z.infer<typeof DecisionType>;
29
+ declare const InterruptOnConfigSchema: z.ZodObject<{
30
+ /**
31
+ * The decisions that are allowed for this action.
32
+ */
33
+ allowedDecisions: z.ZodArray<z.ZodEnum<["approve", "edit", "reject"]>, "many">;
34
+ /**
35
+ * The description attached to the request for human input.
36
+ * Can be either:
37
+ * - A static string describing the approval request
38
+ * - A callable that dynamically generates the description based on agent state,
39
+ * runtime, and tool call information
40
+ *
41
+ * @example
42
+ * Static string description
43
+ * ```typescript
44
+ * import type { InterruptOnConfig } from "langchain";
45
+ *
46
+ * const config: InterruptOnConfig = {
47
+ * allowedDecisions: ["approve", "reject"],
48
+ * description: "Please review this tool execution"
49
+ * };
50
+ * ```
51
+ *
52
+ * @example
53
+ * Dynamic callable description
54
+ * ```typescript
55
+ * import type {
56
+ * AgentBuiltInState,
57
+ * Runtime,
58
+ * DescriptionFactory,
59
+ * ToolCall,
60
+ * InterruptOnConfig
61
+ * } from "langchain";
62
+ *
63
+ * const formatToolDescription: DescriptionFactory = (
64
+ * toolCall: ToolCall,
65
+ * state: AgentBuiltInState,
66
+ * runtime: Runtime<unknown>
67
+ * ) => {
68
+ * return `Tool: ${toolCall.name}\nArguments:\n${JSON.stringify(toolCall.args, null, 2)}`;
69
+ * };
70
+ *
71
+ * const config: InterruptOnConfig = {
72
+ * allowedDecisions: ["approve", "edit"],
73
+ * description: formatToolDescription
74
+ * };
75
+ * ```
76
+ */
77
+ description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<ToolCall<string, Record<string, any>>, z.ZodTypeDef, ToolCall<string, Record<string, any>>>, z.ZodType<AgentBuiltInState, z.ZodTypeDef, AgentBuiltInState>, z.ZodType<Runtime<unknown>, z.ZodTypeDef, Runtime<unknown>>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
78
+ /**
79
+ * JSON schema for the arguments associated with the action, if edits are allowed.
80
+ */
81
+ argsSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ allowedDecisions: ("approve" | "edit" | "reject")[];
84
+ description?: string | ((args_0: ToolCall<string, Record<string, any>>, args_1: AgentBuiltInState, args_2: Runtime<unknown>, ...args: unknown[]) => string | Promise<string>) | undefined;
85
+ argsSchema?: Record<string, any> | undefined;
86
+ }, {
87
+ allowedDecisions: ("approve" | "edit" | "reject")[];
88
+ description?: string | ((args_0: ToolCall<string, Record<string, any>>, args_1: AgentBuiltInState, args_2: Runtime<unknown>, ...args: unknown[]) => string | Promise<string>) | undefined;
89
+ argsSchema?: Record<string, any> | undefined;
90
+ }>;
91
+ type InterruptOnConfig = z.input<typeof InterruptOnConfigSchema>;
92
+ /**
93
+ * Represents an action with a name and arguments.
94
+ */
95
+ interface Action {
96
+ /**
97
+ * The type or name of action being requested (e.g., "add_numbers").
98
+ */
99
+ name: string;
100
+ /**
101
+ * Key-value pairs of arguments needed for the action (e.g., {"a": 1, "b": 2}).
102
+ */
103
+ args: Record<string, any>;
104
+ }
105
+ /**
106
+ * Represents an action request with a name, arguments, and description.
107
+ */
108
+ interface ActionRequest {
109
+ /**
110
+ * The name of the action being requested.
111
+ */
112
+ name: string;
113
+ /**
114
+ * Key-value pairs of arguments needed for the action (e.g., {"a": 1, "b": 2}).
115
+ */
116
+ args: Record<string, any>;
117
+ /**
118
+ * The description of the action to be reviewed.
119
+ */
120
+ description?: string;
121
+ }
122
+ /**
123
+ * Policy for reviewing a HITL request.
124
+ */
125
+ interface ReviewConfig {
126
+ /**
127
+ * Name of the action associated with this review configuration.
128
+ */
129
+ actionName: string;
130
+ /**
131
+ * The decisions that are allowed for this request.
132
+ */
133
+ allowedDecisions: DecisionType[];
134
+ /**
135
+ * JSON schema for the arguments associated with the action, if edits are allowed.
136
+ */
137
+ argsSchema?: Record<string, any>;
138
+ }
139
+ /**
140
+ * Request for human feedback on a sequence of actions requested by a model.
141
+ *
142
+ * @example
143
+ * ```ts
144
+ * const hitlRequest: HITLRequest = {
145
+ * actionRequests: [
146
+ * { name: "send_email", args: { to: "user@example.com", subject: "Hello" } }
147
+ * ],
148
+ * reviewConfigs: [
149
+ * {
150
+ * actionName: "send_email",
151
+ * allowedDecisions: ["approve", "edit", "reject"],
152
+ * description: "Please review the email before sending"
153
+ * }
154
+ * ]
155
+ * };
156
+ * const response = interrupt(hitlRequest);
157
+ * ```
158
+ */
159
+ interface HITLRequest {
160
+ /**
161
+ * A list of agent actions for human review.
162
+ */
163
+ actionRequests: ActionRequest[];
164
+ /**
165
+ * Review configuration for all possible actions.
166
+ */
167
+ reviewConfigs: ReviewConfig[];
168
+ }
169
+ /**
170
+ * Response when a human approves the action.
171
+ */
172
+ interface ApproveDecision {
173
+ type: "approve";
174
+ }
175
+ /**
176
+ * Response when a human edits the action.
177
+ */
178
+ interface EditDecision {
179
+ type: "edit";
180
+ /**
181
+ * Edited action for the agent to perform.
182
+ * Ex: for a tool call, a human reviewer can edit the tool name and args.
183
+ */
184
+ editedAction: Action;
185
+ }
186
+ /**
187
+ * Response when a human rejects the action.
188
+ */
189
+ interface RejectDecision {
190
+ type: "reject";
191
+ /**
192
+ * The message sent to the model explaining why the action was rejected.
193
+ */
194
+ message?: string;
195
+ }
196
+ /**
197
+ * Union of all possible decision types.
198
+ */
199
+ type Decision = ApproveDecision | EditDecision | RejectDecision;
200
+ /**
201
+ * Response payload for a HITLRequest.
202
+ */
203
+ interface HITLResponse {
204
+ /**
205
+ * The decisions made by the human.
206
+ */
207
+ decisions: Decision[];
208
+ }
209
+ declare const contextSchema: z.ZodObject<{
210
+ /**
211
+ * Mapping of tool name to allowed reviewer responses.
212
+ * If a tool doesn't have an entry, it's auto-approved by default.
213
+ *
214
+ * - `true` -> pause for approval and allow approve/edit/reject decisions
215
+ * - `false` -> auto-approve (no human review)
216
+ * - `InterruptOnConfig` -> explicitly specify which decisions are allowed for this tool
217
+ */
218
+ interruptOn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
219
+ /**
220
+ * The decisions that are allowed for this action.
221
+ */
222
+ allowedDecisions: z.ZodArray<z.ZodEnum<["approve", "edit", "reject"]>, "many">;
223
+ /**
224
+ * The description attached to the request for human input.
225
+ * Can be either:
226
+ * - A static string describing the approval request
227
+ * - A callable that dynamically generates the description based on agent state,
228
+ * runtime, and tool call information
229
+ *
230
+ * @example
231
+ * Static string description
232
+ * ```typescript
233
+ * import type { InterruptOnConfig } from "langchain";
234
+ *
235
+ * const config: InterruptOnConfig = {
236
+ * allowedDecisions: ["approve", "reject"],
237
+ * description: "Please review this tool execution"
238
+ * };
239
+ * ```
240
+ *
241
+ * @example
242
+ * Dynamic callable description
243
+ * ```typescript
244
+ * import type {
245
+ * AgentBuiltInState,
246
+ * Runtime,
247
+ * DescriptionFactory,
248
+ * ToolCall,
249
+ * InterruptOnConfig
250
+ * } from "langchain";
251
+ *
252
+ * const formatToolDescription: DescriptionFactory = (
253
+ * toolCall: ToolCall,
254
+ * state: AgentBuiltInState,
255
+ * runtime: Runtime<unknown>
256
+ * ) => {
257
+ * return `Tool: ${toolCall.name}\nArguments:\n${JSON.stringify(toolCall.args, null, 2)}`;
258
+ * };
259
+ *
260
+ * const config: InterruptOnConfig = {
261
+ * allowedDecisions: ["approve", "edit"],
262
+ * description: formatToolDescription
263
+ * };
264
+ * ```
265
+ */
266
+ description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<ToolCall<string, Record<string, any>>, z.ZodTypeDef, ToolCall<string, Record<string, any>>>, z.ZodType<AgentBuiltInState, z.ZodTypeDef, AgentBuiltInState>, z.ZodType<Runtime<unknown>, z.ZodTypeDef, Runtime<unknown>>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
267
+ /**
268
+ * JSON schema for the arguments associated with the action, if edits are allowed.
269
+ */
270
+ argsSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
271
+ }, "strip", z.ZodTypeAny, {
272
+ allowedDecisions: ("approve" | "edit" | "reject")[];
273
+ description?: string | ((args_0: ToolCall<string, Record<string, any>>, args_1: AgentBuiltInState, args_2: Runtime<unknown>, ...args: unknown[]) => string | Promise<string>) | undefined;
274
+ argsSchema?: Record<string, any> | undefined;
275
+ }, {
276
+ allowedDecisions: ("approve" | "edit" | "reject")[];
277
+ description?: string | ((args_0: ToolCall<string, Record<string, any>>, args_1: AgentBuiltInState, args_2: Runtime<unknown>, ...args: unknown[]) => string | Promise<string>) | undefined;
278
+ argsSchema?: Record<string, any> | undefined;
279
+ }>]>>>;
280
+ /**
281
+ * Prefix used when constructing human-facing approval messages.
282
+ * Provides context about the tool call being reviewed; does not change the underlying action.
283
+ *
284
+ * Note: This prefix is only applied for tools that do not provide a custom
285
+ * `description` via their {@link InterruptOnConfig}. If a tool specifies a custom
286
+ * `description`, that per-tool text is used and this prefix is ignored.
287
+ */
288
+ descriptionPrefix: z.ZodDefault<z.ZodString>;
289
+ }, "strip", z.ZodTypeAny, {
290
+ interruptOn?: Record<string, boolean | {
291
+ allowedDecisions: ("approve" | "edit" | "reject")[];
292
+ description?: string | ((args_0: ToolCall<string, Record<string, any>>, args_1: AgentBuiltInState, args_2: Runtime<unknown>, ...args: unknown[]) => string | Promise<string>) | undefined;
293
+ argsSchema?: Record<string, any> | undefined;
294
+ }> | undefined;
295
+ descriptionPrefix: string;
296
+ }, {
297
+ interruptOn?: Record<string, boolean | {
298
+ allowedDecisions: ("approve" | "edit" | "reject")[];
299
+ description?: string | ((args_0: ToolCall<string, Record<string, any>>, args_1: AgentBuiltInState, args_2: Runtime<unknown>, ...args: unknown[]) => string | Promise<string>) | undefined;
300
+ argsSchema?: Record<string, any> | undefined;
301
+ }> | undefined;
302
+ descriptionPrefix?: string | undefined;
303
+ }>;
304
+ type HumanInTheLoopMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
305
+ /**
306
+ * Creates a Human-in-the-Loop (HITL) middleware for tool approval and oversight.
307
+ *
308
+ * This middleware intercepts tool calls made by an AI agent and provides human oversight
309
+ * capabilities before execution. It enables selective approval workflows where certain tools
310
+ * require human intervention while others can execute automatically.
311
+ *
312
+ * A invocation result that has been interrupted by the middleware will have a `__interrupt__`
313
+ * property that contains the interrupt request.
314
+ *
315
+ * ```ts
316
+ * import { type HITLRequest, type HITLResponse } from "langchain";
317
+ * import { type Interrupt } from "langchain";
318
+ *
319
+ * const result = await agent.invoke(request);
320
+ * const interruptRequest = result.__interrupt__?.[0] as Interrupt<HITLRequest>;
321
+ *
322
+ * // Examine the action requests and review configs
323
+ * const actionRequests = interruptRequest.value.actionRequests;
324
+ * const reviewConfigs = interruptRequest.value.reviewConfigs;
325
+ *
326
+ * // Create decisions for each action
327
+ * const resume: HITLResponse = {
328
+ * decisions: actionRequests.map((action, i) => {
329
+ * if (action.name === "calculator") {
330
+ * return { type: "approve" };
331
+ * } else if (action.name === "write_file") {
332
+ * return {
333
+ * type: "edit",
334
+ * editedAction: { name: "write_file", args: { filename: "safe.txt", content: "Safe content" } }
335
+ * };
336
+ * }
337
+ * return { type: "reject", message: "Action not allowed" };
338
+ * })
339
+ * };
340
+ *
341
+ * // Resume with decisions
342
+ * await agent.invoke(new Command({ resume }), config);
343
+ * ```
344
+ *
345
+ * ## Features
346
+ *
347
+ * - **Selective Tool Approval**: Configure which tools require human approval
348
+ * - **Multiple Decision Types**: Approve, edit, or reject tool calls
349
+ * - **Asynchronous Workflow**: Uses LangGraph's interrupt mechanism for non-blocking approval
350
+ * - **Custom Approval Messages**: Provide context-specific descriptions for approval requests
351
+ *
352
+ * ## Decision Types
353
+ *
354
+ * When a tool requires approval, the human operator can respond with:
355
+ * - `approve`: Execute the tool with original arguments
356
+ * - `edit`: Modify the tool name and/or arguments before execution
357
+ * - `reject`: Provide a manual response instead of executing the tool
358
+ *
359
+ * @param options - Configuration options for the middleware
360
+ * @param options.interruptOn - Per-tool configuration mapping tool names to their settings
361
+ * @param options.interruptOn[toolName].allowedDecisions - Array of decision types allowed for this tool (e.g., ["approve", "edit", "reject"])
362
+ * @param options.interruptOn[toolName].description - Custom approval message for the tool. Can be either a static string or a callable that dynamically generates the description based on agent state, runtime, and tool call information
363
+ * @param options.interruptOn[toolName].argsSchema - JSON schema for the arguments associated with the action, if edits are allowed
364
+ * @param options.descriptionPrefix - Default prefix for approval messages (default: "Tool execution requires approval"). Only used for tools that do not define a custom `description` in their InterruptOnConfig.
365
+ *
366
+ * @returns A middleware instance that can be passed to `createAgent`
367
+ *
368
+ * @example
369
+ * Basic usage with selective tool approval
370
+ * ```typescript
371
+ * import { humanInTheLoopMiddleware } from "langchain";
372
+ * import { createAgent } from "langchain";
373
+ *
374
+ * const hitlMiddleware = humanInTheLoopMiddleware({
375
+ * interruptOn: {
376
+ * // Interrupt write_file tool and allow edits or approvals
377
+ * "write_file": {
378
+ * allowedDecisions: ["approve", "edit"],
379
+ * description: "⚠️ File write operation requires approval"
380
+ * },
381
+ * // Auto-approve read_file tool
382
+ * "read_file": false
383
+ * }
384
+ * });
385
+ *
386
+ * const agent = createAgent({
387
+ * model: "openai:gpt-4",
388
+ * tools: [writeFileTool, readFileTool],
389
+ * middleware: [hitlMiddleware]
390
+ * });
391
+ * ```
392
+ *
393
+ * @example
394
+ * Handling approval requests
395
+ * ```typescript
396
+ * import { type HITLRequest, type HITLResponse, type Interrupt } from "langchain";
397
+ * import { Command } from "@langchain/langgraph";
398
+ *
399
+ * // Initial agent invocation
400
+ * const result = await agent.invoke({
401
+ * messages: [new HumanMessage("Write 'Hello' to output.txt")]
402
+ * }, config);
403
+ *
404
+ * // Check if agent is paused for approval
405
+ * if (result.__interrupt__) {
406
+ * const interruptRequest = result.__interrupt__?.[0] as Interrupt<HITLRequest>;
407
+ *
408
+ * // Show tool call details to user
409
+ * console.log("Actions:", interruptRequest.value.actionRequests);
410
+ * console.log("Review configs:", interruptRequest.value.reviewConfigs);
411
+ *
412
+ * // Resume with approval
413
+ * const resume: HITLResponse = {
414
+ * decisions: [{ type: "approve" }]
415
+ * };
416
+ * await agent.invoke(
417
+ * new Command({ resume }),
418
+ * config
419
+ * );
420
+ * }
421
+ * ```
422
+ *
423
+ * @example
424
+ * Different decision types
425
+ * ```typescript
426
+ * import { type HITLResponse } from "langchain";
427
+ *
428
+ * // Approve the tool call as-is
429
+ * const resume: HITLResponse = {
430
+ * decisions: [{ type: "approve" }]
431
+ * };
432
+ *
433
+ * // Edit the tool arguments
434
+ * const resume: HITLResponse = {
435
+ * decisions: [{
436
+ * type: "edit",
437
+ * editedAction: { name: "write_file", args: { filename: "safe.txt", content: "Modified" } }
438
+ * }]
439
+ * };
440
+ *
441
+ * // Reject with feedback
442
+ * const resume: HITLResponse = {
443
+ * decisions: [{
444
+ * type: "reject",
445
+ * message: "File operation not allowed in demo mode"
446
+ * }]
447
+ * };
448
+ * ```
449
+ *
450
+ * @example
451
+ * Production use case with database operations
452
+ * ```typescript
453
+ * const hitlMiddleware = humanInTheLoopMiddleware({
454
+ * interruptOn: {
455
+ * "execute_sql": {
456
+ * allowedDecisions: ["approve", "edit", "reject"],
457
+ * description: "🚨 SQL query requires DBA approval\nPlease review for safety and performance"
458
+ * },
459
+ * "read_schema": false, // Reading metadata is safe
460
+ * "delete_records": {
461
+ * allowedDecisions: ["approve", "reject"],
462
+ * description: "⛔ DESTRUCTIVE OPERATION - Requires manager approval"
463
+ * }
464
+ * },
465
+ * descriptionPrefix: "Database operation pending approval"
466
+ * });
467
+ * ```
468
+ *
469
+ * @example
470
+ * Using dynamic callable descriptions
471
+ * ```typescript
472
+ * import { type DescriptionFactory, type ToolCall } from "langchain";
473
+ * import type { AgentBuiltInState, Runtime } from "langchain/agents";
474
+ *
475
+ * // Define a dynamic description factory
476
+ * const formatToolDescription: DescriptionFactory = (
477
+ * toolCall: ToolCall,
478
+ * state: AgentBuiltInState,
479
+ * runtime: Runtime<unknown>
480
+ * ) => {
481
+ * return `Tool: ${toolCall.name}\nArguments:\n${JSON.stringify(toolCall.args, null, 2)}`;
482
+ * };
483
+ *
484
+ * const hitlMiddleware = humanInTheLoopMiddleware({
485
+ * interruptOn: {
486
+ * "write_file": {
487
+ * allowedDecisions: ["approve", "edit"],
488
+ * // Use dynamic description that can access tool call, state, and runtime
489
+ * description: formatToolDescription
490
+ * },
491
+ * // Or use an inline function
492
+ * "send_email": {
493
+ * allowedDecisions: ["approve", "reject"],
494
+ * description: (toolCall, state, runtime) => {
495
+ * const { to, subject } = toolCall.args;
496
+ * return `Email to ${to}\nSubject: ${subject}\n\nRequires approval before sending`;
497
+ * }
498
+ * }
499
+ * }
500
+ * });
501
+ * ```
502
+ *
503
+ * @remarks
504
+ * - Tool calls are processed in the order they appear in the AI message
505
+ * - Auto-approved tools execute immediately without interruption
506
+ * - Multiple tools requiring approval are bundled into a single interrupt request
507
+ * - The middleware operates in the `afterModel` phase, intercepting before tool execution
508
+ * - Requires a checkpointer to maintain state across interruptions
509
+ *
510
+ * @see {@link createAgent} for agent creation
511
+ * @see {@link Command} for resuming interrupted execution
512
+ * @public
513
+ */
514
+ declare function humanInTheLoopMiddleware(options: NonNullable<HumanInTheLoopMiddlewareConfig>): AgentMiddleware<undefined, z.ZodObject<{
515
+ /**
516
+ * Mapping of tool name to allowed reviewer responses.
517
+ * If a tool doesn't have an entry, it's auto-approved by default.
518
+ *
519
+ * - `true` -> pause for approval and allow approve/edit/reject decisions
520
+ * - `false` -> auto-approve (no human review)
521
+ * - `InterruptOnConfig` -> explicitly specify which decisions are allowed for this tool
522
+ */
523
+ interruptOn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
524
+ /**
525
+ * The decisions that are allowed for this action.
526
+ */
527
+ allowedDecisions: z.ZodArray<z.ZodEnum<["approve", "edit", "reject"]>, "many">;
528
+ /**
529
+ * The description attached to the request for human input.
530
+ * Can be either:
531
+ * - A static string describing the approval request
532
+ * - A callable that dynamically generates the description based on agent state,
533
+ * runtime, and tool call information
534
+ *
535
+ * @example
536
+ * Static string description
537
+ * ```typescript
538
+ * import type { InterruptOnConfig } from "langchain";
539
+ *
540
+ * const config: InterruptOnConfig = {
541
+ * allowedDecisions: ["approve", "reject"],
542
+ * description: "Please review this tool execution"
543
+ * };
544
+ * ```
545
+ *
546
+ * @example
547
+ * Dynamic callable description
548
+ * ```typescript
549
+ * import type {
550
+ * AgentBuiltInState,
551
+ * Runtime,
552
+ * DescriptionFactory,
553
+ * ToolCall,
554
+ * InterruptOnConfig
555
+ * } from "langchain";
556
+ *
557
+ * const formatToolDescription: DescriptionFactory = (
558
+ * toolCall: ToolCall,
559
+ * state: AgentBuiltInState,
560
+ * runtime: Runtime<unknown>
561
+ * ) => {
562
+ * return `Tool: ${toolCall.name}\nArguments:\n${JSON.stringify(toolCall.args, null, 2)}`;
563
+ * };
564
+ *
565
+ * const config: InterruptOnConfig = {
566
+ * allowedDecisions: ["approve", "edit"],
567
+ * description: formatToolDescription
568
+ * };
569
+ * ```
570
+ */
571
+ description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<ToolCall<string, Record<string, any>>, z.ZodTypeDef, ToolCall<string, Record<string, any>>>, z.ZodType<AgentBuiltInState, z.ZodTypeDef, AgentBuiltInState>, z.ZodType<Runtime<unknown>, z.ZodTypeDef, Runtime<unknown>>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
572
+ /**
573
+ * JSON schema for the arguments associated with the action, if edits are allowed.
574
+ */
575
+ argsSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
576
+ }, "strip", z.ZodTypeAny, {
577
+ allowedDecisions: ("approve" | "edit" | "reject")[];
578
+ description?: string | ((args_0: ToolCall<string, Record<string, any>>, args_1: AgentBuiltInState, args_2: Runtime<unknown>, ...args: unknown[]) => string | Promise<string>) | undefined;
579
+ argsSchema?: Record<string, any> | undefined;
580
+ }, {
581
+ allowedDecisions: ("approve" | "edit" | "reject")[];
582
+ description?: string | ((args_0: ToolCall<string, Record<string, any>>, args_1: AgentBuiltInState, args_2: Runtime<unknown>, ...args: unknown[]) => string | Promise<string>) | undefined;
583
+ argsSchema?: Record<string, any> | undefined;
584
+ }>]>>>;
585
+ /**
586
+ * Prefix used when constructing human-facing approval messages.
587
+ * Provides context about the tool call being reviewed; does not change the underlying action.
588
+ *
589
+ * Note: This prefix is only applied for tools that do not provide a custom
590
+ * `description` via their {@link InterruptOnConfig}. If a tool specifies a custom
591
+ * `description`, that per-tool text is used and this prefix is ignored.
592
+ */
593
+ descriptionPrefix: z.ZodDefault<z.ZodString>;
594
+ }, "strip", z.ZodTypeAny, {
595
+ interruptOn?: Record<string, boolean | {
596
+ allowedDecisions: ("approve" | "edit" | "reject")[];
597
+ description?: string | ((args_0: ToolCall<string, Record<string, any>>, args_1: AgentBuiltInState, args_2: Runtime<unknown>, ...args: unknown[]) => string | Promise<string>) | undefined;
598
+ argsSchema?: Record<string, any> | undefined;
599
+ }> | undefined;
600
+ descriptionPrefix: string;
601
+ }, {
602
+ interruptOn?: Record<string, boolean | {
603
+ allowedDecisions: ("approve" | "edit" | "reject")[];
604
+ description?: string | ((args_0: ToolCall<string, Record<string, any>>, args_1: AgentBuiltInState, args_2: Runtime<unknown>, ...args: unknown[]) => string | Promise<string>) | undefined;
605
+ argsSchema?: Record<string, any> | undefined;
606
+ }> | undefined;
607
+ descriptionPrefix?: string | undefined;
608
+ }>, any>;
609
+ //#endregion
610
+ export { Action, ActionRequest, ApproveDecision, Decision, DecisionType, DescriptionFactory, EditDecision, HITLRequest, HITLResponse, HumanInTheLoopMiddlewareConfig, InterruptOnConfig, RejectDecision, ReviewConfig, humanInTheLoopMiddleware };
611
+ //# sourceMappingURL=hitl.d.ts.map