langgraph-ui-components 0.0.3 → 0.0.4

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 (502) hide show
  1. package/README.md +32 -0
  2. package/dist/index.es100.js +3157 -5
  3. package/dist/index.es100.js.map +1 -1
  4. package/dist/index.es101.js +35 -71
  5. package/dist/index.es101.js.map +1 -1
  6. package/dist/index.es102.js +5 -37
  7. package/dist/index.es102.js.map +1 -1
  8. package/dist/index.es103.js +73 -5
  9. package/dist/index.es103.js.map +1 -1
  10. package/dist/index.es104.js +39 -2
  11. package/dist/index.es104.js.map +1 -1
  12. package/dist/index.es105.js +5 -11
  13. package/dist/index.es105.js.map +1 -1
  14. package/dist/index.es106.js +2 -503
  15. package/dist/index.es106.js.map +1 -1
  16. package/dist/index.es107.js +11 -5
  17. package/dist/index.es107.js.map +1 -1
  18. package/dist/index.es108.js +503 -2
  19. package/dist/index.es108.js.map +1 -1
  20. package/dist/index.es109.js +5 -146
  21. package/dist/index.es109.js.map +1 -1
  22. package/dist/index.es110.js +2 -908
  23. package/dist/index.es110.js.map +1 -1
  24. package/dist/index.es111.js +128 -262
  25. package/dist/index.es111.js.map +1 -1
  26. package/dist/index.es112.js +907 -3
  27. package/dist/index.es112.js.map +1 -1
  28. package/dist/index.es113.js +262 -426
  29. package/dist/index.es113.js.map +1 -1
  30. package/dist/index.es114.js +3 -47
  31. package/dist/index.es114.js.map +1 -1
  32. package/dist/index.es115.js +443 -21
  33. package/dist/index.es115.js.map +1 -1
  34. package/dist/index.es116.js +42 -75
  35. package/dist/index.es116.js.map +1 -1
  36. package/dist/index.es117.js +22 -129
  37. package/dist/index.es117.js.map +1 -1
  38. package/dist/index.es118.js +74 -44
  39. package/dist/index.es118.js.map +1 -1
  40. package/dist/index.es119.js +129 -10
  41. package/dist/index.es119.js.map +1 -1
  42. package/dist/index.es12.js +7 -7
  43. package/dist/index.es12.js.map +1 -1
  44. package/dist/index.es120.js +47 -43
  45. package/dist/index.es120.js.map +1 -1
  46. package/dist/index.es121.js +9 -98
  47. package/dist/index.es121.js.map +1 -1
  48. package/dist/index.es122.js +43 -51
  49. package/dist/index.es122.js.map +1 -1
  50. package/dist/index.es123.js +96 -13
  51. package/dist/index.es123.js.map +1 -1
  52. package/dist/index.es124.js +52 -14
  53. package/dist/index.es124.js.map +1 -1
  54. package/dist/index.es125.js +13 -86
  55. package/dist/index.es125.js.map +1 -1
  56. package/dist/index.es126.js +15 -2
  57. package/dist/index.es126.js.map +1 -1
  58. package/dist/index.es127.js +87 -54
  59. package/dist/index.es127.js.map +1 -1
  60. package/dist/index.es128.js +2 -100
  61. package/dist/index.es128.js.map +1 -1
  62. package/dist/index.es129.js +51 -186
  63. package/dist/index.es129.js.map +1 -1
  64. package/dist/index.es13.js +5 -6
  65. package/dist/index.es13.js.map +1 -1
  66. package/dist/index.es130.js +87 -97
  67. package/dist/index.es130.js.map +1 -1
  68. package/dist/index.es131.js +187 -31
  69. package/dist/index.es131.js.map +1 -1
  70. package/dist/index.es132.js +110 -10
  71. package/dist/index.es132.js.map +1 -1
  72. package/dist/index.es133.js +35 -11
  73. package/dist/index.es133.js.map +1 -1
  74. package/dist/index.es134.js +10 -12
  75. package/dist/index.es134.js.map +1 -1
  76. package/dist/index.es135.js +10 -90
  77. package/dist/index.es135.js.map +1 -1
  78. package/dist/index.es136.js +11 -274
  79. package/dist/index.es136.js.map +1 -1
  80. package/dist/index.es137.js +91 -2
  81. package/dist/index.es137.js.map +1 -1
  82. package/dist/index.es138.js +261 -150
  83. package/dist/index.es138.js.map +1 -1
  84. package/dist/index.es139.js +2 -51
  85. package/dist/index.es139.js.map +1 -1
  86. package/dist/index.es140.js +158 -34
  87. package/dist/index.es140.js.map +1 -1
  88. package/dist/index.es141.js +50 -34
  89. package/dist/index.es141.js.map +1 -1
  90. package/dist/index.es142.js +32 -32
  91. package/dist/index.es142.js.map +1 -1
  92. package/dist/index.es143.js +34 -23
  93. package/dist/index.es143.js.map +1 -1
  94. package/dist/index.es144.js +32 -583
  95. package/dist/index.es144.js.map +1 -1
  96. package/dist/index.es145.js +20 -121
  97. package/dist/index.es145.js.map +1 -1
  98. package/dist/index.es146.js +585 -158
  99. package/dist/index.es146.js.map +1 -1
  100. package/dist/index.es147.js +125 -2
  101. package/dist/index.es147.js.map +1 -1
  102. package/dist/index.es148.js +164 -2
  103. package/dist/index.es148.js.map +1 -1
  104. package/dist/index.es149.js +2 -2
  105. package/dist/index.es15.js +15 -15
  106. package/dist/index.es150.js +2 -22
  107. package/dist/index.es150.js.map +1 -1
  108. package/dist/index.es151.js +2 -2
  109. package/dist/index.es152.js +21 -24
  110. package/dist/index.es152.js.map +1 -1
  111. package/dist/index.es153.js +2 -4
  112. package/dist/index.es153.js.map +1 -1
  113. package/dist/index.es154.js +25 -5
  114. package/dist/index.es154.js.map +1 -1
  115. package/dist/index.es155.js +7 -12
  116. package/dist/index.es155.js.map +1 -1
  117. package/dist/index.es156.js +5 -6
  118. package/dist/index.es156.js.map +1 -1
  119. package/dist/index.es157.js +12 -7
  120. package/dist/index.es157.js.map +1 -1
  121. package/dist/index.es158.js +6 -64
  122. package/dist/index.es158.js.map +1 -1
  123. package/dist/index.es159.js +63 -21
  124. package/dist/index.es159.js.map +1 -1
  125. package/dist/index.es16.js +2 -2
  126. package/dist/index.es160.js +21 -5
  127. package/dist/index.es160.js.map +1 -1
  128. package/dist/index.es161.js +5 -348
  129. package/dist/index.es161.js.map +1 -1
  130. package/dist/index.es162.js +346 -22
  131. package/dist/index.es162.js.map +1 -1
  132. package/dist/index.es163.js +25 -12
  133. package/dist/index.es163.js.map +1 -1
  134. package/dist/index.es164.js +11 -53
  135. package/dist/index.es164.js.map +1 -1
  136. package/dist/index.es165.js +53 -6
  137. package/dist/index.es165.js.map +1 -1
  138. package/dist/index.es166.js +7 -103
  139. package/dist/index.es166.js.map +1 -1
  140. package/dist/index.es167.js +101 -117
  141. package/dist/index.es167.js.map +1 -1
  142. package/dist/index.es168.js +110 -127
  143. package/dist/index.es168.js.map +1 -1
  144. package/dist/index.es169.js +128 -107
  145. package/dist/index.es169.js.map +1 -1
  146. package/dist/index.es17.js +2 -2
  147. package/dist/index.es170.js +115 -6
  148. package/dist/index.es170.js.map +1 -1
  149. package/dist/index.es171.js +6 -2
  150. package/dist/index.es171.js.map +1 -1
  151. package/dist/index.es172.js +3 -141
  152. package/dist/index.es172.js.map +1 -1
  153. package/dist/index.es173.js +2 -2
  154. package/dist/index.es174.js +2 -2
  155. package/dist/index.es175.js +1 -1
  156. package/dist/index.es177.js +2 -2
  157. package/dist/index.es179.js +1 -1
  158. package/dist/index.es182.js +1 -1
  159. package/dist/index.es19.js +15 -119
  160. package/dist/index.es19.js.map +1 -1
  161. package/dist/index.es190.js +142 -32
  162. package/dist/index.es190.js.map +1 -1
  163. package/dist/index.es191.js +2 -6
  164. package/dist/index.es191.js.map +1 -1
  165. package/dist/index.es192.js +31 -105
  166. package/dist/index.es192.js.map +1 -1
  167. package/dist/index.es193.js +6 -13
  168. package/dist/index.es193.js.map +1 -1
  169. package/dist/index.es194.js +105 -17
  170. package/dist/index.es194.js.map +1 -1
  171. package/dist/index.es195.js +11 -29
  172. package/dist/index.es195.js.map +1 -1
  173. package/dist/index.es196.js +17 -3
  174. package/dist/index.es196.js.map +1 -1
  175. package/dist/index.es197.js +30 -4
  176. package/dist/index.es197.js.map +1 -1
  177. package/dist/index.es198.js +4 -5
  178. package/dist/index.es198.js.map +1 -1
  179. package/dist/index.es199.js +4 -36
  180. package/dist/index.es199.js.map +1 -1
  181. package/dist/index.es2.js +2 -2
  182. package/dist/index.es2.js.map +1 -1
  183. package/dist/index.es20.js +68 -17
  184. package/dist/index.es20.js.map +1 -1
  185. package/dist/index.es200.js +5 -8
  186. package/dist/index.es200.js.map +1 -1
  187. package/dist/index.es201.js +36 -5
  188. package/dist/index.es201.js.map +1 -1
  189. package/dist/index.es202.js +5 -4
  190. package/dist/index.es202.js.map +1 -1
  191. package/dist/index.es203.js +5 -41
  192. package/dist/index.es203.js.map +1 -1
  193. package/dist/index.es204.js +4 -10
  194. package/dist/index.es204.js.map +1 -1
  195. package/dist/index.es205.js +39 -239
  196. package/dist/index.es205.js.map +1 -1
  197. package/dist/index.es206.js +10 -48
  198. package/dist/index.es206.js.map +1 -1
  199. package/dist/index.es207.js +239 -32
  200. package/dist/index.es207.js.map +1 -1
  201. package/dist/index.es208.js +49 -11
  202. package/dist/index.es208.js.map +1 -1
  203. package/dist/index.es209.js +33 -6
  204. package/dist/index.es209.js.map +1 -1
  205. package/dist/index.es21.js +36 -67
  206. package/dist/index.es21.js.map +1 -1
  207. package/dist/index.es210.js +12 -6
  208. package/dist/index.es210.js.map +1 -1
  209. package/dist/index.es211.js +7 -64
  210. package/dist/index.es211.js.map +1 -1
  211. package/dist/index.es212.js +6 -40
  212. package/dist/index.es212.js.map +1 -1
  213. package/dist/index.es213.js +63 -30
  214. package/dist/index.es213.js.map +1 -1
  215. package/dist/index.es214.js +35 -56
  216. package/dist/index.es214.js.map +1 -1
  217. package/dist/index.es215.js +32 -15
  218. package/dist/index.es215.js.map +1 -1
  219. package/dist/index.es216.js +60 -21
  220. package/dist/index.es216.js.map +1 -1
  221. package/dist/index.es217.js +15 -5
  222. package/dist/index.es217.js.map +1 -1
  223. package/dist/index.es218.js +21 -15
  224. package/dist/index.es218.js.map +1 -1
  225. package/dist/index.es219.js +4 -32
  226. package/dist/index.es219.js.map +1 -1
  227. package/dist/index.es22.js +25 -34
  228. package/dist/index.es22.js.map +1 -1
  229. package/dist/index.es220.js +16 -4
  230. package/dist/index.es220.js.map +1 -1
  231. package/dist/index.es221.js +32 -4
  232. package/dist/index.es221.js.map +1 -1
  233. package/dist/index.es222.js +5 -5
  234. package/dist/index.es222.js.map +1 -1
  235. package/dist/index.es223.js +4 -7
  236. package/dist/index.es223.js.map +1 -1
  237. package/dist/index.es224.js +4 -91
  238. package/dist/index.es224.js.map +1 -1
  239. package/dist/index.es225.js +7 -17
  240. package/dist/index.es225.js.map +1 -1
  241. package/dist/index.es226.js +90 -760
  242. package/dist/index.es226.js.map +1 -1
  243. package/dist/index.es227.js +18 -66
  244. package/dist/index.es227.js.map +1 -1
  245. package/dist/index.es228.js +749 -161
  246. package/dist/index.es228.js.map +1 -1
  247. package/dist/index.es229.js +66 -38
  248. package/dist/index.es229.js.map +1 -1
  249. package/dist/index.es23.js +144 -29
  250. package/dist/index.es23.js.map +1 -1
  251. package/dist/index.es230.js +172 -135
  252. package/dist/index.es230.js.map +1 -1
  253. package/dist/index.es231.js +37 -92
  254. package/dist/index.es231.js.map +1 -1
  255. package/dist/index.es232.js +135 -31
  256. package/dist/index.es232.js.map +1 -1
  257. package/dist/index.es233.js +92 -284
  258. package/dist/index.es233.js.map +1 -1
  259. package/dist/index.es234.js +31 -24
  260. package/dist/index.es234.js.map +1 -1
  261. package/dist/index.es235.js +284 -23
  262. package/dist/index.es235.js.map +1 -1
  263. package/dist/index.es236.js +24 -13
  264. package/dist/index.es236.js.map +1 -1
  265. package/dist/index.es237.js +22 -13
  266. package/dist/index.es237.js.map +1 -1
  267. package/dist/index.es238.js +13 -24
  268. package/dist/index.es238.js.map +1 -1
  269. package/dist/index.es239.js +12 -43
  270. package/dist/index.es239.js.map +1 -1
  271. package/dist/index.es24.js +291 -133
  272. package/dist/index.es24.js.map +1 -1
  273. package/dist/index.es240.js +24 -10
  274. package/dist/index.es240.js.map +1 -1
  275. package/dist/index.es241.js +45 -11
  276. package/dist/index.es241.js.map +1 -1
  277. package/dist/index.es242.js +10 -10
  278. package/dist/index.es242.js.map +1 -1
  279. package/dist/index.es243.js +11 -14
  280. package/dist/index.es243.js.map +1 -1
  281. package/dist/index.es244.js +10 -10
  282. package/dist/index.es244.js.map +1 -1
  283. package/dist/index.es245.js +14 -11
  284. package/dist/index.es245.js.map +1 -1
  285. package/dist/index.es246.js +11 -11
  286. package/dist/index.es246.js.map +1 -1
  287. package/dist/index.es247.js +11 -15
  288. package/dist/index.es247.js.map +1 -1
  289. package/dist/index.es248.js +11 -11
  290. package/dist/index.es248.js.map +1 -1
  291. package/dist/index.es249.js +15 -11
  292. package/dist/index.es249.js.map +1 -1
  293. package/dist/index.es25.js +116 -96
  294. package/dist/index.es25.js.map +1 -1
  295. package/dist/index.es250.js +11 -11
  296. package/dist/index.es250.js.map +1 -1
  297. package/dist/index.es251.js +11 -11
  298. package/dist/index.es251.js.map +1 -1
  299. package/dist/index.es252.js +10 -10
  300. package/dist/index.es252.js.map +1 -1
  301. package/dist/index.es253.js +10 -10
  302. package/dist/index.es253.js.map +1 -1
  303. package/dist/index.es254.js +10 -10
  304. package/dist/index.es254.js.map +1 -1
  305. package/dist/index.es255.js +10 -10
  306. package/dist/index.es255.js.map +1 -1
  307. package/dist/index.es256.js +11 -56
  308. package/dist/index.es256.js.map +1 -1
  309. package/dist/index.es257.js +11 -49
  310. package/dist/index.es257.js.map +1 -1
  311. package/dist/index.es258.js +51 -114
  312. package/dist/index.es258.js.map +1 -1
  313. package/dist/index.es259.js +43 -378
  314. package/dist/index.es259.js.map +1 -1
  315. package/dist/index.es26.js +5 -70
  316. package/dist/index.es26.js.map +1 -1
  317. package/dist/index.es260.js +117 -16
  318. package/dist/index.es260.js.map +1 -1
  319. package/dist/index.es261.js +384 -11
  320. package/dist/index.es261.js.map +1 -1
  321. package/dist/index.es262.js +13 -26
  322. package/dist/index.es262.js.map +1 -1
  323. package/dist/index.es263.js +10 -30
  324. package/dist/index.es263.js.map +1 -1
  325. package/dist/index.es264.js +25 -56
  326. package/dist/index.es264.js.map +1 -1
  327. package/dist/index.es265.js +25 -11
  328. package/dist/index.es265.js.map +1 -1
  329. package/dist/index.es266.js +49 -64
  330. package/dist/index.es266.js.map +1 -1
  331. package/dist/index.es267.js +17 -11
  332. package/dist/index.es267.js.map +1 -1
  333. package/dist/index.es268.js +77 -11
  334. package/dist/index.es268.js.map +1 -1
  335. package/dist/index.es269.js +11 -15
  336. package/dist/index.es269.js.map +1 -1
  337. package/dist/index.es27.js +91 -168
  338. package/dist/index.es27.js.map +1 -1
  339. package/dist/index.es270.js +11 -52
  340. package/dist/index.es270.js.map +1 -1
  341. package/dist/index.es271.js +13 -164
  342. package/dist/index.es271.js.map +1 -1
  343. package/dist/index.es272.js +53 -2
  344. package/dist/index.es272.js.map +1 -1
  345. package/dist/index.es273.js +166 -10
  346. package/dist/index.es273.js.map +1 -1
  347. package/dist/index.es274.js +2 -20
  348. package/dist/index.es274.js.map +1 -1
  349. package/dist/index.es275.js +10 -38
  350. package/dist/index.es275.js.map +1 -1
  351. package/dist/index.es276.js +23 -0
  352. package/dist/index.es276.js.map +1 -0
  353. package/dist/index.es277.js +42 -0
  354. package/dist/index.es277.js.map +1 -0
  355. package/dist/index.es28.js +68 -24
  356. package/dist/index.es28.js.map +1 -1
  357. package/dist/index.es29.js +178 -12
  358. package/dist/index.es29.js.map +1 -1
  359. package/dist/index.es30.js +23 -437
  360. package/dist/index.es30.js.map +1 -1
  361. package/dist/index.es31.js +13 -15
  362. package/dist/index.es31.js.map +1 -1
  363. package/dist/index.es32.js +429 -107
  364. package/dist/index.es32.js.map +1 -1
  365. package/dist/index.es33.js +13 -70
  366. package/dist/index.es33.js.map +1 -1
  367. package/dist/index.es34.js +119 -19
  368. package/dist/index.es34.js.map +1 -1
  369. package/dist/index.es35.js +66 -256
  370. package/dist/index.es35.js.map +1 -1
  371. package/dist/index.es36.js +17 -42
  372. package/dist/index.es36.js.map +1 -1
  373. package/dist/index.es37.js +239 -193
  374. package/dist/index.es37.js.map +1 -1
  375. package/dist/index.es38.js +17 -41
  376. package/dist/index.es38.js.map +1 -1
  377. package/dist/index.es39.js +193 -120
  378. package/dist/index.es39.js.map +1 -1
  379. package/dist/index.es40.js +60 -17
  380. package/dist/index.es40.js.map +1 -1
  381. package/dist/index.es41.js +123 -211
  382. package/dist/index.es41.js.map +1 -1
  383. package/dist/index.es42.js +22 -7
  384. package/dist/index.es42.js.map +1 -1
  385. package/dist/index.es43.js +214 -1176
  386. package/dist/index.es43.js.map +1 -1
  387. package/dist/index.es44.js +10 -8
  388. package/dist/index.es44.js.map +1 -1
  389. package/dist/index.es45.js +1182 -137
  390. package/dist/index.es45.js.map +1 -1
  391. package/dist/index.es46.js +8 -8
  392. package/dist/index.es46.js.map +1 -1
  393. package/dist/index.es47.js +138 -84
  394. package/dist/index.es47.js.map +1 -1
  395. package/dist/index.es48.js +8 -4
  396. package/dist/index.es48.js.map +1 -1
  397. package/dist/index.es49.js +91 -33
  398. package/dist/index.es49.js.map +1 -1
  399. package/dist/index.es50.js +3 -71
  400. package/dist/index.es50.js.map +1 -1
  401. package/dist/index.es51.js +34 -36
  402. package/dist/index.es51.js.map +1 -1
  403. package/dist/index.es52.js +61 -295
  404. package/dist/index.es52.js.map +1 -1
  405. package/dist/index.es53.js +38 -9
  406. package/dist/index.es53.js.map +1 -1
  407. package/dist/index.es54.js +296 -81
  408. package/dist/index.es54.js.map +1 -1
  409. package/dist/index.es55.js +9 -8
  410. package/dist/index.es55.js.map +1 -1
  411. package/dist/index.es56.js +89 -13
  412. package/dist/index.es56.js.map +1 -1
  413. package/dist/index.es57.js +6 -141
  414. package/dist/index.es57.js.map +1 -1
  415. package/dist/index.es58.js +12 -297
  416. package/dist/index.es58.js.map +1 -1
  417. package/dist/index.es59.js +137 -60
  418. package/dist/index.es59.js.map +1 -1
  419. package/dist/index.es6.js +21 -5
  420. package/dist/index.es6.js.map +1 -1
  421. package/dist/index.es60.js +247 -160
  422. package/dist/index.es60.js.map +1 -1
  423. package/dist/index.es61.js +63 -31
  424. package/dist/index.es61.js.map +1 -1
  425. package/dist/index.es62.js +212 -8
  426. package/dist/index.es62.js.map +1 -1
  427. package/dist/index.es63.js +32 -10
  428. package/dist/index.es63.js.map +1 -1
  429. package/dist/index.es64.js +8 -186
  430. package/dist/index.es64.js.map +1 -1
  431. package/dist/index.es65.js +11 -23
  432. package/dist/index.es65.js.map +1 -1
  433. package/dist/index.es66.js +183 -1396
  434. package/dist/index.es66.js.map +1 -1
  435. package/dist/index.es67.js +24 -9
  436. package/dist/index.es67.js.map +1 -1
  437. package/dist/index.es68.js +1400 -8
  438. package/dist/index.es68.js.map +1 -1
  439. package/dist/index.es69.js +9 -6
  440. package/dist/index.es69.js.map +1 -1
  441. package/dist/index.es70.js +8 -163
  442. package/dist/index.es70.js.map +1 -1
  443. package/dist/index.es71.js +6 -672
  444. package/dist/index.es71.js.map +1 -1
  445. package/dist/index.es72.js +161 -10
  446. package/dist/index.es72.js.map +1 -1
  447. package/dist/index.es73.js +671 -39
  448. package/dist/index.es73.js.map +1 -1
  449. package/dist/index.es74.js +10 -32
  450. package/dist/index.es74.js.map +1 -1
  451. package/dist/index.es75.js +31 -223
  452. package/dist/index.es75.js.map +1 -1
  453. package/dist/index.es76.js +33 -29
  454. package/dist/index.es76.js.map +1 -1
  455. package/dist/index.es77.js +193 -36
  456. package/dist/index.es77.js.map +1 -1
  457. package/dist/index.es78.js +26 -72
  458. package/dist/index.es78.js.map +1 -1
  459. package/dist/index.es79.js +70 -47
  460. package/dist/index.es79.js.map +1 -1
  461. package/dist/index.es80.js +72 -26
  462. package/dist/index.es80.js.map +1 -1
  463. package/dist/index.es81.js +37 -28
  464. package/dist/index.es81.js.map +1 -1
  465. package/dist/index.es82.js +28 -55
  466. package/dist/index.es82.js.map +1 -1
  467. package/dist/index.es83.js +43 -13
  468. package/dist/index.es83.js.map +1 -1
  469. package/dist/index.es84.js +52 -132
  470. package/dist/index.es84.js.map +1 -1
  471. package/dist/index.es85.js +13 -21
  472. package/dist/index.es85.js.map +1 -1
  473. package/dist/index.es86.js +124 -169
  474. package/dist/index.es86.js.map +1 -1
  475. package/dist/index.es87.js +19 -239
  476. package/dist/index.es87.js.map +1 -1
  477. package/dist/index.es88.js +165 -338
  478. package/dist/index.es88.js.map +1 -1
  479. package/dist/index.es89.js +231 -127
  480. package/dist/index.es89.js.map +1 -1
  481. package/dist/index.es90.js +348 -63
  482. package/dist/index.es90.js.map +1 -1
  483. package/dist/index.es91.js +133 -33
  484. package/dist/index.es91.js.map +1 -1
  485. package/dist/index.es92.js +67 -34
  486. package/dist/index.es92.js.map +1 -1
  487. package/dist/index.es93.js +33 -162
  488. package/dist/index.es93.js.map +1 -1
  489. package/dist/index.es94.js +34 -200
  490. package/dist/index.es94.js.map +1 -1
  491. package/dist/index.es95.js +165 -13
  492. package/dist/index.es95.js.map +1 -1
  493. package/dist/index.es96.js +198 -25
  494. package/dist/index.es96.js.map +1 -1
  495. package/dist/index.es97.js +13 -33
  496. package/dist/index.es97.js.map +1 -1
  497. package/dist/index.es98.js +24 -3151
  498. package/dist/index.es98.js.map +1 -1
  499. package/dist/index.es99.js +30 -33
  500. package/dist/index.es99.js.map +1 -1
  501. package/dist/styles.css +1 -1
  502. package/package.json +5 -1
