@mcp-use/inspector 20.0.0-beta.1 → 20.0.0-beta.10

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 (276) hide show
  1. package/README.md +7 -18
  2. package/dist/cdn/{AnimatePresence-B4HhIdgq.js → AnimatePresence-D1bZ5_-l.js} +80 -79
  3. package/dist/cdn/ChatTab-DRn-AnBV.js +6811 -0
  4. package/dist/cdn/{CheckboxIndicator-BF2cKfbA.js → CheckboxIndicator-BjF73mGX.js} +74 -73
  5. package/dist/cdn/ConnectionSettingsForm-CsG61Iyd.js +929 -0
  6. package/dist/cdn/ConnectionSettingsTab-CTJJK4hj.js +151 -0
  7. package/dist/cdn/{ElicitationTab-upPXq2q7.js → ElicitationTab-PEmEDvC5.js} +48 -47
  8. package/dist/cdn/{FormContext-Cl51-7O7.js → FormContext-NtUiZclE.js} +26 -26
  9. package/dist/cdn/{InspectorContext-DzXtgyTx.js → InspectorContext-BBKCdfmK.js} +2 -22
  10. package/dist/cdn/{JSONDisplay-D3RcyO9z.js → JSONDisplay-BJqMz7Ny.js} +23 -23
  11. package/dist/cdn/{ListTabHeader-8lULn-90.js → ListTabHeader-DzmTtN1e.js} +21 -20
  12. package/dist/cdn/{WidgetWrapper-D29YDxIu.js → MCPAppsDebugControls-C5-knSKL.js} +583 -620
  13. package/dist/cdn/{ManufactOAuthCallback-DEM8mhWD.js → ManufactOAuthCallback-ChbbjFIT.js} +3 -3
  14. package/dist/cdn/MarkdownRenderer-uUvyteZT.js +3610 -0
  15. package/dist/cdn/McpAppsViewPanel-Bj-1E9_v.js +56 -0
  16. package/dist/cdn/{NotificationsTab-CWopTIzT.js → NotificationsTab-B7uebqMV.js} +13 -13
  17. package/dist/cdn/{OAuthCallback-k3oeLtIC.js → OAuthCallback-Hdtybeu0.js} +3 -3
  18. package/dist/cdn/PromptsTab-b4UpzPPY.js +902 -0
  19. package/dist/cdn/{ResourcesTab-KfamsM6-.js → ResourcesTab-BCA0_b8c.js} +106 -124
  20. package/dist/cdn/{SamplingTab-vcufuK24.js → SamplingTab-CuPYqFyA.js} +43 -42
  21. package/dist/cdn/{ServerMetadataTab-DS0eiyyD.js → ServerMetadataTab-BM3VhSLf.js} +14 -14
  22. package/dist/cdn/{StatusIcon-BGXOEU2u.js → StatusIcon-Q3n3YRtE.js} +8 -9
  23. package/dist/cdn/{ToolsTab-DRjcZnpu.js → ToolsTab-4lvUZRQq.js} +671 -693
  24. package/dist/cdn/{ViewPreview-B_onhcUB.js → ViewPreview-BGClMNvo.js} +5 -4
  25. package/dist/cdn/{WidgetDebugContext-D4usL_MA.js → WidgetDebugContext-B6yoOVVV.js} +1 -11
  26. package/dist/cdn/WidgetWrapper-BlbQAh_X.js +12 -0
  27. package/dist/cdn/{bell-CGjAO_0s.js → bell-GrTZcnD2.js} +1 -1
  28. package/dist/cdn/{browser-CbQIH4w2.js → browser-DG2Z8392.js} +1 -1
  29. package/dist/cdn/{brush-B_mKhyxG.js → brush-CelVvMGp.js} +1 -1
  30. package/dist/cdn/button-CB4uOoUV.js +2509 -0
  31. package/dist/cdn/{card-DqjqAq0o.js → card-BA-DQk-G.js} +2 -2
  32. package/dist/cdn/{checkbox-B4oUG6Rr.js → checkbox-kwVa4gRX.js} +4 -4
  33. package/dist/cdn/{clock-CmUbSx_B.js → clock-YMF8Gtw5.js} +1 -1
  34. package/dist/cdn/{code-V_0nf5rg.js → code-C8sN2OGR.js} +1 -1
  35. package/dist/cdn/{jsx-runtime-CIxvMpEo.js → createLucideIcon-BONxC1L5.js} +57 -24
  36. package/dist/cdn/{dialog-Dnl-pZsY.js → dialog-CJGnC5Ag.js} +165 -165
  37. package/dist/cdn/{dist-DjXr_YO3.js → dist-CTJnCYmk.js} +1 -1
  38. package/dist/cdn/{dist-mRDqCgKU.js → dist-dw0FdK5Y.js} +116 -114
  39. package/dist/cdn/{external-link-CjmfT6rW.js → external-link-Bo4lQxr1.js} +1 -1
  40. package/dist/cdn/{eye-B7H96av8.js → eye-pSGG7nvf.js} +1 -1
  41. package/dist/cdn/{folder-open-B3lu2rG_.js → folder-open-aM8CPtBO.js} +1 -1
  42. package/dist/cdn/{hash-BVQnWi7q.js → hash-DDs2vE1k.js} +1 -1
  43. package/dist/cdn/{history-Csw4rb44.js → history-BfUFpL1d.js} +1 -1
  44. package/dist/cdn/{index-browser-CVUwR-Bu.js → index-browser-B1xWyLr0.js} +113 -201
  45. package/dist/cdn/{info-CNiOwqkf.js → info-BMkB68mB.js} +1 -1
  46. package/dist/cdn/{input-BLxOA7V-.js → input-BCpgLXU1.js} +3039 -3600
  47. package/dist/cdn/inspector.css +1 -1
  48. package/dist/cdn/inspector.js +7797 -7857
  49. package/dist/cdn/{label-CBvG613A.js → label-A0UGV8FE.js} +8 -8
  50. package/dist/cdn/{loader-circle-BLy9A_pp.js → loader-circle-BKRHJEB7.js} +1 -1
  51. package/dist/cdn/{manufact-auth-0TVxpeTA.js → manufact-auth-BQMHhbLV.js} +142 -106
  52. package/dist/cdn/{maximize-2-CH5Lq90B.js → maximize-2-DdrB_spi.js} +1 -1
  53. package/dist/cdn/{maximize-BALCV_ep.js → maximize-hSOCz133.js} +1 -1
  54. package/dist/cdn/{message-square-BnxdpJxZ.js → message-square-D3tKB3uJ.js} +1 -1
  55. package/dist/cdn/{not-found-BcNNsTjS.js → not-found-BajFyZpp.js} +4 -6
  56. package/dist/cdn/{play-vuZ5PLnI.js → play-B1leulYf.js} +1 -1
  57. package/dist/cdn/providerMeta-CjGU4rID.js +436 -0
  58. package/dist/cdn/{react-BxO-uEDZ.js → react-BoOQpLwo.js} +838 -849
  59. package/dist/cdn/{refresh-cw-BXY-Pa0U.js → refresh-cw-CyvXrS91.js} +1 -1
  60. package/dist/cdn/{save-Tgil_AJZ.js → save-CmdEPUAm.js} +1 -1
  61. package/dist/cdn/{select-BZ_IoKxg.js → select-CCFHjOGk.js} +843 -842
  62. package/dist/cdn/{servers-Dm72iTpY.js → servers-Dd0Vcp81.js} +5 -1
  63. package/dist/cdn/{shared-uMiV6Fx1.js → shared-CJVHJhag.js} +35 -35
  64. package/dist/cdn/sheet-oyq1mIyg.js +2078 -0
  65. package/dist/cdn/{sparkles-BntO2rDR.js → sparkles-CxeZpVtX.js} +1 -1
  66. package/dist/cdn/{spinner-CWcJhIY_.js → spinner-Be1GlSGX.js} +3 -3
  67. package/dist/cdn/{square-check-big-BvwQ17Bl.js → square-check-big-C_4wbfwF.js} +1 -1
  68. package/dist/cdn/{switch-DtQOLb9R.js → switch-DHXEA_N5.js} +211 -210
  69. package/dist/cdn/{tabs-subtle-C5cy35sY.js → tabs-subtle-Dubd6Kj8.js} +259 -258
  70. package/dist/cdn/{telemetry-Ct6pVkM1.js → telemetry-C7bt_ifQ.js} +38 -70
  71. package/dist/cdn/{textarea-Bj-CT7hC.js → textarea-CwmI8_uI.js} +2 -2
  72. package/dist/cdn/{trash-2-RwpJY5SL.js → trash-2-BhumJAFE.js} +1 -1
  73. package/dist/cdn/{useAriaLabelledBy-Bm9qHGK6.js → useAriaLabelledBy-Cra6w3YY.js} +2 -1
  74. package/dist/cdn/{useCompositeItem-CNJ6MXdi.js → useCompositeItem-Dhnm-7el.js} +3 -3
  75. package/dist/cdn/{useConfig-CwxZ6Quj.js → useConfig-DiOY6evp.js} +73 -46
  76. package/dist/cdn/{useSavedRequests-Ci2I919u.js → useSavedRequests-mSIsDd4c.js} +1 -1
  77. package/dist/cdn/{useViewHostProps-Dr6W2ooF.js → useViewHostProps-D1emxC9m.js} +124 -108
  78. package/dist/cdn/{wrench-DzGmCfnb.js → wrench-DvK20LUT.js} +1 -1
  79. package/dist/cdn/{x-C3vRQIYu.js → x-EilKPiCX.js} +1 -1
  80. package/dist/cdn/{zap-Mb-pbw2X.js → zap-0Wr9QO7N.js} +1 -1
  81. package/dist/cli.js +87 -14
  82. package/dist/client/auth/manufact-auth.d.ts +3 -1
  83. package/dist/client/auth/manufact-auth.d.ts.map +1 -1
  84. package/dist/client/components/ChatTab.d.ts +1 -8
  85. package/dist/client/components/ChatTab.d.ts.map +1 -1
  86. package/dist/client/components/MCPAppsDebugControls.d.ts.map +1 -1
  87. package/dist/client/components/ResourcesTab.d.ts.map +1 -1
  88. package/dist/client/components/ToolsTab.d.ts.map +1 -1
  89. package/dist/client/components/chat/ChatHeader.d.ts +7 -2
  90. package/dist/client/components/chat/ChatHeader.d.ts.map +1 -1
  91. package/dist/client/components/chat/ChatLandingForm.d.ts +4 -2
  92. package/dist/client/components/chat/ChatLandingForm.d.ts.map +1 -1
  93. package/dist/client/components/chat/ChatManagedNotice.d.ts +10 -0
  94. package/dist/client/components/chat/ChatManagedNotice.d.ts.map +1 -0
  95. package/dist/client/components/chat/ChatScrollTopFade.d.ts +7 -0
  96. package/dist/client/components/chat/ChatScrollTopFade.d.ts.map +1 -0
  97. package/dist/client/components/chat/ConfigurationDialog.d.ts +11 -9
  98. package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
  99. package/dist/client/components/chat/ConfigureEmptyState.d.ts +1 -6
  100. package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +1 -1
  101. package/dist/client/components/chat/MessageList.d.ts +1 -0
  102. package/dist/client/components/chat/MessageList.d.ts.map +1 -1
  103. package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +1 -1
  104. package/dist/client/components/chat/ToolResultRenderer.d.ts.map +1 -1
  105. package/dist/client/components/chat/chatModeStorage.d.ts +11 -0
  106. package/dist/client/components/chat/chatModeStorage.d.ts.map +1 -0
  107. package/dist/client/components/chat/managedChatNotice.d.ts +16 -0
  108. package/dist/client/components/chat/managedChatNotice.d.ts.map +1 -0
  109. package/dist/client/components/chat/partialToolArgs.d.ts +10 -0
  110. package/dist/client/components/chat/partialToolArgs.d.ts.map +1 -0
  111. package/dist/client/components/chat/providerMeta.d.ts +11 -0
  112. package/dist/client/components/chat/providerMeta.d.ts.map +1 -1
  113. package/dist/client/components/chat/types.d.ts +1 -0
  114. package/dist/client/components/chat/types.d.ts.map +1 -1
  115. package/dist/client/components/chat/useChatMessages.d.ts +7 -5
  116. package/dist/client/components/chat/useChatMessages.d.ts.map +1 -1
  117. package/dist/client/components/chat/useChatMessagesClientSide.d.ts +4 -6
  118. package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +1 -1
  119. package/dist/client/components/chat/useChatScrollToBottom.d.ts +1 -0
  120. package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +1 -1
  121. package/dist/client/components/chat/useConfig.d.ts +1 -1
  122. package/dist/client/components/chat/useConfig.d.ts.map +1 -1
  123. package/dist/client/components/chat/useHostedChatMode.d.ts +1 -1
  124. package/dist/client/components/chat/useHostedChatMode.d.ts.map +1 -1
  125. package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts +29 -0
  126. package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts.map +1 -0
  127. package/dist/client/components/shared/MarkdownRenderer.d.ts +2 -1
  128. package/dist/client/components/shared/MarkdownRenderer.d.ts.map +1 -1
  129. package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +1 -1
  130. package/dist/client/components/tools/ToolResultDisplay.d.ts +2 -1
  131. package/dist/client/components/tools/ToolResultDisplay.d.ts.map +1 -1
  132. package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -1
  133. package/dist/client/components/ui/MeshGradientCanvas.d.ts +13 -0
  134. package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +1 -0
  135. package/dist/client/components/ui/chat-message.d.ts +1 -1
  136. package/dist/client/components/ui/chat-message.d.ts.map +1 -1
  137. package/dist/client/components/ui/file-thumbnail.d.ts.map +1 -1
  138. package/dist/client/components/ui/mesh-animation-pause.d.ts +14 -0
  139. package/dist/client/components/ui/mesh-animation-pause.d.ts.map +1 -0
  140. package/dist/client/components/ui/mesh-gradient-colors.d.ts +6 -0
  141. package/dist/client/components/ui/mesh-gradient-colors.d.ts.map +1 -0
  142. package/dist/client/components/ui/mesh-tab-background.d.ts +3 -1
  143. package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -1
  144. package/dist/client/components/ui/not-found.d.ts.map +1 -1
  145. package/dist/client/context/InspectorContext.d.ts.map +1 -1
  146. package/dist/client/context/WidgetDebugContext.d.ts +1 -11
  147. package/dist/client/context/WidgetDebugContext.d.ts.map +1 -1
  148. package/dist/client/hooks/useDeviceViewport.d.ts +1 -5
  149. package/dist/client/hooks/useDeviceViewport.d.ts.map +1 -1
  150. package/dist/client/hooks/useViewHostProps.d.ts +1 -1
  151. package/dist/client/hooks/useViewHostProps.d.ts.map +1 -1
  152. package/dist/client/index.js +4202 -3491
  153. package/dist/client/telemetry/init.d.ts.map +1 -1
  154. package/dist/client/telemetry/utils.d.ts.map +1 -1
  155. package/dist/client/utils/servers.d.ts +5 -0
  156. package/dist/client/utils/servers.d.ts.map +1 -1
  157. package/dist/server/asset-urls.d.ts +4 -0
  158. package/dist/server/asset-urls.d.ts.map +1 -1
  159. package/dist/server/asset-urls.js +7 -3
  160. package/dist/server/cdn-shell.d.ts.map +1 -1
  161. package/dist/server/cdn-shell.js +3 -3
  162. package/dist/server/{chunk-IXYK6ZOY.js → chunk-5XMQ5UJR.js} +2 -2
  163. package/dist/server/{chunk-KBVKS4J5.js → chunk-H6ZCIKBS.js} +10 -0
  164. package/dist/server/{chunk-VDUV6LR6.js → chunk-KTPQKADO.js} +75 -5
  165. package/dist/server/{chunk-Y2GBQOQW.js → chunk-LMLZJR2K.js} +2 -9
  166. package/dist/server/{chunk-K2V2SDQD.js → chunk-OWR2BIBW.js} +1 -1
  167. package/dist/server/{chunk-5B3SXGZP.js → chunk-UJLXHNQP.js} +1 -1
  168. package/dist/server/{chunk-6XWDZEFF.js → chunk-XCNS5CIW.js} +8 -3
  169. package/dist/server/cli.js +5 -5
  170. package/dist/server/create-dev-api-app.js +3 -3
  171. package/dist/server/dev-callback-redirect.d.ts +3 -0
  172. package/dist/server/dev-callback-redirect.d.ts.map +1 -0
  173. package/dist/server/dev-callback-redirect.js +18 -0
  174. package/dist/server/index.js +6 -6
  175. package/dist/server/middleware.js +6 -6
  176. package/dist/server/proxy/index.js +1 -1
  177. package/dist/server/proxy/mcp-proxy.d.ts +2 -0
  178. package/dist/server/proxy/mcp-proxy.d.ts.map +1 -1
  179. package/dist/server/proxy/mcp-proxy.js +3 -1
  180. package/dist/server/proxy-routes.js +2 -2
  181. package/dist/server/server.js +3 -3
  182. package/dist/server/version.js +1 -1
  183. package/dist/server/vite-dev-api-plugin.js +3 -3
  184. package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +9 -0
  185. package/dist/web/assets/ChatTab-x6dg7xyx.js +18 -0
  186. package/dist/web/assets/ConnectionSettingsTab-DUwCNYXJ.js +1 -0
  187. package/dist/web/assets/ElicitationTab-Dk04sjRw.js +1 -0
  188. package/dist/web/assets/FormContext-sV-yByKz.js +1 -0
  189. package/dist/web/assets/ListTabHeader-CrGae306.js +1 -0
  190. package/dist/web/assets/MCPAppsDebugControls-Kh10bYHm.js +34 -0
  191. package/dist/web/assets/{ManufactOAuthCallback-DCLbW-mz.js → ManufactOAuthCallback-Bq00h5wq.js} +1 -1
  192. package/dist/web/assets/MarkdownRenderer--ZbJc80m.js +47 -0
  193. package/dist/web/assets/McpAppsViewPanel-BM7S0O6E.js +1 -0
  194. package/dist/web/assets/{NotificationsTab-JevzvJTg.js → NotificationsTab-DTcas5xQ.js} +1 -1
  195. package/dist/web/assets/{OAuthCallback-BjcRxLh5.js → OAuthCallback-CZ5PbMLP.js} +1 -1
  196. package/dist/web/assets/PromptsTab-Ce9hFDPL.js +15 -0
  197. package/dist/web/assets/ResourcesTab-CfV_CTOT.js +2 -0
  198. package/dist/web/assets/SamplingTab-7FoVfzSl.js +1 -0
  199. package/dist/web/assets/ServerMetadataTab-DfOYnm2P.js +1 -0
  200. package/dist/web/assets/ToolsTab-CeDM6lbc.js +8 -0
  201. package/dist/web/assets/ViewPreview-DMpWAByN.js +1 -0
  202. package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +1 -0
  203. package/dist/web/assets/{brush--0LobUi4.js → brush-DX0UZ_pI.js} +1 -1
  204. package/dist/web/assets/button-C8Xa2k4x.js +1 -0
  205. package/dist/web/assets/checkbox-ocTkuPLe.js +1 -0
  206. package/dist/web/assets/code-B14rVdNt.js +1 -0
  207. package/dist/web/assets/createLucideIcon-BEHeJH0M.js +1 -0
  208. package/dist/web/assets/dist-D6mojCV5.js +21 -0
  209. package/dist/web/assets/index-BfmL5fRO.js +499 -0
  210. package/dist/web/assets/index-bCIH1Sdx.css +1 -0
  211. package/dist/web/assets/input-C0OQCUZy.js +1 -0
  212. package/dist/web/assets/{label-B5Q_Zr8M.js → label-CI7JWQOo.js} +1 -1
  213. package/dist/web/assets/{maximize-2-BTT9QQU9.js → maximize-2-Br1WQzT2.js} +1 -1
  214. package/dist/web/assets/{maximize-_O55kFcr.js → maximize-CJNgRe6S.js} +1 -1
  215. package/dist/web/assets/{refresh-cw-C9wQl8_d.js → refresh-cw-B5iaAZKn.js} +1 -1
  216. package/dist/web/assets/{save-B-MsgxX9.js → save-TM6fvNrt.js} +1 -1
  217. package/dist/web/assets/select-D6jzbLJn.js +1 -0
  218. package/dist/web/assets/shared-BaJnSpaR.js +1 -0
  219. package/dist/web/assets/{sparkles-2OAsc1aP.js → sparkles-BGYTDThM.js} +1 -1
  220. package/dist/web/assets/tabs-subtle-C3U3Xswq.js +1 -0
  221. package/dist/web/assets/textarea-CRTXuRmE.js +1 -0
  222. package/dist/web/assets/useConfig-tIq2w5rV.js +1 -0
  223. package/dist/web/assets/useViewHostProps--1CXsG5i.js +1 -0
  224. package/dist/web/assets/{zap-Du2Uc5pa.js → zap-BDWHCVHU.js} +1 -1
  225. package/dist/web/index.html +10 -11
  226. package/package.json +5 -12
  227. package/dist/cdn/ChatTab-D8uwCHAf.js +0 -13218
  228. package/dist/cdn/ConnectionSettingsForm-BNS6bOMD.js +0 -873
  229. package/dist/cdn/ConnectionSettingsTab-B97gPPJW.js +0 -145
  230. package/dist/cdn/PromptsTab-Cspfnl6n.js +0 -4400
  231. package/dist/cdn/bundle-mjs-B0nmHDtp.js +0 -1953
  232. package/dist/cdn/chunk-BO2N2NFS-Cy167e0X.js +0 -17500
  233. package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
  234. package/dist/cdn/highlighted-body-OFNGDK62-CoReNbTX.js +0 -36
  235. package/dist/cdn/mermaid-GHXKKRXX-DgVIbk-D.js +0 -2
  236. package/dist/cdn/pdf-CxFT9FER.js +0 -16291
  237. package/dist/cdn/popover-C_SSrXT0.js +0 -2005
  238. package/dist/cdn/sheet-CerCdhxz.js +0 -78
  239. package/dist/cdn/useHostedSession-BA39Aegc.js +0 -153
  240. package/dist/cdn/useMCPPrompts-D3_Hla_z.js +0 -104
  241. package/dist/client/components/chat/streamdown-code-slim.d.ts +0 -4
  242. package/dist/client/components/chat/streamdown-code-slim.d.ts.map +0 -1
  243. package/dist/web/assets/AnimatePresence-CthXziG2.js +0 -9
  244. package/dist/web/assets/ChatTab-Cy8eyFYI.js +0 -460
  245. package/dist/web/assets/ConnectionSettingsTab-sDZGaUJn.js +0 -1
  246. package/dist/web/assets/ElicitationTab-wDKgU1qL.js +0 -1
  247. package/dist/web/assets/FormContext-Cqc_A12u.js +0 -1
  248. package/dist/web/assets/ListTabHeader-G-nQX18m.js +0 -1
  249. package/dist/web/assets/PromptsTab-DsQVOjKH.js +0 -61
  250. package/dist/web/assets/ResourcesTab-Bw8_p6M1.js +0 -2
  251. package/dist/web/assets/SamplingTab-BrcF1zJF.js +0 -1
  252. package/dist/web/assets/ServerMetadataTab-Bydeh1Po.js +0 -1
  253. package/dist/web/assets/ToolsTab-DJWF7Q_x.js +0 -8
  254. package/dist/web/assets/ViewPreview-jgeU7bY9.js +0 -1
  255. package/dist/web/assets/WidgetWrapper-B_vJU9uF.js +0 -34
  256. package/dist/web/assets/bundle-mjs-8puS6ou7.js +0 -1
  257. package/dist/web/assets/checkbox-BA-XURSj.js +0 -1
  258. package/dist/web/assets/chunk-BO2N2NFS-CGbd3eLY.js +0 -131
  259. package/dist/web/assets/code-tME-5H6D.js +0 -1
  260. package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
  261. package/dist/web/assets/dist-BcAQZluc.js +0 -21
  262. package/dist/web/assets/highlighted-body-OFNGDK62-BBJFbIMp.js +0 -1
  263. package/dist/web/assets/index-BjH-Qp85.css +0 -1
  264. package/dist/web/assets/index-D2UxaT9v.js +0 -475
  265. package/dist/web/assets/input-CjmxOFr6.js +0 -1
  266. package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
  267. package/dist/web/assets/mermaid-GHXKKRXX-B4MKVODA.js +0 -1
  268. package/dist/web/assets/pdf-CuwKm9zO.js +0 -54
  269. package/dist/web/assets/select-C0xlfLAa.js +0 -1
  270. package/dist/web/assets/shared-DQE60Op-.js +0 -1
  271. package/dist/web/assets/sheet-7TIkLdpr.js +0 -1
  272. package/dist/web/assets/tabs-subtle-AkJZvdxS.js +0 -1
  273. package/dist/web/assets/textarea-Ci09-en6.js +0 -1
  274. package/dist/web/assets/useConfig-Qglo4xs1.js +0 -1
  275. package/dist/web/assets/useMCPPrompts-USLYc1I4.js +0 -1
  276. package/dist/web/assets/useViewHostProps-DXAD1g7g.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { F as e } from "./cfWorker-Bxcs9rNe.js";
