@langchain/core 1.0.6 → 1.1.0

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 (695) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/agents.cjs +1 -0
  3. package/agents.d.cts +1 -0
  4. package/agents.d.ts +1 -0
  5. package/agents.js +1 -0
  6. package/caches.cjs +1 -0
  7. package/caches.d.cts +1 -0
  8. package/caches.d.ts +1 -0
  9. package/caches.js +1 -0
  10. package/callbacks/base.cjs +1 -0
  11. package/callbacks/base.d.cts +1 -0
  12. package/callbacks/base.d.ts +1 -0
  13. package/callbacks/base.js +1 -0
  14. package/callbacks/dispatch/web.cjs +1 -0
  15. package/callbacks/dispatch/web.d.cts +1 -0
  16. package/callbacks/dispatch/web.d.ts +1 -0
  17. package/callbacks/dispatch/web.js +1 -0
  18. package/callbacks/dispatch.cjs +1 -0
  19. package/callbacks/dispatch.d.cts +1 -0
  20. package/callbacks/dispatch.d.ts +1 -0
  21. package/callbacks/dispatch.js +1 -0
  22. package/callbacks/manager.cjs +1 -0
  23. package/callbacks/manager.d.cts +1 -0
  24. package/callbacks/manager.d.ts +1 -0
  25. package/callbacks/manager.js +1 -0
  26. package/callbacks/promises.cjs +1 -0
  27. package/callbacks/promises.d.cts +1 -0
  28. package/callbacks/promises.d.ts +1 -0
  29. package/callbacks/promises.js +1 -0
  30. package/chat_history.cjs +1 -0
  31. package/chat_history.d.cts +1 -0
  32. package/chat_history.d.ts +1 -0
  33. package/chat_history.js +1 -0
  34. package/context.cjs +1 -0
  35. package/context.d.cts +1 -0
  36. package/context.d.ts +1 -0
  37. package/context.js +1 -0
  38. package/dist/caches/{base.cjs → index.cjs} +6 -6
  39. package/dist/caches/index.cjs.map +1 -0
  40. package/dist/caches/{base.d.cts → index.d.cts} +2 -2
  41. package/dist/caches/{base.d.ts → index.d.ts} +2 -2
  42. package/dist/caches/{base.js → index.js} +5 -5
  43. package/dist/caches/index.js.map +1 -0
  44. package/dist/callbacks/dispatch/index.d.ts +1 -0
  45. package/dist/callbacks/dispatch/web.d.ts +1 -0
  46. package/dist/chat_history.d.ts +1 -0
  47. package/dist/language_models/base.cjs +2 -2
  48. package/dist/language_models/base.cjs.map +1 -1
  49. package/dist/language_models/base.d.cts +1 -1
  50. package/dist/language_models/base.d.ts +3 -1
  51. package/dist/language_models/base.js +1 -1
  52. package/dist/language_models/base.js.map +1 -1
  53. package/dist/language_models/chat_models.cjs.map +1 -1
  54. package/dist/language_models/chat_models.d.cts +1 -1
  55. package/dist/language_models/chat_models.d.ts +4 -1
  56. package/dist/language_models/chat_models.js.map +1 -1
  57. package/dist/language_models/llms.cjs.map +1 -1
  58. package/dist/language_models/llms.d.cts +1 -1
  59. package/dist/language_models/llms.d.ts +2 -1
  60. package/dist/language_models/llms.js.map +1 -1
  61. package/dist/load/import_constants.cjs +1 -0
  62. package/dist/load/import_constants.cjs.map +1 -1
  63. package/dist/load/import_constants.js +1 -0
  64. package/dist/load/import_constants.js.map +1 -1
  65. package/dist/load/import_map.cjs +12 -12
  66. package/dist/load/import_map.cjs.map +1 -1
  67. package/dist/load/import_map.js +16 -16
  68. package/dist/load/import_map.js.map +1 -1
  69. package/dist/messages/base.cjs +10 -3
  70. package/dist/messages/base.cjs.map +1 -1
  71. package/dist/messages/base.js +10 -3
  72. package/dist/messages/base.js.map +1 -1
  73. package/dist/messages/message.d.cts +1 -1
  74. package/dist/messages/message.d.ts +1 -1
  75. package/dist/messages/system.cjs +25 -1
  76. package/dist/messages/system.cjs.map +1 -1
  77. package/dist/messages/system.d.cts +6 -0
  78. package/dist/messages/system.d.ts +6 -0
  79. package/dist/messages/system.js +25 -1
  80. package/dist/messages/system.js.map +1 -1
  81. package/dist/messages/transformers.d.cts +2 -1
  82. package/dist/messages/transformers.d.ts +2 -1
  83. package/dist/messages/utils.d.cts +8 -8
  84. package/dist/messages/utils.d.ts +8 -8
  85. package/dist/output_parsers/base.d.ts +3 -0
  86. package/dist/output_parsers/index.cjs +1 -1
  87. package/dist/output_parsers/index.js +1 -1
  88. package/dist/output_parsers/list.d.ts +1 -0
  89. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts +1 -1
  90. package/dist/output_parsers/string.d.ts +1 -0
  91. package/dist/prompts/base.d.ts +1 -0
  92. package/dist/prompts/chat.d.ts +1 -0
  93. package/dist/prompts/few_shot.d.ts +1 -0
  94. package/dist/prompts/image.d.ts +1 -0
  95. package/dist/prompts/prompt.d.ts +1 -0
  96. package/dist/prompts/serde.d.ts +1 -0
  97. package/dist/prompts/structured.d.ts +1 -1
  98. package/dist/prompts/template.d.ts +1 -1
  99. package/dist/retrievers/document_compressors/{base.cjs → index.cjs} +6 -6
  100. package/dist/retrievers/document_compressors/index.cjs.map +1 -0
  101. package/dist/retrievers/document_compressors/{base.d.cts → index.d.cts} +2 -2
  102. package/dist/retrievers/document_compressors/{base.d.ts → index.d.ts} +2 -2
  103. package/dist/retrievers/document_compressors/index.js +17 -0
  104. package/dist/retrievers/document_compressors/index.js.map +1 -0
  105. package/dist/retrievers/index.d.ts +1 -0
  106. package/dist/runnables/base.cjs +2 -2
  107. package/dist/runnables/base.cjs.map +1 -1
  108. package/dist/runnables/base.d.cts +0 -17
  109. package/dist/runnables/base.d.ts +0 -17
  110. package/dist/runnables/base.js +2 -2
  111. package/dist/runnables/base.js.map +1 -1
  112. package/dist/runnables/branch.d.ts +1 -0
  113. package/dist/runnables/history.d.ts +2 -0
  114. package/dist/runnables/index.cjs +4 -1
  115. package/dist/runnables/index.cjs.map +1 -1
  116. package/dist/runnables/index.d.cts +2 -1
  117. package/dist/runnables/index.d.ts +2 -1
  118. package/dist/runnables/index.js +4 -2
  119. package/dist/runnables/index.js.map +1 -1
  120. package/dist/runnables/passthrough.d.ts +1 -0
  121. package/dist/runnables/router.d.ts +1 -0
  122. package/dist/tools/index.cjs +1 -1
  123. package/dist/tools/index.cjs.map +1 -1
  124. package/dist/tools/index.d.ts +2 -0
  125. package/dist/tools/index.js +2 -2
  126. package/dist/tools/index.js.map +1 -1
  127. package/dist/tools/types.d.cts +0 -13
  128. package/dist/tools/types.d.ts +2 -13
  129. package/dist/tracers/event_stream.d.ts +1 -0
  130. package/dist/utils/async_caller.cjs +1 -1
  131. package/dist/utils/async_caller.cjs.map +1 -1
  132. package/dist/utils/async_caller.js +1 -1
  133. package/dist/utils/async_caller.js.map +1 -1
  134. package/dist/utils/fast-json-patch/src/core.d.cts +0 -18
  135. package/dist/utils/fast-json-patch/src/core.d.ts +0 -18
  136. package/dist/utils/json_schema.d.cts +0 -5
  137. package/dist/utils/json_schema.d.ts +1 -5
  138. package/dist/utils/signal.d.cts +13 -0
  139. package/dist/utils/signal.d.ts +13 -0
  140. package/dist/utils/testing/chat_models.d.ts +1 -0
  141. package/dist/utils/testing/message_history.d.ts +1 -0
  142. package/dist/utils/types/index.cjs +2 -0
  143. package/dist/utils/types/index.d.cts +2 -2
  144. package/dist/utils/types/index.d.ts +2 -2
  145. package/dist/utils/types/index.js +3 -2
  146. package/dist/utils/types/zod.cjs +4 -0
  147. package/dist/utils/types/zod.cjs.map +1 -1
  148. package/dist/utils/types/zod.d.cts +3 -2
  149. package/dist/utils/types/zod.d.ts +3 -2
  150. package/dist/utils/types/zod.js +4 -1
  151. package/dist/utils/types/zod.js.map +1 -1
  152. package/dist/utils/zod-to-json-schema/Options.d.ts +3 -0
  153. package/dist/utils/zod-to-json-schema/Refs.d.ts +3 -0
  154. package/dist/utils/zod-to-json-schema/errorMessages.d.ts +1 -0
  155. package/dist/utils/zod-to-json-schema/index.d.ts +37 -0
  156. package/dist/utils/zod-to-json-schema/parseDef.d.ts +3 -0
  157. package/dist/utils/zod-to-json-schema/parsers/any.d.ts +2 -0
  158. package/dist/utils/zod-to-json-schema/parsers/array.d.ts +1 -0
  159. package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts +1 -0
  160. package/dist/utils/zod-to-json-schema/parsers/branded.d.ts +3 -0
  161. package/dist/utils/zod-to-json-schema/parsers/catch.d.ts +3 -0
  162. package/dist/utils/zod-to-json-schema/parsers/date.d.ts +2 -0
  163. package/dist/utils/zod-to-json-schema/parsers/default.d.ts +3 -0
  164. package/dist/utils/zod-to-json-schema/parsers/effects.d.ts +3 -0
  165. package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts +1 -0
  166. package/dist/utils/zod-to-json-schema/parsers/literal.d.ts +1 -0
  167. package/dist/utils/zod-to-json-schema/parsers/map.d.ts +2 -0
  168. package/dist/utils/zod-to-json-schema/parsers/never.d.ts +1 -0
  169. package/dist/utils/zod-to-json-schema/parsers/null.d.ts +2 -0
  170. package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts +1 -0
  171. package/dist/utils/zod-to-json-schema/parsers/number.d.ts +1 -0
  172. package/dist/utils/zod-to-json-schema/parsers/object.d.ts +1 -0
  173. package/dist/utils/zod-to-json-schema/parsers/optional.d.ts +3 -0
  174. package/dist/utils/zod-to-json-schema/parsers/pipeline.d.ts +4 -0
  175. package/dist/utils/zod-to-json-schema/parsers/promise.d.ts +3 -0
  176. package/dist/utils/zod-to-json-schema/parsers/readonly.d.ts +3 -0
  177. package/dist/utils/zod-to-json-schema/parsers/record.d.ts +1 -0
  178. package/dist/utils/zod-to-json-schema/parsers/set.d.ts +1 -0
  179. package/dist/utils/zod-to-json-schema/parsers/string.d.ts +1 -0
  180. package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts +1 -0
  181. package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts +1 -0
  182. package/dist/utils/zod-to-json-schema/parsers/union.d.ts +2 -1
  183. package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts +1 -0
  184. package/dist/utils/zod-to-json-schema/selectParser.d.ts +3 -0
  185. package/dist/utils/zod-to-json-schema/zodToJsonSchema.d.ts +3 -0
  186. package/document_loaders/base.cjs +1 -0
  187. package/document_loaders/base.d.cts +1 -0
  188. package/document_loaders/base.d.ts +1 -0
  189. package/document_loaders/base.js +1 -0
  190. package/document_loaders/langsmith.cjs +1 -0
  191. package/document_loaders/langsmith.d.cts +1 -0
  192. package/document_loaders/langsmith.d.ts +1 -0
  193. package/document_loaders/langsmith.js +1 -0
  194. package/documents.cjs +1 -0
  195. package/documents.d.cts +1 -0
  196. package/documents.d.ts +1 -0
  197. package/documents.js +1 -0
  198. package/embeddings.cjs +1 -0
  199. package/embeddings.d.cts +1 -0
  200. package/embeddings.d.ts +1 -0
  201. package/embeddings.js +1 -0
  202. package/example_selectors.cjs +1 -0
  203. package/example_selectors.d.cts +1 -0
  204. package/example_selectors.d.ts +1 -0
  205. package/example_selectors.js +1 -0
  206. package/indexing.cjs +1 -0
  207. package/indexing.d.cts +1 -0
  208. package/indexing.d.ts +1 -0
  209. package/indexing.js +1 -0
  210. package/language_models/base.cjs +1 -0
  211. package/language_models/base.d.cts +1 -0
  212. package/language_models/base.d.ts +1 -0
  213. package/language_models/base.js +1 -0
  214. package/language_models/chat_models.cjs +1 -0
  215. package/language_models/chat_models.d.cts +1 -0
  216. package/language_models/chat_models.d.ts +1 -0
  217. package/language_models/chat_models.js +1 -0
  218. package/language_models/llms.cjs +1 -0
  219. package/language_models/llms.d.cts +1 -0
  220. package/language_models/llms.d.ts +1 -0
  221. package/language_models/llms.js +1 -0
  222. package/language_models/profile.cjs +1 -0
  223. package/language_models/profile.d.cts +1 -0
  224. package/language_models/profile.d.ts +1 -0
  225. package/language_models/profile.js +1 -0
  226. package/load/serializable.cjs +1 -0
  227. package/load/serializable.d.cts +1 -0
  228. package/load/serializable.d.ts +1 -0
  229. package/load/serializable.js +1 -0
  230. package/load.cjs +1 -0
  231. package/load.d.cts +1 -0
  232. package/load.d.ts +1 -0
  233. package/load.js +1 -0
  234. package/memory.cjs +1 -0
  235. package/memory.d.cts +1 -0
  236. package/memory.d.ts +1 -0
  237. package/memory.js +1 -0
  238. package/messages/tool.cjs +1 -0
  239. package/messages/tool.d.cts +1 -0
  240. package/messages/tool.d.ts +1 -0
  241. package/messages/tool.js +1 -0
  242. package/messages.cjs +1 -0
  243. package/messages.d.cts +1 -0
  244. package/messages.d.ts +1 -0
  245. package/messages.js +1 -0
  246. package/output_parsers/openai_functions.cjs +1 -0
  247. package/output_parsers/openai_functions.d.cts +1 -0
  248. package/output_parsers/openai_functions.d.ts +1 -0
  249. package/output_parsers/openai_functions.js +1 -0
  250. package/output_parsers/openai_tools.cjs +1 -0
  251. package/output_parsers/openai_tools.d.cts +1 -0
  252. package/output_parsers/openai_tools.d.ts +1 -0
  253. package/output_parsers/openai_tools.js +1 -0
  254. package/output_parsers.cjs +1 -0
  255. package/output_parsers.d.cts +1 -0
  256. package/output_parsers.d.ts +1 -0
  257. package/output_parsers.js +1 -0
  258. package/outputs.cjs +1 -0
  259. package/outputs.d.cts +1 -0
  260. package/outputs.d.ts +1 -0
  261. package/outputs.js +1 -0
  262. package/package.json +163 -63
  263. package/prompt_values.cjs +1 -0
  264. package/prompt_values.d.cts +1 -0
  265. package/prompt_values.d.ts +1 -0
  266. package/prompt_values.js +1 -0
  267. package/prompts.cjs +1 -0
  268. package/prompts.d.cts +1 -0
  269. package/prompts.d.ts +1 -0
  270. package/prompts.js +1 -0
  271. package/retrievers/document_compressors.cjs +1 -0
  272. package/retrievers/document_compressors.d.cts +1 -0
  273. package/retrievers/document_compressors.d.ts +1 -0
  274. package/retrievers/document_compressors.js +1 -0
  275. package/retrievers.cjs +1 -0
  276. package/retrievers.d.cts +1 -0
  277. package/retrievers.d.ts +1 -0
  278. package/retrievers.js +1 -0
  279. package/runnables/graph.cjs +1 -0
  280. package/runnables/graph.d.cts +1 -0
  281. package/runnables/graph.d.ts +1 -0
  282. package/runnables/graph.js +1 -0
  283. package/runnables.cjs +1 -0
  284. package/runnables.d.cts +1 -0
  285. package/runnables.d.ts +1 -0
  286. package/runnables.js +1 -0
  287. package/singletons.cjs +1 -0
  288. package/singletons.d.cts +1 -0
  289. package/singletons.d.ts +1 -0
  290. package/singletons.js +1 -0
  291. package/stores.cjs +1 -0
  292. package/stores.d.cts +1 -0
  293. package/stores.d.ts +1 -0
  294. package/stores.js +1 -0
  295. package/structured_query.cjs +1 -0
  296. package/structured_query.d.cts +1 -0
  297. package/structured_query.d.ts +1 -0
  298. package/structured_query.js +1 -0
  299. package/tools.cjs +1 -0
  300. package/tools.d.cts +1 -0
  301. package/tools.d.ts +1 -0
  302. package/tools.js +1 -0
  303. package/tracers/base.cjs +1 -0
  304. package/tracers/base.d.cts +1 -0
  305. package/tracers/base.d.ts +1 -0
  306. package/tracers/base.js +1 -0
  307. package/tracers/console.cjs +1 -0
  308. package/tracers/console.d.cts +1 -0
  309. package/tracers/console.d.ts +1 -0
  310. package/tracers/console.js +1 -0
  311. package/tracers/log_stream.cjs +1 -0
  312. package/tracers/log_stream.d.cts +1 -0
  313. package/tracers/log_stream.d.ts +1 -0
  314. package/tracers/log_stream.js +1 -0
  315. package/tracers/run_collector.cjs +1 -0
  316. package/tracers/run_collector.d.cts +1 -0
  317. package/tracers/run_collector.d.ts +1 -0
  318. package/tracers/run_collector.js +1 -0
  319. package/tracers/tracer_langchain.cjs +1 -0
  320. package/tracers/tracer_langchain.d.cts +1 -0
  321. package/tracers/tracer_langchain.d.ts +1 -0
  322. package/tracers/tracer_langchain.js +1 -0
  323. package/types/stream.cjs +1 -0
  324. package/types/stream.d.cts +1 -0
  325. package/types/stream.d.ts +1 -0
  326. package/types/stream.js +1 -0
  327. package/utils/async_caller.cjs +1 -0
  328. package/utils/async_caller.d.cts +1 -0
  329. package/utils/async_caller.d.ts +1 -0
  330. package/utils/async_caller.js +1 -0
  331. package/utils/chunk_array.cjs +1 -0
  332. package/utils/chunk_array.d.cts +1 -0
  333. package/utils/chunk_array.d.ts +1 -0
  334. package/utils/chunk_array.js +1 -0
  335. package/utils/env.cjs +1 -0
  336. package/utils/env.d.cts +1 -0
  337. package/utils/env.d.ts +1 -0
  338. package/utils/env.js +1 -0
  339. package/utils/event_source_parse.cjs +1 -0
  340. package/utils/event_source_parse.d.cts +1 -0
  341. package/utils/event_source_parse.d.ts +1 -0
  342. package/utils/event_source_parse.js +1 -0
  343. package/utils/format.cjs +1 -0
  344. package/utils/format.d.cts +1 -0
  345. package/utils/format.d.ts +1 -0
  346. package/utils/format.js +1 -0
  347. package/utils/function_calling.cjs +1 -0
  348. package/utils/function_calling.d.cts +1 -0
  349. package/utils/function_calling.d.ts +1 -0
  350. package/utils/function_calling.js +1 -0
  351. package/utils/hash.cjs +1 -0
  352. package/utils/hash.d.cts +1 -0
  353. package/utils/hash.d.ts +1 -0
  354. package/utils/hash.js +1 -0
  355. package/utils/json_patch.cjs +1 -0
  356. package/utils/json_patch.d.cts +1 -0
  357. package/utils/json_patch.d.ts +1 -0
  358. package/utils/json_patch.js +1 -0
  359. package/utils/json_schema.cjs +1 -0
  360. package/utils/json_schema.d.cts +1 -0
  361. package/utils/json_schema.d.ts +1 -0
  362. package/utils/json_schema.js +1 -0
  363. package/utils/math.cjs +1 -0
  364. package/utils/math.d.cts +1 -0
  365. package/utils/math.d.ts +1 -0
  366. package/utils/math.js +1 -0
  367. package/utils/stream.cjs +1 -0
  368. package/utils/stream.d.cts +1 -0
  369. package/utils/stream.d.ts +1 -0
  370. package/utils/stream.js +1 -0
  371. package/utils/testing.cjs +1 -0
  372. package/utils/testing.d.cts +1 -0
  373. package/utils/testing.d.ts +1 -0
  374. package/utils/testing.js +1 -0
  375. package/utils/tiktoken.cjs +1 -0
  376. package/utils/tiktoken.d.cts +1 -0
  377. package/utils/tiktoken.d.ts +1 -0
  378. package/utils/tiktoken.js +1 -0
  379. package/utils/types.cjs +1 -0
  380. package/utils/types.d.cts +1 -0
  381. package/utils/types.d.ts +1 -0
  382. package/utils/types.js +1 -0
  383. package/vectorstores.cjs +1 -0
  384. package/vectorstores.d.cts +1 -0
  385. package/vectorstores.d.ts +1 -0
  386. package/vectorstores.js +1 -0
  387. package/dist/agents.d.cts.map +0 -1
  388. package/dist/agents.d.ts.map +0 -1
  389. package/dist/caches/base.cjs.map +0 -1
  390. package/dist/caches/base.d.cts.map +0 -1
  391. package/dist/caches/base.d.ts.map +0 -1
  392. package/dist/caches/base.js.map +0 -1
  393. package/dist/callbacks/base.d.cts.map +0 -1
  394. package/dist/callbacks/base.d.ts.map +0 -1
  395. package/dist/callbacks/dispatch/index.d.cts.map +0 -1
  396. package/dist/callbacks/dispatch/index.d.ts.map +0 -1
  397. package/dist/callbacks/dispatch/web.d.cts.map +0 -1
  398. package/dist/callbacks/dispatch/web.d.ts.map +0 -1
  399. package/dist/callbacks/manager.d.cts.map +0 -1
  400. package/dist/callbacks/manager.d.ts.map +0 -1
  401. package/dist/chat_history.d.cts.map +0 -1
  402. package/dist/chat_history.d.ts.map +0 -1
  403. package/dist/context.d.cts.map +0 -1
  404. package/dist/context.d.ts.map +0 -1
  405. package/dist/document_loaders/base.d.cts.map +0 -1
  406. package/dist/document_loaders/base.d.ts.map +0 -1
  407. package/dist/document_loaders/langsmith.d.cts.map +0 -1
  408. package/dist/document_loaders/langsmith.d.ts.map +0 -1
  409. package/dist/documents/document.d.cts.map +0 -1
  410. package/dist/documents/document.d.ts.map +0 -1
  411. package/dist/documents/transformers.d.cts.map +0 -1
  412. package/dist/documents/transformers.d.ts.map +0 -1
  413. package/dist/embeddings.d.cts.map +0 -1
  414. package/dist/embeddings.d.ts.map +0 -1
  415. package/dist/example_selectors/base.d.cts.map +0 -1
  416. package/dist/example_selectors/base.d.ts.map +0 -1
  417. package/dist/example_selectors/conditional.d.cts.map +0 -1
  418. package/dist/example_selectors/conditional.d.ts.map +0 -1
  419. package/dist/example_selectors/length_based.d.cts.map +0 -1
  420. package/dist/example_selectors/length_based.d.ts.map +0 -1
  421. package/dist/example_selectors/semantic_similarity.d.cts.map +0 -1
  422. package/dist/example_selectors/semantic_similarity.d.ts.map +0 -1
  423. package/dist/indexing/base.d.cts.map +0 -1
  424. package/dist/indexing/base.d.ts.map +0 -1
  425. package/dist/indexing/record_manager.d.cts.map +0 -1
  426. package/dist/indexing/record_manager.d.ts.map +0 -1
  427. package/dist/language_models/base.d.cts.map +0 -1
  428. package/dist/language_models/base.d.ts.map +0 -1
  429. package/dist/language_models/chat_models.d.cts.map +0 -1
  430. package/dist/language_models/chat_models.d.ts.map +0 -1
  431. package/dist/language_models/llms.d.cts.map +0 -1
  432. package/dist/language_models/llms.d.ts.map +0 -1
  433. package/dist/language_models/profile.d.cts.map +0 -1
  434. package/dist/language_models/profile.d.ts.map +0 -1
  435. package/dist/load/import_type.d.cts.map +0 -1
  436. package/dist/load/import_type.d.ts.map +0 -1
  437. package/dist/load/index.d.cts.map +0 -1
  438. package/dist/load/index.d.ts.map +0 -1
  439. package/dist/load/map_keys.d.cts.map +0 -1
  440. package/dist/load/map_keys.d.ts.map +0 -1
  441. package/dist/load/serializable.d.cts.map +0 -1
  442. package/dist/load/serializable.d.ts.map +0 -1
  443. package/dist/memory.d.cts.map +0 -1
  444. package/dist/memory.d.ts.map +0 -1
  445. package/dist/messages/ai.d.cts.map +0 -1
  446. package/dist/messages/ai.d.ts.map +0 -1
  447. package/dist/messages/base.d.cts.map +0 -1
  448. package/dist/messages/base.d.ts.map +0 -1
  449. package/dist/messages/chat.d.cts.map +0 -1
  450. package/dist/messages/chat.d.ts.map +0 -1
  451. package/dist/messages/content/base.d.cts.map +0 -1
  452. package/dist/messages/content/base.d.ts.map +0 -1
  453. package/dist/messages/content/data.d.cts.map +0 -1
  454. package/dist/messages/content/data.d.ts.map +0 -1
  455. package/dist/messages/content/index.d.cts.map +0 -1
  456. package/dist/messages/content/index.d.ts.map +0 -1
  457. package/dist/messages/content/multimodal.d.cts.map +0 -1
  458. package/dist/messages/content/multimodal.d.ts.map +0 -1
  459. package/dist/messages/content/tools.d.cts.map +0 -1
  460. package/dist/messages/content/tools.d.ts.map +0 -1
  461. package/dist/messages/format.d.cts.map +0 -1
  462. package/dist/messages/format.d.ts.map +0 -1
  463. package/dist/messages/function.d.cts.map +0 -1
  464. package/dist/messages/function.d.ts.map +0 -1
  465. package/dist/messages/human.d.cts.map +0 -1
  466. package/dist/messages/human.d.ts.map +0 -1
  467. package/dist/messages/message.d.cts.map +0 -1
  468. package/dist/messages/message.d.ts.map +0 -1
  469. package/dist/messages/metadata.d.cts.map +0 -1
  470. package/dist/messages/metadata.d.ts.map +0 -1
  471. package/dist/messages/modifier.d.cts.map +0 -1
  472. package/dist/messages/modifier.d.ts.map +0 -1
  473. package/dist/messages/system.d.cts.map +0 -1
  474. package/dist/messages/system.d.ts.map +0 -1
  475. package/dist/messages/tool.d.cts.map +0 -1
  476. package/dist/messages/tool.d.ts.map +0 -1
  477. package/dist/messages/transformers.d.cts.map +0 -1
  478. package/dist/messages/transformers.d.ts.map +0 -1
  479. package/dist/messages/utils.d.cts.map +0 -1
  480. package/dist/messages/utils.d.ts.map +0 -1
  481. package/dist/output_parsers/base.d.cts.map +0 -1
  482. package/dist/output_parsers/base.d.ts.map +0 -1
  483. package/dist/output_parsers/bytes.d.cts.map +0 -1
  484. package/dist/output_parsers/bytes.d.ts.map +0 -1
  485. package/dist/output_parsers/json.d.cts.map +0 -1
  486. package/dist/output_parsers/json.d.ts.map +0 -1
  487. package/dist/output_parsers/list.d.cts.map +0 -1
  488. package/dist/output_parsers/list.d.ts.map +0 -1
  489. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts.map +0 -1
  490. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts.map +0 -1
  491. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts.map +0 -1
  492. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts.map +0 -1
  493. package/dist/output_parsers/string.d.cts.map +0 -1
  494. package/dist/output_parsers/string.d.ts.map +0 -1
  495. package/dist/output_parsers/structured.d.cts.map +0 -1
  496. package/dist/output_parsers/structured.d.ts.map +0 -1
  497. package/dist/output_parsers/transform.d.cts.map +0 -1
  498. package/dist/output_parsers/transform.d.ts.map +0 -1
  499. package/dist/output_parsers/xml.d.cts.map +0 -1
  500. package/dist/output_parsers/xml.d.ts.map +0 -1
  501. package/dist/outputs.d.cts.map +0 -1
  502. package/dist/outputs.d.ts.map +0 -1
  503. package/dist/prompt_values.d.cts.map +0 -1
  504. package/dist/prompt_values.d.ts.map +0 -1
  505. package/dist/prompts/base.d.cts.map +0 -1
  506. package/dist/prompts/base.d.ts.map +0 -1
  507. package/dist/prompts/chat.d.cts.map +0 -1
  508. package/dist/prompts/chat.d.ts.map +0 -1
  509. package/dist/prompts/dict.d.cts.map +0 -1
  510. package/dist/prompts/dict.d.ts.map +0 -1
  511. package/dist/prompts/few_shot.d.cts.map +0 -1
  512. package/dist/prompts/few_shot.d.ts.map +0 -1
  513. package/dist/prompts/image.d.cts.map +0 -1
  514. package/dist/prompts/image.d.ts.map +0 -1
  515. package/dist/prompts/pipeline.d.cts.map +0 -1
  516. package/dist/prompts/pipeline.d.ts.map +0 -1
  517. package/dist/prompts/prompt.d.cts.map +0 -1
  518. package/dist/prompts/prompt.d.ts.map +0 -1
  519. package/dist/prompts/serde.d.cts.map +0 -1
  520. package/dist/prompts/serde.d.ts.map +0 -1
  521. package/dist/prompts/string.d.cts.map +0 -1
  522. package/dist/prompts/string.d.ts.map +0 -1
  523. package/dist/prompts/structured.d.cts.map +0 -1
  524. package/dist/prompts/structured.d.ts.map +0 -1
  525. package/dist/prompts/template.d.cts.map +0 -1
  526. package/dist/prompts/template.d.ts.map +0 -1
  527. package/dist/retrievers/document_compressors/base.cjs.map +0 -1
  528. package/dist/retrievers/document_compressors/base.d.cts.map +0 -1
  529. package/dist/retrievers/document_compressors/base.d.ts.map +0 -1
  530. package/dist/retrievers/document_compressors/base.js +0 -17
  531. package/dist/retrievers/document_compressors/base.js.map +0 -1
  532. package/dist/retrievers/index.d.cts.map +0 -1
  533. package/dist/retrievers/index.d.ts.map +0 -1
  534. package/dist/runnables/base.d.cts.map +0 -1
  535. package/dist/runnables/base.d.ts.map +0 -1
  536. package/dist/runnables/branch.d.cts.map +0 -1
  537. package/dist/runnables/branch.d.ts.map +0 -1
  538. package/dist/runnables/config.d.cts.map +0 -1
  539. package/dist/runnables/config.d.ts.map +0 -1
  540. package/dist/runnables/graph.d.cts.map +0 -1
  541. package/dist/runnables/graph.d.ts.map +0 -1
  542. package/dist/runnables/history.d.cts.map +0 -1
  543. package/dist/runnables/history.d.ts.map +0 -1
  544. package/dist/runnables/passthrough.d.cts.map +0 -1
  545. package/dist/runnables/passthrough.d.ts.map +0 -1
  546. package/dist/runnables/router.d.cts.map +0 -1
  547. package/dist/runnables/router.d.ts.map +0 -1
  548. package/dist/runnables/types.d.cts.map +0 -1
  549. package/dist/runnables/types.d.ts.map +0 -1
  550. package/dist/singletons/async_local_storage/context.d.cts.map +0 -1
  551. package/dist/singletons/async_local_storage/context.d.ts.map +0 -1
  552. package/dist/singletons/async_local_storage/globals.d.cts.map +0 -1
  553. package/dist/singletons/async_local_storage/globals.d.ts.map +0 -1
  554. package/dist/singletons/async_local_storage/index.d.cts.map +0 -1
  555. package/dist/singletons/async_local_storage/index.d.ts.map +0 -1
  556. package/dist/singletons/callbacks.d.cts.map +0 -1
  557. package/dist/singletons/callbacks.d.ts.map +0 -1
  558. package/dist/stores.d.cts.map +0 -1
  559. package/dist/stores.d.ts.map +0 -1
  560. package/dist/structured_query/base.d.cts.map +0 -1
  561. package/dist/structured_query/base.d.ts.map +0 -1
  562. package/dist/structured_query/functional.d.cts.map +0 -1
  563. package/dist/structured_query/functional.d.ts.map +0 -1
  564. package/dist/structured_query/ir.d.cts.map +0 -1
  565. package/dist/structured_query/ir.d.ts.map +0 -1
  566. package/dist/structured_query/utils.d.cts.map +0 -1
  567. package/dist/structured_query/utils.d.ts.map +0 -1
  568. package/dist/tools/index.d.cts.map +0 -1
  569. package/dist/tools/index.d.ts.map +0 -1
  570. package/dist/tools/types.d.cts.map +0 -1
  571. package/dist/tools/types.d.ts.map +0 -1
  572. package/dist/tools/utils.d.cts.map +0 -1
  573. package/dist/tools/utils.d.ts.map +0 -1
  574. package/dist/tracers/base.d.cts.map +0 -1
  575. package/dist/tracers/base.d.ts.map +0 -1
  576. package/dist/tracers/console.d.cts.map +0 -1
  577. package/dist/tracers/console.d.ts.map +0 -1
  578. package/dist/tracers/event_stream.d.cts.map +0 -1
  579. package/dist/tracers/event_stream.d.ts.map +0 -1
  580. package/dist/tracers/log_stream.d.cts.map +0 -1
  581. package/dist/tracers/log_stream.d.ts.map +0 -1
  582. package/dist/tracers/run_collector.d.cts.map +0 -1
  583. package/dist/tracers/run_collector.d.ts.map +0 -1
  584. package/dist/tracers/tracer_langchain.d.cts.map +0 -1
  585. package/dist/tracers/tracer_langchain.d.ts.map +0 -1
  586. package/dist/types/_internal.d.cts.map +0 -1
  587. package/dist/types/_internal.d.ts.map +0 -1
  588. package/dist/types/type-utils.d.cts.map +0 -1
  589. package/dist/types/type-utils.d.ts.map +0 -1
  590. package/dist/utils/async_caller.d.cts.map +0 -1
  591. package/dist/utils/async_caller.d.ts.map +0 -1
  592. package/dist/utils/chunk_array.d.cts.map +0 -1
  593. package/dist/utils/chunk_array.d.ts.map +0 -1
  594. package/dist/utils/env.d.cts.map +0 -1
  595. package/dist/utils/env.d.ts.map +0 -1
  596. package/dist/utils/event_source_parse.d.cts.map +0 -1
  597. package/dist/utils/event_source_parse.d.ts.map +0 -1
  598. package/dist/utils/fast-json-patch/src/core.d.cts.map +0 -1
  599. package/dist/utils/fast-json-patch/src/core.d.ts.map +0 -1
  600. package/dist/utils/fast-json-patch/src/duplex.d.cts.map +0 -1
  601. package/dist/utils/fast-json-patch/src/duplex.d.ts.map +0 -1
  602. package/dist/utils/format.d.cts.map +0 -1
  603. package/dist/utils/format.d.ts.map +0 -1
  604. package/dist/utils/function_calling.d.cts.map +0 -1
  605. package/dist/utils/function_calling.d.ts.map +0 -1
  606. package/dist/utils/hash.d.cts.map +0 -1
  607. package/dist/utils/hash.d.ts.map +0 -1
  608. package/dist/utils/js-sha256/hash.d.cts.map +0 -1
  609. package/dist/utils/js-sha256/hash.d.ts.map +0 -1
  610. package/dist/utils/json.d.cts.map +0 -1
  611. package/dist/utils/json.d.ts.map +0 -1
  612. package/dist/utils/json_schema.d.cts.map +0 -1
  613. package/dist/utils/json_schema.d.ts.map +0 -1
  614. package/dist/utils/math.d.cts.map +0 -1
  615. package/dist/utils/math.d.ts.map +0 -1
  616. package/dist/utils/ml-distance/similarities.d.cts.map +0 -1
  617. package/dist/utils/ml-distance/similarities.d.ts.map +0 -1
  618. package/dist/utils/stream.d.cts.map +0 -1
  619. package/dist/utils/stream.d.ts.map +0 -1
  620. package/dist/utils/testing/chat_models.d.cts.map +0 -1
  621. package/dist/utils/testing/chat_models.d.ts.map +0 -1
  622. package/dist/utils/testing/embeddings.d.cts.map +0 -1
  623. package/dist/utils/testing/embeddings.d.ts.map +0 -1
  624. package/dist/utils/testing/llms.d.cts.map +0 -1
  625. package/dist/utils/testing/llms.d.ts.map +0 -1
  626. package/dist/utils/testing/message_history.d.cts.map +0 -1
  627. package/dist/utils/testing/message_history.d.ts.map +0 -1
  628. package/dist/utils/testing/output_parsers.d.cts.map +0 -1
  629. package/dist/utils/testing/output_parsers.d.ts.map +0 -1
  630. package/dist/utils/testing/retrievers.d.cts.map +0 -1
  631. package/dist/utils/testing/retrievers.d.ts.map +0 -1
  632. package/dist/utils/testing/runnables.d.cts.map +0 -1
  633. package/dist/utils/testing/runnables.d.ts.map +0 -1
  634. package/dist/utils/testing/tools.d.cts.map +0 -1
  635. package/dist/utils/testing/tools.d.ts.map +0 -1
  636. package/dist/utils/testing/tracers.d.cts.map +0 -1
  637. package/dist/utils/testing/tracers.d.ts.map +0 -1
  638. package/dist/utils/testing/vectorstores.d.cts.map +0 -1
  639. package/dist/utils/testing/vectorstores.d.ts.map +0 -1
  640. package/dist/utils/tiktoken.d.cts.map +0 -1
  641. package/dist/utils/tiktoken.d.ts.map +0 -1
  642. package/dist/utils/types/index.d.cts.map +0 -1
  643. package/dist/utils/types/index.d.ts.map +0 -1
  644. package/dist/utils/types/zod.d.cts.map +0 -1
  645. package/dist/utils/types/zod.d.ts.map +0 -1
  646. package/dist/utils/zod-to-json-schema/errorMessages.d.cts.map +0 -1
  647. package/dist/utils/zod-to-json-schema/errorMessages.d.ts.map +0 -1
  648. package/dist/utils/zod-to-json-schema/parseTypes.d.cts.map +0 -1
  649. package/dist/utils/zod-to-json-schema/parseTypes.d.ts.map +0 -1
  650. package/dist/utils/zod-to-json-schema/parsers/any.d.cts.map +0 -1
  651. package/dist/utils/zod-to-json-schema/parsers/any.d.ts.map +0 -1
  652. package/dist/utils/zod-to-json-schema/parsers/array.d.cts.map +0 -1
  653. package/dist/utils/zod-to-json-schema/parsers/array.d.ts.map +0 -1
  654. package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts.map +0 -1
  655. package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts.map +0 -1
  656. package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts.map +0 -1
  657. package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts.map +0 -1
  658. package/dist/utils/zod-to-json-schema/parsers/date.d.cts.map +0 -1
  659. package/dist/utils/zod-to-json-schema/parsers/date.d.ts.map +0 -1
  660. package/dist/utils/zod-to-json-schema/parsers/enum.d.cts.map +0 -1
  661. package/dist/utils/zod-to-json-schema/parsers/enum.d.ts.map +0 -1
  662. package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts.map +0 -1
  663. package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts.map +0 -1
  664. package/dist/utils/zod-to-json-schema/parsers/literal.d.cts.map +0 -1
  665. package/dist/utils/zod-to-json-schema/parsers/literal.d.ts.map +0 -1
  666. package/dist/utils/zod-to-json-schema/parsers/map.d.cts.map +0 -1
  667. package/dist/utils/zod-to-json-schema/parsers/map.d.ts.map +0 -1
  668. package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts.map +0 -1
  669. package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts.map +0 -1
  670. package/dist/utils/zod-to-json-schema/parsers/never.d.cts.map +0 -1
  671. package/dist/utils/zod-to-json-schema/parsers/never.d.ts.map +0 -1
  672. package/dist/utils/zod-to-json-schema/parsers/null.d.cts.map +0 -1
  673. package/dist/utils/zod-to-json-schema/parsers/null.d.ts.map +0 -1
  674. package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts.map +0 -1
  675. package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts.map +0 -1
  676. package/dist/utils/zod-to-json-schema/parsers/number.d.cts.map +0 -1
  677. package/dist/utils/zod-to-json-schema/parsers/number.d.ts.map +0 -1
  678. package/dist/utils/zod-to-json-schema/parsers/object.d.cts.map +0 -1
  679. package/dist/utils/zod-to-json-schema/parsers/object.d.ts.map +0 -1
  680. package/dist/utils/zod-to-json-schema/parsers/record.d.cts.map +0 -1
  681. package/dist/utils/zod-to-json-schema/parsers/record.d.ts.map +0 -1
  682. package/dist/utils/zod-to-json-schema/parsers/set.d.cts.map +0 -1
  683. package/dist/utils/zod-to-json-schema/parsers/set.d.ts.map +0 -1
  684. package/dist/utils/zod-to-json-schema/parsers/string.d.cts.map +0 -1
  685. package/dist/utils/zod-to-json-schema/parsers/string.d.ts.map +0 -1
  686. package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts.map +0 -1
  687. package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts.map +0 -1
  688. package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts.map +0 -1
  689. package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts.map +0 -1
  690. package/dist/utils/zod-to-json-schema/parsers/union.d.cts.map +0 -1
  691. package/dist/utils/zod-to-json-schema/parsers/union.d.ts.map +0 -1
  692. package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts.map +0 -1
  693. package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts.map +0 -1
  694. package/dist/vectorstores.d.cts.map +0 -1
  695. package/dist/vectorstores.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","names":["SerializableInterface","BaseCallbackConfig","IterableReadableStreamInterface","InteropZodType","RunnableBatchOptions","RunnableIOSchema","RunnableInterface","RunnableConfig","RunInput","CallOptions","Partial","RunOutput","Promise","Error","AsyncGenerator","Edge","Node","Record","ConfigurableFieldType","AbortSignal"],"sources":["../../src/runnables/types.d.ts"],"sourcesContent":["import type { SerializableInterface } from \"../load/serializable.js\";\nimport type { BaseCallbackConfig } from \"../callbacks/manager.js\";\nimport type { IterableReadableStreamInterface } from \"../types/_internal.js\";\nimport { InteropZodType } from \"../utils/types/zod.js\";\nexport type RunnableBatchOptions = {\n /** @deprecated Pass in via the standard runnable config object instead */\n maxConcurrency?: number;\n returnExceptions?: boolean;\n};\nexport type RunnableIOSchema = {\n name?: string;\n schema: InteropZodType;\n};\n/**\n * Base interface implemented by all runnables.\n * Used for cross-compatibility between different versions of LangChain core.\n *\n * Should not change on patch releases.\n */\nexport interface RunnableInterface<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nRunInput = any, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nRunOutput = any, CallOptions extends RunnableConfig = RunnableConfig> extends SerializableInterface {\n lc_serializable: boolean;\n invoke(input: RunInput, options?: Partial<CallOptions>): Promise<RunOutput>;\n batch(inputs: RunInput[], options?: Partial<CallOptions> | Partial<CallOptions>[], batchOptions?: RunnableBatchOptions & {\n returnExceptions?: false;\n }): Promise<RunOutput[]>;\n batch(inputs: RunInput[], options?: Partial<CallOptions> | Partial<CallOptions>[], batchOptions?: RunnableBatchOptions & {\n returnExceptions: true;\n }): Promise<(RunOutput | Error)[]>;\n batch(inputs: RunInput[], options?: Partial<CallOptions> | Partial<CallOptions>[], batchOptions?: RunnableBatchOptions): Promise<(RunOutput | Error)[]>;\n stream(input: RunInput, options?: Partial<CallOptions>): Promise<IterableReadableStreamInterface<RunOutput>>;\n transform(generator: AsyncGenerator<RunInput>, options: Partial<CallOptions>): AsyncGenerator<RunOutput>;\n getName(suffix?: string): string;\n}\nexport interface Edge {\n source: string;\n target: string;\n data?: string;\n conditional?: boolean;\n}\nexport interface Node {\n id: string;\n name: string;\n data: RunnableIOSchema | RunnableInterface;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata?: Record<string, any>;\n}\nexport interface RunnableConfig<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nConfigurableFieldType extends Record<string, any> = Record<string, any>> extends BaseCallbackConfig {\n /**\n * Runtime values for attributes previously made configurable on this Runnable,\n * or sub-Runnables.\n */\n configurable?: ConfigurableFieldType;\n /**\n * Maximum number of times a call can recurse. If not provided, defaults to 25.\n */\n recursionLimit?: number;\n /** Maximum number of parallel calls to make. */\n maxConcurrency?: number;\n /**\n * Timeout for this call in milliseconds.\n */\n timeout?: number;\n /**\n * Abort signal for this call.\n * If provided, the call will be aborted when the signal is aborted.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\n */\n signal?: AbortSignal;\n}\n"],"mappings":";;;;;;KAIYI,oBAAAA;;EAAAA,cAAAA,CAAAA,EAAAA,MAAoB;EAKpBC,gBAAAA,CAAAA,EAAgB,OAAA;AAU5B,CAAA;AAAkC,KAVtBA,gBAAAA,GAUsB;EAAA,IAIGE,CAAAA,EAAAA,MAAAA;EAAc,MAAGA,EAZ1CJ,cAY0CI;CAAc;;;;;;;AAG5BG,UAPvBJ,iBAOuBI;;WAAuBA,GAAAA;;YAE/CC,GAAAA,EAAAA,oBALqBJ,cAKrBI,GALsCJ,cAKtCI,CAAAA,SAL8DX,qBAK9DW,CAAAA;EAAS,eAAjBC,EAAAA,OAAAA;EAAO,MACGJ,CAAAA,KAAAA,EAJAA,QAIAA,EAAAA,OAAAA,CAAAA,EAJoBE,OAIpBF,CAJ4BC,WAI5BD,CAAAA,CAAAA,EAJ2CI,OAI3CJ,CAJmDG,SAInDH,CAAAA;EAAQ,KAAsBC,CAAAA,MAAAA,EAH9BD,QAG8BC,EAAAA,EAAAA,OAAAA,CAAAA,EAHRC,OAGQD,CAHAA,WAGAA,CAAAA,GAHeC,OAGfD,CAHuBA,WAGvBA,CAAAA,EAAAA,EAAAA,YAAD,CAACA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AoB,IAAYO,CAAAA,EAAAA,MAAAA;EAAS,WAAGE,CAAAA,EAAAA,OAAAA;;AAChIL,UAUDQ,IAAAA,CAVCR;EAAQ,EAAA,EAAoBC,MAAAA;EAAW,IAAnBC,EAAAA,MAAAA;EAAO,IAAwDC,EAa3FN,gBAb2FM,GAaxEL,iBAbwEK;EAAS;EAAV,QAAvCC,CAAAA,EAe9CK,MAf8CL,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;;AACpCE,UAgBRP,cAhBQO;;8BAkBKG,MAlB8BP,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GAkBRO,MAlBQP,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,CAAAA,SAkBqBT,kBAlBrBS,CAAAA;EAAO;;;AAXgC;EAclFK,YAAI,CAAA,EAoBFG,qBApBE;EAMJF;;;EAGS,cAAGV,CAAAA,EAAAA,MAAAA;EAAiB;EAEzB,cAAA,CAAA,EAAA,MAAA;EAEJC;;;EAEmB,OAAgBU,CAAAA,EAAAA,MAAAA;EAAM;;;AAAyC;;WAqBtFE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.cts","names":["BaseCallbackHandler","setContextVariable","PropertyKey","T","getContextVariable","_getConfigureHooks","ConfigureHook","registerConfigureHook"],"sources":["../../../src/singletons/async_local_storage/context.d.ts"],"sourcesContent":["import { BaseCallbackHandler } from \"../../callbacks/base.js\";\n/**\n * Set a context variable. Context variables are scoped to any\n * child runnables called by the current runnable, or globally if set outside\n * of any runnable.\n *\n * @remarks\n * This function is only supported in environments that support AsyncLocalStorage,\n * including Node.js, Deno, and Cloudflare Workers.\n *\n * @example\n * ```ts\n * import { RunnableLambda } from \"@langchain/core/runnables\";\n * import {\n * getContextVariable,\n * setContextVariable\n * } from \"@langchain/core/context\";\n *\n * const nested = RunnableLambda.from(() => {\n * // \"bar\" because it was set by a parent\n * console.log(getContextVariable(\"foo\"));\n *\n * // Override to \"baz\", but only for child runnables\n * setContextVariable(\"foo\", \"baz\");\n *\n * // Now \"baz\", but only for child runnables\n * return getContextVariable(\"foo\");\n * });\n *\n * const runnable = RunnableLambda.from(async () => {\n * // Set a context variable named \"foo\"\n * setContextVariable(\"foo\", \"bar\");\n *\n * const res = await nested.invoke({});\n *\n * // Still \"bar\" since child changes do not affect parents\n * console.log(getContextVariable(\"foo\"));\n *\n * return res;\n * });\n *\n * // undefined, because context variable has not been set yet\n * console.log(getContextVariable(\"foo\"));\n *\n * // Final return value is \"baz\"\n * const result = await runnable.invoke({});\n * ```\n *\n * @param name The name of the context variable.\n * @param value The value to set.\n */\nexport declare function setContextVariable<T>(name: PropertyKey, value: T): void;\n/**\n * Get the value of a previously set context variable. Context variables\n * are scoped to any child runnables called by the current runnable,\n * or globally if set outside of any runnable.\n *\n * @remarks\n * This function is only supported in environments that support AsyncLocalStorage,\n * including Node.js, Deno, and Cloudflare Workers.\n *\n * @example\n * ```ts\n * import { RunnableLambda } from \"@langchain/core/runnables\";\n * import {\n * getContextVariable,\n * setContextVariable\n * } from \"@langchain/core/context\";\n *\n * const nested = RunnableLambda.from(() => {\n * // \"bar\" because it was set by a parent\n * console.log(getContextVariable(\"foo\"));\n *\n * // Override to \"baz\", but only for child runnables\n * setContextVariable(\"foo\", \"baz\");\n *\n * // Now \"baz\", but only for child runnables\n * return getContextVariable(\"foo\");\n * });\n *\n * const runnable = RunnableLambda.from(async () => {\n * // Set a context variable named \"foo\"\n * setContextVariable(\"foo\", \"bar\");\n *\n * const res = await nested.invoke({});\n *\n * // Still \"bar\" since child changes do not affect parents\n * console.log(getContextVariable(\"foo\"));\n *\n * return res;\n * });\n *\n * // undefined, because context variable has not been set yet\n * console.log(getContextVariable(\"foo\"));\n *\n * // Final return value is \"baz\"\n * const result = await runnable.invoke({});\n * ```\n *\n * @param name The name of the context variable.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport declare function getContextVariable<T = any>(name: PropertyKey): T | undefined;\nexport declare const _getConfigureHooks: () => ConfigureHook[];\n/**\n * Register a callback configure hook to automatically add callback handlers to all runs.\n *\n * There are two ways to use this:\n *\n * 1. Using a context variable:\n * - Set `contextVar` to specify the variable name\n * - Use `setContextVariable()` to store your handler instance\n *\n * 2. Using an environment variable:\n * - Set both `envVar` and `handlerClass`\n * - The handler will be instantiated when the env var is set to \"true\".\n *\n * @example\n * ```typescript\n * // Method 1: Using context variable\n * import {\n * registerConfigureHook,\n * setContextVariable\n * } from \"@langchain/core/context\";\n *\n * const tracer = new MyCallbackHandler();\n * registerConfigureHook({\n * contextVar: \"my_tracer\",\n * });\n * setContextVariable(\"my_tracer\", tracer);\n *\n * // ...run code here\n *\n * // Method 2: Using environment variable\n * registerConfigureHook({\n * handlerClass: MyCallbackHandler,\n * envVar: \"MY_TRACER_ENABLED\",\n * });\n * process.env.MY_TRACER_ENABLED = \"true\";\n *\n * // ...run code here\n * ```\n *\n * @param config Configuration object for the hook\n * @param config.contextVar Name of the context variable containing the handler instance\n * @param config.inheritable Whether child runs should inherit this handler\n * @param config.handlerClass Optional callback handler class (required if using envVar)\n * @param config.envVar Optional environment variable name to control handler activation\n */\nexport declare const registerConfigureHook: (config: ConfigureHook) => void;\nexport type ConfigureHook = {\n contextVar?: string;\n inheritable?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handlerClass?: new (...args: any[]) => BaseCallbackHandler;\n envVar?: string;\n};\n"],"mappings":";;;;;;AAmDA;;;;AAAyE;AAmDzE;;;;AAAyE;AA+CzE;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAnGwBC,4BAA4BC,oBAAoBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmDhDC,kCAAkCF,cAAcC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+CnDI,gCAAgCD;KACzCA,aAAAA;;;;yCAI+BN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","names":["BaseCallbackHandler","setContextVariable","PropertyKey","T","getContextVariable","_getConfigureHooks","ConfigureHook","registerConfigureHook"],"sources":["../../../src/singletons/async_local_storage/context.d.ts"],"sourcesContent":["import { BaseCallbackHandler } from \"../../callbacks/base.js\";\n/**\n * Set a context variable. Context variables are scoped to any\n * child runnables called by the current runnable, or globally if set outside\n * of any runnable.\n *\n * @remarks\n * This function is only supported in environments that support AsyncLocalStorage,\n * including Node.js, Deno, and Cloudflare Workers.\n *\n * @example\n * ```ts\n * import { RunnableLambda } from \"@langchain/core/runnables\";\n * import {\n * getContextVariable,\n * setContextVariable\n * } from \"@langchain/core/context\";\n *\n * const nested = RunnableLambda.from(() => {\n * // \"bar\" because it was set by a parent\n * console.log(getContextVariable(\"foo\"));\n *\n * // Override to \"baz\", but only for child runnables\n * setContextVariable(\"foo\", \"baz\");\n *\n * // Now \"baz\", but only for child runnables\n * return getContextVariable(\"foo\");\n * });\n *\n * const runnable = RunnableLambda.from(async () => {\n * // Set a context variable named \"foo\"\n * setContextVariable(\"foo\", \"bar\");\n *\n * const res = await nested.invoke({});\n *\n * // Still \"bar\" since child changes do not affect parents\n * console.log(getContextVariable(\"foo\"));\n *\n * return res;\n * });\n *\n * // undefined, because context variable has not been set yet\n * console.log(getContextVariable(\"foo\"));\n *\n * // Final return value is \"baz\"\n * const result = await runnable.invoke({});\n * ```\n *\n * @param name The name of the context variable.\n * @param value The value to set.\n */\nexport declare function setContextVariable<T>(name: PropertyKey, value: T): void;\n/**\n * Get the value of a previously set context variable. Context variables\n * are scoped to any child runnables called by the current runnable,\n * or globally if set outside of any runnable.\n *\n * @remarks\n * This function is only supported in environments that support AsyncLocalStorage,\n * including Node.js, Deno, and Cloudflare Workers.\n *\n * @example\n * ```ts\n * import { RunnableLambda } from \"@langchain/core/runnables\";\n * import {\n * getContextVariable,\n * setContextVariable\n * } from \"@langchain/core/context\";\n *\n * const nested = RunnableLambda.from(() => {\n * // \"bar\" because it was set by a parent\n * console.log(getContextVariable(\"foo\"));\n *\n * // Override to \"baz\", but only for child runnables\n * setContextVariable(\"foo\", \"baz\");\n *\n * // Now \"baz\", but only for child runnables\n * return getContextVariable(\"foo\");\n * });\n *\n * const runnable = RunnableLambda.from(async () => {\n * // Set a context variable named \"foo\"\n * setContextVariable(\"foo\", \"bar\");\n *\n * const res = await nested.invoke({});\n *\n * // Still \"bar\" since child changes do not affect parents\n * console.log(getContextVariable(\"foo\"));\n *\n * return res;\n * });\n *\n * // undefined, because context variable has not been set yet\n * console.log(getContextVariable(\"foo\"));\n *\n * // Final return value is \"baz\"\n * const result = await runnable.invoke({});\n * ```\n *\n * @param name The name of the context variable.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport declare function getContextVariable<T = any>(name: PropertyKey): T | undefined;\nexport declare const _getConfigureHooks: () => ConfigureHook[];\n/**\n * Register a callback configure hook to automatically add callback handlers to all runs.\n *\n * There are two ways to use this:\n *\n * 1. Using a context variable:\n * - Set `contextVar` to specify the variable name\n * - Use `setContextVariable()` to store your handler instance\n *\n * 2. Using an environment variable:\n * - Set both `envVar` and `handlerClass`\n * - The handler will be instantiated when the env var is set to \"true\".\n *\n * @example\n * ```typescript\n * // Method 1: Using context variable\n * import {\n * registerConfigureHook,\n * setContextVariable\n * } from \"@langchain/core/context\";\n *\n * const tracer = new MyCallbackHandler();\n * registerConfigureHook({\n * contextVar: \"my_tracer\",\n * });\n * setContextVariable(\"my_tracer\", tracer);\n *\n * // ...run code here\n *\n * // Method 2: Using environment variable\n * registerConfigureHook({\n * handlerClass: MyCallbackHandler,\n * envVar: \"MY_TRACER_ENABLED\",\n * });\n * process.env.MY_TRACER_ENABLED = \"true\";\n *\n * // ...run code here\n * ```\n *\n * @param config Configuration object for the hook\n * @param config.contextVar Name of the context variable containing the handler instance\n * @param config.inheritable Whether child runs should inherit this handler\n * @param config.handlerClass Optional callback handler class (required if using envVar)\n * @param config.envVar Optional environment variable name to control handler activation\n */\nexport declare const registerConfigureHook: (config: ConfigureHook) => void;\nexport type ConfigureHook = {\n contextVar?: string;\n inheritable?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handlerClass?: new (...args: any[]) => BaseCallbackHandler;\n envVar?: string;\n};\n"],"mappings":";;;;;;AAmDA;;;;AAAyE;AAmDzE;;;;AAAyE;AA+CzE;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAnGwBC,4BAA4BC,oBAAoBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmDhDC,kCAAkCF,cAAcC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+CnDI,gCAAgCD;KACzCA,aAAAA;;;;yCAI+BN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"globals.d.cts","names":["AsyncLocalStorageInterface","T","TRACING_ALS_KEY","_CONTEXT_VARIABLES_KEY","setGlobalAsyncLocalStorageInstance","getGlobalAsyncLocalStorageInstance"],"sources":["../../../src/singletons/async_local_storage/globals.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport interface AsyncLocalStorageInterface {\n getStore: () => any | undefined;\n run: <T>(store: any, callback: () => T) => T;\n enterWith: (store: any) => void;\n}\nexport declare const TRACING_ALS_KEY: unique symbol;\nexport declare const _CONTEXT_VARIABLES_KEY: unique symbol;\nexport declare const setGlobalAsyncLocalStorageInstance: (instance: AsyncLocalStorageInterface) => void;\nexport declare const getGlobalAsyncLocalStorageInstance: () => AsyncLocalStorageInterface | undefined;\n"],"mappings":";;AACiBA,UAAAA,0BAAAA,CAA0B;EAAA,QAAA,EAAA,GAAA,GAAA,GAAA,GAAA,SAAA;EAAA,GAEFC,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,KAAAA,EAAAA,GAAAA,EAAAA,QAAAA,EAAAA,GAAAA,GAAAA,CAAAA,EAAAA,GAAMA,CAANA;EAAC,SAAKA,EAAAA,CAAAA,KAAAA,EAAAA,GAAAA,EAAAA,GAAAA,IAAAA;AAAC;cAI3BE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"globals.d.ts","names":["AsyncLocalStorageInterface","T","TRACING_ALS_KEY","_CONTEXT_VARIABLES_KEY","setGlobalAsyncLocalStorageInstance","getGlobalAsyncLocalStorageInstance"],"sources":["../../../src/singletons/async_local_storage/globals.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport interface AsyncLocalStorageInterface {\n getStore: () => any | undefined;\n run: <T>(store: any, callback: () => T) => T;\n enterWith: (store: any) => void;\n}\nexport declare const TRACING_ALS_KEY: unique symbol;\nexport declare const _CONTEXT_VARIABLES_KEY: unique symbol;\nexport declare const setGlobalAsyncLocalStorageInstance: (instance: AsyncLocalStorageInterface) => void;\nexport declare const getGlobalAsyncLocalStorageInstance: () => AsyncLocalStorageInterface | undefined;\n"],"mappings":";;AACiBA,UAAAA,0BAAAA,CAA0B;EAAA,QAAA,EAAA,GAAA,GAAA,GAAA,GAAA,SAAA;EAAA,GAEFC,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,KAAAA,EAAAA,GAAAA,EAAAA,QAAAA,EAAAA,GAAAA,GAAAA,CAAAA,EAAAA,GAAMA,CAANA;EAAC,SAAKA,EAAAA,CAAAA,KAAAA,EAAAA,GAAAA,EAAAA,GAAAA,IAAAA;AAAC;cAI3BE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":["AsyncLocalStorageInterface","MockAsyncLocalStorage","T","AsyncLocalStorageProvider","AsyncLocalStorageProviderSingleton"],"sources":["../../../src/singletons/async_local_storage/index.d.ts"],"sourcesContent":["import { AsyncLocalStorageInterface } from \"./globals.js\";\nexport declare class MockAsyncLocalStorage implements AsyncLocalStorageInterface {\n getStore(): any;\n run<T>(_store: any, callback: () => T): T;\n enterWith(_store: any): undefined;\n}\ndeclare class AsyncLocalStorageProvider {\n getInstance(): AsyncLocalStorageInterface;\n getRunnableConfig(): any;\n runWithConfig<T>(config: any, callback: () => T, avoidCreatingRootRunTree?: boolean): T;\n initializeGlobalInstance(instance: AsyncLocalStorageInterface): void;\n}\ndeclare const AsyncLocalStorageProviderSingleton: AsyncLocalStorageProvider;\nexport { AsyncLocalStorageProviderSingleton, type AsyncLocalStorageInterface };\n"],"mappings":";;;cACqBC,qBAAAA,YAAiCD;;EAAjCC,GAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,EAAAA,GAAAA,EAAAA,QAAqB,EAAA,GAAA,GAEFC,CAFE,CAAA,EAEEA,CAFF;EAAA,SAAA,CAAA,MAAA,EAAA,GAAA,CAAA,EAAA,SAAA;;cAK5BC,yBAAAA,CAH8BD;EAAC,WAFSF,CAAAA,CAAAA,EAMnCA,0BANmCA;EAA0B,iBAAA,CAAA,CAAA,EAAA,GAAA;EAKlEG,aAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,EAAAA,GAAyB,EAAA,QAAA,EAAA,GAAA,GAGWD,CAHX,EAAA,wBAAA,CAAA,EAAA,OAAA,CAAA,EAGmDA,CAHnD;EAAA,wBAAA,CAAA,QAAA,EAIAF,0BAJA,CAAA,EAAA,IAAA;;cAMzBI,kCAHoCF,EAGAC,yBAHAD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":["AsyncLocalStorageInterface","MockAsyncLocalStorage","T","AsyncLocalStorageProvider","AsyncLocalStorageProviderSingleton"],"sources":["../../../src/singletons/async_local_storage/index.d.ts"],"sourcesContent":["import { AsyncLocalStorageInterface } from \"./globals.js\";\nexport declare class MockAsyncLocalStorage implements AsyncLocalStorageInterface {\n getStore(): any;\n run<T>(_store: any, callback: () => T): T;\n enterWith(_store: any): undefined;\n}\ndeclare class AsyncLocalStorageProvider {\n getInstance(): AsyncLocalStorageInterface;\n getRunnableConfig(): any;\n runWithConfig<T>(config: any, callback: () => T, avoidCreatingRootRunTree?: boolean): T;\n initializeGlobalInstance(instance: AsyncLocalStorageInterface): void;\n}\ndeclare const AsyncLocalStorageProviderSingleton: AsyncLocalStorageProvider;\nexport { AsyncLocalStorageProviderSingleton, type AsyncLocalStorageInterface };\n"],"mappings":";;;cACqBC,qBAAAA,YAAiCD;;EAAjCC,GAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,EAAAA,GAAAA,EAAAA,QAAqB,EAAA,GAAA,GAEFC,CAFE,CAAA,EAEEA,CAFF;EAAA,SAAA,CAAA,MAAA,EAAA,GAAA,CAAA,EAAA,SAAA;;cAK5BC,yBAAAA,CAH8BD;EAAC,WAFSF,CAAAA,CAAAA,EAMnCA,0BANmCA;EAA0B,iBAAA,CAAA,CAAA,EAAA,GAAA;EAKlEG,aAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,EAAAA,GAAyB,EAAA,QAAA,EAAA,GAAA,GAGWD,CAHX,EAAA,wBAAA,CAAA,EAAA,OAAA,CAAA,EAGmDA,CAHnD;EAAA,wBAAA,CAAA,QAAA,EAIAF,0BAJA,CAAA,EAAA,IAAA;;cAMzBI,kCAHoCF,EAGAC,yBAHAD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"callbacks.d.cts","names":["PQueueMod","getQueue","consumeCallback","T","Promise","awaitAllCallbacks"],"sources":["../../src/singletons/callbacks.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport PQueueMod from \"p-queue\";\nexport declare function getQueue(): PQueueMod<any, any>;\n/**\n * Consume a promise, either adding it to the queue or waiting for it to resolve\n * @param promiseFn Promise to consume\n * @param wait Whether to wait for the promise to resolve or resolve immediately\n */\nexport declare function consumeCallback<T>(promiseFn: () => Promise<T> | T | void, wait: boolean): Promise<void>;\n/**\n * Waits for all promises in the queue to resolve. If the queue is\n * undefined, it immediately resolves a promise.\n */\nexport declare function awaitAllCallbacks(): Promise<void>;\n"],"mappings":";;;;;;AAQ0G;AAKlFK,iBALAH,eAKqBE,CAAAA,CAAAA,CAAAA,CAAO,SAAA,EAAA,GAAA,GALQA,OAKR,CALgBD,CAKhB,CAAA,GALqBA,CAKrB,GAAA,IAAA,EAAA,IAAA,EAAA,OAAA,CAAA,EAL+CC,OAK/C,CAAA,IAAA,CAAA;;;;;iBAA5BC,iBAAAA,CAAAA,GAAqBD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"callbacks.d.ts","names":["PQueueMod","getQueue","consumeCallback","T","Promise","awaitAllCallbacks"],"sources":["../../src/singletons/callbacks.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport PQueueMod from \"p-queue\";\nexport declare function getQueue(): PQueueMod<any, any>;\n/**\n * Consume a promise, either adding it to the queue or waiting for it to resolve\n * @param promiseFn Promise to consume\n * @param wait Whether to wait for the promise to resolve or resolve immediately\n */\nexport declare function consumeCallback<T>(promiseFn: () => Promise<T> | T | void, wait: boolean): Promise<void>;\n/**\n * Waits for all promises in the queue to resolve. If the queue is\n * undefined, it immediately resolves a promise.\n */\nexport declare function awaitAllCallbacks(): Promise<void>;\n"],"mappings":";;;;AAQA;;;;;AAAmGI,iBAA3EF,eAA2EE,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,EAAAA,GAAAA,GAAvCA,OAAuCA,CAA/BD,CAA+BC,CAAAA,GAA1BD,CAA0BC,GAAAA,IAAAA,EAAAA,IAAAA,EAAAA,OAAAA,CAAAA,EAAAA,OAAAA,CAAAA,IAAAA,CAAAA;AAAO;AAK1G;;;iBAAwBC,iBAAAA,CAAAA,GAAqBD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stores.d.cts","names":["Serializable","BaseStore","K","V","Promise","AsyncGenerator","InMemoryStore","T","Record"],"sources":["../src/stores.d.ts"],"sourcesContent":["import { Serializable } from \"./load/serializable.js\";\n/**\n * Abstract interface for a key-value store.\n */\nexport declare abstract class BaseStore<K, V> extends Serializable {\n /**\n * Abstract method to get multiple values for a set of keys.\n * @param {K[]} keys - An array of keys.\n * @returns {Promise<(V | undefined)[]>} - A Promise that resolves with array of values or undefined if key not found.\n */\n abstract mget(keys: K[]): Promise<(V | undefined)[]>;\n /**\n * Abstract method to set a value for multiple keys.\n * @param {[K, V][]} keyValuePairs - An array of key-value pairs.\n * @returns {Promise<void>} - A Promise that resolves when the operation is complete.\n */\n abstract mset(keyValuePairs: [K, V][]): Promise<void>;\n /**\n * Abstract method to delete multiple keys.\n * @param {K[]} keys - An array of keys to delete.\n * @returns {Promise<void>} - A Promise that resolves when the operation is complete.\n */\n abstract mdelete(keys: K[]): Promise<void>;\n /**\n * Abstract method to yield keys optionally based on a prefix.\n * @param {string} prefix - Optional prefix to filter keys.\n * @returns {AsyncGenerator<K | string>} - An asynchronous generator that yields keys on iteration.\n */\n abstract yieldKeys(prefix?: string): AsyncGenerator<K | string>;\n}\n/**\n * In-memory implementation of the BaseStore using a dictionary. Used for\n * storing key-value pairs in memory.\n * @example\n * ```typescript\n * const store = new InMemoryStore<BaseMessage>();\n * await store.mset(\n * Array.from({ length: 5 }).map((_, index) => [\n * `message:id:${index}`,\n * index % 2 === 0\n * ? new AIMessage(\"ai stuff...\")\n * : new HumanMessage(\"human stuff...\"),\n * ]),\n * );\n *\n * const retrievedMessages = await store.mget([\"message:id:0\", \"message:id:1\"]);\n * await store.mdelete(await store.yieldKeys(\"message:id:\").toArray());\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport declare class InMemoryStore<T = any> extends BaseStore<string, T> {\n lc_namespace: string[];\n protected store: Record<string, T>;\n /**\n * Retrieves the values associated with the given keys from the store.\n * @param keys Keys to retrieve values for.\n * @returns Array of values associated with the given keys.\n */\n mget(keys: string[]): Promise<T[]>;\n /**\n * Sets the values for the given keys in the store.\n * @param keyValuePairs Array of key-value pairs to set in the store.\n * @returns Promise that resolves when all key-value pairs have been set.\n */\n mset(keyValuePairs: [string, T][]): Promise<void>;\n /**\n * Deletes the given keys and their associated values from the store.\n * @param keys Keys to delete from the store.\n * @returns Promise that resolves when all keys have been deleted.\n */\n mdelete(keys: string[]): Promise<void>;\n /**\n * Asynchronous generator that yields keys from the store. If a prefix is\n * provided, it only yields keys that start with the prefix.\n * @param prefix Optional prefix to filter keys.\n * @returns AsyncGenerator that yields keys from the store.\n */\n yieldKeys(prefix?: string | undefined): AsyncGenerator<string>;\n}\n"],"mappings":";;;;;;AAIA;AAAuC,uBAATC,SAAS,CAAA,CAAA,EAAA,CAAA,CAAA,SAAeD,YAAAA,CAAf;EAAA;;;;;EAYD,SAAMI,IAAAA,CAAAA,IAAAA,EANpBF,CAMoBE,EAAAA,CAAAA,EANdA,OAMcA,CAAAA,CANLD,CAMKC,GAAAA,SAAAA,CAAAA,EAAAA,CAAAA;EAAO;;;;;EAZe,SAAA,IAAA,CAAA,aAAA,EAAA,CAYhCF,CAZgC,EAY7BC,CAZ6B,CAAA,EAAA,CAAA,EAYtBC,OAZsB,CAAA,IAAA,CAAA;EA8C7CE;;;;;EAEM,SAMOC,OAAAA,CAAAA,IAAAA,EApCPL,CAoCOK,EAAAA,CAAAA,EApCDH,OAoCCG,CAAAA,IAAAA,CAAAA;EAAC;;;;;EAmBuB,SA3BNN,SAAAA,CAAAA,MAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EAtBXI,cAsBWJ,CAtBIC,CAsBJD,GAAAA,MAAAA,CAAAA;AAAS;;;;;;;;;;;;;;;;;;;;;cAAxCK,+BAA+BL,kBAAkBM;;mBAEjDC,eAAeD;;;;;;wBAMVH,QAAQG;;;;;;+BAMDA,OAAOH;;;;;;2BAMXA;;;;;;;0CAOeC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stores.d.ts","names":["Serializable","BaseStore","K","V","Promise","AsyncGenerator","InMemoryStore","T","Record"],"sources":["../src/stores.d.ts"],"sourcesContent":["import { Serializable } from \"./load/serializable.js\";\n/**\n * Abstract interface for a key-value store.\n */\nexport declare abstract class BaseStore<K, V> extends Serializable {\n /**\n * Abstract method to get multiple values for a set of keys.\n * @param {K[]} keys - An array of keys.\n * @returns {Promise<(V | undefined)[]>} - A Promise that resolves with array of values or undefined if key not found.\n */\n abstract mget(keys: K[]): Promise<(V | undefined)[]>;\n /**\n * Abstract method to set a value for multiple keys.\n * @param {[K, V][]} keyValuePairs - An array of key-value pairs.\n * @returns {Promise<void>} - A Promise that resolves when the operation is complete.\n */\n abstract mset(keyValuePairs: [K, V][]): Promise<void>;\n /**\n * Abstract method to delete multiple keys.\n * @param {K[]} keys - An array of keys to delete.\n * @returns {Promise<void>} - A Promise that resolves when the operation is complete.\n */\n abstract mdelete(keys: K[]): Promise<void>;\n /**\n * Abstract method to yield keys optionally based on a prefix.\n * @param {string} prefix - Optional prefix to filter keys.\n * @returns {AsyncGenerator<K | string>} - An asynchronous generator that yields keys on iteration.\n */\n abstract yieldKeys(prefix?: string): AsyncGenerator<K | string>;\n}\n/**\n * In-memory implementation of the BaseStore using a dictionary. Used for\n * storing key-value pairs in memory.\n * @example\n * ```typescript\n * const store = new InMemoryStore<BaseMessage>();\n * await store.mset(\n * Array.from({ length: 5 }).map((_, index) => [\n * `message:id:${index}`,\n * index % 2 === 0\n * ? new AIMessage(\"ai stuff...\")\n * : new HumanMessage(\"human stuff...\"),\n * ]),\n * );\n *\n * const retrievedMessages = await store.mget([\"message:id:0\", \"message:id:1\"]);\n * await store.mdelete(await store.yieldKeys(\"message:id:\").toArray());\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport declare class InMemoryStore<T = any> extends BaseStore<string, T> {\n lc_namespace: string[];\n protected store: Record<string, T>;\n /**\n * Retrieves the values associated with the given keys from the store.\n * @param keys Keys to retrieve values for.\n * @returns Array of values associated with the given keys.\n */\n mget(keys: string[]): Promise<T[]>;\n /**\n * Sets the values for the given keys in the store.\n * @param keyValuePairs Array of key-value pairs to set in the store.\n * @returns Promise that resolves when all key-value pairs have been set.\n */\n mset(keyValuePairs: [string, T][]): Promise<void>;\n /**\n * Deletes the given keys and their associated values from the store.\n * @param keys Keys to delete from the store.\n * @returns Promise that resolves when all keys have been deleted.\n */\n mdelete(keys: string[]): Promise<void>;\n /**\n * Asynchronous generator that yields keys from the store. If a prefix is\n * provided, it only yields keys that start with the prefix.\n * @param prefix Optional prefix to filter keys.\n * @returns AsyncGenerator that yields keys from the store.\n */\n yieldKeys(prefix?: string | undefined): AsyncGenerator<string>;\n}\n"],"mappings":";;;;;;AAIA;AAAuC,uBAATC,SAAS,CAAA,CAAA,EAAA,CAAA,CAAA,SAAeD,YAAAA,CAAf;EAAA;;;;;EAYD,SAAMI,IAAAA,CAAAA,IAAAA,EANpBF,CAMoBE,EAAAA,CAAAA,EANdA,OAMcA,CAAAA,CANLD,CAMKC,GAAAA,SAAAA,CAAAA,EAAAA,CAAAA;EAAO;;;;;EAZe,SAAA,IAAA,CAAA,aAAA,EAAA,CAYhCF,CAZgC,EAY7BC,CAZ6B,CAAA,EAAA,CAAA,EAYtBC,OAZsB,CAAA,IAAA,CAAA;EA8C7CE;;;;;EAEM,SAMOC,OAAAA,CAAAA,IAAAA,EApCPL,CAoCOK,EAAAA,CAAAA,EApCDH,OAoCCG,CAAAA,IAAAA,CAAAA;EAAC;;;;;EAmBuB,SA3BNN,SAAAA,CAAAA,MAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EAtBXI,cAsBWJ,CAtBIC,CAsBJD,GAAAA,MAAAA,CAAAA;AAAS;;;;;;;;;;;;;;;;;;;;;cAAxCK,+BAA+BL,kBAAkBM;;mBAEjDC,eAAeD;;;;;;wBAMVH,QAAQG;;;;;;+BAMDA,OAAOH;;;;;;2BAMXA;;;;;;;0CAOeC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.cts","names":["VectorStore","Comparator","Comparison","Operation","Operator","StructuredQuery","Visitor","VisitorComparisonResult","VisitorOperationResult","VisitorStructuredQueryResult","TranslatorOpts","BaseTranslator","T","BasicTranslator"],"sources":["../../src/structured_query/base.d.ts"],"sourcesContent":["import { VectorStore } from \"../vectorstores.js\";\nimport { Comparator, Comparison, Operation, Operator, StructuredQuery, Visitor, VisitorComparisonResult, VisitorOperationResult, VisitorStructuredQueryResult } from \"./ir.js\";\n/**\n * Options object for the BasicTranslator class. Specifies the allowed\n * operators and comparators.\n */\nexport type TranslatorOpts = {\n allowedOperators: Operator[];\n allowedComparators: Comparator[];\n};\n/**\n * Abstract class that provides a blueprint for creating specific\n * translator classes. Defines two abstract methods: formatFunction and\n * mergeFilters.\n */\nexport declare abstract class BaseTranslator<T extends VectorStore = VectorStore> extends Visitor<T> {\n /**\n * Formats a given function (either an operator or a comparator) into a\n * string.\n * @param func The function to format.\n * @returns Formatted string representation of the function.\n */\n abstract formatFunction(func: Operator | Comparator): string;\n /**\n * Merges two filters into one, using a specified merge type.\n * @param defaultFilter The default filter.\n * @param generatedFilter The generated filter.\n * @param mergeType The type of merge to perform. Can be 'and', 'or', or 'replace'.\n * @param forceDefaultFilter If true, the default filter will be used even if the generated filter is not empty.\n * @returns The merged filter, or undefined if both filters are empty.\n */\n abstract mergeFilters(defaultFilter: this[\"VisitStructuredQueryOutput\"][\"filter\"] | undefined, generatedFilter: this[\"VisitStructuredQueryOutput\"][\"filter\"] | undefined, mergeType?: \"and\" | \"or\" | \"replace\", forceDefaultFilter?: boolean): this[\"VisitStructuredQueryOutput\"][\"filter\"] | undefined;\n}\n/**\n * Class that extends the BaseTranslator class and provides concrete\n * implementations for the abstract methods. Also declares three types:\n * VisitOperationOutput, VisitComparisonOutput, and\n * VisitStructuredQueryOutput, which are used as the return types for the\n * visitOperation, visitComparison, and visitStructuredQuery methods\n * respectively.\n */\nexport declare class BasicTranslator<T extends VectorStore = VectorStore> extends BaseTranslator<T> {\n VisitOperationOutput: VisitorOperationResult;\n VisitComparisonOutput: VisitorComparisonResult;\n VisitStructuredQueryOutput: VisitorStructuredQueryResult;\n allowedOperators: Operator[];\n allowedComparators: Comparator[];\n constructor(opts?: TranslatorOpts);\n formatFunction(func: Operator | Comparator): string;\n /**\n * Visits an operation and returns a result.\n * @param operation The operation to visit.\n * @returns The result of visiting the operation.\n */\n visitOperation(operation: Operation): this[\"VisitOperationOutput\"];\n /**\n * Visits a comparison and returns a result.\n * @param comparison The comparison to visit.\n * @returns The result of visiting the comparison.\n */\n visitComparison(comparison: Comparison): this[\"VisitComparisonOutput\"];\n /**\n * Visits a structured query and returns a result.\n * @param query The structured query to visit.\n * @returns The result of visiting the structured query.\n */\n visitStructuredQuery(query: StructuredQuery): this[\"VisitStructuredQueryOutput\"];\n mergeFilters(defaultFilter: VisitorStructuredQueryResult[\"filter\"] | undefined, generatedFilter: VisitorStructuredQueryResult[\"filter\"] | undefined, mergeType?: string, forceDefaultFilter?: boolean): VisitorStructuredQueryResult[\"filter\"] | undefined;\n}\n"],"mappings":";;;;;;;AAMA;;AACsBI,KADVM,cAAAA,GACUN;EAAQ,gBACNH,EADFG,QACEH,EAAAA;EAAU,kBAAA,EAAVA,UAAU,EAAA;AAOlC,CAAA;;;;;;AAO6CA,uBAPfU,cAOeV,CAAAA,UAPUD,WAOVC,GAPwBD,WAOxBC,CAAAA,SAP6CK,OAO7CL,CAPqDW,CAOrDX,CAAAA,CAAAA;EAAU;AAP0C;AA0BjG;;;;EAAwE,SAAyBW,cAAAA,CAAAA,IAAAA,EAnB/DR,QAmB+DQ,GAnBpDX,UAmBoDW,CAAAA,EAAAA,MAAAA;EAAC;;;;;;;;EAOpD,SAMhBT,YAAAA,CAAAA,aAAAA,EAAAA,IAAAA,CAAAA,4BAAAA,CAAAA,CAAAA,QAAAA,CAAAA,GAAAA,SAAAA,EAAAA,eAAAA,EAAAA,IAAAA,CAAAA,4BAAAA,CAAAA,CAAAA,QAAAA,CAAAA,GAAAA,SAAAA,EAAAA,SAAAA,CAAAA,EAAAA,KAAAA,GAAAA,IAAAA,GAAAA,SAAAA,EAAAA,kBAAAA,CAAAA,EAAAA,OAAAA,CAAAA,EAAAA,IAAAA,CAAAA,4BAAAA,CAAAA,CAAAA,QAAAA,CAAAA,GAAAA,SAAAA;;;;;;;AAbkE;;;cAA3EU,0BAA0Bb,cAAcA,qBAAqBW,eAAeC;wBACvEJ;yBACCD;8BACKE;oBACVL;sBACEH;qBACDS;uBACEN,WAAWH;;;;;;4BAMNE;;;;;;8BAMED;;;;;;8BAMAG;8BACAI,qEAAqEA,uGAAuGA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","names":["VectorStore","Comparator","Comparison","Operation","Operator","StructuredQuery","Visitor","VisitorComparisonResult","VisitorOperationResult","VisitorStructuredQueryResult","TranslatorOpts","BaseTranslator","T","BasicTranslator"],"sources":["../../src/structured_query/base.d.ts"],"sourcesContent":["import { VectorStore } from \"../vectorstores.js\";\nimport { Comparator, Comparison, Operation, Operator, StructuredQuery, Visitor, VisitorComparisonResult, VisitorOperationResult, VisitorStructuredQueryResult } from \"./ir.js\";\n/**\n * Options object for the BasicTranslator class. Specifies the allowed\n * operators and comparators.\n */\nexport type TranslatorOpts = {\n allowedOperators: Operator[];\n allowedComparators: Comparator[];\n};\n/**\n * Abstract class that provides a blueprint for creating specific\n * translator classes. Defines two abstract methods: formatFunction and\n * mergeFilters.\n */\nexport declare abstract class BaseTranslator<T extends VectorStore = VectorStore> extends Visitor<T> {\n /**\n * Formats a given function (either an operator or a comparator) into a\n * string.\n * @param func The function to format.\n * @returns Formatted string representation of the function.\n */\n abstract formatFunction(func: Operator | Comparator): string;\n /**\n * Merges two filters into one, using a specified merge type.\n * @param defaultFilter The default filter.\n * @param generatedFilter The generated filter.\n * @param mergeType The type of merge to perform. Can be 'and', 'or', or 'replace'.\n * @param forceDefaultFilter If true, the default filter will be used even if the generated filter is not empty.\n * @returns The merged filter, or undefined if both filters are empty.\n */\n abstract mergeFilters(defaultFilter: this[\"VisitStructuredQueryOutput\"][\"filter\"] | undefined, generatedFilter: this[\"VisitStructuredQueryOutput\"][\"filter\"] | undefined, mergeType?: \"and\" | \"or\" | \"replace\", forceDefaultFilter?: boolean): this[\"VisitStructuredQueryOutput\"][\"filter\"] | undefined;\n}\n/**\n * Class that extends the BaseTranslator class and provides concrete\n * implementations for the abstract methods. Also declares three types:\n * VisitOperationOutput, VisitComparisonOutput, and\n * VisitStructuredQueryOutput, which are used as the return types for the\n * visitOperation, visitComparison, and visitStructuredQuery methods\n * respectively.\n */\nexport declare class BasicTranslator<T extends VectorStore = VectorStore> extends BaseTranslator<T> {\n VisitOperationOutput: VisitorOperationResult;\n VisitComparisonOutput: VisitorComparisonResult;\n VisitStructuredQueryOutput: VisitorStructuredQueryResult;\n allowedOperators: Operator[];\n allowedComparators: Comparator[];\n constructor(opts?: TranslatorOpts);\n formatFunction(func: Operator | Comparator): string;\n /**\n * Visits an operation and returns a result.\n * @param operation The operation to visit.\n * @returns The result of visiting the operation.\n */\n visitOperation(operation: Operation): this[\"VisitOperationOutput\"];\n /**\n * Visits a comparison and returns a result.\n * @param comparison The comparison to visit.\n * @returns The result of visiting the comparison.\n */\n visitComparison(comparison: Comparison): this[\"VisitComparisonOutput\"];\n /**\n * Visits a structured query and returns a result.\n * @param query The structured query to visit.\n * @returns The result of visiting the structured query.\n */\n visitStructuredQuery(query: StructuredQuery): this[\"VisitStructuredQueryOutput\"];\n mergeFilters(defaultFilter: VisitorStructuredQueryResult[\"filter\"] | undefined, generatedFilter: VisitorStructuredQueryResult[\"filter\"] | undefined, mergeType?: string, forceDefaultFilter?: boolean): VisitorStructuredQueryResult[\"filter\"] | undefined;\n}\n"],"mappings":";;;;;;;AAMA;;AACsBI,KADVM,cAAAA,GACUN;EAAQ,gBACNH,EADFG,QACEH,EAAAA;EAAU,kBAAA,EAAVA,UAAU,EAAA;AAOlC,CAAA;;;;;;AAO6CA,uBAPfU,cAOeV,CAAAA,UAPUD,WAOVC,GAPwBD,WAOxBC,CAAAA,SAP6CK,OAO7CL,CAPqDW,CAOrDX,CAAAA,CAAAA;EAAU;AAP0C;AA0BjG;;;;EAAwE,SAAyBW,cAAAA,CAAAA,IAAAA,EAnB/DR,QAmB+DQ,GAnBpDX,UAmBoDW,CAAAA,EAAAA,MAAAA;EAAC;;;;;;;;EAOpD,SAMhBT,YAAAA,CAAAA,aAAAA,EAAAA,IAAAA,CAAAA,4BAAAA,CAAAA,CAAAA,QAAAA,CAAAA,GAAAA,SAAAA,EAAAA,eAAAA,EAAAA,IAAAA,CAAAA,4BAAAA,CAAAA,CAAAA,QAAAA,CAAAA,GAAAA,SAAAA,EAAAA,SAAAA,CAAAA,EAAAA,KAAAA,GAAAA,IAAAA,GAAAA,SAAAA,EAAAA,kBAAAA,CAAAA,EAAAA,OAAAA,CAAAA,EAAAA,IAAAA,CAAAA,4BAAAA,CAAAA,CAAAA,QAAAA,CAAAA,GAAAA,SAAAA;;;;;;;AAbkE;;;cAA3EU,0BAA0Bb,cAAcA,qBAAqBW,eAAeC;wBACvEJ;yBACCD;8BACKE;oBACVL;sBACEH;qBACDS;uBACEN,WAAWH;;;;;;4BAMNE;;;;;;8BAMED;;;;;;8BAMAG;8BACAI,qEAAqEA,uGAAuGA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"functional.d.cts","names":["Document","Comparator","Comparison","Operation","Operator","StructuredQuery","BaseTranslator","ValueType","FunctionFilter","FunctionalTranslator","C"],"sources":["../../src/structured_query/functional.d.ts"],"sourcesContent":["import { Document } from \"../documents/document.js\";\nimport { Comparator, Comparison, Operation, Operator, StructuredQuery } from \"./ir.js\";\nimport { BaseTranslator } from \"./base.js\";\n/**\n * A type alias for an object that maps comparison operators to string or\n * number values. This is used in the comparison functions to determine\n * the result of a comparison operation.\n */\ntype ValueType = {\n eq: string | number | boolean;\n ne: string | number | boolean;\n lt: string | number;\n lte: string | number;\n gt: string | number;\n gte: string | number;\n};\n/**\n * A type alias for a function that takes a `Document` as an argument and\n * returns a boolean. This function is used as a filter for documents.\n */\nexport type FunctionFilter = (document: Document) => boolean;\n/**\n * A class that extends `BaseTranslator` to translate structured queries\n * into functional filters.\n * @example\n * ```typescript\n * const functionalTranslator = new FunctionalTranslator();\n * const relevantDocuments = await functionalTranslator.getRelevantDocuments(\n * \"Which movies are rated higher than 8.5?\",\n * );\n * ```\n */\nexport declare class FunctionalTranslator extends BaseTranslator {\n VisitOperationOutput: FunctionFilter;\n VisitComparisonOutput: FunctionFilter;\n VisitStructuredQueryOutput: {\n filter: FunctionFilter;\n } | {\n [k: string]: never;\n };\n allowedOperators: Operator[];\n allowedComparators: Comparator[];\n formatFunction(): string;\n /**\n * Returns the allowed comparators for a given data type.\n * @param input The input value to get the allowed comparators for.\n * @returns An array of allowed comparators for the input data type.\n */\n getAllowedComparatorsForType(inputType: string): Comparator[];\n /**\n * Returns a function that performs a comparison based on the provided\n * comparator.\n * @param comparator The comparator to base the comparison function on.\n * @returns A function that takes two arguments and returns a boolean based on the comparison.\n */\n getComparatorFunction<C extends Comparator>(comparator: Comparator): (a: string | number, b: ValueType[C]) => boolean;\n /**\n * Returns a function that performs an operation based on the provided\n * operator.\n * @param operator The operator to base the operation function on.\n * @returns A function that takes two boolean arguments and returns a boolean based on the operation.\n */\n getOperatorFunction(operator: Operator): (a: boolean, b: boolean) => boolean;\n /**\n * Visits the operation part of a structured query and translates it into\n * a functional filter.\n * @param operation The operation part of a structured query.\n * @returns A function that takes a `Document` as an argument and returns a boolean based on the operation.\n */\n visitOperation(operation: Operation): this[\"VisitOperationOutput\"];\n /**\n * Visits the comparison part of a structured query and translates it into\n * a functional filter.\n * @param comparison The comparison part of a structured query.\n * @returns A function that takes a `Document` as an argument and returns a boolean based on the comparison.\n */\n visitComparison(comparison: Comparison<string | number | boolean>): this[\"VisitComparisonOutput\"];\n /**\n * Visits a structured query and translates it into a functional filter.\n * @param query The structured query to translate.\n * @returns An object containing a `filter` property, which is a function that takes a `Document` as an argument and returns a boolean based on the structured query.\n */\n visitStructuredQuery(query: StructuredQuery): this[\"VisitStructuredQueryOutput\"];\n /**\n * Merges two filters into one, based on the specified merge type.\n * @param defaultFilter The default filter function.\n * @param generatedFilter The generated filter function.\n * @param mergeType The type of merge to perform. Can be 'and', 'or', or 'replace'. Default is 'and'.\n * @returns A function that takes a `Document` as an argument and returns a boolean based on the merged filters, or `undefined` if both filters are empty.\n */\n mergeFilters(defaultFilter: FunctionFilter, generatedFilter: FunctionFilter, mergeType?: string): FunctionFilter | undefined;\n}\nexport {};\n"],"mappings":";;;;;;;;AAE2C;AAkB3C;AAYA;KAxBKO,SAAAA,GAwBoC;EAAA,EAAA,EACfC,MAAAA,GAAAA,MAAAA,GAAAA,OAAAA;EAAc,EAAA,EACbA,MAAAA,GAAAA,MAAAA,GAAAA,OAAAA;EAAc,EAAA,EAEzBA,MAAAA,GAAAA,MAAAA;EAAc,GAIRJ,EAAAA,MAAAA,GAAAA,MAAAA;EAAQ,EAAA,EACNH,MAAAA,GAAAA,MAAAA;EAAU,GAOmBA,EAAAA,MAAAA,GAAAA,MAAAA;CAAU;;;;;AAqBjCE,KAjDlBK,cAAAA,GAiDkBL,CAAAA,QAAAA,EAjDUH,QAiDVG,EAAAA,GAAAA,OAAAA;;;;;;;AArCkC;;;;;cAA3CM,oBAAAA,SAA6BH,cAAAA;wBACxBE;yBACCA;;YAEXA;;;;oBAIMJ;sBACEH;;;;;;;mDAO6BA;;;;;;;kCAOjBA,wBAAwBA,qCAAqCM,UAAUG;;;;;;;gCAOzEN;;;;;;;4BAOJD;;;;;;;8BAOED;;;;;;8BAMAG;;;;;;;;8BAQAG,iCAAiCA,qCAAqCA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"functional.d.ts","names":["Document","Comparator","Comparison","Operation","Operator","StructuredQuery","BaseTranslator","ValueType","FunctionFilter","FunctionalTranslator","C"],"sources":["../../src/structured_query/functional.d.ts"],"sourcesContent":["import { Document } from \"../documents/document.js\";\nimport { Comparator, Comparison, Operation, Operator, StructuredQuery } from \"./ir.js\";\nimport { BaseTranslator } from \"./base.js\";\n/**\n * A type alias for an object that maps comparison operators to string or\n * number values. This is used in the comparison functions to determine\n * the result of a comparison operation.\n */\ntype ValueType = {\n eq: string | number | boolean;\n ne: string | number | boolean;\n lt: string | number;\n lte: string | number;\n gt: string | number;\n gte: string | number;\n};\n/**\n * A type alias for a function that takes a `Document` as an argument and\n * returns a boolean. This function is used as a filter for documents.\n */\nexport type FunctionFilter = (document: Document) => boolean;\n/**\n * A class that extends `BaseTranslator` to translate structured queries\n * into functional filters.\n * @example\n * ```typescript\n * const functionalTranslator = new FunctionalTranslator();\n * const relevantDocuments = await functionalTranslator.getRelevantDocuments(\n * \"Which movies are rated higher than 8.5?\",\n * );\n * ```\n */\nexport declare class FunctionalTranslator extends BaseTranslator {\n VisitOperationOutput: FunctionFilter;\n VisitComparisonOutput: FunctionFilter;\n VisitStructuredQueryOutput: {\n filter: FunctionFilter;\n } | {\n [k: string]: never;\n };\n allowedOperators: Operator[];\n allowedComparators: Comparator[];\n formatFunction(): string;\n /**\n * Returns the allowed comparators for a given data type.\n * @param input The input value to get the allowed comparators for.\n * @returns An array of allowed comparators for the input data type.\n */\n getAllowedComparatorsForType(inputType: string): Comparator[];\n /**\n * Returns a function that performs a comparison based on the provided\n * comparator.\n * @param comparator The comparator to base the comparison function on.\n * @returns A function that takes two arguments and returns a boolean based on the comparison.\n */\n getComparatorFunction<C extends Comparator>(comparator: Comparator): (a: string | number, b: ValueType[C]) => boolean;\n /**\n * Returns a function that performs an operation based on the provided\n * operator.\n * @param operator The operator to base the operation function on.\n * @returns A function that takes two boolean arguments and returns a boolean based on the operation.\n */\n getOperatorFunction(operator: Operator): (a: boolean, b: boolean) => boolean;\n /**\n * Visits the operation part of a structured query and translates it into\n * a functional filter.\n * @param operation The operation part of a structured query.\n * @returns A function that takes a `Document` as an argument and returns a boolean based on the operation.\n */\n visitOperation(operation: Operation): this[\"VisitOperationOutput\"];\n /**\n * Visits the comparison part of a structured query and translates it into\n * a functional filter.\n * @param comparison The comparison part of a structured query.\n * @returns A function that takes a `Document` as an argument and returns a boolean based on the comparison.\n */\n visitComparison(comparison: Comparison<string | number | boolean>): this[\"VisitComparisonOutput\"];\n /**\n * Visits a structured query and translates it into a functional filter.\n * @param query The structured query to translate.\n * @returns An object containing a `filter` property, which is a function that takes a `Document` as an argument and returns a boolean based on the structured query.\n */\n visitStructuredQuery(query: StructuredQuery): this[\"VisitStructuredQueryOutput\"];\n /**\n * Merges two filters into one, based on the specified merge type.\n * @param defaultFilter The default filter function.\n * @param generatedFilter The generated filter function.\n * @param mergeType The type of merge to perform. Can be 'and', 'or', or 'replace'. Default is 'and'.\n * @returns A function that takes a `Document` as an argument and returns a boolean based on the merged filters, or `undefined` if both filters are empty.\n */\n mergeFilters(defaultFilter: FunctionFilter, generatedFilter: FunctionFilter, mergeType?: string): FunctionFilter | undefined;\n}\nexport {};\n"],"mappings":";;;;;;;;AAE2C;AAkB3C;AAYA;KAxBKO,SAAAA,GAwBoC;EAAA,EAAA,EACfC,MAAAA,GAAAA,MAAAA,GAAAA,OAAAA;EAAc,EAAA,EACbA,MAAAA,GAAAA,MAAAA,GAAAA,OAAAA;EAAc,EAAA,EAEzBA,MAAAA,GAAAA,MAAAA;EAAc,GAIRJ,EAAAA,MAAAA,GAAAA,MAAAA;EAAQ,EAAA,EACNH,MAAAA,GAAAA,MAAAA;EAAU,GAOmBA,EAAAA,MAAAA,GAAAA,MAAAA;CAAU;;;;;AAqBjCE,KAjDlBK,cAAAA,GAiDkBL,CAAAA,QAAAA,EAjDUH,QAiDVG,EAAAA,GAAAA,OAAAA;;;;;;;AArCkC;;;;;cAA3CM,oBAAAA,SAA6BH,cAAAA;wBACxBE;yBACCA;;YAEXA;;;;oBAIMJ;sBACEH;;;;;;;mDAO6BA;;;;;;;kCAOjBA,wBAAwBA,qCAAqCM,UAAUG;;;;;;;gCAOzEN;;;;;;;4BAOJD;;;;;;;8BAOED;;;;;;8BAMAG;;;;;;;;8BAQAG,iCAAiCA,qCAAqCA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ir.d.cts","names":["VectorStore","AND","OR","NOT","Operator","EQ","NE","LT","GT","LTE","GTE","Comparator","Operators","Comparators","VisitorResult","VisitorOperationResult","VisitorComparisonResult","VisitorStructuredQueryResult","Visitor","T","Operation","Comparison","StructuredQuery","Expression","FilterDirective","ValueTypes"],"sources":["../../src/structured_query/ir.d.ts"],"sourcesContent":["import { VectorStore } from \"../vectorstores.js\";\n/**\n * Represents logical AND operator.\n */\nexport type AND = \"and\";\n/**\n * Represents logical OR operator.\n */\nexport type OR = \"or\";\n/**\n * Represents logical NOT operator.\n */\nexport type NOT = \"not\";\n/**\n * Represents a logical operator which can be AND, OR, or NOT.\n */\nexport type Operator = AND | OR | NOT;\n/**\n * Represents equality comparison operator.\n */\nexport type EQ = \"eq\";\n/**\n * Represents inequality comparison operator.\n */\nexport type NE = \"ne\";\n/**\n * Represents less than comparison operator.\n */\nexport type LT = \"lt\";\n/**\n * Represents greater than comparison operator.\n */\nexport type GT = \"gt\";\n/**\n * Represents less than or equal to comparison operator.\n */\nexport type LTE = \"lte\";\n/**\n * Represents greater than or equal to comparison operator.\n */\nexport type GTE = \"gte\";\n/**\n * Represents a comparison operator which can be EQ, NE, LT, GT, LTE, or\n * GTE.\n */\nexport type Comparator = EQ | NE | LT | GT | LTE | GTE;\nexport declare const Operators: {\n [key: string]: Operator;\n};\nexport declare const Comparators: {\n [key: string]: Comparator;\n};\n/**\n * Represents the result of visiting an operation or comparison\n * expression.\n */\nexport type VisitorResult = VisitorOperationResult | VisitorComparisonResult;\n/**\n * Represents the result of visiting an operation expression.\n */\nexport type VisitorOperationResult = {\n [operator: string]: VisitorResult[];\n};\n/**\n * Represents the result of visiting a comparison expression.\n */\nexport type VisitorComparisonResult = {\n [attr: string]: {\n [comparator: string]: string | number | boolean;\n };\n};\n/**\n * Represents the result of visiting a structured query expression.\n */\nexport type VisitorStructuredQueryResult = {\n filter?: VisitorComparisonResult | VisitorOperationResult;\n};\n/**\n * Abstract class for visiting expressions. Subclasses must implement\n * visitOperation, visitComparison, and visitStructuredQuery methods.\n */\nexport declare abstract class Visitor<T extends VectorStore = VectorStore> {\n VisitOperationOutput: object;\n VisitComparisonOutput: object;\n VisitStructuredQueryOutput: {\n filter?: T[\"FilterType\"];\n };\n abstract allowedOperators: Operator[];\n abstract allowedComparators: Comparator[];\n abstract visitOperation(operation: Operation): this[\"VisitOperationOutput\"];\n abstract visitComparison(comparison: Comparison): this[\"VisitComparisonOutput\"];\n abstract visitStructuredQuery(structuredQuery: StructuredQuery): this[\"VisitStructuredQueryOutput\"];\n}\n/**\n * Abstract class representing an expression. Subclasses must implement\n * the exprName property and the accept method.\n */\nexport declare abstract class Expression {\n abstract exprName: \"Operation\" | \"Comparison\" | \"StructuredQuery\";\n accept(visitor: Visitor): object;\n}\n/**\n * Abstract class representing a filter directive. It extends the\n * Expression class.\n */\nexport declare abstract class FilterDirective extends Expression {\n}\n/**\n * Class representing a comparison filter directive. It extends the\n * FilterDirective class.\n */\nexport declare class Comparison<ValueTypes = string | number> extends FilterDirective {\n comparator: Comparator;\n attribute: string;\n value: ValueTypes;\n exprName: \"Comparison\";\n constructor(comparator: Comparator, attribute: string, value: ValueTypes);\n}\n/**\n * Class representing an operation filter directive. It extends the\n * FilterDirective class.\n */\nexport declare class Operation extends FilterDirective {\n operator: Operator;\n args?: FilterDirective[] | undefined;\n exprName: \"Operation\";\n constructor(operator: Operator, args?: FilterDirective[] | undefined);\n}\n/**\n * Class representing a structured query expression. It extends the\n * Expression class.\n */\nexport declare class StructuredQuery extends Expression {\n query: string;\n filter?: FilterDirective | undefined;\n exprName: \"StructuredQuery\";\n constructor(query: string, filter?: FilterDirective | undefined);\n}\n"],"mappings":";;;;;;AAIA;AAIYE,KAJAD,GAAAA,GAIE,KAAA;AAId;AAIA;;AAAuBA,KARXC,EAAAA,GAQWD,IAAAA;;;AAAc;AAIzBI,KARAF,GAAAA,GAQE,KAAA;AAId;AAIA;AAIA;AAIYM,KApBAL,QAAAA,GAAWH,GAoBR,GApBcC,EAoBd,GApBmBC,GAoBnB;AAIf;AAKA;;AAAyBE,KAzBbA,EAAAA,GAyBaA,IAAAA;;;;AAAoBI,KArBjCH,EAAAA,GAqBiCG,IAAAA;;AAAS;AACtD;AAGqBI,KArBTN,EAAAA,GAqBSM,IAEpB;AAKD;;;AAAqDG,K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SACHoB;;wBAEepB,iBAAiBoB;;;;;;cAMtBF,eAAAA,SAAwBC,UAAAA;;WAEhCC;;sCAE2BA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ir.d.ts","names":["VectorStore","AND","OR","NOT","Operator","EQ","NE","LT","GT","LTE","GTE","Comparator","Operators","Comparators","VisitorResult","VisitorOperationResult","VisitorComparisonResult","VisitorStructuredQueryResult","Visitor","T","Operation","Comparison","StructuredQuery","Expression","FilterDirective","ValueTypes"],"sources":["../../src/structured_query/ir.d.ts"],"sourcesContent":["import { VectorStore } from \"../vectorstores.js\";\n/**\n * Represents logical AND operator.\n */\nexport type AND = \"and\";\n/**\n * Represents logical OR operator.\n */\nexport type OR = \"or\";\n/**\n * Represents logical NOT operator.\n */\nexport type NOT = \"not\";\n/**\n * Represents a logical operator which can be AND, OR, or NOT.\n */\nexport type Operator = AND | OR | NOT;\n/**\n * Represents equality comparison operator.\n */\nexport type EQ = \"eq\";\n/**\n * Represents inequality comparison operator.\n */\nexport type NE = \"ne\";\n/**\n * Represents less than comparison operator.\n */\nexport type LT = \"lt\";\n/**\n * Represents greater than comparison operator.\n */\nexport type GT = \"gt\";\n/**\n * Represents less than or equal to comparison operator.\n */\nexport type LTE = \"lte\";\n/**\n * Represents greater than or equal to comparison operator.\n */\nexport type GTE = \"gte\";\n/**\n * Represents a comparison operator which can be EQ, NE, LT, GT, LTE, or\n * GTE.\n */\nexport type Comparator = EQ | NE | LT | GT | LTE | GTE;\nexport declare const Operators: {\n [key: string]: Operator;\n};\nexport declare const Comparators: {\n [key: string]: Comparator;\n};\n/**\n * Represents the result of visiting an operation or comparison\n * expression.\n */\nexport type VisitorResult = VisitorOperationResult | VisitorComparisonResult;\n/**\n * Represents the result of visiting an operation expression.\n */\nexport type VisitorOperationResult = {\n [operator: string]: VisitorResult[];\n};\n/**\n * Represents the result of visiting a comparison expression.\n */\nexport type VisitorComparisonResult = {\n [attr: string]: {\n [comparator: string]: string | number | boolean;\n };\n};\n/**\n * Represents the result of visiting a structured query expression.\n */\nexport type VisitorStructuredQueryResult = {\n filter?: VisitorComparisonResult | VisitorOperationResult;\n};\n/**\n * Abstract class for visiting expressions. Subclasses must implement\n * visitOperation, visitComparison, and visitStructuredQuery methods.\n */\nexport declare abstract class Visitor<T extends VectorStore = VectorStore> {\n VisitOperationOutput: object;\n VisitComparisonOutput: object;\n VisitStructuredQueryOutput: {\n filter?: T[\"FilterType\"];\n };\n abstract allowedOperators: Operator[];\n abstract allowedComparators: Comparator[];\n abstract visitOperation(operation: Operation): this[\"VisitOperationOutput\"];\n abstract visitComparison(comparison: Comparison): this[\"VisitComparisonOutput\"];\n abstract visitStructuredQuery(structuredQuery: StructuredQuery): this[\"VisitStructuredQueryOutput\"];\n}\n/**\n * Abstract class representing an expression. Subclasses must implement\n * the exprName property and the accept method.\n */\nexport declare abstract class Expression {\n abstract exprName: \"Operation\" | \"Comparison\" | \"StructuredQuery\";\n accept(visitor: Visitor): object;\n}\n/**\n * Abstract class representing a filter directive. It extends the\n * Expression class.\n */\nexport declare abstract class FilterDirective extends Expression {\n}\n/**\n * Class representing a comparison filter directive. It extends the\n * FilterDirective class.\n */\nexport declare class Comparison<ValueTypes = string | number> extends FilterDirective {\n comparator: Comparator;\n attribute: string;\n value: ValueTypes;\n exprName: \"Comparison\";\n constructor(comparator: Comparator, attribute: string, value: ValueTypes);\n}\n/**\n * Class representing an operation filter directive. It extends the\n * FilterDirective class.\n */\nexport declare class Operation extends FilterDirective {\n operator: Operator;\n args?: FilterDirective[] | undefined;\n exprName: \"Operation\";\n constructor(operator: Operator, args?: FilterDirective[] | undefined);\n}\n/**\n * Class representing a structured query expression. It extends the\n * Expression class.\n */\nexport declare class StructuredQuery extends Expression {\n query: string;\n filter?: FilterDirective | undefined;\n exprName: \"StructuredQuery\";\n constructor(query: string, filter?: FilterDirective | undefined);\n}\n"],"mappings":";;;;;;AAIA;AAIYE,KAJAD,GAAAA,GAIE,KAAA;AAId;AAIA;;AAAuBA,KARXC,E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AA,CAAA,EAzD1CP,uBAyD0C,GAzDhBD,sBAyDgB;;;;;;uBAnDzBG,kBAAkBlB,cAAcA;;;;aAI7CmB;;6BAEcf;+BACEO;qCACMS;uCACEC;iDACUC;;;;;;uBAMrBC,UAAAA;;kBAEVL;;;;;;uBAMUM,eAAAA,SAAwBD,UAAU;;;;;cAM3CF,iDAAiDG,eAAAA;cACtDb;;SAELc;;0BAEiBd,sCAAsCc;;;;;;cAM7CL,SAAAA,SAAkBI,eAAAA;YACzBpB;SACHoB;;wBAEepB,iBAAiBoB;;;;;;cAMtBF,eAAAA,SAAwBC,UAAAA;;WAEhCC;;sCAE2BA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.cts","names":["isObject","isFilterEmpty","isInt","isFloat","isString","isBoolean","castValue"],"sources":["../../src/structured_query/utils.d.ts"],"sourcesContent":["/**\n * Checks if the provided argument is an object and not an array.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport declare function isObject(obj: any): obj is object;\n/**\n * Checks if a provided filter is empty. The filter can be a function, an\n * object, a string, or undefined.\n */\nexport declare function isFilterEmpty(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfilter: ((q: any) => any) | object | string | undefined): filter is undefined;\n/**\n * Checks if the provided value is an integer.\n */\nexport declare function isInt(value: unknown): boolean;\n/**\n * Checks if the provided value is a floating-point number.\n */\nexport declare function isFloat(value: unknown): boolean;\n/**\n * Checks if the provided value is a string that cannot be parsed into a\n * number.\n */\nexport declare function isString(value: unknown): boolean;\n/**\n * Checks if the provided value is a boolean.\n */\nexport declare function isBoolean(value: unknown): boolean;\n/**\n * Casts a value that might be string or number to actual string or number.\n * Since LLM might return back an integer/float as a string, we need to cast\n * it back to a number, as many vector databases can't handle number as string\n * values as a comparator.\n */\nexport declare function castValue(input: unknown): string | number | boolean;\n"],"mappings":";;AAIA;AAKA;AAMA;AAIwBG,iBAfAH,QAAAA,CAeO,GAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAA,MAAA;AAK/B;AAIA;AAOA;;iBA1BwBC,aAAAA;;;;;;iBAMAC,KAAAA;;;;iBAIAC,OAAAA;;;;;iBAKAC,QAAAA;;;;iBAIAC,SAAAA;;;;;;;iBAOAC,SAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","names":["isObject","isFilterEmpty","isInt","isFloat","isString","isBoolean","castValue"],"sources":["../../src/structured_query/utils.d.ts"],"sourcesContent":["/**\n * Checks if the provided argument is an object and not an array.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport declare function isObject(obj: any): obj is object;\n/**\n * Checks if a provided filter is empty. The filter can be a function, an\n * object, a string, or undefined.\n */\nexport declare function isFilterEmpty(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfilter: ((q: any) => any) | object | string | undefined): filter is undefined;\n/**\n * Checks if the provided value is an integer.\n */\nexport declare function isInt(value: unknown): boolean;\n/**\n * Checks if the provided value is a floating-point number.\n */\nexport declare function isFloat(value: unknown): boolean;\n/**\n * Checks if the provided value is a string that cannot be parsed into a\n * number.\n */\nexport declare function isString(value: unknown): boolean;\n/**\n * Checks if the provided value is a boolean.\n */\nexport declare function isBoolean(value: unknown): boolean;\n/**\n * Casts a value that might be string or number to actual string or number.\n * Since LLM might return back an integer/float as a string, we need to cast\n * it back to a number, as many vector databases can't handle number as string\n * values as a comparator.\n */\nexport declare function castValue(input: unknown): string | number | boolean;\n"],"mappings":";;AAIA;AAKA;AAMA;AAIwBG,iBAfAH,QAAAA,CAeO,GAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAA,MAAA;AAK/B;AAIA;AAOA;;iBA1BwBC,aAAAA;;;;;;iBAMAC,KAAAA;;;;iBAIAC,OAAAA;;;;;iBAKAC,QAAAA;;;;iBAIAC,SAAAA;;;;;;;iBAOAC,SAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":["z","CallbackManagerForToolRun","BaseLangChain","RunnableConfig","RunnableFunc","ToolCall","ToolMessage","RunnableToolLike","ToolInputParsingException","InferInteropZodInput","InferInteropZodOutput","InteropZodObject","InteropZodType","ZodStringV3","ZodStringV4","ZodObjectV3","ZodObjectV4","StructuredToolCallInput","ToolInputSchemaBase","ToolReturnType","ResponseFormat","ToolInputSchemaInputType","ToolInputSchemaOutputType","ToolParams","ToolRunnableConfig","StructuredToolInterface","DynamicToolInput","DynamicStructuredToolInput","StringInputToolSchema","ToolInterface","ToolOutputType","ToolRuntime","JSONSchema","BaseDynamicToolInput","ContentAndArtifact","StructuredToolParams","ToolSchemaBase","isLangChainTool","isRunnableToolLike","isStructuredTool","isStructuredToolParams","StructuredTool","SchemaT","SchemaInputT","ToolOutputT","SchemaOutputT","Promise","TInput","TConfig","TArg","Tool","ZodString","ZodOptional","ZodTypeAny","ZodObject","ZodEffects","input","NonNullable","DynamicTool","DynamicStructuredTool","Parameters","BaseToolkit","ToolWrapperParams","RunInput","tool","TState","TContext","ServerTool","Record","ClientTool"],"sources":["../../src/tools/index.d.ts"],"sourcesContent":["import { z } from \"zod/v3\";\nimport { CallbackManagerForToolRun } from \"../callbacks/manager.js\";\nimport { BaseLangChain } from \"../language_models/base.js\";\nimport { type RunnableConfig } from \"../runnables/config.js\";\nimport type { RunnableFunc } from \"../runnables/base.js\";\nimport { ToolCall, ToolMessage } from \"../messages/tool.js\";\nimport type { RunnableToolLike } from \"../runnables/base.js\";\nimport { ToolInputParsingException } from \"./utils.js\";\nimport { type InferInteropZodInput, type InferInteropZodOutput, type InteropZodObject, type InteropZodType, type ZodStringV3, type ZodStringV4, type ZodObjectV3, type ZodObjectV4 } from \"../utils/types/zod.js\";\nimport type { StructuredToolCallInput, ToolInputSchemaBase, ToolReturnType, ResponseFormat, ToolInputSchemaInputType, ToolInputSchemaOutputType, ToolParams, ToolRunnableConfig, StructuredToolInterface, DynamicToolInput, DynamicStructuredToolInput, StringInputToolSchema, ToolInterface, ToolOutputType, ToolRuntime } from \"./types.js\";\nimport { type JSONSchema } from \"../utils/json_schema.js\";\nexport type { BaseDynamicToolInput, ContentAndArtifact, DynamicToolInput, DynamicStructuredToolInput, ResponseFormat, StructuredToolCallInput, StructuredToolInterface, StructuredToolParams, ToolInterface, ToolParams, ToolReturnType, ToolRunnableConfig, ToolInputSchemaBase as ToolSchemaBase, } from \"./types.js\";\nexport { isLangChainTool, isRunnableToolLike, isStructuredTool, isStructuredToolParams, type ToolRuntime, } from \"./types.js\";\nexport { ToolInputParsingException };\n/**\n * Base class for Tools that accept input of any shape defined by a Zod schema.\n */\nexport declare abstract class StructuredTool<SchemaT = ToolInputSchemaBase, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends BaseLangChain<StructuredToolCallInput<SchemaT, SchemaInputT>, ToolOutputT | ToolMessage> implements StructuredToolInterface<SchemaT, SchemaInputT, ToolOutputT> {\n abstract name: string;\n abstract description: string;\n abstract schema: SchemaT;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect: boolean;\n verboseParsingErrors: boolean;\n get lc_namespace(): string[];\n /**\n * The tool response format.\n *\n * If \"content\" then the output of the tool is interpreted as the contents of a\n * ToolMessage. If \"content_and_artifact\" then the output is expected to be a\n * two-tuple corresponding to the (content, artifact) of a ToolMessage.\n *\n * @default \"content\"\n */\n responseFormat?: ResponseFormat;\n /**\n * Default config object for the tool runnable.\n */\n defaultConfig?: ToolRunnableConfig;\n constructor(fields?: ToolParams);\n protected abstract _call(arg: SchemaOutputT, runManager?: CallbackManagerForToolRun, parentConfig?: ToolRunnableConfig): Promise<ToolOutputT>;\n /**\n * Invokes the tool with the provided input and configuration.\n * @param input The input for the tool.\n * @param config Optional configuration for the tool.\n * @returns A Promise that resolves with the tool's output.\n */\n invoke<TInput extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(input: TInput, config?: TConfig): Promise<ToolReturnType<TInput, TConfig, ToolOutputT>>;\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument, configuration, and tags. It\n * parses the input according to the schema, handles any errors, and\n * manages callbacks.\n * @param arg The input argument for the tool.\n * @param configArg Optional configuration or callbacks for the tool.\n * @param tags Optional tags for the tool.\n * @returns A Promise that resolves with a string.\n */\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig, \n /** @deprecated */\n tags?: string[]): Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>;\n}\n/**\n * Base class for Tools that accept input as a string.\n */\nexport declare abstract class Tool<ToolOutputT = ToolOutputType> extends StructuredTool<StringInputToolSchema, ToolInputSchemaOutputType<StringInputToolSchema>, ToolInputSchemaInputType<StringInputToolSchema>, ToolOutputT> implements ToolInterface<StringInputToolSchema, ToolInputSchemaInputType<StringInputToolSchema>, ToolOutputT> {\n schema: z.ZodEffects<z.ZodObject<{\n input: z.ZodOptional<z.ZodString>;\n }, \"strip\", z.ZodTypeAny, {\n input?: string | undefined;\n }, {\n input?: string | undefined;\n }>, string | undefined, {\n input?: string | undefined;\n }>;\n constructor(fields?: ToolParams);\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument and callbacks. It handles\n * string inputs specifically.\n * @param arg The input argument for the tool, which can be a string, undefined, or an input of the tool's schema.\n * @param callbacks Optional callbacks for the tool.\n * @returns A Promise that resolves with a string.\n */\n // Match the base class signature including the generics and conditional return type\n call<TArg extends string | undefined | z.input<this[\"schema\"]> | ToolCall, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, callbacks?: TConfig): Promise<ToolReturnType<NonNullable<TArg>, TConfig, ToolOutputT>>;\n}\n/**\n * A tool that can be created dynamically from a function, name, and description.\n */\nexport declare class DynamicTool<ToolOutputT = ToolOutputType> extends Tool<ToolOutputT> {\n static lc_name(): string;\n name: string;\n description: string;\n func: DynamicToolInput<ToolOutputT>[\"func\"];\n constructor(fields: DynamicToolInput<ToolOutputT>);\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n */\n call<TArg extends string | undefined | z.input<this[\"schema\"]> | ToolCall, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig): Promise<ToolReturnType<NonNullable<TArg>, TConfig, ToolOutputT>>;\n /** @ignore */\n _call(input: string, // DynamicTool's _call specifically expects a string after schema transformation\n runManager?: CallbackManagerForToolRun, parentConfig?: ToolRunnableConfig): Promise<ToolOutputT>;\n}\n/**\n * A tool that can be created dynamically from a function, name, and\n * description, designed to work with structured data. It extends the\n * StructuredTool class and overrides the _call method to execute the\n * provided function when the tool is called.\n *\n * Schema can be passed as Zod or JSON schema. The tool will not validate\n * input if JSON schema is passed.\n */\nexport declare class DynamicStructuredTool<SchemaT = ToolInputSchemaBase, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends StructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT> {\n static lc_name(): string;\n name: string;\n description: string;\n func: DynamicStructuredToolInput<SchemaT, SchemaOutputT, ToolOutputT>[\"func\"];\n schema: SchemaT;\n constructor(fields: DynamicStructuredToolInput<SchemaT, SchemaOutputT, ToolOutputT>);\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n */\n // Match the base class signature\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig, \n /** @deprecated */\n tags?: string[]): Promise<ToolReturnType<NonNullable<TArg>, TConfig, ToolOutputT>>;\n protected _call(arg: Parameters<DynamicStructuredToolInput<SchemaT, SchemaOutputT>[\"func\"]>[0], runManager?: CallbackManagerForToolRun, parentConfig?: RunnableConfig): Promise<ToolOutputT>;\n}\n/**\n * Abstract base class for toolkits in LangChain. Toolkits are collections\n * of tools that agents can use. Subclasses must implement the `tools`\n * property to provide the specific tools for the toolkit.\n */\nexport declare abstract class BaseToolkit {\n abstract tools: StructuredToolInterface[];\n getTools(): StructuredToolInterface[];\n}\n/**\n * Parameters for the tool function.\n * Schema can be provided as Zod or JSON schema.\n * Both schema types will be validated.\n * @template {ToolInputSchemaBase} RunInput The input schema for the tool.\n */\ninterface ToolWrapperParams<RunInput = ToolInputSchemaBase | undefined> extends ToolParams {\n /**\n * The name of the tool. If using with an LLM, this\n * will be passed as the tool name.\n */\n name: string;\n /**\n * The description of the tool.\n * @default `${fields.name} tool`\n */\n description?: string;\n /**\n * The input schema for the tool. If using an LLM, this\n * will be passed as the tool schema to generate arguments\n * for.\n */\n schema?: RunInput;\n /**\n * The tool response format.\n *\n * If \"content\" then the output of the tool is interpreted as the contents of a\n * ToolMessage. If \"content_and_artifact\" then the output is expected to be a\n * two-tuple corresponding to the (content, artifact) of a ToolMessage.\n *\n * @default \"content\"\n */\n responseFormat?: ResponseFormat;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect?: boolean;\n}\n/**\n * Creates a new StructuredTool instance with the provided function, name, description, and schema.\n *\n * Schema can be provided as Zod or JSON schema, and both will be validated.\n *\n * @function\n * @template {ToolInputSchemaBase} SchemaT The input schema for the tool.\n * @template {ToolReturnType} ToolOutputT The output type of the tool.\n *\n * @param {RunnableFunc<z.output<SchemaT>, ToolOutputT>} func - The function to invoke when the tool is called.\n * @param {ToolWrapperParams<SchemaT>} fields - An object containing the following properties:\n * @param {string} fields.name The name of the tool.\n * @param {string | undefined} fields.description The description of the tool. Defaults to either the description on the Zod schema, or `${fields.name} tool`.\n * @param {z.AnyZodObject | z.ZodString | undefined} fields.schema The Zod schema defining the input for the tool. If undefined, it will default to a Zod string schema.\n *\n * @returns {DynamicStructuredTool<SchemaT>} A new StructuredTool instance.\n */\nexport declare function tool<SchemaT extends ZodStringV3, ToolOutputT = ToolOutputType>(func: RunnableFunc<InferInteropZodOutput<SchemaT>, ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicTool<ToolOutputT>;\nexport declare function tool<SchemaT extends ZodStringV4, ToolOutputT = ToolOutputType>(func: RunnableFunc<InferInteropZodOutput<SchemaT>, ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicTool<ToolOutputT>;\nexport declare function tool<SchemaT extends ZodObjectV3, SchemaOutputT = InferInteropZodOutput<SchemaT>, SchemaInputT = InferInteropZodInput<SchemaT>, ToolOutputT = ToolOutputType>(func: RunnableFunc<SchemaOutputT, ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport declare function tool<SchemaT extends ZodObjectV4, SchemaOutputT = InferInteropZodOutput<SchemaT>, SchemaInputT = InferInteropZodInput<SchemaT>, ToolOutputT = ToolOutputType>(func: RunnableFunc<SchemaOutputT, ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport declare function tool<SchemaT extends JSONSchema, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType>(func: RunnableFunc<Parameters<DynamicStructuredToolInput<SchemaT>[\"func\"]>[0], ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport declare function tool<SchemaT extends InteropZodObject | InteropZodType<string> | JSONSchema = InteropZodObject, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType>(func: RunnableFunc<SchemaOutputT, ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT> | DynamicTool<ToolOutputT>;\n// Overloads with ToolRuntime as CallOptions\nexport declare function tool<SchemaT extends ZodStringV3, ToolOutputT = ToolOutputType, TState = unknown, TContext = unknown>(func: (input: InferInteropZodOutput<SchemaT>, runtime: ToolRuntime<TState, TContext>) => ToolOutputT | Promise<ToolOutputT>, fields: ToolWrapperParams<SchemaT>): DynamicTool<ToolOutputT>;\nexport declare function tool<SchemaT extends ZodStringV4, ToolOutputT = ToolOutputType, TState = unknown, TContext = unknown>(func: (input: InferInteropZodOutput<SchemaT>, runtime: ToolRuntime<TState, TContext>) => ToolOutputT | Promise<ToolOutputT>, fields: ToolWrapperParams<SchemaT>): DynamicTool<ToolOutputT>;\nexport declare function tool<SchemaT extends ZodObjectV3, SchemaOutputT = InferInteropZodOutput<SchemaT>, SchemaInputT = InferInteropZodInput<SchemaT>, ToolOutputT = ToolOutputType, TState = unknown, TContext = unknown>(func: (input: SchemaOutputT, runtime: ToolRuntime<TState, TContext>) => ToolOutputT | Promise<ToolOutputT>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport declare function tool<SchemaT extends ZodObjectV4, SchemaOutputT = InferInteropZodOutput<SchemaT>, SchemaInputT = InferInteropZodInput<SchemaT>, ToolOutputT = ToolOutputType, TState = unknown, TContext = unknown>(func: (input: SchemaOutputT, runtime: ToolRuntime<TState, TContext>) => ToolOutputT | Promise<ToolOutputT>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport declare function tool<SchemaT extends JSONSchema, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType, TState = unknown, TContext = unknown>(func: (input: Parameters<DynamicStructuredToolInput<SchemaT>[\"func\"]>[0], runtime: ToolRuntime<TState, TContext>) => ToolOutputT | Promise<ToolOutputT>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport type ServerTool = Record<string, unknown>;\nexport type ClientTool = StructuredToolInterface | DynamicTool | RunnableToolLike;\n"],"mappings":";;;;;;;;;;;;;;;;AAiBwK0C,uBAA1ID,cAA0IC,CAAAA,UAAjHxB,mBAAiHwB,EAAAA,gBAA5EpB,yBAA4EoB,CAAlDA,OAAkDA,CAAAA,EAAAA,eAAzBrB,wBAAyBqB,CAAAA,OAAAA,CAAAA,EAAAA,cAAwBZ,cAAxBY,CAAAA,SAAgDxC,aAAhDwC,CAA8DzB,uBAA9DyB,CAAsFA,OAAtFA,EAA+FC,YAA/FD,CAAAA,EAA8GE,WAA9GF,GAA4HpC,WAA5HoC,CAAAA,YAAoJjB,uBAApJiB,CAA4KA,OAA5KA,EAAqLC,YAArLD,EAAmME,WAAnMF,CAAAA,CAAAA;EAAO,SAAhCrB,IAAAA,EAAAA,MAAAA;EAAwB,SAAyBS,WAAAA,EAAAA,MAAAA;EAAc,SAAgDY,MAAAA,EAGzOA,OAHyOA;EAAO;;;;;;EAAoG,YAAEE,EAAAA,OAAAA;EAAW,oBAGjWF,EAAAA,OAAAA;EAAO,IAmBPtB,YAAAA,CAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAc;;;;;;;;;EAaoC,cAA7CH,CAAAA,EAbLG,cAaKH;EAAuB;;;EAAwG,aAA0B8B,CAAAA,EAT/JvB,kBAS+JuB;EAAM,WAAEC,CAAAA,MAAAA,CAAAA,EARlKzB,UAQkKyB;EAAO,mBAAEJ,KAAAA,CAAAA,GAAAA,EAPlKC,aAOkKD,EAAAA,UAAAA,CAAAA,EAPtI3C,yBAOsI2C,EAAAA,YAAAA,CAAAA,EAP5FpB,kBAO4FoB,CAAAA,EAPvEE,OAOuEF,CAP/DA,WAO+DA,CAAAA;EAAW;;;;;;EAYvG,MAAmBK,CAAAA,eAZjGhC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,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,OAAAA,EAS0H2B,WAT1H3B,CASsI6D,MATtI7D,EAS8I8D,QAT9I9D,CAAAA,EAAAA,GAS4JwC,WAT5JxC,GAS0K0C,OAT1K1C,CASkLwC,WATlLxC,CAAAA,EAAAA,MAAAA,EASwM0D,iBATxM1D,CAS0NsC,OAT1NtC,CAAAA,CAAAA,EASqOuD,qBATrOvD,CAS2PsC,OAT3PtC,EASoQyC,aATpQzC,EASmRuC,YATnRvC,EASiSwC,WATjSxC,CAAAA;AAAwFsC,KAUxQyB,UAAAA,GAAaC,MAV2P1B,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;AAAlBoB,KAWtPO,UAAAA,GAAa5C,uBAXyOqC,GAW/MJ,WAX+MI,GAWjMvD,gBAXiMuD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":["z","CallbackManagerForToolRun","BaseLangChain","RunnableConfig","RunnableFunc","ToolCall","ToolMessage","RunnableToolLike","ToolInputParsingException","InferInteropZodInput","InferInteropZodOutput","InteropZodObject","InteropZodType","ZodStringV3","ZodStringV4","ZodObjectV3","ZodObjectV4","StructuredToolCallInput","ToolInputSchemaBase","ToolReturnType","ResponseFormat","ToolInputSchemaInputType","ToolInputSchemaOutputType","ToolParams","ToolRunnableConfig","StructuredToolInterface","DynamicToolInput","DynamicStructuredToolInput","StringInputToolSchema","ToolInterface","ToolOutputType","ToolRuntime","JSONSchema","BaseDynamicToolInput","ContentAndArtifact","StructuredToolParams","ToolSchemaBase","isLangChainTool","isRunnableToolLike","isStructuredTool","isStructuredToolParams","StructuredTool","SchemaT","SchemaInputT","ToolOutputT","SchemaOutputT","Promise","TInput","TConfig","TArg","Tool","ZodString","ZodOptional","ZodTypeAny","ZodObject","ZodEffects","input","NonNullable","DynamicTool","DynamicStructuredTool","Parameters","BaseToolkit","ToolWrapperParams","RunInput","tool","TState","TContext","ServerTool","Record","ClientTool"],"sources":["../../src/tools/index.d.ts"],"sourcesContent":["import { z } from \"zod/v3\";\nimport { CallbackManagerForToolRun } from \"../callbacks/manager.js\";\nimport { BaseLangChain } from \"../language_models/base.js\";\nimport { type RunnableConfig } from \"../runnables/config.js\";\nimport type { RunnableFunc } from \"../runnables/base.js\";\nimport { ToolCall, ToolMessage } from \"../messages/tool.js\";\nimport type { RunnableToolLike } from \"../runnables/base.js\";\nimport { ToolInputParsingException } from \"./utils.js\";\nimport { type InferInteropZodInput, type InferInteropZodOutput, type InteropZodObject, type InteropZodType, type ZodStringV3, type ZodStringV4, type ZodObjectV3, type ZodObjectV4 } from \"../utils/types/zod.js\";\nimport type { StructuredToolCallInput, ToolInputSchemaBase, ToolReturnType, ResponseFormat, ToolInputSchemaInputType, ToolInputSchemaOutputType, ToolParams, ToolRunnableConfig, StructuredToolInterface, DynamicToolInput, DynamicStructuredToolInput, StringInputToolSchema, ToolInterface, ToolOutputType, ToolRuntime } from \"./types.js\";\nimport { type JSONSchema } from \"../utils/json_schema.js\";\nexport type { BaseDynamicToolInput, ContentAndArtifact, DynamicToolInput, DynamicStructuredToolInput, ResponseFormat, StructuredToolCallInput, StructuredToolInterface, StructuredToolParams, ToolInterface, ToolParams, ToolReturnType, ToolRunnableConfig, ToolInputSchemaBase as ToolSchemaBase, } from \"./types.js\";\nexport { isLangChainTool, isRunnableToolLike, isStructuredTool, isStructuredToolParams, type ToolRuntime, } from \"./types.js\";\nexport { ToolInputParsingException };\n/**\n * Base class for Tools that accept input of any shape defined by a Zod schema.\n */\nexport declare abstract class StructuredTool<SchemaT = ToolInputSchemaBase, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends BaseLangChain<StructuredToolCallInput<SchemaT, SchemaInputT>, ToolOutputT | ToolMessage> implements StructuredToolInterface<SchemaT, SchemaInputT, ToolOutputT> {\n abstract name: string;\n abstract description: string;\n abstract schema: SchemaT;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect: boolean;\n verboseParsingErrors: boolean;\n get lc_namespace(): string[];\n /**\n * The tool response format.\n *\n * If \"content\" then the output of the tool is interpreted as the contents of a\n * ToolMessage. If \"content_and_artifact\" then the output is expected to be a\n * two-tuple corresponding to the (content, artifact) of a ToolMessage.\n *\n * @default \"content\"\n */\n responseFormat?: ResponseFormat;\n /**\n * Default config object for the tool runnable.\n */\n defaultConfig?: ToolRunnableConfig;\n constructor(fields?: ToolParams);\n protected abstract _call(arg: SchemaOutputT, runManager?: CallbackManagerForToolRun, parentConfig?: ToolRunnableConfig): Promise<ToolOutputT>;\n /**\n * Invokes the tool with the provided input and configuration.\n * @param input The input for the tool.\n * @param config Optional configuration for the tool.\n * @returns A Promise that resolves with the tool's output.\n */\n invoke<TInput extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(input: TInput, config?: TConfig): Promise<ToolReturnType<TInput, TConfig, ToolOutputT>>;\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument, configuration, and tags. It\n * parses the input according to the schema, handles any errors, and\n * manages callbacks.\n * @param arg The input argument for the tool.\n * @param configArg Optional configuration or callbacks for the tool.\n * @param tags Optional tags for the tool.\n * @returns A Promise that resolves with a string.\n */\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig, \n /** @deprecated */\n tags?: string[]): Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>;\n}\n/**\n * Base class for Tools that accept input as a string.\n */\nexport declare abstract class Tool<ToolOutputT = ToolOutputType> extends StructuredTool<StringInputToolSchema, ToolInputSchemaOutputType<StringInputToolSchema>, ToolInputSchemaInputType<StringInputToolSchema>, ToolOutputT> implements ToolInterface<StringInputToolSchema, ToolInputSchemaInputType<StringInputToolSchema>, ToolOutputT> {\n schema: z.ZodEffects<z.ZodObject<{\n input: z.ZodOptional<z.ZodString>;\n }, \"strip\", z.ZodTypeAny, {\n input?: string | undefined;\n }, {\n input?: string | undefined;\n }>, string | undefined, {\n input?: string | undefined;\n }>;\n constructor(fields?: ToolParams);\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument and callbacks. It handles\n * string inputs specifically.\n * @param arg The input argument for the tool, which can be a string, undefined, or an input of the tool's schema.\n * @param callbacks Optional callbacks for the tool.\n * @returns A Promise that resolves with a string.\n */\n // Match the base class signature including the generics and conditional return type\n call<TArg extends string | undefined | z.input<this[\"schema\"]> | ToolCall, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, callbacks?: TConfig): Promise<ToolReturnType<NonNullable<TArg>, TConfig, ToolOutputT>>;\n}\n/**\n * A tool that can be created dynamically from a function, name, and description.\n */\nexport declare class DynamicTool<ToolOutputT = ToolOutputType> extends Tool<ToolOutputT> {\n static lc_name(): string;\n name: string;\n description: string;\n func: DynamicToolInput<ToolOutputT>[\"func\"];\n constructor(fields: DynamicToolInput<ToolOutputT>);\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n */\n call<TArg extends string | undefined | z.input<this[\"schema\"]> | ToolCall, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig): Promise<ToolReturnType<NonNullable<TArg>, TConfig, ToolOutputT>>;\n /** @ignore */\n _call(input: string, // DynamicTool's _call specifically expects a string after schema transformation\n runManager?: CallbackManagerForToolRun, parentConfig?: ToolRunnableConfig): Promise<ToolOutputT>;\n}\n/**\n * A tool that can be created dynamically from a function, name, and\n * description, designed to work with structured data. It extends the\n * StructuredTool class and overrides the _call method to execute the\n * provided function when the tool is called.\n *\n * Schema can be passed as Zod or JSON schema. The tool will not validate\n * input if JSON schema is passed.\n */\nexport declare class DynamicStructuredTool<SchemaT = ToolInputSchemaBase, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends StructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT> {\n static lc_name(): string;\n name: string;\n description: string;\n func: DynamicStructuredToolInput<SchemaT, SchemaOutputT, ToolOutputT>[\"func\"];\n schema: SchemaT;\n constructor(fields: DynamicStructuredToolInput<SchemaT, SchemaOutputT, ToolOutputT>);\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n */\n // Match the base class signature\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig, \n /** @deprecated */\n tags?: string[]): Promise<ToolReturnType<NonNullable<TArg>, TConfig, ToolOutputT>>;\n protected _call(arg: Parameters<DynamicStructuredToolInput<SchemaT, SchemaOutputT>[\"func\"]>[0], runManager?: CallbackManagerForToolRun, parentConfig?: RunnableConfig): Promise<ToolOutputT>;\n}\n/**\n * Abstract base class for toolkits in LangChain. Toolkits are collections\n * of tools that agents can use. Subclasses must implement the `tools`\n * property to provide the specific tools for the toolkit.\n */\nexport declare abstract class BaseToolkit {\n abstract tools: StructuredToolInterface[];\n getTools(): StructuredToolInterface[];\n}\n/**\n * Parameters for the tool function.\n * Schema can be provided as Zod or JSON schema.\n * Both schema types will be validated.\n * @template {ToolInputSchemaBase} RunInput The input schema for the tool.\n */\ninterface ToolWrapperParams<RunInput = ToolInputSchemaBase | undefined> extends ToolParams {\n /**\n * The name of the tool. If using with an LLM, this\n * will be passed as the tool name.\n */\n name: string;\n /**\n * The description of the tool.\n * @default `${fields.name} tool`\n */\n description?: string;\n /**\n * The input schema for the tool. If using an LLM, this\n * will be passed as the tool schema to generate arguments\n * for.\n */\n schema?: RunInput;\n /**\n * The tool response format.\n *\n * If \"content\" then the output of the tool is interpreted as the contents of a\n * ToolMessage. If \"content_and_artifact\" then the output is expected to be a\n * two-tuple corresponding to the (content, artifact) of a ToolMessage.\n *\n * @default \"content\"\n */\n responseFormat?: ResponseFormat;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect?: boolean;\n}\n/**\n * Creates a new StructuredTool instance with the provided function, name, description, and schema.\n *\n * Schema can be provided as Zod or JSON schema, and both will be validated.\n *\n * @function\n * @template {ToolInputSchemaBase} SchemaT The input schema for the tool.\n * @template {ToolReturnType} ToolOutputT The output type of the tool.\n *\n * @param {RunnableFunc<z.output<SchemaT>, ToolOutputT>} func - The function to invoke when the tool is called.\n * @param {ToolWrapperParams<SchemaT>} fields - An object containing the following properties:\n * @param {string} fields.name The name of the tool.\n * @param {string | undefined} fields.description The description of the tool. Defaults to either the description on the Zod schema, or `${fields.name} tool`.\n * @param {z.AnyZodObject | z.ZodString | undefined} fields.schema The Zod schema defining the input for the tool. If undefined, it will default to a Zod string schema.\n *\n * @returns {DynamicStructuredTool<SchemaT>} A new StructuredTool instance.\n */\nexport declare function tool<SchemaT extends ZodStringV3, ToolOutputT = ToolOutputType>(func: RunnableFunc<InferInteropZodOutput<SchemaT>, ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicTool<ToolOutputT>;\nexport declare function tool<SchemaT extends ZodStringV4, ToolOutputT = ToolOutputType>(func: RunnableFunc<InferInteropZodOutput<SchemaT>, ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicTool<ToolOutputT>;\nexport declare function tool<SchemaT extends ZodObjectV3, SchemaOutputT = InferInteropZodOutput<SchemaT>, SchemaInputT = InferInteropZodInput<SchemaT>, ToolOutputT = ToolOutputType>(func: RunnableFunc<SchemaOutputT, ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport declare function tool<SchemaT extends ZodObjectV4, SchemaOutputT = InferInteropZodOutput<SchemaT>, SchemaInputT = InferInteropZodInput<SchemaT>, ToolOutputT = ToolOutputType>(func: RunnableFunc<SchemaOutputT, ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport declare function tool<SchemaT extends JSONSchema, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType>(func: RunnableFunc<Parameters<DynamicStructuredToolInput<SchemaT>[\"func\"]>[0], ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport declare function tool<SchemaT extends InteropZodObject | InteropZodType<string> | JSONSchema = InteropZodObject, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType>(func: RunnableFunc<SchemaOutputT, ToolOutputT, ToolRunnableConfig>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT> | DynamicTool<ToolOutputT>;\n// Overloads with ToolRuntime as CallOptions\nexport declare function tool<SchemaT extends ZodStringV3, ToolOutputT = ToolOutputType, TState = unknown, TContext = unknown>(func: (input: InferInteropZodOutput<SchemaT>, runtime: ToolRuntime<TState, TContext>) => ToolOutputT | Promise<ToolOutputT>, fields: ToolWrapperParams<SchemaT>): DynamicTool<ToolOutputT>;\nexport declare function tool<SchemaT extends ZodStringV4, ToolOutputT = ToolOutputType, TState = unknown, TContext = unknown>(func: (input: InferInteropZodOutput<SchemaT>, runtime: ToolRuntime<TState, TContext>) => ToolOutputT | Promise<ToolOutputT>, fields: ToolWrapperParams<SchemaT>): DynamicTool<ToolOutputT>;\nexport declare function tool<SchemaT extends ZodObjectV3, SchemaOutputT = InferInteropZodOutput<SchemaT>, SchemaInputT = InferInteropZodInput<SchemaT>, ToolOutputT = ToolOutputType, TState = unknown, TContext = unknown>(func: (input: SchemaOutputT, runtime: ToolRuntime<TState, TContext>) => ToolOutputT | Promise<ToolOutputT>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport declare function tool<SchemaT extends ZodObjectV4, SchemaOutputT = InferInteropZodOutput<SchemaT>, SchemaInputT = InferInteropZodInput<SchemaT>, ToolOutputT = ToolOutputType, TState = unknown, TContext = unknown>(func: (input: SchemaOutputT, runtime: ToolRuntime<TState, TContext>) => ToolOutputT | Promise<ToolOutputT>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport declare function tool<SchemaT extends JSONSchema, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType, TState = unknown, TContext = unknown>(func: (input: Parameters<DynamicStructuredToolInput<SchemaT>[\"func\"]>[0], runtime: ToolRuntime<TState, TContext>) => ToolOutputT | Promise<ToolOutputT>, fields: ToolWrapperParams<SchemaT>): DynamicStructuredTool<SchemaT, SchemaOutputT, SchemaInputT, ToolOutputT>;\nexport type ServerTool = Record<string, unknown>;\nexport type ClientTool = StructuredToolInterface | DynamicTool | RunnableToolLike;\n"],"mappings":";;;;;;;;;;;;;;;;AAiBwK0C,uBAA1ID,cAA0IC,CAAAA,UAAjHxB,mBAAiHwB,EAAAA,gBAA5EpB,yBAA4EoB,CAAlDA,OAAkDA,CAAAA,EAAAA,eAAzBrB,wBAAyBqB,CAAAA,OAAAA,CAAAA,EAAAA,cAAwBZ,cAAxBY,CAAAA,SAAgDxC,aAAhDwC,CAA8DzB,uBAA9DyB,CAAsFA,OAAtFA,EAA+FC,YAA/FD,CAAAA,EAA8GE,WAA9GF,GAA4HpC,WAA5HoC,CAAAA,YAAoJjB,uBAApJiB,CAA4KA,OAA5KA,EAAqLC,YAArLD,EAAmME,WAAnMF,CAAAA,CAAAA;EAAO,SAAhCrB,IAAAA,EAAAA,MAAAA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,CAAAA,EAAAA,GAQ+DoB,WAR/DpB,GAQ6EsB,OAR7EtB,CAQqFoB,WARrFpB,CAAAA,EAAAA,MAAAA,EAQ2GsC,iBAR3GtC,CAQ6HkB,OAR7HlB,CAAAA,CAAAA,EAQwImC,qBARxInC,CAQ8JkB,OAR9JlB,EAQuKqB,aARvKrB,EAQsLmB,YARtLnB,EAQoMoB,WARpMpB,CAAAA;AAAzCpB,iBASpK4D,IAToK5D,CAAAA,gBAS/I4B,eAT+I5B,EAAAA,gBASnHkB,yBATmHlB,CASzFsC,OATyFtC,CAAAA,EAAAA,eAShEiB,wBATgEjB,CASvCsC,OATuCtC,CAAAA,EAAAA,cASf0B,cATe1B,EAAAA,SAAAA,OAAAA,EAAAA,WAAAA,OAAAA,CAAAA,CAAAA,IAAAA,EAAAA,CAAAA,KAAAA,EASqDwD,UATrDxD,CASgEuB,0BAThEvB,CAS2FsC,OAT3FtC,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,OAAAA,EAS0H2B,WAT1H3B,CASsI6D,MATtI7D,EAS8I8D,QAT9I9D,CAAAA,EAAAA,GAS4JwC,WAT5JxC,GAS0K0C,OAT1K1C,CASkLwC,WATlLxC,CAAAA,EAAAA,MAAAA,EASwM0D,iBATxM1D,CAS0NsC,OAT1NtC,CAAAA,CAAAA,EASqOuD,qBATrOvD,CAS2PsC,OAT3PtC,EASoQyC,aATpQzC,EASmRuC,YATnRvC,EASiSwC,WATjSxC,CAAAA;AAAwFsC,KAUxQyB,UAAAA,GAAaC,MAV2P1B,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;AAAlBoB,KAWtPO,UAAAA,GAAa5C,uBAXyOqC,GAW/MJ,WAX+MI,GAWjMvD,gBAXiMuD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.cts","names":["z","z3","CallbackManagerForToolRun","BaseLangChainParams","ToolDefinition","RunnableConfig","RunnableToolLike","RunnableInterface","DirectToolOutput","ToolCall","ToolMessage","MessageContent","InferInteropZodInput","InferInteropZodOutput","InteropZodType","InteropZodObject","JSONSchema","BaseStore","ResponseFormat","ToolOutputType","ContentAndArtifact","ToolReturnType","TOutput","TConfig","TInput","ToolInputSchemaBase","ZodTypeAny","ToolParams","ToolRunnableConfig","Record","ConfigurableFieldType","ContextSchema","StructuredToolParams","StructuredToolInterface","Pick","ToolInputSchemaOutputType","T","ToolInputSchemaInputType","StructuredToolCallInput","SchemaT","SchemaInputT","StringInputToolSchema","ZodTypeDef","ZodType","ToolCallInput","ToolOutputT","TArg","Promise","ToolInterface","NonNullable","BaseDynamicToolInput","DynamicToolInput","DynamicStructuredToolInput","SchemaOutputT","isStructuredTool","isRunnableToolLike","isStructuredToolParams","isLangChainTool","ToolRuntime","TState","TContext"],"sources":["../../src/tools/types.d.ts"],"sourcesContent":["import type { z as z3 } from \"zod/v3\";\nimport { CallbackManagerForToolRun } from \"../callbacks/manager.js\";\nimport type { BaseLangChainParams, ToolDefinition } from \"../language_models/base.js\";\nimport type { RunnableConfig } from \"../runnables/config.js\";\nimport { RunnableToolLike, type RunnableInterface } from \"../runnables/base.js\";\nimport { type DirectToolOutput, type ToolCall, type ToolMessage } from \"../messages/tool.js\";\nimport type { MessageContent } from \"../messages/base.js\";\nimport { type InferInteropZodInput, type InferInteropZodOutput, type InteropZodType, type InteropZodObject } from \"../utils/types/zod.js\";\nimport { JSONSchema } from \"../utils/json_schema.js\";\nimport type { BaseStore } from \"../stores.js\";\nexport type ResponseFormat = \"content\" | \"content_and_artifact\" | string;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ToolOutputType = any;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ContentAndArtifact = [MessageContent, any];\n/**\n * Conditional type that determines the return type of the {@link StructuredTool.invoke} method.\n * - If the input is a ToolCall, it returns a ToolMessage\n * - If the config is a runnable config and contains a toolCall property, it returns a ToolMessage\n * - Otherwise, it returns the original output type\n */\nexport type ToolReturnType<TInput, TConfig, TOutput> = TOutput extends DirectToolOutput ? TOutput : TConfig extends {\n toolCall: {\n id: string;\n };\n} ? ToolMessage : TConfig extends {\n toolCall: {\n id: undefined;\n };\n} ? TOutput : TConfig extends {\n toolCall: {\n id?: string;\n };\n} ? TOutput | ToolMessage : TInput extends ToolCall ? ToolMessage : TOutput;\n/**\n * Base type that establishes the types of input schemas that can be used for LangChain tool\n * definitions.\n */\nexport type ToolInputSchemaBase = z3.ZodTypeAny | JSONSchema;\n/**\n * Parameters for the Tool classes.\n */\nexport interface ToolParams extends BaseLangChainParams {\n /**\n * The tool response format.\n *\n * If \"content\" then the output of the tool is interpreted as the contents of a\n * ToolMessage. If \"content_and_artifact\" then the output is expected to be a\n * two-tuple corresponding to the (content, artifact) of a ToolMessage.\n *\n * @default \"content\"\n */\n responseFormat?: ResponseFormat;\n /**\n * Default config object for the tool runnable.\n */\n defaultConfig?: ToolRunnableConfig;\n /**\n * Whether to show full details in the thrown parsing errors.\n *\n * @default false\n */\n verboseParsingErrors?: boolean;\n /**\n * Metadata for the tool.\n */\n metadata?: Record<string, unknown>;\n}\nexport type ToolRunnableConfig<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nConfigurableFieldType extends Record<string, any> = Record<string, any>, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nContextSchema = any> = RunnableConfig<ConfigurableFieldType> & {\n toolCall?: ToolCall;\n context?: ContextSchema;\n};\n/**\n * Schema for defining tools.\n *\n * @version 0.2.19\n */\nexport interface StructuredToolParams extends Pick<StructuredToolInterface, \"name\" | \"schema\"> {\n /**\n * An optional description of the tool to pass to the model.\n */\n description?: string;\n}\n/**\n * Utility type that resolves the output type of a tool input schema.\n *\n * Input & Output types are a concept used with Zod schema, as Zod allows for transforms to occur\n * during parsing. When using JSONSchema, input and output types are the same.\n *\n * The input type for a given schema should match the structure of the arguments that the LLM\n * generates as part of its {@link ToolCall}. The output type will be the type that results from\n * applying any transforms defined in your schema. If there are no transforms, the input and output\n * types will be the same.\n */\nexport type ToolInputSchemaOutputType<T> = T extends InteropZodType ? InferInteropZodOutput<T> : T extends JSONSchema ? unknown : never;\n/**\n * Utility type that resolves the input type of a tool input schema.\n *\n * Input & Output types are a concept used with Zod schema, as Zod allows for transforms to occur\n * during parsing. When using JSONSchema, input and output types are the same.\n *\n * The input type for a given schema should match the structure of the arguments that the LLM\n * generates as part of its {@link ToolCall}. The output type will be the type that results from\n * applying any transforms defined in your schema. If there are no transforms, the input and output\n * types will be the same.\n */\nexport type ToolInputSchemaInputType<T> = T extends InteropZodType ? InferInteropZodInput<T> : T extends JSONSchema ? unknown : never;\n/**\n * Defines the type that will be passed into a tool handler function as a result of a tool call.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\nexport type StructuredToolCallInput<SchemaT = ToolInputSchemaBase, SchemaInputT = ToolInputSchemaInputType<SchemaT>> = (ToolInputSchemaOutputType<SchemaT> extends string ? string : never) | SchemaInputT | ToolCall;\n/**\n * An input schema type for tools that accept a single string input.\n *\n * This schema defines a tool that takes an optional string parameter named \"input\".\n * It uses Zod's effects to transform the input and strip any extra properties.\n *\n * This is primarily used for creating simple string-based tools where the LLM\n * only needs to provide a single text value as input to the tool.\n */\nexport type StringInputToolSchema = z3.ZodType<string | undefined, z3.ZodTypeDef, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nany>;\n/**\n * Defines the type for input to a tool's call method.\n *\n * This type is a convenience alias for StructuredToolCallInput with the input type\n * derived from the schema. It represents the possible inputs that can be passed to a tool,\n * which can be either:\n * - A string (if the tool accepts string input)\n * - A structured input matching the tool's schema\n * - A ToolCall object (typically from an LLM)\n *\n * @param SchemaT - The schema type for the tool input, defaults to StringInputToolSchema\n */\nexport type ToolCallInput<SchemaT = StringInputToolSchema> = StructuredToolCallInput<SchemaT, ToolInputSchemaInputType<SchemaT>>;\n/**\n * Interface that defines the shape of a LangChain structured tool.\n *\n * A structured tool is a tool that uses a schema to define the structure of the arguments that the\n * LLM generates as part of its {@link ToolCall}.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\nexport interface StructuredToolInterface<SchemaT = ToolInputSchemaBase, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends RunnableInterface<StructuredToolCallInput<SchemaT, SchemaInputT>, ToolOutputT | ToolMessage> {\n lc_namespace: string[];\n /**\n * A Zod schema representing the parameters of the tool.\n */\n schema: SchemaT;\n /**\n * Invokes the tool with the provided argument and configuration.\n * @param arg The input argument for the tool.\n * @param configArg Optional configuration for the tool call.\n * @returns A Promise that resolves with the tool's output.\n */\n invoke<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig): Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>;\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument, configuration, and tags. It\n * parses the input according to the schema, handles any errors, and\n * manages callbacks.\n * @param arg The input argument for the tool.\n * @param configArg Optional configuration or callbacks for the tool.\n * @param tags Optional tags for the tool.\n * @returns A Promise that resolves with a string.\n */\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig, \n /** @deprecated */\n tags?: string[]): Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>;\n /**\n * The name of the tool.\n */\n name: string;\n /**\n * A description of the tool.\n */\n description: string;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect: boolean;\n}\n/**\n * A special interface for tools that accept a string input, usually defined with the {@link Tool} class.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\nexport interface ToolInterface<SchemaT = StringInputToolSchema, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends StructuredToolInterface<SchemaT, SchemaInputT, ToolOutputT> {\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument and callbacks. It handles\n * string inputs specifically.\n * @param arg The input argument for the tool, which can be a string, undefined, or an input of the tool's schema.\n * @param callbacks Optional callbacks for the tool.\n * @returns A Promise that resolves with a string.\n */\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(\n // TODO: shouldn't this be narrowed based on SchemaT?\n arg: TArg, callbacks?: TConfig): Promise<ToolReturnType<NonNullable<TArg>, TConfig, ToolOutputT>>;\n}\n/**\n * Base interface for the input parameters of the {@link DynamicTool} and\n * {@link DynamicStructuredTool} classes.\n */\nexport interface BaseDynamicToolInput extends ToolParams {\n name: string;\n description: string;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect?: boolean;\n}\n/**\n * Interface for the input parameters of the DynamicTool class.\n */\nexport interface DynamicToolInput<ToolOutputT = ToolOutputType> extends BaseDynamicToolInput {\n func: (input: string, runManager?: CallbackManagerForToolRun, config?: ToolRunnableConfig) => Promise<ToolOutputT>;\n}\n/**\n * Interface for the input parameters of the DynamicStructuredTool class.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaOutputT - The TypeScript type representing the result of applying the schema to the tool arguments. Useful for type checking tool handler functions when using JSONSchema.\n */\nexport interface DynamicStructuredToolInput<SchemaT = ToolInputSchemaBase, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, ToolOutputT = ToolOutputType> extends BaseDynamicToolInput {\n /**\n * Tool handler function - the function that will be called when the tool is invoked.\n *\n * @param input - The input to the tool.\n * @param runManager - The run manager for the tool.\n * @param config - The configuration for the tool.\n * @returns The result of the tool.\n */\n func: (input: SchemaOutputT, runManager?: CallbackManagerForToolRun, config?: RunnableConfig) => Promise<ToolOutputT>;\n schema: SchemaT;\n}\n/**\n * Confirm whether the inputted tool is an instance of `StructuredToolInterface`.\n *\n * @param {StructuredToolInterface | JSONSchema | undefined} tool The tool to check if it is an instance of `StructuredToolInterface`.\n * @returns {tool is StructuredToolInterface} Whether the inputted tool is an instance of `StructuredToolInterface`.\n */\nexport declare function isStructuredTool(tool?: StructuredToolInterface | ToolDefinition | JSONSchema): tool is StructuredToolInterface;\n/**\n * Confirm whether the inputted tool is an instance of `RunnableToolLike`.\n *\n * @param {unknown | undefined} tool The tool to check if it is an instance of `RunnableToolLike`.\n * @returns {tool is RunnableToolLike} Whether the inputted tool is an instance of `RunnableToolLike`.\n */\nexport declare function isRunnableToolLike(tool?: unknown): tool is RunnableToolLike;\n/**\n * Confirm whether or not the tool contains the necessary properties to be considered a `StructuredToolParams`.\n *\n * @param {unknown | undefined} tool The object to check if it is a `StructuredToolParams`.\n * @returns {tool is StructuredToolParams} Whether the inputted object is a `StructuredToolParams`.\n */\nexport declare function isStructuredToolParams(tool?: unknown): tool is StructuredToolParams;\n/**\n * Whether or not the tool is one of StructuredTool, RunnableTool or StructuredToolParams.\n * It returns `is StructuredToolParams` since that is the most minimal interface of the three,\n * while still containing the necessary properties to be passed to a LLM for tool calling.\n *\n * @param {unknown | undefined} tool The tool to check if it is a LangChain tool.\n * @returns {tool is StructuredToolParams} Whether the inputted tool is a LangChain tool.\n */\nexport declare function isLangChainTool(tool?: unknown): tool is StructuredToolParams;\n/**\n * Runtime context automatically injected into tools.\n *\n * When a tool function has a parameter named `tool_runtime` with type hint\n * `ToolRuntime`, the tool execution system will automatically inject an instance\n * containing:\n *\n * - `state`: The current graph state\n * - `toolCallId`: The ID of the current tool call\n * - `config`: `RunnableConfig` for the current execution\n * - `context`: Runtime context\n * - `store`: `BaseStore` instance for persistent storage\n * - `writer`: Stream writer for streaming output\n *\n * No `Annotated` wrapper is needed - just use `runtime: ToolRuntime`\n * as a parameter.\n *\n * @example\n * ```typescript\n * import { tool, ToolRuntime } from \"@langchain/core/tools\";\n * import { z } from \"zod\";\n *\n * const stateSchema = z.object({\n * messages: z.array(z.any()),\n * userId: z.string().optional(),\n * });\n *\n * const greet = tool(\n * async ({ name }, runtime) => {\n * // Access state\n * const messages = runtime.state.messages;\n *\n * // Access tool_call_id\n * console.log(`Tool call ID: ${runtime.toolCallId}`);\n *\n * // Access config\n * console.log(`Run ID: ${runtime.config.runId}`);\n *\n * // Access runtime context\n * const userId = runtime.context?.userId;\n *\n * // Access store\n * await runtime.store?.mset([[\"key\", \"value\"]]);\n *\n * // Stream output\n * runtime.writer?.(\"Processing...\");\n *\n * return `Hello! User ID: ${runtime.state.userId || \"unknown\"} ${name}`;\n * },\n * {\n * name: \"greet\",\n * description: \"Use this to greet the user once you found their info.\",\n * schema: z.object({ name: z.string() }),\n * stateSchema,\n * }\n * );\n * ```\n *\n * @template StateT - The type of the state schema (inferred from stateSchema)\n * @template ContextT - The type of the context schema (inferred from contextSchema)\n */\nexport type ToolRuntime<TState = unknown, TContext = unknown> = RunnableConfig & {\n /**\n * The current graph state.\n */\n state: TState extends InteropZodObject ? InferInteropZodOutput<TState> : TState extends Record<string, unknown> ? TState : unknown;\n /**\n * The ID of the current tool call.\n */\n toolCallId: string;\n /**\n * The current tool call.\n */\n toolCall?: ToolCall;\n /**\n * RunnableConfig for the current execution.\n */\n config: ToolRunnableConfig;\n /**\n * Runtime context (from langgraph `Runtime`).\n */\n context: TContext extends InteropZodObject ? InferInteropZodOutput<TContext> : TContext extends Record<string, unknown> ? TContext : unknown;\n /**\n * BaseStore instance for persistent storage (from langgraph `Runtime`).\n */\n store: BaseStore<string, unknown> | null;\n /**\n * Stream writer for streaming output (from langgraph `Runtime`).\n */\n writer: ((chunk: unknown) => void) | null;\n};\n"],"mappings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;;EAIoB,YAAoBsD,EAAAA,OAAAA;;;;;;;;AAgBlB9B,UApKnFmB,aAoKmFnB,CAAAA,UApK3DY,qBAoK2DZ,EAAAA,eApKrBQ,wBAoKqBR,CApKIU,OAoKJV,CAAAA,EAAAA,cApK4BV,cAoK5BU,CAAAA,SApKoDI,uBAoKpDJ,CApK4EU,OAoK5EV,EApKqFW,YAoKrFX,EApKmGgB,WAoKnGhB,CAAAA,CAAAA;EAAM;;AAItF;;;;;;;oBA9JES,wBAAwBC,SAASC,+BAA+BZ;;OAE7EkB,kBAAkBvB,UAAUwB,QAAQ1B,eAAe4B,YAAYH,OAAOvB,SAASsB;;;;;;UAMvEK,oBAAAA,SAA6BvB;;;;;;;;;;;;;;UAc7BwB,+BAA+BhC,wBAAwB+B;qCACjChD,oCAAoC0B,uBAAuBmB,QAAQF;;;;;;;;UAQzFO,qCAAqC3B,qCAAqCU,0BAA0BI,wBAAwBpB,wBAAwB+B;;;;;;;;;gBASnJG,4BAA4BnD,oCAAoCG,mBAAmB0C,QAAQF;UACjGN;;;;;;;;iBAQYe,gBAAAA,QAAwBrB,0BAA0B7B,iBAAiBY,0BAAqBiB;;;;;;;iBAOxFsB,kBAAAA,0BAA4CjD;;;;;;;iBAO5CkD,sBAAAA,0BAAgDxB;;;;;;;;;iBAShDyB,eAAAA,0BAAyCzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8DrD0B,oDAAoDrD;;;;SAIrDsD,eAAe5C,mBAAmBF,sBAAsB8C,UAAUA,eAAe9B,0BAA0B8B;;;;;;;;aAQvGlD;;;;UAIHmB;;;;WAICgC,iBAAiB7C,mBAAmBF,sBAAsB+C,YAAYA,iBAAiB/B,0BAA0B+B;;;;SAInH3C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","names":["z","z3","CallbackManagerForToolRun","BaseLangChainParams","ToolDefinition","RunnableConfig","RunnableToolLike","RunnableInterface","DirectToolOutput","ToolCall","ToolMessage","MessageContent","InferInteropZodInput","InferInteropZodOutput","InteropZodType","InteropZodObject","JSONSchema","BaseStore","ResponseFormat","ToolOutputType","ContentAndArtifact","ToolReturnType","TOutput","TConfig","TInput","ToolInputSchemaBase","ZodTypeAny","ToolParams","ToolRunnableConfig","Record","ConfigurableFieldType","ContextSchema","StructuredToolParams","StructuredToolInterface","Pick","ToolInputSchemaOutputType","T","ToolInputSchemaInputType","StructuredToolCallInput","SchemaT","SchemaInputT","StringInputToolSchema","ZodTypeDef","ZodType","ToolCallInput","ToolOutputT","TArg","Promise","ToolInterface","NonNullable","BaseDynamicToolInput","DynamicToolInput","DynamicStructuredToolInput","SchemaOutputT","isStructuredTool","isRunnableToolLike","isStructuredToolParams","isLangChainTool","ToolRuntime","TState","TContext"],"sources":["../../src/tools/types.d.ts"],"sourcesContent":["import type { z as z3 } from \"zod/v3\";\nimport { CallbackManagerForToolRun } from \"../callbacks/manager.js\";\nimport type { BaseLangChainParams, ToolDefinition } from \"../language_models/base.js\";\nimport type { RunnableConfig } from \"../runnables/config.js\";\nimport { RunnableToolLike, type RunnableInterface } from \"../runnables/base.js\";\nimport { type DirectToolOutput, type ToolCall, type ToolMessage } from \"../messages/tool.js\";\nimport type { MessageContent } from \"../messages/base.js\";\nimport { type InferInteropZodInput, type InferInteropZodOutput, type InteropZodType, type InteropZodObject } from \"../utils/types/zod.js\";\nimport { JSONSchema } from \"../utils/json_schema.js\";\nimport type { BaseStore } from \"../stores.js\";\nexport type ResponseFormat = \"content\" | \"content_and_artifact\" | string;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ToolOutputType = any;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ContentAndArtifact = [MessageContent, any];\n/**\n * Conditional type that determines the return type of the {@link StructuredTool.invoke} method.\n * - If the input is a ToolCall, it returns a ToolMessage\n * - If the config is a runnable config and contains a toolCall property, it returns a ToolMessage\n * - Otherwise, it returns the original output type\n */\nexport type ToolReturnType<TInput, TConfig, TOutput> = TOutput extends DirectToolOutput ? TOutput : TConfig extends {\n toolCall: {\n id: string;\n };\n} ? ToolMessage : TConfig extends {\n toolCall: {\n id: undefined;\n };\n} ? TOutput : TConfig extends {\n toolCall: {\n id?: string;\n };\n} ? TOutput | ToolMessage : TInput extends ToolCall ? ToolMessage : TOutput;\n/**\n * Base type that establishes the types of input schemas that can be used for LangChain tool\n * definitions.\n */\nexport type ToolInputSchemaBase = z3.ZodTypeAny | JSONSchema;\n/**\n * Parameters for the Tool classes.\n */\nexport interface ToolParams extends BaseLangChainParams {\n /**\n * The tool response format.\n *\n * If \"content\" then the output of the tool is interpreted as the contents of a\n * ToolMessage. If \"content_and_artifact\" then the output is expected to be a\n * two-tuple corresponding to the (content, artifact) of a ToolMessage.\n *\n * @default \"content\"\n */\n responseFormat?: ResponseFormat;\n /**\n * Default config object for the tool runnable.\n */\n defaultConfig?: ToolRunnableConfig;\n /**\n * Whether to show full details in the thrown parsing errors.\n *\n * @default false\n */\n verboseParsingErrors?: boolean;\n /**\n * Metadata for the tool.\n */\n metadata?: Record<string, unknown>;\n}\nexport type ToolRunnableConfig<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nConfigurableFieldType extends Record<string, any> = Record<string, any>, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nContextSchema = any> = RunnableConfig<ConfigurableFieldType> & {\n toolCall?: ToolCall;\n context?: ContextSchema;\n};\n/**\n * Schema for defining tools.\n *\n * @version 0.2.19\n */\nexport interface StructuredToolParams extends Pick<StructuredToolInterface, \"name\" | \"schema\"> {\n /**\n * An optional description of the tool to pass to the model.\n */\n description?: string;\n}\n/**\n * Utility type that resolves the output type of a tool input schema.\n *\n * Input & Output types are a concept used with Zod schema, as Zod allows for transforms to occur\n * during parsing. When using JSONSchema, input and output types are the same.\n *\n * The input type for a given schema should match the structure of the arguments that the LLM\n * generates as part of its {@link ToolCall}. The output type will be the type that results from\n * applying any transforms defined in your schema. If there are no transforms, the input and output\n * types will be the same.\n */\nexport type ToolInputSchemaOutputType<T> = T extends InteropZodType ? InferInteropZodOutput<T> : T extends JSONSchema ? unknown : never;\n/**\n * Utility type that resolves the input type of a tool input schema.\n *\n * Input & Output types are a concept used with Zod schema, as Zod allows for transforms to occur\n * during parsing. When using JSONSchema, input and output types are the same.\n *\n * The input type for a given schema should match the structure of the arguments that the LLM\n * generates as part of its {@link ToolCall}. The output type will be the type that results from\n * applying any transforms defined in your schema. If there are no transforms, the input and output\n * types will be the same.\n */\nexport type ToolInputSchemaInputType<T> = T extends InteropZodType ? InferInteropZodInput<T> : T extends JSONSchema ? unknown : never;\n/**\n * Defines the type that will be passed into a tool handler function as a result of a tool call.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\nexport type StructuredToolCallInput<SchemaT = ToolInputSchemaBase, SchemaInputT = ToolInputSchemaInputType<SchemaT>> = (ToolInputSchemaOutputType<SchemaT> extends string ? string : never) | SchemaInputT | ToolCall;\n/**\n * An input schema type for tools that accept a single string input.\n *\n * This schema defines a tool that takes an optional string parameter named \"input\".\n * It uses Zod's effects to transform the input and strip any extra properties.\n *\n * This is primarily used for creating simple string-based tools where the LLM\n * only needs to provide a single text value as input to the tool.\n */\nexport type StringInputToolSchema = z3.ZodType<string | undefined, z3.ZodTypeDef, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nany>;\n/**\n * Defines the type for input to a tool's call method.\n *\n * This type is a convenience alias for StructuredToolCallInput with the input type\n * derived from the schema. It represents the possible inputs that can be passed to a tool,\n * which can be either:\n * - A string (if the tool accepts string input)\n * - A structured input matching the tool's schema\n * - A ToolCall object (typically from an LLM)\n *\n * @param SchemaT - The schema type for the tool input, defaults to StringInputToolSchema\n */\nexport type ToolCallInput<SchemaT = StringInputToolSchema> = StructuredToolCallInput<SchemaT, ToolInputSchemaInputType<SchemaT>>;\n/**\n * Interface that defines the shape of a LangChain structured tool.\n *\n * A structured tool is a tool that uses a schema to define the structure of the arguments that the\n * LLM generates as part of its {@link ToolCall}.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\nexport interface StructuredToolInterface<SchemaT = ToolInputSchemaBase, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends RunnableInterface<StructuredToolCallInput<SchemaT, SchemaInputT>, ToolOutputT | ToolMessage> {\n lc_namespace: string[];\n /**\n * A Zod schema representing the parameters of the tool.\n */\n schema: SchemaT;\n /**\n * Invokes the tool with the provided argument and configuration.\n * @param arg The input argument for the tool.\n * @param configArg Optional configuration for the tool call.\n * @returns A Promise that resolves with the tool's output.\n */\n invoke<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig): Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>;\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument, configuration, and tags. It\n * parses the input according to the schema, handles any errors, and\n * manages callbacks.\n * @param arg The input argument for the tool.\n * @param configArg Optional configuration or callbacks for the tool.\n * @param tags Optional tags for the tool.\n * @returns A Promise that resolves with a string.\n */\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig, \n /** @deprecated */\n tags?: string[]): Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>;\n /**\n * The name of the tool.\n */\n name: string;\n /**\n * A description of the tool.\n */\n description: string;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect: boolean;\n}\n/**\n * A special interface for tools that accept a string input, usually defined with the {@link Tool} class.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\nexport interface ToolInterface<SchemaT = StringInputToolSchema, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends StructuredToolInterface<SchemaT, SchemaInputT, ToolOutputT> {\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument and callbacks. It handles\n * string inputs specifically.\n * @param arg The input argument for the tool, which can be a string, undefined, or an input of the tool's schema.\n * @param callbacks Optional callbacks for the tool.\n * @returns A Promise that resolves with a string.\n */\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(\n // TODO: shouldn't this be narrowed based on SchemaT?\n arg: TArg, callbacks?: TConfig): Promise<ToolReturnType<NonNullable<TArg>, TConfig, ToolOutputT>>;\n}\n/**\n * Base interface for the input parameters of the {@link DynamicTool} and\n * {@link DynamicStructuredTool} classes.\n */\nexport interface BaseDynamicToolInput extends ToolParams {\n name: string;\n description: string;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect?: boolean;\n}\n/**\n * Interface for the input parameters of the DynamicTool class.\n */\nexport interface DynamicToolInput<ToolOutputT = ToolOutputType> extends BaseDynamicToolInput {\n func: (input: string, runManager?: CallbackManagerForToolRun, config?: ToolRunnableConfig) => Promise<ToolOutputT>;\n}\n/**\n * Interface for the input parameters of the DynamicStructuredTool class.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaOutputT - The TypeScript type representing the result of applying the schema to the tool arguments. Useful for type checking tool handler functions when using JSONSchema.\n */\nexport interface DynamicStructuredToolInput<SchemaT = ToolInputSchemaBase, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, ToolOutputT = ToolOutputType> extends BaseDynamicToolInput {\n /**\n * Tool handler function - the function that will be called when the tool is invoked.\n *\n * @param input - The input to the tool.\n * @param runManager - The run manager for the tool.\n * @param config - The configuration for the tool.\n * @returns The result of the tool.\n */\n func: (input: SchemaOutputT, runManager?: CallbackManagerForToolRun, config?: RunnableConfig) => Promise<ToolOutputT>;\n schema: SchemaT;\n}\n/**\n * Confirm whether the inputted tool is an instance of `StructuredToolInterface`.\n *\n * @param {StructuredToolInterface | JSONSchema | undefined} tool The tool to check if it is an instance of `StructuredToolInterface`.\n * @returns {tool is StructuredToolInterface} Whether the inputted tool is an instance of `StructuredToolInterface`.\n */\nexport declare function isStructuredTool(tool?: StructuredToolInterface | ToolDefinition | JSONSchema): tool is StructuredToolInterface;\n/**\n * Confirm whether the inputted tool is an instance of `RunnableToolLike`.\n *\n * @param {unknown | undefined} tool The tool to check if it is an instance of `RunnableToolLike`.\n * @returns {tool is RunnableToolLike} Whether the inputted tool is an instance of `RunnableToolLike`.\n */\nexport declare function isRunnableToolLike(tool?: unknown): tool is RunnableToolLike;\n/**\n * Confirm whether or not the tool contains the necessary properties to be considered a `StructuredToolParams`.\n *\n * @param {unknown | undefined} tool The object to check if it is a `StructuredToolParams`.\n * @returns {tool is StructuredToolParams} Whether the inputted object is a `StructuredToolParams`.\n */\nexport declare function isStructuredToolParams(tool?: unknown): tool is StructuredToolParams;\n/**\n * Whether or not the tool is one of StructuredTool, RunnableTool or StructuredToolParams.\n * It returns `is StructuredToolParams` since that is the most minimal interface of the three,\n * while still containing the necessary properties to be passed to a LLM for tool calling.\n *\n * @param {unknown | undefined} tool The tool to check if it is a LangChain tool.\n * @returns {tool is StructuredToolParams} Whether the inputted tool is a LangChain tool.\n */\nexport declare function isLangChainTool(tool?: unknown): tool is StructuredToolParams;\n/**\n * Runtime context automatically injected into tools.\n *\n * When a tool function has a parameter named `tool_runtime` with type hint\n * `ToolRuntime`, the tool execution system will automatically inject an instance\n * containing:\n *\n * - `state`: The current graph state\n * - `toolCallId`: The ID of the current tool call\n * - `config`: `RunnableConfig` for the current execution\n * - `context`: Runtime context\n * - `store`: `BaseStore` instance for persistent storage\n * - `writer`: Stream writer for streaming output\n *\n * No `Annotated` wrapper is needed - just use `runtime: ToolRuntime`\n * as a parameter.\n *\n * @example\n * ```typescript\n * import { tool, ToolRuntime } from \"@langchain/core/tools\";\n * import { z } from \"zod\";\n *\n * const stateSchema = z.object({\n * messages: z.array(z.any()),\n * userId: z.string().optional(),\n * });\n *\n * const greet = tool(\n * async ({ name }, runtime) => {\n * // Access state\n * const messages = runtime.state.messages;\n *\n * // Access tool_call_id\n * console.log(`Tool call ID: ${runtime.toolCallId}`);\n *\n * // Access config\n * console.log(`Run ID: ${runtime.config.runId}`);\n *\n * // Access runtime context\n * const userId = runtime.context?.userId;\n *\n * // Access store\n * await runtime.store?.mset([[\"key\", \"value\"]]);\n *\n * // Stream output\n * runtime.writer?.(\"Processing...\");\n *\n * return `Hello! User ID: ${runtime.state.userId || \"unknown\"} ${name}`;\n * },\n * {\n * name: \"greet\",\n * description: \"Use this to greet the user once you found their info.\",\n * schema: z.object({ name: z.string() }),\n * stateSchema,\n * }\n * );\n * ```\n *\n * @template StateT - The type of the state schema (inferred from stateSchema)\n * @template ContextT - The type of the context schema (inferred from contextSchema)\n */\nexport type ToolRuntime<TState = unknown, TContext = unknown> = RunnableConfig & {\n /**\n * The current graph state.\n */\n state: TState extends InteropZodObject ? InferInteropZodOutput<TState> : TState extends Record<string, unknown> ? TState : unknown;\n /**\n * The ID of the current tool call.\n */\n toolCallId: string;\n /**\n * The current tool call.\n */\n toolCall?: ToolCall;\n /**\n * RunnableConfig for the current execution.\n */\n config: ToolRunnableConfig;\n /**\n * Runtime context (from langgraph `Runtime`).\n */\n context: TContext extends InteropZodObject ? InferInteropZodOutput<TContext> : TContext extends Record<string, unknown> ? TContext : unknown;\n /**\n * BaseStore instance for persistent storage (from langgraph `Runtime`).\n */\n store: BaseStore<string, unknown> | null;\n /**\n * Stream writer for streaming output (from langgraph `Runtime`).\n */\n writer: ((chunk: unknown) => void) | null;\n};\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AAc;;;;;;EAIoB,YAAoBsD,EAAAA,OAAAA;;;;;;;;AAgBlB9B,UApKnFmB,aAoKmFnB,CAAAA,UApK3DY,qBAoK2DZ,EAAAA,eApKrBQ,wBAoKqBR,CApKIU,OAoKJV,CAAAA,EAAAA,cApK4BV,cAoK5BU,CAAAA,SApKoDI,uBAoKpDJ,CApK4EU,OAoK5EV,EApKqFW,YAoKrFX,EApKmGgB,WAoKnGhB,CAAAA,CAAAA;EAAM;;AAItF;;;;;;;oBA9JES,wBAAwBC,SAASC,+BAA+BZ;;OAE7EkB,kBAAkBvB,UAAUwB,QAAQ1B,eAAe4B,YAAYH,OAAOvB,SAASsB;;;;;;UAMvEK,oBAAAA,SAA6BvB;;;;;;;;;;;;;;UAc7BwB,+BAA+BhC,wBAAwB+B;qCACjChD,oCAAoC0B,uBAAuBmB,QAAQF;;;;;;;;UAQzFO,qCAAqC3B,qCAAqCU,0BAA0BI,wBAAwBpB,wBAAwB+B;;;;;;;;;gBASnJG,4BAA4BnD,oCAAoCG,mBAAmB0C,QAAQF;UACjGN;;;;;;;;iBAQYe,gBAAAA,QAAwBrB,0BAA0B7B,iBAAiBY,0BAAqBiB;;;;;;;iBAOxFsB,kBAAAA,0BAA4CjD;;;;;;;iBAO5CkD,sBAAAA,0BAAgDxB;;;;;;;;;iBAShDyB,eAAAA,0BAAyCzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8DrD0B,oDAAoDrD;;;;SAIrDsD,eAAe5C,mBAAmBF,sBAAsB8C,UAAUA,eAAe9B,0BAA0B8B;;;;;;;;aAQvGlD;;;;UAIHmB;;;;WAICgC,iBAAiB7C,mBAAmBF,sBAAsB+C,YAAYA,iBAAiB/B,0BAA0B+B;;;;SAInH3C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.cts","names":["ToolCall","_isToolCall","_configHasToolCallId","ToolInputParsingException","Error"],"sources":["../../src/tools/utils.d.ts"],"sourcesContent":["import { ToolCall } from \"../messages/tool.js\";\nexport declare function _isToolCall(toolCall?: unknown): toolCall is ToolCall;\nexport declare function _configHasToolCallId(config?: unknown): config is {\n toolCall: {\n id?: string;\n };\n};\n/**\n * Custom error class used to handle exceptions related to tool input parsing.\n * It extends the built-in `Error` class and adds an optional `output`\n * property that can hold the output that caused the exception.\n */\nexport declare class ToolInputParsingException extends Error {\n output?: string;\n constructor(message: string, output?: string);\n}\n"],"mappings":";;;;;;;cAYqBG,yBAAAA,SAAkCC,KAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","names":["ToolCall","_isToolCall","_configHasToolCallId","ToolInputParsingException","Error"],"sources":["../../src/tools/utils.d.ts"],"sourcesContent":["import { ToolCall } from \"../messages/tool.js\";\nexport declare function _isToolCall(toolCall?: unknown): toolCall is ToolCall;\nexport declare function _configHasToolCallId(config?: unknown): config is {\n toolCall: {\n id?: string;\n };\n};\n/**\n * Custom error class used to handle exceptions related to tool input parsing.\n * It extends the built-in `Error` class and adds an optional `output`\n * property that can hold the output that caused the exception.\n */\nexport declare class ToolInputParsingException extends Error {\n output?: string;\n constructor(message: string, output?: string);\n}\n"],"mappings":";;;;;;;cAYqBG,yBAAAA,SAAkCC,KAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.cts","names":["KVMap","BaseRun","RunTree","ChainValues","AgentAction","AgentFinish","LLMResult","BaseMessage","Serialized","BaseCallbackHandler","BaseCallbackHandlerInput","HandleLLMNewTokenCallbackFields","NewTokenIndices","Document","RunType","Run","Record","Array","AgentRun","isBaseTracer","BaseTracer","Map","Promise","langsmith_schemas0","Attachments"],"sources":["../../src/tracers/base.d.ts"],"sourcesContent":["import { KVMap, BaseRun } from \"langsmith/schemas\";\nimport { RunTree } from \"langsmith/run_trees\";\nimport type { ChainValues } from \"../utils/types/index.js\";\nimport type { AgentAction, AgentFinish } from \"../agents.js\";\nimport type { LLMResult } from \"../outputs.js\";\nimport type { BaseMessage } from \"../messages/base.js\";\nimport { Serialized } from \"../load/serializable.js\";\nimport { BaseCallbackHandler, BaseCallbackHandlerInput, HandleLLMNewTokenCallbackFields, NewTokenIndices } from \"../callbacks/base.js\";\nimport type { Document } from \"../documents/document.js\";\nexport type RunType = string;\n// TODO: Remove this type and just use the base LangSmith Run type.\nexport interface Run extends BaseRun {\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: this[];\n child_execution_order: number;\n events: Array<{\n name: string;\n time: string;\n kwargs?: Record<string, unknown>;\n }>;\n trace_id?: string;\n dotted_order?: string;\n /** @internal */\n _serialized_start_time?: string;\n}\nexport interface AgentRun extends Run {\n actions: AgentAction[];\n}\nexport declare function isBaseTracer(x: BaseCallbackHandler): x is BaseTracer;\nexport declare abstract class BaseTracer extends BaseCallbackHandler {\n /** @deprecated Use `runTreeMap` instead. */\n protected runMap: Map<string, Run>;\n protected runTreeMap: Map<string, RunTree>;\n protected usesRunTreeMap: boolean;\n constructor(_fields?: BaseCallbackHandlerInput);\n copy(): this;\n protected getRunById(runId?: string): Run | undefined;\n protected stringifyError(error: unknown): string;\n protected abstract persistRun(run: Run): Promise<void>;\n protected _addChildRun(parentRun: Run, childRun: Run): void;\n _addRunToRunMap(run: Run): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n protected _endTrace(run: Run): Promise<void>;\n protected _getExecutionOrder(parentRunId: string | undefined): number;\n /**\n * Create and add a run to the run map for LLM start events.\n * This must sometimes be done synchronously to avoid race conditions\n * when callbacks are backgrounded, so we expose it as a separate method here.\n */\n _createRunForLLMStart(llm: Serialized, prompts: string[], runId: string, parentRunId?: string, extraParams?: KVMap, tags?: string[], metadata?: KVMap, name?: string): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n handleLLMStart(llm: Serialized, prompts: string[], runId: string, parentRunId?: string, extraParams?: KVMap, tags?: string[], metadata?: KVMap, name?: string): Promise<Run>;\n /**\n * Create and add a run to the run map for chat model start events.\n * This must sometimes be done synchronously to avoid race conditions\n * when callbacks are backgrounded, so we expose it as a separate method here.\n */\n _createRunForChatModelStart(llm: Serialized, messages: BaseMessage[][], runId: string, parentRunId?: string, extraParams?: KVMap, tags?: string[], metadata?: KVMap, name?: string): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n handleChatModelStart(llm: Serialized, messages: BaseMessage[][], runId: string, parentRunId?: string, extraParams?: KVMap, tags?: string[], metadata?: KVMap, name?: string): Promise<Run>;\n handleLLMEnd(output: LLMResult, runId: string, _parentRunId?: string, _tags?: string[], extraParams?: Record<string, unknown>): Promise<Run>;\n handleLLMError(error: unknown, runId: string, _parentRunId?: string, _tags?: string[], extraParams?: Record<string, unknown>): Promise<Run>;\n /**\n * Create and add a run to the run map for chain start events.\n * This must sometimes be done synchronously to avoid race conditions\n * when callbacks are backgrounded, so we expose it as a separate method here.\n */\n _createRunForChainStart(chain: Serialized, inputs: ChainValues, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, runType?: string, name?: string): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n handleChainStart(chain: Serialized, inputs: ChainValues, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, runType?: string, name?: string): Promise<Run>;\n handleChainEnd(outputs: ChainValues, runId: string, _parentRunId?: string, _tags?: string[], kwargs?: {\n inputs?: Record<string, unknown>;\n }): Promise<Run>;\n handleChainError(error: unknown, runId: string, _parentRunId?: string, _tags?: string[], kwargs?: {\n inputs?: Record<string, unknown>;\n }): Promise<Run>;\n /**\n * Create and add a run to the run map for tool start events.\n * This must sometimes be done synchronously to avoid race conditions\n * when callbacks are backgrounded, so we expose it as a separate method here.\n */\n _createRunForToolStart(tool: Serialized, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, name?: string): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n handleToolStart(tool: Serialized, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, name?: string): Promise<Run>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handleToolEnd(output: any, runId: string): Promise<Run>;\n handleToolError(error: unknown, runId: string): Promise<Run>;\n handleAgentAction(action: AgentAction, runId: string): Promise<void>;\n handleAgentEnd(action: AgentFinish, runId: string): Promise<void>;\n /**\n * Create and add a run to the run map for retriever start events.\n * This must sometimes be done synchronously to avoid race conditions\n * when callbacks are backgrounded, so we expose it as a separate method here.\n */\n _createRunForRetrieverStart(retriever: Serialized, query: string, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, name?: string): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n handleRetrieverStart(retriever: Serialized, query: string, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, name?: string): Promise<Run>;\n handleRetrieverEnd(documents: Document<Record<string, unknown>>[], runId: string): Promise<Run>;\n handleRetrieverError(error: unknown, runId: string): Promise<Run>;\n handleText(text: string, runId: string): Promise<void>;\n handleLLMNewToken(token: string, idx: NewTokenIndices, runId: string, _parentRunId?: string, _tags?: string[], fields?: HandleLLMNewTokenCallbackFields): Promise<Run>;\n // custom event handlers\n onRunCreate?(run: Run): void | Promise<void>;\n onRunUpdate?(run: Run): void | Promise<void>;\n onLLMStart?(run: Run): void | Promise<void>;\n onLLMEnd?(run: Run): void | Promise<void>;\n onLLMError?(run: Run): void | Promise<void>;\n onChainStart?(run: Run): void | Promise<void>;\n onChainEnd?(run: Run): void | Promise<void>;\n onChainError?(run: Run): void | Promise<void>;\n onToolStart?(run: Run): void | Promise<void>;\n onToolEnd?(run: Run): void | Promise<void>;\n onToolError?(run: Run): void | Promise<void>;\n onAgentAction?(run: Run): void | Promise<void>;\n onAgentEnd?(run: Run): void | Promise<void>;\n onRetrieverStart?(run: Run): void | Promise<void>;\n onRetrieverEnd?(run: Run): void | Promise<void>;\n onRetrieverError?(run: Run): void | Promise<void>;\n onText?(run: Run): void | Promise<void>;\n onLLMNewToken?(run: Run, token: string, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n kwargs?: {\n chunk: any;\n }): void | Promise<void>;\n}\n"],"mappings":";;;;;;;;;;;;KASYc,OAAAA;;UAEKC,GAAAA,SAAYd;EAFjBa;EAEKC,EAAAA,EAAAA,MAAG;EAAA,UAAA,EAAA,MAAA;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