langgraph-ui-components 0.0.1 → 0.0.2

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 (532) hide show
  1. package/dist/index.es.js +9 -27085
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.es10.js +21 -0
  4. package/dist/index.es10.js.map +1 -0
  5. package/dist/index.es100.js +43 -0
  6. package/dist/index.es100.js.map +1 -0
  7. package/dist/index.es101.js +94 -0
  8. package/dist/index.es101.js.map +1 -0
  9. package/dist/index.es102.js +5 -0
  10. package/dist/index.es102.js.map +1 -0
  11. package/dist/index.es103.js +5 -0
  12. package/dist/index.es103.js.map +1 -0
  13. package/dist/index.es104.js +25 -0
  14. package/dist/index.es104.js.map +1 -0
  15. package/dist/index.es105.js +5 -0
  16. package/dist/index.es105.js.map +1 -0
  17. package/dist/index.es106.js +28 -0
  18. package/dist/index.es106.js.map +1 -0
  19. package/dist/index.es107.js +8 -0
  20. package/dist/index.es107.js.map +1 -0
  21. package/dist/index.es108.js +3 -0
  22. package/dist/index.es108.js.map +1 -0
  23. package/dist/index.es109.js +14 -0
  24. package/dist/index.es109.js.map +1 -0
  25. package/dist/index.es11.js +125 -0
  26. package/dist/index.es11.js.map +1 -0
  27. package/dist/index.es110.js +504 -0
  28. package/dist/index.es110.js.map +1 -0
  29. package/dist/index.es111.js +3 -0
  30. package/dist/index.es111.js.map +1 -0
  31. package/dist/index.es112.js +149 -0
  32. package/dist/index.es112.js.map +1 -0
  33. package/dist/index.es113.js +889 -0
  34. package/dist/index.es113.js.map +1 -0
  35. package/dist/index.es114.js +283 -0
  36. package/dist/index.es114.js.map +1 -0
  37. package/dist/index.es115.js +5 -0
  38. package/dist/index.es115.js.map +1 -0
  39. package/dist/index.es116.js +447 -0
  40. package/dist/index.es116.js.map +1 -0
  41. package/dist/index.es117.js +49 -0
  42. package/dist/index.es117.js.map +1 -0
  43. package/dist/index.es118.js +25 -0
  44. package/dist/index.es118.js.map +1 -0
  45. package/dist/index.es119.js +82 -0
  46. package/dist/index.es119.js.map +1 -0
  47. package/dist/index.es12.js +104 -0
  48. package/dist/index.es12.js.map +1 -0
  49. package/dist/index.es120.js +132 -0
  50. package/dist/index.es120.js.map +1 -0
  51. package/dist/index.es121.js +52 -0
  52. package/dist/index.es121.js.map +1 -0
  53. package/dist/index.es122.js +13 -0
  54. package/dist/index.es122.js.map +1 -0
  55. package/dist/index.es123.js +48 -0
  56. package/dist/index.es123.js.map +1 -0
  57. package/dist/index.es124.js +102 -0
  58. package/dist/index.es124.js.map +1 -0
  59. package/dist/index.es125.js +56 -0
  60. package/dist/index.es125.js.map +1 -0
  61. package/dist/index.es126.js +5 -0
  62. package/dist/index.es126.js.map +1 -0
  63. package/dist/index.es127.js +140 -0
  64. package/dist/index.es127.js.map +1 -0
  65. package/dist/index.es128.js +5 -0
  66. package/dist/index.es128.js.map +1 -0
  67. package/dist/index.es129.js +18 -0
  68. package/dist/index.es129.js.map +1 -0
  69. package/dist/index.es13.js +37 -0
  70. package/dist/index.es13.js.map +1 -0
  71. package/dist/index.es130.js +92 -0
  72. package/dist/index.es130.js.map +1 -0
  73. package/dist/index.es131.js +5 -0
  74. package/dist/index.es131.js.map +1 -0
  75. package/dist/index.es132.js +59 -0
  76. package/dist/index.es132.js.map +1 -0
  77. package/dist/index.es133.js +103 -0
  78. package/dist/index.es133.js.map +1 -0
  79. package/dist/index.es134.js +194 -0
  80. package/dist/index.es134.js.map +1 -0
  81. package/dist/index.es135.js +113 -0
  82. package/dist/index.es135.js.map +1 -0
  83. package/dist/index.es136.js +38 -0
  84. package/dist/index.es136.js.map +1 -0
  85. package/dist/index.es137.js +13 -0
  86. package/dist/index.es137.js.map +1 -0
  87. package/dist/index.es138.js +14 -0
  88. package/dist/index.es138.js.map +1 -0
  89. package/dist/index.es139.js +15 -0
  90. package/dist/index.es139.js.map +1 -0
  91. package/dist/index.es14.js +148 -0
  92. package/dist/index.es14.js.map +1 -0
  93. package/dist/index.es140.js +94 -0
  94. package/dist/index.es140.js.map +1 -0
  95. package/dist/index.es141.js +38 -0
  96. package/dist/index.es141.js.map +1 -0
  97. package/dist/index.es142.js +43 -0
  98. package/dist/index.es142.js.map +1 -0
  99. package/dist/index.es143.js +27 -0
  100. package/dist/index.es143.js.map +1 -0
  101. package/dist/index.es144.js +594 -0
  102. package/dist/index.es144.js.map +1 -0
  103. package/dist/index.es145.js +128 -0
  104. package/dist/index.es145.js.map +1 -0
  105. package/dist/index.es146.js +7 -0
  106. package/dist/index.es146.js.map +1 -0
  107. package/dist/index.es147.js +8 -0
  108. package/dist/index.es147.js.map +1 -0
  109. package/dist/index.es148.js +16 -0
  110. package/dist/index.es148.js.map +1 -0
  111. package/dist/index.es149.js +9 -0
  112. package/dist/index.es149.js.map +1 -0
  113. package/dist/index.es15.js +15 -0
  114. package/dist/index.es15.js.map +1 -0
  115. package/dist/index.es150.js +11 -0
  116. package/dist/index.es150.js.map +1 -0
  117. package/dist/index.es151.js +28 -0
  118. package/dist/index.es151.js.map +1 -0
  119. package/dist/index.es152.js +15 -0
  120. package/dist/index.es152.js.map +1 -0
  121. package/dist/index.es153.js +57 -0
  122. package/dist/index.es153.js.map +1 -0
  123. package/dist/index.es154.js +67 -0
  124. package/dist/index.es154.js.map +1 -0
  125. package/dist/index.es155.js +25 -0
  126. package/dist/index.es155.js.map +1 -0
  127. package/dist/index.es156.js +9 -0
  128. package/dist/index.es156.js.map +1 -0
  129. package/dist/index.es157.js +352 -0
  130. package/dist/index.es157.js.map +1 -0
  131. package/dist/index.es158.js +10 -0
  132. package/dist/index.es158.js.map +1 -0
  133. package/dist/index.es159.js +106 -0
  134. package/dist/index.es159.js.map +1 -0
  135. package/dist/index.es16.js +8 -0
  136. package/dist/index.es16.js.map +1 -0
  137. package/dist/index.es160.js +122 -0
  138. package/dist/index.es160.js.map +1 -0
  139. package/dist/index.es161.js +139 -0
  140. package/dist/index.es161.js.map +1 -0
  141. package/dist/index.es162.js +118 -0
  142. package/dist/index.es162.js.map +1 -0
  143. package/dist/index.es163.js +9 -0
  144. package/dist/index.es163.js.map +1 -0
  145. package/dist/index.es164.js +145 -0
  146. package/dist/index.es164.js.map +1 -0
  147. package/dist/index.es165.js +5 -0
  148. package/dist/index.es165.js.map +1 -0
  149. package/dist/index.es166.js +3685 -0
  150. package/dist/index.es166.js.map +1 -0
  151. package/dist/index.es167.js +345 -0
  152. package/dist/index.es167.js.map +1 -0
  153. package/dist/index.es168.js +112 -0
  154. package/dist/index.es168.js.map +1 -0
  155. package/dist/index.es169.js +136 -0
  156. package/dist/index.es169.js.map +1 -0
  157. package/dist/index.es17.js +36 -0
  158. package/dist/index.es17.js.map +1 -0
  159. package/dist/index.es170.js +18 -0
  160. package/dist/index.es170.js.map +1 -0
  161. package/dist/index.es171.js +155 -0
  162. package/dist/index.es171.js.map +1 -0
  163. package/dist/index.es172.js +18 -0
  164. package/dist/index.es172.js.map +1 -0
  165. package/dist/index.es173.js +11 -0
  166. package/dist/index.es173.js.map +1 -0
  167. package/dist/index.es174.js +24 -0
  168. package/dist/index.es174.js.map +1 -0
  169. package/dist/index.es175.js +93 -0
  170. package/dist/index.es175.js.map +1 -0
  171. package/dist/index.es176.js +27 -0
  172. package/dist/index.es176.js.map +1 -0
  173. package/dist/index.es177.js +9 -0
  174. package/dist/index.es177.js.map +1 -0
  175. package/dist/index.es178.js +7 -0
  176. package/dist/index.es178.js.map +1 -0
  177. package/dist/index.es179.js +21 -0
  178. package/dist/index.es179.js.map +1 -0
  179. package/dist/index.es18.js +126 -0
  180. package/dist/index.es18.js.map +1 -0
  181. package/dist/index.es180.js +35 -0
  182. package/dist/index.es180.js.map +1 -0
  183. package/dist/index.es181.js +9 -0
  184. package/dist/index.es181.js.map +1 -0
  185. package/dist/index.es182.js +109 -0
  186. package/dist/index.es182.js.map +1 -0
  187. package/dist/index.es183.js +16 -0
  188. package/dist/index.es183.js.map +1 -0
  189. package/dist/index.es184.js +21 -0
  190. package/dist/index.es184.js.map +1 -0
  191. package/dist/index.es185.js +34 -0
  192. package/dist/index.es185.js.map +1 -0
  193. package/dist/index.es186.js +7 -0
  194. package/dist/index.es186.js.map +1 -0
  195. package/dist/index.es187.js +8 -0
  196. package/dist/index.es187.js.map +1 -0
  197. package/dist/index.es188.js +8 -0
  198. package/dist/index.es188.js.map +1 -0
  199. package/dist/index.es189.js +40 -0
  200. package/dist/index.es189.js.map +1 -0
  201. package/dist/index.es19.js +41 -0
  202. package/dist/index.es19.js.map +1 -0
  203. package/dist/index.es190.js +11 -0
  204. package/dist/index.es190.js.map +1 -0
  205. package/dist/index.es191.js +9 -0
  206. package/dist/index.es191.js.map +1 -0
  207. package/dist/index.es192.js +10 -0
  208. package/dist/index.es192.js.map +1 -0
  209. package/dist/index.es193.js +45 -0
  210. package/dist/index.es193.js.map +1 -0
  211. package/dist/index.es194.js +16 -0
  212. package/dist/index.es194.js.map +1 -0
  213. package/dist/index.es195.js +245 -0
  214. package/dist/index.es195.js.map +1 -0
  215. package/dist/index.es196.js +54 -0
  216. package/dist/index.es196.js.map +1 -0
  217. package/dist/index.es197.js +38 -0
  218. package/dist/index.es197.js.map +1 -0
  219. package/dist/index.es198.js +16 -0
  220. package/dist/index.es198.js.map +1 -0
  221. package/dist/index.es199.js +11 -0
  222. package/dist/index.es199.js.map +1 -0
  223. package/dist/index.es2.js +142 -0
  224. package/dist/index.es2.js.map +1 -0
  225. package/dist/index.es20.js +46 -0
  226. package/dist/index.es20.js.map +1 -0
  227. package/dist/index.es200.js +10 -0
  228. package/dist/index.es200.js.map +1 -0
  229. package/dist/index.es201.js +68 -0
  230. package/dist/index.es201.js.map +1 -0
  231. package/dist/index.es202.js +44 -0
  232. package/dist/index.es202.js.map +1 -0
  233. package/dist/index.es203.js +35 -0
  234. package/dist/index.es203.js.map +1 -0
  235. package/dist/index.es204.js +65 -0
  236. package/dist/index.es204.js.map +1 -0
  237. package/dist/index.es205.js +18 -0
  238. package/dist/index.es205.js.map +1 -0
  239. package/dist/index.es206.js +26 -0
  240. package/dist/index.es206.js.map +1 -0
  241. package/dist/index.es207.js +8 -0
  242. package/dist/index.es207.js.map +1 -0
  243. package/dist/index.es208.js +20 -0
  244. package/dist/index.es208.js.map +1 -0
  245. package/dist/index.es209.js +36 -0
  246. package/dist/index.es209.js.map +1 -0
  247. package/dist/index.es21.js +21 -0
  248. package/dist/index.es21.js.map +1 -0
  249. package/dist/index.es210.js +8 -0
  250. package/dist/index.es210.js.map +1 -0
  251. package/dist/index.es211.js +8 -0
  252. package/dist/index.es211.js.map +1 -0
  253. package/dist/index.es212.js +8 -0
  254. package/dist/index.es212.js.map +1 -0
  255. package/dist/index.es213.js +11 -0
  256. package/dist/index.es213.js.map +1 -0
  257. package/dist/index.es214.js +95 -0
  258. package/dist/index.es214.js.map +1 -0
  259. package/dist/index.es215.js +21 -0
  260. package/dist/index.es215.js.map +1 -0
  261. package/dist/index.es216.js +765 -0
  262. package/dist/index.es216.js.map +1 -0
  263. package/dist/index.es217.js +69 -0
  264. package/dist/index.es217.js.map +1 -0
  265. package/dist/index.es218.js +177 -0
  266. package/dist/index.es218.js.map +1 -0
  267. package/dist/index.es219.js +41 -0
  268. package/dist/index.es219.js.map +1 -0
  269. package/dist/index.es22.js +76 -0
  270. package/dist/index.es22.js.map +1 -0
  271. package/dist/index.es220.js +140 -0
  272. package/dist/index.es220.js.map +1 -0
  273. package/dist/index.es221.js +96 -0
  274. package/dist/index.es221.js.map +1 -0
  275. package/dist/index.es222.js +36 -0
  276. package/dist/index.es222.js.map +1 -0
  277. package/dist/index.es223.js +288 -0
  278. package/dist/index.es223.js.map +1 -0
  279. package/dist/index.es224.js +29 -0
  280. package/dist/index.es224.js.map +1 -0
  281. package/dist/index.es225.js +27 -0
  282. package/dist/index.es225.js.map +1 -0
  283. package/dist/index.es226.js +18 -0
  284. package/dist/index.es226.js.map +1 -0
  285. package/dist/index.es227.js +18 -0
  286. package/dist/index.es227.js.map +1 -0
  287. package/dist/index.es228.js +29 -0
  288. package/dist/index.es228.js.map +1 -0
  289. package/dist/index.es229.js +49 -0
  290. package/dist/index.es229.js.map +1 -0
  291. package/dist/index.es23.js +34 -0
  292. package/dist/index.es23.js.map +1 -0
  293. package/dist/index.es230.js +15 -0
  294. package/dist/index.es230.js.map +1 -0
  295. package/dist/index.es231.js +15 -0
  296. package/dist/index.es231.js.map +1 -0
  297. package/dist/index.es232.js +15 -0
  298. package/dist/index.es232.js.map +1 -0
  299. package/dist/index.es233.js +18 -0
  300. package/dist/index.es233.js.map +1 -0
  301. package/dist/index.es234.js +15 -0
  302. package/dist/index.es234.js.map +1 -0
  303. package/dist/index.es235.js +15 -0
  304. package/dist/index.es235.js.map +1 -0
  305. package/dist/index.es236.js +15 -0
  306. package/dist/index.es236.js.map +1 -0
  307. package/dist/index.es237.js +19 -0
  308. package/dist/index.es237.js.map +1 -0
  309. package/dist/index.es238.js +15 -0
  310. package/dist/index.es238.js.map +1 -0
  311. package/dist/index.es239.js +15 -0
  312. package/dist/index.es239.js.map +1 -0
  313. package/dist/index.es24.js +97 -0
  314. package/dist/index.es24.js.map +1 -0
  315. package/dist/index.es240.js +15 -0
  316. package/dist/index.es240.js.map +1 -0
  317. package/dist/index.es241.js +15 -0
  318. package/dist/index.es241.js.map +1 -0
  319. package/dist/index.es242.js +15 -0
  320. package/dist/index.es242.js.map +1 -0
  321. package/dist/index.es243.js +15 -0
  322. package/dist/index.es243.js.map +1 -0
  323. package/dist/index.es244.js +15 -0
  324. package/dist/index.es244.js.map +1 -0
  325. package/dist/index.es245.js +15 -0
  326. package/dist/index.es245.js.map +1 -0
  327. package/dist/index.es246.js +60 -0
  328. package/dist/index.es246.js.map +1 -0
  329. package/dist/index.es247.js +53 -0
  330. package/dist/index.es247.js.map +1 -0
  331. package/dist/index.es248.js +123 -0
  332. package/dist/index.es248.js.map +1 -0
  333. package/dist/index.es249.js +388 -0
  334. package/dist/index.es249.js.map +1 -0
  335. package/dist/index.es25.js +74 -0
  336. package/dist/index.es25.js.map +1 -0
  337. package/dist/index.es250.js +22 -0
  338. package/dist/index.es250.js.map +1 -0
  339. package/dist/index.es251.js +15 -0
  340. package/dist/index.es251.js.map +1 -0
  341. package/dist/index.es252.js +35 -0
  342. package/dist/index.es252.js.map +1 -0
  343. package/dist/index.es253.js +35 -0
  344. package/dist/index.es253.js.map +1 -0
  345. package/dist/index.es254.js +66 -0
  346. package/dist/index.es254.js.map +1 -0
  347. package/dist/index.es255.js +21 -0
  348. package/dist/index.es255.js.map +1 -0
  349. package/dist/index.es256.js +81 -0
  350. package/dist/index.es256.js.map +1 -0
  351. package/dist/index.es257.js +15 -0
  352. package/dist/index.es257.js.map +1 -0
  353. package/dist/index.es258.js +15 -0
  354. package/dist/index.es258.js.map +1 -0
  355. package/dist/index.es259.js +19 -0
  356. package/dist/index.es259.js.map +1 -0
  357. package/dist/index.es26.js +180 -0
  358. package/dist/index.es26.js.map +1 -0
  359. package/dist/index.es260.js +56 -0
  360. package/dist/index.es260.js.map +1 -0
  361. package/dist/index.es261.js +170 -0
  362. package/dist/index.es261.js.map +1 -0
  363. package/dist/index.es262.js +5 -0
  364. package/dist/index.es262.js.map +1 -0
  365. package/dist/index.es263.js +14 -0
  366. package/dist/index.es263.js.map +1 -0
  367. package/dist/index.es264.js +23 -0
  368. package/dist/index.es264.js.map +1 -0
  369. package/dist/index.es265.js +42 -0
  370. package/dist/index.es265.js.map +1 -0
  371. package/dist/index.es27.js +16 -0
  372. package/dist/index.es27.js.map +1 -0
  373. package/dist/index.es28.js +441 -0
  374. package/dist/index.es28.js.map +1 -0
  375. package/dist/index.es29.js +122 -0
  376. package/dist/index.es29.js.map +1 -0
  377. package/dist/index.es3.js +30 -0
  378. package/dist/index.es3.js.map +1 -0
  379. package/dist/index.es30.js +77 -0
  380. package/dist/index.es30.js.map +1 -0
  381. package/dist/index.es31.js +15 -0
  382. package/dist/index.es31.js.map +1 -0
  383. package/dist/index.es32.js +262 -0
  384. package/dist/index.es32.js.map +1 -0
  385. package/dist/index.es33.js +47 -0
  386. package/dist/index.es33.js.map +1 -0
  387. package/dist/index.es34.js +215 -0
  388. package/dist/index.es34.js.map +1 -0
  389. package/dist/index.es35.js +71 -0
  390. package/dist/index.es35.js.map +1 -0
  391. package/dist/index.es36.js +146 -0
  392. package/dist/index.es36.js.map +1 -0
  393. package/dist/index.es37.js +28 -0
  394. package/dist/index.es37.js.map +1 -0
  395. package/dist/index.es38.js +228 -0
  396. package/dist/index.es38.js.map +1 -0
  397. package/dist/index.es39.js +13 -0
  398. package/dist/index.es39.js.map +1 -0
  399. package/dist/index.es4.js +30 -0
  400. package/dist/index.es4.js.map +1 -0
  401. package/dist/index.es40.js +1203 -0
  402. package/dist/index.es40.js.map +1 -0
  403. package/dist/index.es41.js +12 -0
  404. package/dist/index.es41.js.map +1 -0
  405. package/dist/index.es42.js +151 -0
  406. package/dist/index.es42.js.map +1 -0
  407. package/dist/index.es43.js +18 -0
  408. package/dist/index.es43.js.map +1 -0
  409. package/dist/index.es44.js +11 -0
  410. package/dist/index.es44.js.map +1 -0
  411. package/dist/index.es45.js +97 -0
  412. package/dist/index.es45.js.map +1 -0
  413. package/dist/index.es46.js +7 -0
  414. package/dist/index.es46.js.map +1 -0
  415. package/dist/index.es47.js +39 -0
  416. package/dist/index.es47.js.map +1 -0
  417. package/dist/index.es48.js +75 -0
  418. package/dist/index.es48.js.map +1 -0
  419. package/dist/index.es49.js +41 -0
  420. package/dist/index.es49.js.map +1 -0
  421. package/dist/index.es5.js +26 -0
  422. package/dist/index.es5.js.map +1 -0
  423. package/dist/index.es50.js +309 -0
  424. package/dist/index.es50.js.map +1 -0
  425. package/dist/index.es51.js +12 -0
  426. package/dist/index.es51.js.map +1 -0
  427. package/dist/index.es52.js +88 -0
  428. package/dist/index.es52.js.map +1 -0
  429. package/dist/index.es53.js +11 -0
  430. package/dist/index.es53.js.map +1 -0
  431. package/dist/index.es54.js +18 -0
  432. package/dist/index.es54.js.map +1 -0
  433. package/dist/index.es55.js +144 -0
  434. package/dist/index.es55.js.map +1 -0
  435. package/dist/index.es56.js +303 -0
  436. package/dist/index.es56.js.map +1 -0
  437. package/dist/index.es57.js +69 -0
  438. package/dist/index.es57.js.map +1 -0
  439. package/dist/index.es58.js +216 -0
  440. package/dist/index.es58.js.map +1 -0
  441. package/dist/index.es59.js +37 -0
  442. package/dist/index.es59.js.map +1 -0
  443. package/dist/index.es6.js +122 -0
  444. package/dist/index.es6.js.map +1 -0
  445. package/dist/index.es60.js +12 -0
  446. package/dist/index.es60.js.map +1 -0
  447. package/dist/index.es61.js +15 -0
  448. package/dist/index.es61.js.map +1 -0
  449. package/dist/index.es62.js +190 -0
  450. package/dist/index.es62.js.map +1 -0
  451. package/dist/index.es63.js +19 -0
  452. package/dist/index.es63.js.map +1 -0
  453. package/dist/index.es64.js +1403 -0
  454. package/dist/index.es64.js.map +1 -0
  455. package/dist/index.es65.js +12 -0
  456. package/dist/index.es65.js.map +1 -0
  457. package/dist/index.es66.js +11 -0
  458. package/dist/index.es66.js.map +1 -0
  459. package/dist/index.es67.js +9 -0
  460. package/dist/index.es67.js.map +1 -0
  461. package/dist/index.es68.js +8 -0
  462. package/dist/index.es68.js.map +1 -0
  463. package/dist/index.es69.js +8 -0
  464. package/dist/index.es69.js.map +1 -0
  465. package/dist/index.es7.js +19 -0
  466. package/dist/index.es7.js.map +1 -0
  467. package/dist/index.es70.js +15 -0
  468. package/dist/index.es70.js.map +1 -0
  469. package/dist/index.es71.js +26 -0
  470. package/dist/index.es71.js.map +1 -0
  471. package/dist/index.es72.js +37 -0
  472. package/dist/index.es72.js.map +1 -0
  473. package/dist/index.es73.js +235 -0
  474. package/dist/index.es73.js.map +1 -0
  475. package/dist/index.es74.js +71 -0
  476. package/dist/index.es74.js.map +1 -0
  477. package/dist/index.es75.js +72 -0
  478. package/dist/index.es75.js.map +1 -0
  479. package/dist/index.es76.js +60 -0
  480. package/dist/index.es76.js.map +1 -0
  481. package/dist/index.es77.js +16 -0
  482. package/dist/index.es77.js.map +1 -0
  483. package/dist/index.es78.js +140 -0
  484. package/dist/index.es78.js.map +1 -0
  485. package/dist/index.es79.js +24 -0
  486. package/dist/index.es79.js.map +1 -0
  487. package/dist/index.es8.js +61 -0
  488. package/dist/index.es8.js.map +1 -0
  489. package/dist/index.es80.js +185 -0
  490. package/dist/index.es80.js.map +1 -0
  491. package/dist/index.es81.js +244 -0
  492. package/dist/index.es81.js.map +1 -0
  493. package/dist/index.es82.js +358 -0
  494. package/dist/index.es82.js.map +1 -0
  495. package/dist/index.es83.js +140 -0
  496. package/dist/index.es83.js.map +1 -0
  497. package/dist/index.es84.js +73 -0
  498. package/dist/index.es84.js.map +1 -0
  499. package/dist/index.es85.js +40 -0
  500. package/dist/index.es85.js.map +1 -0
  501. package/dist/index.es86.js +40 -0
  502. package/dist/index.es86.js.map +1 -0
  503. package/dist/index.es87.js +169 -0
  504. package/dist/index.es87.js.map +1 -0
  505. package/dist/index.es88.js +206 -0
  506. package/dist/index.es88.js.map +1 -0
  507. package/dist/index.es89.js +17 -0
  508. package/dist/index.es89.js.map +1 -0
  509. package/dist/index.es9.js +109 -0
  510. package/dist/index.es9.js.map +1 -0
  511. package/dist/index.es90.js +33 -0
  512. package/dist/index.es90.js.map +1 -0
  513. package/dist/index.es91.js +37 -0
  514. package/dist/index.es91.js.map +1 -0
  515. package/dist/index.es92.js +3160 -0
  516. package/dist/index.es92.js.map +1 -0
  517. package/dist/index.es93.js +84 -0
  518. package/dist/index.es93.js.map +1 -0
  519. package/dist/index.es94.js +5 -0
  520. package/dist/index.es94.js.map +1 -0
  521. package/dist/index.es95.js +13 -0
  522. package/dist/index.es95.js.map +1 -0
  523. package/dist/index.es96.js +278 -0
  524. package/dist/index.es96.js.map +1 -0
  525. package/dist/index.es97.js +5 -0
  526. package/dist/index.es97.js.map +1 -0
  527. package/dist/index.es98.js +167 -0
  528. package/dist/index.es98.js.map +1 -0
  529. package/dist/index.es99.js +54 -0
  530. package/dist/index.es99.js.map +1 -0
  531. package/dist/styles.css +1 -1
  532. package/package.json +12 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es40.js","sources":["../node_modules/.pnpm/@langchain+langgraph-sdk@1.3.1_@langchain+core@1.1.8_openai@6.15.0_zod@4.3.5___react-do_ee578bd802dbc67e2cb737c481ebf63e/node_modules/@langchain/langgraph-sdk/dist/client.js"],"sourcesContent":["import { AsyncCaller } from \"./utils/async_caller.js\";\nimport { getEnvironmentVariable } from \"./utils/env.js\";\nimport { mergeSignals } from \"./utils/signals.js\";\nimport { BytesLineDecoder, SSEDecoder } from \"./utils/sse.js\";\nimport { streamWithRetry } from \"./utils/stream.js\";\n\n//#region src/client.ts\nfunction* iterateHeaders(headers) {\n\tlet iter;\n\tlet shouldClear = false;\n\tif (headers instanceof Headers) {\n\t\tconst entries = [];\n\t\theaders.forEach((value, name) => {\n\t\t\tentries.push([name, value]);\n\t\t});\n\t\titer = entries;\n\t} else if (Array.isArray(headers)) iter = headers;\n\telse {\n\t\tshouldClear = true;\n\t\titer = Object.entries(headers ?? {});\n\t}\n\tfor (const item of iter) {\n\t\tconst name = item[0];\n\t\tif (typeof name !== \"string\") throw new TypeError(`Expected header name to be a string, got ${typeof name}`);\n\t\tconst values = Array.isArray(item[1]) ? item[1] : [item[1]];\n\t\tlet didClear = false;\n\t\tfor (const value of values) {\n\t\t\tif (value === void 0) continue;\n\t\t\tif (shouldClear && !didClear) {\n\t\t\t\tdidClear = true;\n\t\t\t\tyield [name, null];\n\t\t\t}\n\t\t\tyield [name, value];\n\t\t}\n\t}\n}\nfunction mergeHeaders(...headerObjects) {\n\tconst outputHeaders = new Headers();\n\tfor (const headers of headerObjects) {\n\t\tif (!headers) continue;\n\t\tfor (const [name, value] of iterateHeaders(headers)) if (value === null) outputHeaders.delete(name);\n\t\telse outputHeaders.append(name, value);\n\t}\n\tconst headerEntries = [];\n\toutputHeaders.forEach((value, name) => {\n\t\theaderEntries.push([name, value]);\n\t});\n\treturn Object.fromEntries(headerEntries);\n}\n/**\n* Get the API key from the environment.\n* Precedence:\n* 1. explicit argument (if string)\n* 2. LANGGRAPH_API_KEY\n* 3. LANGSMITH_API_KEY\n* 4. LANGCHAIN_API_KEY\n*\n* @param apiKey - API key provided as an argument. If null, skips environment lookup. If undefined, tries environment.\n* @returns The API key if found, otherwise undefined\n*/\nfunction getApiKey(apiKey) {\n\tif (apiKey === null) return void 0;\n\tif (apiKey) return apiKey;\n\tconst prefixes = [\n\t\t\"LANGGRAPH\",\n\t\t\"LANGSMITH\",\n\t\t\"LANGCHAIN\"\n\t];\n\tfor (const prefix of prefixes) {\n\t\tconst envKey = getEnvironmentVariable(`${prefix}_API_KEY`);\n\t\tif (envKey) return envKey.trim().replace(/^[\"']|[\"']$/g, \"\");\n\t}\n\treturn void 0;\n}\nconst REGEX_RUN_METADATA = /(\\/threads\\/(?<thread_id>.+))?\\/runs\\/(?<run_id>.+)/;\nfunction getRunMetadataFromResponse(response) {\n\tconst contentLocation = response.headers.get(\"Content-Location\");\n\tif (!contentLocation) return void 0;\n\tconst match = REGEX_RUN_METADATA.exec(contentLocation);\n\tif (!match?.groups?.run_id) return void 0;\n\treturn {\n\t\trun_id: match.groups.run_id,\n\t\tthread_id: match.groups.thread_id || void 0\n\t};\n}\nvar BaseClient = class {\n\tasyncCaller;\n\ttimeoutMs;\n\tapiUrl;\n\tdefaultHeaders;\n\tonRequest;\n\tconstructor(config) {\n\t\tconst callerOptions = {\n\t\t\tmaxRetries: 4,\n\t\t\tmaxConcurrency: 4,\n\t\t\t...config?.callerOptions\n\t\t};\n\t\tlet defaultApiUrl = \"http://localhost:8123\";\n\t\tif (!config?.apiUrl && typeof globalThis === \"object\" && globalThis != null) {\n\t\t\tconst fetchSmb = Symbol.for(\"langgraph_api:fetch\");\n\t\t\tconst urlSmb = Symbol.for(\"langgraph_api:url\");\n\t\t\tconst global = globalThis;\n\t\t\tif (global[fetchSmb]) callerOptions.fetch ??= global[fetchSmb];\n\t\t\tif (global[urlSmb]) defaultApiUrl = global[urlSmb];\n\t\t}\n\t\tthis.asyncCaller = new AsyncCaller(callerOptions);\n\t\tthis.timeoutMs = config?.timeoutMs;\n\t\tthis.apiUrl = config?.apiUrl?.replace(/\\/$/, \"\") || defaultApiUrl;\n\t\tthis.defaultHeaders = config?.defaultHeaders || {};\n\t\tthis.onRequest = config?.onRequest;\n\t\tconst apiKey = getApiKey(config?.apiKey);\n\t\tif (apiKey) this.defaultHeaders[\"x-api-key\"] = apiKey;\n\t}\n\tprepareFetchOptions(path, options) {\n\t\tconst mutatedOptions = {\n\t\t\t...options,\n\t\t\theaders: mergeHeaders(this.defaultHeaders, options?.headers)\n\t\t};\n\t\tif (mutatedOptions.json) {\n\t\t\tmutatedOptions.body = JSON.stringify(mutatedOptions.json);\n\t\t\tmutatedOptions.headers = mergeHeaders(mutatedOptions.headers, { \"content-type\": \"application/json\" });\n\t\t\tdelete mutatedOptions.json;\n\t\t}\n\t\tif (mutatedOptions.withResponse) delete mutatedOptions.withResponse;\n\t\tlet timeoutSignal = null;\n\t\tif (typeof options?.timeoutMs !== \"undefined\") {\n\t\t\tif (options.timeoutMs != null) timeoutSignal = AbortSignal.timeout(options.timeoutMs);\n\t\t} else if (this.timeoutMs != null) timeoutSignal = AbortSignal.timeout(this.timeoutMs);\n\t\tmutatedOptions.signal = mergeSignals(timeoutSignal, mutatedOptions.signal);\n\t\tconst targetUrl = new URL(`${this.apiUrl}${path}`);\n\t\tif (mutatedOptions.params) {\n\t\t\tfor (const [key, value] of Object.entries(mutatedOptions.params)) {\n\t\t\t\tif (value == null) continue;\n\t\t\t\tconst strValue = typeof value === \"string\" || typeof value === \"number\" ? value.toString() : JSON.stringify(value);\n\t\t\t\ttargetUrl.searchParams.append(key, strValue);\n\t\t\t}\n\t\t\tdelete mutatedOptions.params;\n\t\t}\n\t\treturn [targetUrl, mutatedOptions];\n\t}\n\tasync fetch(path, options) {\n\t\tconst [url, init] = this.prepareFetchOptions(path, options);\n\t\tlet finalInit = init;\n\t\tif (this.onRequest) finalInit = await this.onRequest(url, init);\n\t\tconst response = await this.asyncCaller.fetch(url, finalInit);\n\t\tconst body = (() => {\n\t\t\tif (response.status === 202 || response.status === 204) return void 0;\n\t\t\treturn response.json();\n\t\t})();\n\t\tif (options?.withResponse) return [await body, response];\n\t\treturn body;\n\t}\n\t/**\n\t* Protected helper for streaming with automatic retry logic.\n\t* Handles both initial requests and reconnections with SSE.\n\t*/\n\tasync *streamWithRetry(config) {\n\t\tconst makeRequest = async (reconnectParams) => {\n\t\t\tconst requestEndpoint = reconnectParams?.reconnectPath || config.endpoint;\n\t\t\tconst isReconnect = !!reconnectParams?.lastEventId;\n\t\t\tconst method = isReconnect ? \"GET\" : config.method || \"GET\";\n\t\t\tconst requestHeaders = isReconnect && reconnectParams?.lastEventId ? {\n\t\t\t\t...config.headers,\n\t\t\t\t\"Last-Event-ID\": reconnectParams.lastEventId\n\t\t\t} : config.headers;\n\t\t\tlet [url, init] = this.prepareFetchOptions(requestEndpoint, {\n\t\t\t\tmethod,\n\t\t\t\ttimeoutMs: null,\n\t\t\t\tsignal: config.signal,\n\t\t\t\theaders: requestHeaders,\n\t\t\t\tparams: config.params,\n\t\t\t\tjson: isReconnect ? void 0 : config.json\n\t\t\t});\n\t\t\tif (this.onRequest != null) init = await this.onRequest(url, init);\n\t\t\tconst response = await this.asyncCaller.fetch(url, init);\n\t\t\tif (!isReconnect && config.onInitialResponse) await config.onInitialResponse(response);\n\t\t\tconst stream = (response.body || new ReadableStream({ start: (ctrl) => ctrl.close() })).pipeThrough(BytesLineDecoder()).pipeThrough(SSEDecoder());\n\t\t\treturn {\n\t\t\t\tresponse,\n\t\t\t\tstream\n\t\t\t};\n\t\t};\n\t\tyield* streamWithRetry(makeRequest, {\n\t\t\tmaxRetries: config.maxRetries ?? 5,\n\t\t\tsignal: config.signal,\n\t\t\tonReconnect: config.onReconnect\n\t\t});\n\t}\n};\nvar CronsClient = class extends BaseClient {\n\t/**\n\t*\n\t* @param threadId The ID of the thread.\n\t* @param assistantId Assistant ID to use for this cron job.\n\t* @param payload Payload for creating a cron job.\n\t* @returns The created background run.\n\t*/\n\tasync createForThread(threadId, assistantId, payload) {\n\t\tconst json = {\n\t\t\tschedule: payload?.schedule,\n\t\t\tinput: payload?.input,\n\t\t\tconfig: payload?.config,\n\t\t\tcontext: payload?.context,\n\t\t\tmetadata: payload?.metadata,\n\t\t\tassistant_id: assistantId,\n\t\t\tinterrupt_before: payload?.interruptBefore,\n\t\t\tinterrupt_after: payload?.interruptAfter,\n\t\t\twebhook: payload?.webhook,\n\t\t\tmultitask_strategy: payload?.multitaskStrategy,\n\t\t\tif_not_exists: payload?.ifNotExists,\n\t\t\tcheckpoint_during: payload?.checkpointDuring,\n\t\t\tdurability: payload?.durability\n\t\t};\n\t\treturn this.fetch(`/threads/${threadId}/runs/crons`, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson,\n\t\t\tsignal: payload?.signal\n\t\t});\n\t}\n\t/**\n\t*\n\t* @param assistantId Assistant ID to use for this cron job.\n\t* @param payload Payload for creating a cron job.\n\t* @returns\n\t*/\n\tasync create(assistantId, payload) {\n\t\tconst json = {\n\t\t\tschedule: payload?.schedule,\n\t\t\tinput: payload?.input,\n\t\t\tconfig: payload?.config,\n\t\t\tcontext: payload?.context,\n\t\t\tmetadata: payload?.metadata,\n\t\t\tassistant_id: assistantId,\n\t\t\tinterrupt_before: payload?.interruptBefore,\n\t\t\tinterrupt_after: payload?.interruptAfter,\n\t\t\twebhook: payload?.webhook,\n\t\t\tmultitask_strategy: payload?.multitaskStrategy,\n\t\t\tif_not_exists: payload?.ifNotExists,\n\t\t\tcheckpoint_during: payload?.checkpointDuring,\n\t\t\tdurability: payload?.durability\n\t\t};\n\t\treturn this.fetch(`/runs/crons`, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson,\n\t\t\tsignal: payload?.signal\n\t\t});\n\t}\n\t/**\n\t*\n\t* @param cronId Cron ID of Cron job to delete.\n\t*/\n\tasync delete(cronId, options) {\n\t\tawait this.fetch(`/runs/crons/${cronId}`, {\n\t\t\tmethod: \"DELETE\",\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t*\n\t* @param query Query options.\n\t* @returns List of crons.\n\t*/\n\tasync search(query) {\n\t\treturn this.fetch(\"/runs/crons/search\", {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: {\n\t\t\t\tassistant_id: query?.assistantId ?? void 0,\n\t\t\t\tthread_id: query?.threadId ?? void 0,\n\t\t\t\tlimit: query?.limit ?? 10,\n\t\t\t\toffset: query?.offset ?? 0,\n\t\t\t\tsort_by: query?.sortBy ?? void 0,\n\t\t\t\tsort_order: query?.sortOrder ?? void 0,\n\t\t\t\tselect: query?.select ?? void 0\n\t\t\t},\n\t\t\tsignal: query?.signal\n\t\t});\n\t}\n\t/**\n\t* Count cron jobs matching filters.\n\t*\n\t* @param query.assistantId Assistant ID to filter by.\n\t* @param query.threadId Thread ID to filter by.\n\t* @returns Number of cron jobs matching the criteria.\n\t*/\n\tasync count(query) {\n\t\treturn this.fetch(`/runs/crons/count`, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: {\n\t\t\t\tassistant_id: query?.assistantId ?? void 0,\n\t\t\t\tthread_id: query?.threadId ?? void 0\n\t\t\t},\n\t\t\tsignal: query?.signal\n\t\t});\n\t}\n};\nvar AssistantsClient = class extends BaseClient {\n\t/**\n\t* Get an assistant by ID.\n\t*\n\t* @param assistantId The ID of the assistant.\n\t* @returns Assistant\n\t*/\n\tasync get(assistantId, options) {\n\t\treturn this.fetch(`/assistants/${assistantId}`, { signal: options?.signal });\n\t}\n\t/**\n\t* Get the JSON representation of the graph assigned to a runnable\n\t* @param assistantId The ID of the assistant.\n\t* @param options.xray Whether to include subgraphs in the serialized graph representation. If an integer value is provided, only subgraphs with a depth less than or equal to the value will be included.\n\t* @returns Serialized graph\n\t*/\n\tasync getGraph(assistantId, options) {\n\t\treturn this.fetch(`/assistants/${assistantId}/graph`, {\n\t\t\tparams: { xray: options?.xray },\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Get the state and config schema of the graph assigned to a runnable\n\t* @param assistantId The ID of the assistant.\n\t* @returns Graph schema\n\t*/\n\tasync getSchemas(assistantId, options) {\n\t\treturn this.fetch(`/assistants/${assistantId}/schemas`, { signal: options?.signal });\n\t}\n\t/**\n\t* Get the schemas of an assistant by ID.\n\t*\n\t* @param assistantId The ID of the assistant to get the schema of.\n\t* @param options Additional options for getting subgraphs, such as namespace or recursion extraction.\n\t* @returns The subgraphs of the assistant.\n\t*/\n\tasync getSubgraphs(assistantId, options) {\n\t\tif (options?.namespace) return this.fetch(`/assistants/${assistantId}/subgraphs/${options.namespace}`, {\n\t\t\tparams: { recurse: options?.recurse },\n\t\t\tsignal: options?.signal\n\t\t});\n\t\treturn this.fetch(`/assistants/${assistantId}/subgraphs`, {\n\t\t\tparams: { recurse: options?.recurse },\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Create a new assistant.\n\t* @param payload Payload for creating an assistant.\n\t* @returns The created assistant.\n\t*/\n\tasync create(payload) {\n\t\treturn this.fetch(\"/assistants\", {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: {\n\t\t\t\tgraph_id: payload.graphId,\n\t\t\t\tconfig: payload.config,\n\t\t\t\tcontext: payload.context,\n\t\t\t\tmetadata: payload.metadata,\n\t\t\t\tassistant_id: payload.assistantId,\n\t\t\t\tif_exists: payload.ifExists,\n\t\t\t\tname: payload.name,\n\t\t\t\tdescription: payload.description\n\t\t\t},\n\t\t\tsignal: payload.signal\n\t\t});\n\t}\n\t/**\n\t* Update an assistant.\n\t* @param assistantId ID of the assistant.\n\t* @param payload Payload for updating the assistant.\n\t* @returns The updated assistant.\n\t*/\n\tasync update(assistantId, payload) {\n\t\treturn this.fetch(`/assistants/${assistantId}`, {\n\t\t\tmethod: \"PATCH\",\n\t\t\tjson: {\n\t\t\t\tgraph_id: payload.graphId,\n\t\t\t\tconfig: payload.config,\n\t\t\t\tcontext: payload.context,\n\t\t\t\tmetadata: payload.metadata,\n\t\t\t\tname: payload.name,\n\t\t\t\tdescription: payload.description\n\t\t\t},\n\t\t\tsignal: payload.signal\n\t\t});\n\t}\n\t/**\n\t* Delete an assistant.\n\t*\n\t* @param assistantId ID of the assistant.\n\t*/\n\tasync delete(assistantId, options) {\n\t\treturn this.fetch(`/assistants/${assistantId}`, {\n\t\t\tmethod: \"DELETE\",\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\tasync search(query) {\n\t\tconst json = {\n\t\t\tgraph_id: query?.graphId ?? void 0,\n\t\t\tname: query?.name ?? void 0,\n\t\t\tmetadata: query?.metadata ?? void 0,\n\t\t\tlimit: query?.limit ?? 10,\n\t\t\toffset: query?.offset ?? 0,\n\t\t\tsort_by: query?.sortBy ?? void 0,\n\t\t\tsort_order: query?.sortOrder ?? void 0,\n\t\t\tselect: query?.select ?? void 0\n\t\t};\n\t\tconst [assistants, response] = await this.fetch(\"/assistants/search\", {\n\t\t\tmethod: \"POST\",\n\t\t\tjson,\n\t\t\twithResponse: true,\n\t\t\tsignal: query?.signal\n\t\t});\n\t\tif (query?.includePagination) {\n\t\t\tconst next = response.headers.get(\"X-Pagination-Next\");\n\t\t\treturn {\n\t\t\t\tassistants,\n\t\t\t\tnext\n\t\t\t};\n\t\t}\n\t\treturn assistants;\n\t}\n\t/**\n\t* Count assistants matching filters.\n\t*\n\t* @param query.metadata Metadata to filter by. Exact match for each key/value.\n\t* @param query.graphId Optional graph id to filter by.\n\t* @param query.name Optional name to filter by.\n\t* @returns Number of assistants matching the criteria.\n\t*/\n\tasync count(query) {\n\t\treturn this.fetch(`/assistants/count`, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: {\n\t\t\t\tmetadata: query?.metadata ?? void 0,\n\t\t\t\tgraph_id: query?.graphId ?? void 0,\n\t\t\t\tname: query?.name ?? void 0\n\t\t\t},\n\t\t\tsignal: query?.signal\n\t\t});\n\t}\n\t/**\n\t* List all versions of an assistant.\n\t*\n\t* @param assistantId ID of the assistant.\n\t* @returns List of assistant versions.\n\t*/\n\tasync getVersions(assistantId, payload) {\n\t\treturn this.fetch(`/assistants/${assistantId}/versions`, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: {\n\t\t\t\tmetadata: payload?.metadata ?? void 0,\n\t\t\t\tlimit: payload?.limit ?? 10,\n\t\t\t\toffset: payload?.offset ?? 0\n\t\t\t},\n\t\t\tsignal: payload?.signal\n\t\t});\n\t}\n\t/**\n\t* Change the version of an assistant.\n\t*\n\t* @param assistantId ID of the assistant.\n\t* @param version The version to change to.\n\t* @returns The updated assistant.\n\t*/\n\tasync setLatest(assistantId, version, options) {\n\t\treturn this.fetch(`/assistants/${assistantId}/latest`, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: { version },\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n};\nvar ThreadsClient = class extends BaseClient {\n\t/**\n\t* Get a thread by ID.\n\t*\n\t* @param threadId ID of the thread.\n\t* @returns The thread.\n\t*/\n\tasync get(threadId, options) {\n\t\treturn this.fetch(`/threads/${threadId}`, { signal: options?.signal });\n\t}\n\t/**\n\t* Create a new thread.\n\t*\n\t* @param payload Payload for creating a thread.\n\t* @returns The created thread.\n\t*/\n\tasync create(payload) {\n\t\tconst ttlPayload = typeof payload?.ttl === \"number\" ? {\n\t\t\tttl: payload.ttl,\n\t\t\tstrategy: \"delete\"\n\t\t} : payload?.ttl;\n\t\treturn this.fetch(`/threads`, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: {\n\t\t\t\tmetadata: {\n\t\t\t\t\t...payload?.metadata,\n\t\t\t\t\tgraph_id: payload?.graphId\n\t\t\t\t},\n\t\t\t\tthread_id: payload?.threadId,\n\t\t\t\tif_exists: payload?.ifExists,\n\t\t\t\tsupersteps: payload?.supersteps?.map((s) => ({ updates: s.updates.map((u) => ({\n\t\t\t\t\tvalues: u.values,\n\t\t\t\t\tcommand: u.command,\n\t\t\t\t\tas_node: u.asNode\n\t\t\t\t})) })),\n\t\t\t\tttl: ttlPayload\n\t\t\t},\n\t\t\tsignal: payload?.signal\n\t\t});\n\t}\n\t/**\n\t* Copy an existing thread\n\t* @param threadId ID of the thread to be copied\n\t* @returns Newly copied thread\n\t*/\n\tasync copy(threadId, options) {\n\t\treturn this.fetch(`/threads/${threadId}/copy`, {\n\t\t\tmethod: \"POST\",\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Update a thread.\n\t*\n\t* @param threadId ID of the thread.\n\t* @param payload Payload for updating the thread.\n\t* @returns The updated thread.\n\t*/\n\tasync update(threadId, payload) {\n\t\tconst ttlPayload = typeof payload?.ttl === \"number\" ? {\n\t\t\tttl: payload.ttl,\n\t\t\tstrategy: \"delete\"\n\t\t} : payload?.ttl;\n\t\treturn this.fetch(`/threads/${threadId}`, {\n\t\t\tmethod: \"PATCH\",\n\t\t\tjson: {\n\t\t\t\tmetadata: payload?.metadata,\n\t\t\t\tttl: ttlPayload\n\t\t\t},\n\t\t\tsignal: payload?.signal\n\t\t});\n\t}\n\t/**\n\t* Delete a thread.\n\t*\n\t* @param threadId ID of the thread.\n\t*/\n\tasync delete(threadId, options) {\n\t\treturn this.fetch(`/threads/${threadId}`, {\n\t\t\tmethod: \"DELETE\",\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* List threads\n\t*\n\t* @param query Query options\n\t* @returns List of threads\n\t*/\n\tasync search(query) {\n\t\treturn this.fetch(\"/threads/search\", {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: {\n\t\t\t\tmetadata: query?.metadata ?? void 0,\n\t\t\t\tids: query?.ids ?? void 0,\n\t\t\t\tlimit: query?.limit ?? 10,\n\t\t\t\toffset: query?.offset ?? 0,\n\t\t\t\tstatus: query?.status,\n\t\t\t\tsort_by: query?.sortBy,\n\t\t\t\tsort_order: query?.sortOrder,\n\t\t\t\tselect: query?.select ?? void 0,\n\t\t\t\tvalues: query?.values ?? void 0\n\t\t\t},\n\t\t\tsignal: query?.signal\n\t\t});\n\t}\n\t/**\n\t* Count threads matching filters.\n\t*\n\t* @param query.metadata Thread metadata to filter on.\n\t* @param query.values State values to filter on.\n\t* @param query.status Thread status to filter on.\n\t* @returns Number of threads matching the criteria.\n\t*/\n\tasync count(query) {\n\t\treturn this.fetch(`/threads/count`, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: {\n\t\t\t\tmetadata: query?.metadata ?? void 0,\n\t\t\t\tvalues: query?.values ?? void 0,\n\t\t\t\tstatus: query?.status ?? void 0\n\t\t\t},\n\t\t\tsignal: query?.signal\n\t\t});\n\t}\n\t/**\n\t* Get state for a thread.\n\t*\n\t* @param threadId ID of the thread.\n\t* @returns Thread state.\n\t*/\n\tasync getState(threadId, checkpoint, options) {\n\t\tif (checkpoint != null) {\n\t\t\tif (typeof checkpoint !== \"string\") return this.fetch(`/threads/${threadId}/state/checkpoint`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tjson: {\n\t\t\t\t\tcheckpoint,\n\t\t\t\t\tsubgraphs: options?.subgraphs\n\t\t\t\t},\n\t\t\t\tsignal: options?.signal\n\t\t\t});\n\t\t\treturn this.fetch(`/threads/${threadId}/state/${checkpoint}`, {\n\t\t\t\tparams: { subgraphs: options?.subgraphs },\n\t\t\t\tsignal: options?.signal\n\t\t\t});\n\t\t}\n\t\treturn this.fetch(`/threads/${threadId}/state`, {\n\t\t\tparams: { subgraphs: options?.subgraphs },\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Add state to a thread.\n\t*\n\t* @param threadId The ID of the thread.\n\t* @returns\n\t*/\n\tasync updateState(threadId, options) {\n\t\treturn this.fetch(`/threads/${threadId}/state`, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: {\n\t\t\t\tvalues: options.values,\n\t\t\t\tcheckpoint_id: options.checkpointId,\n\t\t\t\tcheckpoint: options.checkpoint,\n\t\t\t\tas_node: options?.asNode\n\t\t\t},\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Patch the metadata of a thread.\n\t*\n\t* @param threadIdOrConfig Thread ID or config to patch the state of.\n\t* @param metadata Metadata to patch the state with.\n\t*/\n\tasync patchState(threadIdOrConfig, metadata, options) {\n\t\tlet threadId;\n\t\tif (typeof threadIdOrConfig !== \"string\") {\n\t\t\tif (typeof threadIdOrConfig.configurable?.thread_id !== \"string\") throw new Error(\"Thread ID is required when updating state with a config.\");\n\t\t\tthreadId = threadIdOrConfig.configurable.thread_id;\n\t\t} else threadId = threadIdOrConfig;\n\t\treturn this.fetch(`/threads/${threadId}/state`, {\n\t\t\tmethod: \"PATCH\",\n\t\t\tjson: { metadata },\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Get all past states for a thread.\n\t*\n\t* @param threadId ID of the thread.\n\t* @param options Additional options.\n\t* @returns List of thread states.\n\t*/\n\tasync getHistory(threadId, options) {\n\t\treturn this.fetch(`/threads/${threadId}/history`, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: {\n\t\t\t\tlimit: options?.limit ?? 10,\n\t\t\t\tbefore: options?.before,\n\t\t\t\tmetadata: options?.metadata,\n\t\t\t\tcheckpoint: options?.checkpoint\n\t\t\t},\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\tasync *joinStream(threadId, options) {\n\t\tyield* this.streamWithRetry({\n\t\t\tendpoint: `/threads/${threadId}/stream`,\n\t\t\tmethod: \"GET\",\n\t\t\tsignal: options?.signal,\n\t\t\theaders: options?.lastEventId ? { \"Last-Event-ID\": options.lastEventId } : void 0,\n\t\t\tparams: options?.streamMode ? { stream_mode: options.streamMode } : void 0\n\t\t});\n\t}\n};\nvar RunsClient = class extends BaseClient {\n\t/**\n\t* Create a run and stream the results.\n\t*\n\t* @param threadId The ID of the thread.\n\t* @param assistantId Assistant ID to use for this run.\n\t* @param payload Payload for creating a run.\n\t*/\n\tasync *stream(threadId, assistantId, payload) {\n\t\tconst json = {\n\t\t\tinput: payload?.input,\n\t\t\tcommand: payload?.command,\n\t\t\tconfig: payload?.config,\n\t\t\tcontext: payload?.context,\n\t\t\tmetadata: payload?.metadata,\n\t\t\tstream_mode: payload?.streamMode,\n\t\t\tstream_subgraphs: payload?.streamSubgraphs,\n\t\t\tstream_resumable: payload?.streamResumable,\n\t\t\tfeedback_keys: payload?.feedbackKeys,\n\t\t\tassistant_id: assistantId,\n\t\t\tinterrupt_before: payload?.interruptBefore,\n\t\t\tinterrupt_after: payload?.interruptAfter,\n\t\t\tcheckpoint: payload?.checkpoint,\n\t\t\tcheckpoint_id: payload?.checkpointId,\n\t\t\twebhook: payload?.webhook,\n\t\t\tmultitask_strategy: payload?.multitaskStrategy,\n\t\t\ton_completion: payload?.onCompletion,\n\t\t\ton_disconnect: payload?.onDisconnect,\n\t\t\tafter_seconds: payload?.afterSeconds,\n\t\t\tif_not_exists: payload?.ifNotExists,\n\t\t\tcheckpoint_during: payload?.checkpointDuring,\n\t\t\tdurability: payload?.durability\n\t\t};\n\t\tyield* this.streamWithRetry({\n\t\t\tendpoint: threadId == null ? `/runs/stream` : `/threads/${threadId}/runs/stream`,\n\t\t\tmethod: \"POST\",\n\t\t\tjson,\n\t\t\tsignal: payload?.signal,\n\t\t\tonInitialResponse: (response) => {\n\t\t\t\tconst runMetadata = getRunMetadataFromResponse(response);\n\t\t\t\tif (runMetadata) payload?.onRunCreated?.(runMetadata);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Create a run.\n\t*\n\t* @param threadId The ID of the thread.\n\t* @param assistantId Assistant ID to use for this run.\n\t* @param payload Payload for creating a run.\n\t* @returns The created run.\n\t*/\n\tasync create(threadId, assistantId, payload) {\n\t\tconst json = {\n\t\t\tinput: payload?.input,\n\t\t\tcommand: payload?.command,\n\t\t\tconfig: payload?.config,\n\t\t\tcontext: payload?.context,\n\t\t\tmetadata: payload?.metadata,\n\t\t\tstream_mode: payload?.streamMode,\n\t\t\tstream_subgraphs: payload?.streamSubgraphs,\n\t\t\tstream_resumable: payload?.streamResumable,\n\t\t\tassistant_id: assistantId,\n\t\t\tinterrupt_before: payload?.interruptBefore,\n\t\t\tinterrupt_after: payload?.interruptAfter,\n\t\t\twebhook: payload?.webhook,\n\t\t\tcheckpoint: payload?.checkpoint,\n\t\t\tcheckpoint_id: payload?.checkpointId,\n\t\t\tmultitask_strategy: payload?.multitaskStrategy,\n\t\t\tafter_seconds: payload?.afterSeconds,\n\t\t\tif_not_exists: payload?.ifNotExists,\n\t\t\tcheckpoint_during: payload?.checkpointDuring,\n\t\t\tdurability: payload?.durability,\n\t\t\tlangsmith_tracer: payload?._langsmithTracer ? {\n\t\t\t\tproject_name: payload?._langsmithTracer?.projectName,\n\t\t\t\texample_id: payload?._langsmithTracer?.exampleId\n\t\t\t} : void 0\n\t\t};\n\t\tconst endpoint = threadId === null ? \"/runs\" : `/threads/${threadId}/runs`;\n\t\tconst [run, response] = await this.fetch(endpoint, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson,\n\t\t\tsignal: payload?.signal,\n\t\t\twithResponse: true\n\t\t});\n\t\tconst runMetadata = getRunMetadataFromResponse(response);\n\t\tif (runMetadata) payload?.onRunCreated?.(runMetadata);\n\t\treturn run;\n\t}\n\t/**\n\t* Create a batch of stateless background runs.\n\t*\n\t* @param payloads An array of payloads for creating runs.\n\t* @returns An array of created runs.\n\t*/\n\tasync createBatch(payloads, options) {\n\t\tconst filteredPayloads = payloads.map((payload) => ({\n\t\t\t...payload,\n\t\t\tassistant_id: payload.assistantId\n\t\t})).map((payload) => {\n\t\t\treturn Object.fromEntries(Object.entries(payload).filter(([_, v]) => v !== void 0));\n\t\t});\n\t\treturn this.fetch(\"/runs/batch\", {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: filteredPayloads,\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Create a run and wait for it to complete.\n\t*\n\t* @param threadId The ID of the thread.\n\t* @param assistantId Assistant ID to use for this run.\n\t* @param payload Payload for creating a run.\n\t* @returns The last values chunk of the thread.\n\t*/\n\tasync wait(threadId, assistantId, payload) {\n\t\tconst json = {\n\t\t\tinput: payload?.input,\n\t\t\tcommand: payload?.command,\n\t\t\tconfig: payload?.config,\n\t\t\tcontext: payload?.context,\n\t\t\tmetadata: payload?.metadata,\n\t\t\tassistant_id: assistantId,\n\t\t\tinterrupt_before: payload?.interruptBefore,\n\t\t\tinterrupt_after: payload?.interruptAfter,\n\t\t\tcheckpoint: payload?.checkpoint,\n\t\t\tcheckpoint_id: payload?.checkpointId,\n\t\t\twebhook: payload?.webhook,\n\t\t\tmultitask_strategy: payload?.multitaskStrategy,\n\t\t\ton_completion: payload?.onCompletion,\n\t\t\ton_disconnect: payload?.onDisconnect,\n\t\t\tafter_seconds: payload?.afterSeconds,\n\t\t\tif_not_exists: payload?.ifNotExists,\n\t\t\tcheckpoint_during: payload?.checkpointDuring,\n\t\t\tdurability: payload?.durability,\n\t\t\tlangsmith_tracer: payload?._langsmithTracer ? {\n\t\t\t\tproject_name: payload?._langsmithTracer?.projectName,\n\t\t\t\texample_id: payload?._langsmithTracer?.exampleId\n\t\t\t} : void 0\n\t\t};\n\t\tconst endpoint = threadId == null ? `/runs/wait` : `/threads/${threadId}/runs/wait`;\n\t\tconst [run, response] = await this.fetch(endpoint, {\n\t\t\tmethod: \"POST\",\n\t\t\tjson,\n\t\t\ttimeoutMs: null,\n\t\t\tsignal: payload?.signal,\n\t\t\twithResponse: true\n\t\t});\n\t\tconst runMetadata = getRunMetadataFromResponse(response);\n\t\tif (runMetadata) payload?.onRunCreated?.(runMetadata);\n\t\tconst raiseError = payload?.raiseError !== void 0 ? payload.raiseError : true;\n\t\tif (raiseError && \"__error__\" in run && typeof run.__error__ === \"object\" && run.__error__ && \"error\" in run.__error__ && \"message\" in run.__error__) throw new Error(`${run.__error__?.error}: ${run.__error__?.message}`);\n\t\treturn run;\n\t}\n\t/**\n\t* List all runs for a thread.\n\t*\n\t* @param threadId The ID of the thread.\n\t* @param options Filtering and pagination options.\n\t* @returns List of runs.\n\t*/\n\tasync list(threadId, options) {\n\t\treturn this.fetch(`/threads/${threadId}/runs`, {\n\t\t\tparams: {\n\t\t\t\tlimit: options?.limit ?? 10,\n\t\t\t\toffset: options?.offset ?? 0,\n\t\t\t\tstatus: options?.status ?? void 0,\n\t\t\t\tselect: options?.select ?? void 0\n\t\t\t},\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Get a run by ID.\n\t*\n\t* @param threadId The ID of the thread.\n\t* @param runId The ID of the run.\n\t* @returns The run.\n\t*/\n\tasync get(threadId, runId, options) {\n\t\treturn this.fetch(`/threads/${threadId}/runs/${runId}`, { signal: options?.signal });\n\t}\n\t/**\n\t* Cancel a run.\n\t*\n\t* @param threadId The ID of the thread.\n\t* @param runId The ID of the run.\n\t* @param wait Whether to block when canceling\n\t* @param action Action to take when cancelling the run. Possible values are `interrupt` or `rollback`. Default is `interrupt`.\n\t* @returns\n\t*/\n\tasync cancel(threadId, runId, wait = false, action = \"interrupt\", options = {}) {\n\t\treturn this.fetch(`/threads/${threadId}/runs/${runId}/cancel`, {\n\t\t\tmethod: \"POST\",\n\t\t\tparams: {\n\t\t\t\twait: wait ? \"1\" : \"0\",\n\t\t\t\taction\n\t\t\t},\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Block until a run is done.\n\t*\n\t* @param threadId The ID of the thread.\n\t* @param runId The ID of the run.\n\t* @returns\n\t*/\n\tasync join(threadId, runId, options) {\n\t\treturn this.fetch(`/threads/${threadId}/runs/${runId}/join`, {\n\t\t\ttimeoutMs: null,\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Stream output from a run in real-time, until the run is done.\n\t*\n\t* @param threadId The ID of the thread. Can be set to `null` | `undefined` for stateless runs.\n\t* @param runId The ID of the run.\n\t* @param options Additional options for controlling the stream behavior:\n\t* - signal: An AbortSignal that can be used to cancel the stream request\n\t* - lastEventId: The ID of the last event received. Can be used to reconnect to a stream without losing events.\n\t* - cancelOnDisconnect: When true, automatically cancels the run if the client disconnects from the stream\n\t* - streamMode: Controls what types of events to receive from the stream (can be a single mode or array of modes)\n\t* Must be a subset of the stream modes passed when creating the run. Background runs default to having the union of all\n\t* stream modes enabled.\n\t* @returns An async generator yielding stream parts.\n\t*/\n\tasync *joinStream(threadId, runId, options) {\n\t\tconst opts = typeof options === \"object\" && options != null && options instanceof AbortSignal ? { signal: options } : options;\n\t\tyield* this.streamWithRetry({\n\t\t\tendpoint: threadId != null ? `/threads/${threadId}/runs/${runId}/stream` : `/runs/${runId}/stream`,\n\t\t\tmethod: \"GET\",\n\t\t\tsignal: opts?.signal,\n\t\t\theaders: opts?.lastEventId ? { \"Last-Event-ID\": opts.lastEventId } : void 0,\n\t\t\tparams: {\n\t\t\t\tcancel_on_disconnect: opts?.cancelOnDisconnect ? \"1\" : \"0\",\n\t\t\t\tstream_mode: opts?.streamMode\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Delete a run.\n\t*\n\t* @param threadId The ID of the thread.\n\t* @param runId The ID of the run.\n\t* @returns\n\t*/\n\tasync delete(threadId, runId, options) {\n\t\treturn this.fetch(`/threads/${threadId}/runs/${runId}`, {\n\t\t\tmethod: \"DELETE\",\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n};\nvar StoreClient = class extends BaseClient {\n\t/**\n\t* Store or update an item.\n\t*\n\t* @param namespace A list of strings representing the namespace path.\n\t* @param key The unique identifier for the item within the namespace.\n\t* @param value A dictionary containing the item's data.\n\t* @param options.index Controls search indexing - null (use defaults), false (disable), or list of field paths to index.\n\t* @param options.ttl Optional time-to-live in minutes for the item, or null for no expiration.\n\t* @returns Promise<void>\n\t*\n\t* @example\n\t* ```typescript\n\t* await client.store.putItem(\n\t* [\"documents\", \"user123\"],\n\t* \"item456\",\n\t* { title: \"My Document\", content: \"Hello World\" },\n\t* { ttl: 60 } // expires in 60 minutes\n\t* );\n\t* ```\n\t*/\n\tasync putItem(namespace, key, value, options) {\n\t\tnamespace.forEach((label) => {\n\t\t\tif (label.includes(\".\")) throw new Error(`Invalid namespace label '${label}'. Namespace labels cannot contain periods ('.')`);\n\t\t});\n\t\tconst payload = {\n\t\t\tnamespace,\n\t\t\tkey,\n\t\t\tvalue,\n\t\t\tindex: options?.index,\n\t\t\tttl: options?.ttl\n\t\t};\n\t\treturn this.fetch(\"/store/items\", {\n\t\t\tmethod: \"PUT\",\n\t\t\tjson: payload,\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Retrieve a single item.\n\t*\n\t* @param namespace A list of strings representing the namespace path.\n\t* @param key The unique identifier for the item.\n\t* @param options.refreshTtl Whether to refresh the TTL on this read operation. If null, uses the store's default behavior.\n\t* @returns Promise<Item>\n\t*\n\t* @example\n\t* ```typescript\n\t* const item = await client.store.getItem(\n\t* [\"documents\", \"user123\"],\n\t* \"item456\",\n\t* { refreshTtl: true }\n\t* );\n\t* console.log(item);\n\t* // {\n\t* // namespace: [\"documents\", \"user123\"],\n\t* // key: \"item456\",\n\t* // value: { title: \"My Document\", content: \"Hello World\" },\n\t* // createdAt: \"2024-07-30T12:00:00Z\",\n\t* // updatedAt: \"2024-07-30T12:00:00Z\"\n\t* // }\n\t* ```\n\t*/\n\tasync getItem(namespace, key, options) {\n\t\tnamespace.forEach((label) => {\n\t\t\tif (label.includes(\".\")) throw new Error(`Invalid namespace label '${label}'. Namespace labels cannot contain periods ('.')`);\n\t\t});\n\t\tconst params = {\n\t\t\tnamespace: namespace.join(\".\"),\n\t\t\tkey\n\t\t};\n\t\tif (options?.refreshTtl !== void 0) params.refresh_ttl = options.refreshTtl;\n\t\tconst response = await this.fetch(\"/store/items\", {\n\t\t\tparams,\n\t\t\tsignal: options?.signal\n\t\t});\n\t\treturn response ? {\n\t\t\t...response,\n\t\t\tcreatedAt: response.created_at,\n\t\t\tupdatedAt: response.updated_at\n\t\t} : null;\n\t}\n\t/**\n\t* Delete an item.\n\t*\n\t* @param namespace A list of strings representing the namespace path.\n\t* @param key The unique identifier for the item.\n\t* @returns Promise<void>\n\t*/\n\tasync deleteItem(namespace, key, options) {\n\t\tnamespace.forEach((label) => {\n\t\t\tif (label.includes(\".\")) throw new Error(`Invalid namespace label '${label}'. Namespace labels cannot contain periods ('.')`);\n\t\t});\n\t\treturn this.fetch(\"/store/items\", {\n\t\t\tmethod: \"DELETE\",\n\t\t\tjson: {\n\t\t\t\tnamespace,\n\t\t\t\tkey\n\t\t\t},\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n\t/**\n\t* Search for items within a namespace prefix.\n\t*\n\t* @param namespacePrefix List of strings representing the namespace prefix.\n\t* @param options.filter Optional dictionary of key-value pairs to filter results.\n\t* @param options.limit Maximum number of items to return (default is 10).\n\t* @param options.offset Number of items to skip before returning results (default is 0).\n\t* @param options.query Optional search query.\n\t* @param options.refreshTtl Whether to refresh the TTL on items returned by this search. If null, uses the store's default behavior.\n\t* @returns Promise<SearchItemsResponse>\n\t*\n\t* @example\n\t* ```typescript\n\t* const results = await client.store.searchItems(\n\t* [\"documents\"],\n\t* {\n\t* filter: { author: \"John Doe\" },\n\t* limit: 5,\n\t* refreshTtl: true\n\t* }\n\t* );\n\t* console.log(results);\n\t* // {\n\t* // items: [\n\t* // {\n\t* // namespace: [\"documents\", \"user123\"],\n\t* // key: \"item789\",\n\t* // value: { title: \"Another Document\", author: \"John Doe\" },\n\t* // createdAt: \"2024-07-30T12:00:00Z\",\n\t* // updatedAt: \"2024-07-30T12:00:00Z\"\n\t* // },\n\t* // // ... additional items ...\n\t* // ]\n\t* // }\n\t* ```\n\t*/\n\tasync searchItems(namespacePrefix, options) {\n\t\tconst payload = {\n\t\t\tnamespace_prefix: namespacePrefix,\n\t\t\tfilter: options?.filter,\n\t\t\tlimit: options?.limit ?? 10,\n\t\t\toffset: options?.offset ?? 0,\n\t\t\tquery: options?.query,\n\t\t\trefresh_ttl: options?.refreshTtl\n\t\t};\n\t\tconst response = await this.fetch(\"/store/items/search\", {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: payload,\n\t\t\tsignal: options?.signal\n\t\t});\n\t\treturn { items: response.items.map((item) => ({\n\t\t\t...item,\n\t\t\tcreatedAt: item.created_at,\n\t\t\tupdatedAt: item.updated_at\n\t\t})) };\n\t}\n\t/**\n\t* List namespaces with optional match conditions.\n\t*\n\t* @param options.prefix Optional list of strings representing the prefix to filter namespaces.\n\t* @param options.suffix Optional list of strings representing the suffix to filter namespaces.\n\t* @param options.maxDepth Optional integer specifying the maximum depth of namespaces to return.\n\t* @param options.limit Maximum number of namespaces to return (default is 100).\n\t* @param options.offset Number of namespaces to skip before returning results (default is 0).\n\t* @returns Promise<ListNamespaceResponse>\n\t*/\n\tasync listNamespaces(options) {\n\t\tconst payload = {\n\t\t\tprefix: options?.prefix,\n\t\t\tsuffix: options?.suffix,\n\t\t\tmax_depth: options?.maxDepth,\n\t\t\tlimit: options?.limit ?? 100,\n\t\t\toffset: options?.offset ?? 0\n\t\t};\n\t\treturn this.fetch(\"/store/namespaces\", {\n\t\t\tmethod: \"POST\",\n\t\t\tjson: payload,\n\t\t\tsignal: options?.signal\n\t\t});\n\t}\n};\nvar UiClient = class UiClient extends BaseClient {\n\tstatic promiseCache = {};\n\tstatic getOrCached(key, fn) {\n\t\tif (UiClient.promiseCache[key] != null) return UiClient.promiseCache[key];\n\t\tconst promise = fn();\n\t\tUiClient.promiseCache[key] = promise;\n\t\treturn promise;\n\t}\n\tasync getComponent(assistantId, agentName) {\n\t\treturn UiClient.getOrCached(`${this.apiUrl}-${assistantId}-${agentName}`, async () => {\n\t\t\tlet [url, init] = this.prepareFetchOptions(`/ui/${assistantId}`, {\n\t\t\t\theaders: {\n\t\t\t\t\tAccept: \"text/html\",\n\t\t\t\t\t\"Content-Type\": \"application/json\"\n\t\t\t\t},\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tjson: { name: agentName }\n\t\t\t});\n\t\t\tif (this.onRequest != null) init = await this.onRequest(url, init);\n\t\t\tconst response = await this.asyncCaller.fetch(url, init);\n\t\t\treturn response.text();\n\t\t});\n\t}\n};\nvar Client = class {\n\t/**\n\t* The client for interacting with assistants.\n\t*/\n\tassistants;\n\t/**\n\t* The client for interacting with threads.\n\t*/\n\tthreads;\n\t/**\n\t* The client for interacting with runs.\n\t*/\n\truns;\n\t/**\n\t* The client for interacting with cron runs.\n\t*/\n\tcrons;\n\t/**\n\t* The client for interacting with the KV store.\n\t*/\n\tstore;\n\t/**\n\t* The client for interacting with the UI.\n\t* @internal Used by LoadExternalComponent and the API might change in the future.\n\t*/\n\t\"~ui\";\n\t/**\n\t* @internal Used to obtain a stable key representing the client.\n\t*/\n\t\"~configHash\";\n\tconstructor(config) {\n\t\tthis[\"~configHash\"] = (() => JSON.stringify({\n\t\t\tapiUrl: config?.apiUrl,\n\t\t\tapiKey: config?.apiKey,\n\t\t\ttimeoutMs: config?.timeoutMs,\n\t\t\tdefaultHeaders: config?.defaultHeaders,\n\t\t\tmaxConcurrency: config?.callerOptions?.maxConcurrency,\n\t\t\tmaxRetries: config?.callerOptions?.maxRetries,\n\t\t\tcallbacks: {\n\t\t\t\tonFailedResponseHook: config?.callerOptions?.onFailedResponseHook != null,\n\t\t\t\tonRequest: config?.onRequest != null,\n\t\t\t\tfetch: config?.callerOptions?.fetch != null\n\t\t\t}\n\t\t}))();\n\t\tthis.assistants = new AssistantsClient(config);\n\t\tthis.threads = new ThreadsClient(config);\n\t\tthis.runs = new RunsClient(config);\n\t\tthis.crons = new CronsClient(config);\n\t\tthis.store = new StoreClient(config);\n\t\tthis[\"~ui\"] = new UiClient(config);\n\t}\n};\n/**\n* @internal Used to obtain a stable key representing the client.\n*/\nfunction getClientConfigHash(client) {\n\treturn client[\"~configHash\"];\n}\n\n//#endregion\nexport { AssistantsClient, Client, CronsClient, RunsClient, StoreClient, ThreadsClient, getApiKey, getClientConfigHash };\n//# sourceMappingURL=client.js.map"],"names":["UiClient"],"mappings":";;;;;AAOA,UAAU,eAAe,SAAS;AACjC,MAAI;AACJ,MAAI,cAAc;AAClB,MAAI,mBAAmB,SAAS;AAC/B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AAS,MAAM;AAAA;AAAA;AAAA;AAAA,EAIlB;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA,EACA,YAAY,QAAQ;AACnB,SAAK,aAAa,KAAK,MAAM,KAAK,UAAU;AAAA,MAC3C,QAAQ,QAAQ;AAAA,MAChB,QAAQ,QAAQ;AAAA,MAChB,WAAW,QAAQ;AAAA,MACnB,gBAAgB,QAAQ;AAAA,MACxB,gBAAgB,QAAQ,eAAe;AAAA,MACvC,YAAY,QAAQ,eAAe;AAAA,MACnC,WAAW;AAAA,QACV,sBAAsB,QAAQ,eAAe,wBAAwB;AAAA,QACrE,WAAW,QAAQ,aAAa;AAAA,QAChC,OAAO,QAAQ,eAAe,SAAS;AAAA,MAC3C;AAAA,IACA,CAAG,GAAC;AACF,SAAK,aAAa,IAAI,iBAAiB,MAAM;AAC7C,SAAK,UAAU,IAAI,cAAc,MAAM;AACvC,SAAK,OAAO,IAAI,WAAW,MAAM;AACjC,SAAK,QAAQ,IAAI,YAAY,MAAM;AACnC,SAAK,QAAQ,IAAI,YAAY,MAAM;AACnC,SAAK,KAAK,IAAI,IAAI,SAAS,MAAM;AAAA,EAClC;AACD;AAIA,SAAS,oBAAoB,QAAQ;AACpC,SAAO,OAAO,aAAa;AAC5B;","x_google_ignoreList":[0]}