2
- import { a as t } from "./index-browser-CVUwR-Bu.js";
2
+ import { r as t } from "./index-browser-B1xWyLr0.js";
3
3
  //#region ../agent/dist/index.js
4
4
  var n = class {
5
5
  disallowedTools;
@@ -368,7 +368,7 @@ function ne(e) {
368
368
  });
369
369
  }), t;
370
370
  }
371
- function h(e) {
371
+ function re(e) {
372
372
  let t = [], n = [];
373
373
  for (let r of e) if (r.role === "system") {
374
374
  if (typeof r.content == "string") t.push(r.content);
@@ -379,14 +379,14 @@ function h(e) {
379
379
  rest: n
380
380
  };
381
381
  }
382
- function g(e) {
382
+ function h(e) {
383
383
  let t = e.match(/^data:([^;,]+);base64,(.+)$/);
384
384
  return t ? {
385
385
  mimeType: t[1],
386
386
  data: t[2]
387
387
  } : null;
388
388
  }
389
- async function* _(e, t) {
389
+ async function* g(e, t) {
390
390
  let n = e.getReader(), r = new TextDecoder("utf-8"), i = "";
391
391
  try {
392
392
  for (;;) {
@@ -395,15 +395,15 @@ async function* _(e, t) {
395
395
  if (a) break;
396
396
  i += r.decode(e, { stream: !0 });
397
397
  let o;
398
- for (; (o = re(i)) !== -1;) {
398
+ for (; (o = ie(i)) !== -1;) {
399
399
  let e = i.slice(0, o);
400
400
  i = i.slice(o).replace(/^(\r\n\r\n|\n\n|\r\r)/, "");
401
- let t = v(e);
401
+ let t = _(e);
402
402
  t && (yield t);
403
403
  }
404
404
  }
405
405
  if (i.trim()) {
406
- let e = v(i);
406
+ let e = _(i);
407
407
  e && (yield e);
408
408
  }
409
409
  } finally {
@@ -412,11 +412,11 @@ async function* _(e, t) {
412
412
  } catch {}
413
413
  }
414
414
  }
415
- function re(e) {
415
+ function ie(e) {
416
416
  let t = e.indexOf("\n\n"), n = e.indexOf("\r\n\r\n");
417
417
  return t === -1 ? n : n === -1 ? t : Math.min(t, n);
418
418
  }
419
- function v(e) {
419
+ function _(e) {
420
420
  let t, n = [];
421
421
  for (let r of e.split(/\r?\n/)) {
422
422
  if (!r || r.startsWith(":")) continue;
@@ -428,15 +428,15 @@ function v(e) {
428
428
  data: n.join("\n")
429
429
  };
430
430
  }
431
- function y(e, ...t) {
431
+ function v(e, ...t) {
432
432
  for (let n of t) {
433
433
  let t = e[n];
434
434
  if (typeof t == "number" && Number.isFinite(t)) return t;
435
435
  }
436
436
  }
437
- function b(e) {
437
+ function y(e) {
438
438
  if (!e || typeof e != "object") return;
439
- let t = e, n = y(t, "inputTokens", "input_tokens", "prompt_tokens", "promptTokenCount", "prompt_eval_count"), r = y(t, "outputTokens", "output_tokens", "completion_tokens", "candidatesTokenCount", "eval_count"), i = y(t, "totalTokens", "total_tokens", "totalTokenCount") ?? (n !== void 0 && r !== void 0 ? n + r : void 0), a = t.input_tokens_details && typeof t.input_tokens_details == "object" ? t.input_tokens_details : void 0, o = t.output_tokens_details && typeof t.output_tokens_details == "object" ? t.output_tokens_details : void 0, s = y(t, "cachedInputTokens", "cache_read_input_tokens") ?? (a ? y(a, "cached_tokens") : void 0), c = y(t, "reasoningTokens", "thoughtsTokenCount") ?? (o ? y(o, "reasoning_tokens") : void 0);
439
+ let t = e, n = v(t, "inputTokens", "input_tokens", "prompt_tokens", "promptTokenCount", "prompt_eval_count"), r = v(t, "outputTokens", "output_tokens", "completion_tokens", "candidatesTokenCount", "eval_count"), i = v(t, "totalTokens", "total_tokens", "totalTokenCount") ?? (n !== void 0 && r !== void 0 ? n + r : void 0), a = t.input_tokens_details && typeof t.input_tokens_details == "object" ? t.input_tokens_details : void 0, o = t.output_tokens_details && typeof t.output_tokens_details == "object" ? t.output_tokens_details : void 0, s = v(t, "cachedInputTokens", "cache_read_input_tokens") ?? (a ? v(a, "cached_tokens") : void 0), c = v(t, "reasoningTokens", "thoughtsTokenCount") ?? (o ? v(o, "reasoning_tokens") : void 0);
440
440
  if (!(n === void 0 && r === void 0 && i === void 0 && s === void 0 && c === void 0)) return {
441
441
  inputTokens: n,
442
442
  outputTokens: r,
@@ -445,8 +445,8 @@ function b(e) {
445
445
  reasoningTokens: c
446
446
  };
447
447
  }
448
- var ie = "https://api.anthropic.com/v1/messages", ae = "2023-06-01", oe = 4096;
449
- function x(e) {
448
+ var ae = "https://api.anthropic.com/v1/messages", oe = "2023-06-01", se = 4096;
449
+ function b(e) {
450
450
  if (e.type !== "image") return null;
451
451
  if (e.data && e.mimeType) return {
452
452
  type: "image",
@@ -456,7 +456,7 @@ function x(e) {
456
456
  data: e.data
457
457
  }
458
458
  };
459
- let t = g(e.url);
459
+ let t = h(e.url);
460
460
  return t ? {
461
461
  type: "image",
462
462
  source: {
@@ -472,7 +472,7 @@ function x(e) {
472
472
  }
473
473
  };
474
474
  }
475
- function se(e) {
475
+ function ce(e) {
476
476
  if (typeof e == "string") return [{
477
477
  type: "text",
478
478
  text: e || "[no content]"
@@ -483,7 +483,7 @@ function se(e) {
483
483
  text: n.text
484
484
  });
485
485
  else {
486
- let e = x(n);
486
+ let e = b(n);
487
487
  e && t.push(e);
488
488
  }
489
489
  return t.length === 0 && t.push({
@@ -491,7 +491,7 @@ function se(e) {
491
491
  text: "[no content]"
492
492
  }), t;
493
493
  }
494
- function ce(e) {
494
+ function le(e) {
495
495
  if (typeof e == "string") return e;
496
496
  let t = [];
497
497
  for (let n of e) if (n.type === "text") n.text && t.push({
@@ -499,19 +499,19 @@ function ce(e) {
499
499
  text: n.text
500
500
  });
501
501
  else if (n.type === "image") {
502
- let e = x(n);
502
+ let e = b(n);
503
503
  e && t.push(e);
504
504
  }
505
505
  return t.length === 0 ? "[no content]" : t;
506
506
  }
507
- function le(e) {
507
+ function ue(e) {
508
508
  let t = [];
509
509
  for (let n of e) {
510
510
  if (n.role === "tool") {
511
511
  let e = t[t.length - 1], r = {
512
512
  type: "tool_result",
513
513
  tool_use_id: n.toolCallId,
514
- content: ce(n.content),
514
+ content: le(n.content),
515
515
  ...n.toolIsError ? { is_error: !0 } : {}
516
516
  };
517
517
  e && e.role === "user" && Array.isArray(e.content) ? e.content.push(r) : t.push({
@@ -542,34 +542,35 @@ function le(e) {
542
542
  }
543
543
  t.push({
544
544
  role: "user",
545
- content: se(n.content)
545
+ content: ce(n.content)
546
546
  });
547
547
  }
548
548
  return t;
549
549
  }
550
- function S(e, t) {
551
- let { config: n, messages: r, tools: i } = e, { system: a, rest: o } = h(r), s = {
550
+ function x(e, t) {
551
+ let { config: n, messages: r, tools: i } = e, { system: a, rest: o } = re(r), s = {
552
552
  model: n.model,
553
- max_tokens: n.maxTokens ?? oe,
554
- messages: le(o),
553
+ max_tokens: n.maxTokens ?? se,
554
+ messages: ue(o),
555
555
  ...t ? { stream: !0 } : {}
556
556
  };
557
557
  return n.temperature !== void 0 && (s.temperature = n.temperature), a && (s.system = a), i && i.length > 0 && (s.tools = i.map((e) => ({
558
558
  name: e.name,
559
559
  description: e.description,
560
- input_schema: e.inputSchema
560
+ input_schema: e.inputSchema,
561
+ ...t ? { eager_input_streaming: !0 } : {}
561
562
  }))), s;
562
563
  }
563
- async function* ue(e) {
564
- let { config: t, signal: n } = e, r = await fetch(ie, {
564
+ async function* de(e) {
565
+ let { config: t, signal: n } = e, r = await fetch(ae, {
565
566
  method: "POST",
566
567
  headers: {
567
568
  "Content-Type": "application/json",
568
569
  "x-api-key": t.apiKey,
569
- "anthropic-version": ae,
570
+ "anthropic-version": oe,
570
571
  "anthropic-dangerous-direct-browser-access": "true"
571
572
  },
572
- body: JSON.stringify(S(e, !0)),
573
+ body: JSON.stringify(x(e, !0)),
573
574
  signal: n
574
575
  });
575
576
  if (!r.ok || !r.body) {
@@ -577,7 +578,7 @@ async function* ue(e) {
577
578
  throw Error(`Anthropic request failed (${r.status} ${r.statusText}): ${e}`);
578
579
  }
579
580
  let i = /* @__PURE__ */ new Map(), a;
580
- for await (let e of _(r.body, n)) {
581
+ for await (let e of g(r.body, n)) {
581
582
  let t;
582
583
  try {
583
584
  t = JSON.parse(e.data);
@@ -585,9 +586,9 @@ async function* ue(e) {
585
586
  continue;
586
587
  }
587
588
  let n = t?.type;
588
- if (n === "message_start") a = b(t?.message?.usage);
589
+ if (n === "message_start") a = y(t?.message?.usage);
589
590
  else if (n === "message_delta") {
590
- let e = b(t?.usage);
591
+ let e = y(t?.usage);
591
592
  e && (a = {
592
593
  ...a,
593
594
  ...e
@@ -662,16 +663,16 @@ async function* ue(e) {
662
663
  }
663
664
  yield { type: "done" };
664
665
  }
665
- async function de(e) {
666
- let { config: t, signal: n } = e, r = await fetch(ie, {
666
+ async function fe(e) {
667
+ let { config: t, signal: n } = e, r = await fetch(ae, {
667
668
  method: "POST",
668
669
  headers: {
669
670
  "Content-Type": "application/json",
670
671
  "x-api-key": t.apiKey,
671
- "anthropic-version": ae,
672
+ "anthropic-version": oe,
672
673
  "anthropic-dangerous-direct-browser-access": "true"
673
674
  },
674
- body: JSON.stringify(S(e, !1)),
675
+ body: JSON.stringify(x(e, !1)),
675
676
  signal: n
676
677
  });
677
678
  if (!r.ok) {
@@ -689,7 +690,7 @@ async function de(e) {
689
690
  toolCalls: o
690
691
  };
691
692
  }
692
- var fe = /* @__PURE__ */ new Set([
693
+ var pe = /* @__PURE__ */ new Set([
693
694
  "type",
694
695
  "description",
695
696
  "enum",
@@ -706,15 +707,15 @@ var fe = /* @__PURE__ */ new Set([
706
707
  "maxLength",
707
708
  "pattern"
708
709
  ]);
709
- function pe(e) {
710
+ function me(e) {
710
711
  if (!e || typeof e != "object") return { type: "object" };
711
- let t = C(e);
712
+ let t = S(e);
712
713
  if (typeof t != "object" || !t) return { type: "object" };
713
714
  let n = t;
714
715
  return n.type ||= "object", n;
715
716
  }
716
- function C(e) {
717
- if (Array.isArray(e)) return e.map(C);
717
+ function S(e) {
718
+ if (Array.isArray(e)) return e.map(S);
718
719
  if (!e || typeof e != "object") return e;
719
720
  let t = e;
720
721
  for (let e of [
@@ -723,47 +724,47 @@ function C(e) {
723
724
  "allOf"
724
725
  ]) {
725
726
  let n = t[e];
726
- if (Array.isArray(n) && n.length === 1) return C(n[0]);
727
+ if (Array.isArray(n) && n.length === 1) return S(n[0]);
727
728
  }
728
729
  let n = {};
729
- for (let [e, r] of Object.entries(t)) if (fe.has(e)) if (e === "properties" && r && typeof r == "object") {
730
+ for (let [e, r] of Object.entries(t)) if (pe.has(e)) if (e === "properties" && r && typeof r == "object") {
730
731
  let t = {};
731
- for (let [e, n] of Object.entries(r)) t[e] = C(n);
732
+ for (let [e, n] of Object.entries(r)) t[e] = S(n);
732
733
  n[e] = t;
733
- } else e === "items" ? n[e] = C(r) : n[e] = r;
734
+ } else e === "items" ? n[e] = S(r) : n[e] = r;
734
735
  return n;
735
736
  }
736
- function me(e) {
737
+ function he(e) {
737
738
  let t = e.trim();
738
739
  return t.startsWith("models/") ? t.slice(7) : t;
739
740
  }
740
- function w(e, t) {
741
+ function C(e, t) {
741
742
  let n = t === "stream" ? "streamGenerateContent?alt=sse" : "generateContent";
742
- return `https://generativelanguage.googleapis.com/v1beta/models/${encodeURIComponent(me(e))}:${n}`;
743
+ return `https://generativelanguage.googleapis.com/v1beta/models/${encodeURIComponent(he(e))}:${n}`;
743
744
  }
744
- function T(e) {
745
+ function w(e) {
745
746
  if (e.type !== "image") return null;
746
747
  if (e.data && e.mimeType) return { inlineData: {
747
748
  mimeType: e.mimeType,
748
749
  data: e.data
749
750
  } };
750
- let t = g(e.url);
751
+ let t = h(e.url);
751
752
  return t ? { inlineData: {
752
753
  mimeType: t.mimeType,
753
754
  data: t.data
754
755
  } } : null;
755
756
  }
756
- function he(e) {
757
+ function ge(e) {
757
758
  if (typeof e == "string") return [{ text: e || "[no content]" }];
758
759
  let t = [];
759
760
  for (let n of e) if (n.type === "text") n.text && t.push({ text: n.text });
760
761
  else {
761
- let e = T(n);
762
+ let e = w(n);
762
763
  e && t.push(e);
763
764
  }
764
765
  return t.length === 0 && t.push({ text: "[no content]" }), t;
765
766
  }
766
- function ge(e) {
767
+ function _e(e) {
767
768
  if (typeof e == "string") {
768
769
  let t;
769
770
  try {
@@ -785,11 +786,11 @@ function ge(e) {
785
786
  imageParts: n
786
787
  };
787
788
  }
788
- function _e(e) {
789
+ function ve(e) {
789
790
  let t = [];
790
791
  for (let n of e) {
791
792
  if (n.role === "tool") {
792
- let { response: e, imageParts: r } = ge(n.content), i = t[t.length - 1], a = { functionResponse: {
793
+ let { response: e, imageParts: r } = _e(n.content), i = t[t.length - 1], a = { functionResponse: {
793
794
  name: n.toolName,
794
795
  response: e
795
796
  } };
@@ -799,7 +800,7 @@ function _e(e) {
799
800
  }), r.length > 0) {
800
801
  let e = [{ text: p(n.toolName, r.length) }];
801
802
  for (let t of r) {
802
- let n = T(t);
803
+ let n = w(t);
803
804
  n && e.push(n);
804
805
  }
805
806
  t.push({
@@ -823,26 +824,26 @@ function _e(e) {
823
824
  }
824
825
  t.push({
825
826
  role: "user",
826
- parts: he(n.content)
827
+ parts: ge(n.content)
827
828
  });
828
829
  }
829
830
  return t;
830
831
  }
831
- function E(e) {
832
- let { config: t, messages: n, tools: r } = e, { system: i, rest: a } = h(n), o = { contents: _e(a) };
832
+ function T(e) {
833
+ let { config: t, messages: n, tools: r } = e, { system: i, rest: a } = re(n), o = { contents: ve(a) };
833
834
  i && (o.systemInstruction = { parts: [{ text: i }] });
834
835
  let s = {};
835
836
  return t.temperature !== void 0 && (s.temperature = t.temperature), t.maxTokens !== void 0 && (s.maxOutputTokens = t.maxTokens), Object.keys(s).length > 0 && (o.generationConfig = s), r && r.length > 0 && (o.tools = [{ functionDeclarations: r.map((e) => ({
836
837
  name: e.name,
837
838
  description: e.description,
838
- parameters: pe(e.inputSchema)
839
+ parameters: me(e.inputSchema)
839
840
  })) }]), o;
840
841
  }
841
- async function* ve(e) {
842
- let { config: t, signal: n } = e, r = `${w(t.model, "stream")}&key=${encodeURIComponent(t.apiKey)}`, i = await fetch(r, {
842
+ async function* ye(e) {
843
+ let { config: t, signal: n } = e, r = `${C(t.model, "stream")}&key=${encodeURIComponent(t.apiKey)}`, i = await fetch(r, {
843
844
  method: "POST",
844
845
  headers: { "Content-Type": "application/json" },
845
- body: JSON.stringify(E(e)),
846
+ body: JSON.stringify(T(e)),
846
847
  signal: n
847
848
  });
848
849
  if (!i.ok || !i.body) {
@@ -850,14 +851,14 @@ async function* ve(e) {
850
851
  throw Error(`Google request failed (${i.status} ${i.statusText}): ${e}`);
851
852
  }
852
853
  let a = 0, o;
853
- for await (let e of _(i.body, n)) {
854
+ for await (let e of g(i.body, n)) {
854
855
  let t;
855
856
  try {
856
857
  t = JSON.parse(e.data);
857
858
  } catch {
858
859
  continue;
859
860
  }
860
- o = b(t?.usageMetadata) ?? o;
861
+ o = y(t?.usageMetadata) ?? o;
861
862
  let n = t?.candidates?.[0]?.content?.parts ?? [];
862
863
  for (let e of n) if (typeof e.text == "string" && e.text.length > 0) yield {
863
864
  type: "text-delta",
@@ -892,11 +893,11 @@ async function* ve(e) {
892
893
  usage: o
893
894
  }), yield { type: "done" };
894
895
  }
895
- async function ye(e) {
896
- let { config: t, signal: n } = e, r = `${w(t.model, "single")}?key=${encodeURIComponent(t.apiKey)}`, i = await fetch(r, {
896
+ async function be(e) {
897
+ let { config: t, signal: n } = e, r = `${C(t.model, "single")}?key=${encodeURIComponent(t.apiKey)}`, i = await fetch(r, {
897
898
  method: "POST",
898
899
  headers: { "Content-Type": "application/json" },
899
- body: JSON.stringify(E(e)),
900
+ body: JSON.stringify(T(e)),
900
901
  signal: n
901
902
  });
902
903
  if (!i.ok) {
@@ -914,7 +915,7 @@ async function ye(e) {
914
915
  toolCalls: s
915
916
  };
916
917
  }
917
- async function* be(e, t) {
918
+ async function* xe(e, t) {
918
919
  let n = e.getReader(), r = new TextDecoder(), i = "";
919
920
  try {
920
921
  for (;;) {
@@ -939,22 +940,22 @@ async function* be(e, t) {
939
940
  n.releaseLock();
940
941
  }
941
942
  }
942
- var xe = "http://localhost:11434";
943
- function D(e) {
943
+ var Se = "http://localhost:11434";
944
+ function E(e) {
944
945
  let t = (e || "http://localhost:11434").trim(), n = t.length;
945
946
  for (; n > 0 && t.charCodeAt(n - 1) === 47;) n--;
946
947
  let r = t.slice(0, n);
947
948
  return r.endsWith("/api") ? r.slice(0, -4) : r;
948
949
  }
949
- function O(e, t) {
950
- return `${D(e)}${t}`;
950
+ function D(e, t) {
951
+ return `${E(e)}${t}`;
951
952
  }
952
- var Se = class extends Error {
953
+ var Ce = class extends Error {
953
954
  constructor(e) {
954
955
  super("Could not reach Ollama. If it's running, allow this origin by starting Ollama with `OLLAMA_ORIGINS=*` (or your inspector origin) and try again."), this.name = "OllamaCorsError", this.cause = e;
955
956
  }
956
957
  };
957
- function Ce(e) {
958
+ function we(e) {
958
959
  let t = [];
959
960
  for (let n of e) {
960
961
  if (n.type !== "image") continue;
@@ -962,27 +963,27 @@ function Ce(e) {
962
963
  t.push(n.data);
963
964
  continue;
964
965
  }
965
- let e = g(n.url);
966
+ let e = h(n.url);
966
967
  e?.data && t.push(e.data);
967
968
  }
968
969
  return t;
969
970
  }
970
- function k(e) {
971
+ function O(e) {
971
972
  if (typeof e == "string") return { content: e };
972
- let t = e.filter((e) => e.type === "text").map((e) => e.text).join(""), n = Ce(e);
973
+ let t = e.filter((e) => e.type === "text").map((e) => e.text).join(""), n = we(e);
973
974
  return {
974
975
  content: t,
975
976
  ...n.length > 0 ? { images: n } : {}
976
977
  };
977
978
  }
978
- function we(e) {
979
+ function Te(e) {
979
980
  return e.map((e) => e.role === "tool" ? {
980
981
  role: "tool",
981
982
  tool_name: e.toolName,
982
983
  content: typeof e.content == "string" ? e.content : JSON.stringify(e.toolResult ?? e.content)
983
984
  } : e.role === "assistant" ? {
984
985
  role: "assistant",
985
- ...typeof e.content == "string" ? { content: e.content } : k(e.content),
986
+ ...typeof e.content == "string" ? { content: e.content } : O(e.content),
986
987
  ...e.toolCalls?.length ? { tool_calls: e.toolCalls.map((e, t) => ({
987
988
  type: "function",
988
989
  function: {
@@ -993,13 +994,13 @@ function we(e) {
993
994
  })) } : {}
994
995
  } : {
995
996
  role: e.role,
996
- ...k(e.content)
997
+ ...O(e.content)
997
998
  });
998
999
  }
999
- function A(e, t) {
1000
+ function k(e, t) {
1000
1001
  let { config: n, messages: r, tools: i } = e, a = {
1001
1002
  model: n.model,
1002
- messages: we(r),
1003
+ messages: Te(r),
1003
1004
  stream: t
1004
1005
  }, o = {};
1005
1006
  return n.temperature !== void 0 && (o.temperature = n.temperature), n.maxTokens !== void 0 && (o.num_predict = n.maxTokens), Object.keys(o).length > 0 && (a.options = o), i && i.length > 0 && (a.tools = i.map((e) => ({
@@ -1011,13 +1012,13 @@ function A(e, t) {
1011
1012
  }
1012
1013
  }))), a;
1013
1014
  }
1014
- function j(e) {
1015
+ function A(e) {
1015
1016
  return {
1016
1017
  "Content-Type": "application/json",
1017
1018
  ...e.apiKey.trim() ? { Authorization: `Bearer ${e.apiKey.trim()}` } : {}
1018
1019
  };
1019
1020
  }
1020
- function M(e) {
1021
+ function j(e) {
1021
1022
  return Array.isArray(e) ? e.map((e) => {
1022
1023
  let t = e && typeof e == "object" ? e.function : void 0, n = typeof t?.name == "string" ? t.name : "", r = t?.arguments;
1023
1024
  return {
@@ -1026,11 +1027,11 @@ function M(e) {
1026
1027
  };
1027
1028
  }).filter((e) => e.name) : [];
1028
1029
  }
1029
- async function* Te(e) {
1030
- let { config: t, signal: n } = e, r = await fetch(O(t.baseUrl, "/api/chat"), {
1030
+ async function* Ee(e) {
1031
+ let { config: t, signal: n } = e, r = await fetch(D(t.baseUrl, "/api/chat"), {
1031
1032
  method: "POST",
1032
- headers: j(t),
1033
- body: JSON.stringify(A(e, !0)),
1033
+ headers: A(t),
1034
+ body: JSON.stringify(k(e, !0)),
1034
1035
  signal: n
1035
1036
  });
1036
1037
  if (!r.ok || !r.body) {
@@ -1038,13 +1039,13 @@ async function* Te(e) {
1038
1039
  throw Error(`Ollama request failed (${r.status} ${r.statusText}): ${e}`);
1039
1040
  }
1040
1041
  let i = !1, a;
1041
- for await (let e of be(r.body, n)) {
1042
+ for await (let e of xe(r.body, n)) {
1042
1043
  let t = e && typeof e == "object" ? e.message : void 0;
1043
1044
  if (typeof t?.content == "string" && t.content.length > 0 && (yield {
1044
1045
  type: "text-delta",
1045
1046
  delta: t.content
1046
1047
  }), !i) {
1047
- let e = M(t?.tool_calls);
1048
+ let e = j(t?.tool_calls);
1048
1049
  if (e.length > 0) {
1049
1050
  for (let [t, n] of e.entries()) {
1050
1051
  let e = `call_${t}_${n.name || "tool"}`;
@@ -1075,18 +1076,18 @@ async function* Te(e) {
1075
1076
  e && typeof e == "object" && e.error && (yield {
1076
1077
  type: "error",
1077
1078
  message: String(e.error)
1078
- }), a = b(e) ?? a;
1079
+ }), a = y(e) ?? a;
1079
1080
  }
1080
1081
  a && (yield {
1081
1082
  type: "usage",
1082
1083
  usage: a
1083
1084
  }), yield { type: "done" };
1084
1085
  }
1085
- async function Ee(e) {
1086
- let { config: t, signal: n } = e, r = await fetch(O(t.baseUrl, "/api/chat"), {
1086
+ async function De(e) {
1087
+ let { config: t, signal: n } = e, r = await fetch(D(t.baseUrl, "/api/chat"), {
1087
1088
  method: "POST",
1088
- headers: j(t),
1089
- body: JSON.stringify(A(e, !1)),
1089
+ headers: A(t),
1090
+ body: JSON.stringify(k(e, !1)),
1090
1091
  signal: n
1091
1092
  });
1092
1093
  if (!r.ok) {
@@ -1096,14 +1097,14 @@ async function Ee(e) {
1096
1097
  let i = (await r.json())?.message ?? {};
1097
1098
  return {
1098
1099
  text: typeof i.content == "string" ? i.content : "",
1099
- toolCalls: M(i.tool_calls).map((e, t) => ({
1100
+ toolCalls: j(i.tool_calls).map((e, t) => ({
1100
1101
  id: `call_${t}_${e.name || "tool"}`,
1101
1102
  name: e.name,
1102
1103
  args: e.args
1103
1104
  }))
1104
1105
  };
1105
1106
  }
1106
- var De = class extends Error {
1107
+ var M = class extends Error {
1107
1108
  status;
1108
1109
  body;
1109
1110
  constructor(e, t, n) {
@@ -1115,7 +1116,7 @@ async function N(e) {
1115
1116
  if (t) try {
1116
1117
  n = JSON.parse(t);
1117
1118
  } catch {}
1118
- throw new De(e.status, `OpenAI request failed (${e.status} ${e.statusText}): ${t}`, n);
1119
+ throw new M(e.status, `OpenAI request failed (${e.status} ${e.statusText}): ${t}`, n);
1119
1120
  }
1120
1121
  var Oe = "https://api.openai.com/v1";
1121
1122
  function P(e, t) {
@@ -1206,7 +1207,7 @@ async function* L(e) {
1206
1207
  }), c = s.body;
1207
1208
  s.ok || await N(s), c || await N(s);
1208
1209
  let l = c, u = /* @__PURE__ */ new Map();
1209
- for await (let e of _(l, i)) {
1210
+ for await (let e of g(l, i)) {
1210
1211
  if (!e.data || e.data === "[DONE]") continue;
1211
1212
  let t;
1212
1213
  try {
@@ -1214,7 +1215,7 @@ async function* L(e) {
1214
1215
  } catch {
1215
1216
  continue;
1216
1217
  }
1217
- let n = b(t?.usage);
1218
+ let n = y(t?.usage);
1218
1219
  n && (yield {
1219
1220
  type: "usage",
1220
1221
  usage: n
@@ -1324,10 +1325,10 @@ function Ae(e) {
1324
1325
  switch (e.config.provider) {
1325
1326
  case "openai": throw Error("provider 'openai' uses the Responses API via OpenAIResponsesDriver, not streamChat");
1326
1327
  case "openai-compatible": return L(e);
1327
- case "anthropic": return ue(e);
1328
- case "google": return ve(e);
1328
+ case "anthropic": return de(e);
1329
+ case "google": return ye(e);
1329
1330
  case "openrouter": return L(z(e));
1330
- case "ollama": return Te(e);
1331
+ case "ollama": return Ee(e);
1331
1332
  default: throw Error(`Unsupported LLM provider: ${e.config.provider}`);
1332
1333
  }
1333
1334
  }
@@ -1335,10 +1336,10 @@ function je(e) {
1335
1336
  switch (e.config.provider) {
1336
1337
  case "openai": throw Error("provider 'openai' uses the Responses API via OpenAIResponsesDriver, not chat");
1337
1338
  case "openai-compatible": return R(e);
1338
- case "anthropic": return de(e);
1339
- case "google": return ye(e);
1339
+ case "anthropic": return fe(e);
1340
+ case "google": return be(e);
1340
1341
  case "openrouter": return R(z(e));
1341
- case "ollama": return Ee(e);
1342
+ case "ollama": return De(e);
1342
1343
  default: throw Error(`Unsupported LLM provider: ${e.config.provider}`);
1343
1344
  }
1344
1345
  }
@@ -1512,7 +1513,7 @@ async function* J(e) {
1512
1513
  });
1513
1514
  if (!t.ok || !t.body) throw Error(await H(t));
1514
1515
  let n = /* @__PURE__ */ new Map(), r = 0, i = [];
1515
- for await (let a of _(t.body, e.signal)) {
1516
+ for await (let a of g(t.body, e.signal)) {
1516
1517
  if (!a.data || a.data === "[DONE]") continue;
1517
1518
  let e;
1518
1519
  try {
@@ -1572,7 +1573,7 @@ async function* J(e) {
1572
1573
  if (t === "response.completed") {
1573
1574
  let t = e.response;
1574
1575
  t && Array.isArray(t.output) && (i = t.output);
1575
- let n = b(t?.usage);
1576
+ let n = y(t?.usage);
1576
1577
  n && (yield {
1577
1578
  type: "usage",
1578
1579
  usage: n
@@ -1775,6 +1776,7 @@ async function* Re(e) {
1775
1776
  args: r.args
1776
1777
  }), yield r;
1777
1778
  } catch (e) {
1779
+ if (e instanceof M) throw e;
1778
1780
  yield {
1779
1781
  type: "error",
1780
1782
  message: e instanceof Error ? e.message : String(e)
@@ -1956,7 +1958,7 @@ function We(e, t, n) {
1956
1958
  credentials: n?.credentials
1957
1959
  };
1958
1960
  }
1959
- var Ge = "2.0.0-beta.0";
1961
+ var Ge = "2.0.0-beta.6";
1960
1962
  function Ke() {
1961
1963
  return Ge;
1962
1964
  }
@@ -2168,7 +2170,7 @@ Raw error: ${c}`);
2168
2170
  if (!this.initialized) {
2169
2171
  if (this.isSimplifiedMode) {
2170
2172
  if (!this.client && this.mcpServersConfig) {
2171
- let { MCPClient: e } = await import("./index-browser-CVUwR-Bu.js").then((e) => e.i);
2173
+ let { MCPClient: e } = await import("./index-browser-B1xWyLr0.js").then((e) => e.n);
2172
2174
  this.client = new e({ mcpServers: this.mcpServersConfig }), this.clientOwnedByAgent = !0;
2173
2175
  }
2174
2176
  this.llmString && (this.driver = X(Q(this.llmString, this.llmConfig)));
@@ -2302,4 +2304,4 @@ async function Qe(e) {
2302
2304
  })).text;
2303
2305
  }
2304
2306
  //#endregion
2305
- export { Qe as a, We as c, O as i, Ze as n, ne as o, Se as r, D as s, xe as t };
2307
+ export { Qe as a, We as c, D as i, Ze as n, ne as o, Ce as r, E as s, Se as t };