@langchain/core 1.0.6 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (698) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/agents.cjs +1 -0
  3. package/agents.d.cts +1 -0
  4. package/agents.d.ts +1 -0
  5. package/agents.js +1 -0
  6. package/caches.cjs +1 -0
  7. package/caches.d.cts +1 -0
  8. package/caches.d.ts +1 -0
  9. package/caches.js +1 -0
  10. package/callbacks/base.cjs +1 -0
  11. package/callbacks/base.d.cts +1 -0
  12. package/callbacks/base.d.ts +1 -0
  13. package/callbacks/base.js +1 -0
  14. package/callbacks/dispatch/web.cjs +1 -0
  15. package/callbacks/dispatch/web.d.cts +1 -0
  16. package/callbacks/dispatch/web.d.ts +1 -0
  17. package/callbacks/dispatch/web.js +1 -0
  18. package/callbacks/dispatch.cjs +1 -0
  19. package/callbacks/dispatch.d.cts +1 -0
  20. package/callbacks/dispatch.d.ts +1 -0
  21. package/callbacks/dispatch.js +1 -0
  22. package/callbacks/manager.cjs +1 -0
  23. package/callbacks/manager.d.cts +1 -0
  24. package/callbacks/manager.d.ts +1 -0
  25. package/callbacks/manager.js +1 -0
  26. package/callbacks/promises.cjs +1 -0
  27. package/callbacks/promises.d.cts +1 -0
  28. package/callbacks/promises.d.ts +1 -0
  29. package/callbacks/promises.js +1 -0
  30. package/chat_history.cjs +1 -0
  31. package/chat_history.d.cts +1 -0
  32. package/chat_history.d.ts +1 -0
  33. package/chat_history.js +1 -0
  34. package/context.cjs +1 -0
  35. package/context.d.cts +1 -0
  36. package/context.d.ts +1 -0
  37. package/context.js +1 -0
  38. package/dist/caches/{base.cjs → index.cjs} +6 -6
  39. package/dist/caches/index.cjs.map +1 -0
  40. package/dist/caches/{base.d.cts → index.d.cts} +2 -2
  41. package/dist/caches/{base.d.ts → index.d.ts} +2 -2
  42. package/dist/caches/{base.js → index.js} +5 -5
  43. package/dist/caches/index.js.map +1 -0
  44. package/dist/callbacks/dispatch/index.d.ts +1 -0
  45. package/dist/callbacks/dispatch/web.d.ts +1 -0
  46. package/dist/chat_history.d.ts +1 -0
  47. package/dist/language_models/base.cjs +2 -2
  48. package/dist/language_models/base.cjs.map +1 -1
  49. package/dist/language_models/base.d.cts +1 -1
  50. package/dist/language_models/base.d.ts +3 -1
  51. package/dist/language_models/base.js +1 -1
  52. package/dist/language_models/base.js.map +1 -1
  53. package/dist/language_models/chat_models.cjs.map +1 -1
  54. package/dist/language_models/chat_models.d.cts +1 -1
  55. package/dist/language_models/chat_models.d.ts +4 -1
  56. package/dist/language_models/chat_models.js.map +1 -1
  57. package/dist/language_models/llms.cjs.map +1 -1
  58. package/dist/language_models/llms.d.cts +1 -1
  59. package/dist/language_models/llms.d.ts +2 -1
  60. package/dist/language_models/llms.js.map +1 -1
  61. package/dist/load/import_constants.cjs +1 -0
  62. package/dist/load/import_constants.cjs.map +1 -1
  63. package/dist/load/import_constants.js +1 -0
  64. package/dist/load/import_constants.js.map +1 -1
  65. package/dist/load/import_map.cjs +12 -12
  66. package/dist/load/import_map.cjs.map +1 -1
  67. package/dist/load/import_map.js +16 -16
  68. package/dist/load/import_map.js.map +1 -1
  69. package/dist/messages/base.cjs +10 -3
  70. package/dist/messages/base.cjs.map +1 -1
  71. package/dist/messages/base.js +10 -3
  72. package/dist/messages/base.js.map +1 -1
  73. package/dist/messages/message.d.cts +1 -1
  74. package/dist/messages/message.d.ts +1 -1
  75. package/dist/messages/system.cjs +25 -1
  76. package/dist/messages/system.cjs.map +1 -1
  77. package/dist/messages/system.d.cts +6 -0
  78. package/dist/messages/system.d.ts +6 -0
  79. package/dist/messages/system.js +25 -1
  80. package/dist/messages/system.js.map +1 -1
  81. package/dist/messages/transformers.d.cts +2 -1
  82. package/dist/messages/transformers.d.ts +2 -1
  83. package/dist/messages/utils.d.cts +8 -8
  84. package/dist/messages/utils.d.ts +8 -8
  85. package/dist/output_parsers/base.d.ts +3 -0
  86. package/dist/output_parsers/index.cjs +1 -1
  87. package/dist/output_parsers/index.js +1 -1
  88. package/dist/output_parsers/list.d.ts +1 -0
  89. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts +1 -1
  90. package/dist/output_parsers/string.d.ts +1 -0
  91. package/dist/prompts/base.d.ts +1 -0
  92. package/dist/prompts/chat.d.ts +1 -0
  93. package/dist/prompts/few_shot.d.ts +1 -0
  94. package/dist/prompts/image.d.ts +1 -0
  95. package/dist/prompts/prompt.d.ts +1 -0
  96. package/dist/prompts/serde.d.ts +1 -0
  97. package/dist/prompts/structured.d.ts +1 -1
  98. package/dist/prompts/template.d.ts +1 -1
  99. package/dist/retrievers/document_compressors/{base.cjs → index.cjs} +6 -6
  100. package/dist/retrievers/document_compressors/index.cjs.map +1 -0
  101. package/dist/retrievers/document_compressors/{base.d.cts → index.d.cts} +2 -2
  102. package/dist/retrievers/document_compressors/{base.d.ts → index.d.ts} +2 -2
  103. package/dist/retrievers/document_compressors/index.js +17 -0
  104. package/dist/retrievers/document_compressors/index.js.map +1 -0
  105. package/dist/retrievers/index.d.ts +1 -0
  106. package/dist/runnables/base.cjs +2 -2
  107. package/dist/runnables/base.cjs.map +1 -1
  108. package/dist/runnables/base.d.cts +0 -17
  109. package/dist/runnables/base.d.ts +0 -17
  110. package/dist/runnables/base.js +2 -2
  111. package/dist/runnables/base.js.map +1 -1
  112. package/dist/runnables/branch.d.ts +1 -0
  113. package/dist/runnables/history.d.ts +2 -0
  114. package/dist/runnables/index.cjs +4 -1
  115. package/dist/runnables/index.cjs.map +1 -1
  116. package/dist/runnables/index.d.cts +2 -1
  117. package/dist/runnables/index.d.ts +2 -1
  118. package/dist/runnables/index.js +4 -2
  119. package/dist/runnables/index.js.map +1 -1
  120. package/dist/runnables/passthrough.d.ts +1 -0
  121. package/dist/runnables/router.d.ts +1 -0
  122. package/dist/tools/index.cjs +9 -1
  123. package/dist/tools/index.cjs.map +1 -1
  124. package/dist/tools/index.d.cts +7 -0
  125. package/dist/tools/index.d.ts +9 -0
  126. package/dist/tools/index.js +10 -2
  127. package/dist/tools/index.js.map +1 -1
  128. package/dist/tools/types.cjs.map +1 -1
  129. package/dist/tools/types.d.cts +15 -14
  130. package/dist/tools/types.d.ts +17 -14
  131. package/dist/tools/types.js.map +1 -1
  132. package/dist/tracers/event_stream.d.ts +1 -0
  133. package/dist/utils/async_caller.cjs +9 -4
  134. package/dist/utils/async_caller.cjs.map +1 -1
  135. package/dist/utils/async_caller.js +8 -3
  136. package/dist/utils/async_caller.js.map +1 -1
  137. package/dist/utils/fast-json-patch/src/core.d.cts +0 -18
  138. package/dist/utils/fast-json-patch/src/core.d.ts +0 -18
  139. package/dist/utils/json_schema.d.cts +0 -5
  140. package/dist/utils/json_schema.d.ts +1 -5
  141. package/dist/utils/signal.d.cts +13 -0
  142. package/dist/utils/signal.d.ts +13 -0
  143. package/dist/utils/testing/chat_models.d.ts +1 -0
  144. package/dist/utils/testing/message_history.d.ts +1 -0
  145. package/dist/utils/types/index.cjs +2 -0
  146. package/dist/utils/types/index.d.cts +2 -2
  147. package/dist/utils/types/index.d.ts +2 -2
  148. package/dist/utils/types/index.js +3 -2
  149. package/dist/utils/types/zod.cjs +4 -0
  150. package/dist/utils/types/zod.cjs.map +1 -1
  151. package/dist/utils/types/zod.d.cts +3 -2
  152. package/dist/utils/types/zod.d.ts +3 -2
  153. package/dist/utils/types/zod.js +4 -1
  154. package/dist/utils/types/zod.js.map +1 -1
  155. package/dist/utils/zod-to-json-schema/Options.d.ts +3 -0
  156. package/dist/utils/zod-to-json-schema/Refs.d.ts +3 -0
  157. package/dist/utils/zod-to-json-schema/errorMessages.d.ts +1 -0
  158. package/dist/utils/zod-to-json-schema/index.d.ts +37 -0
  159. package/dist/utils/zod-to-json-schema/parseDef.d.ts +3 -0
  160. package/dist/utils/zod-to-json-schema/parsers/any.d.ts +2 -0
  161. package/dist/utils/zod-to-json-schema/parsers/array.d.ts +1 -0
  162. package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts +1 -0
  163. package/dist/utils/zod-to-json-schema/parsers/branded.d.ts +3 -0
  164. package/dist/utils/zod-to-json-schema/parsers/catch.d.ts +3 -0
  165. package/dist/utils/zod-to-json-schema/parsers/date.d.ts +2 -0
  166. package/dist/utils/zod-to-json-schema/parsers/default.d.ts +3 -0
  167. package/dist/utils/zod-to-json-schema/parsers/effects.d.ts +3 -0
  168. package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts +1 -0
  169. package/dist/utils/zod-to-json-schema/parsers/literal.d.ts +1 -0
  170. package/dist/utils/zod-to-json-schema/parsers/map.d.ts +2 -0
  171. package/dist/utils/zod-to-json-schema/parsers/never.d.ts +1 -0
  172. package/dist/utils/zod-to-json-schema/parsers/null.d.ts +2 -0
  173. package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts +1 -0
  174. package/dist/utils/zod-to-json-schema/parsers/number.d.ts +1 -0
  175. package/dist/utils/zod-to-json-schema/parsers/object.d.ts +1 -0
  176. package/dist/utils/zod-to-json-schema/parsers/optional.d.ts +3 -0
  177. package/dist/utils/zod-to-json-schema/parsers/pipeline.d.ts +4 -0
  178. package/dist/utils/zod-to-json-schema/parsers/promise.d.ts +3 -0
  179. package/dist/utils/zod-to-json-schema/parsers/readonly.d.ts +3 -0
  180. package/dist/utils/zod-to-json-schema/parsers/record.d.ts +1 -0
  181. package/dist/utils/zod-to-json-schema/parsers/set.d.ts +1 -0
  182. package/dist/utils/zod-to-json-schema/parsers/string.d.ts +1 -0
  183. package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts +1 -0
  184. package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts +1 -0
  185. package/dist/utils/zod-to-json-schema/parsers/union.d.ts +2 -1
  186. package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts +1 -0
  187. package/dist/utils/zod-to-json-schema/selectParser.d.ts +3 -0
  188. package/dist/utils/zod-to-json-schema/zodToJsonSchema.d.ts +3 -0
  189. package/document_loaders/base.cjs +1 -0
  190. package/document_loaders/base.d.cts +1 -0
  191. package/document_loaders/base.d.ts +1 -0
  192. package/document_loaders/base.js +1 -0
  193. package/document_loaders/langsmith.cjs +1 -0
  194. package/document_loaders/langsmith.d.cts +1 -0
  195. package/document_loaders/langsmith.d.ts +1 -0
  196. package/document_loaders/langsmith.js +1 -0
  197. package/documents.cjs +1 -0
  198. package/documents.d.cts +1 -0
  199. package/documents.d.ts +1 -0
  200. package/documents.js +1 -0
  201. package/embeddings.cjs +1 -0
  202. package/embeddings.d.cts +1 -0
  203. package/embeddings.d.ts +1 -0
  204. package/embeddings.js +1 -0
  205. package/example_selectors.cjs +1 -0
  206. package/example_selectors.d.cts +1 -0
  207. package/example_selectors.d.ts +1 -0
  208. package/example_selectors.js +1 -0
  209. package/indexing.cjs +1 -0
  210. package/indexing.d.cts +1 -0
  211. package/indexing.d.ts +1 -0
  212. package/indexing.js +1 -0
  213. package/language_models/base.cjs +1 -0
  214. package/language_models/base.d.cts +1 -0
  215. package/language_models/base.d.ts +1 -0
  216. package/language_models/base.js +1 -0
  217. package/language_models/chat_models.cjs +1 -0
  218. package/language_models/chat_models.d.cts +1 -0
  219. package/language_models/chat_models.d.ts +1 -0
  220. package/language_models/chat_models.js +1 -0
  221. package/language_models/llms.cjs +1 -0
  222. package/language_models/llms.d.cts +1 -0
  223. package/language_models/llms.d.ts +1 -0
  224. package/language_models/llms.js +1 -0
  225. package/language_models/profile.cjs +1 -0
  226. package/language_models/profile.d.cts +1 -0
  227. package/language_models/profile.d.ts +1 -0
  228. package/language_models/profile.js +1 -0
  229. package/load/serializable.cjs +1 -0
  230. package/load/serializable.d.cts +1 -0
  231. package/load/serializable.d.ts +1 -0
  232. package/load/serializable.js +1 -0
  233. package/load.cjs +1 -0
  234. package/load.d.cts +1 -0
  235. package/load.d.ts +1 -0
  236. package/load.js +1 -0
  237. package/memory.cjs +1 -0
  238. package/memory.d.cts +1 -0
  239. package/memory.d.ts +1 -0
  240. package/memory.js +1 -0
  241. package/messages/tool.cjs +1 -0
  242. package/messages/tool.d.cts +1 -0
  243. package/messages/tool.d.ts +1 -0
  244. package/messages/tool.js +1 -0
  245. package/messages.cjs +1 -0
  246. package/messages.d.cts +1 -0
  247. package/messages.d.ts +1 -0
  248. package/messages.js +1 -0
  249. package/output_parsers/openai_functions.cjs +1 -0
  250. package/output_parsers/openai_functions.d.cts +1 -0
  251. package/output_parsers/openai_functions.d.ts +1 -0
  252. package/output_parsers/openai_functions.js +1 -0
  253. package/output_parsers/openai_tools.cjs +1 -0
  254. package/output_parsers/openai_tools.d.cts +1 -0
  255. package/output_parsers/openai_tools.d.ts +1 -0
  256. package/output_parsers/openai_tools.js +1 -0
  257. package/output_parsers.cjs +1 -0
  258. package/output_parsers.d.cts +1 -0
  259. package/output_parsers.d.ts +1 -0
  260. package/output_parsers.js +1 -0
  261. package/outputs.cjs +1 -0
  262. package/outputs.d.cts +1 -0
  263. package/outputs.d.ts +1 -0
  264. package/outputs.js +1 -0
  265. package/package.json +163 -63
  266. package/prompt_values.cjs +1 -0
  267. package/prompt_values.d.cts +1 -0
  268. package/prompt_values.d.ts +1 -0
  269. package/prompt_values.js +1 -0
  270. package/prompts.cjs +1 -0
  271. package/prompts.d.cts +1 -0
  272. package/prompts.d.ts +1 -0
  273. package/prompts.js +1 -0
  274. package/retrievers/document_compressors.cjs +1 -0
  275. package/retrievers/document_compressors.d.cts +1 -0
  276. package/retrievers/document_compressors.d.ts +1 -0
  277. package/retrievers/document_compressors.js +1 -0
  278. package/retrievers.cjs +1 -0
  279. package/retrievers.d.cts +1 -0
  280. package/retrievers.d.ts +1 -0
  281. package/retrievers.js +1 -0
  282. package/runnables/graph.cjs +1 -0
  283. package/runnables/graph.d.cts +1 -0
  284. package/runnables/graph.d.ts +1 -0
  285. package/runnables/graph.js +1 -0
  286. package/runnables.cjs +1 -0
  287. package/runnables.d.cts +1 -0
  288. package/runnables.d.ts +1 -0
  289. package/runnables.js +1 -0
  290. package/singletons.cjs +1 -0
  291. package/singletons.d.cts +1 -0
  292. package/singletons.d.ts +1 -0
  293. package/singletons.js +1 -0
  294. package/stores.cjs +1 -0
  295. package/stores.d.cts +1 -0
  296. package/stores.d.ts +1 -0
  297. package/stores.js +1 -0
  298. package/structured_query.cjs +1 -0
  299. package/structured_query.d.cts +1 -0
  300. package/structured_query.d.ts +1 -0
  301. package/structured_query.js +1 -0
  302. package/tools.cjs +1 -0
  303. package/tools.d.cts +1 -0
  304. package/tools.d.ts +1 -0
  305. package/tools.js +1 -0
  306. package/tracers/base.cjs +1 -0
  307. package/tracers/base.d.cts +1 -0
  308. package/tracers/base.d.ts +1 -0
  309. package/tracers/base.js +1 -0
  310. package/tracers/console.cjs +1 -0
  311. package/tracers/console.d.cts +1 -0
  312. package/tracers/console.d.ts +1 -0
  313. package/tracers/console.js +1 -0
  314. package/tracers/log_stream.cjs +1 -0
  315. package/tracers/log_stream.d.cts +1 -0
  316. package/tracers/log_stream.d.ts +1 -0
  317. package/tracers/log_stream.js +1 -0
  318. package/tracers/run_collector.cjs +1 -0
  319. package/tracers/run_collector.d.cts +1 -0
  320. package/tracers/run_collector.d.ts +1 -0
  321. package/tracers/run_collector.js +1 -0
  322. package/tracers/tracer_langchain.cjs +1 -0
  323. package/tracers/tracer_langchain.d.cts +1 -0
  324. package/tracers/tracer_langchain.d.ts +1 -0
  325. package/tracers/tracer_langchain.js +1 -0
  326. package/types/stream.cjs +1 -0
  327. package/types/stream.d.cts +1 -0
  328. package/types/stream.d.ts +1 -0
  329. package/types/stream.js +1 -0
  330. package/utils/async_caller.cjs +1 -0
  331. package/utils/async_caller.d.cts +1 -0
  332. package/utils/async_caller.d.ts +1 -0
  333. package/utils/async_caller.js +1 -0
  334. package/utils/chunk_array.cjs +1 -0
  335. package/utils/chunk_array.d.cts +1 -0
  336. package/utils/chunk_array.d.ts +1 -0
  337. package/utils/chunk_array.js +1 -0
  338. package/utils/env.cjs +1 -0
  339. package/utils/env.d.cts +1 -0
  340. package/utils/env.d.ts +1 -0
  341. package/utils/env.js +1 -0
  342. package/utils/event_source_parse.cjs +1 -0
  343. package/utils/event_source_parse.d.cts +1 -0
  344. package/utils/event_source_parse.d.ts +1 -0
  345. package/utils/event_source_parse.js +1 -0
  346. package/utils/format.cjs +1 -0
  347. package/utils/format.d.cts +1 -0
  348. package/utils/format.d.ts +1 -0
  349. package/utils/format.js +1 -0
  350. package/utils/function_calling.cjs +1 -0
  351. package/utils/function_calling.d.cts +1 -0
  352. package/utils/function_calling.d.ts +1 -0
  353. package/utils/function_calling.js +1 -0
  354. package/utils/hash.cjs +1 -0
  355. package/utils/hash.d.cts +1 -0
  356. package/utils/hash.d.ts +1 -0
  357. package/utils/hash.js +1 -0
  358. package/utils/json_patch.cjs +1 -0
  359. package/utils/json_patch.d.cts +1 -0
  360. package/utils/json_patch.d.ts +1 -0
  361. package/utils/json_patch.js +1 -0
  362. package/utils/json_schema.cjs +1 -0
  363. package/utils/json_schema.d.cts +1 -0
  364. package/utils/json_schema.d.ts +1 -0
  365. package/utils/json_schema.js +1 -0
  366. package/utils/math.cjs +1 -0
  367. package/utils/math.d.cts +1 -0
  368. package/utils/math.d.ts +1 -0
  369. package/utils/math.js +1 -0
  370. package/utils/stream.cjs +1 -0
  371. package/utils/stream.d.cts +1 -0
  372. package/utils/stream.d.ts +1 -0
  373. package/utils/stream.js +1 -0
  374. package/utils/testing.cjs +1 -0
  375. package/utils/testing.d.cts +1 -0
  376. package/utils/testing.d.ts +1 -0
  377. package/utils/testing.js +1 -0
  378. package/utils/tiktoken.cjs +1 -0
  379. package/utils/tiktoken.d.cts +1 -0
  380. package/utils/tiktoken.d.ts +1 -0
  381. package/utils/tiktoken.js +1 -0
  382. package/utils/types.cjs +1 -0
  383. package/utils/types.d.cts +1 -0
  384. package/utils/types.d.ts +1 -0
  385. package/utils/types.js +1 -0
  386. package/vectorstores.cjs +1 -0
  387. package/vectorstores.d.cts +1 -0
  388. package/vectorstores.d.ts +1 -0
  389. package/vectorstores.js +1 -0
  390. package/dist/agents.d.cts.map +0 -1
  391. package/dist/agents.d.ts.map +0 -1
  392. package/dist/caches/base.cjs.map +0 -1
  393. package/dist/caches/base.d.cts.map +0 -1
  394. package/dist/caches/base.d.ts.map +0 -1
  395. package/dist/caches/base.js.map +0 -1
  396. package/dist/callbacks/base.d.cts.map +0 -1
  397. package/dist/callbacks/base.d.ts.map +0 -1
  398. package/dist/callbacks/dispatch/index.d.cts.map +0 -1
  399. package/dist/callbacks/dispatch/index.d.ts.map +0 -1
  400. package/dist/callbacks/dispatch/web.d.cts.map +0 -1
  401. package/dist/callbacks/dispatch/web.d.ts.map +0 -1
  402. package/dist/callbacks/manager.d.cts.map +0 -1
  403. package/dist/callbacks/manager.d.ts.map +0 -1
  404. package/dist/chat_history.d.cts.map +0 -1
  405. package/dist/chat_history.d.ts.map +0 -1
  406. package/dist/context.d.cts.map +0 -1
  407. package/dist/context.d.ts.map +0 -1
  408. package/dist/document_loaders/base.d.cts.map +0 -1
  409. package/dist/document_loaders/base.d.ts.map +0 -1
  410. package/dist/document_loaders/langsmith.d.cts.map +0 -1
  411. package/dist/document_loaders/langsmith.d.ts.map +0 -1
  412. package/dist/documents/document.d.cts.map +0 -1
  413. package/dist/documents/document.d.ts.map +0 -1
  414. package/dist/documents/transformers.d.cts.map +0 -1
  415. package/dist/documents/transformers.d.ts.map +0 -1
  416. package/dist/embeddings.d.cts.map +0 -1
  417. package/dist/embeddings.d.ts.map +0 -1
  418. package/dist/example_selectors/base.d.cts.map +0 -1
  419. package/dist/example_selectors/base.d.ts.map +0 -1
  420. package/dist/example_selectors/conditional.d.cts.map +0 -1
  421. package/dist/example_selectors/conditional.d.ts.map +0 -1
  422. package/dist/example_selectors/length_based.d.cts.map +0 -1
  423. package/dist/example_selectors/length_based.d.ts.map +0 -1
  424. package/dist/example_selectors/semantic_similarity.d.cts.map +0 -1
  425. package/dist/example_selectors/semantic_similarity.d.ts.map +0 -1
  426. package/dist/indexing/base.d.cts.map +0 -1
  427. package/dist/indexing/base.d.ts.map +0 -1
  428. package/dist/indexing/record_manager.d.cts.map +0 -1
  429. package/dist/indexing/record_manager.d.ts.map +0 -1
  430. package/dist/language_models/base.d.cts.map +0 -1
  431. package/dist/language_models/base.d.ts.map +0 -1
  432. package/dist/language_models/chat_models.d.cts.map +0 -1
  433. package/dist/language_models/chat_models.d.ts.map +0 -1
  434. package/dist/language_models/llms.d.cts.map +0 -1
  435. package/dist/language_models/llms.d.ts.map +0 -1
  436. package/dist/language_models/profile.d.cts.map +0 -1
  437. package/dist/language_models/profile.d.ts.map +0 -1
  438. package/dist/load/import_type.d.cts.map +0 -1
  439. package/dist/load/import_type.d.ts.map +0 -1
  440. package/dist/load/index.d.cts.map +0 -1
  441. package/dist/load/index.d.ts.map +0 -1
  442. package/dist/load/map_keys.d.cts.map +0 -1
  443. package/dist/load/map_keys.d.ts.map +0 -1
  444. package/dist/load/serializable.d.cts.map +0 -1
  445. package/dist/load/serializable.d.ts.map +0 -1
  446. package/dist/memory.d.cts.map +0 -1
  447. package/dist/memory.d.ts.map +0 -1
  448. package/dist/messages/ai.d.cts.map +0 -1
  449. package/dist/messages/ai.d.ts.map +0 -1
  450. package/dist/messages/base.d.cts.map +0 -1
  451. package/dist/messages/base.d.ts.map +0 -1
  452. package/dist/messages/chat.d.cts.map +0 -1
  453. package/dist/messages/chat.d.ts.map +0 -1
  454. package/dist/messages/content/base.d.cts.map +0 -1
  455. package/dist/messages/content/base.d.ts.map +0 -1
  456. package/dist/messages/content/data.d.cts.map +0 -1
  457. package/dist/messages/content/data.d.ts.map +0 -1
  458. package/dist/messages/content/index.d.cts.map +0 -1
  459. package/dist/messages/content/index.d.ts.map +0 -1
  460. package/dist/messages/content/multimodal.d.cts.map +0 -1
  461. package/dist/messages/content/multimodal.d.ts.map +0 -1
  462. package/dist/messages/content/tools.d.cts.map +0 -1
  463. package/dist/messages/content/tools.d.ts.map +0 -1
  464. package/dist/messages/format.d.cts.map +0 -1
  465. package/dist/messages/format.d.ts.map +0 -1
  466. package/dist/messages/function.d.cts.map +0 -1
  467. package/dist/messages/function.d.ts.map +0 -1
  468. package/dist/messages/human.d.cts.map +0 -1
  469. package/dist/messages/human.d.ts.map +0 -1
  470. package/dist/messages/message.d.cts.map +0 -1
  471. package/dist/messages/message.d.ts.map +0 -1
  472. package/dist/messages/metadata.d.cts.map +0 -1
  473. package/dist/messages/metadata.d.ts.map +0 -1
  474. package/dist/messages/modifier.d.cts.map +0 -1
  475. package/dist/messages/modifier.d.ts.map +0 -1
  476. package/dist/messages/system.d.cts.map +0 -1
  477. package/dist/messages/system.d.ts.map +0 -1
  478. package/dist/messages/tool.d.cts.map +0 -1
  479. package/dist/messages/tool.d.ts.map +0 -1
  480. package/dist/messages/transformers.d.cts.map +0 -1
  481. package/dist/messages/transformers.d.ts.map +0 -1
  482. package/dist/messages/utils.d.cts.map +0 -1
  483. package/dist/messages/utils.d.ts.map +0 -1
  484. package/dist/output_parsers/base.d.cts.map +0 -1
  485. package/dist/output_parsers/base.d.ts.map +0 -1
  486. package/dist/output_parsers/bytes.d.cts.map +0 -1
  487. package/dist/output_parsers/bytes.d.ts.map +0 -1
  488. package/dist/output_parsers/json.d.cts.map +0 -1
  489. package/dist/output_parsers/json.d.ts.map +0 -1
  490. package/dist/output_parsers/list.d.cts.map +0 -1
  491. package/dist/output_parsers/list.d.ts.map +0 -1
  492. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts.map +0 -1
  493. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts.map +0 -1
  494. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts.map +0 -1
  495. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts.map +0 -1
  496. package/dist/output_parsers/string.d.cts.map +0 -1
  497. package/dist/output_parsers/string.d.ts.map +0 -1
  498. package/dist/output_parsers/structured.d.cts.map +0 -1
  499. package/dist/output_parsers/structured.d.ts.map +0 -1
  500. package/dist/output_parsers/transform.d.cts.map +0 -1
  501. package/dist/output_parsers/transform.d.ts.map +0 -1
  502. package/dist/output_parsers/xml.d.cts.map +0 -1
  503. package/dist/output_parsers/xml.d.ts.map +0 -1
  504. package/dist/outputs.d.cts.map +0 -1
  505. package/dist/outputs.d.ts.map +0 -1
  506. package/dist/prompt_values.d.cts.map +0 -1
  507. package/dist/prompt_values.d.ts.map +0 -1
  508. package/dist/prompts/base.d.cts.map +0 -1
  509. package/dist/prompts/base.d.ts.map +0 -1
  510. package/dist/prompts/chat.d.cts.map +0 -1
  511. package/dist/prompts/chat.d.ts.map +0 -1
  512. package/dist/prompts/dict.d.cts.map +0 -1
  513. package/dist/prompts/dict.d.ts.map +0 -1
  514. package/dist/prompts/few_shot.d.cts.map +0 -1
  515. package/dist/prompts/few_shot.d.ts.map +0 -1
  516. package/dist/prompts/image.d.cts.map +0 -1
  517. package/dist/prompts/image.d.ts.map +0 -1
  518. package/dist/prompts/pipeline.d.cts.map +0 -1
  519. package/dist/prompts/pipeline.d.ts.map +0 -1
  520. package/dist/prompts/prompt.d.cts.map +0 -1
  521. package/dist/prompts/prompt.d.ts.map +0 -1
  522. package/dist/prompts/serde.d.cts.map +0 -1
  523. package/dist/prompts/serde.d.ts.map +0 -1
  524. package/dist/prompts/string.d.cts.map +0 -1
  525. package/dist/prompts/string.d.ts.map +0 -1
  526. package/dist/prompts/structured.d.cts.map +0 -1
  527. package/dist/prompts/structured.d.ts.map +0 -1
  528. package/dist/prompts/template.d.cts.map +0 -1
  529. package/dist/prompts/template.d.ts.map +0 -1
  530. package/dist/retrievers/document_compressors/base.cjs.map +0 -1
  531. package/dist/retrievers/document_compressors/base.d.cts.map +0 -1
  532. package/dist/retrievers/document_compressors/base.d.ts.map +0 -1
  533. package/dist/retrievers/document_compressors/base.js +0 -17
  534. package/dist/retrievers/document_compressors/base.js.map +0 -1
  535. package/dist/retrievers/index.d.cts.map +0 -1
  536. package/dist/retrievers/index.d.ts.map +0 -1
  537. package/dist/runnables/base.d.cts.map +0 -1
  538. package/dist/runnables/base.d.ts.map +0 -1
  539. package/dist/runnables/branch.d.cts.map +0 -1
  540. package/dist/runnables/branch.d.ts.map +0 -1
  541. package/dist/runnables/config.d.cts.map +0 -1
  542. package/dist/runnables/config.d.ts.map +0 -1
  543. package/dist/runnables/graph.d.cts.map +0 -1
  544. package/dist/runnables/graph.d.ts.map +0 -1
  545. package/dist/runnables/history.d.cts.map +0 -1
  546. package/dist/runnables/history.d.ts.map +0 -1
  547. package/dist/runnables/passthrough.d.cts.map +0 -1
  548. package/dist/runnables/passthrough.d.ts.map +0 -1
  549. package/dist/runnables/router.d.cts.map +0 -1
  550. package/dist/runnables/router.d.ts.map +0 -1
  551. package/dist/runnables/types.d.cts.map +0 -1
  552. package/dist/runnables/types.d.ts.map +0 -1
  553. package/dist/singletons/async_local_storage/context.d.cts.map +0 -1
  554. package/dist/singletons/async_local_storage/context.d.ts.map +0 -1
  555. package/dist/singletons/async_local_storage/globals.d.cts.map +0 -1
  556. package/dist/singletons/async_local_storage/globals.d.ts.map +0 -1
  557. package/dist/singletons/async_local_storage/index.d.cts.map +0 -1
  558. package/dist/singletons/async_local_storage/index.d.ts.map +0 -1
  559. package/dist/singletons/callbacks.d.cts.map +0 -1
  560. package/dist/singletons/callbacks.d.ts.map +0 -1
  561. package/dist/stores.d.cts.map +0 -1
  562. package/dist/stores.d.ts.map +0 -1
  563. package/dist/structured_query/base.d.cts.map +0 -1
  564. package/dist/structured_query/base.d.ts.map +0 -1
  565. package/dist/structured_query/functional.d.cts.map +0 -1
  566. package/dist/structured_query/functional.d.ts.map +0 -1
  567. package/dist/structured_query/ir.d.cts.map +0 -1
  568. package/dist/structured_query/ir.d.ts.map +0 -1
  569. package/dist/structured_query/utils.d.cts.map +0 -1
  570. package/dist/structured_query/utils.d.ts.map +0 -1
  571. package/dist/tools/index.d.cts.map +0 -1
  572. package/dist/tools/index.d.ts.map +0 -1
  573. package/dist/tools/types.d.cts.map +0 -1
  574. package/dist/tools/types.d.ts.map +0 -1
  575. package/dist/tools/utils.d.cts.map +0 -1
  576. package/dist/tools/utils.d.ts.map +0 -1
  577. package/dist/tracers/base.d.cts.map +0 -1
  578. package/dist/tracers/base.d.ts.map +0 -1
  579. package/dist/tracers/console.d.cts.map +0 -1
  580. package/dist/tracers/console.d.ts.map +0 -1
  581. package/dist/tracers/event_stream.d.cts.map +0 -1
  582. package/dist/tracers/event_stream.d.ts.map +0 -1
  583. package/dist/tracers/log_stream.d.cts.map +0 -1
  584. package/dist/tracers/log_stream.d.ts.map +0 -1
  585. package/dist/tracers/run_collector.d.cts.map +0 -1
  586. package/dist/tracers/run_collector.d.ts.map +0 -1
  587. package/dist/tracers/tracer_langchain.d.cts.map +0 -1
  588. package/dist/tracers/tracer_langchain.d.ts.map +0 -1
  589. package/dist/types/_internal.d.cts.map +0 -1
  590. package/dist/types/_internal.d.ts.map +0 -1
  591. package/dist/types/type-utils.d.cts.map +0 -1
  592. package/dist/types/type-utils.d.ts.map +0 -1
  593. package/dist/utils/async_caller.d.cts.map +0 -1
  594. package/dist/utils/async_caller.d.ts.map +0 -1
  595. package/dist/utils/chunk_array.d.cts.map +0 -1
  596. package/dist/utils/chunk_array.d.ts.map +0 -1
  597. package/dist/utils/env.d.cts.map +0 -1
  598. package/dist/utils/env.d.ts.map +0 -1
  599. package/dist/utils/event_source_parse.d.cts.map +0 -1
  600. package/dist/utils/event_source_parse.d.ts.map +0 -1
  601. package/dist/utils/fast-json-patch/src/core.d.cts.map +0 -1
  602. package/dist/utils/fast-json-patch/src/core.d.ts.map +0 -1
  603. package/dist/utils/fast-json-patch/src/duplex.d.cts.map +0 -1
  604. package/dist/utils/fast-json-patch/src/duplex.d.ts.map +0 -1
  605. package/dist/utils/format.d.cts.map +0 -1
  606. package/dist/utils/format.d.ts.map +0 -1
  607. package/dist/utils/function_calling.d.cts.map +0 -1
  608. package/dist/utils/function_calling.d.ts.map +0 -1
  609. package/dist/utils/hash.d.cts.map +0 -1
  610. package/dist/utils/hash.d.ts.map +0 -1
  611. package/dist/utils/js-sha256/hash.d.cts.map +0 -1
  612. package/dist/utils/js-sha256/hash.d.ts.map +0 -1
  613. package/dist/utils/json.d.cts.map +0 -1
  614. package/dist/utils/json.d.ts.map +0 -1
  615. package/dist/utils/json_schema.d.cts.map +0 -1
  616. package/dist/utils/json_schema.d.ts.map +0 -1
  617. package/dist/utils/math.d.cts.map +0 -1
  618. package/dist/utils/math.d.ts.map +0 -1
  619. package/dist/utils/ml-distance/similarities.d.cts.map +0 -1
  620. package/dist/utils/ml-distance/similarities.d.ts.map +0 -1
  621. package/dist/utils/stream.d.cts.map +0 -1
  622. package/dist/utils/stream.d.ts.map +0 -1
  623. package/dist/utils/testing/chat_models.d.cts.map +0 -1
  624. package/dist/utils/testing/chat_models.d.ts.map +0 -1
  625. package/dist/utils/testing/embeddings.d.cts.map +0 -1
  626. package/dist/utils/testing/embeddings.d.ts.map +0 -1
  627. package/dist/utils/testing/llms.d.cts.map +0 -1
  628. package/dist/utils/testing/llms.d.ts.map +0 -1
  629. package/dist/utils/testing/message_history.d.cts.map +0 -1
  630. package/dist/utils/testing/message_history.d.ts.map +0 -1
  631. package/dist/utils/testing/output_parsers.d.cts.map +0 -1
  632. package/dist/utils/testing/output_parsers.d.ts.map +0 -1
  633. package/dist/utils/testing/retrievers.d.cts.map +0 -1
  634. package/dist/utils/testing/retrievers.d.ts.map +0 -1
  635. package/dist/utils/testing/runnables.d.cts.map +0 -1
  636. package/dist/utils/testing/runnables.d.ts.map +0 -1
  637. package/dist/utils/testing/tools.d.cts.map +0 -1
  638. package/dist/utils/testing/tools.d.ts.map +0 -1
  639. package/dist/utils/testing/tracers.d.cts.map +0 -1
  640. package/dist/utils/testing/tracers.d.ts.map +0 -1
  641. package/dist/utils/testing/vectorstores.d.cts.map +0 -1
  642. package/dist/utils/testing/vectorstores.d.ts.map +0 -1
  643. package/dist/utils/tiktoken.d.cts.map +0 -1
  644. package/dist/utils/tiktoken.d.ts.map +0 -1
  645. package/dist/utils/types/index.d.cts.map +0 -1
  646. package/dist/utils/types/index.d.ts.map +0 -1
  647. package/dist/utils/types/zod.d.cts.map +0 -1
  648. package/dist/utils/types/zod.d.ts.map +0 -1
  649. package/dist/utils/zod-to-json-schema/errorMessages.d.cts.map +0 -1
  650. package/dist/utils/zod-to-json-schema/errorMessages.d.ts.map +0 -1
  651. package/dist/utils/zod-to-json-schema/parseTypes.d.cts.map +0 -1
  652. package/dist/utils/zod-to-json-schema/parseTypes.d.ts.map +0 -1
  653. package/dist/utils/zod-to-json-schema/parsers/any.d.cts.map +0 -1
  654. package/dist/utils/zod-to-json-schema/parsers/any.d.ts.map +0 -1
  655. package/dist/utils/zod-to-json-schema/parsers/array.d.cts.map +0 -1
  656. package/dist/utils/zod-to-json-schema/parsers/array.d.ts.map +0 -1
  657. package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts.map +0 -1
  658. package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts.map +0 -1
  659. package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts.map +0 -1
  660. package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts.map +0 -1
  661. package/dist/utils/zod-to-json-schema/parsers/date.d.cts.map +0 -1
  662. package/dist/utils/zod-to-json-schema/parsers/date.d.ts.map +0 -1
  663. package/dist/utils/zod-to-json-schema/parsers/enum.d.cts.map +0 -1
  664. package/dist/utils/zod-to-json-schema/parsers/enum.d.ts.map +0 -1
  665. package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts.map +0 -1
  666. package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts.map +0 -1
  667. package/dist/utils/zod-to-json-schema/parsers/literal.d.cts.map +0 -1
  668. package/dist/utils/zod-to-json-schema/parsers/literal.d.ts.map +0 -1
  669. package/dist/utils/zod-to-json-schema/parsers/map.d.cts.map +0 -1
  670. package/dist/utils/zod-to-json-schema/parsers/map.d.ts.map +0 -1
  671. package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts.map +0 -1
  672. package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts.map +0 -1
  673. package/dist/utils/zod-to-json-schema/parsers/never.d.cts.map +0 -1
  674. package/dist/utils/zod-to-json-schema/parsers/never.d.ts.map +0 -1
  675. package/dist/utils/zod-to-json-schema/parsers/null.d.cts.map +0 -1
  676. package/dist/utils/zod-to-json-schema/parsers/null.d.ts.map +0 -1
  677. package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts.map +0 -1
  678. package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts.map +0 -1
  679. package/dist/utils/zod-to-json-schema/parsers/number.d.cts.map +0 -1
  680. package/dist/utils/zod-to-json-schema/parsers/number.d.ts.map +0 -1
  681. package/dist/utils/zod-to-json-schema/parsers/object.d.cts.map +0 -1
  682. package/dist/utils/zod-to-json-schema/parsers/object.d.ts.map +0 -1
  683. package/dist/utils/zod-to-json-schema/parsers/record.d.cts.map +0 -1
  684. package/dist/utils/zod-to-json-schema/parsers/record.d.ts.map +0 -1
  685. package/dist/utils/zod-to-json-schema/parsers/set.d.cts.map +0 -1
  686. package/dist/utils/zod-to-json-schema/parsers/set.d.ts.map +0 -1
  687. package/dist/utils/zod-to-json-schema/parsers/string.d.cts.map +0 -1
  688. package/dist/utils/zod-to-json-schema/parsers/string.d.ts.map +0 -1
  689. package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts.map +0 -1
  690. package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts.map +0 -1
  691. package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts.map +0 -1
  692. package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts.map +0 -1
  693. package/dist/utils/zod-to-json-schema/parsers/union.d.cts.map +0 -1
  694. package/dist/utils/zod-to-json-schema/parsers/union.d.ts.map +0 -1
  695. package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts.map +0 -1
  696. package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts.map +0 -1
  697. package/dist/vectorstores.d.cts.map +0 -1
  698. package/dist/vectorstores.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","names":["KVMap","BaseRun","RunTree","ChainValues","AgentAction","AgentFinish","LLMResult","BaseMessage","Serialized","BaseCallbackHandler","BaseCallbackHandlerInput","HandleLLMNewTokenCallbackFields","NewTokenIndices","Document","RunType","Run","Record","Array","AgentRun","isBaseTracer","BaseTracer","Map","Promise","langsmith_schemas0","Attachments"],"sources":["../../src/tracers/base.d.ts"],"sourcesContent":["import { KVMap, BaseRun } from \"langsmith/schemas\";\nimport { RunTree } from \"langsmith/run_trees\";\nimport type { ChainValues } from \"../utils/types/index.js\";\nimport type { AgentAction, AgentFinish } from \"../agents.js\";\nimport type { LLMResult } from \"../outputs.js\";\nimport type { BaseMessage } from \"../messages/base.js\";\nimport { Serialized } from \"../load/serializable.js\";\nimport { BaseCallbackHandler, BaseCallbackHandlerInput, HandleLLMNewTokenCallbackFields, NewTokenIndices } from \"../callbacks/base.js\";\nimport type { Document } from \"../documents/document.js\";\nexport type RunType = string;\n// TODO: Remove this type and just use the base LangSmith Run type.\nexport interface Run extends BaseRun {\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: this[];\n child_execution_order: number;\n events: Array<{\n name: string;\n time: string;\n kwargs?: Record<string, unknown>;\n }>;\n trace_id?: string;\n dotted_order?: string;\n /** @internal */\n _serialized_start_time?: string;\n}\nexport interface AgentRun extends Run {\n actions: AgentAction[];\n}\nexport declare function isBaseTracer(x: BaseCallbackHandler): x is BaseTracer;\nexport declare abstract class BaseTracer extends BaseCallbackHandler {\n /** @deprecated Use `runTreeMap` instead. */\n protected runMap: Map<string, Run>;\n protected runTreeMap: Map<string, RunTree>;\n protected usesRunTreeMap: boolean;\n constructor(_fields?: BaseCallbackHandlerInput);\n copy(): this;\n protected getRunById(runId?: string): Run | undefined;\n protected stringifyError(error: unknown): string;\n protected abstract persistRun(run: Run): Promise<void>;\n protected _addChildRun(parentRun: Run, childRun: Run): void;\n _addRunToRunMap(run: Run): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n protected _endTrace(run: Run): Promise<void>;\n protected _getExecutionOrder(parentRunId: string | undefined): number;\n /**\n * Create and add a run to the run map for LLM start events.\n * This must sometimes be done synchronously to avoid race conditions\n * when callbacks are backgrounded, so we expose it as a separate method here.\n */\n _createRunForLLMStart(llm: Serialized, prompts: string[], runId: string, parentRunId?: string, extraParams?: KVMap, tags?: string[], metadata?: KVMap, name?: string): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n handleLLMStart(llm: Serialized, prompts: string[], runId: string, parentRunId?: string, extraParams?: KVMap, tags?: string[], metadata?: KVMap, name?: string): Promise<Run>;\n /**\n * Create and add a run to the run map for chat model start events.\n * This must sometimes be done synchronously to avoid race conditions\n * when callbacks are backgrounded, so we expose it as a separate method here.\n */\n _createRunForChatModelStart(llm: Serialized, messages: BaseMessage[][], runId: string, parentRunId?: string, extraParams?: KVMap, tags?: string[], metadata?: KVMap, name?: string): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n handleChatModelStart(llm: Serialized, messages: BaseMessage[][], runId: string, parentRunId?: string, extraParams?: KVMap, tags?: string[], metadata?: KVMap, name?: string): Promise<Run>;\n handleLLMEnd(output: LLMResult, runId: string, _parentRunId?: string, _tags?: string[], extraParams?: Record<string, unknown>): Promise<Run>;\n handleLLMError(error: unknown, runId: string, _parentRunId?: string, _tags?: string[], extraParams?: Record<string, unknown>): Promise<Run>;\n /**\n * Create and add a run to the run map for chain start events.\n * This must sometimes be done synchronously to avoid race conditions\n * when callbacks are backgrounded, so we expose it as a separate method here.\n */\n _createRunForChainStart(chain: Serialized, inputs: ChainValues, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, runType?: string, name?: string): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n handleChainStart(chain: Serialized, inputs: ChainValues, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, runType?: string, name?: string): Promise<Run>;\n handleChainEnd(outputs: ChainValues, runId: string, _parentRunId?: string, _tags?: string[], kwargs?: {\n inputs?: Record<string, unknown>;\n }): Promise<Run>;\n handleChainError(error: unknown, runId: string, _parentRunId?: string, _tags?: string[], kwargs?: {\n inputs?: Record<string, unknown>;\n }): Promise<Run>;\n /**\n * Create and add a run to the run map for tool start events.\n * This must sometimes be done synchronously to avoid race conditions\n * when callbacks are backgrounded, so we expose it as a separate method here.\n */\n _createRunForToolStart(tool: Serialized, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, name?: string): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n handleToolStart(tool: Serialized, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, name?: string): Promise<Run>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handleToolEnd(output: any, runId: string): Promise<Run>;\n handleToolError(error: unknown, runId: string): Promise<Run>;\n handleAgentAction(action: AgentAction, runId: string): Promise<void>;\n handleAgentEnd(action: AgentFinish, runId: string): Promise<void>;\n /**\n * Create and add a run to the run map for retriever start events.\n * This must sometimes be done synchronously to avoid race conditions\n * when callbacks are backgrounded, so we expose it as a separate method here.\n */\n _createRunForRetrieverStart(retriever: Serialized, query: string, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, name?: string): {\n name: string;\n run_type: string;\n extra?: KVMap | undefined;\n error?: string | undefined;\n serialized?: object | undefined;\n inputs: KVMap;\n outputs?: KVMap | undefined;\n reference_example_id?: string | undefined;\n parent_run_id?: string | undefined;\n tags?: string[] | undefined;\n attachments?: import(\"langsmith/schemas\").Attachments | undefined;\n // some optional fields are always present here\n id: string;\n start_time: number;\n end_time?: number | undefined;\n execution_order: number;\n // some additional fields that don't exist in sdk runs\n child_runs: Run[];\n child_execution_order: number;\n events: {\n name: string;\n time: string;\n kwargs?: Record<string, unknown> | undefined;\n }[];\n trace_id?: string | undefined;\n dotted_order?: string | undefined;\n /** @internal */\n _serialized_start_time?: string | undefined;\n };\n handleRetrieverStart(retriever: Serialized, query: string, runId: string, parentRunId?: string, tags?: string[], metadata?: KVMap, name?: string): Promise<Run>;\n handleRetrieverEnd(documents: Document<Record<string, unknown>>[], runId: string): Promise<Run>;\n handleRetrieverError(error: unknown, runId: string): Promise<Run>;\n handleText(text: string, runId: string): Promise<void>;\n handleLLMNewToken(token: string, idx: NewTokenIndices, runId: string, _parentRunId?: string, _tags?: string[], fields?: HandleLLMNewTokenCallbackFields): Promise<Run>;\n // custom event handlers\n onRunCreate?(run: Run): void | Promise<void>;\n onRunUpdate?(run: Run): void | Promise<void>;\n onLLMStart?(run: Run): void | Promise<void>;\n onLLMEnd?(run: Run): void | Promise<void>;\n onLLMError?(run: Run): void | Promise<void>;\n onChainStart?(run: Run): void | Promise<void>;\n onChainEnd?(run: Run): void | Promise<void>;\n onChainError?(run: Run): void | Promise<void>;\n onToolStart?(run: Run): void | Promise<void>;\n onToolEnd?(run: Run): void | Promise<void>;\n onToolError?(run: Run): void | Promise<void>;\n onAgentAction?(run: Run): void | Promise<void>;\n onAgentEnd?(run: Run): void | Promise<void>;\n onRetrieverStart?(run: Run): void | Promise<void>;\n onRetrieverEnd?(run: Run): void | Promise<void>;\n onRetrieverError?(run: Run): void | Promise<void>;\n onText?(run: Run): void | Promise<void>;\n onLLMNewToken?(run: Run, token: string, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n kwargs?: {\n chunk: any;\n }): void | Promise<void>;\n}\n"],"mappings":";;;;;;;;;;;;KASYc,OAAAA;;UAEKC,GAAAA,SAAYd;EAFjBa;EAEKC,EAAAA,EAAAA,MAAG;EAAA,UAAA,EAAA,MAAA;EAAA,QAYHC,CAAAA,EAAAA,MAAAA;EAAM,eAHXC,EAAAA,MAAAA;EAAK;EATmB,UAAA,EAAA,IAAA,EAAA;EAmBnBC,qBAAQ,EAAA,MAAA;EAAA,MAAA,EAVbD,KAUa,CAAA;IACZb,IAAAA,EAAAA,MAAAA;IADqBW,IAAAA,EAAAA,MAAAA;IAAG,MAAA,CAAA,EAPpBC,MAOoB,CAAA,MAAA,EAAA,OAAA,CAAA;EAGbG,CAAAA,CAAAA;EAAY,QAAA,CAAA,EAAA,MAAA;EAAA,YAAIV,CAAAA,EAAAA,MAAAA;EAAmB;EAAkB,sBAAA,CAAA,EAAA,MAAA;AAC7E;AAAwC,UAJvBS,QAAAA,SAAiBH,GAIM,CAAA;EAAA,OAENA,EALrBX,WAKqBW,EAAAA;;AACIb,iBAJdiB,YAAAA,CAIcjB,CAAAA,EAJEO,mBAIFP,CAAAA,EAAAA,CAAAA,IAJ6BkB,UAI7BlB;AAAZmB,uBAHID,UAAAA,SAAmBX,mBAAAA,CAGvBY;EAAG;EAEqB,UAERN,MAAAA,EALpBM,GAKoBN,CAAAA,MAAAA,EALRA,GAKQA,CAAAA;EAAG,UAENA,UAAAA,EANbM,GAMaN,CAAAA,MAAAA,EANDb,OAMCa,CAAAA;EAAG,UAAGO,cAAAA,EAAAA,O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;wCACHV,kFAAkFD,kCAAkCW,QAAQP;;oBAEhJA,aAAaO;oBACbP,aAAaO;mBACdP,aAAaO;iBACfP,aAAaO;mBACXP,aAAaO;qBACXP,aAAaO;mBACfP,aAAaO;qBACXP,aAAaO;oBACdP,aAAaO;kBACfP,aAAaO;oBACXP,aAAaO;sBACXP,aAAaO;mBAChBP,aAAaO;yBACPP,aAAaO;uBACfP,aAAaO;yBACXP,aAAaO;eACvBP,aAAaO;sBACNP;;;;aAITO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"console.d.cts","names":["BaseTracer","Run","ConsoleCallbackHandler","Promise"],"sources":["../../src/tracers/console.d.ts"],"sourcesContent":["import { BaseTracer, type Run } from \"./base.js\";\n/**\n * A tracer that logs all events to the console. It extends from the\n * `BaseTracer` class and overrides its methods to provide custom logging\n * functionality.\n * @example\n * ```typescript\n *\n * const llm = new ChatAnthropic({\n * temperature: 0,\n * tags: [\"example\", \"callbacks\", \"constructor\"],\n * callbacks: [new ConsoleCallbackHandler()],\n * });\n *\n * ```\n */\nexport declare class ConsoleCallbackHandler extends BaseTracer {\n name: \"console_callback_handler\";\n /**\n * Method used to persist the run. In this case, it simply returns a\n * resolved promise as there's no persistence logic.\n * @param _run The run to persist.\n * @returns A resolved promise.\n */\n protected persistRun(_run: Run): Promise<void>;\n // utility methods\n /**\n * Method used to get all the parent runs of a given run.\n * @param run The run whose parents are to be retrieved.\n * @returns An array of parent runs.\n */\n getParents(run: Run): Run[];\n /**\n * Method used to get a string representation of the run's lineage, which\n * is used in logging.\n * @param run The run whose lineage is to be retrieved.\n * @returns A string representation of the run's lineage.\n */\n getBreadcrumbs(run: Run): string;\n // logging methods\n /**\n * Method used to log the start of a chain run.\n * @param run The chain run that has started.\n * @returns void\n */\n onChainStart(run: Run): void;\n /**\n * Method used to log the end of a chain run.\n * @param run The chain run that has ended.\n * @returns void\n */\n onChainEnd(run: Run): void;\n /**\n * Method used to log any errors of a chain run.\n * @param run The chain run that has errored.\n * @returns void\n */\n onChainError(run: Run): void;\n /**\n * Method used to log the start of an LLM run.\n * @param run The LLM run that has started.\n * @returns void\n */\n onLLMStart(run: Run): void;\n /**\n * Method used to log the end of an LLM run.\n * @param run The LLM run that has ended.\n * @returns void\n */\n onLLMEnd(run: Run): void;\n /**\n * Method used to log any errors of an LLM run.\n * @param run The LLM run that has errored.\n * @returns void\n */\n onLLMError(run: Run): void;\n /**\n * Method used to log the start of a tool run.\n * @param run The tool run that has started.\n * @returns void\n */\n onToolStart(run: Run): void;\n /**\n * Method used to log the end of a tool run.\n * @param run The tool run that has ended.\n * @returns void\n */\n onToolEnd(run: Run): void;\n /**\n * Method used to log any errors of a tool run.\n * @param run The tool run that has errored.\n * @returns void\n */\n onToolError(run: Run): void;\n /**\n * Method used to log the start of a retriever run.\n * @param run The retriever run that has started.\n * @returns void\n */\n onRetrieverStart(run: Run): void;\n /**\n * Method used to log the end of a retriever run.\n * @param run The retriever run that has ended.\n * @returns void\n */\n onRetrieverEnd(run: Run): void;\n /**\n * Method used to log any errors of a retriever run.\n * @param run The retriever run that has errored.\n * @returns void\n */\n onRetrieverError(run: Run): void;\n /**\n * Method used to log the action selected by the agent.\n * @param run The run in which the agent action occurred.\n * @returns void\n */\n onAgentAction(run: Run): void;\n}\n"],"mappings":";;;;;;AAgBA;;;;;;;;;;;;;AAiEqBC,cAjEAC,sBAAAA,SAA+BF,UAAAA,CAiE/BC;EAAG,IAMLA,EAAAA,0BAAAA;EAAG;;;;;;EAvEwC,UAAA,UAAA,CAAA,IAAA,EAQ/BA,GAR+B,CAAA,EAQzBE,OARyB,CAAA,IAAA,CAAA;;;;;;;kBAe1CF,MAAMA;;;;;;;sBAOFA;;;;;;;oBAOFA;;;;;;kBAMFA;;;;;;oBAMEA;;;;;;kBAMFA;;;;;;gBAMFA;;;;;;kBAMEA;;;;;;mBAMCA;;;;;;iBAMFA;;;;;;mBAMEA;;;;;;wBAMKA;;;;;;sBAMFA;;;;;;wBAMEA;;;;;;qBAMHA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"console.d.ts","names":["BaseTracer","Run","ConsoleCallbackHandler","Promise"],"sources":["../../src/tracers/console.d.ts"],"sourcesContent":["import { BaseTracer, type Run } from \"./base.js\";\n/**\n * A tracer that logs all events to the console. It extends from the\n * `BaseTracer` class and overrides its methods to provide custom logging\n * functionality.\n * @example\n * ```typescript\n *\n * const llm = new ChatAnthropic({\n * temperature: 0,\n * tags: [\"example\", \"callbacks\", \"constructor\"],\n * callbacks: [new ConsoleCallbackHandler()],\n * });\n *\n * ```\n */\nexport declare class ConsoleCallbackHandler extends BaseTracer {\n name: \"console_callback_handler\";\n /**\n * Method used to persist the run. In this case, it simply returns a\n * resolved promise as there's no persistence logic.\n * @param _run The run to persist.\n * @returns A resolved promise.\n */\n protected persistRun(_run: Run): Promise<void>;\n // utility methods\n /**\n * Method used to get all the parent runs of a given run.\n * @param run The run whose parents are to be retrieved.\n * @returns An array of parent runs.\n */\n getParents(run: Run): Run[];\n /**\n * Method used to get a string representation of the run's lineage, which\n * is used in logging.\n * @param run The run whose lineage is to be retrieved.\n * @returns A string representation of the run's lineage.\n */\n getBreadcrumbs(run: Run): string;\n // logging methods\n /**\n * Method used to log the start of a chain run.\n * @param run The chain run that has started.\n * @returns void\n */\n onChainStart(run: Run): void;\n /**\n * Method used to log the end of a chain run.\n * @param run The chain run that has ended.\n * @returns void\n */\n onChainEnd(run: Run): void;\n /**\n * Method used to log any errors of a chain run.\n * @param run The chain run that has errored.\n * @returns void\n */\n onChainError(run: Run): void;\n /**\n * Method used to log the start of an LLM run.\n * @param run The LLM run that has started.\n * @returns void\n */\n onLLMStart(run: Run): void;\n /**\n * Method used to log the end of an LLM run.\n * @param run The LLM run that has ended.\n * @returns void\n */\n onLLMEnd(run: Run): void;\n /**\n * Method used to log any errors of an LLM run.\n * @param run The LLM run that has errored.\n * @returns void\n */\n onLLMError(run: Run): void;\n /**\n * Method used to log the start of a tool run.\n * @param run The tool run that has started.\n * @returns void\n */\n onToolStart(run: Run): void;\n /**\n * Method used to log the end of a tool run.\n * @param run The tool run that has ended.\n * @returns void\n */\n onToolEnd(run: Run): void;\n /**\n * Method used to log any errors of a tool run.\n * @param run The tool run that has errored.\n * @returns void\n */\n onToolError(run: Run): void;\n /**\n * Method used to log the start of a retriever run.\n * @param run The retriever run that has started.\n * @returns void\n */\n onRetrieverStart(run: Run): void;\n /**\n * Method used to log the end of a retriever run.\n * @param run The retriever run that has ended.\n * @returns void\n */\n onRetrieverEnd(run: Run): void;\n /**\n * Method used to log any errors of a retriever run.\n * @param run The retriever run that has errored.\n * @returns void\n */\n onRetrieverError(run: Run): void;\n /**\n * Method used to log the action selected by the agent.\n * @param run The run in which the agent action occurred.\n * @returns void\n */\n onAgentAction(run: Run): void;\n}\n"],"mappings":";;;;;;AAgBA;;;;;;;;;;;;;AAiEqBC,cAjEAC,sBAAAA,SAA+BF,UAAAA,CAiE/BC;EAAG,IAMLA,EAAAA,0BAAAA;EAAG;;;;;;EAvEwC,UAAA,UAAA,CAAA,IAAA,EAQ/BA,GAR+B,CAAA,EAQzBE,OARyB,CAAA,IAAA,CAAA;;;;;;;kBAe1CF,MAAMA;;;;;;;sBAOFA;;;;;;;oBAOFA;;;;;;kBAMFA;;;;;;oBAMEA;;;;;;kBAMFA;;;;;;gBAMFA;;;;;;kBAMEA;;;;;;mBAMCA;;;;;;iBAMFA;;;;;;mBAMEA;;;;;;wBAMKA;;;;;;sBAMFA;;;;;;wBAMEA;;;;;;qBAMHA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"event_stream.d.cts","names":["BaseTracer","Run","BaseCallbackHandler","BaseCallbackHandlerInput","CallbackHandlerPrefersStreaming","IterableReadableStream","StreamEventData","StreamEvent","Record","RunInfo","EventStreamCallbackHandlerInput","isStreamEventsHandler","EventStreamCallbackHandler","TransformStream","WritableStreamDefaultWriter","Symbol","asyncIterator","Promise","T","AsyncGenerator"],"sources":["../../src/tracers/event_stream.d.ts"],"sourcesContent":["import { BaseTracer, type Run } from \"./base.js\";\nimport { BaseCallbackHandler, BaseCallbackHandlerInput, CallbackHandlerPrefersStreaming } from \"../callbacks/base.js\";\nimport { IterableReadableStream } from \"../utils/stream.js\";\n/**\n * Data associated with a StreamEvent.\n */\nexport type StreamEventData = {\n /**\n * The input passed to the runnable that generated the event.\n * Inputs will sometimes be available at the *START* of the runnable, and\n * sometimes at the *END* of the runnable.\n * If a runnable is able to stream its inputs, then its input by definition\n * won't be known until the *END* of the runnable when it has finished streaming\n * its inputs.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n input?: any;\n /**\n * The output of the runnable that generated the event.\n * Outputs will only be available at the *END* of the runnable.\n * For most runnables, this field can be inferred from the `chunk` field,\n * though there might be some exceptions for special cased runnables (e.g., like\n * chat models), which may return more information.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n output?: any;\n /**\n * A streaming chunk from the output that generated the event.\n * chunks support addition in general, and adding them up should result\n * in the output of the runnable that generated the event.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n chunk?: any;\n};\n/**\n * A streaming event.\n *\n * Schema of a streaming event which is produced from the streamEvents method.\n */\nexport type StreamEvent = {\n /**\n * Event names are of the format: on_[runnable_type]_(start|stream|end).\n *\n * Runnable types are one of:\n * - llm - used by non chat models\n * - chat_model - used by chat models\n * - prompt -- e.g., ChatPromptTemplate\n * - tool -- LangChain tools\n * - chain - most Runnables are of this type\n *\n * Further, the events are categorized as one of:\n * - start - when the runnable starts\n * - stream - when the runnable is streaming\n * - end - when the runnable ends\n *\n * start, stream and end are associated with slightly different `data` payload.\n *\n * Please see the documentation for `EventData` for more details.\n */\n event: string;\n /** The name of the runnable that generated the event. */\n name: string;\n /**\n * An randomly generated ID to keep track of the execution of the given runnable.\n *\n * Each child runnable that gets invoked as part of the execution of a parent runnable\n * is assigned its own unique ID.\n */\n run_id: string;\n /**\n * Tags associated with the runnable that generated this event.\n * Tags are always inherited from parent runnables.\n */\n tags?: string[];\n /** Metadata associated with the runnable that generated this event. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata: Record<string, any>;\n /**\n * Event data.\n *\n * The contents of the event data depend on the event type.\n */\n data: StreamEventData;\n};\ntype RunInfo = {\n name: string;\n tags: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata: Record<string, any>;\n runType: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n inputs?: Record<string, any>;\n};\nexport interface EventStreamCallbackHandlerInput extends BaseCallbackHandlerInput {\n autoClose?: boolean;\n includeNames?: string[];\n includeTypes?: string[];\n includeTags?: string[];\n excludeNames?: string[];\n excludeTypes?: string[];\n excludeTags?: string[];\n}\nexport declare const isStreamEventsHandler: (handler: BaseCallbackHandler) => handler is EventStreamCallbackHandler;\n/**\n * Class that extends the `BaseTracer` class from the\n * `langchain.callbacks.tracers.base` module. It represents a callback\n * handler that logs the execution of runs and emits `RunLog` instances to a\n * `RunLogStream`.\n */\nexport declare class EventStreamCallbackHandler extends BaseTracer implements CallbackHandlerPrefersStreaming {\n protected autoClose: boolean;\n protected includeNames?: string[];\n protected includeTypes?: string[];\n protected includeTags?: string[];\n protected excludeNames?: string[];\n protected excludeTypes?: string[];\n protected excludeTags?: string[];\n private runInfoMap;\n private tappedPromises;\n protected transformStream: TransformStream;\n writer: WritableStreamDefaultWriter;\n receiveStream: IterableReadableStream<StreamEvent>;\n name: string;\n lc_prefer_streaming: boolean;\n constructor(fields?: EventStreamCallbackHandlerInput);\n [Symbol.asyncIterator](): IterableReadableStream<StreamEvent>;\n protected persistRun(_run: Run): Promise<void>;\n _includeRun(run: RunInfo): boolean;\n tapOutputIterable<T>(runId: string, outputStream: AsyncGenerator<T>): AsyncGenerator<T>;\n send(payload: StreamEvent, run: RunInfo): Promise<void>;\n sendEndEvent(payload: StreamEvent, run: RunInfo): Promise<void>;\n onLLMStart(run: Run): Promise<void>;\n onLLMNewToken(run: Run, token: string, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n kwargs?: {\n chunk: any;\n }): Promise<void>;\n onLLMEnd(run: Run): Promise<void>;\n onChainStart(run: Run): Promise<void>;\n onChainEnd(run: Run): Promise<void>;\n onToolStart(run: Run): Promise<void>;\n onToolEnd(run: Run): Promise<void>;\n onRetrieverStart(run: Run): Promise<void>;\n onRetrieverEnd(run: Run): Promise<void>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handleCustomEvent(eventName: string, data: any, runId: string): Promise<void>;\n finish(): Promise<void>;\n}\nexport {};\n"],"mappings":";;;;AAMA;AAiCA;;AAqCcQ,KAtEFF,eAAAA,GAsEEE;EAAM;AAMK;AAWzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAtDYD,WAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqCEC;;;;;;QAMJF;;UAWOI,+BAAAA,SAAwCP"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"event_stream.d.ts","names":["BaseTracer","Run","BaseCallbackHandler","BaseCallbackHandlerInput","CallbackHandlerPrefersStreaming","IterableReadableStream","StreamEventData","StreamEvent","Record","RunInfo","EventStreamCallbackHandlerInput","isStreamEventsHandler","EventStreamCallbackHandler","TransformStream","WritableStreamDefaultWriter","Symbol","asyncIterator","Promise","T","AsyncGenerator"],"sources":["../../src/tracers/event_stream.d.ts"],"sourcesContent":["import { BaseTracer, type Run } from \"./base.js\";\nimport { BaseCallbackHandler, BaseCallbackHandlerInput, CallbackHandlerPrefersStreaming } from \"../callbacks/base.js\";\nimport { IterableReadableStream } from \"../utils/stream.js\";\n/**\n * Data associated with a StreamEvent.\n */\nexport type StreamEventData = {\n /**\n * The input passed to the runnable that generated the event.\n * Inputs will sometimes be available at the *START* of the runnable, and\n * sometimes at the *END* of the runnable.\n * If a runnable is able to stream its inputs, then its input by definition\n * won't be known until the *END* of the runnable when it has finished streaming\n * its inputs.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n input?: any;\n /**\n * The output of the runnable that generated the event.\n * Outputs will only be available at the *END* of the runnable.\n * For most runnables, this field can be inferred from the `chunk` field,\n * though there might be some exceptions for special cased runnables (e.g., like\n * chat models), which may return more information.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n output?: any;\n /**\n * A streaming chunk from the output that generated the event.\n * chunks support addition in general, and adding them up should result\n * in the output of the runnable that generated the event.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n chunk?: any;\n};\n/**\n * A streaming event.\n *\n * Schema of a streaming event which is produced from the streamEvents method.\n */\nexport type StreamEvent = {\n /**\n * Event names are of the format: on_[runnable_type]_(start|stream|end).\n *\n * Runnable types are one of:\n * - llm - used by non chat models\n * - chat_model - used by chat models\n * - prompt -- e.g., ChatPromptTemplate\n * - tool -- LangChain tools\n * - chain - most Runnables are of this type\n *\n * Further, the events are categorized as one of:\n * - start - when the runnable starts\n * - stream - when the runnable is streaming\n * - end - when the runnable ends\n *\n * start, stream and end are associated with slightly different `data` payload.\n *\n * Please see the documentation for `EventData` for more details.\n */\n event: string;\n /** The name of the runnable that generated the event. */\n name: string;\n /**\n * An randomly generated ID to keep track of the execution of the given runnable.\n *\n * Each child runnable that gets invoked as part of the execution of a parent runnable\n * is assigned its own unique ID.\n */\n run_id: string;\n /**\n * Tags associated with the runnable that generated this event.\n * Tags are always inherited from parent runnables.\n */\n tags?: string[];\n /** Metadata associated with the runnable that generated this event. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata: Record<string, any>;\n /**\n * Event data.\n *\n * The contents of the event data depend on the event type.\n */\n data: StreamEventData;\n};\ntype RunInfo = {\n name: string;\n tags: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata: Record<string, any>;\n runType: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n inputs?: Record<string, any>;\n};\nexport interface EventStreamCallbackHandlerInput extends BaseCallbackHandlerInput {\n autoClose?: boolean;\n includeNames?: string[];\n includeTypes?: string[];\n includeTags?: string[];\n excludeNames?: string[];\n excludeTypes?: string[];\n excludeTags?: string[];\n}\nexport declare const isStreamEventsHandler: (handler: BaseCallbackHandler) => handler is EventStreamCallbackHandler;\n/**\n * Class that extends the `BaseTracer` class from the\n * `langchain.callbacks.tracers.base` module. It represents a callback\n * handler that logs the execution of runs and emits `RunLog` instances to a\n * `RunLogStream`.\n */\nexport declare class EventStreamCallbackHandler extends BaseTracer implements CallbackHandlerPrefersStreaming {\n protected autoClose: boolean;\n protected includeNames?: string[];\n protected includeTypes?: string[];\n protected includeTags?: string[];\n protected excludeNames?: string[];\n protected excludeTypes?: string[];\n protected excludeTags?: string[];\n private runInfoMap;\n private tappedPromises;\n protected transformStream: TransformStream;\n writer: WritableStreamDefaultWriter;\n receiveStream: IterableReadableStream<StreamEvent>;\n name: string;\n lc_prefer_streaming: boolean;\n constructor(fields?: EventStreamCallbackHandlerInput);\n [Symbol.asyncIterator](): IterableReadableStream<StreamEvent>;\n protected persistRun(_run: Run): Promise<void>;\n _includeRun(run: RunInfo): boolean;\n tapOutputIterable<T>(runId: string, outputStream: AsyncGenerator<T>): AsyncGenerator<T>;\n send(payload: StreamEvent, run: RunInfo): Promise<void>;\n sendEndEvent(payload: StreamEvent, run: RunInfo): Promise<void>;\n onLLMStart(run: Run): Promise<void>;\n onLLMNewToken(run: Run, token: string, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n kwargs?: {\n chunk: any;\n }): Promise<void>;\n onLLMEnd(run: Run): Promise<void>;\n onChainStart(run: Run): Promise<void>;\n onChainEnd(run: Run): Promise<void>;\n onToolStart(run: Run): Promise<void>;\n onToolEnd(run: Run): Promise<void>;\n onRetrieverStart(run: Run): Promise<void>;\n onRetrieverEnd(run: Run): Promise<void>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handleCustomEvent(eventName: string, data: any, runId: string): Promise<void>;\n finish(): Promise<void>;\n}\nexport {};\n"],"mappings":";;;;AAMA;AAiCA;;AAqCcQ,KAtEFF,eAAAA,GAsEEE;EAAM;AAMK;AAWzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAtDYD,WAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqCEC;;;;;;QAMJF;;UAWOI,+BAAAA,SAAwCP"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"log_stream.d.cts","names":["Operation","JSONPatchOperation","BaseTracer","Run","BaseCallbackHandler","BaseCallbackHandlerInput","CallbackHandlerPrefersStreaming","HandleLLMNewTokenCallbackFields","IterableReadableStream","StreamEvent","StreamEventData","LogEntry","Record","RunState","RunLogPatch","RunLog","SchemaFormat","LogStreamCallbackHandlerInput","isLogStreamHandler","LogStreamCallbackHandler","TransformStream","WritableStreamDefaultWriter","Symbol","asyncIterator","Promise","T","AsyncGenerator"],"sources":["../../src/tracers/log_stream.d.ts"],"sourcesContent":["import { type Operation as JSONPatchOperation } from \"../utils/fast-json-patch/index.js\";\nimport { BaseTracer, type Run } from \"./base.js\";\nimport { BaseCallbackHandler, BaseCallbackHandlerInput, CallbackHandlerPrefersStreaming, HandleLLMNewTokenCallbackFields } from \"../callbacks/base.js\";\nimport { IterableReadableStream } from \"../utils/stream.js\";\nimport type { StreamEvent, StreamEventData } from \"./event_stream.js\";\nexport type { StreamEvent, StreamEventData };\n/**\n * Interface that represents the structure of a log entry in the\n * `LogStreamCallbackHandler`.\n */\nexport type LogEntry = {\n /** ID of the sub-run. */\n id: string;\n /** Name of the object being run. */\n name: string;\n /** Type of the object being run, eg. prompt, chain, llm, etc. */\n type: string;\n /** List of tags for the run. */\n tags: string[];\n /** Key-value pairs of metadata for the run. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata: Record<string, any>;\n /** ISO-8601 timestamp of when the run started. */\n start_time: string;\n /** List of general output chunks streamed by this run. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n streamed_output: any[];\n /** List of LLM tokens streamed by this run, if applicable. */\n streamed_output_str: string[];\n /** Inputs to this run. Not available currently via streamLog. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n inputs?: any;\n /** Final output of this run. Only available after the run has finished successfully. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n final_output?: any;\n /** ISO-8601 timestamp of when the run ended. Only available after the run has finished. */\n end_time?: string;\n};\nexport type RunState = {\n /** ID of the sub-run. */\n id: string;\n /** List of output chunks streamed by Runnable.stream() */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n streamed_output: any[];\n /** Final output of the run, usually the result of aggregating streamed_output. Only available after the run has finished successfully. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n final_output?: any;\n /**\n * List of sub-runs contained in this run, if any, in the order they were started.\n * If filters were supplied, this list will contain only the runs that matched the filters.\n */\n logs: Record<string, LogEntry>;\n /** Name of the object being run. */\n name: string;\n /** Type of the object being run, eg. prompt, chain, llm, etc. */\n type: string;\n};\n/**\n * List of jsonpatch JSONPatchOperations, which describe how to create the run state\n * from an empty dict. This is the minimal representation of the log, designed to\n * be serialized as JSON and sent over the wire to reconstruct the log on the other\n * side. Reconstruction of the state can be done with any jsonpatch-compliant library,\n * see https://jsonpatch.com for more information.\n */\nexport declare class RunLogPatch {\n ops: JSONPatchOperation[];\n constructor(fields: {\n ops?: JSONPatchOperation[];\n });\n concat(other: RunLogPatch): RunLog;\n}\nexport declare class RunLog extends RunLogPatch {\n state: RunState;\n constructor(fields: {\n ops?: JSONPatchOperation[];\n state: RunState;\n });\n concat(other: RunLogPatch): RunLog;\n static fromRunLogPatch(patch: RunLogPatch): RunLog;\n}\nexport type SchemaFormat = \"original\" | \"streaming_events\";\nexport interface LogStreamCallbackHandlerInput extends BaseCallbackHandlerInput {\n autoClose?: boolean;\n includeNames?: string[];\n includeTypes?: string[];\n includeTags?: string[];\n excludeNames?: string[];\n excludeTypes?: string[];\n excludeTags?: string[];\n _schemaFormat?: SchemaFormat;\n}\nexport declare const isLogStreamHandler: (handler: BaseCallbackHandler) => handler is LogStreamCallbackHandler;\n/**\n * Class that extends the `BaseTracer` class from the\n * `langchain.callbacks.tracers.base` module. It represents a callback\n * handler that logs the execution of runs and emits `RunLog` instances to a\n * `RunLogStream`.\n */\nexport declare class LogStreamCallbackHandler extends BaseTracer implements CallbackHandlerPrefersStreaming {\n protected autoClose: boolean;\n protected includeNames?: string[];\n protected includeTypes?: string[];\n protected includeTags?: string[];\n protected excludeNames?: string[];\n protected excludeTypes?: string[];\n protected excludeTags?: string[];\n protected _schemaFormat: SchemaFormat;\n protected rootId?: string;\n private keyMapByRunId;\n private counterMapByRunName;\n protected transformStream: TransformStream;\n writer: WritableStreamDefaultWriter;\n receiveStream: IterableReadableStream<RunLogPatch>;\n name: string;\n lc_prefer_streaming: boolean;\n constructor(fields?: LogStreamCallbackHandlerInput);\n [Symbol.asyncIterator](): IterableReadableStream<RunLogPatch>;\n protected persistRun(_run: Run): Promise<void>;\n _includeRun(run: Run): boolean;\n tapOutputIterable<T>(runId: string, output: AsyncGenerator<T>): AsyncGenerator<T>;\n onRunCreate(run: Run): Promise<void>;\n onRunUpdate(run: Run): Promise<void>;\n onLLMNewToken(run: Run, token: string, kwargs?: HandleLLMNewTokenCallbackFields): Promise<void>;\n}\n"],"mappings":";;;;;;;;;AAUA;AA4BA;;AAayBW,KAzCbA,QAAAA,GAyCaA;EAAQ;EAAjB,EAAA,EAAA,MAAA;EAaKG;EAAW,IAAA,EAAA,MAAA;EAAA;EACL,IAEbb,EAAAA,MAAAA;EAAkB;EAEH,IAAGc,EAAAA,MAAAA,EAAAA;EAAM;EAEjBA;EAAM,QAAA,EAlDbH,MAkDa,CAAA,MAAA,EAAA,GAAA,CAAA;EAAA;EACR,UAELX,EAAAA,MAAAA;EAAkB;EACT;EAEM,eAAGc,EAAAA,GAAAA,EAAAA;EAAM;EACO,mBAAGA,EAAAA,MAAAA,EAAAA;EAAM;EAPP;EASnCC,MAAAA,CAAAA,EAAAA,GAAAA;EACKC;EAA6B;EAAA,YAQ1BD,CAAAA,EAAAA,GAAAA;EAAY;EAR+C,QAAA,CAAA,EAAA,MAAA;AAU/E,CAAA;AAA8G,KArDlGH,QAAAA,GAqDkG;EAAA;EAAxC,EAAA,EAAgBM,MAAAA;EAAwB;EAOzFA;EAAwB,eAAA,EAAA,GAAA,EAAA;EAAA;EAQJ;EAIK,YAClCE,CAAAA,EAAAA,GAAAA;EAA2B;;;;EAKyB,IAAlCb,EAjEpBI,MAiEoBJ,CAAAA,MAAAA,EAjELG,QAiEKH,CAAAA;EAAsB;EAA3B,IACML,EAAAA,MAAAA;EAAG;EAAU,IACvBA,EAAAA,MAAAA;CAAG;;;;;;;;AAIDA,cA1DFW,WAAAA,CA0DEX;EAAG,GAA0BI,EAzD3CN,SAyD2CM,EAAAA;EAA+B,WAAGiB,CAAAA,MAAAA,EAAAA;IAxBhCtB,GAAAA,CAAAA,EA/BxCD,SA+BwCC,EAAAA;EAAU,CAAA;EAA2C,MAAA,CAAA,KAAA,EA7BzFY,WA6ByF,CAAA,EA7B3EC,MA6B2E;;cA3BtFA,MAAAA,SAAeD,WAAAA;SACzBD;;UAEGZ;WACCY;;gBAEGC,cAAcC;gCACED,cAAcC;;KAEpCC,YAAAA;UACKC,6BAAAA,SAAsCZ;;;;;;;;kBAQnCW;;cAECE,8BAA8Bd,mCAAmCe;;;;;;;cAOjEA,wBAAAA,SAAiCjB,UAAAA,YAAsBI;;;;;;;;2BAQ/CU;;;;6BAIEI;UACnBC;iBACOb,uBAAuBM;;;uBAGjBG;GACpBK,MAAAA,CAAOC,aAAAA,KAAkBf,uBAAuBM;6BACtBX,MAAMqB;mBAChBrB;8CAC2BuB,eAAeD,KAAKC,eAAeD;mBAC9DtB,MAAMqB;mBACNrB,MAAMqB;qBACJrB,6BAA6BI,kCAAkCiB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"log_stream.d.ts","names":["Operation","JSONPatchOperation","BaseTracer","Run","BaseCallbackHandler","BaseCallbackHandlerInput","CallbackHandlerPrefersStreaming","HandleLLMNewTokenCallbackFields","IterableReadableStream","StreamEvent","StreamEventData","LogEntry","Record","RunState","RunLogPatch","RunLog","SchemaFormat","LogStreamCallbackHandlerInput","isLogStreamHandler","LogStreamCallbackHandler","TransformStream","WritableStreamDefaultWriter","Symbol","asyncIterator","Promise","T","AsyncGenerator"],"sources":["../../src/tracers/log_stream.d.ts"],"sourcesContent":["import { type Operation as JSONPatchOperation } from \"../utils/fast-json-patch/index.js\";\nimport { BaseTracer, type Run } from \"./base.js\";\nimport { BaseCallbackHandler, BaseCallbackHandlerInput, CallbackHandlerPrefersStreaming, HandleLLMNewTokenCallbackFields } from \"../callbacks/base.js\";\nimport { IterableReadableStream } from \"../utils/stream.js\";\nimport type { StreamEvent, StreamEventData } from \"./event_stream.js\";\nexport type { StreamEvent, StreamEventData };\n/**\n * Interface that represents the structure of a log entry in the\n * `LogStreamCallbackHandler`.\n */\nexport type LogEntry = {\n /** ID of the sub-run. */\n id: string;\n /** Name of the object being run. */\n name: string;\n /** Type of the object being run, eg. prompt, chain, llm, etc. */\n type: string;\n /** List of tags for the run. */\n tags: string[];\n /** Key-value pairs of metadata for the run. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata: Record<string, any>;\n /** ISO-8601 timestamp of when the run started. */\n start_time: string;\n /** List of general output chunks streamed by this run. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n streamed_output: any[];\n /** List of LLM tokens streamed by this run, if applicable. */\n streamed_output_str: string[];\n /** Inputs to this run. Not available currently via streamLog. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n inputs?: any;\n /** Final output of this run. Only available after the run has finished successfully. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n final_output?: any;\n /** ISO-8601 timestamp of when the run ended. Only available after the run has finished. */\n end_time?: string;\n};\nexport type RunState = {\n /** ID of the sub-run. */\n id: string;\n /** List of output chunks streamed by Runnable.stream() */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n streamed_output: any[];\n /** Final output of the run, usually the result of aggregating streamed_output. Only available after the run has finished successfully. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n final_output?: any;\n /**\n * List of sub-runs contained in this run, if any, in the order they were started.\n * If filters were supplied, this list will contain only the runs that matched the filters.\n */\n logs: Record<string, LogEntry>;\n /** Name of the object being run. */\n name: string;\n /** Type of the object being run, eg. prompt, chain, llm, etc. */\n type: string;\n};\n/**\n * List of jsonpatch JSONPatchOperations, which describe how to create the run state\n * from an empty dict. This is the minimal representation of the log, designed to\n * be serialized as JSON and sent over the wire to reconstruct the log on the other\n * side. Reconstruction of the state can be done with any jsonpatch-compliant library,\n * see https://jsonpatch.com for more information.\n */\nexport declare class RunLogPatch {\n ops: JSONPatchOperation[];\n constructor(fields: {\n ops?: JSONPatchOperation[];\n });\n concat(other: RunLogPatch): RunLog;\n}\nexport declare class RunLog extends RunLogPatch {\n state: RunState;\n constructor(fields: {\n ops?: JSONPatchOperation[];\n state: RunState;\n });\n concat(other: RunLogPatch): RunLog;\n static fromRunLogPatch(patch: RunLogPatch): RunLog;\n}\nexport type SchemaFormat = \"original\" | \"streaming_events\";\nexport interface LogStreamCallbackHandlerInput extends BaseCallbackHandlerInput {\n autoClose?: boolean;\n includeNames?: string[];\n includeTypes?: string[];\n includeTags?: string[];\n excludeNames?: string[];\n excludeTypes?: string[];\n excludeTags?: string[];\n _schemaFormat?: SchemaFormat;\n}\nexport declare const isLogStreamHandler: (handler: BaseCallbackHandler) => handler is LogStreamCallbackHandler;\n/**\n * Class that extends the `BaseTracer` class from the\n * `langchain.callbacks.tracers.base` module. It represents a callback\n * handler that logs the execution of runs and emits `RunLog` instances to a\n * `RunLogStream`.\n */\nexport declare class LogStreamCallbackHandler extends BaseTracer implements CallbackHandlerPrefersStreaming {\n protected autoClose: boolean;\n protected includeNames?: string[];\n protected includeTypes?: string[];\n protected includeTags?: string[];\n protected excludeNames?: string[];\n protected excludeTypes?: string[];\n protected excludeTags?: string[];\n protected _schemaFormat: SchemaFormat;\n protected rootId?: string;\n private keyMapByRunId;\n private counterMapByRunName;\n protected transformStream: TransformStream;\n writer: WritableStreamDefaultWriter;\n receiveStream: IterableReadableStream<RunLogPatch>;\n name: string;\n lc_prefer_streaming: boolean;\n constructor(fields?: LogStreamCallbackHandlerInput);\n [Symbol.asyncIterator](): IterableReadableStream<RunLogPatch>;\n protected persistRun(_run: Run): Promise<void>;\n _includeRun(run: Run): boolean;\n tapOutputIterable<T>(runId: string, output: AsyncGenerator<T>): AsyncGenerator<T>;\n onRunCreate(run: Run): Promise<void>;\n onRunUpdate(run: Run): Promise<void>;\n onLLMNewToken(run: Run, token: string, kwargs?: HandleLLMNewTokenCallbackFields): Promise<void>;\n}\n"],"mappings":";;;;;;;;;AAUA;AA4BA;;AAayBW,KAzCbA,QAAAA,GAyCaA;EAAQ;EAAjB,EAAA,EAAA,MAAA;EAaKG;EAAW,IAAA,EAAA,MAAA;EAAA;EACL,IAEbb,EAAAA,MAAAA;EAAkB;EAEH,IAAGc,EAAAA,MAAAA,EAAAA;EAAM;EAEjBA;EAAM,QAAA,EAlDbH,MAkDa,CAAA,MAAA,EAAA,GAAA,CAAA;EAAA;EACR,UAELX,EAAAA,MAAAA;EAAkB;EACT;EAEM,eAAGc,EAAAA,GAAAA,EAAAA;EAAM;EACO,mBAAGA,EAAAA,MAAAA,EAAAA;EAAM;EAPP;EASnCC,MAAAA,CAAAA,EAAAA,GAAAA;EACKC;EAA6B;EAAA,YAQ1BD,CAAAA,EAAAA,GAAAA;EAAY;EAR+C,QAAA,CAAA,EAAA,MAAA;AAU/E,CAAA;AAA8G,KArDlGH,QAAAA,GAqDkG;EAAA;EAAxC,EAAA,EAAgBM,MAAAA;EAAwB;EAOzFA;EAAwB,eAAA,EAAA,GAAA,EAAA;EAAA;EAQJ;EAIK,YAClCE,CAAAA,EAAAA,GAAAA;EAA2B;;;;EAKyB,IAAlCb,EAjEpBI,MAiEoBJ,CAAAA,MAAAA,EAjELG,QAiEKH,CAAAA;EAAsB;EAA3B,IACML,EAAAA,MAAAA;EAAG;EAAU,IACvBA,EAAAA,MAAAA;CAAG;;;;;;;;AAIDA,cA1DFW,WAAAA,CA0DEX;EAAG,GAA0BI,EAzD3CN,SAyD2CM,EAAAA;EAA+B,WAAGiB,CAAAA,MAAAA,EAAAA;IAxBhCtB,GAAAA,CAAAA,EA/BxCD,SA+BwCC,EAAAA;EAAU,CAAA;EAA2C,MAAA,CAAA,KAAA,EA7BzFY,WA6ByF,CAAA,EA7B3EC,MA6B2E;;cA3BtFA,MAAAA,SAAeD,WAAAA;SACzBD;;UAEGZ;WACCY;;gBAEGC,cAAcC;gCACED,cAAcC;;KAEpCC,YAAAA;UACKC,6BAAAA,SAAsCZ;;;;;;;;kBAQnCW;;cAECE,8BAA8Bd,mCAAmCe;;;;;;;cAOjEA,wBAAAA,SAAiCjB,UAAAA,YAAsBI;;;;;;;;2BAQ/CU;;;;6BAIEI;UACnBC;iBACOb,uBAAuBM;;;uBAGjBG;GACpBK,MAAAA,CAAOC,aAAAA,KAAkBf,uBAAuBM;6BACtBX,MAAMqB;mBAChBrB;8CAC2BuB,eAAeD,KAAKC,eAAeD;mBAC9DtB,MAAMqB;mBACNrB,MAAMqB;qBACJrB,6BAA6BI,kCAAkCiB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"run_collector.d.cts","names":["BaseRun","Run","BaseTracer","RunCollectorCallbackHandler","exampleId","Promise"],"sources":["../../src/tracers/run_collector.d.ts"],"sourcesContent":["import { BaseRun, Run } from \"langsmith/schemas\";\nimport { BaseTracer } from \"./base.js\";\n/**\n * A callback handler that collects traced runs and makes it easy to fetch the traced run object from calls through any langchain object.\n * For instance, it makes it easy to fetch the run ID and then do things with that, such as log feedback.\n */\nexport declare class RunCollectorCallbackHandler extends BaseTracer {\n /** The name of the callback handler. */\n name: string;\n /** The ID of the example. */\n exampleId?: string;\n /** An array of traced runs. */\n tracedRuns: Run[];\n /**\n * Creates a new instance of the RunCollectorCallbackHandler class.\n * @param exampleId The ID of the example.\n */\n constructor({ exampleId }?: {\n exampleId?: string;\n });\n /**\n * Persists the given run object.\n * @param run The run object to persist.\n */\n protected persistRun(run: BaseRun): Promise<void>;\n}\n"],"mappings":";;;;;;;AAMA;;AAMgBC,cANKE,2BAAAA,SAAoCD,UAAAA,CAMzCD;EAAG;EAKQ,IAOGD,EAAAA,MAAAA;EAAO;EAAU,SAlBUE,CAAAA,EAAAA,MAAAA;EAAU;cAMnDD;;;;;;;;;;;;;;4BAYcD,UAAUK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"run_collector.d.ts","names":["BaseRun","Run","BaseTracer","RunCollectorCallbackHandler","exampleId","Promise"],"sources":["../../src/tracers/run_collector.d.ts"],"sourcesContent":["import { BaseRun, Run } from \"langsmith/schemas\";\nimport { BaseTracer } from \"./base.js\";\n/**\n * A callback handler that collects traced runs and makes it easy to fetch the traced run object from calls through any langchain object.\n * For instance, it makes it easy to fetch the run ID and then do things with that, such as log feedback.\n */\nexport declare class RunCollectorCallbackHandler extends BaseTracer {\n /** The name of the callback handler. */\n name: string;\n /** The ID of the example. */\n exampleId?: string;\n /** An array of traced runs. */\n tracedRuns: Run[];\n /**\n * Creates a new instance of the RunCollectorCallbackHandler class.\n * @param exampleId The ID of the example.\n */\n constructor({ exampleId }?: {\n exampleId?: string;\n });\n /**\n * Persists the given run object.\n * @param run The run object to persist.\n */\n protected persistRun(run: BaseRun): Promise<void>;\n}\n"],"mappings":";;;;;;;AAMA;;AAMgBC,cANKE,2BAAAA,SAAoCD,UAAAA,CAMzCD;EAAG;EAKQ,IAOGD,EAAAA,MAAAA;EAAO;EAAU,SAlBUE,CAAAA,EAAAA,MAAAA;EAAU;cAMnDD;;;;;;;;;;;;;;4BAYcD,UAAUK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tracer_langchain.d.cts","names":["LangSmithTracingClientInterface","RunTree","RunTreeConfig","BaseRun","RunCreate","RunUpdate","BaseRunUpdate","KVMap","BaseTracer","BaseCallbackHandlerInput","Run","RunCreate2","LangChainTracerFields","LangChainTracer","Promise"],"sources":["../../src/tracers/tracer_langchain.d.ts"],"sourcesContent":["import { type LangSmithTracingClientInterface } from \"langsmith\";\nimport { RunTree, type RunTreeConfig } from \"langsmith/run_trees\";\nimport { BaseRun, RunCreate, RunUpdate as BaseRunUpdate, KVMap } from \"langsmith/schemas\";\nimport { BaseTracer } from \"./base.js\";\nimport { BaseCallbackHandlerInput } from \"../callbacks/base.js\";\nexport interface Run extends BaseRun {\n id: string;\n child_runs: this[];\n child_execution_order: number;\n dotted_order?: string;\n trace_id?: string;\n}\nexport interface RunCreate2 extends RunCreate {\n trace_id?: string;\n dotted_order?: string;\n}\nexport interface RunUpdate extends BaseRunUpdate {\n events: BaseRun[\"events\"];\n inputs: KVMap;\n trace_id?: string;\n dotted_order?: string;\n}\nexport interface LangChainTracerFields extends BaseCallbackHandlerInput {\n exampleId?: string;\n projectName?: string;\n client?: LangSmithTracingClientInterface;\n replicas?: RunTreeConfig[\"replicas\"];\n}\nexport declare class LangChainTracer extends BaseTracer implements LangChainTracerFields {\n name: string;\n projectName?: string;\n exampleId?: string;\n client: LangSmithTracingClientInterface;\n replicas?: RunTreeConfig[\"replicas\"];\n usesRunTreeMap: boolean;\n constructor(fields?: LangChainTracerFields);\n protected persistRun(_run: Run): Promise<void>;\n onRunCreate(run: Run): Promise<void>;\n onRunUpdate(run: Run): Promise<void>;\n getRun(id: string): Run | undefined;\n updateFromRunTree(runTree: RunTree): void;\n getRunTreeWithTracingConfig(id: string): RunTree | undefined;\n static getTraceableRunTree(): RunTree | undefined;\n}\n"],"mappings":";;;;;;;UAKiBU,GAAAA,SAAYP;;EAAZO,UAAG,EAAA,IAAA,EAASP;EAOZQ,qBAAU,EAAA,MAASP;EAInBC,YAAS,CAAA,EAAA,MAAA;EAAA,QAAA,CAAA,EAAA,MAAA;;AAEdE,UANKI,UAAAA,SAAmBP,SAMxBG,CAAAA;EAAK,QAFkBD,CAAAA,EAAAA,MAAAA;EAAa,YAAA,CAAA,EAAA,MAAA;AAMhD;AAAsC,UANrBD,SAAAA,SAAkBC,WAMG,CAAA;EAAA,MAGzBN,EARDG,OAQCH,CAAAA,QAAAA,CAAAA;EAA+B,MAC7BE,EARHK,KAQGL;EAAa,QAJmBO,CAAAA,EAAAA,MAAAA;EAAwB,YAAA,CAAA,EAAA,MAAA;AAMvE;AAAoC,UANnBG,qBAAAA,SAA8BH,wBAMX,CAAA;EAAA,SAIxBT,CAAAA,EAAAA,MAAAA;EAA+B,WAC5BE,CAAAA,EAAAA,MAAAA;EAAa,MAEHU,CAAAA,EAVZZ,+BAUYY;EAAqB,QACfF,CAAAA,EAVhBR,aAUgBQ,CAAAA,UAAAA,CAAAA;;AACVA,cATAG,eAAAA,SAAwBL,UAAAA,YAAsBI,qBAS9CF,CAAAA;EAAG,IAAGI,EAAAA,MAAAA;EAAO,WACbJ,CAAAA,EAAAA,MAAAA;EAAG,SAAGI,CAAAA,EAAAA,MAAAA;EAAO,MACVJ,EAPZV,+BAOYU;EAAG,QACIT,CAAAA,EAPhBC,aAOgBD,CAAAA,UAAAA,CAAAA;EAAO,cACOA,EAAAA,OAAAA;EAAO,WAClBA,CAAAA,MAAAA,CAAAA,EAPTW,qBAOSX;EAAO,UAdIO,UAAAA,CAAAA,IAAAA,EAQdE,GARcF,CAAAA,EAQRM,OARQN,CAAAA,IAAAA,CAAAA;EAAU,WAAYI,CAAAA,GAAAA,EAS9CF,GAT8CE,CAAAA,EASxCE,OATwCF,CAAAA,IAAAA,CAAAA;EAAqB,WAAA,CAAA,GAAA,EAUnEF,GAVmE,CAAA,EAU7DI,OAV6D,CAAA,IAAA,CAAA;sBAWhEJ;6BACOT;2CACcA;gCACXA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tracer_langchain.d.ts","names":["LangSmithTracingClientInterface","RunTree","RunTreeConfig","BaseRun","RunCreate","RunUpdate","BaseRunUpdate","KVMap","BaseTracer","BaseCallbackHandlerInput","Run","RunCreate2","LangChainTracerFields","LangChainTracer","Promise"],"sources":["../../src/tracers/tracer_langchain.d.ts"],"sourcesContent":["import { type LangSmithTracingClientInterface } from \"langsmith\";\nimport { RunTree, type RunTreeConfig } from \"langsmith/run_trees\";\nimport { BaseRun, RunCreate, RunUpdate as BaseRunUpdate, KVMap } from \"langsmith/schemas\";\nimport { BaseTracer } from \"./base.js\";\nimport { BaseCallbackHandlerInput } from \"../callbacks/base.js\";\nexport interface Run extends BaseRun {\n id: string;\n child_runs: this[];\n child_execution_order: number;\n dotted_order?: string;\n trace_id?: string;\n}\nexport interface RunCreate2 extends RunCreate {\n trace_id?: string;\n dotted_order?: string;\n}\nexport interface RunUpdate extends BaseRunUpdate {\n events: BaseRun[\"events\"];\n inputs: KVMap;\n trace_id?: string;\n dotted_order?: string;\n}\nexport interface LangChainTracerFields extends BaseCallbackHandlerInput {\n exampleId?: string;\n projectName?: string;\n client?: LangSmithTracingClientInterface;\n replicas?: RunTreeConfig[\"replicas\"];\n}\nexport declare class LangChainTracer extends BaseTracer implements LangChainTracerFields {\n name: string;\n projectName?: string;\n exampleId?: string;\n client: LangSmithTracingClientInterface;\n replicas?: RunTreeConfig[\"replicas\"];\n usesRunTreeMap: boolean;\n constructor(fields?: LangChainTracerFields);\n protected persistRun(_run: Run): Promise<void>;\n onRunCreate(run: Run): Promise<void>;\n onRunUpdate(run: Run): Promise<void>;\n getRun(id: string): Run | undefined;\n updateFromRunTree(runTree: RunTree): void;\n getRunTreeWithTracingConfig(id: string): RunTree | undefined;\n static getTraceableRunTree(): RunTree | undefined;\n}\n"],"mappings":";;;;;;;UAKiBU,GAAAA,SAAYP;;EAAZO,UAAG,EAAA,IAAA,EAASP;EAOZQ,qBAAU,EAAA,MAASP;EAInBC,YAAS,CAAA,EAAA,MAAA;EAAA,QAAA,CAAA,EAAA,MAAA;;AAEdE,UANKI,UAAAA,SAAmBP,SAMxBG,CAAAA;EAAK,QAFkBD,CAAAA,EAAAA,MAAAA;EAAa,YAAA,CAAA,EAAA,MAAA;AAMhD;AAAsC,UANrBD,SAAAA,SAAkBC,WAMG,CAAA;EAAA,MAGzBN,EARDG,OAQCH,CAAAA,QAAAA,CAAAA;EAA+B,MAC7BE,EARHK,KAQGL;EAAa,QAJmBO,CAAAA,EAAAA,MAAAA;EAAwB,YAAA,CAAA,EAAA,MAAA;AAMvE;AAAoC,UANnBG,qBAAAA,SAA8BH,wBAMX,CAAA;EAAA,SAIxBT,CAAAA,EAAAA,MAAAA;EAA+B,WAC5BE,CAAAA,EAAAA,MAAAA;EAAa,MAEHU,CAAAA,EAVZZ,+BAUYY;EAAqB,QACfF,CAAAA,EAVhBR,aAUgBQ,CAAAA,UAAAA,CAAAA;;AACVA,cATAG,eAAAA,SAAwBL,UAAAA,YAAsBI,qBAS9CF,CAAAA;EAAG,IAAGI,EAAAA,MAAAA;EAAO,WACbJ,CAAAA,EAAAA,MAAAA;EAAG,SAAGI,CAAAA,EAAAA,MAAAA;EAAO,MACVJ,EAPZV,+BAOYU;EAAG,QACIT,CAAAA,EAPhBC,aAOgBD,CAAAA,UAAAA,CAAAA;EAAO,cACOA,EAAAA,OAAAA;EAAO,WAClBA,CAAAA,MAAAA,CAAAA,EAPTW,qBAOSX;EAAO,UAdIO,UAAAA,CAAAA,IAAAA,EAQdE,GARcF,CAAAA,EAQRM,OARQN,CAAAA,IAAAA,CAAAA;EAAU,WAAYI,CAAAA,GAAAA,EAS9CF,GAT8CE,CAAAA,EASxCE,OATwCF,CAAAA,IAAAA,CAAAA;EAAqB,WAAA,CAAA,GAAA,EAUnEF,GAVmE,CAAA,EAU7DI,OAV6D,CAAA,IAAA,CAAA;sBAWhEJ;6BACOT;2CACcA;gCACXA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_internal.d.cts","names":["IterableReadableStreamInterface","T","ReadableStream","AsyncIterable"],"sources":["../../src/types/_internal.d.ts"],"sourcesContent":["// Make this a type to override ReadableStream's async iterator type in case\n// the popular web-streams-polyfill is imported - the supplied types\n// in that case don't quite match.\nexport type IterableReadableStreamInterface<T> = ReadableStream<T> & AsyncIterable<T>;\n"],"mappings":";;AAGA;;AAAgEC,KAApDD,+BAAoDC,CAAAA,CAAAA,CAAAA,GAAfC,cAAeD,CAAAA,CAAAA,CAAAA,GAAKE,aAALF,CAAmBA,CAAnBA,CAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_internal.d.ts","names":["IterableReadableStreamInterface","T","ReadableStream","AsyncIterable"],"sources":["../../src/types/_internal.d.ts"],"sourcesContent":["// Make this a type to override ReadableStream's async iterator type in case\n// the popular web-streams-polyfill is imported - the supplied types\n// in that case don't quite match.\nexport type IterableReadableStreamInterface<T> = ReadableStream<T> & AsyncIterable<T>;\n"],"mappings":";;AAGA;;AAAgEC,KAApDD,+BAAoDC,CAAAA,CAAAA,CAAAA,GAAfC,cAAeD,CAAAA,CAAAA,CAAAA,GAAKE,aAALF,CAAmBA,CAAnBA,CAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"type-utils.d.cts","names":["Optional","T","K","Omit","Pick","Partial"],"sources":["../../src/types/type-utils.d.ts"],"sourcesContent":["// Utility for marking only some keys of an interface as optional\n// Compare to Partial<T> which marks all keys as optional\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\n"],"mappings":";;AAEA;AAAoB,KAARA,QAAQ,CAAA,CAAA,EAAA,UAAA,MAAoBC,CAApB,CAAA,GAAyBE,IAAzB,CAA8BF,CAA9B,EAAiCC,CAAjC,CAAA,GAAsCG,OAAtC,CAA8CD,IAA9C,CAAmDH,CAAnD,EAAsDC,CAAtD,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"type-utils.d.ts","names":["Optional","T","K","Omit","Pick","Partial"],"sources":["../../src/types/type-utils.d.ts"],"sourcesContent":["// Utility for marking only some keys of an interface as optional\n// Compare to Partial<T> which marks all keys as optional\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\n"],"mappings":";;AAEA;AAAoB,KAARA,QAAQ,CAAA,CAAA,EAAA,UAAA,MAAoBC,CAApB,CAAA,GAAyBE,IAAzB,CAA8BF,CAA9B,EAAiCC,CAAjC,CAAA,GAAsCG,OAAtC,CAA8CD,IAA9C,CAAmDH,CAAnD,EAAsDC,CAAtD,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"async_caller.d.cts","names":["FailedAttemptHandler","AsyncCallerParams","AsyncCallerCallOptions","AbortSignal","AsyncCaller","A","Promise","T","Parameters","ReturnType","Awaited","fetch"],"sources":["../../src/utils/async_caller.d.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type FailedAttemptHandler = (error: any) => any;\nexport interface AsyncCallerParams {\n /**\n * The maximum number of concurrent calls that can be made.\n * Defaults to `Infinity`, which means no limit.\n */\n maxConcurrency?: number;\n /**\n * The maximum number of retries that can be made for a single call,\n * with an exponential backoff between each attempt. Defaults to 6.\n */\n maxRetries?: number;\n /**\n * Custom handler to handle failed attempts. Takes the originally thrown\n * error object as input, and should itself throw an error if the input\n * error is not retryable.\n */\n onFailedAttempt?: FailedAttemptHandler;\n}\nexport interface AsyncCallerCallOptions {\n signal?: AbortSignal;\n}\n/**\n * A class that can be used to make async calls with concurrency and retry logic.\n *\n * This is useful for making calls to any kind of \"expensive\" external resource,\n * be it because it's rate-limited, subject to network issues, etc.\n *\n * Concurrent calls are limited by the `maxConcurrency` parameter, which defaults\n * to `Infinity`. This means that by default, all calls will be made in parallel.\n *\n * Retries are limited by the `maxRetries` parameter, which defaults to 6. This\n * means that by default, each call will be retried up to 6 times, with an\n * exponential backoff between each attempt.\n */\nexport declare class AsyncCaller {\n protected maxConcurrency: AsyncCallerParams[\"maxConcurrency\"];\n protected maxRetries: AsyncCallerParams[\"maxRetries\"];\n protected onFailedAttempt: AsyncCallerParams[\"onFailedAttempt\"];\n private queue;\n constructor(params: AsyncCallerParams);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n call<A extends any[], T extends (...args: A) => Promise<any>>(callable: T, ...args: Parameters<T>): Promise<Awaited<ReturnType<T>>>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callWithOptions<A extends any[], T extends (...args: A) => Promise<any>>(options: AsyncCallerCallOptions, callable: T, ...args: Parameters<T>): Promise<Awaited<ReturnType<T>>>;\n fetch(...args: Parameters<typeof fetch>): ReturnType<typeof fetch>;\n}\n"],"mappings":";;AACYA,KAAAA,oBAAAA,GAAoB,CAAA,KAAA,EAAA,GAAA,EAAA,GAAA,GAAA;AACfC,UAAAA,iBAAAA,CAAiB;EAkBjBC;AAgBjB;;;EAC+C,cACrBD,CAAAA,EAAAA,MAAAA;EAAiB;;;;EAKgB,UAAiBM,CAAAA,EAAAA,MAAAA;EAAC;;;;;EAA0C,eAAfD,CAAAA,EAzBlFN,oBAyBkFM;;AAEzCA,UAzB9CJ,sBAAAA,CAyB8CI;EAAO,MAAgBJ,CAAAA,EAxBzEC,WAwByED;;;;;;;;;;;;AAC9B;;;cAVnCE,WAAAA;4BACSH;wBACJA;6BACKA;;sBAEPA;;4CAEsBI,MAAMC,wBAAwBC,YAAYC,WAAWD,KAAKD,QAAQI,QAAQD,WAAWF;;uDAE1EF,MAAMC,uBAAuBJ,kCAAkCK,YAAYC,WAAWD,KAAKD,QAAQI,QAAQD,WAAWF;iBAC5JC,kBAAkBG,SAASF,kBAAkBE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"async_caller.d.ts","names":["FailedAttemptHandler","AsyncCallerParams","AsyncCallerCallOptions","AbortSignal","AsyncCaller","A","Promise","T","Parameters","ReturnType","Awaited","fetch"],"sources":["../../src/utils/async_caller.d.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type FailedAttemptHandler = (error: any) => any;\nexport interface AsyncCallerParams {\n /**\n * The maximum number of concurrent calls that can be made.\n * Defaults to `Infinity`, which means no limit.\n */\n maxConcurrency?: number;\n /**\n * The maximum number of retries that can be made for a single call,\n * with an exponential backoff between each attempt. Defaults to 6.\n */\n maxRetries?: number;\n /**\n * Custom handler to handle failed attempts. Takes the originally thrown\n * error object as input, and should itself throw an error if the input\n * error is not retryable.\n */\n onFailedAttempt?: FailedAttemptHandler;\n}\nexport interface AsyncCallerCallOptions {\n signal?: AbortSignal;\n}\n/**\n * A class that can be used to make async calls with concurrency and retry logic.\n *\n * This is useful for making calls to any kind of \"expensive\" external resource,\n * be it because it's rate-limited, subject to network issues, etc.\n *\n * Concurrent calls are limited by the `maxConcurrency` parameter, which defaults\n * to `Infinity`. This means that by default, all calls will be made in parallel.\n *\n * Retries are limited by the `maxRetries` parameter, which defaults to 6. This\n * means that by default, each call will be retried up to 6 times, with an\n * exponential backoff between each attempt.\n */\nexport declare class AsyncCaller {\n protected maxConcurrency: AsyncCallerParams[\"maxConcurrency\"];\n protected maxRetries: AsyncCallerParams[\"maxRetries\"];\n protected onFailedAttempt: AsyncCallerParams[\"onFailedAttempt\"];\n private queue;\n constructor(params: AsyncCallerParams);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n call<A extends any[], T extends (...args: A) => Promise<any>>(callable: T, ...args: Parameters<T>): Promise<Awaited<ReturnType<T>>>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callWithOptions<A extends any[], T extends (...args: A) => Promise<any>>(options: AsyncCallerCallOptions, callable: T, ...args: Parameters<T>): Promise<Awaited<ReturnType<T>>>;\n fetch(...args: Parameters<typeof fetch>): ReturnType<typeof fetch>;\n}\n"],"mappings":";;AACYA,KAAAA,oBAAAA,GAAoB,CAAA,KAAA,EAAA,GAAA,EAAA,GAAA,GAAA;AACfC,UAAAA,iBAAAA,CAAiB;EAkBjBC;AAgBjB;;;EAC+C,cACrBD,CAAAA,EAAAA,MAAAA;EAAiB;;;;EAKgB,UAAiBM,CAAAA,EAAAA,MAAAA;EAAC;;;;;EAA0C,eAAfD,CAAAA,EAzBlFN,oBAyBkFM;;AAEzCA,UAzB9CJ,sBAAAA,CAyB8CI;EAAO,MAAgBJ,CAAAA,EAxBzEC,WAwByED;;;;;;;;;;;;AAC9B;;;cAVnCE,WAAAA;4BACSH;wBACJA;6BACKA;;sBAEPA;;4CAEsBI,MAAMC,wBAAwBC,YAAYC,WAAWD,KAAKD,QAAQI,QAAQD,WAAWF;;uDAE1EF,MAAMC,uBAAuBJ,kCAAkCK,YAAYC,WAAWD,KAAKD,QAAQI,QAAQD,WAAWF;iBAC5JC,kBAAkBG,SAASF,kBAAkBE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk_array.d.cts","names":["chunkArray","T"],"sources":["../../src/utils/chunk_array.d.ts"],"sourcesContent":["export declare const chunkArray: <T>(arr: T[], chunkSize: number) => T[][];\n"],"mappings":";cAAqBA,qBAAqBC,2BAA2BA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk_array.d.ts","names":["chunkArray","T"],"sources":["../../src/utils/chunk_array.d.ts"],"sourcesContent":["export declare const chunkArray: <T>(arr: T[], chunkSize: number) => T[][];\n"],"mappings":";cAAqBA,qBAAqBC,2BAA2BA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.d.cts","names":["isBrowser","isWebWorker","isJsDom","isDeno","isNode","getEnv","RuntimeEnvironment","getRuntimeEnvironment","getEnvironmentVariable"],"sources":["../../src/utils/env.d.ts"],"sourcesContent":["// Inlined from https://github.com/flexdinesh/browser-or-node\ndeclare global {\n const Deno: {\n version: {\n deno: string;\n };\n env: {\n get: (name: string) => string | undefined;\n };\n } | undefined;\n}\nexport declare const isBrowser: () => boolean;\nexport declare const isWebWorker: () => boolean;\nexport declare const isJsDom: () => boolean;\n// Supabase Edge Function provides a `Deno` global object\n// without `version` property\nexport declare const isDeno: () => boolean;\n// Mark not-as-node if in Supabase Edge Function\nexport declare const isNode: () => boolean;\nexport declare const getEnv: () => string;\nexport type RuntimeEnvironment = {\n library: string;\n libraryVersion?: string;\n runtime: string;\n runtimeVersion?: string;\n};\nexport declare function getRuntimeEnvironment(): RuntimeEnvironment;\nexport declare function getEnvironmentVariable(name: string): string | undefined;\n"],"mappings":";;;EAWqBA,MAAAA,IAAAA,EAAwB;IACxBC,OAAAA,EAAAA;MACAC,IAAsB,EAAA,MAAA;IAGtBC,CAAAA;IAEAC,GAAAA,EAAqB;MACrBC,GAAoB,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,GAAA,MAAA,GAAA,SAAA;IAC7BC,CAAAA;EAMYC,CAAAA,GAAAA,SAAAA;AACxB;cAhBqBP;cACAC;cACAC;;;cAGAC;;cAEAC;cACAC;KACTC,kBAAAA;;;;;;iBAMYC,qBAAAA,CAAAA,GAAyBD;iBACzBE,sBAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.d.ts","names":["isBrowser","isWebWorker","isJsDom","isDeno","isNode","getEnv","RuntimeEnvironment","getRuntimeEnvironment","getEnvironmentVariable"],"sources":["../../src/utils/env.d.ts"],"sourcesContent":["// Inlined from https://github.com/flexdinesh/browser-or-node\ndeclare global {\n const Deno: {\n version: {\n deno: string;\n };\n env: {\n get: (name: string) => string | undefined;\n };\n } | undefined;\n}\nexport declare const isBrowser: () => boolean;\nexport declare const isWebWorker: () => boolean;\nexport declare const isJsDom: () => boolean;\n// Supabase Edge Function provides a `Deno` global object\n// without `version` property\nexport declare const isDeno: () => boolean;\n// Mark not-as-node if in Supabase Edge Function\nexport declare const isNode: () => boolean;\nexport declare const getEnv: () => string;\nexport type RuntimeEnvironment = {\n library: string;\n libraryVersion?: string;\n runtime: string;\n runtimeVersion?: string;\n};\nexport declare function getRuntimeEnvironment(): RuntimeEnvironment;\nexport declare function getEnvironmentVariable(name: string): string | undefined;\n"],"mappings":";;;EAWqBA,MAAAA,IAAAA,EAAwB;IACxBC,OAAAA,EAAAA;MACAC,IAAsB,EAAA,MAAA;IAGtBC,CAAAA;IAEAC,GAAAA,EAAqB;MACrBC,GAAoB,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,GAAA,MAAA,GAAA,SAAA;IAC7BC,CAAAA;EAMYC,CAAAA,GAAAA,SAAAA;AACxB;cAhBqBP;cACAC;cACAC;;;cAGAC;;cAEAC;cACAC;KACTC,kBAAAA;;;;;;iBAMYC,qBAAAA,CAAAA,GAAyBD;iBACzBE,sBAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"event_source_parse.d.cts","names":["IterableReadableStream","EventStreamContentType","EventSourceMessage","getBytes","Uint8Array","ReadableStream","AsyncIterable","Promise","getLines","ArrayBufferLike","getMessages","convertEventStreamToIterableReadableDataStream"],"sources":["../../src/utils/event_source_parse.d.ts"],"sourcesContent":["/* eslint-disable prefer-template */\n/* eslint-disable default-case */\n// Adapted from https://github.com/gfortaine/fetch-event-source/blob/main/src/parse.ts\n// due to a packaging issue in the original.\n// MIT License\nimport { IterableReadableStream } from \"./stream.js\";\nexport declare const EventStreamContentType = \"text/event-stream\";\n/**\n * Represents a message sent in an event stream\n * https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format\n */\nexport interface EventSourceMessage {\n /** The event ID to set the EventSource object's last event ID value. */\n id: string;\n /** A string identifying the type of event described. */\n event: string;\n /** The event data */\n data: string;\n /** The reconnection interval (in milliseconds) to wait before retrying the connection */\n retry?: number;\n}\n/**\n * Converts a ReadableStream into a callback pattern.\n * @param stream The input ReadableStream.\n * @param onChunk A function that will be called on each new byte chunk in the stream.\n * @returns {Promise<void>} A promise that will be resolved when the stream closes.\n */\nexport declare function getBytes(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nstream: ReadableStream<Uint8Array> | AsyncIterable<any>, onChunk: (arr: Uint8Array, flush?: boolean) => void): Promise<void>;\n/**\n * Parses arbitary byte chunks into EventSource line buffers.\n * Each line should be of the format \"field: value\" and ends with \\r, \\n, or \\r\\n.\n * @param onLine A function that will be called on each new EventSource line.\n * @returns A function that should be called for each incoming byte chunk.\n */\nexport declare function getLines(onLine: (line: Uint8Array, fieldLength: number, flush?: boolean) => void): (arr: Uint8Array<ArrayBufferLike>, flush?: boolean | undefined) => void;\n/**\n * Parses line buffers into EventSourceMessages.\n * @param onId A function that will be called on each `id` field.\n * @param onRetry A function that will be called on each `retry` field.\n * @param onMessage A function that will be called on each message.\n * @returns A function that should be called for each incoming line buffer.\n */\nexport declare function getMessages(onMessage?: (msg: EventSourceMessage) => void, onId?: (id: string) => void, onRetry?: (retry: number) => void): (line: Uint8Array<ArrayBufferLike>, fieldLength: number, flush?: boolean | undefined) => void;\nexport declare function convertEventStreamToIterableReadableDataStream(stream: ReadableStream, onMetadataEvent?: (e: unknown) => unknown): IterableReadableStream<any>;\n"],"mappings":";;;;AA2BgC,cArBXC,sBAAAA,GAqBW,mBAAA;;;;;AAE+EM,UAlB9FL,kBAAAA,CAkB8FK;EAAO;EAO9FC,EAAAA,EAAAA,MAAAA;EAAQ;EAAA,KAAgBJ,EAAAA,MAAAA;EAAU;EAAkF,IAA1BA,EAAAA,MAAAA;EAAU;EAQpGM,KAAAA,CAAAA,EAAAA,MAAW;;;;;AAAkI;AACrK;;AAA+EL,iBAlBvDF,QAAAA;;AAkByI,MAAA,EAhBzJE,cAgByJ,CAhB1ID,UAgB0I,CAAA,GAhB5HE,aAgB4H,CAAA,GAAA,CAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAhBzFF,UAgByF,EAAA,KAAA,CAAA,EAAA,OAAA,EAAA,GAAA,IAAA,CAAA,EAhBlDG,OAgBkD,CAAA,IAAA,CAAA;;;;;;;iBATzIC,QAAAA,gBAAwBJ,kEAAkEA,WAAWK;;;;;;;;iBAQrGC,WAAAA,mBAA8BR,qGAAqGE,WAAWK;iBAC9IE,8CAAAA,SAAuDN,4DAA4DL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"event_source_parse.d.ts","names":["IterableReadableStream","EventStreamContentType","EventSourceMessage","getBytes","Uint8Array","ReadableStream","AsyncIterable","Promise","getLines","ArrayBufferLike","getMessages","convertEventStreamToIterableReadableDataStream"],"sources":["../../src/utils/event_source_parse.d.ts"],"sourcesContent":["/* eslint-disable prefer-template */\n/* eslint-disable default-case */\n// Adapted from https://github.com/gfortaine/fetch-event-source/blob/main/src/parse.ts\n// due to a packaging issue in the original.\n// MIT License\nimport { IterableReadableStream } from \"./stream.js\";\nexport declare const EventStreamContentType = \"text/event-stream\";\n/**\n * Represents a message sent in an event stream\n * https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format\n */\nexport interface EventSourceMessage {\n /** The event ID to set the EventSource object's last event ID value. */\n id: string;\n /** A string identifying the type of event described. */\n event: string;\n /** The event data */\n data: string;\n /** The reconnection interval (in milliseconds) to wait before retrying the connection */\n retry?: number;\n}\n/**\n * Converts a ReadableStream into a callback pattern.\n * @param stream The input ReadableStream.\n * @param onChunk A function that will be called on each new byte chunk in the stream.\n * @returns {Promise<void>} A promise that will be resolved when the stream closes.\n */\nexport declare function getBytes(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nstream: ReadableStream<Uint8Array> | AsyncIterable<any>, onChunk: (arr: Uint8Array, flush?: boolean) => void): Promise<void>;\n/**\n * Parses arbitary byte chunks into EventSource line buffers.\n * Each line should be of the format \"field: value\" and ends with \\r, \\n, or \\r\\n.\n * @param onLine A function that will be called on each new EventSource line.\n * @returns A function that should be called for each incoming byte chunk.\n */\nexport declare function getLines(onLine: (line: Uint8Array, fieldLength: number, flush?: boolean) => void): (arr: Uint8Array<ArrayBufferLike>, flush?: boolean | undefined) => void;\n/**\n * Parses line buffers into EventSourceMessages.\n * @param onId A function that will be called on each `id` field.\n * @param onRetry A function that will be called on each `retry` field.\n * @param onMessage A function that will be called on each message.\n * @returns A function that should be called for each incoming line buffer.\n */\nexport declare function getMessages(onMessage?: (msg: EventSourceMessage) => void, onId?: (id: string) => void, onRetry?: (retry: number) => void): (line: Uint8Array<ArrayBufferLike>, fieldLength: number, flush?: boolean | undefined) => void;\nexport declare function convertEventStreamToIterableReadableDataStream(stream: ReadableStream, onMetadataEvent?: (e: unknown) => unknown): IterableReadableStream<any>;\n"],"mappings":";;;;AA2BgC,cArBXC,sBAAAA,GAqBW,mBAAA;;;;;AAE+EM,UAlB9FL,kBAAAA,CAkB8FK;EAAO;EAO9FC,EAAAA,EAAAA,MAAAA;EAAQ;EAAA,KAAgBJ,EAAAA,MAAAA;EAAU;EAAkF,IAA1BA,EAAAA,MAAAA;EAAU;EAQpGM,KAAAA,CAAAA,EAAAA,MAAW;;;;;AAAkI;AACrK;;AAA+EL,iBAlBvDF,QAAAA;;AAkByI,MAAA,EAhBzJE,cAgByJ,CAhB1ID,UAgB0I,CAAA,GAhB5HE,aAgB4H,CAAA,GAAA,CAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAhBzFF,UAgByF,EAAA,KAAA,CAAA,EAAA,OAAA,EAAA,GAAA,IAAA,CAAA,EAhBlDG,OAgBkD,CAAA,IAAA,CAAA;;;;;;;iBATzIC,QAAAA,gBAAwBJ,kEAAkEA,WAAWK;;;;;;;;iBAQrGC,WAAAA,mBAA8BR,qGAAqGE,WAAWK;iBAC9IE,8CAAAA,SAAuDN,4DAA4DL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"core.d.cts","names":["PatchError","_deepClone","JsonPatchError","deepClone","Operation","AddOperation","RemoveOperation","ReplaceOperation","MoveOperation","CopyOperation","TestOperation","GetOperation","Validator","T","OperationResult","BaseOperation","PatchResult","Array","getValueByPointer","applyOperation","applyPatch","ReadonlyArray","applyReducer","validator","validate","_areEquals"],"sources":["../../../../src/utils/fast-json-patch/src/core.d.ts"],"sourcesContent":["import { PatchError, _deepClone } from \"./helpers.js\";\nexport declare const JsonPatchError: typeof PatchError;\nexport declare const deepClone: typeof _deepClone;\nexport type Operation = AddOperation<any> | RemoveOperation | ReplaceOperation<any> | MoveOperation | CopyOperation | TestOperation<any> | GetOperation<any>;\nexport interface Validator<T> {\n (operation: Operation, index: number, document: T, existingPathFragment: string): void;\n}\nexport interface OperationResult<T> {\n removed?: any;\n test?: boolean;\n newDocument: T;\n}\nexport interface BaseOperation {\n path: string;\n}\nexport interface AddOperation<T> extends BaseOperation {\n op: \"add\";\n value: T;\n}\nexport interface RemoveOperation extends BaseOperation {\n op: \"remove\";\n}\nexport interface ReplaceOperation<T> extends BaseOperation {\n op: \"replace\";\n value: T;\n}\nexport interface MoveOperation extends BaseOperation {\n op: \"move\";\n from: string;\n}\nexport interface CopyOperation extends BaseOperation {\n op: \"copy\";\n from: string;\n}\nexport interface TestOperation<T> extends BaseOperation {\n op: \"test\";\n value: T;\n}\nexport interface GetOperation<T> extends BaseOperation {\n op: \"_get\";\n value: T;\n}\nexport interface PatchResult<T> extends Array<OperationResult<T>> {\n newDocument: T;\n}\n/**\n * Retrieves a value from a JSON document by a JSON pointer.\n * Returns the value.\n *\n * @param document The document to get the value from\n * @param pointer an escaped JSON pointer\n * @return The retrieved value\n */\nexport declare function getValueByPointer(document: any, pointer: string): any;\n/**\n * Apply a single JSON Patch Operation on a JSON document.\n * Returns the {newDocument, result} of the operation.\n * It modifies the `document` and `operation` objects - it gets the values by reference.\n * If you would like to avoid touching your values, clone them:\n * `jsonpatch.applyOperation(document, jsonpatch._deepClone(operation))`.\n *\n * @param document The document to patch\n * @param operation The operation to apply\n * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.\n * @param mutateDocument Whether to mutate the original document or clone it before applying\n * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.\n * @return `{newDocument, result}` after the operation\n */\nexport declare function applyOperation<T>(document: T, operation: Operation, validateOperation?: boolean | Validator<T>, mutateDocument?: boolean, banPrototypeModifications?: boolean, index?: number): OperationResult<T>;\n/**\n * Apply a full JSON Patch array on a JSON document.\n * Returns the {newDocument, result} of the patch.\n * It modifies the `document` object and `patch` - it gets the values by reference.\n * If you would like to avoid touching your values, clone them:\n * `jsonpatch.applyPatch(document, jsonpatch._deepClone(patch))`.\n *\n * @param document The document to patch\n * @param patch The patch to apply\n * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.\n * @param mutateDocument Whether to mutate the original document or clone it before applying\n * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.\n * @return An array of `{newDocument, result}` after the patch\n */\nexport declare function applyPatch<T>(document: T, patch: ReadonlyArray<Operation>, validateOperation?: boolean | Validator<T>, mutateDocument?: boolean, banPrototypeModifications?: boolean): PatchResult<T>;\n/**\n * Apply a single JSON Patch Operation on a JSON document.\n * Returns the updated document.\n * Suitable as a reducer.\n *\n * @param document The document to patch\n * @param operation The operation to apply\n * @return The updated document\n */\nexport declare function applyReducer<T>(document: T, operation: Operation, index: number): T;\n/**\n * Validates a single operation. Called from `jsonpatch.validate`. Throws `JsonPatchError` in case of an error.\n * @param {object} operation - operation object (patch)\n * @param {number} index - index of operation in the sequence\n * @param {object} [document] - object where the operation is supposed to be applied\n * @param {string} [existingPathFragment] - comes along with `document`\n */\nexport declare function validator(operation: Operation, index: number, document?: any, existingPathFragment?: string): void;\n/**\n * Validates a sequence of operations. If `document` parameter is provided, the sequence is additionally validated against the object document.\n * If error is encountered, returns a JsonPatchError object\n * @param sequence\n * @param document\n * @returns {JsonPatchError|undefined}\n */\nexport declare function validate<T>(sequence: ReadonlyArray<Operation>, document?: T, externalValidator?: Validator<T>): PatchError;\n// based on https://github.com/epoberezkin/fast-deep-equal\n// MIT License\n// Copyright (c) 2017 Evgeny Poberezkin\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nexport declare function _areEquals(a: any, b: any): boolean;\n"],"mappings":";;AAGwBK,KAAZD,SAAAA,GAAYC,YAAAA,CAAAA,GAAAA,CAAAA,GAAoBC,eAApBD,GAAsCE,gBAAtCF,CAAAA,GAAAA,CAAAA,GAA8DG,aAA9DH,GAA8EI,aAA9EJ,GAA8FK,aAA9FL,CAAAA,GAAAA,CAAAA,GAAmHM,YAAnHN,CAAAA,GAAAA,CAAAA;AAAoBC,UAC3BM,SAD2BN,CAAAA,CAAAA,CAAAA,CAAAA;EAAe,CAAA,SAAGC,EAE9CH,SAF8CG,EAAAA,KAAAA,EAAAA,MAAAA,EAAAA,QAAAA,EAEVM,CAFUN,EAAAA,oBAAAA,EAAAA,MAAAA,CAAAA,EAAAA,IAAAA;;AAAwCE,UAIrFK,eAJqFL,CAAAA,CAAAA,CAAAA,CAAAA;EAAa,OAAGC,CAAAA,EAAAA,GAAAA;EAAa,IAAQC,CAAAA,EAAAA,OAAAA;EAAY,WAAA,EAOtIE,CAPsI;AACvJ;AAA0B,UAQTE,aAAAA,CARS;EAAA,IACVX,EAAAA,MAAAA;;AAAqC,UAUpCC,YAVoC,CAAA,CAAA,CAAA,SAUZU,aAVY,CAAA;EAEpCD,EAAAA,EAAAA,KAAAA;EAKAC,KAAAA,EAKNF,CALME;AAGjB;AAA6B,UAIZT,eAAAA,SAAwBS,aAJZ,CAAA;EAAA,EAAA,EAElBF,QAAAA;;AAF2C,UAOrCN,gBAPqC,CAAA,CAAA,CAAA,SAOTQ,aAPS,CAAA;EAIrCT,EAAAA,EAAAA,SAAAA;EAGAC,KAAAA,EAENM,CAFMN;;AAENM,UAEML,aAAAA,SAAsBO,aAF5BF,CAAAA;EAAC,EAAA,EAFiCE,MAAAA;EAAa,IAAA,EAAA,MAAA;AAI1D;AAIiBN,UAAAA,aAAAA,SAAsBM,aAAa,CAAA;EAInCL,EAAAA,EAAAA,MAAAA;EAAa,IAAA,EAAA,MAAA;;AAAYK,UAAzBL,aAAyBK,CAAAA,CAAAA,CAAAA,SAAAA,aAAAA,CAAAA;EAAa,EAAA,EAAA,MAAA;EAItCJ,KAAAA,EAFNE,CAEMF;;AAENE,UAFMF,YAENE,CAAAA,CAAAA,CAAAA,SAF8BE,aAE9BF,CAAAA;EAAC,EAAA,EAF6BE,MAAAA;EAAa,KAAA,EAE3CF,CAF2C;AAItD;AAA4B,UAAXG,WAAW,CAAA,CAAA,CAAA,SAAYC,KAAZ,CAAkBH,eAAlB,CAAkCD,CAAlC,CAAA,CAAA,CAAA;EAAA,WAAkCA,EAC7CA,CAD6CA;;;;AAAjB;AAyC7C;;;;;;;;;;;;;;;;;;;;iBAAwBO,wBAAwBP,UAAUQ,cAAcjB,0CAA0CQ,UAAUC,oEAAoEG,YAAYH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"core.d.ts","names":["PatchError","_deepClone","JsonPatchError","deepClone","Operation","AddOperation","RemoveOperation","ReplaceOperation","MoveOperation","CopyOperation","TestOperation","GetOperation","Validator","T","OperationResult","BaseOperation","PatchResult","Array","getValueByPointer","applyOperation","applyPatch","ReadonlyArray","applyReducer","validator","validate","_areEquals"],"sources":["../../../../src/utils/fast-json-patch/src/core.d.ts"],"sourcesContent":["import { PatchError, _deepClone } from \"./helpers.js\";\nexport declare const JsonPatchError: typeof PatchError;\nexport declare const deepClone: typeof _deepClone;\nexport type Operation = AddOperation<any> | RemoveOperation | ReplaceOperation<any> | MoveOperation | CopyOperation | TestOperation<any> | GetOperation<any>;\nexport interface Validator<T> {\n (operation: Operation, index: number, document: T, existingPathFragment: string): void;\n}\nexport interface OperationResult<T> {\n removed?: any;\n test?: boolean;\n newDocument: T;\n}\nexport interface BaseOperation {\n path: string;\n}\nexport interface AddOperation<T> extends BaseOperation {\n op: \"add\";\n value: T;\n}\nexport interface RemoveOperation extends BaseOperation {\n op: \"remove\";\n}\nexport interface ReplaceOperation<T> extends BaseOperation {\n op: \"replace\";\n value: T;\n}\nexport interface MoveOperation extends BaseOperation {\n op: \"move\";\n from: string;\n}\nexport interface CopyOperation extends BaseOperation {\n op: \"copy\";\n from: string;\n}\nexport interface TestOperation<T> extends BaseOperation {\n op: \"test\";\n value: T;\n}\nexport interface GetOperation<T> extends BaseOperation {\n op: \"_get\";\n value: T;\n}\nexport interface PatchResult<T> extends Array<OperationResult<T>> {\n newDocument: T;\n}\n/**\n * Retrieves a value from a JSON document by a JSON pointer.\n * Returns the value.\n *\n * @param document The document to get the value from\n * @param pointer an escaped JSON pointer\n * @return The retrieved value\n */\nexport declare function getValueByPointer(document: any, pointer: string): any;\n/**\n * Apply a single JSON Patch Operation on a JSON document.\n * Returns the {newDocument, result} of the operation.\n * It modifies the `document` and `operation` objects - it gets the values by reference.\n * If you would like to avoid touching your values, clone them:\n * `jsonpatch.applyOperation(document, jsonpatch._deepClone(operation))`.\n *\n * @param document The document to patch\n * @param operation The operation to apply\n * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.\n * @param mutateDocument Whether to mutate the original document or clone it before applying\n * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.\n * @return `{newDocument, result}` after the operation\n */\nexport declare function applyOperation<T>(document: T, operation: Operation, validateOperation?: boolean | Validator<T>, mutateDocument?: boolean, banPrototypeModifications?: boolean, index?: number): OperationResult<T>;\n/**\n * Apply a full JSON Patch array on a JSON document.\n * Returns the {newDocument, result} of the patch.\n * It modifies the `document` object and `patch` - it gets the values by reference.\n * If you would like to avoid touching your values, clone them:\n * `jsonpatch.applyPatch(document, jsonpatch._deepClone(patch))`.\n *\n * @param document The document to patch\n * @param patch The patch to apply\n * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.\n * @param mutateDocument Whether to mutate the original document or clone it before applying\n * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.\n * @return An array of `{newDocument, result}` after the patch\n */\nexport declare function applyPatch<T>(document: T, patch: ReadonlyArray<Operation>, validateOperation?: boolean | Validator<T>, mutateDocument?: boolean, banPrototypeModifications?: boolean): PatchResult<T>;\n/**\n * Apply a single JSON Patch Operation on a JSON document.\n * Returns the updated document.\n * Suitable as a reducer.\n *\n * @param document The document to patch\n * @param operation The operation to apply\n * @return The updated document\n */\nexport declare function applyReducer<T>(document: T, operation: Operation, index: number): T;\n/**\n * Validates a single operation. Called from `jsonpatch.validate`. Throws `JsonPatchError` in case of an error.\n * @param {object} operation - operation object (patch)\n * @param {number} index - index of operation in the sequence\n * @param {object} [document] - object where the operation is supposed to be applied\n * @param {string} [existingPathFragment] - comes along with `document`\n */\nexport declare function validator(operation: Operation, index: number, document?: any, existingPathFragment?: string): void;\n/**\n * Validates a sequence of operations. If `document` parameter is provided, the sequence is additionally validated against the object document.\n * If error is encountered, returns a JsonPatchError object\n * @param sequence\n * @param document\n * @returns {JsonPatchError|undefined}\n */\nexport declare function validate<T>(sequence: ReadonlyArray<Operation>, document?: T, externalValidator?: Validator<T>): PatchError;\n// based on https://github.com/epoberezkin/fast-deep-equal\n// MIT License\n// Copyright (c) 2017 Evgeny Poberezkin\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nexport declare function _areEquals(a: any, b: any): boolean;\n"],"mappings":";;AAGwBK,KAAZD,SAAAA,GAAYC,YAAAA,CAAAA,GAAAA,CAAAA,GAAoBC,eAApBD,GAAsCE,gBAAtCF,CAAAA,GAAAA,CAAAA,GAA8DG,aAA9DH,GAA8EI,aAA9EJ,GAA8FK,aAA9FL,CAAAA,GAAAA,CAAAA,GAAmHM,YAAnHN,CAAAA,GAAAA,CAAAA;AAAoBC,UAC3BM,SAD2BN,CAAAA,CAAAA,CAAAA,CAAAA;EAAe,CAAA,SAAGC,EAE9CH,SAF8CG,EAAAA,KAAAA,EAAAA,MAAAA,EAAAA,QAAAA,EAEVM,CAFUN,EAAAA,oBAAAA,EAAAA,MAAAA,CAAAA,EAAAA,IAAAA;;AAAwCE,UAIrFK,eAJqFL,CAAAA,CAAAA,CAAAA,CAAAA;EAAa,OAAGC,CAAAA,EAAAA,GAAAA;EAAa,IAAQC,CAAAA,EAAAA,OAAAA;EAAY,WAAA,EAOtIE,CAPsI;AACvJ;AAA0B,UAQTE,aAAAA,CARS;EAAA,IACVX,EAAAA,MAAAA;;AAAqC,UAUpCC,YAVoC,CAAA,CAAA,CAAA,SAUZU,aAVY,CAAA;EAEpCD,EAAAA,EAAAA,KAAAA;EAKAC,KAAAA,EAKNF,CALME;AAGjB;AAA6B,UAIZT,eAAAA,SAAwBS,aAJZ,CAAA;EAAA,EAAA,EAElBF,QAAAA;;AAF2C,UAOrCN,gBAPqC,CAAA,CAAA,CAAA,SAOTQ,aAPS,CAAA;EAIrCT,EAAAA,EAAAA,SAAAA;EAGAC,KAAAA,EAENM,CAFMN;;AAENM,UAEML,aAAAA,SAAsBO,aAF5BF,CAAAA;EAAC,EAAA,EAFiCE,MAAAA;EAAa,IAAA,EAAA,MAAA;AAI1D;AAIiBN,UAAAA,aAAAA,SAAsBM,aAAa,CAAA;EAInCL,EAAAA,EAAAA,MAAAA;EAAa,IAAA,EAAA,MAAA;;AAAYK,UAAzBL,aAAyBK,CAAAA,CAAAA,CAAAA,SAAAA,aAAAA,CAAAA;EAAa,EAAA,EAAA,MAAA;EAItCJ,KAAAA,EAFNE,CAEMF;;AAENE,UAFMF,YAENE,CAAAA,CAAAA,CAAAA,SAF8BE,aAE9BF,CAAAA;EAAC,EAAA,EAF6BE,MAAAA;EAAa,KAAA,EAE3CF,CAF2C;AAItD;AAA4B,UAAXG,WAAW,CAAA,CAAA,CAAA,SAAYC,KAAZ,CAAkBH,eAAlB,CAAkCD,CAAlC,CAAA,CAAA,CAAA;EAAA,WAAkCA,EAC7CA,CAD6CA;;;;AAAjB;AAyC7C;;;;;;;;;;;;;;;;;;;;iBAAwBO,wBAAwBP,UAAUQ,cAAcjB,0CAA0CQ,UAAUC,oEAAoEG,YAAYH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"duplex.d.cts","names":["Operation","Observer","T","unobserve","observe","Object","Array","generate","compare"],"sources":["../../../../src/utils/fast-json-patch/src/duplex.d.ts"],"sourcesContent":["import { Operation } from \"./core.js\";\nexport interface Observer<T> {\n object: T;\n patches: Operation[];\n unobserve: () => void;\n callback: (patches: Operation[]) => void;\n}\n/**\n * Detach an observer from an object\n */\nexport declare function unobserve<T>(root: T, observer: Observer<T>): void;\n/**\n * Observes changes made to an object, which can then be retrieved using generate\n */\nexport declare function observe<T>(obj: Object | Array<T>, callback?: (patches: Operation[]) => void): Observer<T>;\n/**\n * Generate an array of patches from an observer\n */\nexport declare function generate<T>(observer: Observer<Object>, invertible?: boolean): Operation[];\n/**\n * Create an array of patches from the differences in two objects\n */\nexport declare function compare(tree1: Object | Array<any>, tree2: Object | Array<any>, invertible?: boolean): Operation[];\n"],"mappings":";;;;;;;iBAsBwBQ,OAAAA,QAAeH,SAASC,mBAAmBD,SAASC,mCAAmCN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"duplex.d.ts","names":["Operation","Observer","T","unobserve","observe","Object","Array","generate","compare"],"sources":["../../../../src/utils/fast-json-patch/src/duplex.d.ts"],"sourcesContent":["import { Operation } from \"./core.js\";\nexport interface Observer<T> {\n object: T;\n patches: Operation[];\n unobserve: () => void;\n callback: (patches: Operation[]) => void;\n}\n/**\n * Detach an observer from an object\n */\nexport declare function unobserve<T>(root: T, observer: Observer<T>): void;\n/**\n * Observes changes made to an object, which can then be retrieved using generate\n */\nexport declare function observe<T>(obj: Object | Array<T>, callback?: (patches: Operation[]) => void): Observer<T>;\n/**\n * Generate an array of patches from an observer\n */\nexport declare function generate<T>(observer: Observer<Object>, invertible?: boolean): Operation[];\n/**\n * Create an array of patches from the differences in two objects\n */\nexport declare function compare(tree1: Object | Array<any>, tree2: Object | Array<any>, invertible?: boolean): Operation[];\n"],"mappings":";;;;;;;iBAsBwBQ,OAAAA,QAAeH,SAASC,mBAAmBD,SAASC,mCAAmCN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.d.cts","names":["Converter","T","U","ConverterPair"],"sources":["../../src/utils/format.d.ts"],"sourcesContent":["/**\n * A function that converts data from one format to another.\n *\n * This is commonly used for transforming message content blocks between different\n * provider-specific formats and standardized internal representations.\n *\n * @template T - The input type to convert from\n * @template U - The output type to convert to\n *\n * @param input - The data to convert\n * @returns The converted data in the target format\n *\n * @example\n * ```typescript\n * // Convert from OpenAI format to standard format\n * const converter: Converter<OpenAIBlock, ContentBlock.Standard> = (block) => {\n * return { type: \"text\", text: block.text };\n * };\n * ```\n */\nexport type Converter<T, U> = (input: T) => U;\n/**\n * A pair of bidirectional conversion functions for transforming data between two formats.\n *\n * This type is used throughout the message system to enable conversion between\n * provider-specific message formats (like OpenAI, Anthropic, Google, etc.) and\n * standardized internal content block representations. The `encode` function\n * typically converts from a standard format to a provider-specific format, while\n * `decode` converts from a provider-specific format back to the standard format.\n *\n * @template T - The first format (typically the standard/internal format)\n * @template U - The second format (typically the provider-specific format)\n *\n * @property encode - Converts from format T to format U\n * @property decode - Converts from format U back to format T\n *\n * @example\n * ```typescript\n * // Converter pair for OpenAI message blocks\n * const openAIConverter: ConverterPair<ContentBlock.Standard, OpenAIBlock> = {\n * encode: (standard) => ({ text: standard.text }),\n * decode: (openai) => ({ type: \"text\", text: openai.text })\n * };\n *\n * // Usage\n * const standardBlock = { type: \"text\", text: \"Hello\" };\n * const openaiBlock = openAIConverter.encode(standardBlock);\n * const backToStandard = openAIConverter.decode(openaiBlock);\n * ```\n */\nexport type ConverterPair<T, U> = {\n encode: Converter<T, U>;\n decode: Converter<U, T>;\n};\n"],"mappings":";;AAoBA;;;;AAA6C;AA8B7C;;;;;;;;AAEqB;;;;;;KAhCTA,0BAA0BC,MAAMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BhCC;UACAH,UAAUC,GAAGC;UACbF,UAAUE,GAAGD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.d.ts","names":["Converter","T","U","ConverterPair"],"sources":["../../src/utils/format.d.ts"],"sourcesContent":["/**\n * A function that converts data from one format to another.\n *\n * This is commonly used for transforming message content blocks between different\n * provider-specific formats and standardized internal representations.\n *\n * @template T - The input type to convert from\n * @template U - The output type to convert to\n *\n * @param input - The data to convert\n * @returns The converted data in the target format\n *\n * @example\n * ```typescript\n * // Convert from OpenAI format to standard format\n * const converter: Converter<OpenAIBlock, ContentBlock.Standard> = (block) => {\n * return { type: \"text\", text: block.text };\n * };\n * ```\n */\nexport type Converter<T, U> = (input: T) => U;\n/**\n * A pair of bidirectional conversion functions for transforming data between two formats.\n *\n * This type is used throughout the message system to enable conversion between\n * provider-specific message formats (like OpenAI, Anthropic, Google, etc.) and\n * standardized internal content block representations. The `encode` function\n * typically converts from a standard format to a provider-specific format, while\n * `decode` converts from a provider-specific format back to the standard format.\n *\n * @template T - The first format (typically the standard/internal format)\n * @template U - The second format (typically the provider-specific format)\n *\n * @property encode - Converts from format T to format U\n * @property decode - Converts from format U back to format T\n *\n * @example\n * ```typescript\n * // Converter pair for OpenAI message blocks\n * const openAIConverter: ConverterPair<ContentBlock.Standard, OpenAIBlock> = {\n * encode: (standard) => ({ text: standard.text }),\n * decode: (openai) => ({ type: \"text\", text: openai.text })\n * };\n *\n * // Usage\n * const standardBlock = { type: \"text\", text: \"Hello\" };\n * const openaiBlock = openAIConverter.encode(standardBlock);\n * const backToStandard = openAIConverter.decode(openaiBlock);\n * ```\n */\nexport type ConverterPair<T, U> = {\n encode: Converter<T, U>;\n decode: Converter<U, T>;\n};\n"],"mappings":";;AAoBA;;;;AAA6C;AA8B7C;;;;;;;;AAEqB;;;;;;KAhCTA,0BAA0BC,MAAMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BhCC;UACAH,UAAUC,GAAGC;UACbF,UAAUE,GAAGD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"function_calling.d.cts","names":["StructuredToolInterface","StructuredToolParams","FunctionDefinition","ToolDefinition","RunnableToolLike","isStructuredTool","isStructuredToolParams","isRunnableToolLike","isLangChainTool","convertToOpenAIFunction","convertToOpenAITool","Record"],"sources":["../../src/utils/function_calling.d.ts"],"sourcesContent":["import { StructuredToolInterface, StructuredToolParams } from \"../tools/types.js\";\nimport { FunctionDefinition, ToolDefinition } from \"../language_models/base.js\";\nimport { RunnableToolLike } from \"../runnables/base.js\";\n// These utility functions were moved to a more appropriate location,\n// but we still export them here for backwards compatibility.\nexport { isStructuredTool, isStructuredToolParams, isRunnableToolLike, isLangChainTool, } from \"../tools/types.js\";\n/**\n * Formats a `StructuredTool` or `RunnableToolLike` instance into a format\n * that is compatible with OpenAI function calling. If `StructuredTool` or\n * `RunnableToolLike` has a zod schema, the output will be converted into a\n * JSON schema, which is then used as the parameters for the OpenAI tool.\n *\n * @param {StructuredToolInterface | RunnableToolLike} tool The tool to convert to an OpenAI function.\n * @returns {FunctionDefinition} The inputted tool in OpenAI function format.\n */\nexport declare function convertToOpenAIFunction(tool: StructuredToolInterface | RunnableToolLike | StructuredToolParams, fields?: {\n /**\n * If `true`, model output is guaranteed to exactly match the JSON Schema\n * provided in the function definition.\n */\n strict?: boolean;\n} | number): FunctionDefinition;\n/**\n * Formats a `StructuredTool` or `RunnableToolLike` instance into a\n * format that is compatible with OpenAI tool calling. If `StructuredTool` or\n * `RunnableToolLike` has a zod schema, the output will be converted into a\n * JSON schema, which is then used as the parameters for the OpenAI tool.\n *\n * @param {StructuredToolInterface | Record<string, any> | RunnableToolLike} tool The tool to convert to an OpenAI tool.\n * @returns {ToolDefinition} The inputted tool in OpenAI tool format.\n */\nexport declare function convertToOpenAITool(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntool: StructuredToolInterface | Record<string, any> | RunnableToolLike, fields?: {\n /**\n * If `true`, model output is guaranteed to exactly match the JSON Schema\n * provided in the function definition.\n */\n strict?: boolean;\n} | number): ToolDefinition;\n"],"mappings":";;;;;;;;;;;AAqB+B;AAU/B;;;AAEgCW,iBAlBRF,uBAAAA,CAkBQE,IAAAA,EAlBsBX,uBAkBtBW,GAlBgDP,gBAkBhDO,GAlBmEV,oBAkBnEU,EAAAA,OAAAA,EAAAA;EAAM;;AAMX;;;aAlBdT;;;;;;;;;;iBAUWQ,mBAAAA;;MAElBV,0BAA0BW,sBAAsBP;;;;;;aAMzCD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"function_calling.d.ts","names":["StructuredToolInterface","StructuredToolParams","FunctionDefinition","ToolDefinition","RunnableToolLike","isStructuredTool","isStructuredToolParams","isRunnableToolLike","isLangChainTool","convertToOpenAIFunction","convertToOpenAITool","Record"],"sources":["../../src/utils/function_calling.d.ts"],"sourcesContent":["import { StructuredToolInterface, StructuredToolParams } from \"../tools/types.js\";\nimport { FunctionDefinition, ToolDefinition } from \"../language_models/base.js\";\nimport { RunnableToolLike } from \"../runnables/base.js\";\n// These utility functions were moved to a more appropriate location,\n// but we still export them here for backwards compatibility.\nexport { isStructuredTool, isStructuredToolParams, isRunnableToolLike, isLangChainTool, } from \"../tools/types.js\";\n/**\n * Formats a `StructuredTool` or `RunnableToolLike` instance into a format\n * that is compatible with OpenAI function calling. If `StructuredTool` or\n * `RunnableToolLike` has a zod schema, the output will be converted into a\n * JSON schema, which is then used as the parameters for the OpenAI tool.\n *\n * @param {StructuredToolInterface | RunnableToolLike} tool The tool to convert to an OpenAI function.\n * @returns {FunctionDefinition} The inputted tool in OpenAI function format.\n */\nexport declare function convertToOpenAIFunction(tool: StructuredToolInterface | RunnableToolLike | StructuredToolParams, fields?: {\n /**\n * If `true`, model output is guaranteed to exactly match the JSON Schema\n * provided in the function definition.\n */\n strict?: boolean;\n} | number): FunctionDefinition;\n/**\n * Formats a `StructuredTool` or `RunnableToolLike` instance into a\n * format that is compatible with OpenAI tool calling. If `StructuredTool` or\n * `RunnableToolLike` has a zod schema, the output will be converted into a\n * JSON schema, which is then used as the parameters for the OpenAI tool.\n *\n * @param {StructuredToolInterface | Record<string, any> | RunnableToolLike} tool The tool to convert to an OpenAI tool.\n * @returns {ToolDefinition} The inputted tool in OpenAI tool format.\n */\nexport declare function convertToOpenAITool(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntool: StructuredToolInterface | Record<string, any> | RunnableToolLike, fields?: {\n /**\n * If `true`, model output is guaranteed to exactly match the JSON Schema\n * provided in the function definition.\n */\n strict?: boolean;\n} | number): ToolDefinition;\n"],"mappings":";;;;;;;;;;;AAqB+B;AAU/B;;;AAEgCW,iBAlBRF,uBAAAA,CAkBQE,IAAAA,EAlBsBX,uBAkBtBW,GAlBgDP,gBAkBhDO,GAlBmEV,oBAkBnEU,EAAAA,OAAAA,EAAAA;EAAM;;AAMX;;;aAlBdT;;;;;;;;;;iBAUWQ,mBAAAA;;MAElBV,0BAA0BW,sBAAsBP;;;;;;aAMzCD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hash.d.cts","names":["sha256","HashKeyEncoder"],"sources":["../../src/utils/hash.d.ts"],"sourcesContent":["export { sha256 } from \"./js-sha256/hash.js\";\n/**\n * A function type for encoding hash keys.\n * Accepts any number of string arguments (such as prompt and LLM key)\n * and returns a single string to be used as the hash key.\n */\nexport type HashKeyEncoder = (...strings: string[]) => string;\n"],"mappings":";;;;;;AAMA;;;KAAYC,cAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hash.d.ts","names":["sha256","HashKeyEncoder"],"sources":["../../src/utils/hash.d.ts"],"sourcesContent":["export { sha256 } from \"./js-sha256/hash.js\";\n/**\n * A function type for encoding hash keys.\n * Accepts any number of string arguments (such as prompt and LLM key)\n * and returns a single string to be used as the hash key.\n */\nexport type HashKeyEncoder = (...strings: string[]) => string;\n"],"mappings":";;;;;;AAMA;;;KAAYC,cAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hash.d.cts","names":["sha256"],"sources":["../../../src/utils/js-sha256/hash.d.ts"],"sourcesContent":["export declare const sha256: (...strings: string[]) => any;\n"],"mappings":";cAAqBA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hash.d.ts","names":["sha256"],"sources":["../../../src/utils/js-sha256/hash.d.ts"],"sourcesContent":["export declare const sha256: (...strings: string[]) => any;\n"],"mappings":";cAAqBA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"json.d.cts","names":["parseJsonMarkdown","parsePartialJson"],"sources":["../../src/utils/json.d.ts"],"sourcesContent":["export declare function parseJsonMarkdown(s: string, parser?: typeof parsePartialJson): any;\n// Adapted from https://github.com/KillianLucas/open-interpreter/blob/main/interpreter/core/llm/utils/parse_partial_json.py\n// MIT License\nexport declare function parsePartialJson(s: string): any;\n"],"mappings":";iBAAwBA,iBAAAA,4BAA6CC;AAArE;AAGA;iBAAwBA,gBAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"json.d.ts","names":["parseJsonMarkdown","parsePartialJson"],"sources":["../../src/utils/json.d.ts"],"sourcesContent":["export declare function parseJsonMarkdown(s: string, parser?: typeof parsePartialJson): any;\n// Adapted from https://github.com/KillianLucas/open-interpreter/blob/main/interpreter/core/llm/utils/parse_partial_json.py\n// MIT License\nexport declare function parsePartialJson(s: string): any;\n"],"mappings":";iBAAwBA,iBAAAA,4BAA6CC;AAArE;AAGA;iBAAwBA,gBAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"json_schema.d.cts","names":["InteropZodType","JsonSchema7Type","JSONSchema","deepCompareStrict","Validator","toJsonSchema","validatesOnlyStrings","JsonSchema7ArrayType","JsonSchema7ObjectType","JsonSchema7StringType","JsonSchema7NumberType","JsonSchema7NullableType"],"sources":["../../src/utils/json_schema.d.ts"],"sourcesContent":["import { InteropZodType } from \"./types/zod.js\";\nimport { type JsonSchema7Type as JSONSchema } from \"./zod-to-json-schema/index.js\";\nexport { deepCompareStrict, Validator } from \"@cfworker/json-schema\";\n/**\n * Converts a Zod schema or JSON schema to a JSON schema.\n * @param schema - The schema to convert.\n * @returns The converted schema.\n */\nexport declare function toJsonSchema(schema: InteropZodType | JSONSchema): JSONSchema;\n/**\n * Validates if a JSON schema validates only strings. May return false negatives in some edge cases\n * (like recursive or unresolvable refs).\n *\n * @param schema - The schema to validate.\n * @returns `true` if the schema validates only strings, `false` otherwise.\n */\nexport declare function validatesOnlyStrings(schema: unknown): boolean;\n// Re-export of the types used throughout langchain for json schema serialization.\n// The plan is to eventually nix zod-to-json-schema altogether in place for\n// zod v4 / a more standardized way of serializing validated inputs, so its re-exported\n// here to remove the dependency on zod-to-json-schema in downstream packages until\n// a determination is made.\nexport { type JsonSchema7Type, type JsonSchema7Type as JSONSchema, type JsonSchema7ArrayType, type JsonSchema7ObjectType, type JsonSchema7StringType, type JsonSchema7NumberType, type JsonSchema7NullableType, } from \"./zod-to-json-schema/index.js\";\n"],"mappings":";;;;;;;;;;;;;;;iBAQwBK,YAAAA,SAAqBL,iBAAiBE,kBAAaA;;AAA3E;;;;;AAAqF;AAQ7DI,iBAAAA,oBAAAA,CAAoB,MAAA,EAAA,OAAA,CAAA,EAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"json_schema.d.ts","names":["InteropZodType","JsonSchema7Type","JSONSchema","deepCompareStrict","Validator","toJsonSchema","validatesOnlyStrings","JsonSchema7ArrayType","JsonSchema7ObjectType","JsonSchema7StringType","JsonSchema7NumberType","JsonSchema7NullableType"],"sources":["../../src/utils/json_schema.d.ts"],"sourcesContent":["import { InteropZodType } from \"./types/zod.js\";\nimport { type JsonSchema7Type as JSONSchema } from \"./zod-to-json-schema/index.js\";\nexport { deepCompareStrict, Validator } from \"@cfworker/json-schema\";\n/**\n * Converts a Zod schema or JSON schema to a JSON schema.\n * @param schema - The schema to convert.\n * @returns The converted schema.\n */\nexport declare function toJsonSchema(schema: InteropZodType | JSONSchema): JSONSchema;\n/**\n * Validates if a JSON schema validates only strings. May return false negatives in some edge cases\n * (like recursive or unresolvable refs).\n *\n * @param schema - The schema to validate.\n * @returns `true` if the schema validates only strings, `false` otherwise.\n */\nexport declare function validatesOnlyStrings(schema: unknown): boolean;\n// Re-export of the types used throughout langchain for json schema serialization.\n// The plan is to eventually nix zod-to-json-schema altogether in place for\n// zod v4 / a more standardized way of serializing validated inputs, so its re-exported\n// here to remove the dependency on zod-to-json-schema in downstream packages until\n// a determination is made.\nexport { type JsonSchema7Type, type JsonSchema7Type as JSONSchema, type JsonSchema7ArrayType, type JsonSchema7ObjectType, type JsonSchema7StringType, type JsonSchema7NumberType, type JsonSchema7NullableType, } from \"./zod-to-json-schema/index.js\";\n"],"mappings":";;;;;;;;;;;;;;;iBAQwBK,YAAAA,SAAqBL,iBAAiBE,kBAAaA;;AAA3E;;;;;AAAqF;AAQ7DI,iBAAAA,oBAAAA,CAAoB,MAAA,EAAA,OAAA,CAAA,EAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"math.d.cts","names":["VectorFunction","matrixFunc","normalize","cosineSimilarity","innerProduct","euclideanDistance","maximalMarginalRelevance"],"sources":["../../src/utils/math.d.ts"],"sourcesContent":["type VectorFunction = (xVector: number[], yVector: number[]) => number;\n/**\n * Apply a row-wise function between two matrices with the same number of columns.\n *\n * @param {number[][]} X - The first matrix.\n * @param {number[][]} Y - The second matrix.\n * @param {VectorFunction} func - The function to apply.\n *\n * @throws {Error} If the number of columns in X and Y are not the same.\n *\n * @returns {number[][] | [[]]} A matrix where each row represents the result of applying the function between the corresponding rows of X and Y.\n */\nexport declare function matrixFunc(X: number[][], Y: number[][], func: VectorFunction): number[][];\nexport declare function normalize(M: number[][], similarity?: boolean): number[][];\n/**\n * This function calculates the row-wise cosine similarity between two matrices with the same number of columns.\n *\n * @param {number[][]} X - The first matrix.\n * @param {number[][]} Y - The second matrix.\n *\n * @throws {Error} If the number of columns in X and Y are not the same.\n *\n * @returns {number[][] | [[]]} A matrix where each row represents the cosine similarity values between the corresponding rows of X and Y.\n */\nexport declare function cosineSimilarity(X: number[][], Y: number[][]): number[][];\nexport declare function innerProduct(X: number[][], Y: number[][]): number[][];\nexport declare function euclideanDistance(X: number[][], Y: number[][]): number[][];\n/**\n * This function implements the Maximal Marginal Relevance algorithm\n * to select a set of embeddings that maximizes the diversity and relevance to a query embedding.\n *\n * @param {number[]|number[][]} queryEmbedding - The query embedding.\n * @param {number[][]} embeddingList - The list of embeddings to select from.\n * @param {number} [lambda=0.5] - The trade-off parameter between relevance and diversity.\n * @param {number} [k=4] - The maximum number of embeddings to select.\n *\n * @returns {number[]} The indexes of the selected embeddings in the embeddingList.\n */\nexport declare function maximalMarginalRelevance(queryEmbedding: number[] | number[][], embeddingList: number[][], lambda?: number, k?: number): number[];\nexport {};\n"],"mappings":";KAAKA,cAAAA;;AAYL;AACA;AAWA;AACA;AACA;AAYA;;;;;iBA1BwBC,UAAAA,qCAA+CD;iBAC/CE,SAAAA;;;;;;;;;;;iBAWAC,gBAAAA;iBACAC,YAAAA;iBACAC,iBAAAA;;;;;;;;;;;;iBAYAC,wBAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"math.d.ts","names":["VectorFunction","matrixFunc","normalize","cosineSimilarity","innerProduct","euclideanDistance","maximalMarginalRelevance"],"sources":["../../src/utils/math.d.ts"],"sourcesContent":["type VectorFunction = (xVector: number[], yVector: number[]) => number;\n/**\n * Apply a row-wise function between two matrices with the same number of columns.\n *\n * @param {number[][]} X - The first matrix.\n * @param {number[][]} Y - The second matrix.\n * @param {VectorFunction} func - The function to apply.\n *\n * @throws {Error} If the number of columns in X and Y are not the same.\n *\n * @returns {number[][] | [[]]} A matrix where each row represents the result of applying the function between the corresponding rows of X and Y.\n */\nexport declare function matrixFunc(X: number[][], Y: number[][], func: VectorFunction): number[][];\nexport declare function normalize(M: number[][], similarity?: boolean): number[][];\n/**\n * This function calculates the row-wise cosine similarity between two matrices with the same number of columns.\n *\n * @param {number[][]} X - The first matrix.\n * @param {number[][]} Y - The second matrix.\n *\n * @throws {Error} If the number of columns in X and Y are not the same.\n *\n * @returns {number[][] | [[]]} A matrix where each row represents the cosine similarity values between the corresponding rows of X and Y.\n */\nexport declare function cosineSimilarity(X: number[][], Y: number[][]): number[][];\nexport declare function innerProduct(X: number[][], Y: number[][]): number[][];\nexport declare function euclideanDistance(X: number[][], Y: number[][]): number[][];\n/**\n * This function implements the Maximal Marginal Relevance algorithm\n * to select a set of embeddings that maximizes the diversity and relevance to a query embedding.\n *\n * @param {number[]|number[][]} queryEmbedding - The query embedding.\n * @param {number[][]} embeddingList - The list of embeddings to select from.\n * @param {number} [lambda=0.5] - The trade-off parameter between relevance and diversity.\n * @param {number} [k=4] - The maximum number of embeddings to select.\n *\n * @returns {number[]} The indexes of the selected embeddings in the embeddingList.\n */\nexport declare function maximalMarginalRelevance(queryEmbedding: number[] | number[][], embeddingList: number[][], lambda?: number, k?: number): number[];\nexport {};\n"],"mappings":";KAAKA,cAAAA;;AAYL;AACA;AAWA;AACA;AACA;AAYA;;;;;iBA1BwBC,UAAAA,qCAA+CD;iBAC/CE,SAAAA;;;;;;;;;;;iBAWAC,gBAAAA;iBACAC,YAAAA;iBACAC,iBAAAA;;;;;;;;;;;;iBAYAC,wBAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"similarities.d.cts","names":["cosine"],"sources":["../../../src/utils/ml-distance/similarities.d.ts"],"sourcesContent":["/**\n * Returns the average of cosine distances between vectors a and b\n * @param a - first vector\n * @param b - second vector\n *\n */\nexport declare function cosine(a: number[], b: number[]): number;\n"],"mappings":";;AAMA;;;;;iBAAwBA,MAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"similarities.d.ts","names":["cosine"],"sources":["../../../src/utils/ml-distance/similarities.d.ts"],"sourcesContent":["/**\n * Returns the average of cosine distances between vectors a and b\n * @param a - first vector\n * @param b - second vector\n *\n */\nexport declare function cosine(a: number[], b: number[]): number;\n"],"mappings":";;AAMA;;;;;iBAAwBA,MAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream.d.cts","names":["IterableReadableStreamInterface","IterableReadableStream","T","ReadableStreamDefaultReader","IteratorResult","Promise","Symbol","asyncIterator","asyncDispose","ReadableStream","AsyncGenerator","atee","concat","Array","Record","AsyncGeneratorWithSetup","TReturn","TNext","S","AbortSignal","PromiseLike","Error","pipeGeneratorWithSetup","A","U","UReturn","UNext","Awaited"],"sources":["../../src/utils/stream.d.ts"],"sourcesContent":["import type { IterableReadableStreamInterface } from \"../types/_internal.js\";\n// Re-exported for backwards compatibility\n// Do NOT import this type from this file inside the project. Instead, always import from `types/_internal.js`\n// when using internally\nexport type { IterableReadableStreamInterface };\n/*\n * Support async iterator syntax for ReadableStreams in all environments.\n * Source: https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490\n */\nexport declare class IterableReadableStream<T> extends ReadableStream<T> implements IterableReadableStreamInterface<T> {\n reader: ReadableStreamDefaultReader<T>;\n ensureReader(): void;\n next(): Promise<IteratorResult<T>>;\n return(): Promise<IteratorResult<T>>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n throw(e: any): Promise<IteratorResult<T>>;\n [Symbol.asyncIterator](): this;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore Not present in Node 18 types, required in latest Node 22\n [Symbol.asyncDispose](): Promise<void>;\n static fromReadableStream<T>(stream: ReadableStream<T>): IterableReadableStream<T>;\n static fromAsyncGenerator<T>(generator: AsyncGenerator<T>): IterableReadableStream<T>;\n}\nexport declare function atee<T>(iter: AsyncGenerator<T>, length?: number): AsyncGenerator<T>[];\nexport declare function concat<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nT extends Array<any> | string | number | Record<string, any> | any>(first: T, second: T): T;\nexport declare class AsyncGeneratorWithSetup<S = unknown, T = unknown, TReturn = unknown, TNext = unknown> implements AsyncGenerator<T, TReturn, TNext> {\n private generator;\n setup: Promise<S>;\n config?: unknown;\n signal?: AbortSignal;\n private firstResult;\n private firstResultUsed;\n constructor(params: {\n generator: AsyncGenerator<T>;\n startSetup?: () => Promise<S>;\n config?: unknown;\n signal?: AbortSignal;\n });\n next(...args: [] | [TNext]): Promise<IteratorResult<T>>;\n return(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T>>;\n throw(e: Error): Promise<IteratorResult<T>>;\n [Symbol.asyncIterator](): this;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore Not present in Node 18 types, required in latest Node 22\n [Symbol.asyncDispose](): Promise<void>;\n}\nexport declare function pipeGeneratorWithSetup<S, A extends unknown[], T, TReturn, TNext, U, UReturn, UNext>(to: (g: AsyncGenerator<T, TReturn, TNext>, s: S, ...args: A) => AsyncGenerator<U, UReturn, UNext>, generator: AsyncGenerator<T, TReturn, TNext>, startSetup: () => Promise<S>, signal: AbortSignal | undefined, ...args: A): Promise<{\n output: AsyncGenerator<U, UReturn, UNext>;\n setup: Awaited<S>;\n}>;\n"],"mappings":";;;;;;;;AAYmCE,cAHdD,sBAGcC,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A,CAAOC,aAAAA,GAjB+DL,EAAAA,IAAAA;EAAC;EAAW;EAAI,CAoBtFI,MAAAA,CAAOE,YAAAA,GApB+E,EAoB9DH,OApB8D,CAAA,IAAA,CAAA;AAC3F;AAA4C,iBAqBpBiB,sBArBoB,CAAA,CAAA,EAAA,UAAA,OAAA,EAAA,EAAA,CAAA,EAAA,OAAA,EAAA,KAAA,EAAA,CAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,EAqByEZ,cArBzE,CAqBwFR,CArBxF,EAqB2Fc,OArB3F,EAqBoGC,KArBpG,CAAA,EAAA,CAAA,EAqB+GC,CArB/G,EAAA,GAAA,IAAA,EAqB2HK,CArB3H,EAAA,GAqBiIb,cArBjI,CAqBgJc,CArBhJ,EAqBmJC,OArBnJ,EAqB4JC,KArB5J,CAAA,EAAA,SAAA,EAqB+KhB,cArB/K,CAqB8LR,CArB9L,EAqBiMc,OArBjM,EAqB0MC,KArB1M,CAAA,EAAA,UAAA,EAAA,GAAA,GAqBoOZ,OArBpO,CAqB4Oa,CArB5O,CAAA,EAAA,MAAA,EAqBwPC,WArBxP,GAAA,SAAA,EAAA,GAAA,IAAA,EAqB0RI,CArB1R,CAAA,EAqB8RlB,OArB9R,CAAA;EAAA,MAAyFH,EAsBzHQ,cAtByHR,CAsB1GsB,CAtB0GtB,EAsBvGuB,OAtBuGvB,EAsB9FwB,KAtB8FxB,CAAAA;EAAC,KAAEc,EAuB7HW,OAvB6HX,CAuBrHE,CAvBqHF,CAAAA;CAAO,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream.d.ts","names":["IterableReadableStreamInterface","IterableReadableStream","T","ReadableStreamDefaultReader","IteratorResult","Promise","Symbol","asyncIterator","asyncDispose","ReadableStream","AsyncGenerator","atee","concat","Array","Record","AsyncGeneratorWithSetup","TReturn","TNext","S","AbortSignal","PromiseLike","Error","pipeGeneratorWithSetup","A","U","UReturn","UNext","Awaited"],"sources":["../../src/utils/stream.d.ts"],"sourcesContent":["import type { IterableReadableStreamInterface } from \"../types/_internal.js\";\n// Re-exported for backwards compatibility\n// Do NOT import this type from this file inside the project. Instead, always import from `types/_internal.js`\n// when using internally\nexport type { IterableReadableStreamInterface };\n/*\n * Support async iterator syntax for ReadableStreams in all environments.\n * Source: https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490\n */\nexport declare class IterableReadableStream<T> extends ReadableStream<T> implements IterableReadableStreamInterface<T> {\n reader: ReadableStreamDefaultReader<T>;\n ensureReader(): void;\n next(): Promise<IteratorResult<T>>;\n return(): Promise<IteratorResult<T>>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n throw(e: any): Promise<IteratorResult<T>>;\n [Symbol.asyncIterator](): this;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore Not present in Node 18 types, required in latest Node 22\n [Symbol.asyncDispose](): Promise<void>;\n static fromReadableStream<T>(stream: ReadableStream<T>): IterableReadableStream<T>;\n static fromAsyncGenerator<T>(generator: AsyncGenerator<T>): IterableReadableStream<T>;\n}\nexport declare function atee<T>(iter: AsyncGenerator<T>, length?: number): AsyncGenerator<T>[];\nexport declare function concat<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nT extends Array<any> | string | number | Record<string, any> | any>(first: T, second: T): T;\nexport declare class AsyncGeneratorWithSetup<S = unknown, T = unknown, TReturn = unknown, TNext = unknown> implements AsyncGenerator<T, TReturn, TNext> {\n private generator;\n setup: Promise<S>;\n config?: unknown;\n signal?: AbortSignal;\n private firstResult;\n private firstResultUsed;\n constructor(params: {\n generator: AsyncGenerator<T>;\n startSetup?: () => Promise<S>;\n config?: unknown;\n signal?: AbortSignal;\n });\n next(...args: [] | [TNext]): Promise<IteratorResult<T>>;\n return(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T>>;\n throw(e: Error): Promise<IteratorResult<T>>;\n [Symbol.asyncIterator](): this;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore Not present in Node 18 types, required in latest Node 22\n [Symbol.asyncDispose](): Promise<void>;\n}\nexport declare function pipeGeneratorWithSetup<S, A extends unknown[], T, TReturn, TNext, U, UReturn, UNext>(to: (g: AsyncGenerator<T, TReturn, TNext>, s: S, ...args: A) => AsyncGenerator<U, UReturn, UNext>, generator: AsyncGenerator<T, TReturn, TNext>, startSetup: () => Promise<S>, signal: AbortSignal | undefined, ...args: A): Promise<{\n output: AsyncGenerator<U, UReturn, UNext>;\n setup: Awaited<S>;\n}>;\n"],"mappings":";;;;;;;;AAYmCE,cAHdD,sBAGcC,CAAAA,CAAAA,CAAAA,SAHoBO,cAGpBP,CAHmCA,CAGnCA,CAAAA,YAHiDF,+BAGjDE,CAHiFA,CAGjFA,CAAAA,CAAAA;EAAC,MAAhBE,EAFRD,2BAEQC,CAFoBF,CAEpBE,CAAAA;EAAc,YAAtBC,CAAAA,CAAAA,EAAAA,IAAAA;EAAO,IACkBH,CAAAA,CAAAA,EADzBG,OACyBH,CADjBE,cACiBF,CADFA,CACEA,CAAAA,CAAAA;EAAC,MAAhBE,CAAAA,CAAAA,EAARC,OAAQD,CAAAA,cAAAA,CAAeF,CAAfE,CAAAA,CAAAA;EAAc;EAAf,KAEqBF,CAAAA,CAAAA,EAAAA,GAAAA,CAAAA,EAAvBG,OAAuBH,CAAfE,cAAeF,CAAAA,CAAAA,CAAAA,CAAAA;EAAC,CACtCI,MAAAA,CAAOC,aAAAA,GADeH,EAAAA,IAAAA;EAAc;EAAf;EACD,CAGpBE,MAAAA,CAAOE,YAAAA,GAAiBH,EAAAA,OAAAA,CAAAA,IAAAA,CAAAA;EAAO,OAA/BC,kBAAOE,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,EAC6BC,cAD7BD,CAC4CN,CAD5CM,CAAAA,CAAAA,EACiDP,sBADjDO,CACwEN,CADxEM,CAAAA;EAAY,OACgCN,kBAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,EACZQ,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vGuB,OAtBuGvB,EAsB9FwB,KAtB8FxB,CAAAA;EAAC,KAAEc,EAuB7HW,OAvB6HX,CAuBrHE,CAvBqHF,CAAAA;CAAO,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat_models.d.cts","names":["CallbackManagerForLLMRun","BaseChatModel","BaseChatModelCallOptions","BaseChatModelParams","BaseLLMParams","BaseMessage","AIMessage","AIMessageChunk","ChatResult","ChatGenerationChunk","Runnable","StructuredTool","StructuredOutputMethodParams","BaseLanguageModelInput","StructuredOutputMethodOptions","InteropZodType","ToolSpec","Record","FakeStreamingChatModelCallOptions","FakeStreamingChatModelFields","FakeChatModel","Promise","FakeStreamingChatModel","sleep","responses","chunks","toolStyle","thrownErrorString","______messages_message_js0","MessageStructure","AsyncGenerator","FakeChatInput","FakeListChatModelCallOptions","FakeListChatModel","RunOutput"],"sources":["../../../src/utils/testing/chat_models.d.ts"],"sourcesContent":["import { CallbackManagerForLLMRun } from \"../../callbacks/manager.js\";\nimport { BaseChatModel, BaseChatModelCallOptions, BaseChatModelParams } from \"../../language_models/chat_models.js\";\nimport { BaseLLMParams } from \"../../language_models/llms.js\";\nimport { BaseMessage, AIMessage, AIMessageChunk } from \"../../messages/index.js\";\nimport { type ChatResult, ChatGenerationChunk } from \"../../outputs.js\";\nimport { Runnable } from \"../../runnables/base.js\";\nimport { StructuredTool } from \"../../tools/index.js\";\nimport { StructuredOutputMethodParams, BaseLanguageModelInput, StructuredOutputMethodOptions } from \"../../language_models/base.js\";\nimport { InteropZodType } from \"../types/zod.js\";\n/** Minimal shape actually needed by `bindTools` */\nexport interface ToolSpec {\n name: string;\n description?: string;\n schema: InteropZodType | Record<string, unknown>; // Either a Zod schema *or* a plain JSON-Schema object\n}\n/**\n * Interface specific to the Fake Streaming Chat model.\n */\nexport interface FakeStreamingChatModelCallOptions extends BaseChatModelCallOptions {\n}\n/**\n * Interface for the Constructor-field specific to the Fake Streaming Chat model (all optional because we fill in defaults).\n */\nexport interface FakeStreamingChatModelFields extends BaseChatModelParams {\n /** Milliseconds to pause between fallback char-by-char chunks */\n sleep?: number;\n /** Full AI messages to fall back to when no `chunks` supplied */\n responses?: BaseMessage[];\n /** Exact chunks to emit (can include tool-call deltas) */\n chunks?: AIMessageChunk[];\n /** How tool specs are formatted in `bindTools` */\n toolStyle?: \"openai\" | \"anthropic\" | \"bedrock\" | \"google\";\n /** Throw this error instead of streaming (useful in tests) */\n thrownErrorString?: string;\n}\nexport declare class FakeChatModel extends BaseChatModel {\n _combineLLMOutput(): never[];\n _llmType(): string;\n _generate(messages: BaseMessage[], options?: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n}\nexport declare class FakeStreamingChatModel extends BaseChatModel<FakeStreamingChatModelCallOptions> {\n sleep: number;\n responses: BaseMessage[];\n chunks: AIMessageChunk[];\n toolStyle: \"openai\" | \"anthropic\" | \"bedrock\" | \"google\";\n thrownErrorString?: string;\n private tools;\n constructor({ sleep, responses, chunks, toolStyle, thrownErrorString, ...rest }: FakeStreamingChatModelFields & BaseLLMParams);\n _llmType(): string;\n bindTools(tools: (StructuredTool | ToolSpec)[]): Runnable<BaseLanguageModelInput, AIMessageChunk<import(\"../../messages/message.js\").MessageStructure>, FakeStreamingChatModelCallOptions>;\n _generate(messages: BaseMessage[], _options: this[\"ParsedCallOptions\"], _runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n _streamResponseChunks(_messages: BaseMessage[], _options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;\n}\n/**\n * Interface for the input parameters specific to the Fake List Chat model.\n */\nexport interface FakeChatInput extends BaseChatModelParams {\n /** Responses to return */\n responses: string[];\n /** Time to sleep in milliseconds between responses */\n sleep?: number;\n emitCustomEvent?: boolean;\n}\nexport interface FakeListChatModelCallOptions extends BaseChatModelCallOptions {\n thrownErrorString?: string;\n}\n/**\n * A fake Chat Model that returns a predefined list of responses. It can be used\n * for testing purposes.\n * @example\n * ```typescript\n * const chat = new FakeListChatModel({\n * responses: [\"I'll callback later.\", \"You 'console' them!\"]\n * });\n *\n * const firstMessage = new HumanMessage(\"You want to hear a JavaScript joke?\");\n * const secondMessage = new HumanMessage(\"How do you cheer up a JavaScript developer?\");\n *\n * // Call the chat model with a message and log the response\n * const firstResponse = await chat.call([firstMessage]);\n * console.log({ firstResponse });\n *\n * const secondResponse = await chat.call([secondMessage]);\n * console.log({ secondResponse });\n * ```\n */\nexport declare class FakeListChatModel extends BaseChatModel<FakeListChatModelCallOptions> {\n static lc_name(): string;\n lc_serializable: boolean;\n responses: string[];\n i: number;\n sleep?: number;\n emitCustomEvent: boolean;\n constructor(params: FakeChatInput);\n _combineLLMOutput(): never[];\n _llmType(): string;\n _generate(_messages: BaseMessage[], options?: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n _formatGeneration(text: string): {\n message: AIMessage<import(\"../../messages/message.js\").MessageStructure>;\n text: string;\n };\n _streamResponseChunks(_messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;\n _sleepIfRequested(): Promise<void>;\n _sleep(): Promise<void>;\n _createResponseChunk(text: string): ChatGenerationChunk;\n _currentResponse(): string;\n _incrementResponse(): void;\n withStructuredOutput<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunOutput extends Record<string, any> = Record<string, any>>(_params: StructuredOutputMethodParams<RunOutput, false> | InteropZodType<RunOutput>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunOutput extends Record<string, any> = Record<string, any>>(_params: StructuredOutputMethodParams<RunOutput, true> | InteropZodType<RunOutput>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>, config?: StructuredO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G,wBAAwBqB;;;oBAGvFjB,sBAAsBA,8BAA8BL,6BAA6BsB,mBAAmBnB,eAAemB;;IAElIjB,8BAA8BH,sCAAsCJ,SAASG;SACvER;YACG6B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat_models.d.ts","names":["CallbackManagerForLLMRun","BaseChatModel","BaseChatModelCallOptions","BaseChatModelParams","BaseLLMParams","BaseMessage","AIMessage","AIMessageChunk","ChatResult","ChatGenerationChunk","Runnable","StructuredTool","StructuredOutputMethodParams","BaseLanguageModelInput","StructuredOutputMethodOptions","InteropZodType","ToolSpec","Record","FakeStreamingChatModelCallOptions","FakeStreamingChatModelFields","FakeChatModel","Promise","FakeStreamingChatModel","sleep","responses","chunks","toolStyle","thrownErrorString","______messages_message_js0","MessageStructure","AsyncGenerator","FakeChatInput","FakeListChatModelCallOptions","FakeListChatModel","RunOutput"],"sources":["../../../src/utils/testing/chat_models.d.ts"],"sourcesContent":["import { CallbackManagerForLLMRun } from \"../../callbacks/manager.js\";\nimport { BaseChatModel, BaseChatModelCallOptions, BaseChatModelParams } from \"../../language_models/chat_models.js\";\nimport { BaseLLMParams } from \"../../language_models/llms.js\";\nimport { BaseMessage, AIMessage, AIMessageChunk } from \"../../messages/index.js\";\nimport { type ChatResult, ChatGenerationChunk } from \"../../outputs.js\";\nimport { Runnable } from \"../../runnables/base.js\";\nimport { StructuredTool } from \"../../tools/index.js\";\nimport { StructuredOutputMethodParams, BaseLanguageModelInput, StructuredOutputMethodOptions } from \"../../language_models/base.js\";\nimport { InteropZodType } from \"../types/zod.js\";\n/** Minimal shape actually needed by `bindTools` */\nexport interface ToolSpec {\n name: string;\n description?: string;\n schema: InteropZodType | Record<string, unknown>; // Either a Zod schema *or* a plain JSON-Schema object\n}\n/**\n * Interface specific to the Fake Streaming Chat model.\n */\nexport interface FakeStreamingChatModelCallOptions extends BaseChatModelCallOptions {\n}\n/**\n * Interface for the Constructor-field specific to the Fake Streaming Chat model (all optional because we fill in defaults).\n */\nexport interface FakeStreamingChatModelFields extends BaseChatModelParams {\n /** Milliseconds to pause between fallback char-by-char chunks */\n sleep?: number;\n /** Full AI messages to fall back to when no `chunks` supplied */\n responses?: BaseMessage[];\n /** Exact chunks to emit (can include tool-call deltas) */\n chunks?: AIMessageChunk[];\n /** How tool specs are formatted in `bindTools` */\n toolStyle?: \"openai\" | \"anthropic\" | \"bedrock\" | \"google\";\n /** Throw this error instead of streaming (useful in tests) */\n thrownErrorString?: string;\n}\nexport declare class FakeChatModel extends BaseChatModel {\n _combineLLMOutput(): never[];\n _llmType(): string;\n _generate(messages: BaseMessage[], options?: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n}\nexport declare class FakeStreamingChatModel extends BaseChatModel<FakeStreamingChatModelCallOptions> {\n sleep: number;\n responses: BaseMessage[];\n chunks: AIMessageChunk[];\n toolStyle: \"openai\" | \"anthropic\" | \"bedrock\" | \"google\";\n thrownErrorString?: string;\n private tools;\n constructor({ sleep, responses, chunks, toolStyle, thrownErrorString, ...rest }: FakeStreamingChatModelFields & BaseLLMParams);\n _llmType(): string;\n bindTools(tools: (StructuredTool | ToolSpec)[]): Runnable<BaseLanguageModelInput, AIMessageChunk<import(\"../../messages/message.js\").MessageStructure>, FakeStreamingChatModelCallOptions>;\n _generate(messages: BaseMessage[], _options: this[\"ParsedCallOptions\"], _runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n _streamResponseChunks(_messages: BaseMessage[], _options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;\n}\n/**\n * Interface for the input parameters specific to the Fake List Chat model.\n */\nexport interface FakeChatInput extends BaseChatModelParams {\n /** Responses to return */\n responses: string[];\n /** Time to sleep in milliseconds between responses */\n sleep?: number;\n emitCustomEvent?: boolean;\n}\nexport interface FakeListChatModelCallOptions extends BaseChatModelCallOptions {\n thrownErrorString?: string;\n}\n/**\n * A fake Chat Model that returns a predefined list of responses. It can be used\n * for testing purposes.\n * @example\n * ```typescript\n * const chat = new FakeListChatModel({\n * responses: [\"I'll callback later.\", \"You 'console' them!\"]\n * });\n *\n * const firstMessage = new HumanMessage(\"You want to hear a JavaScript joke?\");\n * const secondMessage = new HumanMessage(\"How do you cheer up a JavaScript developer?\");\n *\n * // Call the chat model with a message and log the response\n * const firstResponse = await chat.call([firstMessage]);\n * console.log({ firstResponse });\n *\n * const secondResponse = await chat.call([secondMessage]);\n * console.log({ secondResponse });\n * ```\n */\nexport declare class FakeListChatModel extends BaseChatModel<FakeListChatModelCallOptions> {\n static lc_name(): string;\n lc_serializable: boolean;\n responses: string[];\n i: number;\n sleep?: number;\n emitCustomEvent: boolean;\n constructor(params: FakeChatInput);\n _combineLLMOutput(): never[];\n _llmType(): string;\n _generate(_messages: BaseMessage[], options?: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n _formatGeneration(text: string): {\n message: AIMessage<import(\"../../messages/message.js\").MessageStructure>;\n text: string;\n };\n _streamResponseChunks(_messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;\n _sleepIfRequested(): Promise<void>;\n _sleep(): Promise<void>;\n _createResponseChunk(text: string): ChatGenerationChunk;\n _currentResponse(): string;\n _incrementResponse(): void;\n withStructuredOutput<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunOutput extends Record<string, any> = Record<string, any>>(_params: StructuredOutputMethodParams<RunOutput, false> | InteropZodType<RunOutput>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunOutput extends Record<string, any> = Record<string, any>>(_params: StructuredOutputMethodParams<RunOutput, true> | InteropZodType<RunOutput>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>, config?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J,SAASG,wBAAwBqB;;;oBAGvFjB,sBAAsBA,8BAA8BL,6BAA6BsB,mBAAmBnB,eAAemB;;IAElIjB,8BAA8BH,sCAAsCJ,SAASG;SACvER;YACG6B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"embeddings.d.cts","names":["Embeddings","EmbeddingsParams","SyntheticEmbeddingsParams","SyntheticEmbeddings","Promise","FakeEmbeddings"],"sources":["../../../src/utils/testing/embeddings.d.ts"],"sourcesContent":["import { Embeddings, EmbeddingsParams } from \"../../embeddings.js\";\n/**\n * An interface that defines additional parameters specific to the\n * SyntheticEmbeddings class.\n */\ninterface SyntheticEmbeddingsParams extends EmbeddingsParams {\n vectorSize: number;\n}\n/**\n * A class that provides synthetic embeddings by overriding the\n * embedDocuments and embedQuery methods to generate embeddings based on\n * the input documents. The embeddings are generated by converting each\n * document into chunks, calculating a numerical value for each chunk, and\n * returning an array of these values as the embedding.\n */\nexport declare class SyntheticEmbeddings extends Embeddings implements SyntheticEmbeddingsParams {\n vectorSize: number;\n constructor(params?: SyntheticEmbeddingsParams);\n /**\n * Generates synthetic embeddings for a list of documents.\n * @param documents List of documents to generate embeddings for.\n * @returns A promise that resolves with a list of synthetic embeddings for each document.\n */\n embedDocuments(documents: string[]): Promise<number[][]>;\n /**\n * Generates a synthetic embedding for a document. The document is\n * converted into chunks, a numerical value is calculated for each chunk,\n * and an array of these values is returned as the embedding.\n * @param document The document to generate an embedding for.\n * @returns A promise that resolves with a synthetic embedding for the document.\n */\n embedQuery(document: string): Promise<number[]>;\n}\n/**\n * A class that provides fake embeddings by overriding the embedDocuments\n * and embedQuery methods to return fixed values.\n */\nexport declare class FakeEmbeddings extends Embeddings {\n constructor(params?: EmbeddingsParams);\n /**\n * Generates fixed embeddings for a list of documents.\n * @param documents List of documents to generate embeddings for.\n * @returns A promise that resolves with a list of fixed embeddings for each document.\n */\n embedDocuments(documents: string[]): Promise<number[][]>;\n /**\n * Generates a fixed embedding for a query.\n * @param _ The query to generate an embedding for.\n * @returns A promise that resolves with a fixed embedding for the query.\n */\n embedQuery(_: string): Promise<number[]>;\n}\nexport {};\n"],"mappings":";;;;;;AAAmE;AAenE;UAVUE,yBAAAA,SAAkCD,gBAUJ,CAAA;EAAA,UAEfC,EAAAA,MAAAA;;;;;AAFuE;AAsBhG;;;AAOyCE,cA7BpBD,mBAAAA,SAA4BH,UAAAA,YAAsBE,yBA6B9BE,CAAAA;EAAO,UAMrBA,EAAAA,MAAAA;EAAO,WAbUJ,CAAAA,MAAAA,CAAAA,EApBnBE,yBAoBmBF;EAAU;;;;;uCAdbI;;;;;;;;gCAQPA;;;;;;cAMbC,cAAAA,SAAuBL,UAAAA;uBACnBC;;;;;;uCAMgBG;;;;;;yBAMdA"}