@langchain/classic 1.0.17 → 1.0.18

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 (1628) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +24 -13
  3. package/dist/_virtual/_rolldown/runtime.js +36 -0
  4. package/dist/agents/agent.cjs +9 -11
  5. package/dist/agents/agent.cjs.map +1 -1
  6. package/dist/agents/agent.d.cts +0 -1
  7. package/dist/agents/agent.d.cts.map +1 -1
  8. package/dist/agents/agent.d.ts +2 -3
  9. package/dist/agents/agent.d.ts.map +1 -1
  10. package/dist/agents/agent.js +1 -3
  11. package/dist/agents/agent.js.map +1 -1
  12. package/dist/agents/chat/index.cjs +11 -15
  13. package/dist/agents/chat/index.cjs.map +1 -1
  14. package/dist/agents/chat/index.d.cts +0 -1
  15. package/dist/agents/chat/index.d.cts.map +1 -1
  16. package/dist/agents/chat/index.d.ts +0 -1
  17. package/dist/agents/chat/index.d.ts.map +1 -1
  18. package/dist/agents/chat/index.js +7 -11
  19. package/dist/agents/chat/index.js.map +1 -1
  20. package/dist/agents/chat/outputParser.cjs +4 -5
  21. package/dist/agents/chat/outputParser.cjs.map +1 -1
  22. package/dist/agents/chat/outputParser.d.cts +2 -3
  23. package/dist/agents/chat/outputParser.d.cts.map +1 -1
  24. package/dist/agents/chat/outputParser.d.ts +0 -1
  25. package/dist/agents/chat/outputParser.d.ts.map +1 -1
  26. package/dist/agents/chat/outputParser.js +1 -2
  27. package/dist/agents/chat/outputParser.js.map +1 -1
  28. package/dist/agents/chat/prompt.cjs.map +1 -1
  29. package/dist/agents/chat/prompt.js.map +1 -1
  30. package/dist/agents/chat_convo/index.cjs +21 -25
  31. package/dist/agents/chat_convo/index.cjs.map +1 -1
  32. package/dist/agents/chat_convo/index.d.cts +0 -1
  33. package/dist/agents/chat_convo/index.d.cts.map +1 -1
  34. package/dist/agents/chat_convo/index.d.ts +1 -2
  35. package/dist/agents/chat_convo/index.d.ts.map +1 -1
  36. package/dist/agents/chat_convo/index.js +11 -15
  37. package/dist/agents/chat_convo/index.js.map +1 -1
  38. package/dist/agents/chat_convo/outputParser.cjs +10 -13
  39. package/dist/agents/chat_convo/outputParser.cjs.map +1 -1
  40. package/dist/agents/chat_convo/outputParser.d.cts.map +1 -1
  41. package/dist/agents/chat_convo/outputParser.d.ts.map +1 -1
  42. package/dist/agents/chat_convo/outputParser.js +4 -7
  43. package/dist/agents/chat_convo/outputParser.js.map +1 -1
  44. package/dist/agents/chat_convo/prompt.cjs.map +1 -1
  45. package/dist/agents/chat_convo/prompt.js.map +1 -1
  46. package/dist/agents/executor.cjs +25 -33
  47. package/dist/agents/executor.cjs.map +1 -1
  48. package/dist/agents/executor.d.cts +0 -1
  49. package/dist/agents/executor.d.cts.map +1 -1
  50. package/dist/agents/executor.d.ts +0 -1
  51. package/dist/agents/executor.d.ts.map +1 -1
  52. package/dist/agents/executor.js +11 -19
  53. package/dist/agents/executor.js.map +1 -1
  54. package/dist/agents/format_scratchpad/log.cjs +4 -5
  55. package/dist/agents/format_scratchpad/log.cjs.map +1 -1
  56. package/dist/agents/format_scratchpad/log.d.cts +0 -1
  57. package/dist/agents/format_scratchpad/log.d.cts.map +1 -1
  58. package/dist/agents/format_scratchpad/log.d.ts +0 -1
  59. package/dist/agents/format_scratchpad/log.d.ts.map +1 -1
  60. package/dist/agents/format_scratchpad/log.js +3 -5
  61. package/dist/agents/format_scratchpad/log.js.map +1 -1
  62. package/dist/agents/format_scratchpad/log_to_message.cjs +8 -9
  63. package/dist/agents/format_scratchpad/log_to_message.cjs.map +1 -1
  64. package/dist/agents/format_scratchpad/log_to_message.d.cts.map +1 -1
  65. package/dist/agents/format_scratchpad/log_to_message.d.ts.map +1 -1
  66. package/dist/agents/format_scratchpad/log_to_message.js +4 -6
  67. package/dist/agents/format_scratchpad/log_to_message.js.map +1 -1
  68. package/dist/agents/format_scratchpad/openai_functions.cjs +9 -11
  69. package/dist/agents/format_scratchpad/openai_functions.cjs.map +1 -1
  70. package/dist/agents/format_scratchpad/openai_functions.d.cts +0 -1
  71. package/dist/agents/format_scratchpad/openai_functions.d.cts.map +1 -1
  72. package/dist/agents/format_scratchpad/openai_functions.d.ts +0 -1
  73. package/dist/agents/format_scratchpad/openai_functions.d.ts.map +1 -1
  74. package/dist/agents/format_scratchpad/openai_functions.js +5 -8
  75. package/dist/agents/format_scratchpad/openai_functions.js.map +1 -1
  76. package/dist/agents/format_scratchpad/openai_tools.cjs +3 -3
  77. package/dist/agents/format_scratchpad/openai_tools.js +2 -3
  78. package/dist/agents/format_scratchpad/tool_calling.cjs +8 -10
  79. package/dist/agents/format_scratchpad/tool_calling.cjs.map +1 -1
  80. package/dist/agents/format_scratchpad/tool_calling.d.cts +0 -1
  81. package/dist/agents/format_scratchpad/tool_calling.d.cts.map +1 -1
  82. package/dist/agents/format_scratchpad/tool_calling.d.ts +0 -1
  83. package/dist/agents/format_scratchpad/tool_calling.d.ts.map +1 -1
  84. package/dist/agents/format_scratchpad/tool_calling.js +5 -7
  85. package/dist/agents/format_scratchpad/tool_calling.js.map +1 -1
  86. package/dist/agents/format_scratchpad/xml.cjs +3 -3
  87. package/dist/agents/format_scratchpad/xml.cjs.map +1 -1
  88. package/dist/agents/format_scratchpad/xml.d.cts.map +1 -1
  89. package/dist/agents/format_scratchpad/xml.d.ts.map +1 -1
  90. package/dist/agents/format_scratchpad/xml.js +2 -3
  91. package/dist/agents/format_scratchpad/xml.js.map +1 -1
  92. package/dist/agents/helpers.cjs +2 -2
  93. package/dist/agents/helpers.cjs.map +1 -1
  94. package/dist/agents/helpers.js +2 -2
  95. package/dist/agents/helpers.js.map +1 -1
  96. package/dist/agents/index.cjs +6 -6
  97. package/dist/agents/index.js +2 -3
  98. package/dist/agents/initialize.cjs +12 -16
  99. package/dist/agents/initialize.cjs.map +1 -1
  100. package/dist/agents/initialize.d.cts +8 -2
  101. package/dist/agents/initialize.d.cts.map +1 -1
  102. package/dist/agents/initialize.d.ts +8 -2
  103. package/dist/agents/initialize.d.ts.map +1 -1
  104. package/dist/agents/initialize.js +12 -16
  105. package/dist/agents/initialize.js.map +1 -1
  106. package/dist/agents/load.cjs +5 -5
  107. package/dist/agents/load.cjs.map +1 -1
  108. package/dist/agents/load.d.cts +8 -2
  109. package/dist/agents/load.d.cts.map +1 -1
  110. package/dist/agents/load.d.ts +8 -2
  111. package/dist/agents/load.d.ts.map +1 -1
  112. package/dist/agents/load.js +4 -5
  113. package/dist/agents/load.js.map +1 -1
  114. package/dist/agents/mrkl/index.cjs +16 -21
  115. package/dist/agents/mrkl/index.cjs.map +1 -1
  116. package/dist/agents/mrkl/index.d.cts +0 -1
  117. package/dist/agents/mrkl/index.d.cts.map +1 -1
  118. package/dist/agents/mrkl/index.d.ts +0 -1
  119. package/dist/agents/mrkl/index.d.ts.map +1 -1
  120. package/dist/agents/mrkl/index.js +13 -18
  121. package/dist/agents/mrkl/index.js.map +1 -1
  122. package/dist/agents/mrkl/outputParser.cjs +4 -5
  123. package/dist/agents/mrkl/outputParser.cjs.map +1 -1
  124. package/dist/agents/mrkl/outputParser.d.cts +1 -2
  125. package/dist/agents/mrkl/outputParser.d.cts.map +1 -1
  126. package/dist/agents/mrkl/outputParser.d.ts +0 -1
  127. package/dist/agents/mrkl/outputParser.d.ts.map +1 -1
  128. package/dist/agents/mrkl/outputParser.js +1 -2
  129. package/dist/agents/mrkl/outputParser.js.map +1 -1
  130. package/dist/agents/mrkl/prompt.cjs.map +1 -1
  131. package/dist/agents/mrkl/prompt.js.map +1 -1
  132. package/dist/agents/openai/output_parser.cjs +3 -3
  133. package/dist/agents/openai/output_parser.js +2 -3
  134. package/dist/agents/openai_functions/index.cjs +22 -25
  135. package/dist/agents/openai_functions/index.cjs.map +1 -1
  136. package/dist/agents/openai_functions/index.d.cts +2 -5
  137. package/dist/agents/openai_functions/index.d.cts.map +1 -1
  138. package/dist/agents/openai_functions/index.d.ts +3 -6
  139. package/dist/agents/openai_functions/index.d.ts.map +1 -1
  140. package/dist/agents/openai_functions/index.js +8 -11
  141. package/dist/agents/openai_functions/index.js.map +1 -1
  142. package/dist/agents/openai_functions/output_parser.cjs +5 -5
  143. package/dist/agents/openai_functions/output_parser.cjs.map +1 -1
  144. package/dist/agents/openai_functions/output_parser.d.cts +0 -1
  145. package/dist/agents/openai_functions/output_parser.d.cts.map +1 -1
  146. package/dist/agents/openai_functions/output_parser.d.ts +1 -2
  147. package/dist/agents/openai_functions/output_parser.d.ts.map +1 -1
  148. package/dist/agents/openai_functions/output_parser.js +1 -1
  149. package/dist/agents/openai_functions/output_parser.js.map +1 -1
  150. package/dist/agents/openai_functions/prompt.cjs.map +1 -1
  151. package/dist/agents/openai_functions/prompt.js.map +1 -1
  152. package/dist/agents/openai_tools/index.cjs +8 -9
  153. package/dist/agents/openai_tools/index.cjs.map +1 -1
  154. package/dist/agents/openai_tools/index.d.cts +4 -6
  155. package/dist/agents/openai_tools/index.d.cts.map +1 -1
  156. package/dist/agents/openai_tools/index.d.ts +4 -6
  157. package/dist/agents/openai_tools/index.d.ts.map +1 -1
  158. package/dist/agents/openai_tools/index.js +3 -4
  159. package/dist/agents/openai_tools/index.js.map +1 -1
  160. package/dist/agents/openai_tools/output_parser.cjs +5 -6
  161. package/dist/agents/openai_tools/output_parser.cjs.map +1 -1
  162. package/dist/agents/openai_tools/output_parser.d.cts +0 -1
  163. package/dist/agents/openai_tools/output_parser.d.cts.map +1 -1
  164. package/dist/agents/openai_tools/output_parser.d.ts +1 -2
  165. package/dist/agents/openai_tools/output_parser.d.ts.map +1 -1
  166. package/dist/agents/openai_tools/output_parser.js +1 -2
  167. package/dist/agents/openai_tools/output_parser.js.map +1 -1
  168. package/dist/agents/react/index.cjs +5 -6
  169. package/dist/agents/react/index.cjs.map +1 -1
  170. package/dist/agents/react/index.d.cts +3 -5
  171. package/dist/agents/react/index.d.cts.map +1 -1
  172. package/dist/agents/react/index.d.ts +3 -5
  173. package/dist/agents/react/index.d.ts.map +1 -1
  174. package/dist/agents/react/index.js +2 -3
  175. package/dist/agents/react/index.js.map +1 -1
  176. package/dist/agents/react/output_parser.cjs +15 -22
  177. package/dist/agents/react/output_parser.cjs.map +1 -1
  178. package/dist/agents/react/output_parser.d.cts +0 -1
  179. package/dist/agents/react/output_parser.d.cts.map +1 -1
  180. package/dist/agents/react/output_parser.d.ts +0 -1
  181. package/dist/agents/react/output_parser.d.ts.map +1 -1
  182. package/dist/agents/react/output_parser.js +9 -17
  183. package/dist/agents/react/output_parser.js.map +1 -1
  184. package/dist/agents/react/prompt.cjs.map +1 -1
  185. package/dist/agents/react/prompt.js.map +1 -1
  186. package/dist/agents/structured_chat/index.cjs +26 -29
  187. package/dist/agents/structured_chat/index.cjs.map +1 -1
  188. package/dist/agents/structured_chat/index.d.cts +1 -4
  189. package/dist/agents/structured_chat/index.d.cts.map +1 -1
  190. package/dist/agents/structured_chat/index.d.ts +3 -6
  191. package/dist/agents/structured_chat/index.d.ts.map +1 -1
  192. package/dist/agents/structured_chat/index.js +12 -15
  193. package/dist/agents/structured_chat/index.js.map +1 -1
  194. package/dist/agents/structured_chat/outputParser.cjs +10 -13
  195. package/dist/agents/structured_chat/outputParser.cjs.map +1 -1
  196. package/dist/agents/structured_chat/outputParser.d.cts +0 -1
  197. package/dist/agents/structured_chat/outputParser.d.cts.map +1 -1
  198. package/dist/agents/structured_chat/outputParser.d.ts +0 -1
  199. package/dist/agents/structured_chat/outputParser.d.ts.map +1 -1
  200. package/dist/agents/structured_chat/outputParser.js +3 -6
  201. package/dist/agents/structured_chat/outputParser.js.map +1 -1
  202. package/dist/agents/structured_chat/prompt.cjs.map +1 -1
  203. package/dist/agents/structured_chat/prompt.js.map +1 -1
  204. package/dist/agents/tool_calling/index.cjs +5 -6
  205. package/dist/agents/tool_calling/index.cjs.map +1 -1
  206. package/dist/agents/tool_calling/index.d.cts +4 -6
  207. package/dist/agents/tool_calling/index.d.cts.map +1 -1
  208. package/dist/agents/tool_calling/index.d.ts +2 -4
  209. package/dist/agents/tool_calling/index.d.ts.map +1 -1
  210. package/dist/agents/tool_calling/index.js +2 -3
  211. package/dist/agents/tool_calling/index.js.map +1 -1
  212. package/dist/agents/tool_calling/output_parser.cjs +5 -5
  213. package/dist/agents/tool_calling/output_parser.cjs.map +1 -1
  214. package/dist/agents/tool_calling/output_parser.d.cts +0 -1
  215. package/dist/agents/tool_calling/output_parser.d.cts.map +1 -1
  216. package/dist/agents/tool_calling/output_parser.d.ts +1 -2
  217. package/dist/agents/tool_calling/output_parser.d.ts.map +1 -1
  218. package/dist/agents/tool_calling/output_parser.js +1 -1
  219. package/dist/agents/tool_calling/output_parser.js.map +1 -1
  220. package/dist/agents/toolkits/base.cjs +2 -2
  221. package/dist/agents/toolkits/conversational_retrieval/openai_functions.cjs +1 -2
  222. package/dist/agents/toolkits/conversational_retrieval/openai_functions.cjs.map +1 -1
  223. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.cts.map +1 -1
  224. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.ts.map +1 -1
  225. package/dist/agents/toolkits/conversational_retrieval/openai_functions.js +1 -2
  226. package/dist/agents/toolkits/conversational_retrieval/openai_functions.js.map +1 -1
  227. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.cjs +6 -6
  228. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.cjs.map +1 -1
  229. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts +0 -1
  230. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts.map +1 -1
  231. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts +0 -1
  232. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts.map +1 -1
  233. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.js.map +1 -1
  234. package/dist/agents/toolkits/conversational_retrieval/tool.cjs +6 -7
  235. package/dist/agents/toolkits/conversational_retrieval/tool.cjs.map +1 -1
  236. package/dist/agents/toolkits/conversational_retrieval/tool.d.cts.map +1 -1
  237. package/dist/agents/toolkits/conversational_retrieval/tool.d.ts.map +1 -1
  238. package/dist/agents/toolkits/conversational_retrieval/tool.js +2 -3
  239. package/dist/agents/toolkits/conversational_retrieval/tool.js.map +1 -1
  240. package/dist/agents/toolkits/index.cjs +3 -3
  241. package/dist/agents/toolkits/index.js +2 -3
  242. package/dist/agents/toolkits/json/json.cjs +11 -13
  243. package/dist/agents/toolkits/json/json.cjs.map +1 -1
  244. package/dist/agents/toolkits/json/json.d.cts +0 -1
  245. package/dist/agents/toolkits/json/json.d.cts.map +1 -1
  246. package/dist/agents/toolkits/json/json.d.ts +0 -1
  247. package/dist/agents/toolkits/json/json.d.ts.map +1 -1
  248. package/dist/agents/toolkits/json/json.js +8 -10
  249. package/dist/agents/toolkits/json/json.js.map +1 -1
  250. package/dist/agents/toolkits/json/prompt.cjs.map +1 -1
  251. package/dist/agents/toolkits/json/prompt.js.map +1 -1
  252. package/dist/agents/toolkits/openapi/openapi.cjs +14 -18
  253. package/dist/agents/toolkits/openapi/openapi.cjs.map +1 -1
  254. package/dist/agents/toolkits/openapi/openapi.d.cts +0 -1
  255. package/dist/agents/toolkits/openapi/openapi.d.cts.map +1 -1
  256. package/dist/agents/toolkits/openapi/openapi.d.ts +0 -1
  257. package/dist/agents/toolkits/openapi/openapi.d.ts.map +1 -1
  258. package/dist/agents/toolkits/openapi/openapi.js +10 -14
  259. package/dist/agents/toolkits/openapi/openapi.js.map +1 -1
  260. package/dist/agents/toolkits/openapi/prompt.cjs.map +1 -1
  261. package/dist/agents/toolkits/openapi/prompt.js.map +1 -1
  262. package/dist/agents/toolkits/sql/index.cjs +3 -3
  263. package/dist/agents/toolkits/sql/index.js +2 -3
  264. package/dist/agents/toolkits/sql/prompt.cjs.map +1 -1
  265. package/dist/agents/toolkits/sql/prompt.d.cts.map +1 -1
  266. package/dist/agents/toolkits/sql/prompt.d.ts.map +1 -1
  267. package/dist/agents/toolkits/sql/prompt.js.map +1 -1
  268. package/dist/agents/toolkits/sql/sql.cjs +13 -15
  269. package/dist/agents/toolkits/sql/sql.cjs.map +1 -1
  270. package/dist/agents/toolkits/sql/sql.d.cts +0 -1
  271. package/dist/agents/toolkits/sql/sql.d.cts.map +1 -1
  272. package/dist/agents/toolkits/sql/sql.d.ts +0 -1
  273. package/dist/agents/toolkits/sql/sql.d.ts.map +1 -1
  274. package/dist/agents/toolkits/sql/sql.js +8 -10
  275. package/dist/agents/toolkits/sql/sql.js.map +1 -1
  276. package/dist/agents/toolkits/vectorstore/prompt.cjs.map +1 -1
  277. package/dist/agents/toolkits/vectorstore/prompt.js.map +1 -1
  278. package/dist/agents/toolkits/vectorstore/vectorstore.cjs +20 -24
  279. package/dist/agents/toolkits/vectorstore/vectorstore.cjs.map +1 -1
  280. package/dist/agents/toolkits/vectorstore/vectorstore.d.cts +0 -1
  281. package/dist/agents/toolkits/vectorstore/vectorstore.d.cts.map +1 -1
  282. package/dist/agents/toolkits/vectorstore/vectorstore.d.ts +0 -1
  283. package/dist/agents/toolkits/vectorstore/vectorstore.d.ts.map +1 -1
  284. package/dist/agents/toolkits/vectorstore/vectorstore.js +16 -20
  285. package/dist/agents/toolkits/vectorstore/vectorstore.js.map +1 -1
  286. package/dist/agents/types.cjs +4 -4
  287. package/dist/agents/types.cjs.map +1 -1
  288. package/dist/agents/types.d.cts +0 -1
  289. package/dist/agents/types.d.cts.map +1 -1
  290. package/dist/agents/types.d.ts +1 -2
  291. package/dist/agents/types.d.ts.map +1 -1
  292. package/dist/agents/types.js.map +1 -1
  293. package/dist/agents/xml/index.cjs +12 -15
  294. package/dist/agents/xml/index.cjs.map +1 -1
  295. package/dist/agents/xml/index.d.cts +1 -4
  296. package/dist/agents/xml/index.d.cts.map +1 -1
  297. package/dist/agents/xml/index.d.ts +1 -4
  298. package/dist/agents/xml/index.d.ts.map +1 -1
  299. package/dist/agents/xml/index.js +7 -10
  300. package/dist/agents/xml/index.js.map +1 -1
  301. package/dist/agents/xml/output_parser.cjs +7 -9
  302. package/dist/agents/xml/output_parser.cjs.map +1 -1
  303. package/dist/agents/xml/output_parser.d.cts +0 -1
  304. package/dist/agents/xml/output_parser.d.cts.map +1 -1
  305. package/dist/agents/xml/output_parser.d.ts +0 -1
  306. package/dist/agents/xml/output_parser.d.ts.map +1 -1
  307. package/dist/agents/xml/output_parser.js +4 -7
  308. package/dist/agents/xml/output_parser.js.map +1 -1
  309. package/dist/agents/xml/prompt.cjs.map +1 -1
  310. package/dist/agents/xml/prompt.js.map +1 -1
  311. package/dist/cache/file_system.cjs +11 -9
  312. package/dist/cache/file_system.cjs.map +1 -1
  313. package/dist/cache/file_system.d.cts +0 -1
  314. package/dist/cache/file_system.d.cts.map +1 -1
  315. package/dist/cache/file_system.d.ts +0 -1
  316. package/dist/cache/file_system.d.ts.map +1 -1
  317. package/dist/cache/file_system.js +2 -3
  318. package/dist/cache/file_system.js.map +1 -1
  319. package/dist/callbacks/handlers/console.cjs +6 -6
  320. package/dist/callbacks/handlers/console.d.cts +3 -2
  321. package/dist/callbacks/handlers/console.d.cts.map +1 -1
  322. package/dist/callbacks/handlers/console.d.ts +3 -2
  323. package/dist/callbacks/handlers/console.d.ts.map +1 -1
  324. package/dist/callbacks/handlers/console.js +4 -4
  325. package/dist/callbacks/handlers/run_collector.cjs +6 -6
  326. package/dist/callbacks/handlers/run_collector.d.cts +3 -2
  327. package/dist/callbacks/handlers/run_collector.d.cts.map +1 -1
  328. package/dist/callbacks/handlers/run_collector.d.ts +3 -2
  329. package/dist/callbacks/handlers/run_collector.d.ts.map +1 -1
  330. package/dist/callbacks/handlers/run_collector.js +4 -4
  331. package/dist/callbacks/handlers/tracer.cjs +6 -6
  332. package/dist/callbacks/handlers/tracer.d.cts +3 -2
  333. package/dist/callbacks/handlers/tracer.d.cts.map +1 -1
  334. package/dist/callbacks/handlers/tracer.d.ts +3 -2
  335. package/dist/callbacks/handlers/tracer.d.ts.map +1 -1
  336. package/dist/callbacks/handlers/tracer.js +4 -4
  337. package/dist/callbacks/handlers/tracer_langchain.cjs +6 -6
  338. package/dist/callbacks/handlers/tracer_langchain.d.cts +3 -2
  339. package/dist/callbacks/handlers/tracer_langchain.d.cts.map +1 -1
  340. package/dist/callbacks/handlers/tracer_langchain.d.ts +3 -2
  341. package/dist/callbacks/handlers/tracer_langchain.d.ts.map +1 -1
  342. package/dist/callbacks/handlers/tracer_langchain.js +4 -4
  343. package/dist/callbacks/index.cjs +3 -3
  344. package/dist/callbacks/index.js +2 -3
  345. package/dist/callbacks/promises.cjs +6 -6
  346. package/dist/callbacks/promises.d.cts +3 -2
  347. package/dist/callbacks/promises.d.cts.map +1 -1
  348. package/dist/callbacks/promises.d.ts +3 -2
  349. package/dist/callbacks/promises.d.ts.map +1 -1
  350. package/dist/callbacks/promises.js +4 -4
  351. package/dist/chains/analyze_documents_chain.cjs +6 -8
  352. package/dist/chains/analyze_documents_chain.cjs.map +1 -1
  353. package/dist/chains/analyze_documents_chain.d.cts.map +1 -1
  354. package/dist/chains/analyze_documents_chain.d.ts +1 -1
  355. package/dist/chains/analyze_documents_chain.d.ts.map +1 -1
  356. package/dist/chains/analyze_documents_chain.js +3 -5
  357. package/dist/chains/analyze_documents_chain.js.map +1 -1
  358. package/dist/chains/api/api_chain.cjs +1 -2
  359. package/dist/chains/api/api_chain.cjs.map +1 -1
  360. package/dist/chains/api/api_chain.d.cts +0 -1
  361. package/dist/chains/api/api_chain.d.cts.map +1 -1
  362. package/dist/chains/api/api_chain.d.ts +0 -1
  363. package/dist/chains/api/api_chain.d.ts.map +1 -1
  364. package/dist/chains/api/api_chain.js +1 -2
  365. package/dist/chains/api/api_chain.js.map +1 -1
  366. package/dist/chains/api/prompts.cjs +4 -4
  367. package/dist/chains/api/prompts.cjs.map +1 -1
  368. package/dist/chains/api/prompts.js.map +1 -1
  369. package/dist/chains/base.cjs +12 -14
  370. package/dist/chains/base.cjs.map +1 -1
  371. package/dist/chains/base.d.cts +3 -0
  372. package/dist/chains/base.d.cts.map +1 -1
  373. package/dist/chains/base.d.ts +3 -0
  374. package/dist/chains/base.d.ts.map +1 -1
  375. package/dist/chains/base.js +3 -5
  376. package/dist/chains/base.js.map +1 -1
  377. package/dist/chains/chat_vector_db_chain.cjs +9 -11
  378. package/dist/chains/chat_vector_db_chain.cjs.map +1 -1
  379. package/dist/chains/chat_vector_db_chain.d.cts.map +1 -1
  380. package/dist/chains/chat_vector_db_chain.d.ts.map +1 -1
  381. package/dist/chains/chat_vector_db_chain.js +6 -8
  382. package/dist/chains/chat_vector_db_chain.js.map +1 -1
  383. package/dist/chains/combine_docs_chain.cjs +15 -24
  384. package/dist/chains/combine_docs_chain.cjs.map +1 -1
  385. package/dist/chains/combine_docs_chain.d.cts.map +1 -1
  386. package/dist/chains/combine_docs_chain.d.ts +1 -1
  387. package/dist/chains/combine_docs_chain.d.ts.map +1 -1
  388. package/dist/chains/combine_docs_chain.js +12 -21
  389. package/dist/chains/combine_docs_chain.js.map +1 -1
  390. package/dist/chains/combine_documents/base.cjs +5 -6
  391. package/dist/chains/combine_documents/base.cjs.map +1 -1
  392. package/dist/chains/combine_documents/base.js +2 -3
  393. package/dist/chains/combine_documents/base.js.map +1 -1
  394. package/dist/chains/combine_documents/index.cjs +3 -3
  395. package/dist/chains/combine_documents/index.js +2 -3
  396. package/dist/chains/combine_documents/reduce.cjs +5 -7
  397. package/dist/chains/combine_documents/reduce.cjs.map +1 -1
  398. package/dist/chains/combine_documents/reduce.d.cts +0 -1
  399. package/dist/chains/combine_documents/reduce.d.cts.map +1 -1
  400. package/dist/chains/combine_documents/reduce.d.ts +0 -1
  401. package/dist/chains/combine_documents/reduce.d.ts.map +1 -1
  402. package/dist/chains/combine_documents/reduce.js +4 -7
  403. package/dist/chains/combine_documents/reduce.js.map +1 -1
  404. package/dist/chains/combine_documents/stuff.cjs +6 -6
  405. package/dist/chains/combine_documents/stuff.cjs.map +1 -1
  406. package/dist/chains/combine_documents/stuff.d.cts +0 -1
  407. package/dist/chains/combine_documents/stuff.d.cts.map +1 -1
  408. package/dist/chains/combine_documents/stuff.d.ts +0 -1
  409. package/dist/chains/combine_documents/stuff.d.ts.map +1 -1
  410. package/dist/chains/combine_documents/stuff.js.map +1 -1
  411. package/dist/chains/constitutional_ai/constitutional_chain.cjs.map +1 -1
  412. package/dist/chains/constitutional_ai/constitutional_chain.d.cts +0 -1
  413. package/dist/chains/constitutional_ai/constitutional_chain.d.cts.map +1 -1
  414. package/dist/chains/constitutional_ai/constitutional_chain.d.ts +0 -1
  415. package/dist/chains/constitutional_ai/constitutional_chain.d.ts.map +1 -1
  416. package/dist/chains/constitutional_ai/constitutional_chain.js.map +1 -1
  417. package/dist/chains/constitutional_ai/constitutional_principle.cjs.map +1 -1
  418. package/dist/chains/constitutional_ai/constitutional_principle.d.cts +0 -1
  419. package/dist/chains/constitutional_ai/constitutional_principle.d.cts.map +1 -1
  420. package/dist/chains/constitutional_ai/constitutional_principle.d.ts +0 -1
  421. package/dist/chains/constitutional_ai/constitutional_principle.d.ts.map +1 -1
  422. package/dist/chains/constitutional_ai/constitutional_principle.js.map +1 -1
  423. package/dist/chains/constitutional_ai/constitutional_prompts.cjs +5 -5
  424. package/dist/chains/constitutional_ai/constitutional_prompts.cjs.map +1 -1
  425. package/dist/chains/constitutional_ai/constitutional_prompts.js.map +1 -1
  426. package/dist/chains/conversation.cjs +4 -4
  427. package/dist/chains/conversation.cjs.map +1 -1
  428. package/dist/chains/conversation.d.cts +0 -1
  429. package/dist/chains/conversation.d.cts.map +1 -1
  430. package/dist/chains/conversation.d.ts +0 -1
  431. package/dist/chains/conversation.d.ts.map +1 -1
  432. package/dist/chains/conversation.js +1 -1
  433. package/dist/chains/conversation.js.map +1 -1
  434. package/dist/chains/conversational_retrieval_chain.cjs +12 -14
  435. package/dist/chains/conversational_retrieval_chain.cjs.map +1 -1
  436. package/dist/chains/conversational_retrieval_chain.d.cts +2 -4
  437. package/dist/chains/conversational_retrieval_chain.d.cts.map +1 -1
  438. package/dist/chains/conversational_retrieval_chain.d.ts +3 -5
  439. package/dist/chains/conversational_retrieval_chain.d.ts.map +1 -1
  440. package/dist/chains/conversational_retrieval_chain.js +7 -9
  441. package/dist/chains/conversational_retrieval_chain.js.map +1 -1
  442. package/dist/chains/graph_qa/cypher.cjs +8 -10
  443. package/dist/chains/graph_qa/cypher.cjs.map +1 -1
  444. package/dist/chains/graph_qa/cypher.d.cts.map +1 -1
  445. package/dist/chains/graph_qa/cypher.d.ts.map +1 -1
  446. package/dist/chains/graph_qa/cypher.js +7 -10
  447. package/dist/chains/graph_qa/cypher.js.map +1 -1
  448. package/dist/chains/graph_qa/prompts.cjs +4 -4
  449. package/dist/chains/graph_qa/prompts.cjs.map +1 -1
  450. package/dist/chains/graph_qa/prompts.js.map +1 -1
  451. package/dist/chains/history_aware_retriever.cjs +7 -8
  452. package/dist/chains/history_aware_retriever.cjs.map +1 -1
  453. package/dist/chains/history_aware_retriever.d.cts +0 -1
  454. package/dist/chains/history_aware_retriever.d.cts.map +1 -1
  455. package/dist/chains/history_aware_retriever.d.ts +2 -3
  456. package/dist/chains/history_aware_retriever.d.ts.map +1 -1
  457. package/dist/chains/history_aware_retriever.js +3 -5
  458. package/dist/chains/history_aware_retriever.js.map +1 -1
  459. package/dist/chains/index.cjs +3 -3
  460. package/dist/chains/index.js +2 -3
  461. package/dist/chains/llm_chain.cjs +12 -15
  462. package/dist/chains/llm_chain.cjs.map +1 -1
  463. package/dist/chains/llm_chain.d.cts.map +1 -1
  464. package/dist/chains/llm_chain.d.ts +1 -1
  465. package/dist/chains/llm_chain.d.ts.map +1 -1
  466. package/dist/chains/llm_chain.js +3 -6
  467. package/dist/chains/llm_chain.js.map +1 -1
  468. package/dist/chains/load.cjs +3 -3
  469. package/dist/chains/load.cjs.map +1 -1
  470. package/dist/chains/load.d.cts +0 -1
  471. package/dist/chains/load.d.cts.map +1 -1
  472. package/dist/chains/load.d.ts +0 -1
  473. package/dist/chains/load.d.ts.map +1 -1
  474. package/dist/chains/load.js +2 -3
  475. package/dist/chains/load.js.map +1 -1
  476. package/dist/chains/openai_functions/base.cjs +8 -10
  477. package/dist/chains/openai_functions/base.cjs.map +1 -1
  478. package/dist/chains/openai_functions/base.d.cts +3 -7
  479. package/dist/chains/openai_functions/base.d.cts.map +1 -1
  480. package/dist/chains/openai_functions/base.d.ts +4 -8
  481. package/dist/chains/openai_functions/base.d.ts.map +1 -1
  482. package/dist/chains/openai_functions/base.js +5 -7
  483. package/dist/chains/openai_functions/base.js.map +1 -1
  484. package/dist/chains/openai_functions/extraction.cjs +5 -5
  485. package/dist/chains/openai_functions/extraction.cjs.map +1 -1
  486. package/dist/chains/openai_functions/extraction.d.cts +0 -1
  487. package/dist/chains/openai_functions/extraction.d.cts.map +1 -1
  488. package/dist/chains/openai_functions/extraction.d.ts +1 -2
  489. package/dist/chains/openai_functions/extraction.d.ts.map +1 -1
  490. package/dist/chains/openai_functions/extraction.js.map +1 -1
  491. package/dist/chains/openai_functions/index.cjs +3 -3
  492. package/dist/chains/openai_functions/index.js +2 -3
  493. package/dist/chains/openai_functions/openapi.cjs +12 -19
  494. package/dist/chains/openai_functions/openapi.cjs.map +1 -1
  495. package/dist/chains/openai_functions/openapi.d.cts +0 -2
  496. package/dist/chains/openai_functions/openapi.d.cts.map +1 -1
  497. package/dist/chains/openai_functions/openapi.d.ts +0 -2
  498. package/dist/chains/openai_functions/openapi.d.ts.map +1 -1
  499. package/dist/chains/openai_functions/openapi.js +9 -16
  500. package/dist/chains/openai_functions/openapi.js.map +1 -1
  501. package/dist/chains/openai_functions/tagging.cjs +5 -5
  502. package/dist/chains/openai_functions/tagging.cjs.map +1 -1
  503. package/dist/chains/openai_functions/tagging.d.cts +0 -1
  504. package/dist/chains/openai_functions/tagging.d.cts.map +1 -1
  505. package/dist/chains/openai_functions/tagging.d.ts +1 -2
  506. package/dist/chains/openai_functions/tagging.d.ts.map +1 -1
  507. package/dist/chains/openai_functions/tagging.js +1 -1
  508. package/dist/chains/openai_functions/tagging.js.map +1 -1
  509. package/dist/chains/openai_moderation.cjs +7 -7
  510. package/dist/chains/openai_moderation.cjs.map +1 -1
  511. package/dist/chains/openai_moderation.d.cts +0 -1
  512. package/dist/chains/openai_moderation.d.cts.map +1 -1
  513. package/dist/chains/openai_moderation.d.ts +0 -1
  514. package/dist/chains/openai_moderation.d.ts.map +1 -1
  515. package/dist/chains/openai_moderation.js.map +1 -1
  516. package/dist/chains/query_constructor/index.cjs +19 -25
  517. package/dist/chains/query_constructor/index.cjs.map +1 -1
  518. package/dist/chains/query_constructor/index.d.cts +0 -1
  519. package/dist/chains/query_constructor/index.d.cts.map +1 -1
  520. package/dist/chains/query_constructor/index.d.ts +0 -1
  521. package/dist/chains/query_constructor/index.d.ts.map +1 -1
  522. package/dist/chains/query_constructor/index.js +11 -18
  523. package/dist/chains/query_constructor/index.js.map +1 -1
  524. package/dist/chains/query_constructor/ir.cjs +7 -6
  525. package/dist/chains/query_constructor/ir.js +4 -4
  526. package/dist/chains/query_constructor/parser.cjs +8 -9
  527. package/dist/chains/query_constructor/parser.cjs.map +1 -1
  528. package/dist/chains/query_constructor/parser.d.cts +0 -1
  529. package/dist/chains/query_constructor/parser.d.cts.map +1 -1
  530. package/dist/chains/query_constructor/parser.d.ts +0 -1
  531. package/dist/chains/query_constructor/parser.d.ts.map +1 -1
  532. package/dist/chains/query_constructor/parser.js +1 -2
  533. package/dist/chains/query_constructor/parser.js.map +1 -1
  534. package/dist/chains/query_constructor/prompt.cjs +3 -3
  535. package/dist/chains/query_constructor/prompt.cjs.map +1 -1
  536. package/dist/chains/query_constructor/prompt.d.cts +0 -1
  537. package/dist/chains/query_constructor/prompt.d.cts.map +1 -1
  538. package/dist/chains/query_constructor/prompt.d.ts +0 -1
  539. package/dist/chains/query_constructor/prompt.d.ts.map +1 -1
  540. package/dist/chains/query_constructor/prompt.js.map +1 -1
  541. package/dist/chains/question_answering/load.cjs +32 -41
  542. package/dist/chains/question_answering/load.cjs.map +1 -1
  543. package/dist/chains/question_answering/load.d.cts +0 -1
  544. package/dist/chains/question_answering/load.d.cts.map +1 -1
  545. package/dist/chains/question_answering/load.d.ts +0 -1
  546. package/dist/chains/question_answering/load.d.ts.map +1 -1
  547. package/dist/chains/question_answering/load.js +32 -41
  548. package/dist/chains/question_answering/load.js.map +1 -1
  549. package/dist/chains/question_answering/map_reduce_prompts.cjs +13 -15
  550. package/dist/chains/question_answering/map_reduce_prompts.cjs.map +1 -1
  551. package/dist/chains/question_answering/map_reduce_prompts.js +4 -6
  552. package/dist/chains/question_answering/map_reduce_prompts.js.map +1 -1
  553. package/dist/chains/question_answering/refine_prompts.cjs +16 -18
  554. package/dist/chains/question_answering/refine_prompts.cjs.map +1 -1
  555. package/dist/chains/question_answering/refine_prompts.js +7 -9
  556. package/dist/chains/question_answering/refine_prompts.js.map +1 -1
  557. package/dist/chains/question_answering/stuff_prompts.cjs +8 -9
  558. package/dist/chains/question_answering/stuff_prompts.cjs.map +1 -1
  559. package/dist/chains/question_answering/stuff_prompts.js +2 -3
  560. package/dist/chains/question_answering/stuff_prompts.js.map +1 -1
  561. package/dist/chains/retrieval.cjs +7 -8
  562. package/dist/chains/retrieval.cjs.map +1 -1
  563. package/dist/chains/retrieval.d.cts +0 -1
  564. package/dist/chains/retrieval.d.cts.map +1 -1
  565. package/dist/chains/retrieval.d.ts +2 -3
  566. package/dist/chains/retrieval.d.ts.map +1 -1
  567. package/dist/chains/retrieval.js +3 -5
  568. package/dist/chains/retrieval.js.map +1 -1
  569. package/dist/chains/retrieval_qa.cjs.map +1 -1
  570. package/dist/chains/retrieval_qa.d.cts.map +1 -1
  571. package/dist/chains/retrieval_qa.d.ts.map +1 -1
  572. package/dist/chains/retrieval_qa.js.map +1 -1
  573. package/dist/chains/router/llm_router.cjs.map +1 -1
  574. package/dist/chains/router/llm_router.d.cts +0 -1
  575. package/dist/chains/router/llm_router.d.cts.map +1 -1
  576. package/dist/chains/router/llm_router.d.ts +0 -1
  577. package/dist/chains/router/llm_router.d.ts.map +1 -1
  578. package/dist/chains/router/llm_router.js.map +1 -1
  579. package/dist/chains/router/multi_prompt.cjs +8 -10
  580. package/dist/chains/router/multi_prompt.cjs.map +1 -1
  581. package/dist/chains/router/multi_prompt.d.cts +0 -1
  582. package/dist/chains/router/multi_prompt.d.cts.map +1 -1
  583. package/dist/chains/router/multi_prompt.d.ts +0 -1
  584. package/dist/chains/router/multi_prompt.d.ts.map +1 -1
  585. package/dist/chains/router/multi_prompt.js +3 -5
  586. package/dist/chains/router/multi_prompt.js.map +1 -1
  587. package/dist/chains/router/multi_prompt_prompt.cjs.map +1 -1
  588. package/dist/chains/router/multi_prompt_prompt.js.map +1 -1
  589. package/dist/chains/router/multi_retrieval_prompt.cjs.map +1 -1
  590. package/dist/chains/router/multi_retrieval_prompt.js.map +1 -1
  591. package/dist/chains/router/multi_retrieval_qa.cjs +15 -22
  592. package/dist/chains/router/multi_retrieval_qa.cjs.map +1 -1
  593. package/dist/chains/router/multi_retrieval_qa.d.cts +0 -1
  594. package/dist/chains/router/multi_retrieval_qa.d.cts.map +1 -1
  595. package/dist/chains/router/multi_retrieval_qa.d.ts +0 -1
  596. package/dist/chains/router/multi_retrieval_qa.d.ts.map +1 -1
  597. package/dist/chains/router/multi_retrieval_qa.js +11 -18
  598. package/dist/chains/router/multi_retrieval_qa.js.map +1 -1
  599. package/dist/chains/router/multi_route.cjs.map +1 -1
  600. package/dist/chains/router/multi_route.d.cts +0 -1
  601. package/dist/chains/router/multi_route.d.cts.map +1 -1
  602. package/dist/chains/router/multi_route.d.ts +0 -1
  603. package/dist/chains/router/multi_route.d.ts.map +1 -1
  604. package/dist/chains/router/multi_route.js.map +1 -1
  605. package/dist/chains/router/utils.cjs.map +1 -1
  606. package/dist/chains/router/utils.js.map +1 -1
  607. package/dist/chains/sequential_chain.cjs.map +1 -1
  608. package/dist/chains/sequential_chain.d.cts +0 -1
  609. package/dist/chains/sequential_chain.d.cts.map +1 -1
  610. package/dist/chains/sequential_chain.d.ts +0 -1
  611. package/dist/chains/sequential_chain.d.ts.map +1 -1
  612. package/dist/chains/sequential_chain.js.map +1 -1
  613. package/dist/chains/serde.d.cts +0 -1
  614. package/dist/chains/serde.d.cts.map +1 -1
  615. package/dist/chains/serde.d.ts +0 -1
  616. package/dist/chains/serde.d.ts.map +1 -1
  617. package/dist/chains/sql_db/index.cjs +3 -3
  618. package/dist/chains/sql_db/index.js +2 -3
  619. package/dist/chains/sql_db/sql_db_chain.cjs +19 -24
  620. package/dist/chains/sql_db/sql_db_chain.cjs.map +1 -1
  621. package/dist/chains/sql_db/sql_db_chain.d.cts +0 -1
  622. package/dist/chains/sql_db/sql_db_chain.d.cts.map +1 -1
  623. package/dist/chains/sql_db/sql_db_chain.d.ts +0 -1
  624. package/dist/chains/sql_db/sql_db_chain.d.ts.map +1 -1
  625. package/dist/chains/sql_db/sql_db_chain.js +13 -18
  626. package/dist/chains/sql_db/sql_db_chain.js.map +1 -1
  627. package/dist/chains/sql_db/sql_db_prompt.cjs +9 -9
  628. package/dist/chains/sql_db/sql_db_prompt.cjs.map +1 -1
  629. package/dist/chains/sql_db/sql_db_prompt.d.cts.map +1 -1
  630. package/dist/chains/sql_db/sql_db_prompt.d.ts.map +1 -1
  631. package/dist/chains/sql_db/sql_db_prompt.js.map +1 -1
  632. package/dist/chains/summarization/load.cjs +32 -41
  633. package/dist/chains/summarization/load.cjs.map +1 -1
  634. package/dist/chains/summarization/load.d.cts +0 -1
  635. package/dist/chains/summarization/load.d.cts.map +1 -1
  636. package/dist/chains/summarization/load.d.ts +0 -1
  637. package/dist/chains/summarization/load.d.ts.map +1 -1
  638. package/dist/chains/summarization/load.js +32 -41
  639. package/dist/chains/summarization/load.js.map +1 -1
  640. package/dist/chains/summarization/refine_prompts.cjs +3 -3
  641. package/dist/chains/summarization/refine_prompts.cjs.map +1 -1
  642. package/dist/chains/summarization/refine_prompts.js.map +1 -1
  643. package/dist/chains/summarization/stuff_prompts.cjs +3 -3
  644. package/dist/chains/summarization/stuff_prompts.cjs.map +1 -1
  645. package/dist/chains/summarization/stuff_prompts.js.map +1 -1
  646. package/dist/chains/transform.cjs.map +1 -1
  647. package/dist/chains/transform.d.cts +0 -1
  648. package/dist/chains/transform.d.cts.map +1 -1
  649. package/dist/chains/transform.d.ts +0 -1
  650. package/dist/chains/transform.d.ts.map +1 -1
  651. package/dist/chains/transform.js.map +1 -1
  652. package/dist/chains/vector_db_qa.cjs.map +1 -1
  653. package/dist/chains/vector_db_qa.d.cts.map +1 -1
  654. package/dist/chains/vector_db_qa.d.ts.map +1 -1
  655. package/dist/chains/vector_db_qa.js.map +1 -1
  656. package/dist/chat_models/universal.cjs +33 -39
  657. package/dist/chat_models/universal.cjs.map +1 -1
  658. package/dist/chat_models/universal.d.cts.map +1 -1
  659. package/dist/chat_models/universal.d.ts +1 -1
  660. package/dist/chat_models/universal.d.ts.map +1 -1
  661. package/dist/chat_models/universal.js +20 -27
  662. package/dist/chat_models/universal.js.map +1 -1
  663. package/dist/document.cjs +5 -5
  664. package/dist/document.js +2 -3
  665. package/dist/document_loaders/base.cjs +7 -6
  666. package/dist/document_loaders/base.js +4 -4
  667. package/dist/document_loaders/fs/buffer.cjs +7 -7
  668. package/dist/document_loaders/fs/buffer.cjs.map +1 -1
  669. package/dist/document_loaders/fs/buffer.d.cts +0 -1
  670. package/dist/document_loaders/fs/buffer.d.cts.map +1 -1
  671. package/dist/document_loaders/fs/buffer.d.ts +1 -2
  672. package/dist/document_loaders/fs/buffer.d.ts.map +1 -1
  673. package/dist/document_loaders/fs/buffer.js +2 -3
  674. package/dist/document_loaders/fs/buffer.js.map +1 -1
  675. package/dist/document_loaders/fs/directory.cjs +7 -7
  676. package/dist/document_loaders/fs/directory.cjs.map +1 -1
  677. package/dist/document_loaders/fs/directory.d.cts.map +1 -1
  678. package/dist/document_loaders/fs/directory.d.ts +1 -1
  679. package/dist/document_loaders/fs/directory.d.ts.map +1 -1
  680. package/dist/document_loaders/fs/directory.js +2 -3
  681. package/dist/document_loaders/fs/directory.js.map +1 -1
  682. package/dist/document_loaders/fs/json.cjs +7 -8
  683. package/dist/document_loaders/fs/json.cjs.map +1 -1
  684. package/dist/document_loaders/fs/json.d.cts +0 -1
  685. package/dist/document_loaders/fs/json.d.cts.map +1 -1
  686. package/dist/document_loaders/fs/json.d.ts +0 -1
  687. package/dist/document_loaders/fs/json.d.ts.map +1 -1
  688. package/dist/document_loaders/fs/json.js +4 -7
  689. package/dist/document_loaders/fs/json.js.map +1 -1
  690. package/dist/document_loaders/fs/multi_file.cjs +8 -9
  691. package/dist/document_loaders/fs/multi_file.cjs.map +1 -1
  692. package/dist/document_loaders/fs/multi_file.d.cts +0 -1
  693. package/dist/document_loaders/fs/multi_file.d.cts.map +1 -1
  694. package/dist/document_loaders/fs/multi_file.d.ts +0 -1
  695. package/dist/document_loaders/fs/multi_file.d.ts.map +1 -1
  696. package/dist/document_loaders/fs/multi_file.js +3 -5
  697. package/dist/document_loaders/fs/multi_file.js.map +1 -1
  698. package/dist/document_loaders/fs/text.cjs +9 -9
  699. package/dist/document_loaders/fs/text.cjs.map +1 -1
  700. package/dist/document_loaders/fs/text.d.cts +0 -1
  701. package/dist/document_loaders/fs/text.d.cts.map +1 -1
  702. package/dist/document_loaders/fs/text.d.ts +1 -2
  703. package/dist/document_loaders/fs/text.d.ts.map +1 -1
  704. package/dist/document_loaders/fs/text.js +3 -4
  705. package/dist/document_loaders/fs/text.js.map +1 -1
  706. package/dist/document_transformers/openai_functions.cjs +12 -14
  707. package/dist/document_transformers/openai_functions.cjs.map +1 -1
  708. package/dist/document_transformers/openai_functions.d.cts +0 -1
  709. package/dist/document_transformers/openai_functions.d.cts.map +1 -1
  710. package/dist/document_transformers/openai_functions.d.ts +1 -1
  711. package/dist/document_transformers/openai_functions.d.ts.map +1 -1
  712. package/dist/document_transformers/openai_functions.js +6 -9
  713. package/dist/document_transformers/openai_functions.js.map +1 -1
  714. package/dist/embeddings/cache_backed.cjs +7 -7
  715. package/dist/embeddings/cache_backed.cjs.map +1 -1
  716. package/dist/embeddings/cache_backed.d.cts +0 -1
  717. package/dist/embeddings/cache_backed.d.cts.map +1 -1
  718. package/dist/embeddings/cache_backed.d.ts +0 -1
  719. package/dist/embeddings/cache_backed.d.ts.map +1 -1
  720. package/dist/embeddings/cache_backed.js +2 -3
  721. package/dist/embeddings/cache_backed.js.map +1 -1
  722. package/dist/embeddings/fake.cjs +7 -6
  723. package/dist/embeddings/fake.js +4 -4
  724. package/dist/evaluation/agents/index.js +2 -0
  725. package/dist/evaluation/agents/prompt.cjs +15 -12
  726. package/dist/evaluation/agents/prompt.cjs.map +1 -1
  727. package/dist/evaluation/agents/prompt.js +3 -0
  728. package/dist/evaluation/agents/prompt.js.map +1 -1
  729. package/dist/evaluation/agents/trajectory.cjs +5 -5
  730. package/dist/evaluation/agents/trajectory.cjs.map +1 -1
  731. package/dist/evaluation/agents/trajectory.d.cts +2 -2
  732. package/dist/evaluation/agents/trajectory.d.cts.map +1 -1
  733. package/dist/evaluation/agents/trajectory.d.ts +2 -2
  734. package/dist/evaluation/agents/trajectory.d.ts.map +1 -1
  735. package/dist/evaluation/agents/trajectory.js.map +1 -1
  736. package/dist/evaluation/base.cjs.map +1 -1
  737. package/dist/evaluation/base.d.cts.map +1 -1
  738. package/dist/evaluation/base.d.ts.map +1 -1
  739. package/dist/evaluation/base.js.map +1 -1
  740. package/dist/evaluation/comparison/index.js +2 -0
  741. package/dist/evaluation/comparison/pairwise.cjs +16 -21
  742. package/dist/evaluation/comparison/pairwise.cjs.map +1 -1
  743. package/dist/evaluation/comparison/pairwise.d.cts +3 -3
  744. package/dist/evaluation/comparison/pairwise.d.cts.map +1 -1
  745. package/dist/evaluation/comparison/pairwise.d.ts +3 -3
  746. package/dist/evaluation/comparison/pairwise.d.ts.map +1 -1
  747. package/dist/evaluation/comparison/pairwise.js +11 -16
  748. package/dist/evaluation/comparison/pairwise.js.map +1 -1
  749. package/dist/evaluation/comparison/prompt.cjs +11 -4
  750. package/dist/evaluation/comparison/prompt.cjs.map +1 -1
  751. package/dist/evaluation/comparison/prompt.js +7 -0
  752. package/dist/evaluation/comparison/prompt.js.map +1 -1
  753. package/dist/evaluation/criteria/criteria.cjs +7 -9
  754. package/dist/evaluation/criteria/criteria.cjs.map +1 -1
  755. package/dist/evaluation/criteria/criteria.d.cts +3 -3
  756. package/dist/evaluation/criteria/criteria.d.cts.map +1 -1
  757. package/dist/evaluation/criteria/criteria.d.ts +3 -3
  758. package/dist/evaluation/criteria/criteria.d.ts.map +1 -1
  759. package/dist/evaluation/criteria/criteria.js +2 -4
  760. package/dist/evaluation/criteria/criteria.js.map +1 -1
  761. package/dist/evaluation/criteria/index.js +2 -0
  762. package/dist/evaluation/criteria/prompt.cjs +4 -4
  763. package/dist/evaluation/criteria/prompt.cjs.map +1 -1
  764. package/dist/evaluation/criteria/prompt.js.map +1 -1
  765. package/dist/evaluation/embedding_distance/base.cjs +5 -9
  766. package/dist/evaluation/embedding_distance/base.cjs.map +1 -1
  767. package/dist/evaluation/embedding_distance/base.d.cts +0 -1
  768. package/dist/evaluation/embedding_distance/base.d.cts.map +1 -1
  769. package/dist/evaluation/embedding_distance/base.d.ts +0 -1
  770. package/dist/evaluation/embedding_distance/base.d.ts.map +1 -1
  771. package/dist/evaluation/embedding_distance/base.js +5 -9
  772. package/dist/evaluation/embedding_distance/base.js.map +1 -1
  773. package/dist/evaluation/embedding_distance/index.js +2 -0
  774. package/dist/evaluation/index.cjs +3 -3
  775. package/dist/evaluation/index.js +2 -3
  776. package/dist/evaluation/loader.cjs +3 -3
  777. package/dist/evaluation/loader.cjs.map +1 -1
  778. package/dist/evaluation/loader.d.cts.map +1 -1
  779. package/dist/evaluation/loader.d.ts.map +1 -1
  780. package/dist/evaluation/loader.js.map +1 -1
  781. package/dist/evaluation/qa/eval_chain.cjs +1 -2
  782. package/dist/evaluation/qa/eval_chain.cjs.map +1 -1
  783. package/dist/evaluation/qa/eval_chain.d.cts.map +1 -1
  784. package/dist/evaluation/qa/eval_chain.d.ts.map +1 -1
  785. package/dist/evaluation/qa/eval_chain.js +1 -2
  786. package/dist/evaluation/qa/eval_chain.js.map +1 -1
  787. package/dist/evaluation/qa/index.js +2 -0
  788. package/dist/evaluation/qa/prompt.cjs +3 -3
  789. package/dist/evaluation/qa/prompt.cjs.map +1 -1
  790. package/dist/evaluation/qa/prompt.js.map +1 -1
  791. package/dist/evaluation/types.d.cts.map +1 -1
  792. package/dist/evaluation/types.d.ts.map +1 -1
  793. package/dist/experimental/autogpt/agent.cjs +18 -21
  794. package/dist/experimental/autogpt/agent.cjs.map +1 -1
  795. package/dist/experimental/autogpt/agent.d.cts +0 -1
  796. package/dist/experimental/autogpt/agent.d.cts.map +1 -1
  797. package/dist/experimental/autogpt/agent.d.ts +1 -2
  798. package/dist/experimental/autogpt/agent.d.ts.map +1 -1
  799. package/dist/experimental/autogpt/agent.js +12 -15
  800. package/dist/experimental/autogpt/agent.js.map +1 -1
  801. package/dist/experimental/autogpt/index.cjs +3 -3
  802. package/dist/experimental/autogpt/index.js +2 -3
  803. package/dist/experimental/autogpt/output_parser.cjs +3 -3
  804. package/dist/experimental/autogpt/output_parser.cjs.map +1 -1
  805. package/dist/experimental/autogpt/output_parser.d.cts +0 -1
  806. package/dist/experimental/autogpt/output_parser.d.cts.map +1 -1
  807. package/dist/experimental/autogpt/output_parser.d.ts +0 -1
  808. package/dist/experimental/autogpt/output_parser.d.ts.map +1 -1
  809. package/dist/experimental/autogpt/output_parser.js.map +1 -1
  810. package/dist/experimental/autogpt/prompt.cjs +13 -18
  811. package/dist/experimental/autogpt/prompt.cjs.map +1 -1
  812. package/dist/experimental/autogpt/prompt.d.cts +2 -2
  813. package/dist/experimental/autogpt/prompt.d.cts.map +1 -1
  814. package/dist/experimental/autogpt/prompt.d.ts +3 -3
  815. package/dist/experimental/autogpt/prompt.d.ts.map +1 -1
  816. package/dist/experimental/autogpt/prompt.js +7 -12
  817. package/dist/experimental/autogpt/prompt.js.map +1 -1
  818. package/dist/experimental/autogpt/prompt_generator.cjs +7 -11
  819. package/dist/experimental/autogpt/prompt_generator.cjs.map +1 -1
  820. package/dist/experimental/autogpt/prompt_generator.js +3 -7
  821. package/dist/experimental/autogpt/prompt_generator.js.map +1 -1
  822. package/dist/experimental/autogpt/schema.d.cts +0 -1
  823. package/dist/experimental/autogpt/schema.d.cts.map +1 -1
  824. package/dist/experimental/autogpt/schema.d.ts +0 -1
  825. package/dist/experimental/autogpt/schema.d.ts.map +1 -1
  826. package/dist/experimental/babyagi/agent.cjs +16 -20
  827. package/dist/experimental/babyagi/agent.cjs.map +1 -1
  828. package/dist/experimental/babyagi/agent.d.cts +0 -1
  829. package/dist/experimental/babyagi/agent.d.cts.map +1 -1
  830. package/dist/experimental/babyagi/agent.d.ts +0 -1
  831. package/dist/experimental/babyagi/agent.d.ts.map +1 -1
  832. package/dist/experimental/babyagi/agent.js +13 -17
  833. package/dist/experimental/babyagi/agent.js.map +1 -1
  834. package/dist/experimental/babyagi/index.cjs +3 -3
  835. package/dist/experimental/babyagi/index.js +2 -3
  836. package/dist/experimental/babyagi/task_creation.cjs +11 -13
  837. package/dist/experimental/babyagi/task_creation.cjs.map +1 -1
  838. package/dist/experimental/babyagi/task_creation.d.cts.map +1 -1
  839. package/dist/experimental/babyagi/task_creation.d.ts.map +1 -1
  840. package/dist/experimental/babyagi/task_creation.js +9 -11
  841. package/dist/experimental/babyagi/task_creation.js.map +1 -1
  842. package/dist/experimental/babyagi/task_execution.cjs +10 -12
  843. package/dist/experimental/babyagi/task_execution.cjs.map +1 -1
  844. package/dist/experimental/babyagi/task_execution.d.cts.map +1 -1
  845. package/dist/experimental/babyagi/task_execution.d.ts.map +1 -1
  846. package/dist/experimental/babyagi/task_execution.js +8 -10
  847. package/dist/experimental/babyagi/task_execution.js.map +1 -1
  848. package/dist/experimental/babyagi/task_prioritization.cjs +10 -12
  849. package/dist/experimental/babyagi/task_prioritization.cjs.map +1 -1
  850. package/dist/experimental/babyagi/task_prioritization.d.cts.map +1 -1
  851. package/dist/experimental/babyagi/task_prioritization.d.ts.map +1 -1
  852. package/dist/experimental/babyagi/task_prioritization.js +8 -10
  853. package/dist/experimental/babyagi/task_prioritization.js.map +1 -1
  854. package/dist/experimental/chains/violation_of_expectations/index.cjs +3 -3
  855. package/dist/experimental/chains/violation_of_expectations/index.js +2 -3
  856. package/dist/experimental/chains/violation_of_expectations/types.cjs.map +1 -1
  857. package/dist/experimental/chains/violation_of_expectations/types.d.cts +0 -1
  858. package/dist/experimental/chains/violation_of_expectations/types.d.cts.map +1 -1
  859. package/dist/experimental/chains/violation_of_expectations/types.d.ts +0 -1
  860. package/dist/experimental/chains/violation_of_expectations/types.d.ts.map +1 -1
  861. package/dist/experimental/chains/violation_of_expectations/types.js.map +1 -1
  862. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.cjs +20 -30
  863. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.cjs.map +1 -1
  864. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.cts +0 -1
  865. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.cts.map +1 -1
  866. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts +1 -2
  867. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts.map +1 -1
  868. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.js +16 -26
  869. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.js.map +1 -1
  870. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.cjs +6 -6
  871. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.cjs.map +1 -1
  872. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.js.map +1 -1
  873. package/dist/experimental/generative_agents/generative_agent.cjs +30 -43
  874. package/dist/experimental/generative_agents/generative_agent.cjs.map +1 -1
  875. package/dist/experimental/generative_agents/generative_agent.d.cts +0 -1
  876. package/dist/experimental/generative_agents/generative_agent.d.cts.map +1 -1
  877. package/dist/experimental/generative_agents/generative_agent.d.ts +0 -1
  878. package/dist/experimental/generative_agents/generative_agent.d.ts.map +1 -1
  879. package/dist/experimental/generative_agents/generative_agent.js +23 -36
  880. package/dist/experimental/generative_agents/generative_agent.js.map +1 -1
  881. package/dist/experimental/generative_agents/generative_agent_memory.cjs +17 -26
  882. package/dist/experimental/generative_agents/generative_agent_memory.cjs.map +1 -1
  883. package/dist/experimental/generative_agents/generative_agent_memory.d.cts.map +1 -1
  884. package/dist/experimental/generative_agents/generative_agent_memory.d.ts +1 -1
  885. package/dist/experimental/generative_agents/generative_agent_memory.d.ts.map +1 -1
  886. package/dist/experimental/generative_agents/generative_agent_memory.js +9 -18
  887. package/dist/experimental/generative_agents/generative_agent_memory.js.map +1 -1
  888. package/dist/experimental/generative_agents/index.cjs +3 -3
  889. package/dist/experimental/generative_agents/index.js +2 -3
  890. package/dist/experimental/masking/index.cjs +3 -3
  891. package/dist/experimental/masking/index.js +2 -3
  892. package/dist/experimental/masking/parser.cjs.map +1 -1
  893. package/dist/experimental/masking/parser.d.cts +0 -1
  894. package/dist/experimental/masking/parser.d.cts.map +1 -1
  895. package/dist/experimental/masking/parser.d.ts +0 -1
  896. package/dist/experimental/masking/parser.d.ts.map +1 -1
  897. package/dist/experimental/masking/parser.js.map +1 -1
  898. package/dist/experimental/masking/regex_masking_transformer.cjs +1 -2
  899. package/dist/experimental/masking/regex_masking_transformer.cjs.map +1 -1
  900. package/dist/experimental/masking/regex_masking_transformer.d.cts +0 -1
  901. package/dist/experimental/masking/regex_masking_transformer.d.cts.map +1 -1
  902. package/dist/experimental/masking/regex_masking_transformer.d.ts +0 -1
  903. package/dist/experimental/masking/regex_masking_transformer.d.ts.map +1 -1
  904. package/dist/experimental/masking/regex_masking_transformer.js +1 -2
  905. package/dist/experimental/masking/regex_masking_transformer.js.map +1 -1
  906. package/dist/experimental/masking/transformer.cjs.map +1 -1
  907. package/dist/experimental/masking/transformer.d.cts.map +1 -1
  908. package/dist/experimental/masking/transformer.d.ts.map +1 -1
  909. package/dist/experimental/masking/transformer.js.map +1 -1
  910. package/dist/experimental/masking/types.d.cts +0 -1
  911. package/dist/experimental/masking/types.d.cts.map +1 -1
  912. package/dist/experimental/masking/types.d.ts +0 -1
  913. package/dist/experimental/masking/types.d.ts.map +1 -1
  914. package/dist/experimental/openai_assistant/index.cjs +32 -40
  915. package/dist/experimental/openai_assistant/index.cjs.map +1 -1
  916. package/dist/experimental/openai_assistant/index.d.cts.map +1 -1
  917. package/dist/experimental/openai_assistant/index.d.ts.map +1 -1
  918. package/dist/experimental/openai_assistant/index.js +21 -30
  919. package/dist/experimental/openai_assistant/index.js.map +1 -1
  920. package/dist/experimental/openai_assistant/schema.d.cts.map +1 -1
  921. package/dist/experimental/openai_assistant/schema.d.ts.map +1 -1
  922. package/dist/experimental/openai_files/index.cjs +7 -7
  923. package/dist/experimental/openai_files/index.cjs.map +1 -1
  924. package/dist/experimental/openai_files/index.d.cts.map +1 -1
  925. package/dist/experimental/openai_files/index.d.ts.map +1 -1
  926. package/dist/experimental/openai_files/index.js +2 -3
  927. package/dist/experimental/openai_files/index.js.map +1 -1
  928. package/dist/experimental/plan_and_execute/agent_executor.cjs +3 -5
  929. package/dist/experimental/plan_and_execute/agent_executor.cjs.map +1 -1
  930. package/dist/experimental/plan_and_execute/agent_executor.d.cts +0 -1
  931. package/dist/experimental/plan_and_execute/agent_executor.d.cts.map +1 -1
  932. package/dist/experimental/plan_and_execute/agent_executor.d.ts +0 -1
  933. package/dist/experimental/plan_and_execute/agent_executor.d.ts.map +1 -1
  934. package/dist/experimental/plan_and_execute/agent_executor.js +3 -5
  935. package/dist/experimental/plan_and_execute/agent_executor.js.map +1 -1
  936. package/dist/experimental/plan_and_execute/base.cjs +1 -2
  937. package/dist/experimental/plan_and_execute/base.cjs.map +1 -1
  938. package/dist/experimental/plan_and_execute/base.d.cts +0 -1
  939. package/dist/experimental/plan_and_execute/base.d.cts.map +1 -1
  940. package/dist/experimental/plan_and_execute/base.d.ts +0 -1
  941. package/dist/experimental/plan_and_execute/base.d.ts.map +1 -1
  942. package/dist/experimental/plan_and_execute/base.js +1 -2
  943. package/dist/experimental/plan_and_execute/base.js.map +1 -1
  944. package/dist/experimental/plan_and_execute/index.cjs +3 -3
  945. package/dist/experimental/plan_and_execute/index.js +2 -3
  946. package/dist/experimental/plan_and_execute/outputParser.cjs +3 -3
  947. package/dist/experimental/plan_and_execute/outputParser.cjs.map +1 -1
  948. package/dist/experimental/plan_and_execute/outputParser.d.cts +0 -1
  949. package/dist/experimental/plan_and_execute/outputParser.d.cts.map +1 -1
  950. package/dist/experimental/plan_and_execute/outputParser.d.ts +0 -1
  951. package/dist/experimental/plan_and_execute/outputParser.d.ts.map +1 -1
  952. package/dist/experimental/plan_and_execute/outputParser.js.map +1 -1
  953. package/dist/experimental/plan_and_execute/prompt.cjs +3 -3
  954. package/dist/experimental/plan_and_execute/prompt.cjs.map +1 -1
  955. package/dist/experimental/plan_and_execute/prompt.js.map +1 -1
  956. package/dist/experimental/prompts/custom_format.cjs +6 -6
  957. package/dist/experimental/prompts/custom_format.cjs.map +1 -1
  958. package/dist/experimental/prompts/custom_format.d.cts.map +1 -1
  959. package/dist/experimental/prompts/custom_format.d.ts.map +1 -1
  960. package/dist/experimental/prompts/custom_format.js +3 -4
  961. package/dist/experimental/prompts/custom_format.js.map +1 -1
  962. package/dist/experimental/prompts/handlebars.cjs +6 -6
  963. package/dist/experimental/prompts/handlebars.cjs.map +1 -1
  964. package/dist/experimental/prompts/handlebars.d.cts.map +1 -1
  965. package/dist/experimental/prompts/handlebars.d.ts.map +1 -1
  966. package/dist/experimental/prompts/handlebars.js +3 -5
  967. package/dist/experimental/prompts/handlebars.js.map +1 -1
  968. package/dist/hub/base.cjs +2 -5
  969. package/dist/hub/base.cjs.map +1 -1
  970. package/dist/hub/base.d.cts +2 -5
  971. package/dist/hub/base.d.cts.map +1 -1
  972. package/dist/hub/base.d.ts +2 -5
  973. package/dist/hub/base.d.ts.map +1 -1
  974. package/dist/hub/base.js +2 -5
  975. package/dist/hub/base.js.map +1 -1
  976. package/dist/hub/index.cjs +2 -2
  977. package/dist/hub/index.cjs.map +1 -1
  978. package/dist/hub/index.d.cts +0 -1
  979. package/dist/hub/index.d.cts.map +1 -1
  980. package/dist/hub/index.d.ts +0 -1
  981. package/dist/hub/index.d.ts.map +1 -1
  982. package/dist/hub/index.js +1 -2
  983. package/dist/hub/index.js.map +1 -1
  984. package/dist/hub/node.cjs +7 -13
  985. package/dist/hub/node.cjs.map +1 -1
  986. package/dist/hub/node.d.cts +0 -1
  987. package/dist/hub/node.d.cts.map +1 -1
  988. package/dist/hub/node.d.ts +0 -1
  989. package/dist/hub/node.d.ts.map +1 -1
  990. package/dist/hub/node.js +6 -13
  991. package/dist/hub/node.js.map +1 -1
  992. package/dist/index.cjs +3 -1
  993. package/dist/index.cjs.map +1 -1
  994. package/dist/index.js +3 -1
  995. package/dist/index.js.map +1 -1
  996. package/dist/indexes/index.cjs +16 -16
  997. package/dist/indexes/index.js +2 -3
  998. package/dist/load/import_constants.cjs.map +1 -1
  999. package/dist/load/import_constants.js.map +1 -1
  1000. package/dist/load/import_map.cjs +25 -26
  1001. package/dist/load/import_map.cjs.map +1 -1
  1002. package/dist/load/import_map.js +29 -30
  1003. package/dist/load/import_map.js.map +1 -1
  1004. package/dist/load/import_type.d.cts.map +1 -1
  1005. package/dist/load/import_type.d.ts.map +1 -1
  1006. package/dist/load/index.cjs +13 -3
  1007. package/dist/load/index.cjs.map +1 -1
  1008. package/dist/load/index.d.cts +9 -1
  1009. package/dist/load/index.d.cts.map +1 -1
  1010. package/dist/load/index.d.ts +9 -1
  1011. package/dist/load/index.d.ts.map +1 -1
  1012. package/dist/load/index.js +9 -0
  1013. package/dist/load/index.js.map +1 -1
  1014. package/dist/load/map_keys.d.cts.map +1 -1
  1015. package/dist/load/map_keys.d.ts.map +1 -1
  1016. package/dist/load/serializable.cjs +7 -6
  1017. package/dist/load/serializable.js +4 -4
  1018. package/dist/memory/buffer_memory.cjs +4 -8
  1019. package/dist/memory/buffer_memory.cjs.map +1 -1
  1020. package/dist/memory/buffer_memory.d.cts +0 -1
  1021. package/dist/memory/buffer_memory.d.cts.map +1 -1
  1022. package/dist/memory/buffer_memory.d.ts +0 -1
  1023. package/dist/memory/buffer_memory.d.ts.map +1 -1
  1024. package/dist/memory/buffer_memory.js +2 -6
  1025. package/dist/memory/buffer_memory.js.map +1 -1
  1026. package/dist/memory/buffer_token_memory.cjs +6 -10
  1027. package/dist/memory/buffer_token_memory.cjs.map +1 -1
  1028. package/dist/memory/buffer_token_memory.d.cts +0 -1
  1029. package/dist/memory/buffer_token_memory.d.cts.map +1 -1
  1030. package/dist/memory/buffer_token_memory.d.ts +0 -1
  1031. package/dist/memory/buffer_token_memory.d.ts.map +1 -1
  1032. package/dist/memory/buffer_token_memory.js +2 -6
  1033. package/dist/memory/buffer_token_memory.js.map +1 -1
  1034. package/dist/memory/buffer_window_memory.cjs +4 -8
  1035. package/dist/memory/buffer_window_memory.cjs.map +1 -1
  1036. package/dist/memory/buffer_window_memory.d.cts +0 -1
  1037. package/dist/memory/buffer_window_memory.d.cts.map +1 -1
  1038. package/dist/memory/buffer_window_memory.d.ts +0 -1
  1039. package/dist/memory/buffer_window_memory.d.ts.map +1 -1
  1040. package/dist/memory/buffer_window_memory.js +2 -6
  1041. package/dist/memory/buffer_window_memory.js.map +1 -1
  1042. package/dist/memory/chat_memory.cjs +9 -9
  1043. package/dist/memory/chat_memory.cjs.map +1 -1
  1044. package/dist/memory/chat_memory.d.cts +0 -1
  1045. package/dist/memory/chat_memory.d.cts.map +1 -1
  1046. package/dist/memory/chat_memory.d.ts +0 -1
  1047. package/dist/memory/chat_memory.d.ts.map +1 -1
  1048. package/dist/memory/chat_memory.js +2 -3
  1049. package/dist/memory/chat_memory.js.map +1 -1
  1050. package/dist/memory/combined_memory.cjs.map +1 -1
  1051. package/dist/memory/combined_memory.d.cts +0 -1
  1052. package/dist/memory/combined_memory.d.cts.map +1 -1
  1053. package/dist/memory/combined_memory.d.ts +0 -1
  1054. package/dist/memory/combined_memory.d.ts.map +1 -1
  1055. package/dist/memory/combined_memory.js.map +1 -1
  1056. package/dist/memory/entity_memory.cjs +7 -8
  1057. package/dist/memory/entity_memory.cjs.map +1 -1
  1058. package/dist/memory/entity_memory.d.cts +0 -1
  1059. package/dist/memory/entity_memory.d.cts.map +1 -1
  1060. package/dist/memory/entity_memory.d.ts +0 -1
  1061. package/dist/memory/entity_memory.d.ts.map +1 -1
  1062. package/dist/memory/entity_memory.js +1 -2
  1063. package/dist/memory/entity_memory.js.map +1 -1
  1064. package/dist/memory/index.cjs +16 -16
  1065. package/dist/memory/index.js +2 -3
  1066. package/dist/memory/prompt.cjs +6 -6
  1067. package/dist/memory/prompt.cjs.map +1 -1
  1068. package/dist/memory/prompt.d.cts +0 -1
  1069. package/dist/memory/prompt.d.cts.map +1 -1
  1070. package/dist/memory/prompt.d.ts +0 -1
  1071. package/dist/memory/prompt.d.ts.map +1 -1
  1072. package/dist/memory/prompt.js.map +1 -1
  1073. package/dist/memory/stores/entity/base.cjs +3 -3
  1074. package/dist/memory/stores/entity/base.cjs.map +1 -1
  1075. package/dist/memory/stores/entity/base.d.cts +0 -1
  1076. package/dist/memory/stores/entity/base.d.cts.map +1 -1
  1077. package/dist/memory/stores/entity/base.d.ts +0 -1
  1078. package/dist/memory/stores/entity/base.d.ts.map +1 -1
  1079. package/dist/memory/stores/entity/base.js.map +1 -1
  1080. package/dist/memory/stores/entity/in_memory.cjs.map +1 -1
  1081. package/dist/memory/stores/entity/in_memory.js.map +1 -1
  1082. package/dist/memory/summary.cjs +8 -13
  1083. package/dist/memory/summary.cjs.map +1 -1
  1084. package/dist/memory/summary.d.cts +0 -1
  1085. package/dist/memory/summary.d.cts.map +1 -1
  1086. package/dist/memory/summary.d.ts +1 -2
  1087. package/dist/memory/summary.d.ts.map +1 -1
  1088. package/dist/memory/summary.js +4 -9
  1089. package/dist/memory/summary.js.map +1 -1
  1090. package/dist/memory/summary_buffer.cjs +5 -5
  1091. package/dist/memory/summary_buffer.cjs.map +1 -1
  1092. package/dist/memory/summary_buffer.d.cts +0 -1
  1093. package/dist/memory/summary_buffer.d.cts.map +1 -1
  1094. package/dist/memory/summary_buffer.d.ts +0 -1
  1095. package/dist/memory/summary_buffer.d.ts.map +1 -1
  1096. package/dist/memory/summary_buffer.js.map +1 -1
  1097. package/dist/memory/vector_store.cjs +6 -6
  1098. package/dist/memory/vector_store.cjs.map +1 -1
  1099. package/dist/memory/vector_store.d.cts.map +1 -1
  1100. package/dist/memory/vector_store.d.ts.map +1 -1
  1101. package/dist/memory/vector_store.js +1 -1
  1102. package/dist/memory/vector_store.js.map +1 -1
  1103. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/client.d.cts +1242 -0
  1104. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/client.d.cts.map +1 -0
  1105. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/client.d.ts +1242 -0
  1106. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/client.d.ts.map +1 -0
  1107. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/_runner.d.cts +4 -0
  1108. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/_runner.d.ts +4 -0
  1109. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluate_comparative.d.cts +2 -0
  1110. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluate_comparative.d.ts +2 -0
  1111. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluator.d.cts +66 -0
  1112. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluator.d.cts.map +1 -0
  1113. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluator.d.ts +66 -0
  1114. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluator.d.ts.map +1 -0
  1115. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/index.d.cts +4 -0
  1116. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/index.d.ts +4 -0
  1117. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/string_evaluator.d.cts +1 -0
  1118. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/string_evaluator.d.ts +1 -0
  1119. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/index.d.cts +4 -0
  1120. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/index.d.ts +4 -0
  1121. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/run_trees.d.cts +145 -0
  1122. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/run_trees.d.cts.map +1 -0
  1123. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/run_trees.d.ts +145 -0
  1124. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/run_trees.d.ts.map +1 -0
  1125. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/schemas.d.cts +411 -0
  1126. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/schemas.d.cts.map +1 -0
  1127. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/schemas.d.ts +411 -0
  1128. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/schemas.d.ts.map +1 -0
  1129. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.cts +8 -0
  1130. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.cts.map +1 -0
  1131. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.ts +8 -0
  1132. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.ts.map +1 -0
  1133. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/types.d.cts +38 -0
  1134. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/types.d.cts.map +1 -0
  1135. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/types.d.ts +38 -0
  1136. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/types.d.ts.map +1 -0
  1137. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.cts +27 -0
  1138. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.cts.map +1 -0
  1139. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.ts +27 -0
  1140. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.ts.map +1 -0
  1141. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/p-queue.d.cts +1 -0
  1142. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/p-queue.d.ts +1 -0
  1143. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/prompt_cache/index.d.cts +129 -0
  1144. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/prompt_cache/index.d.cts.map +1 -0
  1145. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/prompt_cache/index.d.ts +129 -0
  1146. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/prompt_cache/index.d.ts.map +1 -0
  1147. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/evaluation.d.cts +2 -0
  1148. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/evaluation.d.ts +2 -0
  1149. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/singletons/traceable.d.cts +2 -0
  1150. package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/singletons/traceable.d.ts +2 -0
  1151. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.d.cts +1 -0
  1152. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.d.ts +1 -0
  1153. package/dist/output_parsers/combining.cjs +4 -4
  1154. package/dist/output_parsers/combining.cjs.map +1 -1
  1155. package/dist/output_parsers/combining.d.cts +0 -1
  1156. package/dist/output_parsers/combining.d.cts.map +1 -1
  1157. package/dist/output_parsers/combining.d.ts +0 -1
  1158. package/dist/output_parsers/combining.d.ts.map +1 -1
  1159. package/dist/output_parsers/combining.js +1 -1
  1160. package/dist/output_parsers/combining.js.map +1 -1
  1161. package/dist/output_parsers/datetime.cjs +4 -4
  1162. package/dist/output_parsers/datetime.cjs.map +1 -1
  1163. package/dist/output_parsers/datetime.d.cts +0 -1
  1164. package/dist/output_parsers/datetime.d.cts.map +1 -1
  1165. package/dist/output_parsers/datetime.d.ts +0 -1
  1166. package/dist/output_parsers/datetime.d.ts.map +1 -1
  1167. package/dist/output_parsers/datetime.js.map +1 -1
  1168. package/dist/output_parsers/expression.cjs +7 -9
  1169. package/dist/output_parsers/expression.cjs.map +1 -1
  1170. package/dist/output_parsers/expression.d.cts.map +1 -1
  1171. package/dist/output_parsers/expression.d.ts.map +1 -1
  1172. package/dist/output_parsers/expression.js +4 -7
  1173. package/dist/output_parsers/expression.js.map +1 -1
  1174. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs.map +1 -1
  1175. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js.map +1 -1
  1176. package/dist/output_parsers/expression_type_handlers/base.cjs +1 -2
  1177. package/dist/output_parsers/expression_type_handlers/base.cjs.map +1 -1
  1178. package/dist/output_parsers/expression_type_handlers/base.d.cts +0 -1
  1179. package/dist/output_parsers/expression_type_handlers/base.d.cts.map +1 -1
  1180. package/dist/output_parsers/expression_type_handlers/base.d.ts +0 -1
  1181. package/dist/output_parsers/expression_type_handlers/base.d.ts.map +1 -1
  1182. package/dist/output_parsers/expression_type_handlers/base.js +1 -2
  1183. package/dist/output_parsers/expression_type_handlers/base.js.map +1 -1
  1184. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs.map +1 -1
  1185. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js.map +1 -1
  1186. package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs.map +1 -1
  1187. package/dist/output_parsers/expression_type_handlers/call_expression_handler.js.map +1 -1
  1188. package/dist/output_parsers/expression_type_handlers/factory.cjs +1 -4
  1189. package/dist/output_parsers/expression_type_handlers/factory.cjs.map +1 -1
  1190. package/dist/output_parsers/expression_type_handlers/factory.d.cts +0 -1
  1191. package/dist/output_parsers/expression_type_handlers/factory.d.cts.map +1 -1
  1192. package/dist/output_parsers/expression_type_handlers/factory.d.ts +0 -1
  1193. package/dist/output_parsers/expression_type_handlers/factory.d.ts.map +1 -1
  1194. package/dist/output_parsers/expression_type_handlers/factory.js +1 -4
  1195. package/dist/output_parsers/expression_type_handlers/factory.js.map +1 -1
  1196. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs.map +1 -1
  1197. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js.map +1 -1
  1198. package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs +1 -2
  1199. package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs.map +1 -1
  1200. package/dist/output_parsers/expression_type_handlers/identifier_handler.js +1 -2
  1201. package/dist/output_parsers/expression_type_handlers/identifier_handler.js.map +1 -1
  1202. package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs.map +1 -1
  1203. package/dist/output_parsers/expression_type_handlers/member_expression_handler.js.map +1 -1
  1204. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs.map +1 -1
  1205. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js.map +1 -1
  1206. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs.map +1 -1
  1207. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js.map +1 -1
  1208. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs +2 -4
  1209. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs.map +1 -1
  1210. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js +2 -4
  1211. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js.map +1 -1
  1212. package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs +1 -2
  1213. package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs.map +1 -1
  1214. package/dist/output_parsers/expression_type_handlers/string_literal_handler.js +1 -2
  1215. package/dist/output_parsers/expression_type_handlers/string_literal_handler.js.map +1 -1
  1216. package/dist/output_parsers/expression_type_handlers/types.d.cts.map +1 -1
  1217. package/dist/output_parsers/expression_type_handlers/types.d.ts.map +1 -1
  1218. package/dist/output_parsers/fix.cjs +10 -16
  1219. package/dist/output_parsers/fix.cjs.map +1 -1
  1220. package/dist/output_parsers/fix.d.cts.map +1 -1
  1221. package/dist/output_parsers/fix.d.ts.map +1 -1
  1222. package/dist/output_parsers/fix.js +6 -12
  1223. package/dist/output_parsers/fix.js.map +1 -1
  1224. package/dist/output_parsers/http_response.cjs +5 -8
  1225. package/dist/output_parsers/http_response.cjs.map +1 -1
  1226. package/dist/output_parsers/http_response.d.cts.map +1 -1
  1227. package/dist/output_parsers/http_response.d.ts +1 -1
  1228. package/dist/output_parsers/http_response.d.ts.map +1 -1
  1229. package/dist/output_parsers/http_response.js +1 -4
  1230. package/dist/output_parsers/http_response.js.map +1 -1
  1231. package/dist/output_parsers/index.cjs +10 -10
  1232. package/dist/output_parsers/index.js +2 -3
  1233. package/dist/output_parsers/noop.cjs +3 -3
  1234. package/dist/output_parsers/noop.cjs.map +1 -1
  1235. package/dist/output_parsers/noop.js.map +1 -1
  1236. package/dist/output_parsers/openai_functions.cjs +15 -18
  1237. package/dist/output_parsers/openai_functions.cjs.map +1 -1
  1238. package/dist/output_parsers/openai_functions.d.cts +0 -1
  1239. package/dist/output_parsers/openai_functions.d.cts.map +1 -1
  1240. package/dist/output_parsers/openai_functions.d.ts +0 -1
  1241. package/dist/output_parsers/openai_functions.d.ts.map +1 -1
  1242. package/dist/output_parsers/openai_functions.js +6 -9
  1243. package/dist/output_parsers/openai_functions.js.map +1 -1
  1244. package/dist/output_parsers/openai_tools.cjs +5 -6
  1245. package/dist/output_parsers/openai_tools.cjs.map +1 -1
  1246. package/dist/output_parsers/openai_tools.d.cts +4 -9
  1247. package/dist/output_parsers/openai_tools.d.cts.map +1 -1
  1248. package/dist/output_parsers/openai_tools.d.ts +4 -9
  1249. package/dist/output_parsers/openai_tools.d.ts.map +1 -1
  1250. package/dist/output_parsers/openai_tools.js +1 -2
  1251. package/dist/output_parsers/openai_tools.js.map +1 -1
  1252. package/dist/output_parsers/prompts.cjs +3 -3
  1253. package/dist/output_parsers/prompts.cjs.map +1 -1
  1254. package/dist/output_parsers/prompts.js.map +1 -1
  1255. package/dist/output_parsers/regex.cjs +4 -4
  1256. package/dist/output_parsers/regex.cjs.map +1 -1
  1257. package/dist/output_parsers/regex.d.cts.map +1 -1
  1258. package/dist/output_parsers/regex.d.ts.map +1 -1
  1259. package/dist/output_parsers/regex.js.map +1 -1
  1260. package/dist/output_parsers/router.cjs +3 -3
  1261. package/dist/output_parsers/router.cjs.map +1 -1
  1262. package/dist/output_parsers/router.d.cts +0 -1
  1263. package/dist/output_parsers/router.d.cts.map +1 -1
  1264. package/dist/output_parsers/router.d.ts +0 -1
  1265. package/dist/output_parsers/router.d.ts.map +1 -1
  1266. package/dist/output_parsers/router.js.map +1 -1
  1267. package/dist/output_parsers/structured.cjs +19 -20
  1268. package/dist/output_parsers/structured.cjs.map +1 -1
  1269. package/dist/output_parsers/structured.d.cts.map +1 -1
  1270. package/dist/output_parsers/structured.d.ts.map +1 -1
  1271. package/dist/output_parsers/structured.js +6 -7
  1272. package/dist/output_parsers/structured.js.map +1 -1
  1273. package/dist/retrievers/contextual_compression.cjs +6 -7
  1274. package/dist/retrievers/contextual_compression.cjs.map +1 -1
  1275. package/dist/retrievers/contextual_compression.d.cts +0 -1
  1276. package/dist/retrievers/contextual_compression.d.cts.map +1 -1
  1277. package/dist/retrievers/contextual_compression.d.ts +1 -2
  1278. package/dist/retrievers/contextual_compression.d.ts.map +1 -1
  1279. package/dist/retrievers/contextual_compression.js +3 -5
  1280. package/dist/retrievers/contextual_compression.js.map +1 -1
  1281. package/dist/retrievers/document_compressors/chain_extract.cjs +16 -19
  1282. package/dist/retrievers/document_compressors/chain_extract.cjs.map +1 -1
  1283. package/dist/retrievers/document_compressors/chain_extract.d.cts +0 -1
  1284. package/dist/retrievers/document_compressors/chain_extract.d.cts.map +1 -1
  1285. package/dist/retrievers/document_compressors/chain_extract.d.ts +1 -2
  1286. package/dist/retrievers/document_compressors/chain_extract.d.ts.map +1 -1
  1287. package/dist/retrievers/document_compressors/chain_extract.js +10 -14
  1288. package/dist/retrievers/document_compressors/chain_extract.js.map +1 -1
  1289. package/dist/retrievers/document_compressors/chain_extract_prompt.cjs.map +1 -1
  1290. package/dist/retrievers/document_compressors/chain_extract_prompt.js.map +1 -1
  1291. package/dist/retrievers/document_compressors/embeddings_filter.cjs +5 -5
  1292. package/dist/retrievers/document_compressors/embeddings_filter.cjs.map +1 -1
  1293. package/dist/retrievers/document_compressors/embeddings_filter.d.cts +0 -1
  1294. package/dist/retrievers/document_compressors/embeddings_filter.d.cts.map +1 -1
  1295. package/dist/retrievers/document_compressors/embeddings_filter.d.ts +0 -1
  1296. package/dist/retrievers/document_compressors/embeddings_filter.d.ts.map +1 -1
  1297. package/dist/retrievers/document_compressors/embeddings_filter.js +2 -3
  1298. package/dist/retrievers/document_compressors/embeddings_filter.js.map +1 -1
  1299. package/dist/retrievers/document_compressors/index.cjs +3 -3
  1300. package/dist/retrievers/document_compressors/index.cjs.map +1 -1
  1301. package/dist/retrievers/document_compressors/index.d.cts +0 -1
  1302. package/dist/retrievers/document_compressors/index.d.cts.map +1 -1
  1303. package/dist/retrievers/document_compressors/index.d.ts +1 -2
  1304. package/dist/retrievers/document_compressors/index.d.ts.map +1 -1
  1305. package/dist/retrievers/document_compressors/index.js +2 -3
  1306. package/dist/retrievers/document_compressors/index.js.map +1 -1
  1307. package/dist/retrievers/ensemble.cjs +7 -9
  1308. package/dist/retrievers/ensemble.cjs.map +1 -1
  1309. package/dist/retrievers/ensemble.d.cts.map +1 -1
  1310. package/dist/retrievers/ensemble.d.ts +1 -1
  1311. package/dist/retrievers/ensemble.d.ts.map +1 -1
  1312. package/dist/retrievers/ensemble.js +4 -7
  1313. package/dist/retrievers/ensemble.js.map +1 -1
  1314. package/dist/retrievers/hyde.cjs +11 -13
  1315. package/dist/retrievers/hyde.cjs.map +1 -1
  1316. package/dist/retrievers/hyde.d.cts +0 -1
  1317. package/dist/retrievers/hyde.d.cts.map +1 -1
  1318. package/dist/retrievers/hyde.d.ts +1 -2
  1319. package/dist/retrievers/hyde.d.ts.map +1 -1
  1320. package/dist/retrievers/hyde.js +4 -7
  1321. package/dist/retrievers/hyde.js.map +1 -1
  1322. package/dist/retrievers/matryoshka_retriever.cjs +9 -9
  1323. package/dist/retrievers/matryoshka_retriever.cjs.map +1 -1
  1324. package/dist/retrievers/matryoshka_retriever.d.cts +0 -1
  1325. package/dist/retrievers/matryoshka_retriever.d.cts.map +1 -1
  1326. package/dist/retrievers/matryoshka_retriever.d.ts +0 -1
  1327. package/dist/retrievers/matryoshka_retriever.d.ts.map +1 -1
  1328. package/dist/retrievers/matryoshka_retriever.js +2 -3
  1329. package/dist/retrievers/matryoshka_retriever.js.map +1 -1
  1330. package/dist/retrievers/multi_query.cjs +15 -19
  1331. package/dist/retrievers/multi_query.cjs.map +1 -1
  1332. package/dist/retrievers/multi_query.d.cts.map +1 -1
  1333. package/dist/retrievers/multi_query.d.ts +1 -1
  1334. package/dist/retrievers/multi_query.d.ts.map +1 -1
  1335. package/dist/retrievers/multi_query.js +8 -13
  1336. package/dist/retrievers/multi_query.js.map +1 -1
  1337. package/dist/retrievers/multi_vector.cjs +6 -7
  1338. package/dist/retrievers/multi_vector.cjs.map +1 -1
  1339. package/dist/retrievers/multi_vector.d.cts +0 -1
  1340. package/dist/retrievers/multi_vector.d.cts.map +1 -1
  1341. package/dist/retrievers/multi_vector.d.ts +0 -1
  1342. package/dist/retrievers/multi_vector.d.ts.map +1 -1
  1343. package/dist/retrievers/multi_vector.js +3 -5
  1344. package/dist/retrievers/multi_vector.js.map +1 -1
  1345. package/dist/retrievers/parent_document.cjs +8 -9
  1346. package/dist/retrievers/parent_document.cjs.map +1 -1
  1347. package/dist/retrievers/parent_document.d.cts.map +1 -1
  1348. package/dist/retrievers/parent_document.d.ts +1 -1
  1349. package/dist/retrievers/parent_document.d.ts.map +1 -1
  1350. package/dist/retrievers/parent_document.js +4 -7
  1351. package/dist/retrievers/parent_document.js.map +1 -1
  1352. package/dist/retrievers/score_threshold.cjs +6 -7
  1353. package/dist/retrievers/score_threshold.cjs.map +1 -1
  1354. package/dist/retrievers/score_threshold.d.cts.map +1 -1
  1355. package/dist/retrievers/score_threshold.d.ts.map +1 -1
  1356. package/dist/retrievers/score_threshold.js +3 -5
  1357. package/dist/retrievers/score_threshold.js.map +1 -1
  1358. package/dist/retrievers/self_query/functional.cjs +5 -5
  1359. package/dist/retrievers/self_query/functional.js +2 -3
  1360. package/dist/retrievers/self_query/index.cjs +13 -13
  1361. package/dist/retrievers/self_query/index.cjs.map +1 -1
  1362. package/dist/retrievers/self_query/index.d.cts +0 -1
  1363. package/dist/retrievers/self_query/index.d.cts.map +1 -1
  1364. package/dist/retrievers/self_query/index.d.ts +1 -2
  1365. package/dist/retrievers/self_query/index.d.ts.map +1 -1
  1366. package/dist/retrievers/self_query/index.js +3 -4
  1367. package/dist/retrievers/self_query/index.js.map +1 -1
  1368. package/dist/retrievers/time_weighted.cjs +6 -7
  1369. package/dist/retrievers/time_weighted.cjs.map +1 -1
  1370. package/dist/retrievers/time_weighted.d.cts +0 -1
  1371. package/dist/retrievers/time_weighted.d.cts.map +1 -1
  1372. package/dist/retrievers/time_weighted.d.ts +1 -2
  1373. package/dist/retrievers/time_weighted.d.ts.map +1 -1
  1374. package/dist/retrievers/time_weighted.js +3 -5
  1375. package/dist/retrievers/time_weighted.js.map +1 -1
  1376. package/dist/schema/prompt_template.cjs +3 -3
  1377. package/dist/schema/prompt_template.cjs.map +1 -1
  1378. package/dist/schema/prompt_template.d.cts +0 -1
  1379. package/dist/schema/prompt_template.d.cts.map +1 -1
  1380. package/dist/schema/prompt_template.d.ts +1 -2
  1381. package/dist/schema/prompt_template.d.ts.map +1 -1
  1382. package/dist/schema/prompt_template.js +2 -3
  1383. package/dist/schema/prompt_template.js.map +1 -1
  1384. package/dist/schema/query_constructor.cjs +3 -3
  1385. package/dist/schema/query_constructor.cjs.map +1 -1
  1386. package/dist/schema/query_constructor.d.cts.map +1 -1
  1387. package/dist/schema/query_constructor.d.ts.map +1 -1
  1388. package/dist/schema/query_constructor.js +2 -3
  1389. package/dist/schema/query_constructor.js.map +1 -1
  1390. package/dist/smith/config.cjs.map +1 -1
  1391. package/dist/smith/config.d.cts +10 -9
  1392. package/dist/smith/config.d.cts.map +1 -1
  1393. package/dist/smith/config.d.ts +10 -9
  1394. package/dist/smith/config.d.ts.map +1 -1
  1395. package/dist/smith/config.js.map +1 -1
  1396. package/dist/smith/index.cjs +3 -3
  1397. package/dist/smith/index.js +2 -3
  1398. package/dist/smith/name_generation.cjs +1 -4
  1399. package/dist/smith/name_generation.cjs.map +1 -1
  1400. package/dist/smith/name_generation.js +1 -4
  1401. package/dist/smith/name_generation.js.map +1 -1
  1402. package/dist/smith/progress.cjs.map +1 -1
  1403. package/dist/smith/progress.js.map +1 -1
  1404. package/dist/smith/runner_utils.cjs +30 -37
  1405. package/dist/smith/runner_utils.cjs.map +1 -1
  1406. package/dist/smith/runner_utils.d.cts +2 -1
  1407. package/dist/smith/runner_utils.d.cts.map +1 -1
  1408. package/dist/smith/runner_utils.d.ts +2 -1
  1409. package/dist/smith/runner_utils.d.ts.map +1 -1
  1410. package/dist/smith/runner_utils.js +12 -19
  1411. package/dist/smith/runner_utils.js.map +1 -1
  1412. package/dist/sql_db.cjs +5 -5
  1413. package/dist/sql_db.cjs.map +1 -1
  1414. package/dist/sql_db.d.cts +0 -1
  1415. package/dist/sql_db.d.cts.map +1 -1
  1416. package/dist/sql_db.d.ts +0 -1
  1417. package/dist/sql_db.d.ts.map +1 -1
  1418. package/dist/sql_db.js +2 -3
  1419. package/dist/sql_db.js.map +1 -1
  1420. package/dist/storage/encoder_backed.cjs +9 -10
  1421. package/dist/storage/encoder_backed.cjs.map +1 -1
  1422. package/dist/storage/encoder_backed.d.cts +0 -1
  1423. package/dist/storage/encoder_backed.d.cts.map +1 -1
  1424. package/dist/storage/encoder_backed.d.ts +0 -1
  1425. package/dist/storage/encoder_backed.d.ts.map +1 -1
  1426. package/dist/storage/encoder_backed.js +4 -6
  1427. package/dist/storage/encoder_backed.js.map +1 -1
  1428. package/dist/storage/file_system.cjs +12 -11
  1429. package/dist/storage/file_system.cjs.map +1 -1
  1430. package/dist/storage/file_system.d.cts +0 -1
  1431. package/dist/storage/file_system.d.cts.map +1 -1
  1432. package/dist/storage/file_system.d.ts +0 -1
  1433. package/dist/storage/file_system.d.ts.map +1 -1
  1434. package/dist/storage/file_system.js +5 -7
  1435. package/dist/storage/file_system.js.map +1 -1
  1436. package/dist/storage/in_memory.cjs +5 -5
  1437. package/dist/storage/in_memory.js +2 -3
  1438. package/dist/stores/doc/base.cjs +3 -3
  1439. package/dist/stores/doc/base.cjs.map +1 -1
  1440. package/dist/stores/doc/base.d.cts +0 -1
  1441. package/dist/stores/doc/base.d.cts.map +1 -1
  1442. package/dist/stores/doc/base.d.ts +0 -1
  1443. package/dist/stores/doc/base.d.ts.map +1 -1
  1444. package/dist/stores/doc/base.js +2 -3
  1445. package/dist/stores/doc/base.js.map +1 -1
  1446. package/dist/stores/doc/in_memory.cjs +3 -3
  1447. package/dist/stores/doc/in_memory.cjs.map +1 -1
  1448. package/dist/stores/doc/in_memory.d.cts +0 -1
  1449. package/dist/stores/doc/in_memory.d.cts.map +1 -1
  1450. package/dist/stores/doc/in_memory.d.ts +0 -1
  1451. package/dist/stores/doc/in_memory.d.ts.map +1 -1
  1452. package/dist/stores/doc/in_memory.js +2 -3
  1453. package/dist/stores/doc/in_memory.js.map +1 -1
  1454. package/dist/stores/file/base.cjs +3 -3
  1455. package/dist/stores/file/base.cjs.map +1 -1
  1456. package/dist/stores/file/base.d.cts +0 -1
  1457. package/dist/stores/file/base.d.cts.map +1 -1
  1458. package/dist/stores/file/base.d.ts +0 -1
  1459. package/dist/stores/file/base.d.ts.map +1 -1
  1460. package/dist/stores/file/base.js.map +1 -1
  1461. package/dist/stores/file/in_memory.cjs +3 -3
  1462. package/dist/stores/file/in_memory.cjs.map +1 -1
  1463. package/dist/stores/file/in_memory.d.cts +0 -1
  1464. package/dist/stores/file/in_memory.d.cts.map +1 -1
  1465. package/dist/stores/file/in_memory.d.ts +0 -1
  1466. package/dist/stores/file/in_memory.d.ts.map +1 -1
  1467. package/dist/stores/file/in_memory.js +2 -3
  1468. package/dist/stores/file/in_memory.js.map +1 -1
  1469. package/dist/stores/file/node.cjs +7 -6
  1470. package/dist/stores/file/node.cjs.map +1 -1
  1471. package/dist/stores/file/node.d.cts +0 -1
  1472. package/dist/stores/file/node.d.cts.map +1 -1
  1473. package/dist/stores/file/node.d.ts +0 -1
  1474. package/dist/stores/file/node.d.ts.map +1 -1
  1475. package/dist/stores/file/node.js +6 -7
  1476. package/dist/stores/file/node.js.map +1 -1
  1477. package/dist/stores/message/in_memory.cjs +5 -5
  1478. package/dist/stores/message/in_memory.js +2 -3
  1479. package/dist/text_splitter.cjs +7 -6
  1480. package/dist/text_splitter.d.cts +3 -2
  1481. package/dist/text_splitter.d.cts.map +1 -1
  1482. package/dist/text_splitter.d.ts +3 -2
  1483. package/dist/text_splitter.d.ts.map +1 -1
  1484. package/dist/text_splitter.js +4 -4
  1485. package/dist/tools/chain.cjs +6 -6
  1486. package/dist/tools/chain.cjs.map +1 -1
  1487. package/dist/tools/chain.d.cts +0 -1
  1488. package/dist/tools/chain.d.cts.map +1 -1
  1489. package/dist/tools/chain.d.ts +0 -1
  1490. package/dist/tools/chain.d.ts.map +1 -1
  1491. package/dist/tools/chain.js +3 -4
  1492. package/dist/tools/chain.js.map +1 -1
  1493. package/dist/tools/fs.cjs +6 -6
  1494. package/dist/tools/fs.cjs.map +1 -1
  1495. package/dist/tools/fs.d.cts +0 -1
  1496. package/dist/tools/fs.d.cts.map +1 -1
  1497. package/dist/tools/fs.d.ts +0 -1
  1498. package/dist/tools/fs.d.ts.map +1 -1
  1499. package/dist/tools/fs.js +1 -1
  1500. package/dist/tools/fs.js.map +1 -1
  1501. package/dist/tools/index.cjs +13 -13
  1502. package/dist/tools/index.js +2 -3
  1503. package/dist/tools/json.cjs +10 -11
  1504. package/dist/tools/json.cjs.map +1 -1
  1505. package/dist/tools/json.d.cts.map +1 -1
  1506. package/dist/tools/json.d.ts.map +1 -1
  1507. package/dist/tools/json.js +2 -4
  1508. package/dist/tools/json.js.map +1 -1
  1509. package/dist/tools/render.cjs +9 -9
  1510. package/dist/tools/render.cjs.map +1 -1
  1511. package/dist/tools/render.d.cts +0 -1
  1512. package/dist/tools/render.d.cts.map +1 -1
  1513. package/dist/tools/render.d.ts +0 -1
  1514. package/dist/tools/render.d.ts.map +1 -1
  1515. package/dist/tools/render.js +2 -3
  1516. package/dist/tools/render.js.map +1 -1
  1517. package/dist/tools/requests.cjs +7 -11
  1518. package/dist/tools/requests.cjs.map +1 -1
  1519. package/dist/tools/requests.d.cts.map +1 -1
  1520. package/dist/tools/requests.d.ts.map +1 -1
  1521. package/dist/tools/requests.js +3 -7
  1522. package/dist/tools/requests.js.map +1 -1
  1523. package/dist/tools/retriever.cjs +7 -8
  1524. package/dist/tools/retriever.cjs.map +1 -1
  1525. package/dist/tools/retriever.d.cts.map +1 -1
  1526. package/dist/tools/retriever.d.ts.map +1 -1
  1527. package/dist/tools/retriever.js +3 -5
  1528. package/dist/tools/retriever.js.map +1 -1
  1529. package/dist/tools/sql.cjs +11 -12
  1530. package/dist/tools/sql.cjs.map +1 -1
  1531. package/dist/tools/sql.d.cts +0 -1
  1532. package/dist/tools/sql.d.cts.map +1 -1
  1533. package/dist/tools/sql.d.ts +0 -1
  1534. package/dist/tools/sql.d.ts.map +1 -1
  1535. package/dist/tools/sql.js +3 -5
  1536. package/dist/tools/sql.js.map +1 -1
  1537. package/dist/tools/vectorstore.cjs +3 -3
  1538. package/dist/tools/vectorstore.cjs.map +1 -1
  1539. package/dist/tools/vectorstore.d.cts +0 -1
  1540. package/dist/tools/vectorstore.d.cts.map +1 -1
  1541. package/dist/tools/vectorstore.d.ts +0 -1
  1542. package/dist/tools/vectorstore.d.ts.map +1 -1
  1543. package/dist/tools/vectorstore.js.map +1 -1
  1544. package/dist/tools/webbrowser.cjs +18 -23
  1545. package/dist/tools/webbrowser.cjs.map +1 -1
  1546. package/dist/tools/webbrowser.d.cts.map +1 -1
  1547. package/dist/tools/webbrowser.d.ts +1 -1
  1548. package/dist/tools/webbrowser.d.ts.map +1 -1
  1549. package/dist/tools/webbrowser.js +9 -16
  1550. package/dist/tools/webbrowser.js.map +1 -1
  1551. package/dist/types/expression-parser.d.cts.map +1 -1
  1552. package/dist/types/expression-parser.d.ts.map +1 -1
  1553. package/dist/types/type-utils.d.cts.map +1 -1
  1554. package/dist/types/type-utils.d.ts.map +1 -1
  1555. package/dist/util/document.cjs +3 -3
  1556. package/dist/util/document.cjs.map +1 -1
  1557. package/dist/util/document.d.cts +0 -1
  1558. package/dist/util/document.d.cts.map +1 -1
  1559. package/dist/util/document.d.ts +0 -1
  1560. package/dist/util/document.d.ts.map +1 -1
  1561. package/dist/util/document.js +2 -3
  1562. package/dist/util/document.js.map +1 -1
  1563. package/dist/util/entrypoint_deprecation.js +2 -0
  1564. package/dist/util/env.cjs +2 -2
  1565. package/dist/util/env.js +2 -0
  1566. package/dist/util/extname.cjs.map +1 -1
  1567. package/dist/util/extname.js.map +1 -1
  1568. package/dist/util/hub.cjs +9 -11
  1569. package/dist/util/hub.cjs.map +1 -1
  1570. package/dist/util/hub.js +5 -7
  1571. package/dist/util/hub.js.map +1 -1
  1572. package/dist/util/is-network-error/index.cjs +2 -3
  1573. package/dist/util/is-network-error/index.cjs.map +1 -1
  1574. package/dist/util/is-network-error/index.js +2 -3
  1575. package/dist/util/is-network-error/index.js.map +1 -1
  1576. package/dist/util/load.cjs +1 -2
  1577. package/dist/util/load.cjs.map +1 -1
  1578. package/dist/util/load.d.cts.map +1 -1
  1579. package/dist/util/load.d.ts.map +1 -1
  1580. package/dist/util/load.js +1 -2
  1581. package/dist/util/load.js.map +1 -1
  1582. package/dist/util/math.cjs +7 -6
  1583. package/dist/util/math.js +4 -4
  1584. package/dist/util/ml-distance/distances.cjs.map +1 -1
  1585. package/dist/util/ml-distance/distances.js.map +1 -1
  1586. package/dist/util/ml-distance/similarities.cjs.map +1 -1
  1587. package/dist/util/ml-distance/similarities.d.cts.map +1 -1
  1588. package/dist/util/ml-distance/similarities.d.ts.map +1 -1
  1589. package/dist/util/ml-distance/similarities.js.map +1 -1
  1590. package/dist/util/ml-distance-euclidean/euclidean.cjs.map +1 -1
  1591. package/dist/util/ml-distance-euclidean/euclidean.js.map +1 -1
  1592. package/dist/util/openapi.cjs +6 -7
  1593. package/dist/util/openapi.cjs.map +1 -1
  1594. package/dist/util/openapi.d.cts.map +1 -1
  1595. package/dist/util/openapi.d.ts.map +1 -1
  1596. package/dist/util/openapi.js +3 -5
  1597. package/dist/util/openapi.js.map +1 -1
  1598. package/dist/util/p-retry/index.cjs +2 -2
  1599. package/dist/util/p-retry/index.cjs.map +1 -1
  1600. package/dist/util/p-retry/index.js +2 -2
  1601. package/dist/util/p-retry/index.js.map +1 -1
  1602. package/dist/util/parse.cjs +3 -2
  1603. package/dist/util/parse.cjs.map +1 -1
  1604. package/dist/util/parse.js.map +1 -1
  1605. package/dist/util/set.cjs.map +1 -1
  1606. package/dist/util/set.js.map +1 -1
  1607. package/dist/util/sql_utils.cjs +16 -28
  1608. package/dist/util/sql_utils.cjs.map +1 -1
  1609. package/dist/util/sql_utils.d.cts.map +1 -1
  1610. package/dist/util/sql_utils.d.ts.map +1 -1
  1611. package/dist/util/sql_utils.js +16 -28
  1612. package/dist/util/sql_utils.js.map +1 -1
  1613. package/dist/util/time.cjs +3 -3
  1614. package/dist/util/time.cjs.map +1 -1
  1615. package/dist/util/time.d.cts.map +1 -1
  1616. package/dist/util/time.d.ts.map +1 -1
  1617. package/dist/util/time.js +2 -3
  1618. package/dist/util/time.js.map +1 -1
  1619. package/dist/vectorstores/memory.cjs +15 -22
  1620. package/dist/vectorstores/memory.cjs.map +1 -1
  1621. package/dist/vectorstores/memory.d.cts +0 -1
  1622. package/dist/vectorstores/memory.d.cts.map +1 -1
  1623. package/dist/vectorstores/memory.d.ts +0 -1
  1624. package/dist/vectorstores/memory.d.ts.map +1 -1
  1625. package/dist/vectorstores/memory.js +9 -17
  1626. package/dist/vectorstores/memory.js.map +1 -1
  1627. package/package.json +18 -18
  1628. package/dist/_virtual/rolldown_runtime.js +0 -25