@@ -1,216 +1,303 @@
1
- import { _isObject, _isArray, _isString, _isContentBlock, iife } from "./index.es74.js";
2
- import { isOpenAIDataBlock, convertToV1FromOpenAIDataBlock } from "./index.es59.js";
3
- function convertToV1FromChatCompletions(message) {
4
- const blocks = [];
5
- if (typeof message.content === "string") blocks.push({
6
- type: "text",
7
- text: message.content
8
- });
9
- else blocks.push(...convertToV1FromChatCompletionsInput(message.content));
10
- for (const toolCall of message.tool_calls ?? []) blocks.push({
11
- type: "tool_call",
12
- id: toolCall.id,
13
- name: toolCall.name,
14
- args: toolCall.args
15
- });
16
- return blocks;
17
- }
18
- function convertToV1FromChatCompletionsChunk(message) {
19
- const blocks = [];
20
- if (typeof message.content === "string") blocks.push({
21
- type: "text",
22
- text: message.content
23
- });
24
- else blocks.push(...convertToV1FromChatCompletionsInput(message.content));
25
- for (const toolCall of message.tool_calls ?? []) blocks.push({
26
- type: "tool_call",
27
- id: toolCall.id,
28
- name: toolCall.name,
29
- args: toolCall.args
30
- });
31
- return blocks;
32
- }
33
- function convertToV1FromChatCompletionsInput(blocks) {
34
- const convertedBlocks = [];
35
- for (const block of blocks) if (isOpenAIDataBlock(block)) convertedBlocks.push(convertToV1FromOpenAIDataBlock(block));
36
- else convertedBlocks.push(block);
37
- return convertedBlocks;
38
- }
39
- function convertResponsesAnnotation(annotation) {
40
- if (annotation.type === "url_citation") {
41
- const { url, title, start_index, end_index } = annotation;
1
+ import { _isContentBlock, _isObject, _isString, _isArray, iife, safeParseJson, _isNumber } from "./index.es76.js";
2
+ function convertAnthropicAnnotation(citation) {
3
+ if (citation.type === "char_location" && _isString(citation.document_title) && _isNumber(citation.start_char_index) && _isNumber(citation.end_char_index) && _isString(citation.cited_text)) {
4
+ const { document_title, start_char_index, end_char_index, cited_text, ...rest } = citation;
5
+ return {
6
+ ...rest,
7
+ type: "citation",
8
+ source: "char",
9
+ title: document_title ?? void 0,
10
+ startIndex: start_char_index,
11
+ endIndex: end_char_index,
12
+ citedText: cited_text
13
+ };
14
+ }
15
+ if (citation.type === "page_location" && _isString(citation.document_title) && _isNumber(citation.start_page_number) && _isNumber(citation.end_page_number) && _isString(citation.cited_text)) {
16
+ const { document_title, start_page_number, end_page_number, cited_text, ...rest } = citation;
17
+ return {
18
+ ...rest,
19
+ type: "citation",
20
+ source: "page",
21
+ title: document_title ?? void 0,
22
+ startIndex: start_page_number,
23
+ endIndex: end_page_number,
24
+ citedText: cited_text
25
+ };
26
+ }
27
+ if (citation.type === "content_block_location" && _isString(citation.document_title) && _isNumber(citation.start_block_index) && _isNumber(citation.end_block_index) && _isString(citation.cited_text)) {
28
+ const { document_title, start_block_index, end_block_index, cited_text, ...rest } = citation;
29
+ return {
30
+ ...rest,
31
+ type: "citation",
32
+ source: "block",
33
+ title: document_title ?? void 0,
34
+ startIndex: start_block_index,
35
+ endIndex: end_block_index,
36
+ citedText: cited_text
37
+ };
38
+ }
39
+ if (citation.type === "web_search_result_location" && _isString(citation.url) && _isString(citation.title) && _isString(citation.encrypted_index) && _isString(citation.cited_text)) {
40
+ const { url, title, encrypted_index, cited_text, ...rest } = citation;
42
41
  return {
42
+ ...rest,
43
43
  type: "citation",
44
+ source: "url",
44
45
  url,
45
46
  title,
46
- startIndex: start_index,
47
- endIndex: end_index
47
+ startIndex: Number(encrypted_index),
48
+ endIndex: Number(encrypted_index),
49
+ citedText: cited_text
48
50
  };
49
51
  }
50
- if (annotation.type === "file_citation") {
51
- const { file_id, filename, index } = annotation;
52
+ if (citation.type === "search_result_location" && _isString(citation.source) && _isString(citation.title) && _isNumber(citation.start_block_index) && _isNumber(citation.end_block_index) && _isString(citation.cited_text)) {
53
+ const { source, title, start_block_index, end_block_index, cited_text, ...rest } = citation;
52
54
  return {
55
+ ...rest,
53
56
  type: "citation",
54
- title: filename,
55
- startIndex: index,
56
- endIndex: index,
57
- fileId: file_id
57
+ source: "search",
58
+ url: source,
59
+ title: title ?? void 0,
60
+ startIndex: start_block_index,
61
+ endIndex: end_block_index,
62
+ citedText: cited_text
58
63
  };
59
64
  }
60
- return annotation;
65
+ return void 0;
61
66
  }
62
- function convertToV1FromResponses(message) {
67
+ function convertToV1FromAnthropicContentBlock(block) {
68
+ if (_isContentBlock(block, "document") && _isObject(block.source) && "type" in block.source) {
69
+ if (block.source.type === "base64" && _isString(block.source.media_type) && _isString(block.source.data)) return {
70
+ type: "file",
71
+ mimeType: block.source.media_type,
72
+ data: block.source.data
73
+ };
74
+ else if (block.source.type === "url" && _isString(block.source.url)) return {
75
+ type: "file",
76
+ url: block.source.url
77
+ };
78
+ else if (block.source.type === "file" && _isString(block.source.file_id)) return {
79
+ type: "file",
80
+ fileId: block.source.file_id
81
+ };
82
+ else if (block.source.type === "text" && _isString(block.source.data)) return {
83
+ type: "file",
84
+ mimeType: String(block.source.media_type ?? "text/plain"),
85
+ data: block.source.data
86
+ };
87
+ } else if (_isContentBlock(block, "image") && _isObject(block.source) && "type" in block.source) {
88
+ if (block.source.type === "base64" && _isString(block.source.media_type) && _isString(block.source.data)) return {
89
+ type: "image",
90
+ mimeType: block.source.media_type,
91
+ data: block.source.data
92
+ };
93
+ else if (block.source.type === "url" && _isString(block.source.url)) return {
94
+ type: "image",
95
+ url: block.source.url
96
+ };
97
+ else if (block.source.type === "file" && _isString(block.source.file_id)) return {
98
+ type: "image",
99
+ fileId: block.source.file_id
100
+ };
101
+ }
102
+ return void 0;
103
+ }
104
+ function convertToV1FromAnthropicInput(content) {
63
105
  function* iterateContent() {
64
- if (_isObject(message.additional_kwargs?.reasoning) && _isArray(message.additional_kwargs.reasoning.summary)) {
65
- const summary = message.additional_kwargs.reasoning.summary.reduce((acc, item) => {
66
- if (_isObject(item) && _isString(item.text)) return `${acc}${item.text}`;
67
- return acc;
68
- }, "");
69
- yield {
70
- type: "reasoning",
71
- reasoning: summary
72
- };
106
+ for (const block of content) {
107
+ const stdBlock = convertToV1FromAnthropicContentBlock(block);
108
+ if (stdBlock) yield stdBlock;
109
+ else yield block;
73
110
  }
111
+ }
112
+ return Array.from(iterateContent());
113
+ }
114
+ function convertToV1FromAnthropicMessage(message) {
115
+ function* iterateContent() {
74
116
  const content = typeof message.content === "string" ? [{
75
117
  type: "text",
76
118
  text: message.content
77
119
  }] : message.content;
78
- for (const block of content) if (_isContentBlock(block, "text")) {
79
- const { text, annotations, ...rest } = block;
80
- if (Array.isArray(annotations)) yield {
81
- ...rest,
82
- type: "text",
83
- text: String(text),
84
- annotations: annotations.map(convertResponsesAnnotation)
85
- };
86
- else yield {
87
- ...rest,
88
- type: "text",
89
- text: String(text)
90
- };
91
- }
92
- for (const toolCall of message.tool_calls ?? []) yield {
93
- type: "tool_call",
94
- id: toolCall.id,
95
- name: toolCall.name,
96
- args: toolCall.args
97
- };
98
- if (_isObject(message.additional_kwargs) && _isArray(message.additional_kwargs.tool_outputs)) for (const toolOutput of message.additional_kwargs.tool_outputs) {
99
- if (_isContentBlock(toolOutput, "web_search_call")) {
120
+ for (const block of content) {
121
+ if (_isContentBlock(block, "text") && _isString(block.text)) {
122
+ const { text, citations, ...rest } = block;
123
+ if (_isArray(citations) && citations.length) {
124
+ const _citations = citations.reduce((acc, item) => {
125
+ const citation = convertAnthropicAnnotation(item);
126
+ if (citation) return [...acc, citation];
127
+ return acc;
128
+ }, []);
129
+ yield {
130
+ ...rest,
131
+ type: "text",
132
+ text,
133
+ annotations: _citations
134
+ };
135
+ continue;
136
+ } else {
137
+ yield {
138
+ ...rest,
139
+ type: "text",
140
+ text
141
+ };
142
+ continue;
143
+ }
144
+ } else if (_isContentBlock(block, "thinking") && _isString(block.thinking)) {
145
+ const { thinking, signature, ...rest } = block;
100
146
  yield {
101
- id: toolOutput.id,
102
- type: "server_tool_call",
103
- name: "web_search",
104
- args: { query: toolOutput.query }
147
+ ...rest,
148
+ type: "reasoning",
149
+ reasoning: thinking,
150
+ signature
105
151
  };
106
152
  continue;
107
- } else if (_isContentBlock(toolOutput, "file_search_call")) {
153
+ } else if (_isContentBlock(block, "redacted_thinking")) {
108
154
  yield {
109
- id: toolOutput.id,
110
- type: "server_tool_call",
111
- name: "file_search",
112
- args: { query: toolOutput.query }
155
+ type: "non_standard",
156
+ value: block
113
157
  };
114
158
  continue;
115
- } else if (_isContentBlock(toolOutput, "computer_call")) {
159
+ } else if (_isContentBlock(block, "tool_use") && _isString(block.name) && _isString(block.id)) {
116
160
  yield {
117
- type: "non_standard",
118
- value: toolOutput
161
+ type: "tool_call",
162
+ id: block.id,
163
+ name: block.name,
164
+ args: block.input
119
165
  };
120
166
  continue;
121
- } else if (_isContentBlock(toolOutput, "code_interpreter_call")) {
122
- if (_isString(toolOutput.code)) yield {
123
- id: toolOutput.id,
124
- type: "server_tool_call",
125
- name: "code_interpreter",
126
- args: { code: toolOutput.code }
127
- };
128
- if (_isArray(toolOutput.outputs)) {
129
- const returnCode = iife(() => {
130
- if (toolOutput.status === "in_progress") return void 0;
131
- if (toolOutput.status === "completed") return 0;
132
- if (toolOutput.status === "incomplete") return 127;
133
- if (toolOutput.status === "interpreting") return void 0;
134
- if (toolOutput.status === "failed") return 1;
135
- return void 0;
167
+ } else if (_isContentBlock(block, "input_json_delta")) {
168
+ if (_isAIMessageChunk(message) && message.tool_call_chunks?.length) {
169
+ const tool_call_chunk = message.tool_call_chunks[0];
170
+ yield {
171
+ type: "tool_call_chunk",
172
+ id: tool_call_chunk.id,
173
+ name: tool_call_chunk.name,
174
+ args: tool_call_chunk.args,
175
+ index: tool_call_chunk.index
176
+ };
177
+ continue;
178
+ }
179
+ } else if (_isContentBlock(block, "server_tool_use") && _isString(block.name) && _isString(block.id)) {
180
+ const { name, id } = block;
181
+ if (name === "web_search") {
182
+ const query = iife(() => {
183
+ if (typeof block.input === "string") return block.input;
184
+ else if (_isObject(block.input) && _isString(block.input.query)) return block.input.query;
185
+ else if (_isString(block.partial_json)) {
186
+ const json = safeParseJson(block.partial_json);
187
+ if (json?.query) return json.query;
188
+ }
189
+ return "";
136
190
  });
137
- for (const output of toolOutput.outputs) if (_isContentBlock(output, "logs")) {
138
- yield {
139
- type: "server_tool_call_result",
140
- toolCallId: toolOutput.id ?? "",
141
- status: "success",
142
- output: {
143
- type: "code_interpreter_output",
144
- returnCode: returnCode ?? 0,
145
- stderr: [0, void 0].includes(returnCode) ? void 0 : String(output.logs),
146
- stdout: [0, void 0].includes(returnCode) ? String(output.logs) : void 0
147
- }
148
- };
149
- continue;
150
- }
191
+ yield {
192
+ id,
193
+ type: "server_tool_call",
194
+ name: "web_search",
195
+ args: { query }
196
+ };
197
+ continue;
198
+ } else if (block.name === "code_execution") {
199
+ const code = iife(() => {
200
+ if (typeof block.input === "string") return block.input;
201
+ else if (_isObject(block.input) && _isString(block.input.code)) return block.input.code;
202
+ else if (_isString(block.partial_json)) {
203
+ const json = safeParseJson(block.partial_json);
204
+ if (json?.code) return json.code;
205
+ }
206
+ return "";
207
+ });
208
+ yield {
209
+ id,
210
+ type: "server_tool_call",
211
+ name: "code_execution",
212
+ args: { code }
213
+ };
214
+ continue;
151
215
  }
216
+ } else if (_isContentBlock(block, "web_search_tool_result") && _isString(block.tool_use_id) && _isArray(block.content)) {
217
+ const { content: content$1, tool_use_id } = block;
218
+ const urls = content$1.reduce((acc, content$2) => {
219
+ if (_isContentBlock(content$2, "web_search_result")) return [...acc, content$2.url];
220
+ return acc;
221
+ }, []);
222
+ yield {
223
+ type: "server_tool_call_result",
224
+ name: "web_search",
225
+ toolCallId: tool_use_id,
226
+ status: "success",
227
+ output: { urls }
228
+ };
152
229
  continue;
153
- } else if (_isContentBlock(toolOutput, "mcp_call")) {
230
+ } else if (_isContentBlock(block, "code_execution_tool_result") && _isString(block.tool_use_id) && _isObject(block.content)) {
154
231
  yield {
155
- id: toolOutput.id,
232
+ type: "server_tool_call_result",
233
+ name: "code_execution",
234
+ toolCallId: block.tool_use_id,
235
+ status: "success",
236
+ output: block.content
237
+ };
238
+ continue;
239
+ } else if (_isContentBlock(block, "mcp_tool_use")) {
240
+ yield {
241
+ id: block.id,
156
242
  type: "server_tool_call",
157
- name: "mcp_call",
158
- args: toolOutput.input
243
+ name: "mcp_tool_use",
244
+ args: block.input
245
+ };
246
+ continue;
247
+ } else if (_isContentBlock(block, "mcp_tool_result") && _isString(block.tool_use_id) && _isObject(block.content)) {
248
+ yield {
249
+ type: "server_tool_call_result",
250
+ name: "mcp_tool_use",
251
+ toolCallId: block.tool_use_id,
252
+ status: "success",
253
+ output: block.content
159
254
  };
160
255
  continue;
161
- } else if (_isContentBlock(toolOutput, "mcp_list_tools")) {
256
+ } else if (_isContentBlock(block, "container_upload")) {
162
257
  yield {
163
- id: toolOutput.id,
164
258
  type: "server_tool_call",
165
- name: "mcp_list_tools",
166
- args: toolOutput.input
259
+ name: "container_upload",
260
+ args: block.input
167
261
  };
168
262
  continue;
169
- } else if (_isContentBlock(toolOutput, "mcp_approval_request")) {
263
+ } else if (_isContentBlock(block, "search_result")) {
170
264
  yield {
265
+ id: block.id,
171
266
  type: "non_standard",
172
- value: toolOutput
267
+ value: block
173
268
  };
174
269
  continue;
175
- } else if (_isContentBlock(toolOutput, "image_generation_call")) {
270
+ } else if (_isContentBlock(block, "tool_result")) {
176
271
  yield {
272
+ id: block.id,
177
273
  type: "non_standard",
178
- value: toolOutput
274
+ value: block
179
275
  };
180
276
  continue;
277
+ } else {
278
+ const stdBlock = convertToV1FromAnthropicContentBlock(block);
279
+ if (stdBlock) {
280
+ yield stdBlock;
281
+ continue;
282
+ }
181
283
  }
182
- if (_isObject(toolOutput)) yield {
284
+ yield {
183
285
  type: "non_standard",
184
- value: toolOutput
286
+ value: block
185
287
  };
186
288
  }
187
289
  }
188
290
  return Array.from(iterateContent());
189
291
  }
190
- function convertToV1FromResponsesChunk(message) {
191
- function* iterateContent() {
192
- yield* convertToV1FromResponses(message);
193
- for (const toolCallChunk of message.tool_call_chunks ?? []) yield {
194
- type: "tool_call_chunk",
195
- id: toolCallChunk.id,
196
- name: toolCallChunk.name,
197
- args: toolCallChunk.args
198
- };
199
- }
200
- return Array.from(iterateContent());
201
- }
202
- const ChatOpenAITranslator = {
203
- translateContent: (message) => {
204
- if (typeof message.content === "string") return convertToV1FromChatCompletions(message);
205
- return convertToV1FromResponses(message);
206
- },
207
- translateContentChunk: (message) => {
208
- if (typeof message.content === "string") return convertToV1FromChatCompletionsChunk(message);
209
- return convertToV1FromResponsesChunk(message);
210
- }
292
+ const ChatAnthropicTranslator = {
293
+ translateContent: convertToV1FromAnthropicMessage,
294
+ translateContentChunk: convertToV1FromAnthropicMessage
211
295
  };
296
+ function _isAIMessageChunk(message) {
297
+ return typeof message?._getType === "function" && typeof message.concat === "function" && message._getType() === "ai";
298
+ }
212
299
  export {
213
- ChatOpenAITranslator,
214
- convertToV1FromChatCompletionsInput
300
+ ChatAnthropicTranslator,
301
+ convertToV1FromAnthropicInput
215
302
  };
216
303
  //# sourceMappingURL=index.es60.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es60.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/openai.js"],"sourcesContent":["import { _isArray, _isContentBlock, _isObject, _isString, iife } from \"./utils.js\";\nimport { convertToV1FromOpenAIDataBlock, isOpenAIDataBlock } from \"./data.js\";\n\n//#region src/messages/block_translators/openai.ts\n/**\n* Converts a ChatOpenAICompletions message to an array of v1 standard content blocks.\n*\n* This function processes an AI message from ChatOpenAICompletions API format\n* and converts it to the standardized v1 content block format. It handles both\n* string content and structured content blocks, as well as tool calls.\n*\n* @param message - The AI message containing ChatOpenAICompletions formatted content\n* @returns Array of content blocks in v1 standard format\n*\n* @example\n* ```typescript\n* const message = new AIMessage(\"Hello world\");\n* const standardBlocks = convertToV1FromChatCompletions(message);\n* // Returns: [{ type: \"text\", text: \"Hello world\" }]\n* ```\n*\n* @example\n* ```typescript\n* const message = new AIMessage([\n* { type: \"text\", text: \"Hello\" },\n* { type: \"image_url\", image_url: { url: \"https://example.com/image.png\" } }\n* ]);\n* message.tool_calls = [\n* { id: \"call_123\", name: \"calculator\", args: { a: 1, b: 2 } }\n* ];\n*\n* const standardBlocks = convertToV1FromChatCompletions(message);\n* // Returns:\n* // [\n* // { type: \"text\", text: \"Hello\" },\n* // { type: \"image\", url: \"https://example.com/image.png\" },\n* // { type: \"tool_call\", id: \"call_123\", name: \"calculator\", args: { a: 1, b: 2 } }\n* // ]\n* ```\n*/\nfunction convertToV1FromChatCompletions(message) {\n\tconst blocks = [];\n\tif (typeof message.content === \"string\") blocks.push({\n\t\ttype: \"text\",\n\t\ttext: message.content\n\t});\n\telse blocks.push(...convertToV1FromChatCompletionsInput(message.content));\n\tfor (const toolCall of message.tool_calls ?? []) blocks.push({\n\t\ttype: \"tool_call\",\n\t\tid: toolCall.id,\n\t\tname: toolCall.name,\n\t\targs: toolCall.args\n\t});\n\treturn blocks;\n}\n/**\n* Converts a ChatOpenAICompletions message chunk to an array of v1 standard content blocks.\n*\n* This function processes an AI message chunk from OpenAI's chat completions API and converts\n* it to the standardized v1 content block format. It handles both string and array content,\n* as well as tool calls that may be present in the chunk.\n*\n* @param message - The AI message chunk containing OpenAI-formatted content blocks\n* @returns Array of content blocks in v1 standard format\n*\n* @example\n* ```typescript\n* const chunk = new AIMessage(\"Hello\");\n* const standardBlocks = convertToV1FromChatCompletionsChunk(chunk);\n* // Returns: [{ type: \"text\", text: \"Hello\" }]\n* ```\n*\n* @example\n* ```typescript\n* const chunk = new AIMessage([\n* { type: \"text\", text: \"Processing...\" }\n* ]);\n* chunk.tool_calls = [\n* { id: \"call_456\", name: \"search\", args: { query: \"test\" } }\n* ];\n*\n* const standardBlocks = convertToV1FromChatCompletionsChunk(chunk);\n* // Returns:\n* // [\n* // { type: \"text\", text: \"Processing...\" },\n* // { type: \"tool_call\", id: \"call_456\", name: \"search\", args: { query: \"test\" } }\n* // ]\n* ```\n*/\nfunction convertToV1FromChatCompletionsChunk(message) {\n\tconst blocks = [];\n\tif (typeof message.content === \"string\") blocks.push({\n\t\ttype: \"text\",\n\t\ttext: message.content\n\t});\n\telse blocks.push(...convertToV1FromChatCompletionsInput(message.content));\n\tfor (const toolCall of message.tool_calls ?? []) blocks.push({\n\t\ttype: \"tool_call\",\n\t\tid: toolCall.id,\n\t\tname: toolCall.name,\n\t\targs: toolCall.args\n\t});\n\treturn blocks;\n}\n/**\n* Converts an array of ChatOpenAICompletions content blocks to v1 standard content blocks.\n*\n* This function processes content blocks from OpenAI's Chat Completions API format\n* and converts them to the standardized v1 content block format. It handles both\n* OpenAI-specific data blocks (which require conversion) and standard blocks\n* (which are passed through with type assertion).\n*\n* @param blocks - Array of content blocks in ChatOpenAICompletions format\n* @returns Array of content blocks in v1 standard format\n*\n* @example\n* ```typescript\n* const openaiBlocks = [\n* { type: \"text\", text: \"Hello world\" },\n* { type: \"image_url\", image_url: { url: \"https://example.com/image.png\" } }\n* ];\n*\n* const standardBlocks = convertToV1FromChatCompletionsInput(openaiBlocks);\n* // Returns:\n* // [\n* // { type: \"text\", text: \"Hello world\" },\n* // { type: \"image\", url: \"https://example.com/image.png\" }\n* // ]\n* ```\n*/\nfunction convertToV1FromChatCompletionsInput(blocks) {\n\tconst convertedBlocks = [];\n\tfor (const block of blocks) if (isOpenAIDataBlock(block)) convertedBlocks.push(convertToV1FromOpenAIDataBlock(block));\n\telse convertedBlocks.push(block);\n\treturn convertedBlocks;\n}\nfunction convertResponsesAnnotation(annotation) {\n\tif (annotation.type === \"url_citation\") {\n\t\tconst { url, title, start_index, end_index } = annotation;\n\t\treturn {\n\t\t\ttype: \"citation\",\n\t\t\turl,\n\t\t\ttitle,\n\t\t\tstartIndex: start_index,\n\t\t\tendIndex: end_index\n\t\t};\n\t}\n\tif (annotation.type === \"file_citation\") {\n\t\tconst { file_id, filename, index } = annotation;\n\t\treturn {\n\t\t\ttype: \"citation\",\n\t\t\ttitle: filename,\n\t\t\tstartIndex: index,\n\t\t\tendIndex: index,\n\t\t\tfileId: file_id\n\t\t};\n\t}\n\treturn annotation;\n}\n/**\n* Converts a ChatOpenAIResponses message to an array of v1 standard content blocks.\n*\n* This function processes an AI message containing OpenAI Responses-specific content blocks\n* and converts them to the standardized v1 content block format. It handles reasoning summaries,\n* text content with annotations, tool calls, and various tool outputs including code interpreter,\n* web search, file search, computer calls, and MCP-related blocks.\n*\n* @param message - The AI message containing OpenAI Responses-formatted content blocks\n* @returns Array of content blocks in v1 standard format\n*\n* @example\n* ```typescript\n* const message = new AIMessage({\n* content: [{ type: \"text\", text: \"Hello world\", annotations: [] }],\n* tool_calls: [{ id: \"123\", name: \"calculator\", args: { a: 1, b: 2 } }],\n* additional_kwargs: {\n* reasoning: { summary: [{ text: \"Let me calculate this...\" }] },\n* tool_outputs: [\n* {\n* type: \"code_interpreter_call\",\n* code: \"print('hello')\",\n* outputs: [{ type: \"logs\", logs: \"hello\" }]\n* }\n* ]\n* }\n* });\n*\n* const standardBlocks = convertToV1FromResponses(message);\n* // Returns:\n* // [\n* // { type: \"reasoning\", reasoning: \"Let me calculate this...\" },\n* // { type: \"text\", text: \"Hello world\", annotations: [] },\n* // { type: \"tool_call\", id: \"123\", name: \"calculator\", args: { a: 1, b: 2 } },\n* // { type: \"code_interpreter_call\", code: \"print('hello')\" },\n* // { type: \"code_interpreter_result\", output: [{ type: \"code_interpreter_output\", returnCode: 0, stdout: \"hello\" }] }\n* // ]\n* ```\n*/\nfunction convertToV1FromResponses(message) {\n\tfunction* iterateContent() {\n\t\tif (_isObject(message.additional_kwargs?.reasoning) && _isArray(message.additional_kwargs.reasoning.summary)) {\n\t\t\tconst summary = message.additional_kwargs.reasoning.summary.reduce((acc, item) => {\n\t\t\t\tif (_isObject(item) && _isString(item.text)) return `${acc}${item.text}`;\n\t\t\t\treturn acc;\n\t\t\t}, \"\");\n\t\t\tyield {\n\t\t\t\ttype: \"reasoning\",\n\t\t\t\treasoning: summary\n\t\t\t};\n\t\t}\n\t\tconst content = typeof message.content === \"string\" ? [{\n\t\t\ttype: \"text\",\n\t\t\ttext: message.content\n\t\t}] : message.content;\n\t\tfor (const block of content) if (_isContentBlock(block, \"text\")) {\n\t\t\tconst { text, annotations,...rest } = block;\n\t\t\tif (Array.isArray(annotations)) yield {\n\t\t\t\t...rest,\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: String(text),\n\t\t\t\tannotations: annotations.map(convertResponsesAnnotation)\n\t\t\t};\n\t\t\telse yield {\n\t\t\t\t...rest,\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: String(text)\n\t\t\t};\n\t\t}\n\t\tfor (const toolCall of message.tool_calls ?? []) yield {\n\t\t\ttype: \"tool_call\",\n\t\t\tid: toolCall.id,\n\t\t\tname: toolCall.name,\n\t\t\targs: toolCall.args\n\t\t};\n\t\tif (_isObject(message.additional_kwargs) && _isArray(message.additional_kwargs.tool_outputs)) for (const toolOutput of message.additional_kwargs.tool_outputs) {\n\t\t\tif (_isContentBlock(toolOutput, \"web_search_call\")) {\n\t\t\t\tyield {\n\t\t\t\t\tid: toolOutput.id,\n\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\tname: \"web_search\",\n\t\t\t\t\targs: { query: toolOutput.query }\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(toolOutput, \"file_search_call\")) {\n\t\t\t\tyield {\n\t\t\t\t\tid: toolOutput.id,\n\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\tname: \"file_search\",\n\t\t\t\t\targs: { query: toolOutput.query }\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(toolOutput, \"computer_call\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: toolOutput\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(toolOutput, \"code_interpreter_call\")) {\n\t\t\t\tif (_isString(toolOutput.code)) yield {\n\t\t\t\t\tid: toolOutput.id,\n\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\tname: \"code_interpreter\",\n\t\t\t\t\targs: { code: toolOutput.code }\n\t\t\t\t};\n\t\t\t\tif (_isArray(toolOutput.outputs)) {\n\t\t\t\t\tconst returnCode = iife(() => {\n\t\t\t\t\t\tif (toolOutput.status === \"in_progress\") return void 0;\n\t\t\t\t\t\tif (toolOutput.status === \"completed\") return 0;\n\t\t\t\t\t\tif (toolOutput.status === \"incomplete\") return 127;\n\t\t\t\t\t\tif (toolOutput.status === \"interpreting\") return void 0;\n\t\t\t\t\t\tif (toolOutput.status === \"failed\") return 1;\n\t\t\t\t\t\treturn void 0;\n\t\t\t\t\t});\n\t\t\t\t\tfor (const output of toolOutput.outputs) if (_isContentBlock(output, \"logs\")) {\n\t\t\t\t\t\tyield {\n\t\t\t\t\t\t\ttype: \"server_tool_call_result\",\n\t\t\t\t\t\t\ttoolCallId: toolOutput.id ?? \"\",\n\t\t\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\t\t\toutput: {\n\t\t\t\t\t\t\t\ttype: \"code_interpreter_output\",\n\t\t\t\t\t\t\t\treturnCode: returnCode ?? 0,\n\t\t\t\t\t\t\t\tstderr: [0, void 0].includes(returnCode) ? void 0 : String(output.logs),\n\t\t\t\t\t\t\t\tstdout: [0, void 0].includes(returnCode) ? String(output.logs) : void 0\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(toolOutput, \"mcp_call\")) {\n\t\t\t\tyield {\n\t\t\t\t\tid: toolOutput.id,\n\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\tname: \"mcp_call\",\n\t\t\t\t\targs: toolOutput.input\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(toolOutput, \"mcp_list_tools\")) {\n\t\t\t\tyield {\n\t\t\t\t\tid: toolOutput.id,\n\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\tname: \"mcp_list_tools\",\n\t\t\t\t\targs: toolOutput.input\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(toolOutput, \"mcp_approval_request\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: toolOutput\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(toolOutput, \"image_generation_call\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: toolOutput\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (_isObject(toolOutput)) yield {\n\t\t\t\ttype: \"non_standard\",\n\t\t\t\tvalue: toolOutput\n\t\t\t};\n\t\t}\n\t}\n\treturn Array.from(iterateContent());\n}\n/**\n* Converts a ChatOpenAIResponses message chunk to an array of v1 standard content blocks.\n*\n* This function processes an AI message chunk containing OpenAI-specific content blocks\n* and converts them to the standardized v1 content block format. It handles both the\n* regular message content and tool call chunks that are specific to streaming responses.\n*\n* @param message - The AI message chunk containing OpenAI-formatted content blocks\n* @returns Array of content blocks in v1 standard format\n*\n* @example\n* ```typescript\n* const messageChunk = new AIMessageChunk({\n* content: [{ type: \"text\", text: \"Hello\" }],\n* tool_call_chunks: [\n* { id: \"call_123\", name: \"calculator\", args: '{\"a\": 1' }\n* ]\n* });\n*\n* const standardBlocks = convertToV1FromResponsesChunk(messageChunk);\n* // Returns:\n* // [\n* // { type: \"text\", text: \"Hello\" },\n* // { type: \"tool_call_chunk\", id: \"call_123\", name: \"calculator\", args: '{\"a\": 1' }\n* // ]\n* ```\n*/\nfunction convertToV1FromResponsesChunk(message) {\n\tfunction* iterateContent() {\n\t\tyield* convertToV1FromResponses(message);\n\t\tfor (const toolCallChunk of message.tool_call_chunks ?? []) yield {\n\t\t\ttype: \"tool_call_chunk\",\n\t\t\tid: toolCallChunk.id,\n\t\t\tname: toolCallChunk.name,\n\t\t\targs: toolCallChunk.args\n\t\t};\n\t}\n\treturn Array.from(iterateContent());\n}\nconst ChatOpenAITranslator = {\n\ttranslateContent: (message) => {\n\t\tif (typeof message.content === \"string\") return convertToV1FromChatCompletions(message);\n\t\treturn convertToV1FromResponses(message);\n\t},\n\ttranslateContentChunk: (message) => {\n\t\tif (typeof message.content === \"string\") return convertToV1FromChatCompletionsChunk(message);\n\t\treturn convertToV1FromResponsesChunk(message);\n\t}\n};\n\n//#endregion\nexport { ChatOpenAITranslator, convertToV1FromChatCompletionsInput };\n//# sourceMappingURL=openai.js.map"],"names":[],"mappings":";;AAwCA,SAAS,+BAA+B,SAAS;AAChD,QAAM,SAAS,CAAA;AACf,MAAI,OAAO,QAAQ,YAAY,SAAU,QAAO,KAAK;AAAA,IACpD,MAAM;AAAA,IACN,MAAM,QAAQ;AAAA,EAChB,CAAE;AAAA,MACI,QAAO,KAAK,GAAG,oCAAoC,QAAQ,OAAO,CAAC;AACxE,aAAW,YAAY,QAAQ,cAAc,CAAA,EAAI,QAAO,KAAK;AAAA,IAC5D,MAAM;AAAA,IACN,IAAI,SAAS;AAAA,IACb,MAAM,SAAS;AAAA,IACf,MAAM,SAAS;AAAA,EACjB,CAAE;AACD,SAAO;AACR;AAmCA,SAAS,oCAAoC,SAAS;AACrD,QAAM,SAAS,CAAA;AACf,MAAI,OAAO,QAAQ,YAAY,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,MAAM;AAAA,UACN,MAAM,WAAW;AAAA,QACtB;AACI;AAAA,MACD,WAAW,gBAAgB,YAAY,sBAAsB,GAAG;AAC/D,cAAM;AAAA,UACL,MAAM;AAAA,UACN,OAAO;AAAA,QACZ;AACI;AAAA,MACD,WAAW,gBAAgB,YAAY,uBAAuB,GAAG;AAChE,cAAM;AAAA,UACL,MAAM;AAAA,UACN,OAAO;AAAA,QACZ;AACI;AAAA,MACD;AACA,UAAI,UAAU,UAAU,EAAG,OAAM;AAAA,QAChC,MAAM;AAAA,QACN,OAAO;AAAA,MACX;AAAA,IACE;AAAA,EACD;AACA,SAAO,MAAM,KAAK,gBAAgB;AACnC;AA4BA,SAAS,8BAA8B,SAAS;AAC/C,YAAU,iBAAiB;AAC1B,WAAO,yBAAyB,OAAO;AACvC,eAAW,iBAAiB,QAAQ,oBAAoB,CAAA,EAAI,OAAM;AAAA,MACjE,MAAM;AAAA,MACN,IAAI,cAAc;AAAA,MAClB,MAAM,cAAc;AAAA,MACpB,MAAM,cAAc;AAAA,IACvB;AAAA,EACC;AACA,SAAO,MAAM,KAAK,gBAAgB;AACnC;AACK,MAAC,uBAAuB;AAAA,EAC5B,kBAAkB,CAAC,YAAY;AAC9B,QAAI,OAAO,QAAQ,YAAY,SAAU,QAAO,+BAA+B,OAAO;AACtF,WAAO,yBAAyB,OAAO;AAAA,EACxC;AAAA,EACA,uBAAuB,CAAC,YAAY;AACnC,QAAI,OAAO,QAAQ,YAAY,SAAU,QAAO,oCAAoC,OAAO;AAC3F,WAAO,8BAA8B,OAAO;AAAA,EAC7C;AACD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es60.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/anthropic.js"],"sourcesContent":["import { _isArray, _isContentBlock, _isNumber, _isObject, _isString, iife, safeParseJson } from \"./utils.js\";\n\n//#region src/messages/block_translators/anthropic.ts\nfunction convertAnthropicAnnotation(citation) {\n\tif (citation.type === \"char_location\" && _isString(citation.document_title) && _isNumber(citation.start_char_index) && _isNumber(citation.end_char_index) && _isString(citation.cited_text)) {\n\t\tconst { document_title, start_char_index, end_char_index, cited_text,...rest } = citation;\n\t\treturn {\n\t\t\t...rest,\n\t\t\ttype: \"citation\",\n\t\t\tsource: \"char\",\n\t\t\ttitle: document_title ?? void 0,\n\t\t\tstartIndex: start_char_index,\n\t\t\tendIndex: end_char_index,\n\t\t\tcitedText: cited_text\n\t\t};\n\t}\n\tif (citation.type === \"page_location\" && _isString(citation.document_title) && _isNumber(citation.start_page_number) && _isNumber(citation.end_page_number) && _isString(citation.cited_text)) {\n\t\tconst { document_title, start_page_number, end_page_number, cited_text,...rest } = citation;\n\t\treturn {\n\t\t\t...rest,\n\t\t\ttype: \"citation\",\n\t\t\tsource: \"page\",\n\t\t\ttitle: document_title ?? void 0,\n\t\t\tstartIndex: start_page_number,\n\t\t\tendIndex: end_page_number,\n\t\t\tcitedText: cited_text\n\t\t};\n\t}\n\tif (citation.type === \"content_block_location\" && _isString(citation.document_title) && _isNumber(citation.start_block_index) && _isNumber(citation.end_block_index) && _isString(citation.cited_text)) {\n\t\tconst { document_title, start_block_index, end_block_index, cited_text,...rest } = citation;\n\t\treturn {\n\t\t\t...rest,\n\t\t\ttype: \"citation\",\n\t\t\tsource: \"block\",\n\t\t\ttitle: document_title ?? void 0,\n\t\t\tstartIndex: start_block_index,\n\t\t\tendIndex: end_block_index,\n\t\t\tcitedText: cited_text\n\t\t};\n\t}\n\tif (citation.type === \"web_search_result_location\" && _isString(citation.url) && _isString(citation.title) && _isString(citation.encrypted_index) && _isString(citation.cited_text)) {\n\t\tconst { url, title, encrypted_index, cited_text,...rest } = citation;\n\t\treturn {\n\t\t\t...rest,\n\t\t\ttype: \"citation\",\n\t\t\tsource: \"url\",\n\t\t\turl,\n\t\t\ttitle,\n\t\t\tstartIndex: Number(encrypted_index),\n\t\t\tendIndex: Number(encrypted_index),\n\t\t\tcitedText: cited_text\n\t\t};\n\t}\n\tif (citation.type === \"search_result_location\" && _isString(citation.source) && _isString(citation.title) && _isNumber(citation.start_block_index) && _isNumber(citation.end_block_index) && _isString(citation.cited_text)) {\n\t\tconst { source, title, start_block_index, end_block_index, cited_text,...rest } = citation;\n\t\treturn {\n\t\t\t...rest,\n\t\t\ttype: \"citation\",\n\t\t\tsource: \"search\",\n\t\t\turl: source,\n\t\t\ttitle: title ?? void 0,\n\t\t\tstartIndex: start_block_index,\n\t\t\tendIndex: end_block_index,\n\t\t\tcitedText: cited_text\n\t\t};\n\t}\n\treturn void 0;\n}\n/**\n* Converts an Anthropic content block to a standard V1 content block.\n*\n* This function handles the conversion of Anthropic-specific content blocks\n* (document and image blocks) to the standardized V1 format. It supports\n* various source types including base64 data, URLs, file IDs, and text data.\n*\n* @param block - The Anthropic content block to convert\n* @returns A standard V1 content block if conversion is successful, undefined otherwise\n*\n* @example\n* ```typescript\n* const anthropicBlock = {\n* type: \"image\",\n* source: {\n* type: \"base64\",\n* media_type: \"image/png\",\n* data: \"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==\"\n* }\n* };\n*\n* const standardBlock = convertToV1FromAnthropicContentBlock(anthropicBlock);\n* // Returns: { type: \"image\", mimeType: \"image/png\", data: \"...\" }\n* ```\n*/\nfunction convertToV1FromAnthropicContentBlock(block) {\n\tif (_isContentBlock(block, \"document\") && _isObject(block.source) && \"type\" in block.source) {\n\t\tif (block.source.type === \"base64\" && _isString(block.source.media_type) && _isString(block.source.data)) return {\n\t\t\ttype: \"file\",\n\t\t\tmimeType: block.source.media_type,\n\t\t\tdata: block.source.data\n\t\t};\n\t\telse if (block.source.type === \"url\" && _isString(block.source.url)) return {\n\t\t\ttype: \"file\",\n\t\t\turl: block.source.url\n\t\t};\n\t\telse if (block.source.type === \"file\" && _isString(block.source.file_id)) return {\n\t\t\ttype: \"file\",\n\t\t\tfileId: block.source.file_id\n\t\t};\n\t\telse if (block.source.type === \"text\" && _isString(block.source.data)) return {\n\t\t\ttype: \"file\",\n\t\t\tmimeType: String(block.source.media_type ?? \"text/plain\"),\n\t\t\tdata: block.source.data\n\t\t};\n\t} else if (_isContentBlock(block, \"image\") && _isObject(block.source) && \"type\" in block.source) {\n\t\tif (block.source.type === \"base64\" && _isString(block.source.media_type) && _isString(block.source.data)) return {\n\t\t\ttype: \"image\",\n\t\t\tmimeType: block.source.media_type,\n\t\t\tdata: block.source.data\n\t\t};\n\t\telse if (block.source.type === \"url\" && _isString(block.source.url)) return {\n\t\t\ttype: \"image\",\n\t\t\turl: block.source.url\n\t\t};\n\t\telse if (block.source.type === \"file\" && _isString(block.source.file_id)) return {\n\t\t\ttype: \"image\",\n\t\t\tfileId: block.source.file_id\n\t\t};\n\t}\n\treturn void 0;\n}\n/**\n* Converts an array of content blocks from Anthropic format to v1 standard format.\n*\n* This function processes each content block in the input array, attempting to convert\n* Anthropic-specific block formats (like image blocks with source objects, document blocks, etc.)\n* to the standardized v1 content block format. If a block cannot be converted, it is\n* passed through as-is with a type assertion to ContentBlock.Standard.\n*\n* @param content - Array of content blocks in Anthropic format to be converted\n* @returns Array of content blocks in v1 standard format\n*/\nfunction convertToV1FromAnthropicInput(content) {\n\tfunction* iterateContent() {\n\t\tfor (const block of content) {\n\t\t\tconst stdBlock = convertToV1FromAnthropicContentBlock(block);\n\t\t\tif (stdBlock) yield stdBlock;\n\t\t\telse yield block;\n\t\t}\n\t}\n\treturn Array.from(iterateContent());\n}\n/**\n* Converts an Anthropic AI message to an array of v1 standard content blocks.\n*\n* This function processes an AI message containing Anthropic-specific content blocks\n* and converts them to the standardized v1 content block format.\n*\n* @param message - The AI message containing Anthropic-formatted content blocks\n* @returns Array of content blocks in v1 standard format\n*\n* @example\n* ```typescript\n* const message = new AIMessage([\n* { type: \"text\", text: \"Hello world\" },\n* { type: \"thinking\", text: \"Let me think about this...\" },\n* { type: \"tool_use\", id: \"123\", name: \"calculator\", input: { a: 1, b: 2 } }\n* ]);\n*\n* const standardBlocks = convertToV1FromAnthropicMessage(message);\n* // Returns:\n* // [\n* // { type: \"text\", text: \"Hello world\" },\n* // { type: \"reasoning\", reasoning: \"Let me think about this...\" },\n* // { type: \"tool_call\", id: \"123\", name: \"calculator\", args: { a: 1, b: 2 } }\n* // ]\n* ```\n*/\nfunction convertToV1FromAnthropicMessage(message) {\n\tfunction* iterateContent() {\n\t\tconst content = typeof message.content === \"string\" ? [{\n\t\t\ttype: \"text\",\n\t\t\ttext: message.content\n\t\t}] : message.content;\n\t\tfor (const block of content) {\n\t\t\tif (_isContentBlock(block, \"text\") && _isString(block.text)) {\n\t\t\t\tconst { text, citations,...rest } = block;\n\t\t\t\tif (_isArray(citations) && citations.length) {\n\t\t\t\t\tconst _citations = citations.reduce((acc, item) => {\n\t\t\t\t\t\tconst citation = convertAnthropicAnnotation(item);\n\t\t\t\t\t\tif (citation) return [...acc, citation];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, []);\n\t\t\t\t\tyield {\n\t\t\t\t\t\t...rest,\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext,\n\t\t\t\t\t\tannotations: _citations\n\t\t\t\t\t};\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tyield {\n\t\t\t\t\t\t...rest,\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext\n\t\t\t\t\t};\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (_isContentBlock(block, \"thinking\") && _isString(block.thinking)) {\n\t\t\t\tconst { thinking, signature,...rest } = block;\n\t\t\t\tyield {\n\t\t\t\t\t...rest,\n\t\t\t\t\ttype: \"reasoning\",\n\t\t\t\t\treasoning: thinking,\n\t\t\t\t\tsignature\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"redacted_thinking\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"tool_use\") && _isString(block.name) && _isString(block.id)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"tool_call\",\n\t\t\t\t\tid: block.id,\n\t\t\t\t\tname: block.name,\n\t\t\t\t\targs: block.input\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"input_json_delta\")) {\n\t\t\t\tif (_isAIMessageChunk(message) && message.tool_call_chunks?.length) {\n\t\t\t\t\tconst tool_call_chunk = message.tool_call_chunks[0];\n\t\t\t\t\tyield {\n\t\t\t\t\t\ttype: \"tool_call_chunk\",\n\t\t\t\t\t\tid: tool_call_chunk.id,\n\t\t\t\t\t\tname: tool_call_chunk.name,\n\t\t\t\t\t\targs: tool_call_chunk.args,\n\t\t\t\t\t\tindex: tool_call_chunk.index\n\t\t\t\t\t};\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (_isContentBlock(block, \"server_tool_use\") && _isString(block.name) && _isString(block.id)) {\n\t\t\t\tconst { name, id } = block;\n\t\t\t\tif (name === \"web_search\") {\n\t\t\t\t\tconst query = iife(() => {\n\t\t\t\t\t\tif (typeof block.input === \"string\") return block.input;\n\t\t\t\t\t\telse if (_isObject(block.input) && _isString(block.input.query)) return block.input.query;\n\t\t\t\t\t\telse if (_isString(block.partial_json)) {\n\t\t\t\t\t\t\tconst json = safeParseJson(block.partial_json);\n\t\t\t\t\t\t\tif (json?.query) return json.query;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t});\n\t\t\t\t\tyield {\n\t\t\t\t\t\tid,\n\t\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\t\tname: \"web_search\",\n\t\t\t\t\t\targs: { query }\n\t\t\t\t\t};\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (block.name === \"code_execution\") {\n\t\t\t\t\tconst code = iife(() => {\n\t\t\t\t\t\tif (typeof block.input === \"string\") return block.input;\n\t\t\t\t\t\telse if (_isObject(block.input) && _isString(block.input.code)) return block.input.code;\n\t\t\t\t\t\telse if (_isString(block.partial_json)) {\n\t\t\t\t\t\t\tconst json = safeParseJson(block.partial_json);\n\t\t\t\t\t\t\tif (json?.code) return json.code;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t});\n\t\t\t\t\tyield {\n\t\t\t\t\t\tid,\n\t\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\t\tname: \"code_execution\",\n\t\t\t\t\t\targs: { code }\n\t\t\t\t\t};\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (_isContentBlock(block, \"web_search_tool_result\") && _isString(block.tool_use_id) && _isArray(block.content)) {\n\t\t\t\tconst { content: content$1, tool_use_id } = block;\n\t\t\t\tconst urls = content$1.reduce((acc, content$2) => {\n\t\t\t\t\tif (_isContentBlock(content$2, \"web_search_result\")) return [...acc, content$2.url];\n\t\t\t\t\treturn acc;\n\t\t\t\t}, []);\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"server_tool_call_result\",\n\t\t\t\t\tname: \"web_search\",\n\t\t\t\t\ttoolCallId: tool_use_id,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\toutput: { urls }\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"code_execution_tool_result\") && _isString(block.tool_use_id) && _isObject(block.content)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"server_tool_call_result\",\n\t\t\t\t\tname: \"code_execution\",\n\t\t\t\t\ttoolCallId: block.tool_use_id,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\toutput: block.content\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"mcp_tool_use\")) {\n\t\t\t\tyield {\n\t\t\t\t\tid: block.id,\n\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\tname: \"mcp_tool_use\",\n\t\t\t\t\targs: block.input\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"mcp_tool_result\") && _isString(block.tool_use_id) && _isObject(block.content)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"server_tool_call_result\",\n\t\t\t\t\tname: \"mcp_tool_use\",\n\t\t\t\t\ttoolCallId: block.tool_use_id,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\toutput: block.content\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"container_upload\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\tname: \"container_upload\",\n\t\t\t\t\targs: block.input\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"search_result\")) {\n\t\t\t\tyield {\n\t\t\t\t\tid: block.id,\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"tool_result\")) {\n\t\t\t\tyield {\n\t\t\t\t\tid: block.id,\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tconst stdBlock = convertToV1FromAnthropicContentBlock(block);\n\t\t\t\tif (stdBlock) {\n\t\t\t\t\tyield stdBlock;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield {\n\t\t\t\ttype: \"non_standard\",\n\t\t\t\tvalue: block\n\t\t\t};\n\t\t}\n\t}\n\treturn Array.from(iterateContent());\n}\nconst ChatAnthropicTranslator = {\n\ttranslateContent: convertToV1FromAnthropicMessage,\n\ttranslateContentChunk: convertToV1FromAnthropicMessage\n};\nfunction _isAIMessageChunk(message) {\n\treturn typeof message?._getType === \"function\" && typeof message.concat === \"function\" && message._getType() === \"ai\";\n}\n\n//#endregion\nexport { ChatAnthropicTranslator, convertToV1FromAnthropicInput };\n//# sourceMappingURL=anthropic.js.map"],"names":[],"mappings":";AAGA,SAAS,2BAA2B,UAAU;AAC7C,MAAI,SAAS,SAAS,mBAAmB,UAAU,SAAS,cAAc,KAAK,UAAU,SAAS,gBAAgB,KAAK,UAAU,SAAS,cAAc,KAAK,UAAU,SAAS,UAAU,GAAG;AAC5L,UAAM,EAAE,gBAAgB,kBAAkB,gBAAgB,YAAW,GAAG,KAAI,IAAK;AACjF,WAAO;AAAA,MACN,GAAG;AAAA,MACH,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,OAAO,kBAAkB;AAAA,MACzB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,WAAW;AAAA,IACd;AAAA,EACC;AACA,MAAI,SAAS,SAAS,mBAAmB,UAAU,SAAS,cAAc,KAAK,UAAU,SAAS,iBAAiB,KAAK,UAAU,SAAS,eAAe,KAAK,UAAU,SAAS,UAAU,GAAG;AAC9L,UAAM,EAAE,gBAAgB,mBAAmB,iBAAiB,YAAW,GAAG,KAAI,IAAK;AACnF,WAAO;AAAA,MACN,GAAG;AAAA,MACH,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,OAAO,kBAAkB;AAAA,MACzB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,WAAW;AAAA,IACd;AAAA,EACC;AACA,MAAI,SAAS,SAAS,4BAA4B,UAAU,SAAS,cAAc,KAAK,UAAU,SAAS,iBAAiB,KAAK,UAAU,SAAS,eAAe,KAAK,UAAU,SAAS,UAAU,GAAG;AACvM,UAAM,EAAE,gBAAgB,mBAAmB,iBAAiB,YAAW,GAAG,KAAI,IAAK;AACnF,WAAO;AAAA,MACN,GAAG;AAAA,MACH,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,OAAO,kBAAkB;AAAA,MACzB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,WAAW;AAAA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