@@ -0,0 +1,12 @@
1
+ function unique(array) {
2
+ return [...new Set(array)];
3
+ }
4
+ function findLast(array, predicate) {
5
+ for (let i = array.length - 1; i >= 0; i -= 1) if (predicate(array[i])) return array[i];
6
+ return void 0;
7
+ }
8
+ export {
9
+ findLast,
10
+ unique
11
+ };
12
+ //# sourceMappingURL=index.es41.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es41.js","sources":["../node_modules/.pnpm/@langchain+langgraph-sdk@1.3.1_@langchain+core@1.1.8_openai@6.15.0_zod@4.3.5___react-do_ee578bd802dbc67e2cb737c481ebf63e/node_modules/@langchain/langgraph-sdk/dist/ui/utils.js"],"sourcesContent":["//#region src/ui/utils.ts\nfunction unique(array) {\n\treturn [...new Set(array)];\n}\nfunction findLast(array, predicate) {\n\tfor (let i = array.length - 1; i >= 0; i -= 1) if (predicate(array[i])) return array[i];\n\treturn void 0;\n}\n\n//#endregion\nexport { findLast, unique };\n//# sourceMappingURL=utils.js.map"],"names":[],"mappings":"AACA,SAAS,OAAO,OAAO;AACtB,SAAO,CAAC,GAAG,IAAI,IAAI,KAAK,CAAC;AAC1B;AACA,SAAS,SAAS,OAAO,WAAW;AACnC,WAAS,IAAI,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,EAAG,KAAI,UAAU,MAAM,CAAC,CAAC,EAAG,QAAO,MAAM,CAAC;AACtF,SAAO;AACR;","x_google_ignoreList":[0]}
@@ -0,0 +1,151 @@
1
+ function getBranchSequence(history) {
2
+ const nodeIds = /* @__PURE__ */ new Set();
3
+ const childrenMap = {};
4
+ if (history.length <= 1) return {
5
+ rootSequence: {
6
+ type: "sequence",
7
+ items: history.map((value) => ({
8
+ type: "node",
9
+ value,
10
+ path: []
11
+ }))
12
+ },
13
+ paths: []
14
+ };
15
+ history.forEach((state) => {
16
+ const checkpointId = state.parent_checkpoint?.checkpoint_id ?? "$";
17
+ childrenMap[checkpointId] ??= [];
18
+ childrenMap[checkpointId].push(state);
19
+ if (state.checkpoint?.checkpoint_id != null) nodeIds.add(state.checkpoint.checkpoint_id);
20
+ });
21
+ const maxId = (...ids) => ids.filter((i) => i != null).sort((a, b) => a.localeCompare(b)).at(-1);
22
+ const lastOrphanedNode = childrenMap.$ == null ? Object.keys(childrenMap).filter((parentId) => !nodeIds.has(parentId)).map((parentId) => {
23
+ const queue$1 = [parentId];
24
+ const seen = /* @__PURE__ */ new Set();
25
+ let lastId = parentId;
26
+ while (queue$1.length > 0) {
27
+ const current = queue$1.shift();
28
+ if (seen.has(current)) continue;
29
+ seen.add(current);
30
+ const children = (childrenMap[current] ?? []).flatMap((i) => i.checkpoint?.checkpoint_id ?? []);
31
+ lastId = maxId(lastId, ...children);
32
+ queue$1.push(...children);
33
+ }
34
+ return {
35
+ parentId,
36
+ lastId
37
+ };
38
+ }).sort((a, b) => a.lastId.localeCompare(b.lastId)).at(-1)?.parentId : void 0;
39
+ if (lastOrphanedNode != null) childrenMap.$ = childrenMap[lastOrphanedNode];
40
+ const rootSequence = {
41
+ type: "sequence",
42
+ items: []
43
+ };
44
+ const queue = [{
45
+ id: "$",
46
+ sequence: rootSequence,
47
+ path: []
48
+ }];
49
+ const paths = [];
50
+ const visited = /* @__PURE__ */ new Set();
51
+ while (queue.length > 0) {
52
+ const task = queue.shift();
53
+ if (visited.has(task.id)) continue;
54
+ visited.add(task.id);
55
+ const children = childrenMap[task.id];
56
+ if (children == null || children.length === 0) continue;
57
+ let fork;
58
+ if (children.length > 1) {
59
+ fork = {
60
+ type: "fork",
61
+ items: []
62
+ };
63
+ task.sequence.items.push(fork);
64
+ }
65
+ for (const value of children) {
66
+ const id = value.checkpoint?.checkpoint_id;
67
+ if (id == null) continue;
68
+ let { sequence } = task;
69
+ let { path } = task;
70
+ if (fork != null) {
71
+ sequence = {
72
+ type: "sequence",
73
+ items: []
74
+ };
75
+ fork.items.unshift(sequence);
76
+ path = path.slice();
77
+ path.push(id);
78
+ paths.push(path);
79
+ }
80
+ sequence.items.push({
81
+ type: "node",
82
+ value,
83
+ path
84
+ });
85
+ queue.push({
86
+ id,
87
+ sequence,
88
+ path
89
+ });
90
+ }
91
+ }
92
+ return {
93
+ rootSequence,
94
+ paths
95
+ };
96
+ }
97
+ const PATH_SEP = ">";
98
+ const ROOT_ID = "$";
99
+ function getBranchView(sequence, paths, branch) {
100
+ const path = branch.split(PATH_SEP);
101
+ const pathMap = {};
102
+ for (const path$1 of paths) {
103
+ const parent = path$1.at(-2) ?? ROOT_ID;
104
+ pathMap[parent] ??= [];
105
+ pathMap[parent].unshift(path$1);
106
+ }
107
+ const history = [];
108
+ const branchByCheckpoint = {};
109
+ const forkStack = path.slice();
110
+ const queue = [...sequence.items];
111
+ while (queue.length > 0) {
112
+ const item = queue.shift();
113
+ if (item.type === "node") {
114
+ history.push(item.value);
115
+ const checkpointId = item.value.checkpoint?.checkpoint_id;
116
+ if (checkpointId == null) continue;
117
+ branchByCheckpoint[checkpointId] = {
118
+ branch: item.path.join(PATH_SEP),
119
+ branchOptions: (item.path.length > 0 ? pathMap[item.path.at(-2) ?? ROOT_ID] ?? [] : []).map((p) => p.join(PATH_SEP))
120
+ };
121
+ }
122
+ if (item.type === "fork") {
123
+ const forkId = forkStack.shift();
124
+ const index = forkId != null ? item.items.findIndex((value) => {
125
+ const firstItem = value.items.at(0);
126
+ if (!firstItem || firstItem.type !== "node") return false;
127
+ return firstItem.value.checkpoint?.checkpoint_id === forkId;
128
+ }) : -1;
129
+ const nextItems = item.items.at(index)?.items ?? [];
130
+ queue.push(...nextItems);
131
+ }
132
+ }
133
+ return {
134
+ history,
135
+ branchByCheckpoint
136
+ };
137
+ }
138
+ function getBranchContext(branch, history) {
139
+ const { rootSequence: branchTree, paths } = getBranchSequence(history ?? []);
140
+ const { history: flatHistory, branchByCheckpoint } = getBranchView(branchTree, paths, branch);
141
+ return {
142
+ branchTree,
143
+ flatHistory,
144
+ branchByCheckpoint,
145
+ threadHead: flatHistory.at(-1)
146
+ };
147
+ }
148
+ export {
149
+ getBranchContext
150
+ };
151
+ //# sourceMappingURL=index.es42.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es42.js","sources":["../node_modules/.pnpm/@langchain+langgraph-sdk@1.3.1_@langchain+core@1.1.8_openai@6.15.0_zod@4.3.5___react-do_ee578bd802dbc67e2cb737c481ebf63e/node_modules/@langchain/langgraph-sdk/dist/ui/branching.js"],"sourcesContent":["//#region src/ui/branching.ts\nfunction getBranchSequence(history) {\n\tconst nodeIds = /* @__PURE__ */ new Set();\n\tconst childrenMap = {};\n\tif (history.length <= 1) return {\n\t\trootSequence: {\n\t\t\ttype: \"sequence\",\n\t\t\titems: history.map((value) => ({\n\t\t\t\ttype: \"node\",\n\t\t\t\tvalue,\n\t\t\t\tpath: []\n\t\t\t}))\n\t\t},\n\t\tpaths: []\n\t};\n\thistory.forEach((state) => {\n\t\tconst checkpointId = state.parent_checkpoint?.checkpoint_id ?? \"$\";\n\t\tchildrenMap[checkpointId] ??= [];\n\t\tchildrenMap[checkpointId].push(state);\n\t\tif (state.checkpoint?.checkpoint_id != null) nodeIds.add(state.checkpoint.checkpoint_id);\n\t});\n\tconst maxId = (...ids) => ids.filter((i) => i != null).sort((a, b) => a.localeCompare(b)).at(-1);\n\tconst lastOrphanedNode = childrenMap.$ == null ? Object.keys(childrenMap).filter((parentId) => !nodeIds.has(parentId)).map((parentId) => {\n\t\tconst queue$1 = [parentId];\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\tlet lastId = parentId;\n\t\twhile (queue$1.length > 0) {\n\t\t\tconst current = queue$1.shift();\n\t\t\tif (seen.has(current)) continue;\n\t\t\tseen.add(current);\n\t\t\tconst children = (childrenMap[current] ?? []).flatMap((i) => i.checkpoint?.checkpoint_id ?? []);\n\t\t\tlastId = maxId(lastId, ...children);\n\t\t\tqueue$1.push(...children);\n\t\t}\n\t\treturn {\n\t\t\tparentId,\n\t\t\tlastId\n\t\t};\n\t}).sort((a, b) => a.lastId.localeCompare(b.lastId)).at(-1)?.parentId : void 0;\n\tif (lastOrphanedNode != null) childrenMap.$ = childrenMap[lastOrphanedNode];\n\tconst rootSequence = {\n\t\ttype: \"sequence\",\n\t\titems: []\n\t};\n\tconst queue = [{\n\t\tid: \"$\",\n\t\tsequence: rootSequence,\n\t\tpath: []\n\t}];\n\tconst paths = [];\n\tconst visited = /* @__PURE__ */ new Set();\n\twhile (queue.length > 0) {\n\t\tconst task = queue.shift();\n\t\tif (visited.has(task.id)) continue;\n\t\tvisited.add(task.id);\n\t\tconst children = childrenMap[task.id];\n\t\tif (children == null || children.length === 0) continue;\n\t\tlet fork;\n\t\tif (children.length > 1) {\n\t\t\tfork = {\n\t\t\t\ttype: \"fork\",\n\t\t\t\titems: []\n\t\t\t};\n\t\t\ttask.sequence.items.push(fork);\n\t\t}\n\t\tfor (const value of children) {\n\t\t\tconst id = value.checkpoint?.checkpoint_id;\n\t\t\tif (id == null) continue;\n\t\t\tlet { sequence } = task;\n\t\t\tlet { path } = task;\n\t\t\tif (fork != null) {\n\t\t\t\tsequence = {\n\t\t\t\t\ttype: \"sequence\",\n\t\t\t\t\titems: []\n\t\t\t\t};\n\t\t\t\tfork.items.unshift(sequence);\n\t\t\t\tpath = path.slice();\n\t\t\t\tpath.push(id);\n\t\t\t\tpaths.push(path);\n\t\t\t}\n\t\t\tsequence.items.push({\n\t\t\t\ttype: \"node\",\n\t\t\t\tvalue,\n\t\t\t\tpath\n\t\t\t});\n\t\t\tqueue.push({\n\t\t\t\tid,\n\t\t\t\tsequence,\n\t\t\t\tpath\n\t\t\t});\n\t\t}\n\t}\n\treturn {\n\t\trootSequence,\n\t\tpaths\n\t};\n}\nconst PATH_SEP = \">\";\nconst ROOT_ID = \"$\";\nfunction getBranchView(sequence, paths, branch) {\n\tconst path = branch.split(PATH_SEP);\n\tconst pathMap = {};\n\tfor (const path$1 of paths) {\n\t\tconst parent = path$1.at(-2) ?? ROOT_ID;\n\t\tpathMap[parent] ??= [];\n\t\tpathMap[parent].unshift(path$1);\n\t}\n\tconst history = [];\n\tconst branchByCheckpoint = {};\n\tconst forkStack = path.slice();\n\tconst queue = [...sequence.items];\n\twhile (queue.length > 0) {\n\t\tconst item = queue.shift();\n\t\tif (item.type === \"node\") {\n\t\t\thistory.push(item.value);\n\t\t\tconst checkpointId = item.value.checkpoint?.checkpoint_id;\n\t\t\tif (checkpointId == null) continue;\n\t\t\tbranchByCheckpoint[checkpointId] = {\n\t\t\t\tbranch: item.path.join(PATH_SEP),\n\t\t\t\tbranchOptions: (item.path.length > 0 ? pathMap[item.path.at(-2) ?? ROOT_ID] ?? [] : []).map((p) => p.join(PATH_SEP))\n\t\t\t};\n\t\t}\n\t\tif (item.type === \"fork\") {\n\t\t\tconst forkId = forkStack.shift();\n\t\t\tconst index = forkId != null ? item.items.findIndex((value) => {\n\t\t\t\tconst firstItem = value.items.at(0);\n\t\t\t\tif (!firstItem || firstItem.type !== \"node\") return false;\n\t\t\t\treturn firstItem.value.checkpoint?.checkpoint_id === forkId;\n\t\t\t}) : -1;\n\t\t\tconst nextItems = item.items.at(index)?.items ?? [];\n\t\t\tqueue.push(...nextItems);\n\t\t}\n\t}\n\treturn {\n\t\thistory,\n\t\tbranchByCheckpoint\n\t};\n}\nfunction getBranchContext(branch, history) {\n\tconst { rootSequence: branchTree, paths } = getBranchSequence(history ?? []);\n\tconst { history: flatHistory, branchByCheckpoint } = getBranchView(branchTree, paths, branch);\n\treturn {\n\t\tbranchTree,\n\t\tflatHistory,\n\t\tbranchByCheckpoint,\n\t\tthreadHead: flatHistory.at(-1)\n\t};\n}\n\n//#endregion\nexport { getBranchContext };\n//# sourceMappingURL=branching.js.map"],"names":[],"mappings":"AACA,SAAS,kBAAkB,SAAS;AACnC,QAAM,UAA0B,oBAAI,IAAG;AACvC,QAAM,cAAc,CAAA;AACpB,MAAI,QAAQ,UAAU,EAAG,QAAO;AAAA,IAC/B,cAAc;AAAA,MACb,MAAM;AAAA,MACN,OAAO,QAAQ,IAAI,CAAC,WAAW;AAAA,QAC9B,MAAM;AAAA,QACN;AAAA,QACA,MAAM,CAAA;AAAA,MACV,EAAK;AAAA,IACL;AAAA,IACE,OAAO,CAAA;AAAA,EACT;AACC,UAAQ,QAAQ,CAAC,UAAU;AAC1B,UAAM,eAAe,MAAM,mBAAmB,iBAAiB;AAC/D,gBAAY,YAAY,MAAM,CAAA;AAC9B,gBAAY,YAAY,EAAE,KAAK,KAAK;AACpC,QAAI,MAAM,YAAY,iBAAiB,KAAM,SAAQ,I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+ import ReactMarkdown from "react-markdown";
3
+ import remarkGfm from "remark-gfm";
4
+ import rehypeHighlight from "rehype-highlight";
5
+ function AgentMarkdown({ content }) {
6
+ return /* @__PURE__ */ jsx(
7
+ ReactMarkdown,
8
+ {
9
+ remarkPlugins: [remarkGfm],
10
+ rehypePlugins: [rehypeHighlight],
11
+ children: content
12
+ }
13
+ );
14
+ }
15
+ export {
16
+ AgentMarkdown
17
+ };
18
+ //# sourceMappingURL=index.es43.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es43.js","sources":["../src/components/messages/AgentMarkdown.tsx"],"sourcesContent":["import ReactMarkdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport rehypeHighlight from \"rehype-highlight\";\n// import \"highlight.js/styles/github.css\";\n\nexport function AgentMarkdown({ content }: { content: string }) {\n return (\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n rehypePlugins={[rehypeHighlight]}\n >\n {content}\n </ReactMarkdown>\n );\n}\n"],"names":[],"mappings":";;;;AAKO,SAAS,cAAc,EAAE,WAAgC;AAC9D,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAe,CAAC,SAAS;AAAA,MACzB,eAAe,CAAC,eAAe;AAAA,MAE9B,UAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -0,0 +1,11 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all) __defProp(target, name, {
4
+ get: all[name],
5
+ enumerable: true
6
+ });
7
+ };
8
+ export {
9
+ __export
10
+ };
11
+ //# sourceMappingURL=index.es44.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es44.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.8_openai@6.15.0_zod@4.3.5_/node_modules/@langchain/core/dist/_virtual/rolldown_runtime.js"],"sourcesContent":["//#region rolldown:runtime\nvar __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\n\n//#endregion\nexport { __export };"],"names":[],"mappings":"AACA,IAAI,YAAY,OAAO;AACpB,IAAC,WAAW,CAAC,QAAQ,QAAQ;AAC/B,WAAS,QAAQ,IAAK,WAAU,QAAQ,MAAM;AAAA,IAC7C,KAAK,IAAI,IAAI;AAAA,IACb,YAAY;AAAA,EACd,CAAE;AACF;","x_google_ignoreList":[0]}
@@ -0,0 +1,97 @@
1
+ function isDataContentBlock(content_block) {
2
+ return typeof content_block === "object" && content_block !== null && "type" in content_block && typeof content_block.type === "string" && "source_type" in content_block && (content_block.source_type === "url" || content_block.source_type === "base64" || content_block.source_type === "text" || content_block.source_type === "id");
3
+ }
4
+ function isURLContentBlock(content_block) {
5
+ return isDataContentBlock(content_block) && content_block.source_type === "url" && "url" in content_block && typeof content_block.url === "string";
6
+ }
7
+ function isBase64ContentBlock(content_block) {
8
+ return isDataContentBlock(content_block) && content_block.source_type === "base64" && "data" in content_block && typeof content_block.data === "string";
9
+ }
10
+ function isPlainTextContentBlock(content_block) {
11
+ return isDataContentBlock(content_block) && content_block.source_type === "text" && "text" in content_block && typeof content_block.text === "string";
12
+ }
13
+ function isIDContentBlock(content_block) {
14
+ return isDataContentBlock(content_block) && content_block.source_type === "id" && "id" in content_block && typeof content_block.id === "string";
15
+ }
16
+ function convertToOpenAIImageBlock(content_block) {
17
+ if (isDataContentBlock(content_block)) {
18
+ if (content_block.source_type === "url") return {
19
+ type: "image_url",
20
+ image_url: { url: content_block.url }
21
+ };
22
+ if (content_block.source_type === "base64") {
23
+ if (!content_block.mime_type) throw new Error("mime_type key is required for base64 data.");
24
+ const mime_type = content_block.mime_type;
25
+ return {
26
+ type: "image_url",
27
+ image_url: { url: `data:${mime_type};base64,${content_block.data}` }
28
+ };
29
+ }
30
+ }
31
+ throw new Error("Unsupported source type. Only 'url' and 'base64' are supported.");
32
+ }
33
+ function parseMimeType(mime_type) {
34
+ const parts = mime_type.split(";")[0].split("/");
35
+ if (parts.length !== 2) throw new Error(`Invalid mime type: "${mime_type}" - does not match type/subtype format.`);
36
+ const type = parts[0].trim();
37
+ const subtype = parts[1].trim();
38
+ if (type === "" || subtype === "") throw new Error(`Invalid mime type: "${mime_type}" - type or subtype is empty.`);
39
+ const parameters = {};
40
+ for (const parameterKvp of mime_type.split(";").slice(1)) {
41
+ const parameterParts = parameterKvp.split("=");
42
+ if (parameterParts.length !== 2) throw new Error(`Invalid parameter syntax in mime type: "${mime_type}".`);
43
+ const key = parameterParts[0].trim();
44
+ const value = parameterParts[1].trim();
45
+ if (key === "") throw new Error(`Invalid parameter syntax in mime type: "${mime_type}".`);
46
+ parameters[key] = value;
47
+ }
48
+ return {
49
+ type,
50
+ subtype,
51
+ parameters
52
+ };
53
+ }
54
+ function parseBase64DataUrl({ dataUrl: data_url, asTypedArray = false }) {
55
+ const formatMatch = data_url.match(/^data:(\w+\/\w+);base64,([A-Za-z0-9+/]+=*)$/);
56
+ let mime_type;
57
+ if (formatMatch) {
58
+ mime_type = formatMatch[1].toLowerCase();
59
+ const data = asTypedArray ? Uint8Array.from(atob(formatMatch[2]), (c) => c.charCodeAt(0)) : formatMatch[2];
60
+ return {
61
+ mime_type,
62
+ data
63
+ };
64
+ }
65
+ return void 0;
66
+ }
67
+ function convertToProviderContentBlock(block, converter) {
68
+ if (block.type === "text") {
69
+ if (!converter.fromStandardTextBlock) throw new Error(`Converter for ${converter.providerName} does not implement \`fromStandardTextBlock\` method.`);
70
+ return converter.fromStandardTextBlock(block);
71
+ }
72
+ if (block.type === "image") {
73
+ if (!converter.fromStandardImageBlock) throw new Error(`Converter for ${converter.providerName} does not implement \`fromStandardImageBlock\` method.`);
74
+ return converter.fromStandardImageBlock(block);
75
+ }
76
+ if (block.type === "audio") {
77
+ if (!converter.fromStandardAudioBlock) throw new Error(`Converter for ${converter.providerName} does not implement \`fromStandardAudioBlock\` method.`);
78
+ return converter.fromStandardAudioBlock(block);
79
+ }
80
+ if (block.type === "file") {
81
+ if (!converter.fromStandardFileBlock) throw new Error(`Converter for ${converter.providerName} does not implement \`fromStandardFileBlock\` method.`);
82
+ return converter.fromStandardFileBlock(block);
83
+ }
84
+ throw new Error(`Unable to convert content block type '${block.type}' to provider-specific format: not recognized.`);
85
+ }
86
+ export {
87
+ convertToOpenAIImageBlock,
88
+ convertToProviderContentBlock,
89
+ isBase64ContentBlock,
90
+ isDataContentBlock,
91
+ isIDContentBlock,
92
+ isPlainTextContentBlock,
93
+ isURLContentBlock,
94
+ parseBase64DataUrl,
95
+ parseMimeType
96
+ };
97
+ //# sourceMappingURL=index.es45.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es45.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.8_openai@6.15.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/content/data.js"],"sourcesContent":["//#region src/messages/content/data.ts\n/**\n* @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n*/\nfunction isDataContentBlock(content_block) {\n\treturn typeof content_block === \"object\" && content_block !== null && \"type\" in content_block && typeof content_block.type === \"string\" && \"source_type\" in content_block && (content_block.source_type === \"url\" || content_block.source_type === \"base64\" || content_block.source_type === \"text\" || content_block.source_type === \"id\");\n}\n/**\n* @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n*/\nfunction isURLContentBlock(content_block) {\n\treturn isDataContentBlock(content_block) && content_block.source_type === \"url\" && \"url\" in content_block && typeof content_block.url === \"string\";\n}\n/**\n* @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n*/\nfunction isBase64ContentBlock(content_block) {\n\treturn isDataContentBlock(content_block) && content_block.source_type === \"base64\" && \"data\" in content_block && typeof content_block.data === \"string\";\n}\n/**\n* @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n*/\nfunction isPlainTextContentBlock(content_block) {\n\treturn isDataContentBlock(content_block) && content_block.source_type === \"text\" && \"text\" in content_block && typeof content_block.text === \"string\";\n}\n/**\n* @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n*/\nfunction isIDContentBlock(content_block) {\n\treturn isDataContentBlock(content_block) && content_block.source_type === \"id\" && \"id\" in content_block && typeof content_block.id === \"string\";\n}\n/**\n* @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n*/\nfunction convertToOpenAIImageBlock(content_block) {\n\tif (isDataContentBlock(content_block)) {\n\t\tif (content_block.source_type === \"url\") return {\n\t\t\ttype: \"image_url\",\n\t\t\timage_url: { url: content_block.url }\n\t\t};\n\t\tif (content_block.source_type === \"base64\") {\n\t\t\tif (!content_block.mime_type) throw new Error(\"mime_type key is required for base64 data.\");\n\t\t\tconst mime_type = content_block.mime_type;\n\t\t\treturn {\n\t\t\t\ttype: \"image_url\",\n\t\t\t\timage_url: { url: `data:${mime_type};base64,${content_block.data}` }\n\t\t\t};\n\t\t}\n\t}\n\tthrow new Error(\"Unsupported source type. Only 'url' and 'base64' are supported.\");\n}\n/**\n* Utility function for ChatModelProviders. Parses a mime type into a type, subtype, and parameters.\n*\n* @param mime_type - The mime type to parse.\n* @returns An object containing the type, subtype, and parameters.\n*\n* @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n*/\nfunction parseMimeType(mime_type) {\n\tconst parts = mime_type.split(\";\")[0].split(\"/\");\n\tif (parts.length !== 2) throw new Error(`Invalid mime type: \"${mime_type}\" - does not match type/subtype format.`);\n\tconst type = parts[0].trim();\n\tconst subtype = parts[1].trim();\n\tif (type === \"\" || subtype === \"\") throw new Error(`Invalid mime type: \"${mime_type}\" - type or subtype is empty.`);\n\tconst parameters = {};\n\tfor (const parameterKvp of mime_type.split(\";\").slice(1)) {\n\t\tconst parameterParts = parameterKvp.split(\"=\");\n\t\tif (parameterParts.length !== 2) throw new Error(`Invalid parameter syntax in mime type: \"${mime_type}\".`);\n\t\tconst key = parameterParts[0].trim();\n\t\tconst value = parameterParts[1].trim();\n\t\tif (key === \"\") throw new Error(`Invalid parameter syntax in mime type: \"${mime_type}\".`);\n\t\tparameters[key] = value;\n\t}\n\treturn {\n\t\ttype,\n\t\tsubtype,\n\t\tparameters\n\t};\n}\n/**\n* Utility function for ChatModelProviders. Parses a base64 data URL into a typed array or string.\n*\n* @param dataUrl - The base64 data URL to parse.\n* @param asTypedArray - Whether to return the data as a typed array.\n* @returns The parsed data and mime type, or undefined if the data URL is invalid.\n*\n* @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n*/\nfunction parseBase64DataUrl({ dataUrl: data_url, asTypedArray = false }) {\n\tconst formatMatch = data_url.match(/^data:(\\w+\\/\\w+);base64,([A-Za-z0-9+/]+=*)$/);\n\tlet mime_type;\n\tif (formatMatch) {\n\t\tmime_type = formatMatch[1].toLowerCase();\n\t\tconst data = asTypedArray ? Uint8Array.from(atob(formatMatch[2]), (c) => c.charCodeAt(0)) : formatMatch[2];\n\t\treturn {\n\t\t\tmime_type,\n\t\t\tdata\n\t\t};\n\t}\n\treturn void 0;\n}\n/**\n* Convert from a standard data content block to a provider's proprietary data content block format.\n*\n* Don't override this method. Instead, override the more specific conversion methods and use this\n* method unmodified.\n*\n* @param block - The standard data content block to convert.\n* @returns The provider data content block.\n* @throws An error if the standard data content block type is not supported.\n*\n* @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n*/\nfunction convertToProviderContentBlock(block, converter) {\n\tif (block.type === \"text\") {\n\t\tif (!converter.fromStandardTextBlock) throw new Error(`Converter for ${converter.providerName} does not implement \\`fromStandardTextBlock\\` method.`);\n\t\treturn converter.fromStandardTextBlock(block);\n\t}\n\tif (block.type === \"image\") {\n\t\tif (!converter.fromStandardImageBlock) throw new Error(`Converter for ${converter.providerName} does not implement \\`fromStandardImageBlock\\` method.`);\n\t\treturn converter.fromStandardImageBlock(block);\n\t}\n\tif (block.type === \"audio\") {\n\t\tif (!converter.fromStandardAudioBlock) throw new Error(`Converter for ${converter.providerName} does not implement \\`fromStandardAudioBlock\\` method.`);\n\t\treturn converter.fromStandardAudioBlock(block);\n\t}\n\tif (block.type === \"file\") {\n\t\tif (!converter.fromStandardFileBlock) throw new Error(`Converter for ${converter.providerName} does not implement \\`fromStandardFileBlock\\` method.`);\n\t\treturn converter.fromStandardFileBlock(block);\n\t}\n\tthrow new Error(`Unable to convert content block type '${block.type}' to provider-specific format: not recognized.`);\n}\n\n//#endregion\nexport { convertToOpenAIImageBlock, convertToProviderContentBlock, isBase64ContentBlock, isDataContentBlock, isIDContentBlock, isPlainTextContentBlock, isURLContentBlock, parseBase64DataUrl, parseMimeType };\n//# sourceMappingURL=data.js.map"],"names":[],"mappings":"AAIA,SAAS,mBAAmB,eAAe;AAC1C,SAAO,OAAO,kBAAkB,YAAY,kBAAkB,QAAQ,UAAU,iBAAiB,OAAO,cAAc,SAAS,YAAY,iBAAiB,kBAAkB,cAAc,gBAAgB,SAAS,cAAc,gBAAgB,YAAY,cAAc,gBAAgB,UAAU,cAAc,gBAAgB;AACtU;AAIA,SAAS,kBAAkB,eAAe;AACzC,SAAO,mBAAmB,aAAa,KAAK,cAAc,gBAAgB,SAAS,SAAS,iBAAiB,OAAO,cAAc,QAAQ;AAC3I;AAIA,SAAS,qBAAqB,eAAe;AAC5C,SAAO,mBAAmB,aAAa,KAAK,cAAc,gBAAgB,YAAY,UAAU,iBAAiB,OAAO,cAAc,SAAS;AAChJ;AAIA,SAAS,wBAAwB,eAAe;AAC/C,SAAO,mBAAmB,aAAa,KAAK,cAAc,gBAAgB,UAAU,UAAU,iBAAiB,OAAO,cAAc,SAAS;AAC9I;AAIA,SAAS,iBAAiB,eAAe;AACxC,SAAO,mBAAmB,aAAa,KAAK,cAAc,gBAAgB,QAAQ,QAAQ,iBAAiB,OAAO,cAAc,OAAO;AACxI;AAIA,SAAS,0BAA0B,eAAe;AACjD,MAAI,mBAAmB,aAAa,GAAG;AACtC,QAAI,cAAc,gBAAgB,MAAO,QAAO;AAAA,MAC/C,MAAM;AAAA,M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AY,CAAC,EAAE,YAAW;AACtC,UAAM,OAAO,eAAe,WAAW,KAAK,KAAK,YAAY,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,IAAI,YAAY,CAAC;AACzG,WAAO;AAAA,MACN;AAAA,MACA;AAAA,IACH;AAAA,EACC;AACA,SAAO;AACR;AAaA,SAAS,8BAA8B,OAAO,WAAW;AACxD,MAAI,MAAM,SAAS,QAAQ;AAC1B,QAAI,CAAC,UAAU,sBAAuB,OAAM,IAAI,MAAM,iBAAiB,UAAU,YAAY,uDAAuD;AACpJ,WAAO,UAAU,sBAAsB,KAAK;AAAA,EAC7C;AACA,MAAI,MAAM,SAAS,SAAS;AAC3B,QAAI,CAAC,UAAU,uBAAwB,OAAM,IAAI,MAAM,iBAAiB,UAAU,YAAY,wDAAwD;AACtJ,WAAO,UAAU,uBAAuB,KAAK;AAAA,EAC9C;AACA,MAAI,MAAM,SAAS,SAAS;AAC3B,QAAI,CAAC,UAAU,uBAAwB,OAAM,IAAI,MAAM,iBAAiB,UAAU,YAAY,wDAAwD;AACtJ,WAAO,UAAU,uBAAuB,KAAK;AAAA,EAC9C;AACA,MAAI,MAAM,SAAS,QAAQ;AAC1B,QAAI,CAAC,UAAU,sBAAuB,OAAM,IAAI,MAAM,iBAAiB,UAAU,YAAY,uDAAuD;AACpJ,WAAO,UAAU,sBAAsB,KAAK;AAAA,EAC7C;AACA,QAAM,IAAI,MAAM,yCAAyC,MAAM,IAAI,gDAAgD;AACpH;","x_google_ignoreList":[0]}
@@ -0,0 +1,7 @@
1
+ function isMessage(message) {
2
+ return typeof message === "object" && message !== null && "type" in message && "content" in message && (typeof message.content === "string" || Array.isArray(message.content));
3
+ }
4
+ export {
5
+ isMessage
6
+ };
7
+ //# sourceMappingURL=index.es46.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es46.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.8_openai@6.15.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/message.js"],"sourcesContent":["//#region src/messages/message.ts\n/**\n* Type guard to check if a value is a valid Message object.\n*\n* @param message - The value to check\n* @returns true if the value is a valid Message object, false otherwise\n*/\nfunction isMessage(message) {\n\treturn typeof message === \"object\" && message !== null && \"type\" in message && \"content\" in message && (typeof message.content === \"string\" || Array.isArray(message.content));\n}\n\n//#endregion\nexport { isMessage };\n//# sourceMappingURL=message.js.map"],"names":[],"mappings":"AAOA,SAAS,UAAU,SAAS;AAC3B,SAAO,OAAO,YAAY,YAAY,YAAY,QAAQ,UAAU,WAAW,aAAa,YAAY,OAAO,QAAQ,YAAY,YAAY,MAAM,QAAQ,QAAQ,OAAO;AAC7K;","x_google_ignoreList":[0]}
@@ -0,0 +1,39 @@
1
+ import { _mergeDicts } from "./index.es32.js";
2
+ function mergeResponseMetadata(a, b) {
3
+ const output = _mergeDicts(a ?? {}, b ?? {});
4
+ return output;
5
+ }
6
+ function mergeModalitiesTokenDetails(a, b) {
7
+ const output = {};
8
+ if (a?.audio !== void 0 || b?.audio !== void 0) output.audio = (a?.audio ?? 0) + (b?.audio ?? 0);
9
+ if (a?.image !== void 0 || b?.image !== void 0) output.image = (a?.image ?? 0) + (b?.image ?? 0);
10
+ if (a?.video !== void 0 || b?.video !== void 0) output.video = (a?.video ?? 0) + (b?.video ?? 0);
11
+ if (a?.document !== void 0 || b?.document !== void 0) output.document = (a?.document ?? 0) + (b?.document ?? 0);
12
+ if (a?.text !== void 0 || b?.text !== void 0) output.text = (a?.text ?? 0) + (b?.text ?? 0);
13
+ return output;
14
+ }
15
+ function mergeInputTokenDetails(a, b) {
16
+ const output = { ...mergeModalitiesTokenDetails(a, b) };
17
+ if (a?.cache_read !== void 0 || b?.cache_read !== void 0) output.cache_read = (a?.cache_read ?? 0) + (b?.cache_read ?? 0);
18
+ if (a?.cache_creation !== void 0 || b?.cache_creation !== void 0) output.cache_creation = (a?.cache_creation ?? 0) + (b?.cache_creation ?? 0);
19
+ return output;
20
+ }
21
+ function mergeOutputTokenDetails(a, b) {
22
+ const output = { ...mergeModalitiesTokenDetails(a, b) };
23
+ if (a?.reasoning !== void 0 || b?.reasoning !== void 0) output.reasoning = (a?.reasoning ?? 0) + (b?.reasoning ?? 0);
24
+ return output;
25
+ }
26
+ function mergeUsageMetadata(a, b) {
27
+ return {
28
+ input_tokens: (a?.input_tokens ?? 0) + (b?.input_tokens ?? 0),
29
+ output_tokens: (a?.output_tokens ?? 0) + (b?.output_tokens ?? 0),
30
+ total_tokens: (a?.total_tokens ?? 0) + (b?.total_tokens ?? 0),
31
+ input_token_details: mergeInputTokenDetails(a?.input_token_details, b?.input_token_details),
32
+ output_token_details: mergeOutputTokenDetails(a?.output_token_details, b?.output_token_details)
33
+ };
34
+ }
35
+ export {
36
+ mergeResponseMetadata,
37
+ mergeUsageMetadata
38
+ };
39
+ //# sourceMappingURL=index.es47.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es47.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.8_openai@6.15.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/metadata.js"],"sourcesContent":["import { _mergeDicts } from \"./base.js\";\n\n//#region src/messages/metadata.ts\nfunction mergeResponseMetadata(a, b) {\n\tconst output = _mergeDicts(a ?? {}, b ?? {});\n\treturn output;\n}\nfunction mergeModalitiesTokenDetails(a, b) {\n\tconst output = {};\n\tif (a?.audio !== void 0 || b?.audio !== void 0) output.audio = (a?.audio ?? 0) + (b?.audio ?? 0);\n\tif (a?.image !== void 0 || b?.image !== void 0) output.image = (a?.image ?? 0) + (b?.image ?? 0);\n\tif (a?.video !== void 0 || b?.video !== void 0) output.video = (a?.video ?? 0) + (b?.video ?? 0);\n\tif (a?.document !== void 0 || b?.document !== void 0) output.document = (a?.document ?? 0) + (b?.document ?? 0);\n\tif (a?.text !== void 0 || b?.text !== void 0) output.text = (a?.text ?? 0) + (b?.text ?? 0);\n\treturn output;\n}\nfunction mergeInputTokenDetails(a, b) {\n\tconst output = { ...mergeModalitiesTokenDetails(a, b) };\n\tif (a?.cache_read !== void 0 || b?.cache_read !== void 0) output.cache_read = (a?.cache_read ?? 0) + (b?.cache_read ?? 0);\n\tif (a?.cache_creation !== void 0 || b?.cache_creation !== void 0) output.cache_creation = (a?.cache_creation ?? 0) + (b?.cache_creation ?? 0);\n\treturn output;\n}\nfunction mergeOutputTokenDetails(a, b) {\n\tconst output = { ...mergeModalitiesTokenDetails(a, b) };\n\tif (a?.reasoning !== void 0 || b?.reasoning !== void 0) output.reasoning = (a?.reasoning ?? 0) + (b?.reasoning ?? 0);\n\treturn output;\n}\nfunction mergeUsageMetadata(a, b) {\n\treturn {\n\t\tinput_tokens: (a?.input_tokens ?? 0) + (b?.input_tokens ?? 0),\n\t\toutput_tokens: (a?.output_tokens ?? 0) + (b?.output_tokens ?? 0),\n\t\ttotal_tokens: (a?.total_tokens ?? 0) + (b?.total_tokens ?? 0),\n\t\tinput_token_details: mergeInputTokenDetails(a?.input_token_details, b?.input_token_details),\n\t\toutput_token_details: mergeOutputTokenDetails(a?.output_token_details, b?.output_token_details)\n\t};\n}\n\n//#endregion\nexport { mergeResponseMetadata, mergeUsageMetadata };\n//# sourceMappingURL=metadata.js.map"],"names":[],"mappings":";AAGA,SAAS,sBAAsB,GAAG,GAAG;AACpC,QAAM,SAAS,YAAY,KAAK,CAAA,GAAI,KAAK,CAAA,CAAE;AAC3C,SAAO;AACR;AACA,SAAS,4BAA4B,GAAG,GAAG;AAC1C,QAAM,SAAS,CAAA;AACf,MAAI,GAAG,UAAU,UAAU,GAAG,UAAU,OAAQ,QAAO,SAAS,GAAG,SAAS,MAAM,GAAG,SAAS;AAC9F,MAAI,GAAG,UAAU,UAAU,GAAG,UAAU,OAAQ,QAAO,SAAS,GAAG,SAAS,MAAM,GAAG,SAAS;AAC9F,MAAI,GAAG,UAAU,UAAU,GAAG,UAAU,OAAQ,QAAO,SAAS,GAAG,SAAS,MAAM,GAAG,SAAS;AAC9F,MAAI,GAAG,aAAa,UAAU,GAAG,aAAa,OAAQ,QAAO,YAAY,GAAG,YAAY,MAAM,GAAG,YAAY;AAC7G,MAAI,GAAG,SAAS,UAAU,GAAG,SAAS,OAAQ,QAAO,QAAQ,GAAG,QAAQ,MAAM,GAAG,QAAQ;AACzF,SAAO;AACR;AACA,SAAS,uBAAuB,GAAG,GAAG;AACrC,QAAM,SAAS,EAAE,GAAG,4BAA4B,GAAG,CAAC,EAAC;AACrD,MAAI,GAAG,eAAe,UAAU,GAAG,eAAe,OAAQ,QAAO,cAAc,GAAG,cAAc,MAAM,GAAG,cAAc;AACvH,MAAI,GAAG,mBAAmB,UAAU,GAAG,mBAAmB,OAAQ,QAAO,kBAAkB,GAAG,kBAAkB,MAAM,GAAG,kBAAkB;AAC3I,SAAO;AACR;AACA,SAAS,wBAAwB,GAAG,GAAG;AACtC,QAAM,SAAS,EAAE,GAAG,4BAA4B,GAAG,CAAC,EAAC;AACrD,MAAI,GAAG,cAAc,UAAU,GAAG,cAAc,OAAQ,QAAO,aAAa,GAAG,aAAa,MAAM,GAAG,aAAa;AAClH,SAAO;AACR;AACA,SAAS,mBAAmB,GAAG,GAAG;AACjC,SAAO;AAAA,IACN,eAAe,GAAG,gBAAgB,MAAM,GAAG,gBAAgB;AAAA,IAC3D,gBAAgB,GAAG,iBAAiB,MAAM,GAAG,iBAAiB;AAAA,IAC9D,eAAe,GAAG,gBAAgB,MAAM,GAAG,gBAAgB;AAAA,IAC3D,qBAAqB,uBAAuB,GAAG,qBAAqB,GAAG,mBAAmB;AAAA,IAC1F,sBAAsB,wBAAwB,GAAG,sBAAsB,GAAG,oBAAoB;AAAA,EAChG;AACA;","x_google_ignoreList":[0]}
@@ -0,0 +1,75 @@
1
+ import { BaseMessageChunk, _mergeDicts, mergeContent, BaseMessage } from "./index.es32.js";
2
+ var ChatMessage = class ChatMessage2 extends BaseMessage {
3
+ static lc_name() {
4
+ return "ChatMessage";
5
+ }
6
+ type = "generic";
7
+ role;
8
+ static _chatMessageClass() {
9
+ return ChatMessage2;
10
+ }
11
+ constructor(fields, role) {
12
+ if (typeof fields === "string" || Array.isArray(fields)) fields = {
13
+ content: fields,
14
+ role
15
+ };
16
+ super(fields);
17
+ this.role = fields.role;
18
+ }
19
+ static isInstance(obj) {
20
+ return super.isInstance(obj) && obj.type === "generic";
21
+ }
22
+ get _printableFields() {
23
+ return {
24
+ ...super._printableFields,
25
+ role: this.role
26
+ };
27
+ }
28
+ };
29
+ var ChatMessageChunk = class extends BaseMessageChunk {
30
+ static lc_name() {
31
+ return "ChatMessageChunk";
32
+ }
33
+ type = "generic";
34
+ role;
35
+ constructor(fields, role) {
36
+ if (typeof fields === "string" || Array.isArray(fields)) fields = {
37
+ content: fields,
38
+ role
39
+ };
40
+ super(fields);
41
+ this.role = fields.role;
42
+ }
43
+ concat(chunk) {
44
+ const Cls = this.constructor;
45
+ return new Cls({
46
+ content: mergeContent(this.content, chunk.content),
47
+ additional_kwargs: _mergeDicts(this.additional_kwargs, chunk.additional_kwargs),
48
+ response_metadata: _mergeDicts(this.response_metadata, chunk.response_metadata),
49
+ role: this.role,
50
+ id: this.id ?? chunk.id
51
+ });
52
+ }
53
+ static isInstance(obj) {
54
+ return super.isInstance(obj) && obj.type === "generic";
55
+ }
56
+ get _printableFields() {
57
+ return {
58
+ ...super._printableFields,
59
+ role: this.role
60
+ };
61
+ }
62
+ };
63
+ function isChatMessage(x) {
64
+ return x._getType() === "generic";
65
+ }
66
+ function isChatMessageChunk(x) {
67
+ return x._getType() === "generic";
68
+ }
69
+ export {
70
+ ChatMessage,
71
+ ChatMessageChunk,
72
+ isChatMessage,
73
+ isChatMessageChunk
74
+ };
75
+ //# sourceMappingURL=index.es48.js.map