@@ -1 +1 @@
1
- {"version":3,"file":"file_system.cjs","names":["BaseStore","fields: { rootPath: string }","key: string","fs","e: any","content: Uint8Array","path","keys: string[]","values: (Uint8Array | undefined)[]","keyValuePairs: [string, Uint8Array][]","prefix?: string","rootPath: string"],"sources":["../../src/storage/file_system.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport { BaseStore } from \"@langchain/core/stores\";\n\n/**\n * File system implementation of the BaseStore using a dictionary. Used for\n * storing key-value pairs in the file system.\n * @example\n * ```typescript\n * const store = await LocalFileStore.fromPath(\"./messages\");\n * await store.mset(\n * Array.from({ length: 5 }).map((_, index) => [\n * `message:id:${index}`,\n * new TextEncoder().encode(\n * JSON.stringify(\n * index % 2 === 0\n * ? new AIMessage(\"ai stuff...\")\n * : new HumanMessage(\"human stuff...\"),\n * ),\n * ),\n * ]),\n * );\n * const retrievedMessages = await store.mget([\"message:id:0\", \"message:id:1\"]);\n * console.log(retrievedMessages.map((v) => new TextDecoder().decode(v)));\n * for await (const key of store.yieldKeys(\"message:id:\")) {\n * await store.mdelete([key]);\n * }\n * ```\n *\n * @security **Security Notice** This file store\n * can alter any text file in the provided directory and any subfolders.\n * Make sure that the path you specify when initializing the store is free\n * of other files.\n */\nexport class LocalFileStore extends BaseStore<string, Uint8Array> {\n lc_namespace = [\"langchain\", \"storage\"];\n\n rootPath: string;\n\n constructor(fields: { rootPath: string }) {\n super(fields);\n this.rootPath = fields.rootPath;\n }\n\n /**\n * Read and parse the file at the given path.\n * @param key The key to read the file for.\n * @returns Promise that resolves to the parsed file content.\n */\n private async getParsedFile(key: string): Promise<Uint8Array | undefined> {\n // Validate the key to prevent path traversal\n if (!/^[a-zA-Z0-9_\\-:.]+$/.test(key)) {\n throw new Error(\n \"Invalid key. Only alphanumeric characters, underscores, hyphens, colons, and periods are allowed.\"\n );\n }\n try {\n const fileContent = await fs.readFile(this.getFullPath(key));\n if (!fileContent) {\n return undefined;\n }\n return fileContent;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (e: any) {\n // File does not exist yet.\n if (\"code\" in e && e.code === \"ENOENT\") {\n return undefined;\n }\n throw new Error(\n `Error reading and parsing file at path: ${\n this.rootPath\n }.\\nError: ${JSON.stringify(e)}`\n );\n }\n }\n\n /**\n * Writes the given key-value pairs to the file at the given path.\n * @param fileContent An object with the key-value pairs to be written to the file.\n */\n private async setFileContent(content: Uint8Array, key: string) {\n try {\n await fs.writeFile(this.getFullPath(key), content);\n } catch (error) {\n throw new Error(\n `Error writing file at path: ${this.getFullPath(\n key\n )}.\\nError: ${JSON.stringify(error)}`\n );\n }\n }\n\n /**\n * Returns the full path of the file where the value of the given key is stored.\n * @param key the key to get the full path for\n */\n private getFullPath(key: string): string {\n try {\n const keyAsTxtFile = `${key}.txt`;\n\n // Validate the key to prevent path traversal\n if (!/^[a-zA-Z0-9_.\\-/]+$/.test(key)) {\n throw new Error(`Invalid characters in key: ${key}`);\n }\n\n const fullPath = path.resolve(this.rootPath, keyAsTxtFile);\n const commonPath = path.resolve(this.rootPath);\n\n if (!fullPath.startsWith(commonPath)) {\n throw new Error(\n `Invalid key: ${key}. Key should be relative to the root path. ` +\n `Root path: ${this.rootPath}, Full path: ${fullPath}`\n );\n }\n\n return fullPath;\n } catch (e) {\n throw new Error(\n `Error getting full path for key: ${key}.\\nError: ${String(e)}`\n );\n }\n }\n\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 async mget(keys: string[]) {\n const values: (Uint8Array | undefined)[] = [];\n for (const key of keys) {\n const fileContent = await this.getParsedFile(key);\n values.push(fileContent);\n }\n return values;\n }\n\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 async mset(keyValuePairs: [string, Uint8Array][]): Promise<void> {\n await Promise.all(\n keyValuePairs.map(([key, value]) => this.setFileContent(value, key))\n );\n }\n\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 async mdelete(keys: string[]): Promise<void> {\n await Promise.all(keys.map((key) => fs.unlink(this.getFullPath(key))));\n }\n\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 async *yieldKeys(prefix?: string): AsyncGenerator<string> {\n const allFiles = await fs.readdir(this.rootPath);\n const allKeys = allFiles.map((file) => file.replace(\".txt\", \"\"));\n for (const key of allKeys) {\n if (prefix === undefined || key.startsWith(prefix)) {\n yield key;\n }\n }\n }\n\n /**\n * Static method for initializing the class.\n * Preforms a check to see if the directory exists, and if not, creates it.\n * @param path Path to the directory.\n * @returns Promise that resolves to an instance of the class.\n */\n static async fromPath(rootPath: string): Promise<LocalFileStore> {\n try {\n // Verifies the directory exists at the provided path, and that it is readable and writable.\n await fs.access(rootPath, fs.constants.R_OK | fs.constants.W_OK);\n } catch {\n try {\n // Directory does not exist, create it.\n await fs.mkdir(rootPath, { recursive: true });\n } catch (error) {\n throw new Error(\n `An error occurred creating directory at: ${rootPath}.\\nError: ${JSON.stringify(\n error\n )}`\n );\n }\n }\n\n return new this({ rootPath });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAa,iBAAb,cAAoCA,kCAA8B;CAChE,eAAe,CAAC,aAAa,SAAU;CAEvC;CAEA,YAAYC,QAA8B;EACxC,MAAM,OAAO;EACb,KAAK,WAAW,OAAO;CACxB;;;;;;CAOD,MAAc,cAAcC,KAA8C;AAExE,MAAI,CAAC,sBAAsB,KAAK,IAAI,CAClC,OAAM,IAAI,MACR;AAGJ,MAAI;GACF,MAAM,cAAc,MAAMC,iBAAG,SAAS,KAAK,YAAY,IAAI,CAAC;AAC5D,OAAI,CAAC,YACH,QAAO;AAET,UAAO;EAER,SAAQC,GAAQ;AAEf,OAAI,UAAU,KAAK,EAAE,SAAS,SAC5B,QAAO;AAET,SAAM,IAAI,MACR,CAAC,wCAAwC,EACvC,KAAK,SACN,UAAU,EAAE,KAAK,UAAU,EAAE,EAAE;EAEnC;CACF;;;;;CAMD,MAAc,eAAeC,SAAqBH,KAAa;AAC7D,MAAI;GACF,MAAMC,iBAAG,UAAU,KAAK,YAAY,IAAI,EAAE,QAAQ;EACnD,SAAQ,OAAO;AACd,SAAM,IAAI,MACR,CAAC,4BAA4B,EAAE,KAAK,YAClC,IACD,CAAC,UAAU,EAAE,KAAK,UAAU,MAAM,EAAE;EAExC;CACF;;;;;CAMD,AAAQ,YAAYD,KAAqB;AACvC,MAAI;GACF,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC;AAGjC,OAAI,CAAC,sBAAsB,KAAK,IAAI,CAClC,OAAM,IAAI,MAAM,CAAC,2BAA2B,EAAE,KAAK;GAGrD,MAAM,WAAWI,UAAK,QAAQ,KAAK,UAAU,aAAa;GAC1D,MAAM,aAAaA,UAAK,QAAQ,KAAK,SAAS;AAE9C,OAAI,CAAC,SAAS,WAAW,WAAW,CAClC,OAAM,IAAI,MACR,CAAC,aAAa,EAAE,IAAI,sDAA2C,EAC/C,KAAK,SAAS,aAAa,EAAE,UAAU;AAI3D,UAAO;EACR,SAAQ,GAAG;AACV,SAAM,IAAI,MACR,CAAC,iCAAiC,EAAE,IAAI,UAAU,EAAE,OAAO,EAAE,EAAE;EAElE;CACF;;;;;;CAOD,MAAM,KAAKC,MAAgB;EACzB,MAAMC,SAAqC,CAAE;AAC7C,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,cAAc,MAAM,KAAK,cAAc,IAAI;GACjD,OAAO,KAAK,YAAY;EACzB;AACD,SAAO;CACR;;;;;;CAOD,MAAM,KAAKC,eAAsD;EAC/D,MAAM,QAAQ,IACZ,cAAc,IAAI,CAAC,CAAC,KAAK,MAAM,KAAK,KAAK,eAAe,OAAO,IAAI,CAAC,CACrE;CACF;;;;;;CAOD,MAAM,QAAQF,MAA+B;EAC3C,MAAM,QAAQ,IAAI,KAAK,IAAI,CAAC,QAAQJ,iBAAG,OAAO,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC;CACvE;;;;;;;CAQD,OAAO,UAAUO,QAAyC;EACxD,MAAM,WAAW,MAAMP,iBAAG,QAAQ,KAAK,SAAS;EAChD,MAAM,UAAU,SAAS,IAAI,CAAC,SAAS,KAAK,QAAQ,QAAQ,GAAG,CAAC;AAChE,OAAK,MAAM,OAAO,QAChB,KAAI,WAAW,UAAa,IAAI,WAAW,OAAO,EAChD,MAAM;CAGX;;;;;;;CAQD,aAAa,SAASQ,UAA2C;AAC/D,MAAI;GAEF,MAAMR,iBAAG,OAAO,UAAUA,iBAAG,UAAU,OAAOA,iBAAG,UAAU,KAAK;EACjE,QAAO;AACN,OAAI;IAEF,MAAMA,iBAAG,MAAM,UAAU,EAAE,WAAW,KAAM,EAAC;GAC9C,SAAQ,OAAO;AACd,UAAM,IAAI,MACR,CAAC,yCAAyC,EAAE,SAAS,UAAU,EAAE,KAAK,UACpE,MACD,EAAE;GAEN;EACF;AAED,SAAO,IAAI,KAAK,EAAE,SAAU;CAC7B;AACF"}
1
+ {"version":3,"file":"file_system.cjs","names":["BaseStore","fs","path"],"sources":["../../src/storage/file_system.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport { BaseStore } from \"@langchain/core/stores\";\n\n/**\n * File system implementation of the BaseStore using a dictionary. Used for\n * storing key-value pairs in the file system.\n * @example\n * ```typescript\n * const store = await LocalFileStore.fromPath(\"./messages\");\n * await store.mset(\n * Array.from({ length: 5 }).map((_, index) => [\n * `message:id:${index}`,\n * new TextEncoder().encode(\n * JSON.stringify(\n * index % 2 === 0\n * ? new AIMessage(\"ai stuff...\")\n * : new HumanMessage(\"human stuff...\"),\n * ),\n * ),\n * ]),\n * );\n * const retrievedMessages = await store.mget([\"message:id:0\", \"message:id:1\"]);\n * console.log(retrievedMessages.map((v) => new TextDecoder().decode(v)));\n * for await (const key of store.yieldKeys(\"message:id:\")) {\n * await store.mdelete([key]);\n * }\n * ```\n *\n * @security **Security Notice** This file store\n * can alter any text file in the provided directory and any subfolders.\n * Make sure that the path you specify when initializing the store is free\n * of other files.\n */\nexport class LocalFileStore extends BaseStore<string, Uint8Array> {\n lc_namespace = [\"langchain\", \"storage\"];\n\n rootPath: string;\n\n constructor(fields: { rootPath: string }) {\n super(fields);\n this.rootPath = fields.rootPath;\n }\n\n /**\n * Read and parse the file at the given path.\n * @param key The key to read the file for.\n * @returns Promise that resolves to the parsed file content.\n */\n private async getParsedFile(key: string): Promise<Uint8Array | undefined> {\n // Validate the key to prevent path traversal\n if (!/^[a-zA-Z0-9_\\-:.]+$/.test(key)) {\n throw new Error(\n \"Invalid key. Only alphanumeric characters, underscores, hyphens, colons, and periods are allowed.\"\n );\n }\n try {\n const fileContent = await fs.readFile(this.getFullPath(key));\n if (!fileContent) {\n return undefined;\n }\n return fileContent;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (e: any) {\n // File does not exist yet.\n if (\"code\" in e && e.code === \"ENOENT\") {\n return undefined;\n }\n throw new Error(\n `Error reading and parsing file at path: ${\n this.rootPath\n }.\\nError: ${JSON.stringify(e)}`\n );\n }\n }\n\n /**\n * Writes the given key-value pairs to the file at the given path.\n * @param fileContent An object with the key-value pairs to be written to the file.\n */\n private async setFileContent(content: Uint8Array, key: string) {\n try {\n await fs.writeFile(this.getFullPath(key), content);\n } catch (error) {\n throw new Error(\n `Error writing file at path: ${this.getFullPath(\n key\n )}.\\nError: ${JSON.stringify(error)}`\n );\n }\n }\n\n /**\n * Returns the full path of the file where the value of the given key is stored.\n * @param key the key to get the full path for\n */\n private getFullPath(key: string): string {\n try {\n const keyAsTxtFile = `${key}.txt`;\n\n // Validate the key to prevent path traversal\n if (!/^[a-zA-Z0-9_.\\-/]+$/.test(key)) {\n throw new Error(`Invalid characters in key: ${key}`);\n }\n\n const fullPath = path.resolve(this.rootPath, keyAsTxtFile);\n const commonPath = path.resolve(this.rootPath);\n\n if (!fullPath.startsWith(commonPath)) {\n throw new Error(\n `Invalid key: ${key}. Key should be relative to the root path. ` +\n `Root path: ${this.rootPath}, Full path: ${fullPath}`\n );\n }\n\n return fullPath;\n } catch (e) {\n throw new Error(\n `Error getting full path for key: ${key}.\\nError: ${String(e)}`\n );\n }\n }\n\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 async mget(keys: string[]) {\n const values: (Uint8Array | undefined)[] = [];\n for (const key of keys) {\n const fileContent = await this.getParsedFile(key);\n values.push(fileContent);\n }\n return values;\n }\n\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 async mset(keyValuePairs: [string, Uint8Array][]): Promise<void> {\n await Promise.all(\n keyValuePairs.map(([key, value]) => this.setFileContent(value, key))\n );\n }\n\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 async mdelete(keys: string[]): Promise<void> {\n await Promise.all(keys.map((key) => fs.unlink(this.getFullPath(key))));\n }\n\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 async *yieldKeys(prefix?: string): AsyncGenerator<string> {\n const allFiles = await fs.readdir(this.rootPath);\n const allKeys = allFiles.map((file) => file.replace(\".txt\", \"\"));\n for (const key of allKeys) {\n if (prefix === undefined || key.startsWith(prefix)) {\n yield key;\n }\n }\n }\n\n /**\n * Static method for initializing the class.\n * Preforms a check to see if the directory exists, and if not, creates it.\n * @param path Path to the directory.\n * @returns Promise that resolves to an instance of the class.\n */\n static async fromPath(rootPath: string): Promise<LocalFileStore> {\n try {\n // Verifies the directory exists at the provided path, and that it is readable and writable.\n await fs.access(rootPath, fs.constants.R_OK | fs.constants.W_OK);\n } catch {\n try {\n // Directory does not exist, create it.\n await fs.mkdir(rootPath, { recursive: true });\n } catch (error) {\n throw new Error(\n `An error occurred creating directory at: ${rootPath}.\\nError: ${JSON.stringify(\n error\n )}`\n );\n }\n }\n\n return new this({ rootPath });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAa,iBAAb,cAAoCA,iCAA8B;CAChE,eAAe,CAAC,aAAa,UAAU;CAEvC;CAEA,YAAY,QAA8B;AACxC,QAAM,OAAO;AACb,OAAK,WAAW,OAAO;;;;;;;CAQzB,MAAc,cAAc,KAA8C;AAExE,MAAI,CAAC,sBAAsB,KAAK,IAAI,CAClC,OAAM,IAAI,MACR,oGACD;AAEH,MAAI;GACF,MAAM,cAAc,MAAMC,iBAAG,SAAS,KAAK,YAAY,IAAI,CAAC;AAC5D,OAAI,CAAC,YACH;AAEF,UAAO;WAEA,GAAQ;AAEf,OAAI,UAAU,KAAK,EAAE,SAAS,SAC5B;AAEF,SAAM,IAAI,MACR,2CACE,KAAK,SACN,YAAY,KAAK,UAAU,EAAE,GAC/B;;;;;;;CAQL,MAAc,eAAe,SAAqB,KAAa;AAC7D,MAAI;AACF,SAAMA,iBAAG,UAAU,KAAK,YAAY,IAAI,EAAE,QAAQ;WAC3C,OAAO;AACd,SAAM,IAAI,MACR,+BAA+B,KAAK,YAClC,IACD,CAAC,YAAY,KAAK,UAAU,MAAM,GACpC;;;;;;;CAQL,AAAQ,YAAY,KAAqB;AACvC,MAAI;GACF,MAAM,eAAe,GAAG,IAAI;AAG5B,OAAI,CAAC,sBAAsB,KAAK,IAAI,CAClC,OAAM,IAAI,MAAM,8BAA8B,MAAM;GAGtD,MAAM,WAAWC,UAAK,QAAQ,KAAK,UAAU,aAAa;GAC1D,MAAM,aAAaA,UAAK,QAAQ,KAAK,SAAS;AAE9C,OAAI,CAAC,SAAS,WAAW,WAAW,CAClC,OAAM,IAAI,MACR,gBAAgB,IAAI,wDACJ,KAAK,SAAS,eAAe,WAC9C;AAGH,UAAO;WACA,GAAG;AACV,SAAM,IAAI,MACR,oCAAoC,IAAI,YAAY,OAAO,EAAE,GAC9D;;;;;;;;CASL,MAAM,KAAK,MAAgB;EACzB,MAAM,SAAqC,EAAE;AAC7C,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,cAAc,MAAM,KAAK,cAAc,IAAI;AACjD,UAAO,KAAK,YAAY;;AAE1B,SAAO;;;;;;;CAQT,MAAM,KAAK,eAAsD;AAC/D,QAAM,QAAQ,IACZ,cAAc,KAAK,CAAC,KAAK,WAAW,KAAK,eAAe,OAAO,IAAI,CAAC,CACrE;;;;;;;CAQH,MAAM,QAAQ,MAA+B;AAC3C,QAAM,QAAQ,IAAI,KAAK,KAAK,QAAQD,iBAAG,OAAO,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC;;;;;;;;CASxE,OAAO,UAAU,QAAyC;EAExD,MAAM,WADW,MAAMA,iBAAG,QAAQ,KAAK,SAAS,EACvB,KAAK,SAAS,KAAK,QAAQ,QAAQ,GAAG,CAAC;AAChE,OAAK,MAAM,OAAO,QAChB,KAAI,WAAW,UAAa,IAAI,WAAW,OAAO,CAChD,OAAM;;;;;;;;CAWZ,aAAa,SAAS,UAA2C;AAC/D,MAAI;AAEF,SAAMA,iBAAG,OAAO,UAAUA,iBAAG,UAAU,OAAOA,iBAAG,UAAU,KAAK;UAC1D;AACN,OAAI;AAEF,UAAMA,iBAAG,MAAM,UAAU,EAAE,WAAW,MAAM,CAAC;YACtC,OAAO;AACd,UAAM,IAAI,MACR,4CAA4C,SAAS,YAAY,KAAK,UACpE,MACD,GACF;;;AAIL,SAAO,IAAI,KAAK,EAAE,UAAU,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { BaseStore } from "@langchain/core/stores";
2
2
 
3
3
  //#region src/storage/file_system.d.ts
4
-
5
4
  /**
6
5
  * File system implementation of the BaseStore using a dictionary. Used for
7
6
  * storing key-value pairs in the file system.
@@ -1 +1 @@
1
- {"version":3,"file":"file_system.d.cts","names":["BaseStore","LocalFileStore","Uint8Array","ArrayBufferLike","Promise","AsyncGenerator"],"sources":["../../src/storage/file_system.d.ts"],"sourcesContent":["import { BaseStore } from \"@langchain/core/stores\";\n/**\n * File system implementation of the BaseStore using a dictionary. Used for\n * storing key-value pairs in the file system.\n * @example\n * ```typescript\n * const store = await LocalFileStore.fromPath(\"./messages\");\n * await store.mset(\n * Array.from({ length: 5 }).map((_, index) => [\n * `message:id:${index}`,\n * new TextEncoder().encode(\n * JSON.stringify(\n * index % 2 === 0\n * ? new AIMessage(\"ai stuff...\")\n * : new HumanMessage(\"human stuff...\"),\n * ),\n * ),\n * ]),\n * );\n * const retrievedMessages = await store.mget([\"message:id:0\", \"message:id:1\"]);\n * console.log(retrievedMessages.map((v) => new TextDecoder().decode(v)));\n * for await (const key of store.yieldKeys(\"message:id:\")) {\n * await store.mdelete([key]);\n * }\n * ```\n *\n * @security **Security Notice** This file store\n * can alter any text file in the provided directory and any subfolders.\n * Make sure that the path you specify when initializing the store is free\n * of other files.\n */\nexport declare class LocalFileStore extends BaseStore<string, Uint8Array> {\n lc_namespace: string[];\n rootPath: string;\n constructor(fields: {\n rootPath: string;\n });\n private getParsedFile;\n private setFileContent;\n /**\n * Returns the full path of the file where the value of the given key is stored.\n * @param key the key to get the full path for\n */\n private getFullPath;\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<(Uint8Array<ArrayBufferLike> | undefined)[]>;\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, Uint8Array][]): 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): AsyncGenerator<string>;\n /**\n * Static method for initializing the class.\n * Preforms a check to see if the directory exists, and if not, creates it.\n * @param path Path to the directory.\n * @returns Promise that resolves to an instance of the class.\n */\n static fromPath(rootPath: string): Promise<LocalFileStore>;\n}\n//# sourceMappingURL=file_system.d.ts.map"],"mappings":";;;;;;AA+BA;;;;;;;;;;;;AAAqD;;;;;;;;;;;;;;;;cAAhCC,cAAAA,SAAuBD,kBAAkBE;;;;;;;;;;;;;;;;;;wBAkBpCE,SAASF,WAAWC;;;;;;+BAMbD,gBAAgBE;;;;;;2BAMpBA;;;;;;;8BAOGC;;;;;;;qCAOOD,QAAQH"}
1
+ {"version":3,"file":"file_system.d.cts","names":[],"sources":["../../src/storage/file_system.ts"],"mappings":";;;;;AAkCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,cAAA,SAAuB,SAAA,SAAkB,UAAA;EACpD,YAAA;EAEA,QAAA;EAEA,WAAA,CAAY,MAAA;IAAU,QAAA;EAAA;EAAA,QAUR,aAAA;EAAA,QA+BA,cAAA;EAyEA;;;;EAAA,QAzDN,WAAA;EAmFK;;;;;EAnDP,IAAA,CAAK,IAAA,aAAc,OAAA,EAAA,UAAA,CAAA,eAAA;;;;;;EAcnB,IAAA,CAAK,aAAA,WAAwB,UAAA,MAAgB,OAAA;;;;;;EAW7C,OAAA,CAAQ,IAAA,aAAiB,OAAA;;;;;;;EAUxB,SAAA,CAAU,MAAA,YAAkB,cAAA;;;;;;;SAgBtB,QAAA,CAAS,QAAA,WAAmB,OAAA,CAAQ,cAAA;AAAA"}
@@ -1,7 +1,6 @@
1
1
  import { BaseStore } from "@langchain/core/stores";
2
2
 
3
3
  //#region src/storage/file_system.d.ts
4
-
5
4
  /**
6
5
  * File system implementation of the BaseStore using a dictionary. Used for
7
6
  * storing key-value pairs in the file system.
@@ -1 +1 @@
1
- {"version":3,"file":"file_system.d.ts","names":["BaseStore","LocalFileStore","Uint8Array","ArrayBufferLike","Promise","AsyncGenerator"],"sources":["../../src/storage/file_system.d.ts"],"sourcesContent":["import { BaseStore } from \"@langchain/core/stores\";\n/**\n * File system implementation of the BaseStore using a dictionary. Used for\n * storing key-value pairs in the file system.\n * @example\n * ```typescript\n * const store = await LocalFileStore.fromPath(\"./messages\");\n * await store.mset(\n * Array.from({ length: 5 }).map((_, index) => [\n * `message:id:${index}`,\n * new TextEncoder().encode(\n * JSON.stringify(\n * index % 2 === 0\n * ? new AIMessage(\"ai stuff...\")\n * : new HumanMessage(\"human stuff...\"),\n * ),\n * ),\n * ]),\n * );\n * const retrievedMessages = await store.mget([\"message:id:0\", \"message:id:1\"]);\n * console.log(retrievedMessages.map((v) => new TextDecoder().decode(v)));\n * for await (const key of store.yieldKeys(\"message:id:\")) {\n * await store.mdelete([key]);\n * }\n * ```\n *\n * @security **Security Notice** This file store\n * can alter any text file in the provided directory and any subfolders.\n * Make sure that the path you specify when initializing the store is free\n * of other files.\n */\nexport declare class LocalFileStore extends BaseStore<string, Uint8Array> {\n lc_namespace: string[];\n rootPath: string;\n constructor(fields: {\n rootPath: string;\n });\n private getParsedFile;\n private setFileContent;\n /**\n * Returns the full path of the file where the value of the given key is stored.\n * @param key the key to get the full path for\n */\n private getFullPath;\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<(Uint8Array<ArrayBufferLike> | undefined)[]>;\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, Uint8Array][]): 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): AsyncGenerator<string>;\n /**\n * Static method for initializing the class.\n * Preforms a check to see if the directory exists, and if not, creates it.\n * @param path Path to the directory.\n * @returns Promise that resolves to an instance of the class.\n */\n static fromPath(rootPath: string): Promise<LocalFileStore>;\n}\n//# sourceMappingURL=file_system.d.ts.map"],"mappings":";;;;;;AA+BA;;;;;;;;;;;;AAAqD;;;;;;;;;;;;;;;;cAAhCC,cAAAA,SAAuBD,kBAAkBE;;;;;;;;;;;;;;;;;;wBAkBpCE,SAASF,WAAWC;;;;;;+BAMbD,gBAAgBE;;;;;;2BAMpBA;;;;;;;8BAOGC;;;;;;;qCAOOD,QAAQH"}
1
+ {"version":3,"file":"file_system.d.ts","names":[],"sources":["../../src/storage/file_system.ts"],"mappings":";;;;;AAkCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,cAAA,SAAuB,SAAA,SAAkB,UAAA;EACpD,YAAA;EAEA,QAAA;EAEA,WAAA,CAAY,MAAA;IAAU,QAAA;EAAA;EAAA,QAUR,aAAA;EAAA,QA+BA,cAAA;EAyEA;;;;EAAA,QAzDN,WAAA;EAmFK;;;;;EAnDP,IAAA,CAAK,IAAA,aAAc,OAAA,EAAA,UAAA,CAAA,eAAA;;;;;;EAcnB,IAAA,CAAK,aAAA,WAAwB,UAAA,MAAgB,OAAA;;;;;;EAW7C,OAAA,CAAQ,IAAA,aAAiB,OAAA;;;;;;;EAUxB,SAAA,CAAU,MAAA,YAAkB,cAAA;;;;;;;SAgBtB,QAAA,CAAS,QAAA,WAAmB,OAAA,CAAQ,cAAA;AAAA"}
@@ -1,11 +1,10 @@
1
- import { __export } from "../_virtual/rolldown_runtime.js";
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import * as path$1 from "node:path";
3
3
  import * as fs$1 from "node:fs/promises";
4
4
  import { BaseStore } from "@langchain/core/stores";
5
5
 
6
6
  //#region src/storage/file_system.ts
7
- var file_system_exports = {};
8
- __export(file_system_exports, { LocalFileStore: () => LocalFileStore });
7
+ var file_system_exports = /* @__PURE__ */ __exportAll({ LocalFileStore: () => LocalFileStore });
9
8
  /**
10
9
  * File system implementation of the BaseStore using a dictionary. Used for
11
10
  * storing key-value pairs in the file system.
@@ -52,10 +51,10 @@ var LocalFileStore = class extends BaseStore {
52
51
  if (!/^[a-zA-Z0-9_\-:.]+$/.test(key)) throw new Error("Invalid key. Only alphanumeric characters, underscores, hyphens, colons, and periods are allowed.");
53
52
  try {
54
53
  const fileContent = await fs$1.readFile(this.getFullPath(key));
55
- if (!fileContent) return void 0;
54
+ if (!fileContent) return;
56
55
  return fileContent;
57
56
  } catch (e) {
58
- if ("code" in e && e.code === "ENOENT") return void 0;
57
+ if ("code" in e && e.code === "ENOENT") return;
59
58
  throw new Error(`Error reading and parsing file at path: ${this.rootPath}.\nError: ${JSON.stringify(e)}`);
60
59
  }
61
60
  }
@@ -122,8 +121,7 @@ var LocalFileStore = class extends BaseStore {
122
121
  * @returns AsyncGenerator that yields keys from the store.
123
122
  */
124
123
  async *yieldKeys(prefix) {
125
- const allFiles = await fs$1.readdir(this.rootPath);
126
- const allKeys = allFiles.map((file) => file.replace(".txt", ""));
124
+ const allKeys = (await fs$1.readdir(this.rootPath)).map((file) => file.replace(".txt", ""));
127
125
  for (const key of allKeys) if (prefix === void 0 || key.startsWith(prefix)) yield key;
128
126
  }
129
127
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"file_system.js","names":["fields: { rootPath: string }","key: string","fs","e: any","content: Uint8Array","path","keys: string[]","values: (Uint8Array | undefined)[]","keyValuePairs: [string, Uint8Array][]","prefix?: string","rootPath: string"],"sources":["../../src/storage/file_system.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport { BaseStore } from \"@langchain/core/stores\";\n\n/**\n * File system implementation of the BaseStore using a dictionary. Used for\n * storing key-value pairs in the file system.\n * @example\n * ```typescript\n * const store = await LocalFileStore.fromPath(\"./messages\");\n * await store.mset(\n * Array.from({ length: 5 }).map((_, index) => [\n * `message:id:${index}`,\n * new TextEncoder().encode(\n * JSON.stringify(\n * index % 2 === 0\n * ? new AIMessage(\"ai stuff...\")\n * : new HumanMessage(\"human stuff...\"),\n * ),\n * ),\n * ]),\n * );\n * const retrievedMessages = await store.mget([\"message:id:0\", \"message:id:1\"]);\n * console.log(retrievedMessages.map((v) => new TextDecoder().decode(v)));\n * for await (const key of store.yieldKeys(\"message:id:\")) {\n * await store.mdelete([key]);\n * }\n * ```\n *\n * @security **Security Notice** This file store\n * can alter any text file in the provided directory and any subfolders.\n * Make sure that the path you specify when initializing the store is free\n * of other files.\n */\nexport class LocalFileStore extends BaseStore<string, Uint8Array> {\n lc_namespace = [\"langchain\", \"storage\"];\n\n rootPath: string;\n\n constructor(fields: { rootPath: string }) {\n super(fields);\n this.rootPath = fields.rootPath;\n }\n\n /**\n * Read and parse the file at the given path.\n * @param key The key to read the file for.\n * @returns Promise that resolves to the parsed file content.\n */\n private async getParsedFile(key: string): Promise<Uint8Array | undefined> {\n // Validate the key to prevent path traversal\n if (!/^[a-zA-Z0-9_\\-:.]+$/.test(key)) {\n throw new Error(\n \"Invalid key. Only alphanumeric characters, underscores, hyphens, colons, and periods are allowed.\"\n );\n }\n try {\n const fileContent = await fs.readFile(this.getFullPath(key));\n if (!fileContent) {\n return undefined;\n }\n return fileContent;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (e: any) {\n // File does not exist yet.\n if (\"code\" in e && e.code === \"ENOENT\") {\n return undefined;\n }\n throw new Error(\n `Error reading and parsing file at path: ${\n this.rootPath\n }.\\nError: ${JSON.stringify(e)}`\n );\n }\n }\n\n /**\n * Writes the given key-value pairs to the file at the given path.\n * @param fileContent An object with the key-value pairs to be written to the file.\n */\n private async setFileContent(content: Uint8Array, key: string) {\n try {\n await fs.writeFile(this.getFullPath(key), content);\n } catch (error) {\n throw new Error(\n `Error writing file at path: ${this.getFullPath(\n key\n )}.\\nError: ${JSON.stringify(error)}`\n );\n }\n }\n\n /**\n * Returns the full path of the file where the value of the given key is stored.\n * @param key the key to get the full path for\n */\n private getFullPath(key: string): string {\n try {\n const keyAsTxtFile = `${key}.txt`;\n\n // Validate the key to prevent path traversal\n if (!/^[a-zA-Z0-9_.\\-/]+$/.test(key)) {\n throw new Error(`Invalid characters in key: ${key}`);\n }\n\n const fullPath = path.resolve(this.rootPath, keyAsTxtFile);\n const commonPath = path.resolve(this.rootPath);\n\n if (!fullPath.startsWith(commonPath)) {\n throw new Error(\n `Invalid key: ${key}. Key should be relative to the root path. ` +\n `Root path: ${this.rootPath}, Full path: ${fullPath}`\n );\n }\n\n return fullPath;\n } catch (e) {\n throw new Error(\n `Error getting full path for key: ${key}.\\nError: ${String(e)}`\n );\n }\n }\n\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 async mget(keys: string[]) {\n const values: (Uint8Array | undefined)[] = [];\n for (const key of keys) {\n const fileContent = await this.getParsedFile(key);\n values.push(fileContent);\n }\n return values;\n }\n\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 async mset(keyValuePairs: [string, Uint8Array][]): Promise<void> {\n await Promise.all(\n keyValuePairs.map(([key, value]) => this.setFileContent(value, key))\n );\n }\n\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 async mdelete(keys: string[]): Promise<void> {\n await Promise.all(keys.map((key) => fs.unlink(this.getFullPath(key))));\n }\n\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 async *yieldKeys(prefix?: string): AsyncGenerator<string> {\n const allFiles = await fs.readdir(this.rootPath);\n const allKeys = allFiles.map((file) => file.replace(\".txt\", \"\"));\n for (const key of allKeys) {\n if (prefix === undefined || key.startsWith(prefix)) {\n yield key;\n }\n }\n }\n\n /**\n * Static method for initializing the class.\n * Preforms a check to see if the directory exists, and if not, creates it.\n * @param path Path to the directory.\n * @returns Promise that resolves to an instance of the class.\n */\n static async fromPath(rootPath: string): Promise<LocalFileStore> {\n try {\n // Verifies the directory exists at the provided path, and that it is readable and writable.\n await fs.access(rootPath, fs.constants.R_OK | fs.constants.W_OK);\n } catch {\n try {\n // Directory does not exist, create it.\n await fs.mkdir(rootPath, { recursive: true });\n } catch (error) {\n throw new Error(\n `An error occurred creating directory at: ${rootPath}.\\nError: ${JSON.stringify(\n error\n )}`\n );\n }\n }\n\n return new this({ rootPath });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAa,iBAAb,cAAoC,UAA8B;CAChE,eAAe,CAAC,aAAa,SAAU;CAEvC;CAEA,YAAYA,QAA8B;EACxC,MAAM,OAAO;EACb,KAAK,WAAW,OAAO;CACxB;;;;;;CAOD,MAAc,cAAcC,KAA8C;AAExE,MAAI,CAAC,sBAAsB,KAAK,IAAI,CAClC,OAAM,IAAI,MACR;AAGJ,MAAI;GACF,MAAM,cAAc,MAAMC,KAAG,SAAS,KAAK,YAAY,IAAI,CAAC;AAC5D,OAAI,CAAC,YACH,QAAO;AAET,UAAO;EAER,SAAQC,GAAQ;AAEf,OAAI,UAAU,KAAK,EAAE,SAAS,SAC5B,QAAO;AAET,SAAM,IAAI,MACR,CAAC,wCAAwC,EACvC,KAAK,SACN,UAAU,EAAE,KAAK,UAAU,EAAE,EAAE;EAEnC;CACF;;;;;CAMD,MAAc,eAAeC,SAAqBH,KAAa;AAC7D,MAAI;GACF,MAAMC,KAAG,UAAU,KAAK,YAAY,IAAI,EAAE,QAAQ;EACnD,SAAQ,OAAO;AACd,SAAM,IAAI,MACR,CAAC,4BAA4B,EAAE,KAAK,YAClC,IACD,CAAC,UAAU,EAAE,KAAK,UAAU,MAAM,EAAE;EAExC;CACF;;;;;CAMD,AAAQ,YAAYD,KAAqB;AACvC,MAAI;GACF,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC;AAGjC,OAAI,CAAC,sBAAsB,KAAK,IAAI,CAClC,OAAM,IAAI,MAAM,CAAC,2BAA2B,EAAE,KAAK;GAGrD,MAAM,WAAWI,OAAK,QAAQ,KAAK,UAAU,aAAa;GAC1D,MAAM,aAAaA,OAAK,QAAQ,KAAK,SAAS;AAE9C,OAAI,CAAC,SAAS,WAAW,WAAW,CAClC,OAAM,IAAI,MACR,CAAC,aAAa,EAAE,IAAI,sDAA2C,EAC/C,KAAK,SAAS,aAAa,EAAE,UAAU;AAI3D,UAAO;EACR,SAAQ,GAAG;AACV,SAAM,IAAI,MACR,CAAC,iCAAiC,EAAE,IAAI,UAAU,EAAE,OAAO,EAAE,EAAE;EAElE;CACF;;;;;;CAOD,MAAM,KAAKC,MAAgB;EACzB,MAAMC,SAAqC,CAAE;AAC7C,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,cAAc,MAAM,KAAK,cAAc,IAAI;GACjD,OAAO,KAAK,YAAY;EACzB;AACD,SAAO;CACR;;;;;;CAOD,MAAM,KAAKC,eAAsD;EAC/D,MAAM,QAAQ,IACZ,cAAc,IAAI,CAAC,CAAC,KAAK,MAAM,KAAK,KAAK,eAAe,OAAO,IAAI,CAAC,CACrE;CACF;;;;;;CAOD,MAAM,QAAQF,MAA+B;EAC3C,MAAM,QAAQ,IAAI,KAAK,IAAI,CAAC,QAAQJ,KAAG,OAAO,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC;CACvE;;;;;;;CAQD,OAAO,UAAUO,QAAyC;EACxD,MAAM,WAAW,MAAMP,KAAG,QAAQ,KAAK,SAAS;EAChD,MAAM,UAAU,SAAS,IAAI,CAAC,SAAS,KAAK,QAAQ,QAAQ,GAAG,CAAC;AAChE,OAAK,MAAM,OAAO,QAChB,KAAI,WAAW,UAAa,IAAI,WAAW,OAAO,EAChD,MAAM;CAGX;;;;;;;CAQD,aAAa,SAASQ,UAA2C;AAC/D,MAAI;GAEF,MAAMR,KAAG,OAAO,UAAUA,KAAG,UAAU,OAAOA,KAAG,UAAU,KAAK;EACjE,QAAO;AACN,OAAI;IAEF,MAAMA,KAAG,MAAM,UAAU,EAAE,WAAW,KAAM,EAAC;GAC9C,SAAQ,OAAO;AACd,UAAM,IAAI,MACR,CAAC,yCAAyC,EAAE,SAAS,UAAU,EAAE,KAAK,UACpE,MACD,EAAE;GAEN;EACF;AAED,SAAO,IAAI,KAAK,EAAE,SAAU;CAC7B;AACF"}
1
+ {"version":3,"file":"file_system.js","names":["fs","path"],"sources":["../../src/storage/file_system.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport { BaseStore } from \"@langchain/core/stores\";\n\n/**\n * File system implementation of the BaseStore using a dictionary. Used for\n * storing key-value pairs in the file system.\n * @example\n * ```typescript\n * const store = await LocalFileStore.fromPath(\"./messages\");\n * await store.mset(\n * Array.from({ length: 5 }).map((_, index) => [\n * `message:id:${index}`,\n * new TextEncoder().encode(\n * JSON.stringify(\n * index % 2 === 0\n * ? new AIMessage(\"ai stuff...\")\n * : new HumanMessage(\"human stuff...\"),\n * ),\n * ),\n * ]),\n * );\n * const retrievedMessages = await store.mget([\"message:id:0\", \"message:id:1\"]);\n * console.log(retrievedMessages.map((v) => new TextDecoder().decode(v)));\n * for await (const key of store.yieldKeys(\"message:id:\")) {\n * await store.mdelete([key]);\n * }\n * ```\n *\n * @security **Security Notice** This file store\n * can alter any text file in the provided directory and any subfolders.\n * Make sure that the path you specify when initializing the store is free\n * of other files.\n */\nexport class LocalFileStore extends BaseStore<string, Uint8Array> {\n lc_namespace = [\"langchain\", \"storage\"];\n\n rootPath: string;\n\n constructor(fields: { rootPath: string }) {\n super(fields);\n this.rootPath = fields.rootPath;\n }\n\n /**\n * Read and parse the file at the given path.\n * @param key The key to read the file for.\n * @returns Promise that resolves to the parsed file content.\n */\n private async getParsedFile(key: string): Promise<Uint8Array | undefined> {\n // Validate the key to prevent path traversal\n if (!/^[a-zA-Z0-9_\\-:.]+$/.test(key)) {\n throw new Error(\n \"Invalid key. Only alphanumeric characters, underscores, hyphens, colons, and periods are allowed.\"\n );\n }\n try {\n const fileContent = await fs.readFile(this.getFullPath(key));\n if (!fileContent) {\n return undefined;\n }\n return fileContent;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (e: any) {\n // File does not exist yet.\n if (\"code\" in e && e.code === \"ENOENT\") {\n return undefined;\n }\n throw new Error(\n `Error reading and parsing file at path: ${\n this.rootPath\n }.\\nError: ${JSON.stringify(e)}`\n );\n }\n }\n\n /**\n * Writes the given key-value pairs to the file at the given path.\n * @param fileContent An object with the key-value pairs to be written to the file.\n */\n private async setFileContent(content: Uint8Array, key: string) {\n try {\n await fs.writeFile(this.getFullPath(key), content);\n } catch (error) {\n throw new Error(\n `Error writing file at path: ${this.getFullPath(\n key\n )}.\\nError: ${JSON.stringify(error)}`\n );\n }\n }\n\n /**\n * Returns the full path of the file where the value of the given key is stored.\n * @param key the key to get the full path for\n */\n private getFullPath(key: string): string {\n try {\n const keyAsTxtFile = `${key}.txt`;\n\n // Validate the key to prevent path traversal\n if (!/^[a-zA-Z0-9_.\\-/]+$/.test(key)) {\n throw new Error(`Invalid characters in key: ${key}`);\n }\n\n const fullPath = path.resolve(this.rootPath, keyAsTxtFile);\n const commonPath = path.resolve(this.rootPath);\n\n if (!fullPath.startsWith(commonPath)) {\n throw new Error(\n `Invalid key: ${key}. Key should be relative to the root path. ` +\n `Root path: ${this.rootPath}, Full path: ${fullPath}`\n );\n }\n\n return fullPath;\n } catch (e) {\n throw new Error(\n `Error getting full path for key: ${key}.\\nError: ${String(e)}`\n );\n }\n }\n\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 async mget(keys: string[]) {\n const values: (Uint8Array | undefined)[] = [];\n for (const key of keys) {\n const fileContent = await this.getParsedFile(key);\n values.push(fileContent);\n }\n return values;\n }\n\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 async mset(keyValuePairs: [string, Uint8Array][]): Promise<void> {\n await Promise.all(\n keyValuePairs.map(([key, value]) => this.setFileContent(value, key))\n );\n }\n\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 async mdelete(keys: string[]): Promise<void> {\n await Promise.all(keys.map((key) => fs.unlink(this.getFullPath(key))));\n }\n\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 async *yieldKeys(prefix?: string): AsyncGenerator<string> {\n const allFiles = await fs.readdir(this.rootPath);\n const allKeys = allFiles.map((file) => file.replace(\".txt\", \"\"));\n for (const key of allKeys) {\n if (prefix === undefined || key.startsWith(prefix)) {\n yield key;\n }\n }\n }\n\n /**\n * Static method for initializing the class.\n * Preforms a check to see if the directory exists, and if not, creates it.\n * @param path Path to the directory.\n * @returns Promise that resolves to an instance of the class.\n */\n static async fromPath(rootPath: string): Promise<LocalFileStore> {\n try {\n // Verifies the directory exists at the provided path, and that it is readable and writable.\n await fs.access(rootPath, fs.constants.R_OK | fs.constants.W_OK);\n } catch {\n try {\n // Directory does not exist, create it.\n await fs.mkdir(rootPath, { recursive: true });\n } catch (error) {\n throw new Error(\n `An error occurred creating directory at: ${rootPath}.\\nError: ${JSON.stringify(\n error\n )}`\n );\n }\n }\n\n return new this({ rootPath });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAa,iBAAb,cAAoC,UAA8B;CAChE,eAAe,CAAC,aAAa,UAAU;CAEvC;CAEA,YAAY,QAA8B;AACxC,QAAM,OAAO;AACb,OAAK,WAAW,OAAO;;;;;;;CAQzB,MAAc,cAAc,KAA8C;AAExE,MAAI,CAAC,sBAAsB,KAAK,IAAI,CAClC,OAAM,IAAI,MACR,oGACD;AAEH,MAAI;GACF,MAAM,cAAc,MAAMA,KAAG,SAAS,KAAK,YAAY,IAAI,CAAC;AAC5D,OAAI,CAAC,YACH;AAEF,UAAO;WAEA,GAAQ;AAEf,OAAI,UAAU,KAAK,EAAE,SAAS,SAC5B;AAEF,SAAM,IAAI,MACR,2CACE,KAAK,SACN,YAAY,KAAK,UAAU,EAAE,GAC/B;;;;;;;CAQL,MAAc,eAAe,SAAqB,KAAa;AAC7D,MAAI;AACF,SAAMA,KAAG,UAAU,KAAK,YAAY,IAAI,EAAE,QAAQ;WAC3C,OAAO;AACd,SAAM,IAAI,MACR,+BAA+B,KAAK,YAClC,IACD,CAAC,YAAY,KAAK,UAAU,MAAM,GACpC;;;;;;;CAQL,AAAQ,YAAY,KAAqB;AACvC,MAAI;GACF,MAAM,eAAe,GAAG,IAAI;AAG5B,OAAI,CAAC,sBAAsB,KAAK,IAAI,CAClC,OAAM,IAAI,MAAM,8BAA8B,MAAM;GAGtD,MAAM,WAAWC,OAAK,QAAQ,KAAK,UAAU,aAAa;GAC1D,MAAM,aAAaA,OAAK,QAAQ,KAAK,SAAS;AAE9C,OAAI,CAAC,SAAS,WAAW,WAAW,CAClC,OAAM,IAAI,MACR,gBAAgB,IAAI,wDACJ,KAAK,SAAS,eAAe,WAC9C;AAGH,UAAO;WACA,GAAG;AACV,SAAM,IAAI,MACR,oCAAoC,IAAI,YAAY,OAAO,EAAE,GAC9D;;;;;;;;CASL,MAAM,KAAK,MAAgB;EACzB,MAAM,SAAqC,EAAE;AAC7C,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,cAAc,MAAM,KAAK,cAAc,IAAI;AACjD,UAAO,KAAK,YAAY;;AAE1B,SAAO;;;;;;;CAQT,MAAM,KAAK,eAAsD;AAC/D,QAAM,QAAQ,IACZ,cAAc,KAAK,CAAC,KAAK,WAAW,KAAK,eAAe,OAAO,IAAI,CAAC,CACrE;;;;;;;CAQH,MAAM,QAAQ,MAA+B;AAC3C,QAAM,QAAQ,IAAI,KAAK,KAAK,QAAQD,KAAG,OAAO,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC;;;;;;;;CASxE,OAAO,UAAU,QAAyC;EAExD,MAAM,WADW,MAAMA,KAAG,QAAQ,KAAK,SAAS,EACvB,KAAK,SAAS,KAAK,QAAQ,QAAQ,GAAG,CAAC;AAChE,OAAK,MAAM,OAAO,QAChB,KAAI,WAAW,UAAa,IAAI,WAAW,OAAO,CAChD,OAAM;;;;;;;;CAWZ,aAAa,SAAS,UAA2C;AAC/D,MAAI;AAEF,SAAMA,KAAG,OAAO,UAAUA,KAAG,UAAU,OAAOA,KAAG,UAAU,KAAK;UAC1D;AACN,OAAI;AAEF,UAAMA,KAAG,MAAM,UAAU,EAAE,WAAW,MAAM,CAAC;YACtC,OAAO;AACd,UAAM,IAAI,MACR,4CAA4C,SAAS,YAAY,KAAK,UACpE,MACD,GACF;;;AAIL,SAAO,IAAI,KAAK,EAAE,UAAU,CAAC"}
@@ -1,15 +1,15 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const __langchain_core_stores = require_rolldown_runtime.__toESM(require("@langchain/core/stores"));
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let _langchain_core_stores = require("@langchain/core/stores");
3
4
 
4
5
  //#region src/storage/in_memory.ts
5
- var in_memory_exports = {};
6
- require_rolldown_runtime.__export(in_memory_exports, { InMemoryStore: () => __langchain_core_stores.InMemoryStore });
6
+ var in_memory_exports = /* @__PURE__ */ require_runtime.__exportAll({ InMemoryStore: () => _langchain_core_stores.InMemoryStore });
7
7
 
8
8
  //#endregion
9
9
  Object.defineProperty(exports, 'InMemoryStore', {
10
10
  enumerable: true,
11
11
  get: function () {
12
- return __langchain_core_stores.InMemoryStore;
12
+ return _langchain_core_stores.InMemoryStore;
13
13
  }
14
14
  });
15
15
  Object.defineProperty(exports, 'in_memory_exports', {
@@ -1,9 +1,8 @@
1
- import { __export } from "../_virtual/rolldown_runtime.js";
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { InMemoryStore } from "@langchain/core/stores";
3
3
 
4
4
  //#region src/storage/in_memory.ts
5
- var in_memory_exports = {};
6
- __export(in_memory_exports, { InMemoryStore: () => InMemoryStore });
5
+ var in_memory_exports = /* @__PURE__ */ __exportAll({ InMemoryStore: () => InMemoryStore });
7
6
 
8
7
  //#endregion
9
8
  export { InMemoryStore, in_memory_exports };
@@ -1,8 +1,8 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
3
 
3
4
  //#region src/stores/doc/base.ts
4
- var base_exports = {};
5
- require_rolldown_runtime.__export(base_exports, { Docstore: () => Docstore });
5
+ var base_exports = /* @__PURE__ */ require_runtime.__exportAll({ Docstore: () => Docstore });
6
6
  /**
7
7
  * Abstract class for a document store. All document stores should extend
8
8
  * this class.
@@ -1 +1 @@
1
- {"version":3,"file":"base.cjs","names":[],"sources":["../../../src/stores/doc/base.ts"],"sourcesContent":["import { type Document } from \"@langchain/core/documents\";\n\n/**\n * Abstract class for a document store. All document stores should extend\n * this class.\n */\nexport abstract class Docstore {\n abstract search(search: string): Promise<Document>;\n\n abstract add(texts: Record<string, Document>): Promise<void>;\n}\n"],"mappings":";;;;;;;;;AAMA,IAAsB,WAAtB,MAA+B,CAI9B"}
1
+ {"version":3,"file":"base.cjs","names":[],"sources":["../../../src/stores/doc/base.ts"],"sourcesContent":["import { type Document } from \"@langchain/core/documents\";\n\n/**\n * Abstract class for a document store. All document stores should extend\n * this class.\n */\nexport abstract class Docstore {\n abstract search(search: string): Promise<Document>;\n\n abstract add(texts: Record<string, Document>): Promise<void>;\n}\n"],"mappings":";;;;;;;;;AAMA,IAAsB,WAAtB,MAA+B"}
@@ -1,7 +1,6 @@
1
1
  import { Document } from "@langchain/core/documents";
2
2
 
3
3
  //#region src/stores/doc/base.d.ts
4
-
5
4
  /**
6
5
  * Abstract class for a document store. All document stores should extend
7
6
  * this class.
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.cts","names":["Document","Docstore","Promise","Record"],"sources":["../../../src/stores/doc/base.d.ts"],"sourcesContent":["import { type Document } from \"@langchain/core/documents\";\n/**\n * Abstract class for a document store. All document stores should extend\n * this class.\n */\nexport declare abstract class Docstore {\n abstract search(search: string): Promise<Document>;\n abstract add(texts: Record<string, Document>): Promise<void>;\n}\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;AAKA;;AACqCE,uBADPD,QAAAA,CACOC;EACEF,SAAAA,MAAAA,CAAAA,MAAAA,EAAAA,MAAAA,CAAAA,EADFE,OACEF,CADMA,QACNA,CAAAA;EAAfG,SAAAA,GAAAA,CAAAA,KAAAA,EAAAA,MAAAA,CAAAA,MAAAA,EAAeH,QAAfG,CAAAA,CAAAA,EAA2BD,OAA3BC,CAAAA,IAAAA,CAAAA"}
1
+ {"version":3,"file":"base.d.cts","names":[],"sources":["../../../src/stores/doc/base.ts"],"mappings":";;;;;AAMA;;uBAAsB,QAAA;EAAA,SACX,MAAA,CAAO,MAAA,WAAiB,OAAA,CAAQ,QAAA;EAAA,SAEhC,GAAA,CAAI,KAAA,EAAO,MAAA,SAAe,QAAA,IAAY,OAAA;AAAA"}
@@ -1,7 +1,6 @@
1
1
  import { Document } from "@langchain/core/documents";
2
2
 
3
3
  //#region src/stores/doc/base.d.ts
4
-
5
4
  /**
6
5
  * Abstract class for a document store. All document stores should extend
7
6
  * this class.
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","names":["Document","Docstore","Promise","Record"],"sources":["../../../src/stores/doc/base.d.ts"],"sourcesContent":["import { type Document } from \"@langchain/core/documents\";\n/**\n * Abstract class for a document store. All document stores should extend\n * this class.\n */\nexport declare abstract class Docstore {\n abstract search(search: string): Promise<Document>;\n abstract add(texts: Record<string, Document>): Promise<void>;\n}\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;AAKA;;AACqCE,uBADPD,QAAAA,CACOC;EACEF,SAAAA,MAAAA,CAAAA,MAAAA,EAAAA,MAAAA,CAAAA,EADFE,OACEF,CADMA,QACNA,CAAAA;EAAfG,SAAAA,GAAAA,CAAAA,KAAAA,EAAAA,MAAAA,CAAAA,MAAAA,EAAeH,QAAfG,CAAAA,CAAAA,EAA2BD,OAA3BC,CAAAA,IAAAA,CAAAA"}
1
+ {"version":3,"file":"base.d.ts","names":[],"sources":["../../../src/stores/doc/base.ts"],"mappings":";;;;;AAMA;;uBAAsB,QAAA;EAAA,SACX,MAAA,CAAO,MAAA,WAAiB,OAAA,CAAQ,QAAA;EAAA,SAEhC,GAAA,CAAI,KAAA,EAAO,MAAA,SAAe,QAAA,IAAY,OAAA;AAAA"}
@@ -1,8 +1,7 @@
1
- import { __export } from "../../_virtual/rolldown_runtime.js";
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
2
 
3
3
  //#region src/stores/doc/base.ts
4
- var base_exports = {};
5
- __export(base_exports, { Docstore: () => Docstore });
4
+ var base_exports = /* @__PURE__ */ __exportAll({ Docstore: () => Docstore });
6
5
  /**
7
6
  * Abstract class for a document store. All document stores should extend
8
7
  * this class.
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","names":[],"sources":["../../../src/stores/doc/base.ts"],"sourcesContent":["import { type Document } from \"@langchain/core/documents\";\n\n/**\n * Abstract class for a document store. All document stores should extend\n * this class.\n */\nexport abstract class Docstore {\n abstract search(search: string): Promise<Document>;\n\n abstract add(texts: Record<string, Document>): Promise<void>;\n}\n"],"mappings":";;;;;;;;;AAMA,IAAsB,WAAtB,MAA+B,CAI9B"}
1
+ {"version":3,"file":"base.js","names":[],"sources":["../../../src/stores/doc/base.ts"],"sourcesContent":["import { type Document } from \"@langchain/core/documents\";\n\n/**\n * Abstract class for a document store. All document stores should extend\n * this class.\n */\nexport abstract class Docstore {\n abstract search(search: string): Promise<Document>;\n\n abstract add(texts: Record<string, Document>): Promise<void>;\n}\n"],"mappings":";;;;;;;;AAMA,IAAsB,WAAtB,MAA+B"}
@@ -1,9 +1,9 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
3
  const require_stores_doc_base = require('./base.cjs');
3
4
 
4
5
  //#region src/stores/doc/in_memory.ts
5
- var in_memory_exports = {};
6
- require_rolldown_runtime.__export(in_memory_exports, {
6
+ var in_memory_exports = /* @__PURE__ */ require_runtime.__exportAll({
7
7
  InMemoryDocstore: () => InMemoryDocstore,
8
8
  SynchronousInMemoryDocstore: () => SynchronousInMemoryDocstore
9
9
  });
@@ -1 +1 @@
1
- {"version":3,"file":"in_memory.cjs","names":["Docstore","docs?: Map<string, Document>","search: string","texts: Record<string, Document>","keys: string[]","keyValuePairs: [string, Document][]","_keys: string[]","_prefix?: string"],"sources":["../../../src/stores/doc/in_memory.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BaseStoreInterface } from \"@langchain/core/stores\";\nimport { Docstore } from \"./base.js\";\n\n/**\n * Class for storing and retrieving documents in memory asynchronously.\n * Extends the Docstore class.\n */\nexport class InMemoryDocstore\n extends Docstore\n implements BaseStoreInterface<string, Document>\n{\n _docs: Map<string, Document>;\n\n constructor(docs?: Map<string, Document>) {\n super();\n this._docs = docs ?? new Map();\n }\n\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n async search(search: string): Promise<Document> {\n const result = this._docs.get(search);\n if (!result) {\n throw new Error(`ID ${search} not found.`);\n } else {\n return result;\n }\n }\n\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n async add(texts: Record<string, Document>): Promise<void> {\n const keys = [...this._docs.keys()];\n const overlapping = Object.keys(texts).filter((x) => keys.includes(x));\n\n if (overlapping.length > 0) {\n throw new Error(`Tried to add ids that already exist: ${overlapping}`);\n }\n\n for (const [key, value] of Object.entries(texts)) {\n this._docs.set(key, value);\n }\n }\n\n async mget(keys: string[]): Promise<Document[]> {\n return Promise.all(keys.map((key) => this.search(key)));\n }\n\n async mset(keyValuePairs: [string, Document][]): Promise<void> {\n await Promise.all(\n keyValuePairs.map(([key, value]) => this.add({ [key]: value }))\n );\n }\n\n async mdelete(_keys: string[]): Promise<void> {\n throw new Error(\"Not implemented.\");\n }\n\n // eslint-disable-next-line require-yield\n async *yieldKeys(_prefix?: string): AsyncGenerator<string> {\n throw new Error(\"Not implemented\");\n }\n}\n\n/**\n * Class for storing and retrieving documents in memory synchronously.\n */\nexport class SynchronousInMemoryDocstore {\n _docs: Map<string, Document>;\n\n constructor(docs?: Map<string, Document>) {\n this._docs = docs ?? new Map();\n }\n\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n search(search: string): Document {\n const result = this._docs.get(search);\n if (!result) {\n throw new Error(`ID ${search} not found.`);\n } else {\n return result;\n }\n }\n\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n add(texts: Record<string, Document>): void {\n const keys = [...this._docs.keys()];\n const overlapping = Object.keys(texts).filter((x) => keys.includes(x));\n\n if (overlapping.length > 0) {\n throw new Error(`Tried to add ids that already exist: ${overlapping}`);\n }\n\n for (const [key, value] of Object.entries(texts)) {\n this._docs.set(key, value);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAQA,IAAa,mBAAb,cACUA,iCAEV;CACE;CAEA,YAAYC,MAA8B;EACxC,OAAO;EACP,KAAK,QAAQ,wBAAQ,IAAI;CAC1B;;;;;;CAOD,MAAM,OAAOC,QAAmC;EAC9C,MAAM,SAAS,KAAK,MAAM,IAAI,OAAO;AACrC,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,CAAC,GAAG,EAAE,OAAO,WAAW,CAAC;MAEzC,QAAO;CAEV;;;;;;CAOD,MAAM,IAAIC,OAAgD;EACxD,MAAM,OAAO,CAAC,GAAG,KAAK,MAAM,MAAM,AAAC;EACnC,MAAM,cAAc,OAAO,KAAK,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;AAEtE,MAAI,YAAY,SAAS,EACvB,OAAM,IAAI,MAAM,CAAC,qCAAqC,EAAE,aAAa;AAGvE,OAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,MAAM,EAC9C,KAAK,MAAM,IAAI,KAAK,MAAM;CAE7B;CAED,MAAM,KAAKC,MAAqC;AAC9C,SAAO,QAAQ,IAAI,KAAK,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,CAAC,CAAC;CACxD;CAED,MAAM,KAAKC,eAAoD;EAC7D,MAAM,QAAQ,IACZ,cAAc,IAAI,CAAC,CAAC,KAAK,MAAM,KAAK,KAAK,IAAI,GAAG,MAAM,MAAO,EAAC,CAAC,CAChE;CACF;CAED,MAAM,QAAQC,OAAgC;AAC5C,QAAM,IAAI,MAAM;CACjB;CAGD,OAAO,UAAUC,SAA0C;AACzD,QAAM,IAAI,MAAM;CACjB;AACF;;;;AAKD,IAAa,8BAAb,MAAyC;CACvC;CAEA,YAAYN,MAA8B;EACxC,KAAK,QAAQ,wBAAQ,IAAI;CAC1B;;;;;;CAOD,OAAOC,QAA0B;EAC/B,MAAM,SAAS,KAAK,MAAM,IAAI,OAAO;AACrC,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,CAAC,GAAG,EAAE,OAAO,WAAW,CAAC;MAEzC,QAAO;CAEV;;;;;;CAOD,IAAIC,OAAuC;EACzC,MAAM,OAAO,CAAC,GAAG,KAAK,MAAM,MAAM,AAAC;EACnC,MAAM,cAAc,OAAO,KAAK,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;AAEtE,MAAI,YAAY,SAAS,EACvB,OAAM,IAAI,MAAM,CAAC,qCAAqC,EAAE,aAAa;AAGvE,OAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,MAAM,EAC9C,KAAK,MAAM,IAAI,KAAK,MAAM;CAE7B;AACF"}
1
+ {"version":3,"file":"in_memory.cjs","names":["Docstore"],"sources":["../../../src/stores/doc/in_memory.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BaseStoreInterface } from \"@langchain/core/stores\";\nimport { Docstore } from \"./base.js\";\n\n/**\n * Class for storing and retrieving documents in memory asynchronously.\n * Extends the Docstore class.\n */\nexport class InMemoryDocstore\n extends Docstore\n implements BaseStoreInterface<string, Document>\n{\n _docs: Map<string, Document>;\n\n constructor(docs?: Map<string, Document>) {\n super();\n this._docs = docs ?? new Map();\n }\n\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n async search(search: string): Promise<Document> {\n const result = this._docs.get(search);\n if (!result) {\n throw new Error(`ID ${search} not found.`);\n } else {\n return result;\n }\n }\n\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n async add(texts: Record<string, Document>): Promise<void> {\n const keys = [...this._docs.keys()];\n const overlapping = Object.keys(texts).filter((x) => keys.includes(x));\n\n if (overlapping.length > 0) {\n throw new Error(`Tried to add ids that already exist: ${overlapping}`);\n }\n\n for (const [key, value] of Object.entries(texts)) {\n this._docs.set(key, value);\n }\n }\n\n async mget(keys: string[]): Promise<Document[]> {\n return Promise.all(keys.map((key) => this.search(key)));\n }\n\n async mset(keyValuePairs: [string, Document][]): Promise<void> {\n await Promise.all(\n keyValuePairs.map(([key, value]) => this.add({ [key]: value }))\n );\n }\n\n async mdelete(_keys: string[]): Promise<void> {\n throw new Error(\"Not implemented.\");\n }\n\n // eslint-disable-next-line require-yield\n async *yieldKeys(_prefix?: string): AsyncGenerator<string> {\n throw new Error(\"Not implemented\");\n }\n}\n\n/**\n * Class for storing and retrieving documents in memory synchronously.\n */\nexport class SynchronousInMemoryDocstore {\n _docs: Map<string, Document>;\n\n constructor(docs?: Map<string, Document>) {\n this._docs = docs ?? new Map();\n }\n\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n search(search: string): Document {\n const result = this._docs.get(search);\n if (!result) {\n throw new Error(`ID ${search} not found.`);\n } else {\n return result;\n }\n }\n\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n add(texts: Record<string, Document>): void {\n const keys = [...this._docs.keys()];\n const overlapping = Object.keys(texts).filter((x) => keys.includes(x));\n\n if (overlapping.length > 0) {\n throw new Error(`Tried to add ids that already exist: ${overlapping}`);\n }\n\n for (const [key, value] of Object.entries(texts)) {\n this._docs.set(key, value);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAQA,IAAa,mBAAb,cACUA,iCAEV;CACE;CAEA,YAAY,MAA8B;AACxC,SAAO;AACP,OAAK,QAAQ,wBAAQ,IAAI,KAAK;;;;;;;CAQhC,MAAM,OAAO,QAAmC;EAC9C,MAAM,SAAS,KAAK,MAAM,IAAI,OAAO;AACrC,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,MAAM,OAAO,aAAa;MAE1C,QAAO;;;;;;;CASX,MAAM,IAAI,OAAgD;EACxD,MAAM,OAAO,CAAC,GAAG,KAAK,MAAM,MAAM,CAAC;EACnC,MAAM,cAAc,OAAO,KAAK,MAAM,CAAC,QAAQ,MAAM,KAAK,SAAS,EAAE,CAAC;AAEtE,MAAI,YAAY,SAAS,EACvB,OAAM,IAAI,MAAM,wCAAwC,cAAc;AAGxE,OAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,CAC9C,MAAK,MAAM,IAAI,KAAK,MAAM;;CAI9B,MAAM,KAAK,MAAqC;AAC9C,SAAO,QAAQ,IAAI,KAAK,KAAK,QAAQ,KAAK,OAAO,IAAI,CAAC,CAAC;;CAGzD,MAAM,KAAK,eAAoD;AAC7D,QAAM,QAAQ,IACZ,cAAc,KAAK,CAAC,KAAK,WAAW,KAAK,IAAI,GAAG,MAAM,OAAO,CAAC,CAAC,CAChE;;CAGH,MAAM,QAAQ,OAAgC;AAC5C,QAAM,IAAI,MAAM,mBAAmB;;CAIrC,OAAO,UAAU,SAA0C;AACzD,QAAM,IAAI,MAAM,kBAAkB;;;;;;AAOtC,IAAa,8BAAb,MAAyC;CACvC;CAEA,YAAY,MAA8B;AACxC,OAAK,QAAQ,wBAAQ,IAAI,KAAK;;;;;;;CAQhC,OAAO,QAA0B;EAC/B,MAAM,SAAS,KAAK,MAAM,IAAI,OAAO;AACrC,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,MAAM,OAAO,aAAa;MAE1C,QAAO;;;;;;;CASX,IAAI,OAAuC;EACzC,MAAM,OAAO,CAAC,GAAG,KAAK,MAAM,MAAM,CAAC;EACnC,MAAM,cAAc,OAAO,KAAK,MAAM,CAAC,QAAQ,MAAM,KAAK,SAAS,EAAE,CAAC;AAEtE,MAAI,YAAY,SAAS,EACvB,OAAM,IAAI,MAAM,wCAAwC,cAAc;AAGxE,OAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,CAC9C,MAAK,MAAM,IAAI,KAAK,MAAM"}
@@ -3,7 +3,6 @@ import { Document } from "@langchain/core/documents";
3
3
  import { BaseStoreInterface } from "@langchain/core/stores";
4
4
 
5
5
  //#region src/stores/doc/in_memory.d.ts
6
-
7
6
  /**
8
7
  * Class for storing and retrieving documents in memory asynchronously.
9
8
  * Extends the Docstore class.
@@ -1 +1 @@
1
- {"version":3,"file":"in_memory.d.cts","names":["Document","BaseStoreInterface","Docstore","InMemoryDocstore","Map","Promise","Record","AsyncGenerator","SynchronousInMemoryDocstore"],"sources":["../../../src/stores/doc/in_memory.d.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BaseStoreInterface } from \"@langchain/core/stores\";\nimport { Docstore } from \"./base.js\";\n/**\n * Class for storing and retrieving documents in memory asynchronously.\n * Extends the Docstore class.\n */\nexport declare class InMemoryDocstore extends Docstore implements BaseStoreInterface<string, Document> {\n _docs: Map<string, Document>;\n constructor(docs?: Map<string, Document>);\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n search(search: string): Promise<Document>;\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n add(texts: Record<string, Document>): Promise<void>;\n mget(keys: string[]): Promise<Document[]>;\n mset(keyValuePairs: [string, Document][]): Promise<void>;\n mdelete(_keys: string[]): Promise<void>;\n yieldKeys(_prefix?: string): AsyncGenerator<string>;\n}\n/**\n * Class for storing and retrieving documents in memory synchronously.\n */\nexport declare class SynchronousInMemoryDocstore {\n _docs: Map<string, Document>;\n constructor(docs?: Map<string, Document>);\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n search(search: string): Document;\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n add(texts: Record<string, Document>): void;\n}\n//# sourceMappingURL=in_memory.d.ts.map"],"mappings":";;;;;;;;AAOA;;AACuBA,cADFG,gBAAAA,SAAyBD,QAAAA,YAAoBD,kBAC3CD,CAAAA,MAAAA,EADsEA,QACtEA,CAAAA,CAAAA;EAAZI,KAAAA,EAAAA,GAAAA,CAAAA,MAAAA,EAAYJ,QAAZI,CAAAA;EACwBJ,WAAAA,CAAAA,IAAAA,CAAAA,EAAZI,GAAYJ,CAAAA,MAAAA,EAAAA,QAAAA,CAAAA;EAAZI;;;;;EAYmBC,MAAAA,CAAAA,MAAAA,EAAAA,MAAAA,CAAAA,EANdA,OAMcA,CANNL,QAMMK,CAAAA;EACRL;;;;;EAGDO,GAAAA,CAAAA,KAAAA,EAJlBD,MAIkBC,CAAAA,MAAAA,EAJHP,QAIGO,CAAAA,CAAAA,EAJSF,OAITE,CAAAA,IAAAA,CAAAA;EAlBaL,IAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,CAAAA,EAepBG,OAfoBH,CAeZF,QAfYE,EAAAA,CAAAA;EAAoBD,IAAAA,CAAAA,aAAAA,EAAAA,CAAAA,MAAAA,EAgBjCD,QAhBiCC,CAAAA,EAAAA,CAAAA,EAgBnBI,OAhBmBJ,CAAAA,IAAAA,CAAAA;EAAkB,OAAA,CAAA,KAAA,EAAA,MAAA,EAAA,CAAA,EAiBtDI,OAjBsD,CAAA,IAAA,CAAA;EAuB/DG,SAAAA,CAAAA,OAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EALYD,cAKe,CAAA,MAAA,CAAA;;;;;AAQpBP,cARPQ,2BAAAA,CAQOR;EAMEA,KAAAA,EAbnBI,GAamBJ,CAAAA,MAAAA,EAbPA,QAaOA,CAAAA;EAAfM,WAAAA,CAAAA,IAAAA,CAAAA,EAZQF,GAYRE,CAAAA,MAAAA,EAZoBN,QAYpBM,CAAAA;EAAM;;;;;0BANON;;;;;;aAMbM,eAAeN"}
1
+ {"version":3,"file":"in_memory.d.cts","names":[],"sources":["../../../src/stores/doc/in_memory.ts"],"mappings":";;;;;;;AAQA;;cAAa,gBAAA,SACH,QAAA,YACG,kBAAA,SAA2B,QAAA;EAEtC,KAAA,EAAO,GAAA,SAAY,QAAA;EAEnB,WAAA,CAAY,IAAA,GAAO,GAAA,SAAY,QAAA;EAFxB;;;;;EAYD,MAAA,CAAO,MAAA,WAAiB,OAAA,CAAQ,QAAA;EAcrB;;;;;EAAX,GAAA,CAAI,KAAA,EAAO,MAAA,SAAe,QAAA,IAAY,OAAA;EAatC,IAAA,CAAK,IAAA,aAAiB,OAAA,CAAQ,QAAA;EAI9B,IAAA,CAAK,aAAA,WAAwB,QAAA,MAAc,OAAA;EAM3C,OAAA,CAAQ,KAAA,aAAkB,OAAA;EAKzB,SAAA,CAAU,OAAA,YAAmB,cAAA;AAAA;;;;cAQzB,2BAAA;EACX,KAAA,EAAO,GAAA,SAAY,QAAA;EAEnB,WAAA,CAAY,IAAA,GAAO,GAAA,SAAY,QAAA;EAjEZ;;;;;EA0EnB,MAAA,CAAO,MAAA,WAAiB,QAAA;EA9DX;;;;;EA4Eb,GAAA,CAAI,KAAA,EAAO,MAAA,SAAe,QAAA;AAAA"}
@@ -3,7 +3,6 @@ import { Document } from "@langchain/core/documents";
3
3
  import { BaseStoreInterface } from "@langchain/core/stores";
4
4
 
5
5
  //#region src/stores/doc/in_memory.d.ts
6
-
7
6
  /**
8
7
  * Class for storing and retrieving documents in memory asynchronously.
9
8
  * Extends the Docstore class.
@@ -1 +1 @@
1
- {"version":3,"file":"in_memory.d.ts","names":["Document","BaseStoreInterface","Docstore","InMemoryDocstore","Map","Promise","Record","AsyncGenerator","SynchronousInMemoryDocstore"],"sources":["../../../src/stores/doc/in_memory.d.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BaseStoreInterface } from \"@langchain/core/stores\";\nimport { Docstore } from \"./base.js\";\n/**\n * Class for storing and retrieving documents in memory asynchronously.\n * Extends the Docstore class.\n */\nexport declare class InMemoryDocstore extends Docstore implements BaseStoreInterface<string, Document> {\n _docs: Map<string, Document>;\n constructor(docs?: Map<string, Document>);\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n search(search: string): Promise<Document>;\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n add(texts: Record<string, Document>): Promise<void>;\n mget(keys: string[]): Promise<Document[]>;\n mset(keyValuePairs: [string, Document][]): Promise<void>;\n mdelete(_keys: string[]): Promise<void>;\n yieldKeys(_prefix?: string): AsyncGenerator<string>;\n}\n/**\n * Class for storing and retrieving documents in memory synchronously.\n */\nexport declare class SynchronousInMemoryDocstore {\n _docs: Map<string, Document>;\n constructor(docs?: Map<string, Document>);\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n search(search: string): Document;\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n add(texts: Record<string, Document>): void;\n}\n//# sourceMappingURL=in_memory.d.ts.map"],"mappings":";;;;;;;;AAOA;;AACuBA,cADFG,gBAAAA,SAAyBD,QAAAA,YAAoBD,kBAC3CD,CAAAA,MAAAA,EADsEA,QACtEA,CAAAA,CAAAA;EAAZI,KAAAA,EAAAA,GAAAA,CAAAA,MAAAA,EAAYJ,QAAZI,CAAAA;EACwBJ,WAAAA,CAAAA,IAAAA,CAAAA,EAAZI,GAAYJ,CAAAA,MAAAA,EAAAA,QAAAA,CAAAA;EAAZI;;;;;EAYmBC,MAAAA,CAAAA,MAAAA,EAAAA,MAAAA,CAAAA,EANdA,OAMcA,CANNL,QAMMK,CAAAA;EACRL;;;;;EAGDO,GAAAA,CAAAA,KAAAA,EAJlBD,MAIkBC,CAAAA,MAAAA,EAJHP,QAIGO,CAAAA,CAAAA,EAJSF,OAITE,CAAAA,IAAAA,CAAAA;EAlBaL,IAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,CAAAA,EAepBG,OAfoBH,CAeZF,QAfYE,EAAAA,CAAAA;EAAoBD,IAAAA,CAAAA,aAAAA,EAAAA,CAAAA,MAAAA,EAgBjCD,QAhBiCC,CAAAA,EAAAA,CAAAA,EAgBnBI,OAhBmBJ,CAAAA,IAAAA,CAAAA;EAAkB,OAAA,CAAA,KAAA,EAAA,MAAA,EAAA,CAAA,EAiBtDI,OAjBsD,CAAA,IAAA,CAAA;EAuB/DG,SAAAA,CAAAA,OAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EALYD,cAKe,CAAA,MAAA,CAAA;;;;;AAQpBP,cARPQ,2BAAAA,CAQOR;EAMEA,KAAAA,EAbnBI,GAamBJ,CAAAA,MAAAA,EAbPA,QAaOA,CAAAA;EAAfM,WAAAA,CAAAA,IAAAA,CAAAA,EAZQF,GAYRE,CAAAA,MAAAA,EAZoBN,QAYpBM,CAAAA;EAAM;;;;;0BANON;;;;;;aAMbM,eAAeN"}
1
+ {"version":3,"file":"in_memory.d.ts","names":[],"sources":["../../../src/stores/doc/in_memory.ts"],"mappings":";;;;;;;AAQA;;cAAa,gBAAA,SACH,QAAA,YACG,kBAAA,SAA2B,QAAA;EAEtC,KAAA,EAAO,GAAA,SAAY,QAAA;EAEnB,WAAA,CAAY,IAAA,GAAO,GAAA,SAAY,QAAA;EAFxB;;;;;EAYD,MAAA,CAAO,MAAA,WAAiB,OAAA,CAAQ,QAAA;EAcrB;;;;;EAAX,GAAA,CAAI,KAAA,EAAO,MAAA,SAAe,QAAA,IAAY,OAAA;EAatC,IAAA,CAAK,IAAA,aAAiB,OAAA,CAAQ,QAAA;EAI9B,IAAA,CAAK,aAAA,WAAwB,QAAA,MAAc,OAAA;EAM3C,OAAA,CAAQ,KAAA,aAAkB,OAAA;EAKzB,SAAA,CAAU,OAAA,YAAmB,cAAA;AAAA;;;;cAQzB,2BAAA;EACX,KAAA,EAAO,GAAA,SAAY,QAAA;EAEnB,WAAA,CAAY,IAAA,GAAO,GAAA,SAAY,QAAA;EAjEZ;;;;;EA0EnB,MAAA,CAAO,MAAA,WAAiB,QAAA;EA9DX;;;;;EA4Eb,GAAA,CAAI,KAAA,EAAO,MAAA,SAAe,QAAA;AAAA"}
@@ -1,9 +1,8 @@
1
- import { __export } from "../../_virtual/rolldown_runtime.js";
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
2
  import { Docstore } from "./base.js";
3
3
 
4
4
  //#region src/stores/doc/in_memory.ts
5
- var in_memory_exports = {};
6
- __export(in_memory_exports, {
5
+ var in_memory_exports = /* @__PURE__ */ __exportAll({
7
6
  InMemoryDocstore: () => InMemoryDocstore,
8
7
  SynchronousInMemoryDocstore: () => SynchronousInMemoryDocstore
9
8
  });
@@ -1 +1 @@
1
- {"version":3,"file":"in_memory.js","names":["docs?: Map<string, Document>","search: string","texts: Record<string, Document>","keys: string[]","keyValuePairs: [string, Document][]","_keys: string[]","_prefix?: string"],"sources":["../../../src/stores/doc/in_memory.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BaseStoreInterface } from \"@langchain/core/stores\";\nimport { Docstore } from \"./base.js\";\n\n/**\n * Class for storing and retrieving documents in memory asynchronously.\n * Extends the Docstore class.\n */\nexport class InMemoryDocstore\n extends Docstore\n implements BaseStoreInterface<string, Document>\n{\n _docs: Map<string, Document>;\n\n constructor(docs?: Map<string, Document>) {\n super();\n this._docs = docs ?? new Map();\n }\n\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n async search(search: string): Promise<Document> {\n const result = this._docs.get(search);\n if (!result) {\n throw new Error(`ID ${search} not found.`);\n } else {\n return result;\n }\n }\n\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n async add(texts: Record<string, Document>): Promise<void> {\n const keys = [...this._docs.keys()];\n const overlapping = Object.keys(texts).filter((x) => keys.includes(x));\n\n if (overlapping.length > 0) {\n throw new Error(`Tried to add ids that already exist: ${overlapping}`);\n }\n\n for (const [key, value] of Object.entries(texts)) {\n this._docs.set(key, value);\n }\n }\n\n async mget(keys: string[]): Promise<Document[]> {\n return Promise.all(keys.map((key) => this.search(key)));\n }\n\n async mset(keyValuePairs: [string, Document][]): Promise<void> {\n await Promise.all(\n keyValuePairs.map(([key, value]) => this.add({ [key]: value }))\n );\n }\n\n async mdelete(_keys: string[]): Promise<void> {\n throw new Error(\"Not implemented.\");\n }\n\n // eslint-disable-next-line require-yield\n async *yieldKeys(_prefix?: string): AsyncGenerator<string> {\n throw new Error(\"Not implemented\");\n }\n}\n\n/**\n * Class for storing and retrieving documents in memory synchronously.\n */\nexport class SynchronousInMemoryDocstore {\n _docs: Map<string, Document>;\n\n constructor(docs?: Map<string, Document>) {\n this._docs = docs ?? new Map();\n }\n\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n search(search: string): Document {\n const result = this._docs.get(search);\n if (!result) {\n throw new Error(`ID ${search} not found.`);\n } else {\n return result;\n }\n }\n\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n add(texts: Record<string, Document>): void {\n const keys = [...this._docs.keys()];\n const overlapping = Object.keys(texts).filter((x) => keys.includes(x));\n\n if (overlapping.length > 0) {\n throw new Error(`Tried to add ids that already exist: ${overlapping}`);\n }\n\n for (const [key, value] of Object.entries(texts)) {\n this._docs.set(key, value);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAQA,IAAa,mBAAb,cACU,SAEV;CACE;CAEA,YAAYA,MAA8B;EACxC,OAAO;EACP,KAAK,QAAQ,wBAAQ,IAAI;CAC1B;;;;;;CAOD,MAAM,OAAOC,QAAmC;EAC9C,MAAM,SAAS,KAAK,MAAM,IAAI,OAAO;AACrC,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,CAAC,GAAG,EAAE,OAAO,WAAW,CAAC;MAEzC,QAAO;CAEV;;;;;;CAOD,MAAM,IAAIC,OAAgD;EACxD,MAAM,OAAO,CAAC,GAAG,KAAK,MAAM,MAAM,AAAC;EACnC,MAAM,cAAc,OAAO,KAAK,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;AAEtE,MAAI,YAAY,SAAS,EACvB,OAAM,IAAI,MAAM,CAAC,qCAAqC,EAAE,aAAa;AAGvE,OAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,MAAM,EAC9C,KAAK,MAAM,IAAI,KAAK,MAAM;CAE7B;CAED,MAAM,KAAKC,MAAqC;AAC9C,SAAO,QAAQ,IAAI,KAAK,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,CAAC,CAAC;CACxD;CAED,MAAM,KAAKC,eAAoD;EAC7D,MAAM,QAAQ,IACZ,cAAc,IAAI,CAAC,CAAC,KAAK,MAAM,KAAK,KAAK,IAAI,GAAG,MAAM,MAAO,EAAC,CAAC,CAChE;CACF;CAED,MAAM,QAAQC,OAAgC;AAC5C,QAAM,IAAI,MAAM;CACjB;CAGD,OAAO,UAAUC,SAA0C;AACzD,QAAM,IAAI,MAAM;CACjB;AACF;;;;AAKD,IAAa,8BAAb,MAAyC;CACvC;CAEA,YAAYN,MAA8B;EACxC,KAAK,QAAQ,wBAAQ,IAAI;CAC1B;;;;;;CAOD,OAAOC,QAA0B;EAC/B,MAAM,SAAS,KAAK,MAAM,IAAI,OAAO;AACrC,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,CAAC,GAAG,EAAE,OAAO,WAAW,CAAC;MAEzC,QAAO;CAEV;;;;;;CAOD,IAAIC,OAAuC;EACzC,MAAM,OAAO,CAAC,GAAG,KAAK,MAAM,MAAM,AAAC;EACnC,MAAM,cAAc,OAAO,KAAK,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;AAEtE,MAAI,YAAY,SAAS,EACvB,OAAM,IAAI,MAAM,CAAC,qCAAqC,EAAE,aAAa;AAGvE,OAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,MAAM,EAC9C,KAAK,MAAM,IAAI,KAAK,MAAM;CAE7B;AACF"}
1
+ {"version":3,"file":"in_memory.js","names":[],"sources":["../../../src/stores/doc/in_memory.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BaseStoreInterface } from \"@langchain/core/stores\";\nimport { Docstore } from \"./base.js\";\n\n/**\n * Class for storing and retrieving documents in memory asynchronously.\n * Extends the Docstore class.\n */\nexport class InMemoryDocstore\n extends Docstore\n implements BaseStoreInterface<string, Document>\n{\n _docs: Map<string, Document>;\n\n constructor(docs?: Map<string, Document>) {\n super();\n this._docs = docs ?? new Map();\n }\n\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n async search(search: string): Promise<Document> {\n const result = this._docs.get(search);\n if (!result) {\n throw new Error(`ID ${search} not found.`);\n } else {\n return result;\n }\n }\n\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n async add(texts: Record<string, Document>): Promise<void> {\n const keys = [...this._docs.keys()];\n const overlapping = Object.keys(texts).filter((x) => keys.includes(x));\n\n if (overlapping.length > 0) {\n throw new Error(`Tried to add ids that already exist: ${overlapping}`);\n }\n\n for (const [key, value] of Object.entries(texts)) {\n this._docs.set(key, value);\n }\n }\n\n async mget(keys: string[]): Promise<Document[]> {\n return Promise.all(keys.map((key) => this.search(key)));\n }\n\n async mset(keyValuePairs: [string, Document][]): Promise<void> {\n await Promise.all(\n keyValuePairs.map(([key, value]) => this.add({ [key]: value }))\n );\n }\n\n async mdelete(_keys: string[]): Promise<void> {\n throw new Error(\"Not implemented.\");\n }\n\n // eslint-disable-next-line require-yield\n async *yieldKeys(_prefix?: string): AsyncGenerator<string> {\n throw new Error(\"Not implemented\");\n }\n}\n\n/**\n * Class for storing and retrieving documents in memory synchronously.\n */\nexport class SynchronousInMemoryDocstore {\n _docs: Map<string, Document>;\n\n constructor(docs?: Map<string, Document>) {\n this._docs = docs ?? new Map();\n }\n\n /**\n * Searches for a document in the store based on its ID.\n * @param search The ID of the document to search for.\n * @returns The document with the given ID.\n */\n search(search: string): Document {\n const result = this._docs.get(search);\n if (!result) {\n throw new Error(`ID ${search} not found.`);\n } else {\n return result;\n }\n }\n\n /**\n * Adds new documents to the store.\n * @param texts An object where the keys are document IDs and the values are the documents themselves.\n * @returns Void\n */\n add(texts: Record<string, Document>): void {\n const keys = [...this._docs.keys()];\n const overlapping = Object.keys(texts).filter((x) => keys.includes(x));\n\n if (overlapping.length > 0) {\n throw new Error(`Tried to add ids that already exist: ${overlapping}`);\n }\n\n for (const [key, value] of Object.entries(texts)) {\n this._docs.set(key, value);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;AAQA,IAAa,mBAAb,cACU,SAEV;CACE;CAEA,YAAY,MAA8B;AACxC,SAAO;AACP,OAAK,QAAQ,wBAAQ,IAAI,KAAK;;;;;;;CAQhC,MAAM,OAAO,QAAmC;EAC9C,MAAM,SAAS,KAAK,MAAM,IAAI,OAAO;AACrC,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,MAAM,OAAO,aAAa;MAE1C,QAAO;;;;;;;CASX,MAAM,IAAI,OAAgD;EACxD,MAAM,OAAO,CAAC,GAAG,KAAK,MAAM,MAAM,CAAC;EACnC,MAAM,cAAc,OAAO,KAAK,MAAM,CAAC,QAAQ,MAAM,KAAK,SAAS,EAAE,CAAC;AAEtE,MAAI,YAAY,SAAS,EACvB,OAAM,IAAI,MAAM,wCAAwC,cAAc;AAGxE,OAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,CAC9C,MAAK,MAAM,IAAI,KAAK,MAAM;;CAI9B,MAAM,KAAK,MAAqC;AAC9C,SAAO,QAAQ,IAAI,KAAK,KAAK,QAAQ,KAAK,OAAO,IAAI,CAAC,CAAC;;CAGzD,MAAM,KAAK,eAAoD;AAC7D,QAAM,QAAQ,IACZ,cAAc,KAAK,CAAC,KAAK,WAAW,KAAK,IAAI,GAAG,MAAM,OAAO,CAAC,CAAC,CAChE;;CAGH,MAAM,QAAQ,OAAgC;AAC5C,QAAM,IAAI,MAAM,mBAAmB;;CAIrC,OAAO,UAAU,SAA0C;AACzD,QAAM,IAAI,MAAM,kBAAkB;;;;;;AAOtC,IAAa,8BAAb,MAAyC;CACvC;CAEA,YAAY,MAA8B;AACxC,OAAK,QAAQ,wBAAQ,IAAI,KAAK;;;;;;;CAQhC,OAAO,QAA0B;EAC/B,MAAM,SAAS,KAAK,MAAM,IAAI,OAAO;AACrC,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,MAAM,OAAO,aAAa;MAE1C,QAAO;;;;;;;CASX,IAAI,OAAuC;EACzC,MAAM,OAAO,CAAC,GAAG,KAAK,MAAM,MAAM,CAAC;EACnC,MAAM,cAAc,OAAO,KAAK,MAAM,CAAC,QAAQ,MAAM,KAAK,SAAS,EAAE,CAAC;AAEtE,MAAI,YAAY,SAAS,EACvB,OAAM,IAAI,MAAM,wCAAwC,cAAc;AAGxE,OAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,CAC9C,MAAK,MAAM,IAAI,KAAK,MAAM"}
@@ -1,12 +1,12 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const __langchain_core_load_serializable = require_rolldown_runtime.__toESM(require("@langchain/core/load/serializable"));
1
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
+ let _langchain_core_load_serializable = require("@langchain/core/load/serializable");
3
3
 
4
4
  //#region src/stores/file/base.ts
5
5
  /**
6
6
  * Base class for all file stores. All file stores should extend this
7
7
  * class.
8
8
  */
9
- var BaseFileStore = class extends __langchain_core_load_serializable.Serializable {};
9
+ var BaseFileStore = class extends _langchain_core_load_serializable.Serializable {};
10
10
 
11
11
  //#endregion
12
12
  exports.BaseFileStore = BaseFileStore;
@@ -1 +1 @@
1
- {"version":3,"file":"base.cjs","names":["Serializable"],"sources":["../../../src/stores/file/base.ts"],"sourcesContent":["import { Serializable } from \"@langchain/core/load/serializable\";\n\n/**\n * Base class for all file stores. All file stores should extend this\n * class.\n */\nexport abstract class BaseFileStore extends Serializable {\n abstract readFile(path: string): Promise<string>;\n\n abstract writeFile(path: string, contents: string): Promise<void>;\n}\n"],"mappings":";;;;;;;;AAMA,IAAsB,gBAAtB,cAA4CA,gDAAa,CAIxD"}
1
+ {"version":3,"file":"base.cjs","names":["Serializable"],"sources":["../../../src/stores/file/base.ts"],"sourcesContent":["import { Serializable } from \"@langchain/core/load/serializable\";\n\n/**\n * Base class for all file stores. All file stores should extend this\n * class.\n */\nexport abstract class BaseFileStore extends Serializable {\n abstract readFile(path: string): Promise<string>;\n\n abstract writeFile(path: string, contents: string): Promise<void>;\n}\n"],"mappings":";;;;;;;;AAMA,IAAsB,gBAAtB,cAA4CA,+CAAa"}
@@ -1,7 +1,6 @@
1
1
  import { Serializable } from "@langchain/core/load/serializable";
2
2
 
3
3
  //#region src/stores/file/base.d.ts
4
-
5
4
  /**
6
5
  * Base class for all file stores. All file stores should extend this
7
6
  * class.
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.cts","names":["Serializable","BaseFileStore","Promise"],"sources":["../../../src/stores/file/base.d.ts"],"sourcesContent":["import { Serializable } from \"@langchain/core/load/serializable\";\n/**\n * Base class for all file stores. All file stores should extend this\n * class.\n */\nexport declare abstract class BaseFileStore extends Serializable {\n abstract readFile(path: string): Promise<string>;\n abstract writeFile(path: string, contents: string): Promise<void>;\n}\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;AAKA;;AAEwDE,uBAF1BD,aAAAA,SAAsBD,YAAAA,CAEIE;EAFJF,SAAAA,QAAAA,CAAAA,IAAAA,EAAAA,MAAAA,CAAAA,EACfE,OADeF,CAAAA,MAAAA,CAAAA;EAAY,SAAA,SAAA,CAAA,IAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,CAAA,EAERE,OAFQ,CAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"base.d.cts","names":[],"sources":["../../../src/stores/file/base.ts"],"mappings":";;;;;AAMA;;uBAAsB,aAAA,SAAsB,YAAA;EAAA,SACjC,QAAA,CAAS,IAAA,WAAe,OAAA;EAAA,SAExB,SAAA,CAAU,IAAA,UAAc,QAAA,WAAmB,OAAA;AAAA"}
@@ -1,7 +1,6 @@
1
1
  import { Serializable } from "@langchain/core/load/serializable";
2
2
 
3
3
  //#region src/stores/file/base.d.ts
4
-
5
4
  /**
6
5
  * Base class for all file stores. All file stores should extend this
7
6
  * class.
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","names":["Serializable","BaseFileStore","Promise"],"sources":["../../../src/stores/file/base.d.ts"],"sourcesContent":["import { Serializable } from \"@langchain/core/load/serializable\";\n/**\n * Base class for all file stores. All file stores should extend this\n * class.\n */\nexport declare abstract class BaseFileStore extends Serializable {\n abstract readFile(path: string): Promise<string>;\n abstract writeFile(path: string, contents: string): Promise<void>;\n}\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;AAKA;;AAEwDE,uBAF1BD,aAAAA,SAAsBD,YAAAA,CAEIE;EAFJF,SAAAA,QAAAA,CAAAA,IAAAA,EAAAA,MAAAA,CAAAA,EACfE,OADeF,CAAAA,MAAAA,CAAAA;EAAY,SAAA,SAAA,CAAA,IAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,CAAA,EAERE,OAFQ,CAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"base.d.ts","names":[],"sources":["../../../src/stores/file/base.ts"],"mappings":";;;;;AAMA;;uBAAsB,aAAA,SAAsB,YAAA;EAAA,SACjC,QAAA,CAAS,IAAA,WAAe,OAAA;EAAA,SAExB,SAAA,CAAU,IAAA,UAAc,QAAA,WAAmB,OAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","names":[],"sources":["../../../src/stores/file/base.ts"],"sourcesContent":["import { Serializable } from \"@langchain/core/load/serializable\";\n\n/**\n * Base class for all file stores. All file stores should extend this\n * class.\n */\nexport abstract class BaseFileStore extends Serializable {\n abstract readFile(path: string): Promise<string>;\n\n abstract writeFile(path: string, contents: string): Promise<void>;\n}\n"],"mappings":";;;;;;;AAMA,IAAsB,gBAAtB,cAA4C,aAAa,CAIxD"}
1
+ {"version":3,"file":"base.js","names":[],"sources":["../../../src/stores/file/base.ts"],"sourcesContent":["import { Serializable } from \"@langchain/core/load/serializable\";\n\n/**\n * Base class for all file stores. All file stores should extend this\n * class.\n */\nexport abstract class BaseFileStore extends Serializable {\n abstract readFile(path: string): Promise<string>;\n\n abstract writeFile(path: string, contents: string): Promise<void>;\n}\n"],"mappings":";;;;;;;AAMA,IAAsB,gBAAtB,cAA4C,aAAa"}
@@ -1,9 +1,9 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
3
  const require_base = require('./base.cjs');
3
4
 
4
5
  //#region src/stores/file/in_memory.ts
5
- var in_memory_exports = {};
6
- require_rolldown_runtime.__export(in_memory_exports, { InMemoryFileStore: () => InMemoryFileStore });
6
+ var in_memory_exports = /* @__PURE__ */ require_runtime.__exportAll({ InMemoryFileStore: () => InMemoryFileStore });
7
7
  /**
8
8
  * Class that provides an in-memory file storage system. It extends the
9
9
  * BaseFileStore class and implements its readFile and writeFile methods.
@@ -1 +1 @@
1
- {"version":3,"file":"in_memory.cjs","names":["BaseFileStore","path: string","contents: string"],"sources":["../../../src/stores/file/in_memory.ts"],"sourcesContent":["import { BaseFileStore } from \"./base.js\";\n\n/**\n * Class that provides an in-memory file storage system. It extends the\n * BaseFileStore class and implements its readFile and writeFile methods.\n * This class is typically used in scenarios where temporary, in-memory\n * file storage is needed, such as during testing or for caching files in\n * memory for quick access.\n */\nexport class InMemoryFileStore extends BaseFileStore {\n lc_namespace = [\"langchain\", \"stores\", \"file\", \"in_memory\"];\n\n private files: Map<string, string> = new Map();\n\n /**\n * Retrieves the contents of a file given its path. If the file does not\n * exist, it throws an error.\n * @param path The path of the file to read.\n * @returns The contents of the file as a string.\n */\n async readFile(path: string): Promise<string> {\n const contents = this.files.get(path);\n if (contents === undefined) {\n throw new Error(`File not found: ${path}`);\n }\n return contents;\n }\n\n /**\n * Writes contents to a file at a given path. If the file already exists,\n * it overwrites the existing contents.\n * @param path The path of the file to write.\n * @param contents The contents to write to the file.\n * @returns Void\n */\n async writeFile(path: string, contents: string): Promise<void> {\n this.files.set(path, contents);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AASA,IAAa,oBAAb,cAAuCA,2BAAc;CACnD,eAAe;EAAC;EAAa;EAAU;EAAQ;CAAY;CAE3D,AAAQ,wBAA6B,IAAI;;;;;;;CAQzC,MAAM,SAASC,MAA+B;EAC5C,MAAM,WAAW,KAAK,MAAM,IAAI,KAAK;AACrC,MAAI,aAAa,OACf,OAAM,IAAI,MAAM,CAAC,gBAAgB,EAAE,MAAM;AAE3C,SAAO;CACR;;;;;;;;CASD,MAAM,UAAUA,MAAcC,UAAiC;EAC7D,KAAK,MAAM,IAAI,MAAM,SAAS;CAC/B;AACF"}
1
+ {"version":3,"file":"in_memory.cjs","names":["BaseFileStore"],"sources":["../../../src/stores/file/in_memory.ts"],"sourcesContent":["import { BaseFileStore } from \"./base.js\";\n\n/**\n * Class that provides an in-memory file storage system. It extends the\n * BaseFileStore class and implements its readFile and writeFile methods.\n * This class is typically used in scenarios where temporary, in-memory\n * file storage is needed, such as during testing or for caching files in\n * memory for quick access.\n */\nexport class InMemoryFileStore extends BaseFileStore {\n lc_namespace = [\"langchain\", \"stores\", \"file\", \"in_memory\"];\n\n private files: Map<string, string> = new Map();\n\n /**\n * Retrieves the contents of a file given its path. If the file does not\n * exist, it throws an error.\n * @param path The path of the file to read.\n * @returns The contents of the file as a string.\n */\n async readFile(path: string): Promise<string> {\n const contents = this.files.get(path);\n if (contents === undefined) {\n throw new Error(`File not found: ${path}`);\n }\n return contents;\n }\n\n /**\n * Writes contents to a file at a given path. If the file already exists,\n * it overwrites the existing contents.\n * @param path The path of the file to write.\n * @param contents The contents to write to the file.\n * @returns Void\n */\n async writeFile(path: string, contents: string): Promise<void> {\n this.files.set(path, contents);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AASA,IAAa,oBAAb,cAAuCA,2BAAc;CACnD,eAAe;EAAC;EAAa;EAAU;EAAQ;EAAY;CAE3D,AAAQ,wBAA6B,IAAI,KAAK;;;;;;;CAQ9C,MAAM,SAAS,MAA+B;EAC5C,MAAM,WAAW,KAAK,MAAM,IAAI,KAAK;AACrC,MAAI,aAAa,OACf,OAAM,IAAI,MAAM,mBAAmB,OAAO;AAE5C,SAAO;;;;;;;;;CAUT,MAAM,UAAU,MAAc,UAAiC;AAC7D,OAAK,MAAM,IAAI,MAAM,SAAS"}
@@ -1,7 +1,6 @@
1
1
  import { BaseFileStore } from "./base.cjs";
2
2
 
3
3
  //#region src/stores/file/in_memory.d.ts
4
-
5
4
  /**
6
5
  * Class that provides an in-memory file storage system. It extends the
7
6
  * BaseFileStore class and implements its readFile and writeFile methods.
@@ -1 +1 @@
1
- {"version":3,"file":"in_memory.d.cts","names":["BaseFileStore","InMemoryFileStore","Promise"],"sources":["../../../src/stores/file/in_memory.d.ts"],"sourcesContent":["import { BaseFileStore } from \"./base.js\";\n/**\n * Class that provides an in-memory file storage system. It extends the\n * BaseFileStore class and implements its readFile and writeFile methods.\n * This class is typically used in scenarios where temporary, in-memory\n * file storage is needed, such as during testing or for caching files in\n * memory for quick access.\n */\nexport declare class InMemoryFileStore extends BaseFileStore {\n lc_namespace: string[];\n private files;\n /**\n * Retrieves the contents of a file given its path. If the file does not\n * exist, it throws an error.\n * @param path The path of the file to read.\n * @returns The contents of the file as a string.\n */\n readFile(path: string): Promise<string>;\n /**\n * Writes contents to a file at a given path. If the file already exists,\n * it overwrites the existing contents.\n * @param path The path of the file to write.\n * @param contents The contents to write to the file.\n * @returns Void\n */\n writeFile(path: string, contents: string): Promise<void>;\n}\n//# sourceMappingURL=in_memory.d.ts.map"],"mappings":";;;;;;AAQA;;;;AAA4D;cAAvCC,iBAAAA,SAA0BD,aAAAA;;;;;;;;;0BASnBE;;;;;;;;6CAQmBA"}
1
+ {"version":3,"file":"in_memory.d.cts","names":[],"sources":["../../../src/stores/file/in_memory.ts"],"mappings":";;;;;AASA;;;;;cAAa,iBAAA,SAA0B,aAAA;EACrC,YAAA;EAAA,QAEQ,KAAA;EAH6B;;;;;;EAW/B,QAAA,CAAS,IAAA,WAAe,OAAA;EAed;;;;;;;EAAV,SAAA,CAAU,IAAA,UAAc,QAAA,WAAmB,OAAA;AAAA"}
@@ -1,7 +1,6 @@
1
1
  import { BaseFileStore } from "./base.js";
2
2
 
3
3
  //#region src/stores/file/in_memory.d.ts
4
-
5
4
  /**
6
5
  * Class that provides an in-memory file storage system. It extends the
7
6
  * BaseFileStore class and implements its readFile and writeFile methods.
@@ -1 +1 @@
1
- {"version":3,"file":"in_memory.d.ts","names":["BaseFileStore","InMemoryFileStore","Promise"],"sources":["../../../src/stores/file/in_memory.d.ts"],"sourcesContent":["import { BaseFileStore } from \"./base.js\";\n/**\n * Class that provides an in-memory file storage system. It extends the\n * BaseFileStore class and implements its readFile and writeFile methods.\n * This class is typically used in scenarios where temporary, in-memory\n * file storage is needed, such as during testing or for caching files in\n * memory for quick access.\n */\nexport declare class InMemoryFileStore extends BaseFileStore {\n lc_namespace: string[];\n private files;\n /**\n * Retrieves the contents of a file given its path. If the file does not\n * exist, it throws an error.\n * @param path The path of the file to read.\n * @returns The contents of the file as a string.\n */\n readFile(path: string): Promise<string>;\n /**\n * Writes contents to a file at a given path. If the file already exists,\n * it overwrites the existing contents.\n * @param path The path of the file to write.\n * @param contents The contents to write to the file.\n * @returns Void\n */\n writeFile(path: string, contents: string): Promise<void>;\n}\n//# sourceMappingURL=in_memory.d.ts.map"],"mappings":";;;;;;AAQA;;;;AAA4D;cAAvCC,iBAAAA,SAA0BD,aAAAA;;;;;;;;;0BASnBE;;;;;;;;6CAQmBA"}
1
+ {"version":3,"file":"in_memory.d.ts","names":[],"sources":["../../../src/stores/file/in_memory.ts"],"mappings":";;;;;AASA;;;;;cAAa,iBAAA,SAA0B,aAAA;EACrC,YAAA;EAAA,QAEQ,KAAA;EAH6B;;;;;;EAW/B,QAAA,CAAS,IAAA,WAAe,OAAA;EAed;;;;;;;EAAV,SAAA,CAAU,IAAA,UAAc,QAAA,WAAmB,OAAA;AAAA"}
@@ -1,9 +1,8 @@
1
- import { __export } from "../../_virtual/rolldown_runtime.js";
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
2
  import { BaseFileStore } from "./base.js";
3
3
 
4
4
  //#region src/stores/file/in_memory.ts
5
- var in_memory_exports = {};
6
- __export(in_memory_exports, { InMemoryFileStore: () => InMemoryFileStore });
5
+ var in_memory_exports = /* @__PURE__ */ __exportAll({ InMemoryFileStore: () => InMemoryFileStore });
7
6
  /**
8
7
  * Class that provides an in-memory file storage system. It extends the
9
8
  * BaseFileStore class and implements its readFile and writeFile methods.
@@ -1 +1 @@
1
- {"version":3,"file":"in_memory.js","names":["path: string","contents: string"],"sources":["../../../src/stores/file/in_memory.ts"],"sourcesContent":["import { BaseFileStore } from \"./base.js\";\n\n/**\n * Class that provides an in-memory file storage system. It extends the\n * BaseFileStore class and implements its readFile and writeFile methods.\n * This class is typically used in scenarios where temporary, in-memory\n * file storage is needed, such as during testing or for caching files in\n * memory for quick access.\n */\nexport class InMemoryFileStore extends BaseFileStore {\n lc_namespace = [\"langchain\", \"stores\", \"file\", \"in_memory\"];\n\n private files: Map<string, string> = new Map();\n\n /**\n * Retrieves the contents of a file given its path. If the file does not\n * exist, it throws an error.\n * @param path The path of the file to read.\n * @returns The contents of the file as a string.\n */\n async readFile(path: string): Promise<string> {\n const contents = this.files.get(path);\n if (contents === undefined) {\n throw new Error(`File not found: ${path}`);\n }\n return contents;\n }\n\n /**\n * Writes contents to a file at a given path. If the file already exists,\n * it overwrites the existing contents.\n * @param path The path of the file to write.\n * @param contents The contents to write to the file.\n * @returns Void\n */\n async writeFile(path: string, contents: string): Promise<void> {\n this.files.set(path, contents);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AASA,IAAa,oBAAb,cAAuC,cAAc;CACnD,eAAe;EAAC;EAAa;EAAU;EAAQ;CAAY;CAE3D,AAAQ,wBAA6B,IAAI;;;;;;;CAQzC,MAAM,SAASA,MAA+B;EAC5C,MAAM,WAAW,KAAK,MAAM,IAAI,KAAK;AACrC,MAAI,aAAa,OACf,OAAM,IAAI,MAAM,CAAC,gBAAgB,EAAE,MAAM;AAE3C,SAAO;CACR;;;;;;;;CASD,MAAM,UAAUA,MAAcC,UAAiC;EAC7D,KAAK,MAAM,IAAI,MAAM,SAAS;CAC/B;AACF"}
1
+ {"version":3,"file":"in_memory.js","names":[],"sources":["../../../src/stores/file/in_memory.ts"],"sourcesContent":["import { BaseFileStore } from \"./base.js\";\n\n/**\n * Class that provides an in-memory file storage system. It extends the\n * BaseFileStore class and implements its readFile and writeFile methods.\n * This class is typically used in scenarios where temporary, in-memory\n * file storage is needed, such as during testing or for caching files in\n * memory for quick access.\n */\nexport class InMemoryFileStore extends BaseFileStore {\n lc_namespace = [\"langchain\", \"stores\", \"file\", \"in_memory\"];\n\n private files: Map<string, string> = new Map();\n\n /**\n * Retrieves the contents of a file given its path. If the file does not\n * exist, it throws an error.\n * @param path The path of the file to read.\n * @returns The contents of the file as a string.\n */\n async readFile(path: string): Promise<string> {\n const contents = this.files.get(path);\n if (contents === undefined) {\n throw new Error(`File not found: ${path}`);\n }\n return contents;\n }\n\n /**\n * Writes contents to a file at a given path. If the file already exists,\n * it overwrites the existing contents.\n * @param path The path of the file to write.\n * @param contents The contents to write to the file.\n * @returns Void\n */\n async writeFile(path: string, contents: string): Promise<void> {\n this.files.set(path, contents);\n }\n}\n"],"mappings":";;;;;;;;;;;;AASA,IAAa,oBAAb,cAAuC,cAAc;CACnD,eAAe;EAAC;EAAa;EAAU;EAAQ;EAAY;CAE3D,AAAQ,wBAA6B,IAAI,KAAK;;;;;;;CAQ9C,MAAM,SAAS,MAA+B;EAC5C,MAAM,WAAW,KAAK,MAAM,IAAI,KAAK;AACrC,MAAI,aAAa,OACf,OAAM,IAAI,MAAM,mBAAmB,OAAO;AAE5C,SAAO;;;;;;;;;CAUT,MAAM,UAAU,MAAc,UAAiC;AAC7D,OAAK,MAAM,IAAI,MAAM,SAAS"}