@openhands/agent-canvas 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{acp-providers-BQwoUBpe.js → acp-providers-DerAmTyY.js} +1 -1
  4. package/build/assets/{active-backend-context-BCXRv5pm.js → active-backend-context-B8rMv0X9.js} +1 -1
  5. package/build/assets/{add-backend-modal-BKHzq5no.js → add-backend-modal-CxC7BNEc.js} +1 -1
  6. package/build/assets/{agent-profiles-settings-CEp5CIz8.js → agent-profiles-settings-BJb8YXR1.js} +1 -1
  7. package/build/assets/{agent-server-compatibility-D6DSanlx.js → agent-server-compatibility-BWN-EIQn.js} +1 -1
  8. package/build/assets/{agent-server-conversation-service.api-cylugfDz.js → agent-server-conversation-service.api-DSPIkMwJ.js} +4 -4
  9. package/build/assets/{agent-settings-C-tann3x.js → agent-settings-CgCnqaAA.js} +1 -1
  10. package/build/assets/agent-settings-DDkSavD7.js +1 -0
  11. package/build/assets/{alert-banner-Dd4woGbm.js → alert-banner-Dh51WURQ.js} +1 -1
  12. package/build/assets/{api-key-entry-screen-Bll_CkuQ.js → api-key-entry-screen-iZc7n8AI.js} +1 -1
  13. package/build/assets/app-settings-B5zyipxJ.js +1 -0
  14. package/build/assets/{automation-detail-Z9dN2f5l.js → automation-detail-CZsu2CoM.js} +1 -1
  15. package/build/assets/{automation-export-D5uL0Tf8.js → automation-export-BwRX6H32.js} +1 -1
  16. package/build/assets/{automations-list-BMOWcqzZ.js → automations-list-lHAVzMoA.js} +1 -1
  17. package/build/assets/{back-nav-button-ZUDTMOTB.js → back-nav-button-DVknCcSP.js} +1 -1
  18. package/build/assets/backend-form-modal-RGcu909r.js +1 -0
  19. package/build/assets/{backend-synced-settings-badge-Db_REKVw.js → backend-synced-settings-badge-BSfN0AZA.js} +1 -1
  20. package/build/assets/{base-modal-Cb0C6m0Q.js → base-modal-CIF_785P.js} +1 -1
  21. package/build/assets/{brand-button-2Tp3aXk1.js → brand-button-B1izLAdR.js} +1 -1
  22. package/build/assets/{browser-QYLVr1kS.js → browser-DKaeq_sT.js} +2 -2
  23. package/build/assets/browser-store-BI6uklCG.js +1 -0
  24. package/build/assets/{browser-tab-BTTP1OE2.js → browser-tab-qb_ftCxW.js} +1 -1
  25. package/build/assets/{circle-plus-check-toggle-QQJKUnF6.js → circle-plus-check-toggle-DoFIjVE0.js} +1 -1
  26. package/build/assets/client-source-BZK8vRs2.js +1 -0
  27. package/build/assets/cloud-funnel-analytics-Zcv57hfT.js +1 -0
  28. package/build/assets/{color-themes-bVMmJJG6.js → color-themes-CHizm1xF.js} +1 -1
  29. package/build/assets/{combobox-caret-A5jMVHgE.js → combobox-caret-CxZpqoSR.js} +1 -1
  30. package/build/assets/{command-menu-BMVEme4H.js → command-menu-oTvKDU3Y.js} +1 -1
  31. package/build/assets/{command-store-jrWX_CcW.js → command-store-D8J5LMW1.js} +1 -1
  32. package/build/assets/{condenser-settings-CIa6eyB4.js → condenser-settings-BGlWn93P.js} +1 -1
  33. package/build/assets/{confirmation-modal-4n_944zq.js → confirmation-modal-DGBWM2Ls.js} +1 -1
  34. package/build/assets/{context-menu-list-item-DvfFic5I.js → context-menu-list-item-6psNyl7X.js} +1 -1
  35. package/build/assets/{conversation-D4o4dG2t.js → conversation-BoCYx8n2.js} +3 -3
  36. package/build/assets/conversation-DgHqMjnY.js +1 -0
  37. package/build/assets/conversation-panel-78Rxh_-I.js +1 -0
  38. package/build/assets/{conversation-service.api-0JG_fF9d.js → conversation-service.api-_f9GlIEi.js} +1 -1
  39. package/build/assets/conversation-state-store-B2Bp32XI.js +1 -0
  40. package/build/assets/{conversation-store-BCSpLuEf.js → conversation-store-LptbOvKa.js} +1 -1
  41. package/build/assets/{copy-to-clipboard-button-Dp4Q_hXi.js → copy-to-clipboard-button-CFzH_NOX.js} +1 -1
  42. package/build/assets/{device-verify-CM086oKs.js → device-verify-WBSjJBLH.js} +1 -1
  43. package/build/assets/{dropdown-classes-DZq0BQjb.js → dropdown-classes-D3wMJlXT.js} +1 -1
  44. package/build/assets/{ellipsis-button-TPJdyxnK.js → ellipsis-button-CbNnHlIq.js} +1 -1
  45. package/build/assets/{entry.client-DypYHsYm.js → entry.client-DNlPGxsu.js} +2 -2
  46. package/build/assets/{enum-filter-dropdown-CW_mBg0e.js → enum-filter-dropdown-JLYv1t8L.js} +1 -1
  47. package/build/assets/{environment-switch-overlay-6laJch-9.js → environment-switch-overlay-B1PFO8P8.js} +1 -1
  48. package/build/assets/{extensions-hub-BJFbFfKS.js → extensions-hub-CCbLA7IM.js} +1 -1
  49. package/build/assets/{extensions-navigation-DqSl7CJw.js → extensions-navigation-CPNjMNvR.js} +1 -1
  50. package/build/assets/{files-tab-store-tfCav6bB.js → files-tab-store-DJsPxYdg.js} +1 -1
  51. package/build/assets/{files-tab-c316dKAq.js → files-tab-y4K7EXBO.js} +1 -1
  52. package/build/assets/{git-provider-icon-DUb2pEos.js → git-provider-icon-ITvsH4Ko.js} +1 -1
  53. package/build/assets/{home-D7ds4Jyw.js → home-BwbeOWwU.js} +1 -1
  54. package/build/assets/home-DKPGQ5P3.js +1 -0
  55. package/build/assets/index-home-Bko2Itv5.js +1 -0
  56. package/build/assets/{install-server-modal-CvHvzZj3.js → install-server-modal-Qk1gwyI8.js} +1 -1
  57. package/build/assets/{launch-A47TK2Me.js → launch-CAGavYl-.js} +1 -1
  58. package/build/assets/lesson-plan-DMCPdtrf.js +4 -0
  59. package/build/assets/{llm-not-configured-banner-B7DR8SPs.js → llm-not-configured-banner-C1ktyb3C.js} +1 -1
  60. package/build/assets/llm-settings-BBsZFi9l.js +1 -0
  61. package/build/assets/{llm-settings-Cvi7q4ox.js → llm-settings-DFkJQr_w.js} +1 -1
  62. package/build/assets/{llm-subscription-service-Cz1yBBvE.js → llm-subscription-service-Casyzgn1.js} +1 -1
  63. package/build/assets/{manage-backends-modal-DAVhNUCe.js → manage-backends-modal-CKQ46rvw.js} +1 -1
  64. package/build/assets/manifest-03478bbf.js +1 -0
  65. package/build/assets/{map-provider-XSFHmdDs.js → map-provider-BbIb12oh.js} +1 -1
  66. package/build/assets/{markdown-renderer-B6cJJ_MN.js → markdown-renderer-B4V2OMFP.js} +1 -1
  67. package/build/assets/{mcp-BwssgMpg.js → mcp-BapoJsDc.js} +1 -1
  68. package/build/assets/{messages-D8MeG2ZQ.js → messages-CUBFMY5o.js} +1 -1
  69. package/build/assets/{model-selector-BxTbbKub.js → model-selector-DJrMrFAr.js} +1 -1
  70. package/build/assets/{navigation-link-imH6S7h2.js → navigation-link-D8hfwvxI.js} +1 -1
  71. package/build/assets/{onboarding-CyicadGt.js → onboarding-6NMkdNxV.js} +1 -1
  72. package/build/assets/onboarding-modal-Q4AnpIdg.js +1 -0
  73. package/build/assets/{organization-service.api-QknzKDh3.js → organization-service.api-vrRNwOma.js} +1 -1
  74. package/build/assets/{path-utils-BECGet7G.js → path-utils-PNfCKQDV.js} +1 -1
  75. package/build/assets/{planner-tab-DPKHmMAX.js → planner-tab-ByOw1he8.js} +1 -1
  76. package/build/assets/{plugins-management-service-DuTTxquo.js → plugins-management-service-B75jyC56.js} +1 -1
  77. package/build/assets/{profiles-service.api-D6jvZOWu.js → profiles-service.api-BQTklD5D.js} +1 -1
  78. package/build/assets/providers-DfTB2gPd.js +1 -0
  79. package/build/assets/{proxy-CuhhyjdX.js → proxy-B3tCGf0X.js} +1 -1
  80. package/build/assets/{recommended-automations-launcher-DA6DWS7V.js → recommended-automations-launcher-Bj7PuHY1.js} +1 -1
  81. package/build/assets/root-CDnuTToz.js +2 -0
  82. package/build/assets/root-layout-DfYVlcRG.js +2 -0
  83. package/build/assets/{runtime-waiting-state-DeD9G7yJ.js → runtime-waiting-state-CnyVhX4T.js} +1 -1
  84. package/build/assets/{schema-field-BOLdL_U7.js → schema-field-CUwk4wrQ.js} +1 -1
  85. package/build/assets/{sdk-section-page-ZIltERxf.js → sdk-section-page-DLLNrYjI.js} +1 -1
  86. package/build/assets/{sdk-settings-schema-Ba_Pa9uf.js → sdk-settings-schema-CLR01YIK.js} +1 -1
  87. package/build/assets/{secrets-service-50DElFny.js → secrets-service-CvyPWJhg.js} +1 -1
  88. package/build/assets/{secrets-settings-Digl7JLe.js → secrets-settings-CHy72A5C.js} +1 -1
  89. package/build/assets/settings-B9S8UVQr.js +1 -0
  90. package/build/assets/{settings-dropdown-input-BD5C9fBn.js → settings-dropdown-input-Dhx9ErGd.js} +1 -1
  91. package/build/assets/{settings-index-CODBijya.js → settings-index-BKDl2CQ-.js} +1 -1
  92. package/build/assets/{settings-input-CzNOq-Pj.js → settings-input-BsgQWS5R.js} +1 -1
  93. package/build/assets/{settings-list-classes-CuxH9ZoR.js → settings-list-classes-DSJJX99U.js} +1 -1
  94. package/build/assets/{settings-modal-BcSWpKI0.js → settings-modal-DeK11CyT.js} +1 -1
  95. package/build/assets/{settings-service.api-Bsu1PvYO.js → settings-service.api-DXk5TdeJ.js} +1 -1
  96. package/build/assets/{settings-switch-DqmHAfWJ.js → settings-switch-Bes8dIlV.js} +1 -1
  97. package/build/assets/{settings-utils-B1lBErvV.js → settings-utils-DzCVfiR3.js} +1 -1
  98. package/build/assets/{shared-conversation-CDskdmrb.js → shared-conversation-9atDzTR4.js} +1 -1
  99. package/build/assets/{sidebar-mobile-menu-toggle-DmCmZgq1.js → sidebar-mobile-menu-toggle-giMMZctn.js} +1 -1
  100. package/build/assets/{sidebar-nav-link-DMc8AIe7.js → sidebar-nav-link-CHqyFXwV.js} +1 -1
  101. package/build/assets/{sidebar-store-DXWSCFpa.js → sidebar-store-uiUXBU1N.js} +1 -1
  102. package/build/assets/{skill-card-pill-row-DOIWjiMF.js → skill-card-pill-row-BPYKQ3IN.js} +1 -1
  103. package/build/assets/{skills-plugins-DLgINYuY.js → skills-plugins-Tropusio.js} +1 -1
  104. package/build/assets/{skills-settings-DPiCWalR.js → skills-settings-BvzBBCWk.js} +1 -1
  105. package/build/assets/{task-list-tab-CuhcDycu.js → task-list-tab-DyfgG4MC.js} +1 -1
  106. package/build/assets/telemetry-C5JMEfqB.js +2 -0
  107. package/build/assets/{terminal-CVqF-tCD.js → terminal-DRXt2Lr4.js} +1 -1
  108. package/build/assets/{typography-CQn9wyEX.js → typography-CzfoD9DY.js} +1 -1
  109. package/build/assets/{use-acp-credential-form-LlfZO_DD.js → use-acp-credential-form-Bm8qXdlc.js} +1 -1
  110. package/build/assets/{use-activate-agent-profile-DpQjsXM0.js → use-activate-agent-profile-DlykqEfN.js} +1 -1
  111. package/build/assets/{use-active-agent-profile-Gw_uJujV.js → use-active-agent-profile-hI-x-UBa.js} +1 -1
  112. package/build/assets/{use-active-conversation-B0sttISF.js → use-active-conversation-2qeez40F.js} +1 -1
  113. package/build/assets/{use-agent-profiles-LHZEK0Gg.js → use-agent-profiles-0pr5bLS7.js} +1 -1
  114. package/build/assets/{use-agent-state-C5uA0bRj.js → use-agent-state-C6peDXUm.js} +1 -1
  115. package/build/assets/{use-backends-health-DKt1SmiU.js → use-backends-health-CLHPitJM.js} +1 -1
  116. package/build/assets/{use-can-manage-org-profiles-BAtqsbCi.js → use-can-manage-org-profiles-Ck_bsNbH.js} +1 -1
  117. package/build/assets/{use-cloud-current-user-id-C8m1oBy4.js → use-cloud-current-user-id-DUCSxNjY.js} +1 -1
  118. package/build/assets/use-config-B5r8erYt.js +1 -0
  119. package/build/assets/{use-create-conversation-CWQGNQ9J.js → use-create-conversation-r1JHfKO5.js} +1 -1
  120. package/build/assets/{use-create-secret-BIrsX3OB.js → use-create-secret-Cf2N11d2.js} +1 -1
  121. package/build/assets/{use-event-store-CsD17BKu.js → use-event-store-Bbaz51GR.js} +1 -1
  122. package/build/assets/{use-handle-plan-click-DEuO7Byo.js → use-handle-plan-click-CsAW3FlH.js} +1 -1
  123. package/build/assets/{use-launch-skill-in-chat-CdHOoQGM.js → use-launch-skill-in-chat-DJWEfVc5.js} +1 -1
  124. package/build/assets/{use-llm-profiles-DQpQxVOD.js → use-llm-profiles-Dr5__SlZ.js} +1 -1
  125. package/build/assets/{use-plugins-marketplace-Bkk07W_M.js → use-plugins-marketplace-BplU65ae.js} +1 -1
  126. package/build/assets/use-runtime-is-ready-vCFOcLFa.js +1 -0
  127. package/build/assets/{use-save-agent-profile-BxEsjnW0.js → use-save-agent-profile-RqUGqTv6.js} +1 -1
  128. package/build/assets/{use-save-settings-ioSUMqbE.js → use-save-settings-Chvzeu2s.js} +1 -1
  129. package/build/assets/{use-settings-DNJC4gqu.js → use-settings-CyxSlyTQ.js} +1 -1
  130. package/build/assets/{use-settings-nav-items-BUsrDbVR.js → use-settings-nav-items-zEkSO_Bf.js} +1 -1
  131. package/build/assets/{use-skills-BsmKm23M.js → use-skills-xrVoKYrF.js} +1 -1
  132. package/build/assets/{use-task-list-rs7Xbzl8.js → use-task-list-CfisapBW.js} +1 -1
  133. package/build/assets/use-tracking-D2Qg5Lpd.js +1 -0
  134. package/build/assets/{use-user-conversation-B337kUKB.js → use-user-conversation-CnE4zhOA.js} +1 -1
  135. package/build/assets/{vendor~browser-tab-Xn94EtUo.js → vendor~browser-tab-CsMb-pta.js} +1 -1
  136. package/build/assets/{vendor~browser-5Njjw1Cl.js → vendor~browser-wXQ-WZEC.js} +1 -1
  137. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js} +2 -2
  138. package/build/assets/{vendor~files-tab-CiC3-lGh.js → vendor~files-tab-B-5fBohe.js} +1 -1
  139. package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DWteoTyr.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js} +1 -1
  140. package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-tlf6AnDe.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js} +1 -1
  141. package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B8XNNEQZ.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js} +1 -1
  142. package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dc5nKwLO.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js} +1 -1
  143. package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CnJRLn5s.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js} +1 -1
  144. package/build/assets/{vendor~launch-28DK5Rsl.js → vendor~launch-_Km3J77E.js} +1 -1
  145. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g9hift2g-DmmpG9SI.js → vendor~module-D5a_AClf.js} +1 -1
  146. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-lYNG9C1U.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js} +1 -1
  147. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-Zhq6xAxR.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js} +1 -1
  148. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-B81b08bw.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js} +1 -1
  149. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-jpyLM1Nn.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js} +1 -1
  150. package/build/assets/{verification-settings-HRgEM-_3.js → verification-settings-CfkrXoSa.js} +1 -1
  151. package/build/index.html +4 -4
  152. package/config/defaults.json +1 -1
  153. package/dist/api/cloud/conversation-service.api.cjs +1 -1
  154. package/dist/api/cloud/conversation-service.api.js +4 -4
  155. package/dist/api/option-service/option-service.api.cjs +1 -1
  156. package/dist/api/option-service/option-service.api.cjs.map +1 -1
  157. package/dist/api/option-service/option-service.api.js +0 -1
  158. package/dist/api/option-service/option-service.api.js.map +1 -1
  159. package/dist/api/option-service/option.types.d.ts +0 -1
  160. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  161. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  162. package/dist/components/features/backends/backend-form-modal.d.ts +1 -1
  163. package/dist/components/features/backends/backend-form-modal.js +137 -144
  164. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  165. package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
  166. package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
  167. package/dist/components/providers/agent-server-ui-providers.d.ts +4 -2
  168. package/dist/components/providers/agent-server-ui-providers.js +9 -2
  169. package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
  170. package/dist/components/providers/index.cjs +1 -1
  171. package/dist/components/providers/index.d.ts +1 -2
  172. package/dist/components/providers/index.js +0 -1
  173. package/dist/components/providers/telemetry-provider.cjs +2 -0
  174. package/dist/components/providers/telemetry-provider.cjs.map +1 -0
  175. package/dist/components/providers/telemetry-provider.d.ts +6 -0
  176. package/dist/components/providers/telemetry-provider.js +64 -0
  177. package/dist/components/providers/telemetry-provider.js.map +1 -0
  178. package/dist/config/defaults.cjs +1 -1
  179. package/dist/config/defaults.cjs.map +1 -1
  180. package/dist/config/defaults.js +1 -1
  181. package/dist/config/defaults.js.map +1 -1
  182. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  183. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  184. package/dist/contexts/conversation-websocket-context.js +197 -204
  185. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  186. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  187. package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
  188. package/dist/hooks/mutation/use-save-settings.d.ts +3 -1
  189. package/dist/hooks/mutation/use-save-settings.js +6 -5
  190. package/dist/hooks/mutation/use-save-settings.js.map +1 -1
  191. package/dist/hooks/use-telemetry.cjs +1 -1
  192. package/dist/hooks/use-telemetry.cjs.map +1 -1
  193. package/dist/hooks/use-telemetry.d.ts +3 -3
  194. package/dist/hooks/use-telemetry.js +16 -22
  195. package/dist/hooks/use-telemetry.js.map +1 -1
  196. package/dist/hooks/use-tracking.cjs +1 -1
  197. package/dist/hooks/use-tracking.cjs.map +1 -1
  198. package/dist/hooks/use-tracking.d.ts +3 -4
  199. package/dist/hooks/use-tracking.js +37 -37
  200. package/dist/hooks/use-tracking.js.map +1 -1
  201. package/dist/index.cjs +1 -1
  202. package/dist/index.js +2 -2
  203. package/dist/lib/index.d.ts +2 -2
  204. package/dist/package.cjs +1 -1
  205. package/dist/package.cjs.map +1 -1
  206. package/dist/package.js +2 -2
  207. package/dist/package.js.map +1 -1
  208. package/dist/routes/app-settings.cjs +1 -1
  209. package/dist/routes/app-settings.cjs.map +1 -1
  210. package/dist/routes/app-settings.js +66 -68
  211. package/dist/routes/app-settings.js.map +1 -1
  212. package/dist/routes/llm-settings.cjs +1 -1
  213. package/dist/routes/llm-settings.cjs.map +1 -1
  214. package/dist/routes/llm-settings.js +4 -1
  215. package/dist/routes/llm-settings.js.map +1 -1
  216. package/dist/services/cloud-funnel-analytics.cjs +1 -1
  217. package/dist/services/cloud-funnel-analytics.cjs.map +1 -1
  218. package/dist/services/cloud-funnel-analytics.d.ts +3 -11
  219. package/dist/services/cloud-funnel-analytics.js +16 -30
  220. package/dist/services/cloud-funnel-analytics.js.map +1 -1
  221. package/dist/services/telemetry.cjs +1 -1
  222. package/dist/services/telemetry.cjs.map +1 -1
  223. package/dist/services/telemetry.d.ts +46 -9
  224. package/dist/services/telemetry.js +181 -72
  225. package/dist/services/telemetry.js.map +1 -1
  226. package/dist/themes/color-themes.cjs.map +1 -1
  227. package/dist/themes/color-themes.d.ts +3 -6
  228. package/dist/themes/color-themes.js.map +1 -1
  229. package/dist/utils/error-handler.cjs +1 -1
  230. package/dist/utils/error-handler.cjs.map +1 -1
  231. package/dist/utils/error-handler.d.ts +1 -4
  232. package/dist/utils/error-handler.js +6 -7
  233. package/dist/utils/error-handler.js.map +1 -1
  234. package/dist/utils/map-provider.cjs +1 -1
  235. package/dist/utils/map-provider.cjs.map +1 -1
  236. package/dist/utils/map-provider.d.ts +1 -0
  237. package/dist/utils/map-provider.js +2 -1
  238. package/dist/utils/map-provider.js.map +1 -1
  239. package/package.json +2 -2
  240. package/build/assets/agent-settings-DGUKNSnU.js +0 -1
  241. package/build/assets/app-settings-BpViWwpC.js +0 -1
  242. package/build/assets/backend-form-modal-DhBT8P4g.js +0 -1
  243. package/build/assets/browser-store-BGXOGo-R.js +0 -1
  244. package/build/assets/client-source-Biqarhgr.js +0 -1
  245. package/build/assets/cloud-funnel-analytics-D-27T5Ao.js +0 -1
  246. package/build/assets/conversation-CHnEXGRM.js +0 -1
  247. package/build/assets/conversation-panel-11FjLCId.js +0 -1
  248. package/build/assets/conversation-state-store-JiUQp02U.js +0 -1
  249. package/build/assets/handle-capture-consent-DDnXMC9Y.js +0 -1
  250. package/build/assets/home-BQ-DC06B.js +0 -1
  251. package/build/assets/index-home-BRFDWs_4.js +0 -1
  252. package/build/assets/lesson-plan-DSf95kQ2.js +0 -4
  253. package/build/assets/llm-settings-Ch4ZbW3c.js +0 -1
  254. package/build/assets/manifest-958c741a.js +0 -1
  255. package/build/assets/onboarding-modal-DQwihcTz.js +0 -1
  256. package/build/assets/option-service.api-DAkg_F7p.js +0 -1
  257. package/build/assets/package-Dk_VtWJ4.js +0 -1
  258. package/build/assets/providers-B8pxQK8x.js +0 -1
  259. package/build/assets/root-BhP6bTBB.js +0 -2
  260. package/build/assets/root-layout-oBaHHW4s.js +0 -2
  261. package/build/assets/settings-BfgLHsgd.js +0 -1
  262. package/build/assets/telemetry-DHiTRl5_.js +0 -2
  263. package/build/assets/use-config-CXy4vD0H.js +0 -1
  264. package/build/assets/use-runtime-is-ready-D4pkGT6E.js +0 -1
  265. package/build/assets/use-tracking-poxQHMwR.js +0 -1
  266. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ljq5gbus-B2XD4bi2.js +0 -1
  267. package/dist/components/providers/posthog-wrapper.cjs +0 -2
  268. package/dist/components/providers/posthog-wrapper.cjs.map +0 -1
  269. package/dist/components/providers/posthog-wrapper.d.ts +0 -4
  270. package/dist/components/providers/posthog-wrapper.js +0 -49
  271. package/dist/components/providers/posthog-wrapper.js.map +0 -1
  272. package/dist/node_modules/posthog-js/react/dist/esm/index.cjs +0 -2
  273. package/dist/node_modules/posthog-js/react/dist/esm/index.cjs.map +0 -1
  274. package/dist/node_modules/posthog-js/react/dist/esm/index.js +0 -113
  275. package/dist/node_modules/posthog-js/react/dist/esm/index.js.map +0 -1
  276. package/dist/utils/handle-capture-consent.cjs +0 -2
  277. package/dist/utils/handle-capture-consent.cjs.map +0 -1
  278. package/dist/utils/handle-capture-consent.d.ts +0 -7
  279. package/dist/utils/handle-capture-consent.js +0 -8
  280. package/dist/utils/handle-capture-consent.js.map +0 -1
  281. /package/build/assets/{__vite-browser-external-DU-Cb_sT.js → __vite-browser-external-BQUj0sYu.js} +0 -0
  282. /package/build/assets/{agent-server-ui-style-scope-COnDHTm5.js → agent-server-ui-style-scope-qhnhZHBV.js} +0 -0
  283. /package/build/assets/{automation-BVEmGghX.js → automation-LZB0MjdV.js} +0 -0
  284. /package/build/assets/{canvas-ui-BhxjoA1f.js → canvas-ui-COgjltGz.js} +0 -0
  285. /package/build/assets/{checkmark-DhcMGwtO.js → checkmark-h7udgXMM.js} +0 -0
  286. /package/build/assets/{close-DO5Rq_CS.js → close-DLFb5kfv.js} +0 -0
  287. /package/build/assets/{code-tag-BvjtzUsr.js → code-tag-DYlAhEQY.js} +0 -0
  288. /package/build/assets/{conversation-local-storage-B31voBg7.js → conversation-local-storage-F6zVMM--.js} +0 -0
  289. /package/build/assets/{conversation-tab-empty-state-BUhKVwoi.js → conversation-tab-empty-state-CNUmIms2.js} +0 -0
  290. /package/build/assets/{copy-DLUw2us-.js → copy-BLmGeJcd.js} +0 -0
  291. /package/build/assets/{dist-Dj01FXbZ.js → dist-CodhvuAP.js} +0 -0
  292. /package/build/assets/{environment-switch-store-D9hB9PvY.js → environment-switch-store-DkjlKWzN.js} +0 -0
  293. /package/build/assets/{extension-module-card-classes-BlO4w702.js → extension-module-card-classes-9V3J9J_b.js} +0 -0
  294. /package/build/assets/{folder-ynxP2EIL.js → folder-Bk311brm.js} +0 -0
  295. /package/build/assets/{form-control-classes-CvUaw8_L.js → form-control-classes-CbdN5aO3.js} +0 -0
  296. /package/build/assets/{get-language-from-path-rWEQrOGU.js → get-language-from-path-DBqBsCWH.js} +0 -0
  297. /package/build/assets/{git-status-mapper-C3rfzUex.js → git-status-mapper-DnL9OC8_.js} +0 -0
  298. /package/build/assets/{iconBase-CuvxAQZ5.js → iconBase-Dz51Zn5x.js} +0 -0
  299. /package/build/assets/{link-external-BVDiJfZt.js → link-external-CaBmUEs_.js} +0 -0
  300. /package/build/assets/{llm-subscription-BkdHwtQe.js → llm-subscription-DtsX5Lhg.js} +0 -0
  301. /package/build/assets/{loading-spinner-Txxx1I1p.js → loading-spinner-BcdnT0mN.js} +0 -0
  302. /package/build/assets/{middleware-CWYDMVuG.js → middleware-DYHYNAnP.js} +0 -0
  303. /package/build/assets/{modal-backdrop-Dsmzgr5s.js → modal-backdrop-zVwfOJZr.js} +0 -0
  304. /package/build/assets/{modal-body-CDZdZ-eT.js → modal-body-Cc2zp0xb.js} +0 -0
  305. /package/build/assets/{modal-classes-B4oit_4c.js → modal-classes-3qT9Ap7Q.js} +0 -0
  306. /package/build/assets/{modal-close-button-DQElFMPo.js → modal-close-button-BcIBUdSq.js} +0 -0
  307. /package/build/assets/{navigation-context-SjzfpygH.js → navigation-context-DPs2G0X8.js} +0 -0
  308. /package/build/assets/{objectWithoutPropertiesLoose-CQwg6tC0.js → objectWithoutPropertiesLoose-BgYIAs2y.js} +0 -0
  309. /package/build/assets/{openhands-logo-C-gDp1wr.js → openhands-logo-bcNw5bkY.js} +0 -0
  310. /package/build/assets/{plan-components-CgPHWz3E.js → plan-components-BdZXPyZU.js} +0 -0
  311. /package/build/assets/{react-ao3tWj6K.js → react-DPDgL6du.js} +0 -0
  312. /package/build/assets/{search-pb4UKTfK.js → search-BgOCR7_c.js} +0 -0
  313. /package/build/assets/{segmented-toggle-C1-ZVyr5.js → segmented-toggle-kzwZkLaj.js} +0 -0
  314. /package/build/assets/{settings-gear-D_HVvE5L.js → settings-gear-MXCyZW0x.js} +0 -0
  315. /package/build/assets/{settings-like-page-layout-classes-DLrsPCaI.js → settings-like-page-layout-classes-Cdl6jOe5.js} +0 -0
  316. /package/build/assets/{settings-DksoDv5z.js → settings-mQUckT0g.js} +0 -0
  317. /package/build/assets/{settings-section-header-context-C2MUIG88.js → settings-section-header-context-COMOIaxV.js} +0 -0
  318. /package/build/assets/{sidebar-layout-Cn6eQaEI.js → sidebar-layout-Bm7pa3Vk.js} +0 -0
  319. /package/build/assets/{skills-CH4xgIh-.js → skills-EqzxYBvT.js} +0 -0
  320. /package/build/assets/{styled-tooltip-CvsjHuIf.js → styled-tooltip-B14i_Uac.js} +0 -0
  321. /package/build/assets/{switch-skeleton-BpSOvZ-n.js → switch-skeleton-DqQwalyu.js} +0 -0
  322. /package/build/assets/{terminal-Dokfkxn0.js → terminal-Cgf___rK.js} +0 -0
  323. /package/build/assets/{toggle-switch-CS0ClOy2.js → toggle-switch-DX_k418f.js} +0 -0
  324. /package/build/assets/{u-check-circle-DPWVO-9N.js → u-check-circle-BqoIxNz_.js} +0 -0
  325. /package/build/assets/{u-check-circle-half-BGNAAjOW.js → u-check-circle-half-MsShT8Ec.js} +0 -0
  326. /package/build/assets/{u-edit-BIskOoEG.js → u-edit-DL5LgKon.js} +0 -0
  327. /package/build/assets/{use-breakpoint-OjLm94cF.js → use-breakpoint-BP3lqLMx.js} +0 -0
  328. /package/build/assets/{use-click-outside-element-Jpt2WWd7.js → use-click-outside-element-D9BYdANT.js} +0 -0
  329. /package/build/assets/{use-is-authed-Dvbpiu3B.js → use-is-authed-BezEyfeh.js} +0 -0
  330. /package/build/assets/{use-onboarding-completion-DkRpDTsD.js → use-onboarding-completion-C_Swglzp.js} +0 -0
  331. /package/build/assets/{v4-DPgam_jW.js → v4-DbCkTSoU.js} +0 -0
  332. /package/build/assets/{vendor~browser-BvEKaLBz.js → vendor~browser-By2MVv_N.js} +0 -0
  333. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CznX01nZ.js → vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js} +0 -0
  334. /package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BuL5kjfS.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js} +0 -0
  335. /package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DUYl8gbZ.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js} +0 -0
  336. /package/build/assets/{vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-pIgQDxTc.js → vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js} +0 -0
  337. /package/build/assets/{vendor~terminal-jAaNQWS9.js → vendor~terminal-CnKZILnC.js} +0 -0
  338. /package/build/assets/{x-mark-C5przfXl.js → x-mark-Batp6gXa.js} +0 -0
@@ -1,4 +1,4 @@
1
- import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-Cbf5AGg_.js";import{t as r}from"./declaration-BGsHjPEW.js";import{n as i,r as a}from"./active-backend-context-BCXRv5pm.js";import{t as o}from"./createLucideIcon-D4Tak8A1.js";import{t as s}from"./external-link-lhdITPqq.js";import{t as c}from"./utils-DB9LsAzA.js";import{S as l}from"./agent-server-compatibility-D6DSanlx.js";import{t as u}from"./use-config-CXy4vD0H.js";import{a as d,f,o as p,u as m}from"./sidebar-layout-Cn6eQaEI.js";import{r as h}from"./use-settings-DNJC4gqu.js";import{n as g}from"./acp-providers-BQwoUBpe.js";import{n as _}from"./use-active-agent-profile-Gw_uJujV.js";import{r as v}from"./settings-utils-B1lBErvV.js";var y=o(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),b=o(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),x=o(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),S=t();function C(){let{t:e}=n(`openhands`),{active:t}=a(),{backend:i}=t;return l(i)||i.kind!==`cloud`?null:(0,S.jsxs)(`a`,{"data-testid":`settings-cloud-link`,href:`${i.host.replace(/\/+$/,``)}/settings`,target:`_blank`,rel:`noopener noreferrer`,className:c(f({collapsed:!1}),p.idle),children:[(0,S.jsx)(`span`,{className:d,children:(0,S.jsx)(b,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,S.jsx)(`span`,{className:c(m(!1),`flex-1`),children:e(r.SETTINGS$CLOUD_SETTINGS_LINK)}),(0,S.jsx)(s,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}e();var w=[{icon:(0,S.jsx)(e=>(0,S.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,S.jsx)(`path`,{d:`M9 15C8.80222 15 8.60888 15.0586 8.44443 15.1685C8.27998 15.2784 8.15181 15.4346 8.07612 15.6173C8.00043 15.8 7.98063 16.0011 8.01921 16.1951C8.0578 16.3891 8.15304 16.5673 8.29289 16.7071C8.43275 16.847 8.61093 16.9422 8.80491 16.9808C8.99889 17.0194 9.19996 16.9996 9.38268 16.9239C9.56541 16.8482 9.72159 16.72 9.83147 16.5556C9.94135 16.3911 10 16.1978 10 16C10 15.7348 9.89464 15.4804 9.70711 15.2929C9.51957 15.1054 9.26522 15 9 15ZM2 14C1.73478 14 1.48043 14.1054 1.29289 14.2929C1.10536 14.4804 1 14.7348 1 15V17C1 17.2652 1.10536 17.5196 1.29289 17.7071C1.48043 17.8946 1.73478 18 2 18C2.26522 18 2.51957 17.8946 2.70711 17.7071C2.89464 17.5196 3 17.2652 3 17V15C3 14.7348 2.89464 14.4804 2.70711 14.2929C2.51957 14.1054 2.26522 14 2 14ZM22 14C21.7348 14 21.4804 14.1054 21.2929 14.2929C21.1054 14.4804 21 14.7348 21 15V17C21 17.2652 21.1054 17.5196 21.2929 17.7071C21.4804 17.8946 21.7348 18 22 18C22.2652 18 22.5196 17.8946 22.7071 17.7071C22.8946 17.5196 23 17.2652 23 17V15C23 14.7348 22.8946 14.4804 22.7071 14.2929C22.5196 14.1054 22.2652 14 22 14ZM17 7H13V5.72C13.3023 5.54549 13.5536 5.29491 13.7291 4.99317C13.9045 4.69143 13.9979 4.34903 14 4C14 3.46957 13.7893 2.96086 13.4142 2.58579C13.0391 2.21071 12.5304 2 12 2C11.4696 2 10.9609 2.21071 10.5858 2.58579C10.2107 2.96086 10 3.46957 10 4C10.0021 4.34903 10.0955 4.69143 10.2709 4.99317C10.4464 5.29491 10.6977 5.54549 11 5.72V7H7C6.20435 7 5.44129 7.31607 4.87868 7.87868C4.31607 8.44129 4 9.20435 4 10V19C4 19.7956 4.31607 20.5587 4.87868 21.1213C5.44129 21.6839 6.20435 22 7 22H17C17.7956 22 18.5587 21.6839 19.1213 21.1213C19.6839 20.5587 20 19.7956 20 19V10C20 9.20435 19.6839 8.44129 19.1213 7.87868C18.5587 7.31607 17.7956 7 17 7ZM13.72 9L13.22 11H10.78L10.28 9H13.72ZM18 19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H7C6.73478 20 6.48043 19.8946 6.29289 19.7071C6.10536 19.5196 6 19.2652 6 19V10C6 9.73478 6.10536 9.48043 6.29289 9.29289C6.48043 9.10536 6.73478 9 7 9H8.22L9 12.24C9.05475 12.4619 9.18385 12.6583 9.36579 12.7966C9.54774 12.9349 9.77157 13.0067 10 13H14C14.2284 13.0067 14.4523 12.9349 14.6342 12.7966C14.8162 12.6583 14.9452 12.4619 15 12.24L15.78 9H17C17.2652 9 17.5196 9.10536 17.7071 9.29289C17.8946 9.48043 18 9.73478 18 10V19ZM15 15C14.8022 15 14.6089 15.0586 14.4444 15.1685C14.28 15.2784 14.1518 15.4346 14.0761 15.6173C14.0004 15.8 13.9806 16.0011 14.0192 16.1951C14.0578 16.3891 14.153 16.5673 14.2929 16.7071C14.4327 16.847 14.6109 16.9422 14.8049 16.9808C14.9989 17.0194 15.2 16.9996 15.3827 16.9239C15.5654 16.8482 15.7216 16.72 15.8315 16.5556C15.9414 16.3911 16 16.1978 16 16C16 15.7348 15.8946 15.4804 15.7071 15.2929C15.5196 15.1054 15.2652 15 15 15Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/agents`,text:`SETTINGS$NAV_AGENT`,subtitle:`SETTINGS$PAGE_AGENT_PROFILES_SUBLINE`},{icon:(0,S.jsx)(e=>(0,S.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,S.jsx)(`path`,{d:`M10 13C9.80222 13 9.60888 13.0586 9.44443 13.1685C9.27998 13.2784 9.15181 13.4346 9.07612 13.6173C9.00043 13.8 8.98063 14.0011 9.01921 14.1951C9.0578 14.3891 9.15304 14.5673 9.29289 14.7071C9.43275 14.847 9.61093 14.9422 9.80491 14.9808C9.99889 15.0194 10.2 14.9996 10.3827 14.9239C10.5654 14.8482 10.7216 14.72 10.8315 14.5556C10.9414 14.3911 11 14.1978 11 14C11 13.7348 10.8946 13.4804 10.7071 13.2929C10.5196 13.1054 10.2652 13 10 13ZM10 9C9.80222 9 9.60888 9.05865 9.44443 9.16853C9.27998 9.27841 9.15181 9.43459 9.07612 9.61732C9.00043 9.80004 8.98063 10.0011 9.01921 10.1951C9.0578 10.3891 9.15304 10.5673 9.29289 10.7071C9.43275 10.847 9.61093 10.9422 9.80491 10.9808C9.99889 11.0194 10.2 10.9996 10.3827 10.9239C10.5654 10.8482 10.7216 10.72 10.8315 10.5556C10.9414 10.3911 11 10.1978 11 10C11 9.73478 10.8946 9.48043 10.7071 9.29289C10.5196 9.10536 10.2652 9 10 9ZM14 9C13.8022 9 13.6089 9.05865 13.4444 9.16853C13.28 9.27841 13.1518 9.43459 13.0761 9.61732C13.0004 9.80004 12.9806 10.0011 13.0192 10.1951C13.0578 10.3891 13.153 10.5673 13.2929 10.7071C13.4327 10.847 13.6109 10.9422 13.8049 10.9808C13.9989 11.0194 14.2 10.9996 14.3827 10.9239C14.5654 10.8482 14.7216 10.72 14.8315 10.5556C14.9414 10.3911 15 10.1978 15 10C15 9.73478 14.8946 9.48043 14.7071 9.29289C14.5196 9.10536 14.2652 9 14 9ZM21 13C21.2652 13 21.5196 12.8946 21.7071 12.7071C21.8946 12.5196 22 12.2652 22 12C22 11.7348 21.8946 11.4804 21.7071 11.2929C21.5196 11.1054 21.2652 11 21 11H19V9H21C21.2652 9 21.5196 8.89464 21.7071 8.70711C21.8946 8.51957 22 8.26522 22 8C22 7.73478 21.8946 7.48043 21.7071 7.29289C21.5196 7.10536 21.2652 7 21 7H18.82C18.6707 6.5806 18.4299 6.19969 18.1151 5.8849C17.8003 5.57011 17.4194 5.32932 17 5.18V3C17 2.73478 16.8946 2.48043 16.7071 2.29289C16.5196 2.10536 16.2652 2 16 2C15.7348 2 15.4804 2.10536 15.2929 2.29289C15.1054 2.48043 15 2.73478 15 3V5H13V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5H9V3C9 2.73478 8.89464 2.48043 8.70711 2.29289C8.51957 2.10536 8.26522 2 8 2C7.73478 2 7.48043 2.10536 7.29289 2.29289C7.10536 2.48043 7 2.73478 7 3V5.18C6.5806 5.32932 6.19969 5.57011 5.8849 5.8849C5.57011 6.19969 5.32932 6.5806 5.18 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H5V11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5V15H3C2.73478 15 2.48043 15.1054 2.29289 15.2929C2.10536 15.4804 2 15.7348 2 16C2 16.2652 2.10536 16.5196 2.29289 16.7071C2.48043 16.8946 2.73478 17 3 17H5.18C5.32932 17.4194 5.57011 17.8003 5.8849 18.1151C6.19969 18.4299 6.5806 18.6707 7 18.82V21C7 21.2652 7.10536 21.5196 7.29289 21.7071C7.48043 21.8946 7.73478 22 8 22C8.26522 22 8.51957 21.8946 8.70711 21.7071C8.89464 21.5196 9 21.2652 9 21V19H11V21C11 21.2652 11.1054 21.5196 11.2929 21.7071C11.4804 21.8946 11.7348 22 12 22C12.2652 22 12.5196 21.8946 12.7071 21.7071C12.8946 21.5196 13 21.2652 13 21V19H15V21C15 21.2652 15.1054 21.5196 15.2929 21.7071C15.4804 21.8946 15.7348 22 16 22C16.2652 22 16.5196 21.8946 16.7071 21.7071C16.8946 21.5196 17 21.2652 17 21V18.82C17.4194 18.6707 17.8003 18.4299 18.1151 18.1151C18.4299 17.8003 18.6707 17.4194 18.82 17H21C21.2652 17 21.5196 16.8946 21.7071 16.7071C21.8946 16.5196 22 16.2652 22 16C22 15.7348 21.8946 15.4804 21.7071 15.2929C21.5196 15.1054 21.2652 15 21 15H19V13H21ZM17 16C17 16.2652 16.8946 16.5196 16.7071 16.7071C16.5196 16.8946 16.2652 17 16 17H8C7.73478 17 7.48043 16.8946 7.29289 16.7071C7.10536 16.5196 7 16.2652 7 16V8C7 7.73478 7.10536 7.48043 7.29289 7.29289C7.48043 7.10536 7.73478 7 8 7H16C16.2652 7 16.5196 7.10536 16.7071 7.29289C16.8946 7.48043 17 7.73478 17 8V16ZM14 13C13.8022 13 13.6089 13.0586 13.4444 13.1685C13.28 13.2784 13.1518 13.4346 13.0761 13.6173C13.0004 13.8 12.9806 14.0011 13.0192 14.1951C13.0578 14.3891 13.153 14.5673 13.2929 14.7071C13.4327 14.847 13.6109 14.9422 13.8049 14.9808C13.9989 15.0194 14.2 14.9996 14.3827 14.9239C14.5654 14.8482 14.7216 14.72 14.8315 14.5556C14.9414 14.3911 15 14.1978 15 14C15 13.7348 14.8946 13.4804 14.7071 13.2929C14.5196 13.1054 14.2652 13 14 13Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/llm`,text:`SETTINGS$NAV_LLM`,subtitle:`SETTINGS$PAGE_LLM_SUBLINE`,disabledByAcp:!0},{icon:(0,S.jsx)(e=>(0,S.jsxs)(`svg`,{id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 22.3 18.66`,...e,children:[(0,S.jsx)(`defs`,{children:(0,S.jsx)(`style`,{children:`
1
+ import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-Cbf5AGg_.js";import{t as r}from"./declaration-BGsHjPEW.js";import{n as i,r as a}from"./active-backend-context-B8rMv0X9.js";import{t as o}from"./createLucideIcon-D4Tak8A1.js";import{t as s}from"./external-link-lhdITPqq.js";import{t as c}from"./utils-DB9LsAzA.js";import{S as l}from"./agent-server-compatibility-BWN-EIQn.js";import{t as u}from"./use-config-B5r8erYt.js";import{a as d,f,o as p,u as m}from"./sidebar-layout-Bm7pa3Vk.js";import{r as h}from"./use-settings-CyxSlyTQ.js";import{n as g}from"./acp-providers-DerAmTyY.js";import{n as _}from"./use-active-agent-profile-hI-x-UBa.js";import{r as v}from"./settings-utils-DzCVfiR3.js";var y=o(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),b=o(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),x=o(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),S=t();function C(){let{t:e}=n(`openhands`),{active:t}=a(),{backend:i}=t;return l(i)||i.kind!==`cloud`?null:(0,S.jsxs)(`a`,{"data-testid":`settings-cloud-link`,href:`${i.host.replace(/\/+$/,``)}/settings`,target:`_blank`,rel:`noopener noreferrer`,className:c(f({collapsed:!1}),p.idle),children:[(0,S.jsx)(`span`,{className:d,children:(0,S.jsx)(b,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,S.jsx)(`span`,{className:c(m(!1),`flex-1`),children:e(r.SETTINGS$CLOUD_SETTINGS_LINK)}),(0,S.jsx)(s,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}e();var w=[{icon:(0,S.jsx)(e=>(0,S.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,S.jsx)(`path`,{d:`M9 15C8.80222 15 8.60888 15.0586 8.44443 15.1685C8.27998 15.2784 8.15181 15.4346 8.07612 15.6173C8.00043 15.8 7.98063 16.0011 8.01921 16.1951C8.0578 16.3891 8.15304 16.5673 8.29289 16.7071C8.43275 16.847 8.61093 16.9422 8.80491 16.9808C8.99889 17.0194 9.19996 16.9996 9.38268 16.9239C9.56541 16.8482 9.72159 16.72 9.83147 16.5556C9.94135 16.3911 10 16.1978 10 16C10 15.7348 9.89464 15.4804 9.70711 15.2929C9.51957 15.1054 9.26522 15 9 15ZM2 14C1.73478 14 1.48043 14.1054 1.29289 14.2929C1.10536 14.4804 1 14.7348 1 15V17C1 17.2652 1.10536 17.5196 1.29289 17.7071C1.48043 17.8946 1.73478 18 2 18C2.26522 18 2.51957 17.8946 2.70711 17.7071C2.89464 17.5196 3 17.2652 3 17V15C3 14.7348 2.89464 14.4804 2.70711 14.2929C2.51957 14.1054 2.26522 14 2 14ZM22 14C21.7348 14 21.4804 14.1054 21.2929 14.2929C21.1054 14.4804 21 14.7348 21 15V17C21 17.2652 21.1054 17.5196 21.2929 17.7071C21.4804 17.8946 21.7348 18 22 18C22.2652 18 22.5196 17.8946 22.7071 17.7071C22.8946 17.5196 23 17.2652 23 17V15C23 14.7348 22.8946 14.4804 22.7071 14.2929C22.5196 14.1054 22.2652 14 22 14ZM17 7H13V5.72C13.3023 5.54549 13.5536 5.29491 13.7291 4.99317C13.9045 4.69143 13.9979 4.34903 14 4C14 3.46957 13.7893 2.96086 13.4142 2.58579C13.0391 2.21071 12.5304 2 12 2C11.4696 2 10.9609 2.21071 10.5858 2.58579C10.2107 2.96086 10 3.46957 10 4C10.0021 4.34903 10.0955 4.69143 10.2709 4.99317C10.4464 5.29491 10.6977 5.54549 11 5.72V7H7C6.20435 7 5.44129 7.31607 4.87868 7.87868C4.31607 8.44129 4 9.20435 4 10V19C4 19.7956 4.31607 20.5587 4.87868 21.1213C5.44129 21.6839 6.20435 22 7 22H17C17.7956 22 18.5587 21.6839 19.1213 21.1213C19.6839 20.5587 20 19.7956 20 19V10C20 9.20435 19.6839 8.44129 19.1213 7.87868C18.5587 7.31607 17.7956 7 17 7ZM13.72 9L13.22 11H10.78L10.28 9H13.72ZM18 19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H7C6.73478 20 6.48043 19.8946 6.29289 19.7071C6.10536 19.5196 6 19.2652 6 19V10C6 9.73478 6.10536 9.48043 6.29289 9.29289C6.48043 9.10536 6.73478 9 7 9H8.22L9 12.24C9.05475 12.4619 9.18385 12.6583 9.36579 12.7966C9.54774 12.9349 9.77157 13.0067 10 13H14C14.2284 13.0067 14.4523 12.9349 14.6342 12.7966C14.8162 12.6583 14.9452 12.4619 15 12.24L15.78 9H17C17.2652 9 17.5196 9.10536 17.7071 9.29289C17.8946 9.48043 18 9.73478 18 10V19ZM15 15C14.8022 15 14.6089 15.0586 14.4444 15.1685C14.28 15.2784 14.1518 15.4346 14.0761 15.6173C14.0004 15.8 13.9806 16.0011 14.0192 16.1951C14.0578 16.3891 14.153 16.5673 14.2929 16.7071C14.4327 16.847 14.6109 16.9422 14.8049 16.9808C14.9989 17.0194 15.2 16.9996 15.3827 16.9239C15.5654 16.8482 15.7216 16.72 15.8315 16.5556C15.9414 16.3911 16 16.1978 16 16C16 15.7348 15.8946 15.4804 15.7071 15.2929C15.5196 15.1054 15.2652 15 15 15Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/agents`,text:`SETTINGS$NAV_AGENT`,subtitle:`SETTINGS$PAGE_AGENT_PROFILES_SUBLINE`},{icon:(0,S.jsx)(e=>(0,S.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,S.jsx)(`path`,{d:`M10 13C9.80222 13 9.60888 13.0586 9.44443 13.1685C9.27998 13.2784 9.15181 13.4346 9.07612 13.6173C9.00043 13.8 8.98063 14.0011 9.01921 14.1951C9.0578 14.3891 9.15304 14.5673 9.29289 14.7071C9.43275 14.847 9.61093 14.9422 9.80491 14.9808C9.99889 15.0194 10.2 14.9996 10.3827 14.9239C10.5654 14.8482 10.7216 14.72 10.8315 14.5556C10.9414 14.3911 11 14.1978 11 14C11 13.7348 10.8946 13.4804 10.7071 13.2929C10.5196 13.1054 10.2652 13 10 13ZM10 9C9.80222 9 9.60888 9.05865 9.44443 9.16853C9.27998 9.27841 9.15181 9.43459 9.07612 9.61732C9.00043 9.80004 8.98063 10.0011 9.01921 10.1951C9.0578 10.3891 9.15304 10.5673 9.29289 10.7071C9.43275 10.847 9.61093 10.9422 9.80491 10.9808C9.99889 11.0194 10.2 10.9996 10.3827 10.9239C10.5654 10.8482 10.7216 10.72 10.8315 10.5556C10.9414 10.3911 11 10.1978 11 10C11 9.73478 10.8946 9.48043 10.7071 9.29289C10.5196 9.10536 10.2652 9 10 9ZM14 9C13.8022 9 13.6089 9.05865 13.4444 9.16853C13.28 9.27841 13.1518 9.43459 13.0761 9.61732C13.0004 9.80004 12.9806 10.0011 13.0192 10.1951C13.0578 10.3891 13.153 10.5673 13.2929 10.7071C13.4327 10.847 13.6109 10.9422 13.8049 10.9808C13.9989 11.0194 14.2 10.9996 14.3827 10.9239C14.5654 10.8482 14.7216 10.72 14.8315 10.5556C14.9414 10.3911 15 10.1978 15 10C15 9.73478 14.8946 9.48043 14.7071 9.29289C14.5196 9.10536 14.2652 9 14 9ZM21 13C21.2652 13 21.5196 12.8946 21.7071 12.7071C21.8946 12.5196 22 12.2652 22 12C22 11.7348 21.8946 11.4804 21.7071 11.2929C21.5196 11.1054 21.2652 11 21 11H19V9H21C21.2652 9 21.5196 8.89464 21.7071 8.70711C21.8946 8.51957 22 8.26522 22 8C22 7.73478 21.8946 7.48043 21.7071 7.29289C21.5196 7.10536 21.2652 7 21 7H18.82C18.6707 6.5806 18.4299 6.19969 18.1151 5.8849C17.8003 5.57011 17.4194 5.32932 17 5.18V3C17 2.73478 16.8946 2.48043 16.7071 2.29289C16.5196 2.10536 16.2652 2 16 2C15.7348 2 15.4804 2.10536 15.2929 2.29289C15.1054 2.48043 15 2.73478 15 3V5H13V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5H9V3C9 2.73478 8.89464 2.48043 8.70711 2.29289C8.51957 2.10536 8.26522 2 8 2C7.73478 2 7.48043 2.10536 7.29289 2.29289C7.10536 2.48043 7 2.73478 7 3V5.18C6.5806 5.32932 6.19969 5.57011 5.8849 5.8849C5.57011 6.19969 5.32932 6.5806 5.18 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H5V11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5V15H3C2.73478 15 2.48043 15.1054 2.29289 15.2929C2.10536 15.4804 2 15.7348 2 16C2 16.2652 2.10536 16.5196 2.29289 16.7071C2.48043 16.8946 2.73478 17 3 17H5.18C5.32932 17.4194 5.57011 17.8003 5.8849 18.1151C6.19969 18.4299 6.5806 18.6707 7 18.82V21C7 21.2652 7.10536 21.5196 7.29289 21.7071C7.48043 21.8946 7.73478 22 8 22C8.26522 22 8.51957 21.8946 8.70711 21.7071C8.89464 21.5196 9 21.2652 9 21V19H11V21C11 21.2652 11.1054 21.5196 11.2929 21.7071C11.4804 21.8946 11.7348 22 12 22C12.2652 22 12.5196 21.8946 12.7071 21.7071C12.8946 21.5196 13 21.2652 13 21V19H15V21C15 21.2652 15.1054 21.5196 15.2929 21.7071C15.4804 21.8946 15.7348 22 16 22C16.2652 22 16.5196 21.8946 16.7071 21.7071C16.8946 21.5196 17 21.2652 17 21V18.82C17.4194 18.6707 17.8003 18.4299 18.1151 18.1151C18.4299 17.8003 18.6707 17.4194 18.82 17H21C21.2652 17 21.5196 16.8946 21.7071 16.7071C21.8946 16.5196 22 16.2652 22 16C22 15.7348 21.8946 15.4804 21.7071 15.2929C21.5196 15.1054 21.2652 15 21 15H19V13H21ZM17 16C17 16.2652 16.8946 16.5196 16.7071 16.7071C16.5196 16.8946 16.2652 17 16 17H8C7.73478 17 7.48043 16.8946 7.29289 16.7071C7.10536 16.5196 7 16.2652 7 16V8C7 7.73478 7.10536 7.48043 7.29289 7.29289C7.48043 7.10536 7.73478 7 8 7H16C16.2652 7 16.5196 7.10536 16.7071 7.29289C16.8946 7.48043 17 7.73478 17 8V16ZM14 13C13.8022 13 13.6089 13.0586 13.4444 13.1685C13.28 13.2784 13.1518 13.4346 13.0761 13.6173C13.0004 13.8 12.9806 14.0011 13.0192 14.1951C13.0578 14.3891 13.153 14.5673 13.2929 14.7071C13.4327 14.847 13.6109 14.9422 13.8049 14.9808C13.9989 15.0194 14.2 14.9996 14.3827 14.9239C14.5654 14.8482 14.7216 14.72 14.8315 14.5556C14.9414 14.3911 15 14.1978 15 14C15 13.7348 14.8946 13.4804 14.7071 13.2929C14.5196 13.1054 14.2652 13 14 13Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/llm`,text:`SETTINGS$NAV_LLM`,subtitle:`SETTINGS$PAGE_LLM_SUBLINE`,disabledByAcp:!0},{icon:(0,S.jsx)(e=>(0,S.jsxs)(`svg`,{id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 22.3 18.66`,...e,children:[(0,S.jsx)(`defs`,{children:(0,S.jsx)(`style`,{children:`
2
2
  .st0 {
3
3
  stroke-miterlimit: 10;
4
4
  }
@@ -1 +1 @@
1
- import{t as e}from"./useQuery-D5pEZbY0.js";import{N as t,_ as n,d as r}from"./agent-server-compatibility-D6DSanlx.js";import{u as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js";import{t as a}from"./proxy-CuhhyjdX.js";import{t as o}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DUYl8gbZ.js";var s=100;function c(){let e=n().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function l(){let e=c(),t=[],n=null;do{let r=new URLSearchParams({limit:String(s)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/skills/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}function u(e){return{name:e.name,type:`knowledge`,source:`public`,description:e.description,triggers:e.triggers,content:e.content,license:e.license??null,compatibility:e.compatibility??null}}var d=o.map(u),f=class{static async getSkills(e){if(n().backend.kind===`cloud`)return l();let a=[];try{a=(await new i(r()).getSkills({load_public:!1,load_user:!0,load_project:!0,load_org:!1,project_dir:e??t()})).skills??[]}catch{}return[...a,...d]}},p=t=>e({queryKey:[`skills`,t??null],queryFn:()=>f.getSkills(t),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{p as t};
1
+ import{t as e}from"./useQuery-D5pEZbY0.js";import{N as t,_ as n,d as r}from"./agent-server-compatibility-BWN-EIQn.js";import{u as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{t as a}from"./proxy-B3tCGf0X.js";import{t as o}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js";var s=100;function c(){let e=n().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function l(){let e=c(),t=[],n=null;do{let r=new URLSearchParams({limit:String(s)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/skills/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}function u(e){return{name:e.name,type:`knowledge`,source:`public`,description:e.description,triggers:e.triggers,content:e.content,license:e.license??null,compatibility:e.compatibility??null}}var d=o.map(u),f=class{static async getSkills(e){if(n().backend.kind===`cloud`)return l();let a=[];try{a=(await new i(r()).getSkills({load_public:!1,load_user:!0,load_project:!0,load_org:!1,project_dir:e??t()})).skills??[]}catch{}return[...a,...d]}},p=t=>e({queryKey:[`skills`,t??null],queryFn:()=>f.getSkills(t),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{p as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{C as n,t as r}from"./use-event-store-CsD17BKu.js";var i=e(t(),1);function a(e){if(n(e)&&e.observation.kind===`TaskTrackerObservation`){let t=e.observation;if(t.command===`plan`)return t.task_list.map((e,t)=>({id:String(t+1),title:e.title,status:e.status,notes:e.notes||void 0}))}return null}function o(){let e=r(e=>e.events);return(0,i.useMemo)(()=>{for(let t=e.length-1;t>=0;--t){let n=a(e[t]);if(n)return{taskList:n,hasTaskList:n.length>0}}return{taskList:[],hasTaskList:!1}},[e])}export{o as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{C as n,t as r}from"./use-event-store-Bbaz51GR.js";var i=e(t(),1);function a(e){if(n(e)&&e.observation.kind===`TaskTrackerObservation`){let t=e.observation;if(t.command===`plan`)return t.task_list.map((e,t)=>({id:String(t+1),title:e.title,status:e.status,notes:e.notes||void 0}))}return null}function o(){let e=r(e=>e.events);return(0,i.useMemo)(()=>{for(let t=e.length-1;t>=0;--t){let n=a(e[t]);if(n)return{taskList:n,hasTaskList:n.length>0}}return{taskList:[],hasTaskList:!1}},[e])}export{o as t};
@@ -0,0 +1 @@
1
+ import{d as e}from"./telemetry-C5JMEfqB.js";import{r as t}from"./use-settings-CyxSlyTQ.js";var n=()=>{let{data:n}=t(),r={current_url:window.location.href,user_email:n?.email||n?.git_user_email||null},i=(t,n={})=>{e(t,{...n,...r})};return{trackLoginButtonClick:({provider:e})=>{i(`login_button_clicked`,{provider:e})},trackConversationCreated:({conversationId:e,taskId:t,hasRepository:n,gitProvider:r,hasWorkspace:a,workspaceMode:o,hasInitialQuery:s,agentType:c,hasParentConversation:l,entryPoint:u})=>{i(`conversation_created`,{conversation_id:e,task_id:t,is_start_task:e.startsWith(`task-`),has_repository:n,git_provider:r,has_workspace:a,workspace_mode:o,has_initial_query:s,agent_type:c,has_parent_conversation:l,entry_point:u})},trackPushButtonClick:()=>{i(`push_button_clicked`)},trackPullButtonClick:()=>{i(`pull_button_clicked`)},trackCreatePrButtonClick:()=>{i(`create_pr_button_clicked`)},trackUserSignupCompleted:()=>{i(`user_signup_completed`,{signup_timestamp:new Date().toISOString()})},trackPrebuiltAutomationEnabled:({automationId:e,automationName:t,automationCategory:n})=>{i(`prebuilt_automation_enabled`,{automation_id:e,automation_name:t,automation_category:n})},trackInitialQuerySubmitted:({entryPoint:e,queryCharacterLength:t,replayJsonSize:n})=>{i(`initial_query_submitted`,{entry_point:e,query_character_length:t,replay_json_size:n})},trackUserMessageSent:({sessionMessageCount:e,currentMessageLength:t})=>{i(`user_message_sent`,{session_message_count:e,current_message_length:t})},trackDownloadVsCodeButtonClicked:()=>{i(`download_via_vscode_button_clicked`)},trackSettingsSaved:({llmModel:e,llmApiKeySet:t,searchApiKeySet:n,remoteRuntimeResourceFactor:r})=>{i(`settings_saved`,{LLM_MODEL:e,LLM_API_KEY_SET:t,SEARCH_API_KEY_SET:n,REMOTE_RUNTIME_RESOURCE_FACTOR:r})},trackMcpConfigUpdated:({sseServersCount:e,stdioServersCount:t})=>{i(`mcp_config_updated`,{has_mcp_config:!0,sse_servers_count:e,stdio_servers_count:t})},trackDownloadTrajectoryButtonClicked:()=>{i(`download_trajectory_button_clicked`)},trackConversationExported:e=>{i(`conversation_exported`,{format:e})},trackAutomationCreated:({backendKind:e})=>{i(`automation_created`,{backend_kind:e})},trackAutomationExecuted:({backendKind:e})=>{i(`automation_executed`,{backend_kind:e})},trackAutomationDeleted:({backendKind:e})=>{i(`automation_deleted`,{backend_kind:e})},trackAutomationDeactivated:({backendKind:e})=>{i(`automation_deactivated`,{backend_kind:e})},trackAutomationEdited:({backendKind:e})=>{i(`automation_edited`,{backend_kind:e})},trackAutomationExported:({backendKind:e})=>{i(`automation_exported`,{backend_kind:e})},trackAutomationImported:({backendKind:e})=>{i(`automation_imported`,{backend_kind:e})},trackBackendAdded:({backendKind:e,connectionMethod:t,isOpenhandsCloud:n,isCustomHost:r,hasApiKey:a,source:o})=>{i(`backend_added`,{backend_kind:e,connection_method:t,is_openhands_cloud:n,is_custom_host:r,has_api_key:a,source:o})},trackOnboardingStarted:()=>{i(`onboarding_started`)},trackOnboardingStepViewed:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{i(`onboarding_step_viewed`,{step:e,step_index:t,total_steps:n,agent:r})},trackOnboardingCompleted:({agent:e})=>{i(`onboarding_completed`,{agent:e})},trackOnboardingSkipped:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{i(`onboarding_skipped`,{step:e,step_index:t,total_steps:n,agent:r})}}};export{n as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useQuery-D5pEZbY0.js";import{n as r}from"./active-backend-context-BCXRv5pm.js";import{t as i}from"./agent-server-conversation-service.api-cylugfDz.js";var a=e(t(),1),o=1e3*60*5,s=1e3*60*15,c=(e,t)=>{let c=r(),l=(0,a.useRef)({cid:e,backendId:c.backend.id});l.current.cid!==e&&(l.current={cid:e,backendId:c.backend.id});let u=l.current.backendId!==c.backend.id;return n({queryKey:[`user`,`conversation`,e,c.backend.id,c.orgId],queryFn:async()=>e?(await i.batchGetAppConversations([e]))[0]??null:null,enabled:!!e&&!e.startsWith(`task-`)&&!u,retry:!1,refetchInterval:t,staleTime:o,gcTime:s})};export{c as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useQuery-D5pEZbY0.js";import{n as r}from"./active-backend-context-B8rMv0X9.js";import{t as i}from"./agent-server-conversation-service.api-DSPIkMwJ.js";var a=e(t(),1),o=1e3*60*5,s=1e3*60*15,c=(e,t)=>{let c=r(),l=(0,a.useRef)({cid:e,backendId:c.backend.id});l.current.cid!==e&&(l.current={cid:e,backendId:c.backend.id});let u=l.current.backendId!==c.backend.id;return n({queryKey:[`user`,`conversation`,e,c.backend.id,c.orgId],queryFn:async()=>e?(await i.batchGetAppConversations([e]))[0]??null:null,enabled:!!e&&!e.startsWith(`task-`)&&!u,retry:!1,refetchInterval:t,staleTime:o,gcTime:s})};export{c as t};
@@ -1 +1 @@
1
- import{t as e}from"./iconBase-CuvxAQZ5.js";function t(t){return e({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M256 48h-.7c-55.4.2-107.4 21.9-146.6 61.1C69.6 148.4 48 200.5 48 256s21.6 107.6 60.8 146.9c39.1 39.2 91.2 60.9 146.6 61.1h.7c114.7 0 208-93.3 208-208S370.7 48 256 48zm180.2 194h-77.6c-.9-26.7-4.2-52.2-9.8-76.2 17.1-5.5 33.7-12.5 49.7-21 22 28.2 35 61.6 37.7 97.2zM242 242h-61.8c.8-24.5 3.8-47.7 8.8-69.1 17.4 3.9 35.1 6.3 53 7.1v62zm0 28v61.9c-17.8.8-35.6 3.2-53 7.1-5-21.4-8-44.6-8.8-69H242zm28 0h61.3c-.8 24.4-3.8 47.6-8.8 68.9-17.2-3.9-34.8-6.2-52.5-7V270zm0-28v-62c17.8-.8 35.4-3.2 52.5-7 5 21.4 8 44.5 8.8 69H270zm109.4-117.9c-12.3 6.1-25 11.3-38 15.5-7.1-21.4-16.1-39.9-26.5-54.5 24 8.3 45.9 21.6 64.5 39zM315 146.8c-14.7 3.2-29.8 5.2-45 6V79.4c17 9.2 33.6 33.9 45 67.4zM242 79v73.7c-15.4-.8-30.6-2.8-45.5-6.1 11.6-33.8 28.4-58.5 45.5-67.6zm-45.6 6.4c-10.3 14.5-19.2 32.9-26.3 54.1-12.8-4.2-25.4-9.4-37.5-15.4 18.4-17.3 40.1-30.5 63.8-38.7zm-82.9 59.5c15.8 8.4 32.3 15.4 49.2 20.8-5.7 23.9-9 49.5-9.8 76.2h-77c2.6-35.4 15.6-68.8 37.6-97zM75.8 270h77c.9 26.7 4.2 52.3 9.8 76.2-16.9 5.5-33.4 12.5-49.2 20.8-21.9-28.1-34.9-61.5-37.6-97zm56.7 117.9c12.1-6 24.7-11.2 37.6-15.4 7.1 21.3 16 39.6 26.3 54.2-23.7-8.4-45.4-21.5-63.9-38.8zm64-22.6c14.9-3.3 30.2-5.3 45.5-6.1V433c-17.2-9.1-33.9-33.9-45.5-67.7zm73.5 67.3v-73.5c15.2.8 30.3 2.8 45 6-11.4 33.6-28 58.3-45 67.5zm45-5.7c10.4-14.6 19.4-33.1 26.5-54.5 13 4.2 25.8 9.5 38 15.6-18.6 17.3-40.6 30.6-64.5 38.9zm83.5-59.8c-16-8.5-32.6-15.5-49.7-21 5.6-23.9 8.9-49.4 9.8-76.1h77.6c-2.7 35.5-15.6 68.9-37.7 97.1z`},child:[]}]})(t)}export{t};
1
+ import{t as e}from"./iconBase-Dz51Zn5x.js";function t(t){return e({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M256 48h-.7c-55.4.2-107.4 21.9-146.6 61.1C69.6 148.4 48 200.5 48 256s21.6 107.6 60.8 146.9c39.1 39.2 91.2 60.9 146.6 61.1h.7c114.7 0 208-93.3 208-208S370.7 48 256 48zm180.2 194h-77.6c-.9-26.7-4.2-52.2-9.8-76.2 17.1-5.5 33.7-12.5 49.7-21 22 28.2 35 61.6 37.7 97.2zM242 242h-61.8c.8-24.5 3.8-47.7 8.8-69.1 17.4 3.9 35.1 6.3 53 7.1v62zm0 28v61.9c-17.8.8-35.6 3.2-53 7.1-5-21.4-8-44.6-8.8-69H242zm28 0h61.3c-.8 24.4-3.8 47.6-8.8 68.9-17.2-3.9-34.8-6.2-52.5-7V270zm0-28v-62c17.8-.8 35.4-3.2 52.5-7 5 21.4 8 44.5 8.8 69H270zm109.4-117.9c-12.3 6.1-25 11.3-38 15.5-7.1-21.4-16.1-39.9-26.5-54.5 24 8.3 45.9 21.6 64.5 39zM315 146.8c-14.7 3.2-29.8 5.2-45 6V79.4c17 9.2 33.6 33.9 45 67.4zM242 79v73.7c-15.4-.8-30.6-2.8-45.5-6.1 11.6-33.8 28.4-58.5 45.5-67.6zm-45.6 6.4c-10.3 14.5-19.2 32.9-26.3 54.1-12.8-4.2-25.4-9.4-37.5-15.4 18.4-17.3 40.1-30.5 63.8-38.7zm-82.9 59.5c15.8 8.4 32.3 15.4 49.2 20.8-5.7 23.9-9 49.5-9.8 76.2h-77c2.6-35.4 15.6-68.8 37.6-97zM75.8 270h77c.9 26.7 4.2 52.3 9.8 76.2-16.9 5.5-33.4 12.5-49.2 20.8-21.9-28.1-34.9-61.5-37.6-97zm56.7 117.9c12.1-6 24.7-11.2 37.6-15.4 7.1 21.3 16 39.6 26.3 54.2-23.7-8.4-45.4-21.5-63.9-38.8zm64-22.6c14.9-3.3 30.2-5.3 45.5-6.1V433c-17.2-9.1-33.9-33.9-45.5-67.7zm73.5 67.3v-73.5c15.2.8 30.3 2.8 45 6-11.4 33.6-28 58.3-45 67.5zm45-5.7c10.4-14.6 19.4-33.1 26.5-54.5 13 4.2 25.8 9.5 38 15.6-18.6 17.3-40.6 30.6-64.5 38.9zm83.5-59.8c-16-8.5-32.6-15.5-49.7-21 5.6-23.9 8.9-49.4 9.8-76.1h77.6c-2.7 35.5-15.6 68.9-37.7 97.1z`},child:[]}]})(t)}export{t};
@@ -1,4 +1,4 @@
1
- import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./vendor~browser-BvEKaLBz.js";var u=class{constructor(e,t){this.protocol=e,this.data=t,this.events=new s}events},d=class extends t{frame;constructor(e,t){super(e,{}),this.frame=t}},f=class{emitter;constructor(){this.emitter=new s}async queue(e){await this.emitter.emitAsPromise(new d(`frame`,e))}on(e,t,n){this.emitter.on(e,t,n)}disable(){this.emitter.removeAllListeners()}};function p(e){let t=new URL(e.url);return t.protocol===`file:`||/(fonts\.googleapis\.com)/.test(t.hostname)||/node_modules/.test(t.pathname)||t.pathname.includes(`@vite`)?!0:/\.(s?css|less|m?jsx?|m?tsx?|html|ttf|otf|woff|woff2|eot|gif|jpe?g|png|avif|webp|svg|mp4|webm|ogg|mov|mp3|wav|ogg|flac|aac|pdf|txt|csv|json|xml|md|zip|tar|gz|rar|7z)$/i.test(t.pathname)}var m=`[MSW]`;function h(e,...t){return`${m} ${r(e,...t)}`}function g(e,...t){console.warn(h(e,...t))}function _(e,...t){console.error(h(e,...t))}var v={formatMessage:h,warn:g,error:_},y=class extends Error{constructor(e){super(e),this.name=`InternalError`}};function b(){if(typeof navigator<`u`&&navigator.product===`ReactNative`)return!0;if(typeof process<`u`){let e=process.type;return e===`renderer`||e===`worker`?!1:!!(process.versions&&process.versions.node)}return!1}var x=Object.defineProperty,S=(e,t)=>{for(var n in t)x(e,n,{get:t[n],enumerable:!0})},C={};S(C,{blue:()=>te,gray:()=>ne,green:()=>ie,red:()=>re,yellow:()=>ee});function ee(e){return`\x1B[33m${e}\x1B[0m`}function te(e){return`\x1B[34m${e}\x1B[0m`}function ne(e){return`\x1B[90m${e}\x1B[0m`}function re(e){return`\x1B[31m${e}\x1B[0m`}function ie(e){return`\x1B[32m${e}\x1B[0m`}var ae=b(),oe=class{constructor(e){this.name=e,this.prefix=`[${this.name}]`;let t=de(`DEBUG`),n=de(`LOG_LEVEL`);t===`1`||t===`true`||t!==void 0&&this.name.startsWith(t)?(this.debug=fe(n,`debug`)?w:this.debug,this.info=fe(n,`info`)?w:this.info,this.success=fe(n,`success`)?w:this.success,this.warning=fe(n,`warning`)?w:this.warning,this.error=fe(n,`error`)?w:this.error):(this.info=w,this.success=w,this.warning=w,this.error=w,this.only=w)}prefix;extend(e){return new oe(`${this.name}:${e}`)}debug(e,...t){this.logEntry({level:`debug`,message:ne(e),positionals:t,prefix:this.prefix,colors:{prefix:`gray`}})}info(e,...t){this.logEntry({level:`info`,message:e,positionals:t,prefix:this.prefix,colors:{prefix:`blue`}});let n=new se;return(e,...t)=>{n.measure(),this.logEntry({level:`info`,message:`${e} ${ne(`${n.deltaTime}ms`)}`,positionals:t,prefix:this.prefix,colors:{prefix:`blue`}})}}success(e,...t){this.logEntry({level:`info`,message:e,positionals:t,prefix:`\u2714 ${this.prefix}`,colors:{timestamp:`green`,prefix:`green`}})}warning(e,...t){this.logEntry({level:`warning`,message:e,positionals:t,prefix:`\u26A0 ${this.prefix}`,colors:{timestamp:`yellow`,prefix:`yellow`}})}error(e,...t){this.logEntry({level:`error`,message:e,positionals:t,prefix:`\u2716 ${this.prefix}`,colors:{timestamp:`red`,prefix:`red`}})}only(e){e()}createEntry(e,t){return{timestamp:new Date,level:e,message:t}}logEntry(e){let{level:t,message:n,prefix:r,colors:i,positionals:a=[]}=e,o=this.createEntry(t,n),s=i?.timestamp||`gray`,c=i?.prefix||`gray`,l={timestamp:C[s],prefix:C[c]};this.getWriter(t)([l.timestamp(this.formatTimestamp(o.timestamp))].concat(r==null?[]:l.prefix(r),pe(n)).join(` `),...a.map(pe))}formatTimestamp(e){return`${e.toLocaleTimeString(`en-GB`)}:${e.getMilliseconds()}`}getWriter(e){switch(e){case`debug`:case`success`:case`info`:return ce;case`warning`:return le;case`error`:return ue}}},se=class{startTime;endTime;deltaTime;constructor(){this.startTime=performance.now()}measure(){this.endTime=performance.now();let e=this.endTime-this.startTime;this.deltaTime=e.toFixed(2)}},w=()=>void 0;function ce(e,...t){if(ae){process.stdout.write(r(e,...t)+`
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./vendor~browser-By2MVv_N.js";var u=class{constructor(e,t){this.protocol=e,this.data=t,this.events=new s}events},d=class extends t{frame;constructor(e,t){super(e,{}),this.frame=t}},f=class{emitter;constructor(){this.emitter=new s}async queue(e){await this.emitter.emitAsPromise(new d(`frame`,e))}on(e,t,n){this.emitter.on(e,t,n)}disable(){this.emitter.removeAllListeners()}};function p(e){let t=new URL(e.url);return t.protocol===`file:`||/(fonts\.googleapis\.com)/.test(t.hostname)||/node_modules/.test(t.pathname)||t.pathname.includes(`@vite`)?!0:/\.(s?css|less|m?jsx?|m?tsx?|html|ttf|otf|woff|woff2|eot|gif|jpe?g|png|avif|webp|svg|mp4|webm|ogg|mov|mp3|wav|ogg|flac|aac|pdf|txt|csv|json|xml|md|zip|tar|gz|rar|7z)$/i.test(t.pathname)}var m=`[MSW]`;function h(e,...t){return`${m} ${r(e,...t)}`}function g(e,...t){console.warn(h(e,...t))}function _(e,...t){console.error(h(e,...t))}var v={formatMessage:h,warn:g,error:_},y=class extends Error{constructor(e){super(e),this.name=`InternalError`}};function b(){if(typeof navigator<`u`&&navigator.product===`ReactNative`)return!0;if(typeof process<`u`){let e=process.type;return e===`renderer`||e===`worker`?!1:!!(process.versions&&process.versions.node)}return!1}var x=Object.defineProperty,S=(e,t)=>{for(var n in t)x(e,n,{get:t[n],enumerable:!0})},C={};S(C,{blue:()=>te,gray:()=>ne,green:()=>ie,red:()=>re,yellow:()=>ee});function ee(e){return`\x1B[33m${e}\x1B[0m`}function te(e){return`\x1B[34m${e}\x1B[0m`}function ne(e){return`\x1B[90m${e}\x1B[0m`}function re(e){return`\x1B[31m${e}\x1B[0m`}function ie(e){return`\x1B[32m${e}\x1B[0m`}var ae=b(),oe=class{constructor(e){this.name=e,this.prefix=`[${this.name}]`;let t=de(`DEBUG`),n=de(`LOG_LEVEL`);t===`1`||t===`true`||t!==void 0&&this.name.startsWith(t)?(this.debug=fe(n,`debug`)?w:this.debug,this.info=fe(n,`info`)?w:this.info,this.success=fe(n,`success`)?w:this.success,this.warning=fe(n,`warning`)?w:this.warning,this.error=fe(n,`error`)?w:this.error):(this.info=w,this.success=w,this.warning=w,this.error=w,this.only=w)}prefix;extend(e){return new oe(`${this.name}:${e}`)}debug(e,...t){this.logEntry({level:`debug`,message:ne(e),positionals:t,prefix:this.prefix,colors:{prefix:`gray`}})}info(e,...t){this.logEntry({level:`info`,message:e,positionals:t,prefix:this.prefix,colors:{prefix:`blue`}});let n=new se;return(e,...t)=>{n.measure(),this.logEntry({level:`info`,message:`${e} ${ne(`${n.deltaTime}ms`)}`,positionals:t,prefix:this.prefix,colors:{prefix:`blue`}})}}success(e,...t){this.logEntry({level:`info`,message:e,positionals:t,prefix:`\u2714 ${this.prefix}`,colors:{timestamp:`green`,prefix:`green`}})}warning(e,...t){this.logEntry({level:`warning`,message:e,positionals:t,prefix:`\u26A0 ${this.prefix}`,colors:{timestamp:`yellow`,prefix:`yellow`}})}error(e,...t){this.logEntry({level:`error`,message:e,positionals:t,prefix:`\u2716 ${this.prefix}`,colors:{timestamp:`red`,prefix:`red`}})}only(e){e()}createEntry(e,t){return{timestamp:new Date,level:e,message:t}}logEntry(e){let{level:t,message:n,prefix:r,colors:i,positionals:a=[]}=e,o=this.createEntry(t,n),s=i?.timestamp||`gray`,c=i?.prefix||`gray`,l={timestamp:C[s],prefix:C[c]};this.getWriter(t)([l.timestamp(this.formatTimestamp(o.timestamp))].concat(r==null?[]:l.prefix(r),pe(n)).join(` `),...a.map(pe))}formatTimestamp(e){return`${e.toLocaleTimeString(`en-GB`)}:${e.getMilliseconds()}`}getWriter(e){switch(e){case`debug`:case`success`:case`info`:return ce;case`warning`:return le;case`error`:return ue}}},se=class{startTime;endTime;deltaTime;constructor(){this.startTime=performance.now()}measure(){this.endTime=performance.now();let e=this.endTime-this.startTime;this.deltaTime=e.toFixed(2)}},w=()=>void 0;function ce(e,...t){if(ae){process.stdout.write(r(e,...t)+`
2
2
  `);return}console.log(e,...t)}function le(e,...t){if(ae){process.stderr.write(r(e,...t)+`
3
3
  `);return}console.warn(e,...t)}function ue(e,...t){if(ae){process.stderr.write(r(e,...t)+`
4
4
  `);return}console.error(e,...t)}function de(e){return ae?{}[e]:globalThis[e]?.toString()}function fe(e,t){return e!==void 0&&e!==t}function pe(e){return e===void 0?`undefined`:e===null?`null`:typeof e==`string`?e:typeof e==`object`?JSON.stringify(e):e.toString()}function me(e){return globalThis[e]||void 0}function he(e,t){globalThis[e]=t}function ge(e){delete globalThis[e]}var T=function(e){return e.INACTIVE=`INACTIVE`,e.APPLYING=`APPLYING`,e.APPLIED=`APPLIED`,e.DISPOSING=`DISPOSING`,e.DISPOSED=`DISPOSED`,e}({}),_e=class{constructor(t){this.symbol=t,this.readyState=T.INACTIVE,this.emitter=new e,this.subscriptions=[],this.logger=new oe(t.description),this.emitter.setMaxListeners(0),this.logger.info(`constructing the interceptor...`)}checkEnvironment(){return!0}apply(){let e=this.logger.extend(`apply`);if(e.info(`applying the interceptor...`),this.readyState===T.APPLIED){e.info(`intercepted already applied!`);return}if(!this.checkEnvironment()){e.info(`the interceptor cannot be applied in this environment!`);return}this.readyState=T.APPLYING;let t=this.getInstance();if(t){e.info(`found a running instance, reusing...`),this.on=(n,r)=>(e.info(`proxying the "%s" listener`,n),t.emitter.addListener(n,r),this.subscriptions.push(()=>{t.emitter.removeListener(n,r),e.info(`removed proxied "%s" listener!`,n)}),this),this.readyState=T.APPLIED;return}e.info(`no running instance found, setting up a new instance...`),this.setup(),this.setInstance(),this.readyState=T.APPLIED}setup(){}on(e,t){let n=this.logger.extend(`on`);return this.readyState===T.DISPOSING||this.readyState===T.DISPOSED?(n.info(`cannot listen to events, already disposed!`),this):(n.info(`adding "%s" event listener:`,e,t),this.emitter.on(e,t),this)}once(e,t){return this.emitter.once(e,t),this}off(e,t){return this.emitter.off(e,t),this}removeAllListeners(e){return this.emitter.removeAllListeners(e),this}dispose(){let e=this.logger.extend(`dispose`);if(this.readyState===T.DISPOSED){e.info(`cannot dispose, already disposed!`);return}if(e.info(`disposing the interceptor...`),this.readyState=T.DISPOSING,!this.getInstance()){e.info(`no interceptors running, skipping dispose...`);return}if(this.clearInstance(),e.info(`global symbol deleted:`,me(this.symbol)),this.subscriptions.length>0){e.info(`disposing of %d subscriptions...`,this.subscriptions.length);for(let e of this.subscriptions)e();this.subscriptions=[],e.info(`disposed of all subscriptions!`,this.subscriptions.length)}this.emitter.removeAllListeners(),e.info(`destroyed the listener!`),this.readyState=T.DISPOSED}getInstance(){let e=me(this.symbol);return this.logger.info(`retrieved global instance:`,e?.constructor?.name),e}setInstance(){he(this.symbol,this),this.logger.info(`set global instance!`,this.symbol.description)}clearInstance(){ge(this.symbol),this.logger.info(`cleared global instance!`,this.symbol.description)}};function ve(){return Math.random().toString(16).slice(2)}function ye(){let e=(t,n)=>{e.state=`pending`,e.resolve=n=>e.state===`pending`?(e.result=n,t(n instanceof Promise?n:Promise.resolve(n).then(t=>(e.state=`fulfilled`,t)))):void 0,e.reject=t=>{if(e.state===`pending`)return queueMicrotask(()=>{e.state=`rejected`}),n(e.rejectionReason=t)}};return e}var be=class extends Promise{#e;resolve;reject;constructor(e=null){let t=ye();super((n,r)=>{t(n,r),e?.(t.resolve,t.reject)}),this.#e=t,this.resolve=this.#e.resolve,this.reject=this.#e.reject}get state(){return this.#e.state}get rejectionReason(){return this.#e.rejectionReason}then(e,t){return this.#t(super.then(e,t))}catch(e){return this.#t(super.catch(e))}finally(e){return this.#t(super.finally(e))}#t(e){return Object.defineProperties(e,{resolve:{configurable:!0,value:this.resolve},reject:{configurable:!0,value:this.reject}})}},xe=class e extends Error{constructor(t){super(t),this.name=`InterceptorError`,Object.setPrototypeOf(this,e.prototype)}};(class e{static{this.PENDING=0}static{this.PASSTHROUGH=1}static{this.RESPONSE=2}static{this.ERROR=3}constructor(t,n){this.request=t,this.source=n,this.readyState=e.PENDING,this.handled=new be}get#e(){return this.handled}async passthrough(){l.as(xe,this.readyState===e.PENDING,`Failed to passthrough the "%s %s" request: the request has already been handled`,this.request.method,this.request.url),this.readyState=e.PASSTHROUGH,await this.source.passthrough(),this.#e.resolve()}respondWith(t){l.as(xe,this.readyState===e.PENDING,`Failed to respond to the "%s %s" request with "%d %s": the request has already been handled (%d)`,this.request.method,this.request.url,t.status,t.statusText||`OK`,this.readyState),this.readyState=e.RESPONSE,this.#e.resolve(),this.source.respondWith(t)}errorWith(t){l.as(xe,this.readyState===e.PENDING,`Failed to error the "%s %s" request with "%s": the request has already been handled (%d)`,this.request.method,this.request.url,t?.toString(),this.readyState),this.readyState=e.ERROR,this.source.errorWith(t),this.#e.resolve()}});function Se(e){try{return new URL(e),!0}catch{return!1}}function Ce(e,t){let n=Object.getOwnPropertySymbols(t).find(t=>t.description===e);if(n)return Reflect.get(t,n)}var we=Symbol(`kStatus`),Te=Symbol(`kUrl`),Ee=class e extends Response{static{this.STATUS_CODES_WITHOUT_BODY=[101,103,204,205,304]}static{this.STATUS_CODES_WITH_REDIRECT=[301,302,303,307,308]}static isConfigurableStatusCode(e){return e>=200&&e<=599}static isRedirectResponse(t){return e.STATUS_CODES_WITH_REDIRECT.includes(t)}static isResponseWithBody(t){return!e.STATUS_CODES_WITHOUT_BODY.includes(t)}static setStatus(e,t){let n=Ce(`state`,t);n?n.status=e:Object.defineProperty(t,`status`,{value:e,enumerable:!0,configurable:!0,writable:!1}),Object.defineProperty(t,we,{value:e,enumerable:!1})}static setUrl(e,t){if(!e||e===`about:`||!Se(e))return;let n=Ce(`state`,t);n?n.urlList.push(new URL(e)):Object.defineProperty(t,`url`,{value:e,enumerable:!0,configurable:!0,writable:!1}),Object.defineProperty(t,Te,{value:e,enumerable:!1})}static parseRawHeaders(e){let t=new Headers;for(let n=0;n<e.length;n+=2)t.append(e[n],e[n+1]);return t}static clone(e){try{return e.clone()}catch(e){return Response.json(e instanceof Error?{name:e.name,message:e.message,stack:e.stack}:{},{status:500,statusText:`Unclonable Response`})}}constructor(t,n={}){let r=n.status??200,i=e.isConfigurableStatusCode(r)?r:200,a=e.isResponseWithBody(r)?t:null;super(a,{status:i,statusText:n.statusText,headers:n.headers}),r!==i&&e.setStatus(r,this),e.setUrl(n.url,this)}clone(){let t=super.clone(),n=Reflect.get(this,we);n&&e.setStatus(n,t);let r=Reflect.get(this,Te);return r&&e.setUrl(r,t),t}};new TextEncoder;function De(e){if(typeof e==`string`)return De(new URL(e,typeof location<`u`?location.href:void 0));if(e.protocol===`http:`?e.protocol=`ws:`:e.protocol===`https:`&&(e.protocol=`wss:`),e.protocol!==`ws:`&&e.protocol!==`wss:`)throw SyntaxError(`Failed to construct 'WebSocket': The URL's scheme must be either 'http', 'https', 'ws', or 'wss'. '${e.protocol}' is not allowed.`);if(e.hash!==``)throw SyntaxError(`Failed to construct 'WebSocket': The URL contains a fragment identifier ('${e.hash}'). Fragment identifiers are not allowed in WebSocket URLs.`);return e.href}var Oe=class e extends _e{constructor(t){e.symbol=Symbol.for(t.name),super(e.symbol),this.interceptors=t.interceptors}setup(){let e=this.logger.extend(`setup`);e.info(`applying all %d interceptors...`,this.interceptors.length);for(let t of this.interceptors)e.info(`applying "%s" interceptor...`,t.constructor.name),t.apply(),e.info(`adding interceptor dispose subscription`),this.subscriptions.push(()=>t.dispose())}on(e,t){for(let n of this.interceptors)n.on(e,t);return this}once(e,t){for(let n of this.interceptors)n.once(e,t);return this}off(e,t){for(let n of this.interceptors)n.off(e,t);return this}removeAllListeners(e){for(let t of this.interceptors)t.removeAllListeners(e);return this}};function ke(e,t=!0){return[t&&e.origin,e.pathname].filter(Boolean).join(``)}function Ae(e){let t=e instanceof URL?e:new URL(e);return typeof location<`u`&&t.origin===location.origin?t.pathname:t.origin+t.pathname}var je=/[^a-z0-9\-#$%&'*+.^_`|~]/i;function Me(e){if(je.test(e)||e.trim()===``)throw TypeError(`Invalid character in header field name`);return e.trim().toLowerCase()}var Ne=[`
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-DU-Cb_sT.js","assets/rolldown-runtime-BFRubm34.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{St as t}from"./vendor-styling-CI0PQ3ab.js";var n=class extends Error{constructor(e,t,n,r){super(r||`HTTP ${e}: ${t}`),this.status=e,this.statusText=t,this.response=n,this.name=`HttpError`}},r=class{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,``),this.apiKey=e.apiKey,this.timeout=e.timeout||6e4}buildUrl(e,t){let n=e.startsWith(`/`)?e.slice(1):e,r=new URL(n,this.baseUrl+`/`);return t&&Object.entries(t).forEach(([e,t])=>{t!=null&&(Array.isArray(t)?t.forEach(t=>r.searchParams.append(e,String(t))):r.searchParams.append(e,String(t)))}),r}async request(e){if(e.method===`GET`&&e.data!==void 0&&e.data!==null)return this.requestWithBodyOnGet(e);let t=this.buildUrl(e.url,e.params),r={"Content-Type":`application/json`,...e.headers};this.apiKey&&(r[`X-Session-API-Key`]=this.apiKey);let i={method:e.method,headers:r,signal:AbortSignal.timeout(e.timeout||this.timeout)};e.credentials&&(i.credentials=e.credentials),e.data&&e.method!==`GET`&&(e.data instanceof FormData?(delete r[`Content-Type`],i.body=e.data):i.body=JSON.stringify(e.data));try{let r=await fetch(t.toString(),i);if(!(e.acceptableStatusCodes?.has(r.status)||!e.acceptableStatusCodes&&r.ok)){let e;try{e=r.headers.get(`content-type`)?.includes(`application/json`)?await r.json():await r.text()}catch{e=null}throw new n(r.status,r.statusText,e,`HTTP request failed (${r.status} ${r.statusText}): ${JSON.stringify(e)}`)}let a=await this.parseResponse(r,e.responseType||`auto`),o={};return r.headers.forEach((e,t)=>{o[t]=e}),{data:a,status:r.status,statusText:r.statusText,headers:o}}catch(t){throw t instanceof n?t:t instanceof Error?t.name===`AbortError`?Error(`Request timeout after ${e.timeout||this.timeout}ms`,{cause:t}):Error(`Request failed: ${t.message}`,{cause:t}):Error(`Unknown request error`,{cause:t})}}async requestWithBodyOnGet(r){let i=this.buildUrl(r.url,r.params),a=typeof r.data==`string`?r.data:JSON.stringify(r.data),o={"Content-Type":`application/json`,...r.headers,"Content-Length":String(Buffer.byteLength(a))};this.apiKey&&(o[`X-Session-API-Key`]=this.apiKey);let s=(i.protocol,await t(()=>import(`./__vite-browser-external-DU-Cb_sT.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1]))),c=r.timeout||this.timeout;return new Promise((e,t)=>{let l=s.request(i,{method:r.method,headers:o},i=>{let a=[];i.on(`data`,e=>a.push(e)),i.on(`end`,()=>{try{let o=i.statusCode??0,s=i.statusMessage??``,c={};for(let[e,t]of Object.entries(i.headers))t!==void 0&&(c[e]=Array.isArray(t)?t.join(`, `):t);let l=Buffer.concat(a),u=c[`content-type`];if(!(r.acceptableStatusCodes?.has(o)||!r.acceptableStatusCodes&&o>=200&&o<300)){let e=l.toString(`utf-8`),r;try{r=u?.includes(`application/json`)?JSON.parse(e):e}catch{r=e||null}t(new n(o,s,r,`HTTP request failed (${o} ${s}): ${JSON.stringify(r)}`));return}e({data:this.parseNodeResponse(l,u,r.responseType||`auto`),status:o,statusText:s,headers:c})}catch(e){t(e)}})});l.on(`error`,e=>{t(Error(`Request failed: ${e.message}`,{cause:e}))}),l.setTimeout(c,()=>{l.destroy(Error(`Request timeout after ${c}ms`))}),l.end(a)})}parseNodeResponse(e,t,n){if(n===`blob`)return new Blob([new Uint8Array(e)]);if(n===`arrayBuffer`)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let r=e.toString(`utf-8`);return n===`text`?r:n===`json`||t?.includes(`application/json`)?r?JSON.parse(r):void 0:r}async parseResponse(e,t){return t===`json`?await e.json():t===`text`?await e.text():t===`blob`?await e.blob():t===`arrayBuffer`?await e.arrayBuffer():e.headers.get(`content-type`)?.includes(`application/json`)?await e.json():await e.text()}async get(e,t){return this.request({method:`GET`,url:e,...t})}async post(e,t,n){return this.request({method:`POST`,url:e,data:t,...n})}async put(e,t,n){return this.request({method:`PUT`,url:e,data:t,...n})}async patch(e,t,n){return this.request({method:`PATCH`,url:e,data:t,...n})}async delete(e,t){return this.request({method:`DELETE`,url:e,...t})}close(){}},i=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout??6e4})}async listAgentProfiles(){return(await this.client.get(`/api/agent-profiles`)).data}async getAgentProfile(e,t={}){let n={};return t.exposeSecrets&&(n[`X-Expose-Secrets`]=t.exposeSecrets),(await this.client.get(`/api/agent-profiles/${encodeURIComponent(e)}`,{headers:n})).data}async saveAgentProfile(e,t){return(await this.client.post(`/api/agent-profiles/${encodeURIComponent(e)}`,t)).data}async deleteAgentProfile(e){return(await this.client.delete(`/api/agent-profiles/${encodeURIComponent(e)}`)).data}async renameAgentProfile(e,t){return(await this.client.post(`/api/agent-profiles/${encodeURIComponent(e)}/rename`,{new_name:t})).data}async activateAgentProfile(e){return(await this.client.post(`/api/agent-profiles/${encodeURIComponent(e)}/activate`,{})).data}async materializeAgentProfile(e){return(await this.client.post(`/api/agent-profiles/${encodeURIComponent(e)}/materialize`,{})).data}close(){this.client.close()}},a=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getRoot(){return(await this.client.get(`/`)).data}async getAlive(){return(await this.client.get(`/alive`)).data}async getHealth(){return(await this.client.get(`/health`)).data}async getReady(){return(await this.client.get(`/ready`,{acceptableStatusCodes:new Set([200,503])})).data}async getServerInfo(){return(await this.client.get(`/server_info`)).data}close(){this.client.close()}},o=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async searchEvents(e={}){return(await this.client.get(`/api/bash/bash_events/search`,{params:e})).data}async getEvent(e){return(await this.client.get(`/api/bash/bash_events/${e}`)).data}async getEvents(e){return Promise.all(e.map(async e=>{try{return await this.getEvent(e)}catch(e){if(e instanceof n&&e.status===404)return null;throw e}}))}async batchGetEvents(e){return(await this.client.get(`/api/bash/bash_events/`,{data:e})).data}async startCommand(e,t,n){let r=this.normalizeRequest(e,t,n);return(await this.client.post(`/api/bash/start_bash_command`,r)).data}async executeCommand(e,t,n){let r=this.normalizeRequest(e,t,n);return(await this.client.post(`/api/bash/execute_bash_command`,r,{timeout:((r.timeout||30)+10)*1e3})).data}async clearEvents(){return(await this.client.delete(`/api/bash/bash_events`)).data}close(){this.client.close()}normalizeRequest(e,t,n){return typeof e==`string`?{command:e,...t?{cwd:t}:{},...n===void 0?{}:{timeout:Math.floor(n)}}:{...e,...e.timeout===void 0?{}:{timeout:Math.floor(e.timeout)}}}},s=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async createConversation(e){return(await this.client.post(`/api/conversations`,e)).data}async searchConversations(e={}){return(await this.client.get(`/api/conversations/search`,{params:e})).data}async countConversations(e={}){return(await this.client.get(`/api/conversations/count`,{params:e})).data}async getConversations(e){return(await this.client.get(`/api/conversations`,{params:{ids:e}})).data}async getConversation(e){return(await this.client.get(`/api/conversations/${e}`)).data}async searchEvents(e,t={}){return(await this.client.get(`/api/conversations/${e}/events/search`,{params:t})).data}async getEvent(e,t){return(await this.client.get(`/api/conversations/${e}/events/${t}`)).data}async getEvents(e,t){return Promise.all(t.map(async t=>{try{return await this.getEvent(e,t)}catch(e){if(e instanceof n&&e.status===404)return null;throw e}}))}async sendEvent(e,t,n={}){await this.client.post(`/api/conversations/${e}/events`,{...t,...n.run===void 0?{}:{run:n.run}})}async pauseConversation(e){return(await this.client.post(`/api/conversations/${e}/pause`,{})).data}async interruptConversation(e){return(await this.client.post(`/api/conversations/${e}/interrupt`,{})).data}async runConversation(e){return(await this.client.post(`/api/conversations/${e}/run`,{})).data}async startGoal(e,t){return(await this.client.post(`/api/conversations/${e}/goal`,t)).data}async stopGoal(e){return(await this.client.post(`/api/conversations/${e}/goal/stop`,{})).data}async resumeGoal(e){return(await this.client.post(`/api/conversations/${e}/goal/resume`,{})).data}async askAgent(e,t){return(await this.client.post(`/api/conversations/${e}/ask_agent`,{question:t})).data}async getEventCount(e,t={}){return(await this.client.get(`/api/conversations/${e}/events/count`,{params:t})).data}async respondToConfirmation(e,t){return(await this.client.post(`/api/conversations/${e}/events/respond_to_confirmation`,t)).data}async getAgentFinalResponse(e){return(await this.client.get(`/api/conversations/${e}/agent_final_response`)).data}async setConfirmationPolicy(e,t){let n=`policy`in t?t:{policy:t};return(await this.client.post(`/api/conversations/${e}/confirmation_policy`,n)).data}async condenseConversation(e){return(await this.client.post(`/api/conversations/${e}/condense`,{})).data}async setSecurityAnalyzer(e,t){let n=c(t)?t:{security_analyzer:t};return(await this.client.post(`/api/conversations/${e}/security_analyzer`,n)).data}async updateSecrets(e,t){return(await this.client.post(`/api/conversations/${e}/secrets`,t)).data}async forkConversation(e,t={},n={}){return(await this.client.post(`/api/conversations/${e}/fork`,t,{params:n.includeSkills===void 0?void 0:{include_skills:n.includeSkills}})).data}async navigateConversation(e,t={},n={}){return(await this.client.post(`/api/conversations/${e}/navigate`,t,{params:n.includeSkills===void 0?void 0:{include_skills:n.includeSkills}})).data}async switchProfile(e,t){await this.client.post(`/api/conversations/${e}/switch_profile`,{profile_name:t})}async switchLLM(e,t){await this.client.post(`/api/conversations/${e}/switch_llm`,{llm:t})}async switchAcpModel(e,t){await this.client.post(`/api/conversations/${e}/switch_acp_model`,{model:t})}async deleteConversation(e){await this.client.delete(`/api/conversations/${e}`)}async updateConversation(e,t){return(await this.client.patch(`/api/conversations/${e}`,t)).data}close(){this.client.close()}};function c(e){return typeof e==`object`&&!!e&&`security_analyzer`in e}var l=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async searchSubdirectories(e,t={}){return(await this.client.get(`/api/file/search_subdirs`,{params:{path:e,page_id:t.pageId,limit:t.limit,include_hidden:t.includeHidden||void 0}})).data}async getHome(e={}){return(await this.client.get(`/api/file/home`,{params:{include_hidden:e.includeHidden||void 0}})).data}async downloadFile(e){return(await this.client.get(`/api/file/download`,{params:{path:e},responseType:`arrayBuffer`})).data}async downloadTextFile(e){return new TextDecoder().decode(await this.downloadFile(e))}async uploadFile(e,t,n){let r=new FormData,i=typeof File>`u`?void 0:File;return i&&e instanceof i?r.append(`file`,e,n||e.name):e instanceof Blob?r.append(`file`,e,n||`blob-file`):r.append(`file`,new Blob([e],{type:`text/plain`}),n||`text-file.txt`),(await this.client.post(`/api/file/upload`,r,{params:{path:t}})).data}async uploadTextFile(e,t,n){return this.uploadFile(e,t,n)}async downloadTrajectory(e){return(await this.client.get(`/api/file/download-trajectory/${encodeURIComponent(e)}`,{responseType:`blob`})).data}close(){this.client.close()}},u=`AGENT_SERVER_VERSION_TOO_OLD`,d={workspaces:{feature:`workspaces`,displayName:`Workspaces`,minVersion:`1.23.0`},hooks:{feature:`hooks`,displayName:`Hooks API`,minVersion:`1.23.0`},mcpTest:{feature:`mcp-test`,displayName:`MCP test API`,minVersion:`1.23.0`},mcpOAuth:{feature:`mcp-oauth`,displayName:`MCP OAuth API`,minVersion:`1.31.0`}},f=class e extends Error{constructor({requirement:t,actualVersion:n}){super(`${t.displayName} requires agent-server ${t.minVersion} or newer; this backend is running ${n}. Please upgrade your agent-server backend.`),this.code=u,this.name=`AgentServerVersionError`,this.feature=t.feature,this.displayName=t.displayName,this.requiredVersion=t.minVersion,this.actualVersion=n,Object.setPrototypeOf(this,e.prototype)}},p=new WeakMap;function m(e){return e instanceof f||typeof e==`object`&&!!e&&`code`in e&&e.code===`AGENT_SERVER_VERSION_TOO_OLD`}async function h(e){let t=p.get(e);if(t)return t;let n=e.get(`/server_info`).then(e=>e.data);return p.set(e,n),n}async function g(e,t){let n=await h(e),r=typeof n.version==`string`&&n.version.trim()?n.version.trim():`unknown`,i=_(r,t.minVersion);if(i===null||i<0)throw new f({requirement:t,actualVersion:r});return n}function _(e,t){let n=v(e),r=v(t);if(!n||!r)return null;for(let e of[`major`,`minor`,`patch`]){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return n.prerelease&&!r.prerelease?-1:!n.prerelease&&r.prerelease?1:n.prerelease&&r.prerelease?n.prerelease.localeCompare(r.prerelease):0}function v(e){let[t]=e.trim().replace(/^v/,``).split(`+`),[n,r]=t.split(`-`,2),i=n.split(`.`);if(i.length!==3)return null;let[a,o,s]=i.map(e=>Number(e));return[a,o,s].every(e=>Number.isInteger(e)&&e>=0)?{major:a,minor:o,patch:s,prerelease:r}:null}var y=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getProviders(){return(await this.client.get(`/api/llm/providers`)).data.providers}async getModels(e){return(await this.client.get(`/api/llm/models`,{params:e?{provider:e}:void 0})).data.models}async getVerifiedModels(){return(await this.client.get(`/api/llm/models/verified`)).data.models}async getOpenAISubscriptionModels(){return(await this.client.get(`/api/llm/subscription/openai/models`)).data.models}async getOpenAISubscriptionStatus(){return(await this.client.get(`/api/llm/subscription/openai/status`)).data}async startOpenAISubscriptionDeviceLogin(){return(await this.client.post(`/api/llm/subscription/openai/device/start`)).data}async pollOpenAISubscriptionDeviceLogin(e){let t={device_code:e};return(await this.client.post(`/api/llm/subscription/openai/device/poll`,t)).data}async logoutOpenAISubscription(){return(await this.client.post(`/api/llm/subscription/openai/logout`)).data}close(){this.client.close()}},b=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async testServer(e){return await g(this.client,d.mcpTest),(await this.client.post(`/api/mcp/test`,e,{timeout:(e.timeout??15)*1e3+5e3})).data}async startOAuth(e){return await g(this.client,d.mcpOAuth),(await this.client.post(`/api/mcp/oauth/start`,e,{timeout:(e.timeout??15)*1e3+5e3})).data}async getOAuthStatus(e){return await g(this.client,d.mcpOAuth),(await this.client.get(`/api/mcp/oauth/status/${encodeURIComponent(e)}`)).data}async submitOAuthCallback(e,t){return await g(this.client,d.mcpOAuth),(await this.client.post(`/api/mcp/oauth/callback/${encodeURIComponent(e)}`,t)).data}close(){this.client.close()}},x=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async listProfiles(){return(await this.client.get(`/api/profiles`)).data}async getProfile(e,t={}){let n={};return t.exposeSecrets&&(n[`X-Expose-Secrets`]=t.exposeSecrets),(await this.client.get(`/api/profiles/${encodeURIComponent(e)}`,{headers:n})).data}async saveProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}`,t)).data}async deleteProfile(e){return(await this.client.delete(`/api/profiles/${encodeURIComponent(e)}`)).data}async renameProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/rename`,{new_name:t})).data}async activateProfile(e){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/activate`,{})).data}close(){this.client.close()}},S=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getAgentSchema(){return(await this.client.get(`/api/settings/agent-schema`)).data}async getSettings(e={}){return(await this.client.get(`/api/settings`,{headers:e.exposeSecrets?{"X-Expose-Secrets":e.exposeSecrets}:void 0})).data}async updateSettings(e){return(await this.client.patch(`/api/settings`,e)).data}async listSecrets(){return(await this.client.get(`/api/settings/secrets`)).data}async upsertSecret(e){return(await this.client.put(`/api/settings/secrets`,e)).data}async getSecret(e){return(await this.client.get(`/api/settings/secrets/${encodeURIComponent(e)}`,{responseType:`text`})).data}async deleteSecret(e){return(await this.client.delete(`/api/settings/secrets/${encodeURIComponent(e)}`)).data}async getConversationSchema(){return(await this.client.get(`/api/settings/conversation-schema`)).data}async listProfiles(){return(await this.client.get(`/api/profiles`)).data}async getProfile(e,t={}){return(await this.client.get(`/api/profiles/${encodeURIComponent(e)}`,{headers:t.exposeSecrets?{"X-Expose-Secrets":t.exposeSecrets}:void 0})).data}async saveProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}`,t)).data}async deleteProfile(e){return(await this.client.delete(`/api/profiles/${encodeURIComponent(e)}`)).data}async renameProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/rename`,{new_name:t})).data}close(){this.client.close()}},C=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getSkills(e={}){return(await this.client.post(`/api/skills`,e)).data}async syncSkills(){return(await this.client.post(`/api/skills/sync`,{})).data}async installSkill(e){return(await this.client.post(`/api/skills/install`,e)).data}async listInstalledSkills(){return(await this.client.get(`/api/skills/installed`)).data}async getInstalledSkill(e){return(await this.client.get(`/api/skills/installed/${encodeURIComponent(e)}`)).data}async toggleSkill(e,t){return(await this.client.patch(`/api/skills/installed/${encodeURIComponent(e)}`,{enabled:t})).data}async uninstallSkill(e){return(await this.client.delete(`/api/skills/installed/${encodeURIComponent(e)}`)).data}async refreshSkill(e){return(await this.client.post(`/api/skills/installed/${encodeURIComponent(e)}/refresh`)).data}async getMarketplace(){return(await this.client.get(`/api/skills/marketplace`)).data}close(){this.client.close()}},w=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getPlugins(e={}){return(await this.client.post(`/api/plugins`,e)).data}async getPluginsMarketplace(){return(await this.client.get(`/api/plugins/marketplace`)).data}async installPlugin(e){return(await this.client.post(`/api/plugins/install`,e)).data}async listInstalledPlugins(){return(await this.client.get(`/api/plugins/installed`)).data}async getInstalledPlugin(e){return(await this.client.get(`/api/plugins/installed/${encodeURIComponent(e)}`)).data}async setPluginEnabled(e,t){return(await this.client.patch(`/api/plugins/installed/${encodeURIComponent(e)}`,{enabled:t})).data}async uninstallPlugin(e){return(await this.client.delete(`/api/plugins/installed/${encodeURIComponent(e)}`)).data}async refreshPlugin(e){return(await this.client.post(`/api/plugins/installed/${encodeURIComponent(e)}/refresh`)).data}close(){this.client.close()}},T=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getUrl(e={}){return(await this.client.get(`/api/vscode/url`,{params:{...e.baseUrl?{base_url:e.baseUrl}:{},...e.workspaceDir?{workspace_dir:e.workspaceDir}:{}}})).data.url}async getStatus(){return(await this.client.get(`/api/vscode/status`)).data}close(){this.client.close()}},E=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getSharedConversations(e){return(await this.client.get(`/api/shared-conversations`,{params:{ids:e}})).data}async getSharedConversation(e){return(await this.getSharedConversations([e]))[0]??null}async searchSharedEvents(e){return(await this.client.get(`/api/shared-events/search`,{params:{conversation_id:e.conversationId,limit:e.limit,page_id:e.pageId}})).data}close(){this.client.close()}},D=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async listWorkspaces(){return await this.ensureWorkspacesSupported(),(await this.client.get(`/api/workspaces`)).data}async addWorkspaces(e){return await this.ensureWorkspacesSupported(),(await this.client.post(`/api/workspaces`,{workspaces:e})).data}async deleteWorkspace(e){return await this.ensureWorkspacesSupported(),(await this.client.delete(`/api/workspaces`,{params:{path:e}})).data}async addWorkspaceParents(e){return await this.ensureWorkspacesSupported(),(await this.client.post(`/api/workspaces/parents`,{parents:e})).data}async deleteWorkspaceParent(e){return await this.ensureWorkspacesSupported(),(await this.client.delete(`/api/workspaces/parents`,{params:{path:e}})).data}close(){this.client.close()}async ensureWorkspacesSupported(){await g(this.client,d.workspaces)}},O=class{constructor(e){this.host=e.host.replace(/\/+$/,``),this.apiKey=e.apiKey,this.timeout=e.timeout||6e4}get(e,t={}){return this.request({...t,method:`GET`,path:e})}post(e,t,n={}){return this.request({...n,method:`POST`,path:e,body:t})}patch(e,t,n={}){return this.request({...n,method:`PATCH`,path:e,body:t})}put(e,t,n={}){return this.request({...n,method:`PUT`,path:e,body:t})}delete(e,t={}){return this.request({...t,method:`DELETE`,path:e})}close(){}},k=class e extends Error{constructor(t,n){super(t),this.code=n,this.name=`DeviceFlowError`,Object.setPrototypeOf(this,e.prototype)}},A=6e5,j=3e4;function M(e){try{let t=e.trim().toLowerCase(),n=/^https?:\/\//i.test(t)?t:`https://${t}`,r=new URL(n).hostname;return r.endsWith(`.all-hands.dev`)||r===`all-hands.dev`||r.endsWith(`.openhands.dev`)||r===`openhands.dev`}catch{return!1}}function N(e){return e.replace(/\/+$/,``)}async function P(e,t,n,r,i,a){let o=typeof n==`string`||n instanceof Blob||n instanceof FormData||n instanceof URLSearchParams?n:JSON.stringify(n),s=new Headers(a);return s.set(`Content-Type`,r),fetch(`${N(e)}${t}`,{method:`POST`,headers:s,body:o,signal:i})}async function F(e,t={}){try{let n=await P(e,`/oauth/device/authorize`,{},`application/json`,void 0,t.headers);if(!n.ok)throw new k(`Failed to start device flow: Server returned ${n.status}`);let r=await n.json();if(!r.device_code||!r.user_code||!r.verification_uri)throw new k(`Invalid response from device authorization endpoint: missing required fields`);return{device_code:r.device_code,user_code:r.user_code,verification_uri:r.verification_uri,verification_uri_complete:r.verification_uri_complete??`${r.verification_uri}?user_code=${encodeURIComponent(r.user_code)}`,expires_in:r.expires_in??600,interval:r.interval??5}}catch(e){throw e instanceof k?e:new k(`Failed to start device flow: ${e instanceof Error?e.message:String(e)}`)}}async function I(e,t,n){let r=n.timeout??A,i=Math.max(1,n.interval)*1e3,a=Date.now();for(;Date.now()-a<r;){if(n.signal?.aborted)throw new k(`Authorization cancelled`,`cancelled`);try{let r=await P(e,`/oauth/device/token`,new URLSearchParams({grant_type:`urn:ietf:params:oauth:grant-type:device_code`,device_code:t}),`application/x-www-form-urlencoded`,n.signal,n.headers);if(r.ok){let e=await r.json();if(!e.access_token)throw new k(`Invalid token response: missing access_token`);return{access_token:e.access_token,token_type:e.token_type??`Bearer`,expires_in:e.expires_in}}let a;try{a=await r.json()}catch{throw new k(`Unexpected response from server: ${r.status}`)}switch(a.error){case`authorization_pending`:break;case`slow_down`:i=typeof a.interval==`number`&&Number.isFinite(a.interval)&&a.interval>0?Math.max(1,Math.min(a.interval,30))*1e3:Math.min(i+5e3,j);break;case`expired_token`:throw new k(`Device code has expired. Please try again.`,`expired_token`);case`access_denied`:throw new k(`Authorization request was denied.`,`access_denied`);default:throw new k(`Authorization error: ${a.error}${a.error_description?` - ${a.error_description}`:``}`,a.error)}}catch(e){if(e instanceof k)throw e;if(e instanceof DOMException&&e.name===`AbortError`)throw new k(`Authorization cancelled`,`cancelled`);console.warn(`Network error during polling, retrying:`,e)}try{await L(i,n.signal)}catch(e){throw e instanceof DOMException&&e.name===`AbortError`?new k(`Authorization cancelled`,`cancelled`):e}}throw new k(`Timeout waiting for authorization. Please try again.`,`timeout`)}function L(e,t){return new Promise((n,r)=>{if(t?.aborted){r(new DOMException(`Aborted`,`AbortError`));return}let i=setTimeout(n,e);t?.addEventListener(`abort`,()=>{clearTimeout(i),r(new DOMException(`Aborted`,`AbortError`))},{once:!0})})}var R=`/api/v1/settings/profiles`,z=100,B=class extends O{constructor(e){super(e),this.kind=`cloud`,this.orgId=e.orgId??null,this.proxy=e.proxy?{...e.proxy,host:e.proxy.host.replace(/\/+$/,``),path:e.proxy.path??`/api/cloud-proxy`}:void 0}async request(e){return e.hostOverride?this.requestThroughProxy(e):this.requestDirect(e)}startDeviceFlow(e={}){return F(this.host,e)}pollForToken(e,t){return I(this.host,e,t)}async getOrganizations(){let e=await this.get(`/api/organizations`);return{items:e?.items??[],currentOrgId:e?.current_org_id??null}}getCurrentApiKey(){return this.get(`/api/keys/current`)}async getOrganizationMe(e){let t=await this.get(`/api/organizations/${encodeURIComponent(e)}/me`);return{orgId:t?.org_id??e,userId:t?.user_id??``,role:t?.role??null,permissions:Array.isArray(t?.permissions)?t.permissions:null}}getSettings(){return this.get(`/api/v1/settings`)}async getSettingsWithDerivedFields(){let e=await this.getSettings();return{...e,agent_settings:q(e),conversation_settings:J(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async saveSettings(e){let t={};if(e.agent_settings_diff){let n={...e.agent_settings_diff};n.agent_context===null&&delete n.agent_context,Object.keys(n).length>0&&(t.agent_settings_diff=n)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(t.conversation_settings_diff=e.conversation_settings_diff),e.app_preferences)for(let[n,r]of Object.entries(e.app_preferences))r!==void 0&&(t[n]=r);await this.post(`/api/v1/settings`,t)}getSettingsSchema(){return this.get(`/api/v1/settings/agent-schema`)}getConversationSettingsSchema(){return this.get(`/api/v1/settings/conversation-schema`)}listProfiles(){return this.get(this.profileBasePath())}async getProfile(e){let t=await this.get(`${this.profileBasePath()}/${encodeURIComponent(e)}`);return{name:t.name,config:t.config??t.llm??{},api_key_set:t.api_key_set??!1}}saveProfile(e,t){return this.post(`${this.profileBasePath()}/${encodeURIComponent(e)}`,t)}deleteProfile(e){return this.delete(`${this.profileBasePath()}/${encodeURIComponent(e)}`)}renameProfile(e,t){return this.post(`${this.profileBasePath()}/${encodeURIComponent(e)}/rename`,{new_name:t})}async activateProfile(e){let t=await this.post(`${this.profileBasePath()}/${encodeURIComponent(e)}/activate`,{});return{name:t.name,message:t.message,llm_applied:t.model!=null||t.llm!=null}}async listSecrets(){let e=[],t=null;do{let n=new URLSearchParams({limit:String(z)});t&&n.set(`page_id`,t);let r=await this.get(`/api/v1/secrets/search?${n.toString()}`);e.push(...r.items??[]),t=r.next_page_id}while(t);return e}async createSecret(e,t,n){await this.post(`/api/v1/secrets`,{name:e,value:t,description:n})}async updateSecret(e,t,n){await this.put(`/api/v1/secrets/${encodeURIComponent(e)}`,{name:t,description:n})}async deleteSecret(e){await this.delete(`/api/v1/secrets/${encodeURIComponent(e)}`)}async listSkills(){let e=[],t=null;do{let n=new URLSearchParams({limit:String(z)});t&&n.set(`page_id`,t);let r=await this.get(`/api/v1/skills/search?${n.toString()}`);e.push(...r.items??[]),t=r.next_page_id}while(t);return e}searchRepositories(e){let t=new URLSearchParams;return t.set(`provider`,e.provider),t.set(`limit`,String(e.limit??100)),e.query&&t.set(`query`,e.query),e.pageId&&t.set(`page_id`,e.pageId),e.installationId&&t.set(`installation_id`,e.installationId),this.get(`/api/v1/git/repositories/search?${t.toString()}`)}getInstallations(e){let t=new URLSearchParams;return t.set(`provider`,e.provider),t.set(`limit`,String(e.limit??100)),e.pageId&&t.set(`page_id`,e.pageId),this.get(`/api/v1/git/installations/search?${t.toString()}`)}getRepositoryBranches(e){let t=new URLSearchParams;return t.set(`provider`,e.provider),t.set(`repository`,e.repository),t.set(`limit`,String(e.limit??30)),t.set(`query`,e.query??``),e.pageId&&t.set(`page_id`,e.pageId),this.get(`/api/v1/git/branches/search?${t.toString()}`)}getSuggestedTasks(e={}){let t=new URLSearchParams;return t.set(`limit`,String(e.limit??30)),e.pageId&&t.set(`page_id`,e.pageId),this.get(`/api/v1/git/suggested-tasks/search?${t.toString()}`)}searchModels(e){return this.get(`/api/v1/config/models/search${G(e)}`)}searchProviders(e){return this.get(`/api/v1/config/providers/search${G(e)}`)}searchConversations(e=20,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),t&&n.set(`page_id`,t),n.set(`sort_order`,`UPDATED_AT_DESC`),this.get(`/api/v1/app-conversations/search?${n.toString()}`)}getConversations(e){if(e.length===0)return Promise.resolve([]);let t=new URLSearchParams;for(let n of e)t.append(`ids`,n);return this.get(`/api/v1/app-conversations?${t}`)}createConversation(e){return this.post(`/api/v1/app-conversations`,e)}downloadConversation(e){return this.get(`/api/v1/app-conversations/${e}/download`,{responseType:`blob`})}async deleteConversation(e){await this.delete(`/api/v1/app-conversations/${e}`)}updateConversationPublicFlag(e,t){return this.patch(`/api/v1/app-conversations/${e}`,{public:t})}async pauseSandbox(e){await this.post(`/api/v1/sandboxes/${e}/pause`,{})}async resumeSandbox(e){await this.post(`/api/v1/sandboxes/${e}/resume`,{})}getSandboxes(e){if(e.length===0)return Promise.resolve([]);let t=new URLSearchParams;for(let n of e)t.append(`id`,n);return this.get(`/api/v1/sandboxes?${t}`)}readConversationFile(e,t){let n=new URLSearchParams({file_path:t});return this.get(`/api/v1/app-conversations/${e}/file?${n}`,{responseType:`text`})}async getConversationStartTask(e){let t=new URLSearchParams;return t.append(`ids`,e),(await this.get(`/api/v1/app-conversations/start-tasks?${t}`))?.[0]??null}async switchConversationProfile(e,t){await this.post(`/api/v1/app-conversations/${e}/switch_profile`,{profile_name:t})}async switchConversationAcpModel(e,t){await this.post(`/api/v1/app-conversations/${e}/switch_acp_model`,{model:t})}async listAutomations(e=50,t=0){return this.get(`/api/automation/v1?${K(e,t)}`)}getAutomation(e){return this.get(`/api/automation/v1/${encodeURIComponent(e)}`)}updateAutomation(e,t){return this.patch(`/api/automation/v1/${encodeURIComponent(e)}`,t)}async deleteAutomation(e){await this.delete(`/api/automation/v1/${encodeURIComponent(e)}`)}dispatchAutomation(e){return this.post(`/api/automation/v1/${encodeURIComponent(e)}/dispatch`)}listAutomationRuns(e,t=50,n=0){return this.get(`/api/automation/v1/${encodeURIComponent(e)}/runs?${K(t,n)}`)}downloadAutomationTarball(e){return this.get(`/api/automation/v1/${encodeURIComponent(e)}/tarball`,{responseType:`blob`})}getAutomationHealth(){return this.get(`/api/automation/health`,{timeoutSeconds:5})}profileBasePath(){return this.orgId?`/api/organizations/${encodeURIComponent(this.orgId)}/profiles`:R}buildUpstreamAuthHeaders(e){let t=e.authMode??`bearer`;return t===`none`?{}:t===`session-api-key`?e.sessionApiKey?{"X-Session-API-Key":e.sessionApiKey}:{}:this.apiKey?{Authorization:`Bearer ${this.apiKey}`}:{}}async requestDirect(e){let t={...this.buildUpstreamAuthHeaders(e),...this.orgId?{"X-Org-Id":this.orgId}:{},...e.headers??{}};return V({host:this.host,method:e.method,path:e.path,params:e.params,body:e.body,headers:t,timeoutMs:e.timeoutSeconds?e.timeoutSeconds*1e3:this.timeout,acceptableStatusCodes:e.acceptableStatusCodes,responseType:e.responseType})}async requestThroughProxy(e){if(!this.proxy)throw Error(`CloudClient proxy options are required for hostOverride requests`);let t={...this.buildUpstreamAuthHeaders(e),...this.orgId?{"X-Org-Id":this.orgId}:{},...e.headers??{}},n={"Content-Type":`application/json`,...this.proxy.apiKey?{"X-Session-API-Key":this.proxy.apiKey}:{},...this.proxy.headers??{}},r=this.proxy.path??`/api/cloud-proxy`;return V({host:this.proxy.host,method:`POST`,path:r,body:{host:e.hostOverride,method:e.method,path:W(e.path,e.params),headers:t,body:e.body??null,...e.timeoutSeconds?{timeout_seconds:e.timeoutSeconds}:{}},headers:n,timeoutMs:this.timeout,acceptableStatusCodes:e.acceptableStatusCodes,responseType:e.responseType})}};async function V(e){let t=`${e.host.replace(/\/+$/,``)}${W(e.path,e.params)}`,n={...e.body instanceof FormData?{}:{"Content-Type":`application/json`},...e.headers??{}},r={method:e.method,headers:n,signal:AbortSignal.timeout(e.timeoutMs)};e.body!==void 0&&e.method!==`GET`&&(r.body=e.body instanceof FormData?e.body:JSON.stringify(e.body));let i;try{i=await fetch(t,r)}catch(t){throw t instanceof Error&&(t.name===`TimeoutError`||t.name===`AbortError`)?Error(`Request timeout after ${e.timeoutMs}ms`,{cause:t}):t}if(!(e.acceptableStatusCodes?.has(i.status)||!e.acceptableStatusCodes&&i.ok))throw await H(i);return U(i,e.responseType??`auto`)}async function H(e){let t;try{t=e.headers.get(`content-type`)?.includes(`application/json`)?await e.json():await e.text()}catch{t=null}return new n(e.status,e.statusText,t,`HTTP request failed (${e.status} ${e.statusText}): ${JSON.stringify(t)}`)}async function U(e,t){if(e.status===204)return;if(t===`blob`)return await e.blob();if(t===`arrayBuffer`)return await e.arrayBuffer();if(t===`text`)return await e.text();let n=e.headers.get(`content-type`);return t===`json`||n?.includes(`application/json`)?await e.json():await e.text()}function W(e,t){if(!t)return e;let[n,r=``]=e.split(`?`),i=new URLSearchParams(r);for(let[e,n]of Object.entries(t))n!=null&&(Array.isArray(n)?n.forEach(t=>i.append(e,String(t))):i.append(e,String(n)));let a=i.toString();return a?`${n}?${a}`:n}function G(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}function K(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}function q(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),e.mcp_config&&Object.keys(e.mcp_config).length>0&&(t.mcp_config=e.mcp_config),t}function J(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}export{n as S,s as _,F as a,i as b,T as c,S as d,x as f,l as g,m as h,I as i,w as l,y as m,k as n,D as o,b as p,M as r,E as s,B as t,C as u,o as v,r as x,a as y};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-BQUj0sYu.js","assets/rolldown-runtime-BFRubm34.js"])))=>i.map(i=>d[i]);
2
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{St as t}from"./vendor-styling-CI0PQ3ab.js";var n=class extends Error{constructor(e,t,n,r){super(r||`HTTP ${e}: ${t}`),this.status=e,this.statusText=t,this.response=n,this.name=`HttpError`}},r=class{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,``),this.apiKey=e.apiKey,this.timeout=e.timeout||6e4}buildUrl(e,t){let n=e.startsWith(`/`)?e.slice(1):e,r=new URL(n,this.baseUrl+`/`);return t&&Object.entries(t).forEach(([e,t])=>{t!=null&&(Array.isArray(t)?t.forEach(t=>r.searchParams.append(e,String(t))):r.searchParams.append(e,String(t)))}),r}async request(e){if(e.method===`GET`&&e.data!==void 0&&e.data!==null)return this.requestWithBodyOnGet(e);let t=this.buildUrl(e.url,e.params),r={"Content-Type":`application/json`,...e.headers};this.apiKey&&(r[`X-Session-API-Key`]=this.apiKey);let i={method:e.method,headers:r,signal:AbortSignal.timeout(e.timeout||this.timeout)};e.credentials&&(i.credentials=e.credentials),e.data&&e.method!==`GET`&&(e.data instanceof FormData?(delete r[`Content-Type`],i.body=e.data):i.body=JSON.stringify(e.data));try{let r=await fetch(t.toString(),i);if(!(e.acceptableStatusCodes?.has(r.status)||!e.acceptableStatusCodes&&r.ok)){let e;try{e=r.headers.get(`content-type`)?.includes(`application/json`)?await r.json():await r.text()}catch{e=null}throw new n(r.status,r.statusText,e,`HTTP request failed (${r.status} ${r.statusText}): ${JSON.stringify(e)}`)}let a=await this.parseResponse(r,e.responseType||`auto`),o={};return r.headers.forEach((e,t)=>{o[t]=e}),{data:a,status:r.status,statusText:r.statusText,headers:o}}catch(t){throw t instanceof n?t:t instanceof Error?t.name===`AbortError`?Error(`Request timeout after ${e.timeout||this.timeout}ms`,{cause:t}):Error(`Request failed: ${t.message}`,{cause:t}):Error(`Unknown request error`,{cause:t})}}async requestWithBodyOnGet(r){let i=this.buildUrl(r.url,r.params),a=typeof r.data==`string`?r.data:JSON.stringify(r.data),o={"Content-Type":`application/json`,...r.headers,"Content-Length":String(Buffer.byteLength(a))};this.apiKey&&(o[`X-Session-API-Key`]=this.apiKey);let s=(i.protocol,await t(()=>import(`./__vite-browser-external-BQUj0sYu.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1]))),c=r.timeout||this.timeout;return new Promise((e,t)=>{let l=s.request(i,{method:r.method,headers:o},i=>{let a=[];i.on(`data`,e=>a.push(e)),i.on(`end`,()=>{try{let o=i.statusCode??0,s=i.statusMessage??``,c={};for(let[e,t]of Object.entries(i.headers))t!==void 0&&(c[e]=Array.isArray(t)?t.join(`, `):t);let l=Buffer.concat(a),u=c[`content-type`];if(!(r.acceptableStatusCodes?.has(o)||!r.acceptableStatusCodes&&o>=200&&o<300)){let e=l.toString(`utf-8`),r;try{r=u?.includes(`application/json`)?JSON.parse(e):e}catch{r=e||null}t(new n(o,s,r,`HTTP request failed (${o} ${s}): ${JSON.stringify(r)}`));return}e({data:this.parseNodeResponse(l,u,r.responseType||`auto`),status:o,statusText:s,headers:c})}catch(e){t(e)}})});l.on(`error`,e=>{t(Error(`Request failed: ${e.message}`,{cause:e}))}),l.setTimeout(c,()=>{l.destroy(Error(`Request timeout after ${c}ms`))}),l.end(a)})}parseNodeResponse(e,t,n){if(n===`blob`)return new Blob([new Uint8Array(e)]);if(n===`arrayBuffer`)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let r=e.toString(`utf-8`);return n===`text`?r:n===`json`||t?.includes(`application/json`)?r?JSON.parse(r):void 0:r}async parseResponse(e,t){return t===`json`?await e.json():t===`text`?await e.text():t===`blob`?await e.blob():t===`arrayBuffer`?await e.arrayBuffer():e.headers.get(`content-type`)?.includes(`application/json`)?await e.json():await e.text()}async get(e,t){return this.request({method:`GET`,url:e,...t})}async post(e,t,n){return this.request({method:`POST`,url:e,data:t,...n})}async put(e,t,n){return this.request({method:`PUT`,url:e,data:t,...n})}async patch(e,t,n){return this.request({method:`PATCH`,url:e,data:t,...n})}async delete(e,t){return this.request({method:`DELETE`,url:e,...t})}close(){}},i=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout??6e4})}async listAgentProfiles(){return(await this.client.get(`/api/agent-profiles`)).data}async getAgentProfile(e,t={}){let n={};return t.exposeSecrets&&(n[`X-Expose-Secrets`]=t.exposeSecrets),(await this.client.get(`/api/agent-profiles/${encodeURIComponent(e)}`,{headers:n})).data}async saveAgentProfile(e,t){return(await this.client.post(`/api/agent-profiles/${encodeURIComponent(e)}`,t)).data}async deleteAgentProfile(e){return(await this.client.delete(`/api/agent-profiles/${encodeURIComponent(e)}`)).data}async renameAgentProfile(e,t){return(await this.client.post(`/api/agent-profiles/${encodeURIComponent(e)}/rename`,{new_name:t})).data}async activateAgentProfile(e){return(await this.client.post(`/api/agent-profiles/${encodeURIComponent(e)}/activate`,{})).data}async materializeAgentProfile(e){return(await this.client.post(`/api/agent-profiles/${encodeURIComponent(e)}/materialize`,{})).data}close(){this.client.close()}},a=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getRoot(){return(await this.client.get(`/`)).data}async getAlive(){return(await this.client.get(`/alive`)).data}async getHealth(){return(await this.client.get(`/health`)).data}async getReady(){return(await this.client.get(`/ready`,{acceptableStatusCodes:new Set([200,503])})).data}async getServerInfo(){return(await this.client.get(`/server_info`)).data}close(){this.client.close()}},o=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async searchEvents(e={}){return(await this.client.get(`/api/bash/bash_events/search`,{params:e})).data}async getEvent(e){return(await this.client.get(`/api/bash/bash_events/${e}`)).data}async getEvents(e){return Promise.all(e.map(async e=>{try{return await this.getEvent(e)}catch(e){if(e instanceof n&&e.status===404)return null;throw e}}))}async batchGetEvents(e){return(await this.client.get(`/api/bash/bash_events/`,{data:e})).data}async startCommand(e,t,n){let r=this.normalizeRequest(e,t,n);return(await this.client.post(`/api/bash/start_bash_command`,r)).data}async executeCommand(e,t,n){let r=this.normalizeRequest(e,t,n);return(await this.client.post(`/api/bash/execute_bash_command`,r,{timeout:((r.timeout||30)+10)*1e3})).data}async clearEvents(){return(await this.client.delete(`/api/bash/bash_events`)).data}close(){this.client.close()}normalizeRequest(e,t,n){return typeof e==`string`?{command:e,...t?{cwd:t}:{},...n===void 0?{}:{timeout:Math.floor(n)}}:{...e,...e.timeout===void 0?{}:{timeout:Math.floor(e.timeout)}}}},s=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async createConversation(e){return(await this.client.post(`/api/conversations`,e)).data}async searchConversations(e={}){return(await this.client.get(`/api/conversations/search`,{params:e})).data}async countConversations(e={}){return(await this.client.get(`/api/conversations/count`,{params:e})).data}async getConversations(e){return(await this.client.get(`/api/conversations`,{params:{ids:e}})).data}async getConversation(e){return(await this.client.get(`/api/conversations/${e}`)).data}async searchEvents(e,t={}){return(await this.client.get(`/api/conversations/${e}/events/search`,{params:t})).data}async getEvent(e,t){return(await this.client.get(`/api/conversations/${e}/events/${t}`)).data}async getEvents(e,t){return Promise.all(t.map(async t=>{try{return await this.getEvent(e,t)}catch(e){if(e instanceof n&&e.status===404)return null;throw e}}))}async sendEvent(e,t,n={}){await this.client.post(`/api/conversations/${e}/events`,{...t,...n.run===void 0?{}:{run:n.run}})}async pauseConversation(e){return(await this.client.post(`/api/conversations/${e}/pause`,{})).data}async interruptConversation(e){return(await this.client.post(`/api/conversations/${e}/interrupt`,{})).data}async runConversation(e){return(await this.client.post(`/api/conversations/${e}/run`,{})).data}async startGoal(e,t){return(await this.client.post(`/api/conversations/${e}/goal`,t)).data}async stopGoal(e){return(await this.client.post(`/api/conversations/${e}/goal/stop`,{})).data}async resumeGoal(e){return(await this.client.post(`/api/conversations/${e}/goal/resume`,{})).data}async askAgent(e,t){return(await this.client.post(`/api/conversations/${e}/ask_agent`,{question:t})).data}async getEventCount(e,t={}){return(await this.client.get(`/api/conversations/${e}/events/count`,{params:t})).data}async respondToConfirmation(e,t){return(await this.client.post(`/api/conversations/${e}/events/respond_to_confirmation`,t)).data}async getAgentFinalResponse(e){return(await this.client.get(`/api/conversations/${e}/agent_final_response`)).data}async setConfirmationPolicy(e,t){let n=`policy`in t?t:{policy:t};return(await this.client.post(`/api/conversations/${e}/confirmation_policy`,n)).data}async condenseConversation(e){return(await this.client.post(`/api/conversations/${e}/condense`,{})).data}async setSecurityAnalyzer(e,t){let n=c(t)?t:{security_analyzer:t};return(await this.client.post(`/api/conversations/${e}/security_analyzer`,n)).data}async updateSecrets(e,t){return(await this.client.post(`/api/conversations/${e}/secrets`,t)).data}async forkConversation(e,t={},n={}){return(await this.client.post(`/api/conversations/${e}/fork`,t,{params:n.includeSkills===void 0?void 0:{include_skills:n.includeSkills}})).data}async navigateConversation(e,t={},n={}){return(await this.client.post(`/api/conversations/${e}/navigate`,t,{params:n.includeSkills===void 0?void 0:{include_skills:n.includeSkills}})).data}async switchProfile(e,t){await this.client.post(`/api/conversations/${e}/switch_profile`,{profile_name:t})}async switchLLM(e,t){await this.client.post(`/api/conversations/${e}/switch_llm`,{llm:t})}async switchAcpModel(e,t){await this.client.post(`/api/conversations/${e}/switch_acp_model`,{model:t})}async deleteConversation(e){await this.client.delete(`/api/conversations/${e}`)}async updateConversation(e,t){return(await this.client.patch(`/api/conversations/${e}`,t)).data}close(){this.client.close()}};function c(e){return typeof e==`object`&&!!e&&`security_analyzer`in e}var l=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async searchSubdirectories(e,t={}){return(await this.client.get(`/api/file/search_subdirs`,{params:{path:e,page_id:t.pageId,limit:t.limit,include_hidden:t.includeHidden||void 0}})).data}async getHome(e={}){return(await this.client.get(`/api/file/home`,{params:{include_hidden:e.includeHidden||void 0}})).data}async downloadFile(e){return(await this.client.get(`/api/file/download`,{params:{path:e},responseType:`arrayBuffer`})).data}async downloadTextFile(e){return new TextDecoder().decode(await this.downloadFile(e))}async uploadFile(e,t,n){let r=new FormData,i=typeof File>`u`?void 0:File;return i&&e instanceof i?r.append(`file`,e,n||e.name):e instanceof Blob?r.append(`file`,e,n||`blob-file`):r.append(`file`,new Blob([e],{type:`text/plain`}),n||`text-file.txt`),(await this.client.post(`/api/file/upload`,r,{params:{path:t}})).data}async uploadTextFile(e,t,n){return this.uploadFile(e,t,n)}async downloadTrajectory(e){return(await this.client.get(`/api/file/download-trajectory/${encodeURIComponent(e)}`,{responseType:`blob`})).data}close(){this.client.close()}},u=`AGENT_SERVER_VERSION_TOO_OLD`,d={workspaces:{feature:`workspaces`,displayName:`Workspaces`,minVersion:`1.23.0`},hooks:{feature:`hooks`,displayName:`Hooks API`,minVersion:`1.23.0`},mcpTest:{feature:`mcp-test`,displayName:`MCP test API`,minVersion:`1.23.0`},mcpOAuth:{feature:`mcp-oauth`,displayName:`MCP OAuth API`,minVersion:`1.31.0`}},f=class e extends Error{constructor({requirement:t,actualVersion:n}){super(`${t.displayName} requires agent-server ${t.minVersion} or newer; this backend is running ${n}. Please upgrade your agent-server backend.`),this.code=u,this.name=`AgentServerVersionError`,this.feature=t.feature,this.displayName=t.displayName,this.requiredVersion=t.minVersion,this.actualVersion=n,Object.setPrototypeOf(this,e.prototype)}},p=new WeakMap;function m(e){return e instanceof f||typeof e==`object`&&!!e&&`code`in e&&e.code===`AGENT_SERVER_VERSION_TOO_OLD`}async function h(e){let t=p.get(e);if(t)return t;let n=e.get(`/server_info`).then(e=>e.data);return p.set(e,n),n}async function g(e,t){let n=await h(e),r=typeof n.version==`string`&&n.version.trim()?n.version.trim():`unknown`,i=_(r,t.minVersion);if(i===null||i<0)throw new f({requirement:t,actualVersion:r});return n}function _(e,t){let n=v(e),r=v(t);if(!n||!r)return null;for(let e of[`major`,`minor`,`patch`]){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return n.prerelease&&!r.prerelease?-1:!n.prerelease&&r.prerelease?1:n.prerelease&&r.prerelease?n.prerelease.localeCompare(r.prerelease):0}function v(e){let[t]=e.trim().replace(/^v/,``).split(`+`),[n,r]=t.split(`-`,2),i=n.split(`.`);if(i.length!==3)return null;let[a,o,s]=i.map(e=>Number(e));return[a,o,s].every(e=>Number.isInteger(e)&&e>=0)?{major:a,minor:o,patch:s,prerelease:r}:null}var y=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getProviders(){return(await this.client.get(`/api/llm/providers`)).data.providers}async getModels(e){return(await this.client.get(`/api/llm/models`,{params:e?{provider:e}:void 0})).data.models}async getVerifiedModels(){return(await this.client.get(`/api/llm/models/verified`)).data.models}async getOpenAISubscriptionModels(){return(await this.client.get(`/api/llm/subscription/openai/models`)).data.models}async getOpenAISubscriptionStatus(){return(await this.client.get(`/api/llm/subscription/openai/status`)).data}async startOpenAISubscriptionDeviceLogin(){return(await this.client.post(`/api/llm/subscription/openai/device/start`)).data}async pollOpenAISubscriptionDeviceLogin(e){let t={device_code:e};return(await this.client.post(`/api/llm/subscription/openai/device/poll`,t)).data}async logoutOpenAISubscription(){return(await this.client.post(`/api/llm/subscription/openai/logout`)).data}close(){this.client.close()}},b=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async testServer(e){return await g(this.client,d.mcpTest),(await this.client.post(`/api/mcp/test`,e,{timeout:(e.timeout??15)*1e3+5e3})).data}async startOAuth(e){return await g(this.client,d.mcpOAuth),(await this.client.post(`/api/mcp/oauth/start`,e,{timeout:(e.timeout??15)*1e3+5e3})).data}async getOAuthStatus(e){return await g(this.client,d.mcpOAuth),(await this.client.get(`/api/mcp/oauth/status/${encodeURIComponent(e)}`)).data}async submitOAuthCallback(e,t){return await g(this.client,d.mcpOAuth),(await this.client.post(`/api/mcp/oauth/callback/${encodeURIComponent(e)}`,t)).data}close(){this.client.close()}},x=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async listProfiles(){return(await this.client.get(`/api/profiles`)).data}async getProfile(e,t={}){let n={};return t.exposeSecrets&&(n[`X-Expose-Secrets`]=t.exposeSecrets),(await this.client.get(`/api/profiles/${encodeURIComponent(e)}`,{headers:n})).data}async saveProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}`,t)).data}async deleteProfile(e){return(await this.client.delete(`/api/profiles/${encodeURIComponent(e)}`)).data}async renameProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/rename`,{new_name:t})).data}async activateProfile(e){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/activate`,{})).data}close(){this.client.close()}},S=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getAgentSchema(){return(await this.client.get(`/api/settings/agent-schema`)).data}async getSettings(e={}){return(await this.client.get(`/api/settings`,{headers:e.exposeSecrets?{"X-Expose-Secrets":e.exposeSecrets}:void 0})).data}async updateSettings(e){return(await this.client.patch(`/api/settings`,e)).data}async listSecrets(){return(await this.client.get(`/api/settings/secrets`)).data}async upsertSecret(e){return(await this.client.put(`/api/settings/secrets`,e)).data}async getSecret(e){return(await this.client.get(`/api/settings/secrets/${encodeURIComponent(e)}`,{responseType:`text`})).data}async deleteSecret(e){return(await this.client.delete(`/api/settings/secrets/${encodeURIComponent(e)}`)).data}async getConversationSchema(){return(await this.client.get(`/api/settings/conversation-schema`)).data}async listProfiles(){return(await this.client.get(`/api/profiles`)).data}async getProfile(e,t={}){return(await this.client.get(`/api/profiles/${encodeURIComponent(e)}`,{headers:t.exposeSecrets?{"X-Expose-Secrets":t.exposeSecrets}:void 0})).data}async saveProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}`,t)).data}async deleteProfile(e){return(await this.client.delete(`/api/profiles/${encodeURIComponent(e)}`)).data}async renameProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/rename`,{new_name:t})).data}close(){this.client.close()}},C=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getSkills(e={}){return(await this.client.post(`/api/skills`,e)).data}async syncSkills(){return(await this.client.post(`/api/skills/sync`,{})).data}async installSkill(e){return(await this.client.post(`/api/skills/install`,e)).data}async listInstalledSkills(){return(await this.client.get(`/api/skills/installed`)).data}async getInstalledSkill(e){return(await this.client.get(`/api/skills/installed/${encodeURIComponent(e)}`)).data}async toggleSkill(e,t){return(await this.client.patch(`/api/skills/installed/${encodeURIComponent(e)}`,{enabled:t})).data}async uninstallSkill(e){return(await this.client.delete(`/api/skills/installed/${encodeURIComponent(e)}`)).data}async refreshSkill(e){return(await this.client.post(`/api/skills/installed/${encodeURIComponent(e)}/refresh`)).data}async getMarketplace(){return(await this.client.get(`/api/skills/marketplace`)).data}close(){this.client.close()}},w=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getPlugins(e={}){return(await this.client.post(`/api/plugins`,e)).data}async getPluginsMarketplace(){return(await this.client.get(`/api/plugins/marketplace`)).data}async installPlugin(e){return(await this.client.post(`/api/plugins/install`,e)).data}async listInstalledPlugins(){return(await this.client.get(`/api/plugins/installed`)).data}async getInstalledPlugin(e){return(await this.client.get(`/api/plugins/installed/${encodeURIComponent(e)}`)).data}async setPluginEnabled(e,t){return(await this.client.patch(`/api/plugins/installed/${encodeURIComponent(e)}`,{enabled:t})).data}async uninstallPlugin(e){return(await this.client.delete(`/api/plugins/installed/${encodeURIComponent(e)}`)).data}async refreshPlugin(e){return(await this.client.post(`/api/plugins/installed/${encodeURIComponent(e)}/refresh`)).data}close(){this.client.close()}},T=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getUrl(e={}){return(await this.client.get(`/api/vscode/url`,{params:{...e.baseUrl?{base_url:e.baseUrl}:{},...e.workspaceDir?{workspace_dir:e.workspaceDir}:{}}})).data.url}async getStatus(){return(await this.client.get(`/api/vscode/status`)).data}close(){this.client.close()}},E=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getSharedConversations(e){return(await this.client.get(`/api/shared-conversations`,{params:{ids:e}})).data}async getSharedConversation(e){return(await this.getSharedConversations([e]))[0]??null}async searchSharedEvents(e){return(await this.client.get(`/api/shared-events/search`,{params:{conversation_id:e.conversationId,limit:e.limit,page_id:e.pageId}})).data}close(){this.client.close()}},D=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new r({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async listWorkspaces(){return await this.ensureWorkspacesSupported(),(await this.client.get(`/api/workspaces`)).data}async addWorkspaces(e){return await this.ensureWorkspacesSupported(),(await this.client.post(`/api/workspaces`,{workspaces:e})).data}async deleteWorkspace(e){return await this.ensureWorkspacesSupported(),(await this.client.delete(`/api/workspaces`,{params:{path:e}})).data}async addWorkspaceParents(e){return await this.ensureWorkspacesSupported(),(await this.client.post(`/api/workspaces/parents`,{parents:e})).data}async deleteWorkspaceParent(e){return await this.ensureWorkspacesSupported(),(await this.client.delete(`/api/workspaces/parents`,{params:{path:e}})).data}close(){this.client.close()}async ensureWorkspacesSupported(){await g(this.client,d.workspaces)}},O=class{constructor(e){this.host=e.host.replace(/\/+$/,``),this.apiKey=e.apiKey,this.timeout=e.timeout||6e4}get(e,t={}){return this.request({...t,method:`GET`,path:e})}post(e,t,n={}){return this.request({...n,method:`POST`,path:e,body:t})}patch(e,t,n={}){return this.request({...n,method:`PATCH`,path:e,body:t})}put(e,t,n={}){return this.request({...n,method:`PUT`,path:e,body:t})}delete(e,t={}){return this.request({...t,method:`DELETE`,path:e})}close(){}},k=class e extends Error{constructor(t,n){super(t),this.code=n,this.name=`DeviceFlowError`,Object.setPrototypeOf(this,e.prototype)}},A=6e5,j=3e4;function M(e){try{let t=e.trim().toLowerCase(),n=/^https?:\/\//i.test(t)?t:`https://${t}`,r=new URL(n).hostname;return r.endsWith(`.all-hands.dev`)||r===`all-hands.dev`||r.endsWith(`.openhands.dev`)||r===`openhands.dev`}catch{return!1}}function N(e){return e.replace(/\/+$/,``)}async function P(e,t,n,r,i,a){let o=typeof n==`string`||n instanceof Blob||n instanceof FormData||n instanceof URLSearchParams?n:JSON.stringify(n),s=new Headers(a);return s.set(`Content-Type`,r),fetch(`${N(e)}${t}`,{method:`POST`,headers:s,body:o,signal:i})}async function F(e,t={}){try{let n=await P(e,`/oauth/device/authorize`,{},`application/json`,void 0,t.headers);if(!n.ok)throw new k(`Failed to start device flow: Server returned ${n.status}`);let r=await n.json();if(!r.device_code||!r.user_code||!r.verification_uri)throw new k(`Invalid response from device authorization endpoint: missing required fields`);return{device_code:r.device_code,user_code:r.user_code,verification_uri:r.verification_uri,verification_uri_complete:r.verification_uri_complete??`${r.verification_uri}?user_code=${encodeURIComponent(r.user_code)}`,expires_in:r.expires_in??600,interval:r.interval??5}}catch(e){throw e instanceof k?e:new k(`Failed to start device flow: ${e instanceof Error?e.message:String(e)}`)}}async function I(e,t,n){let r=n.timeout??A,i=Math.max(1,n.interval)*1e3,a=Date.now();for(;Date.now()-a<r;){if(n.signal?.aborted)throw new k(`Authorization cancelled`,`cancelled`);try{let r=await P(e,`/oauth/device/token`,new URLSearchParams({grant_type:`urn:ietf:params:oauth:grant-type:device_code`,device_code:t}),`application/x-www-form-urlencoded`,n.signal,n.headers);if(r.ok){let e=await r.json();if(!e.access_token)throw new k(`Invalid token response: missing access_token`);return{access_token:e.access_token,token_type:e.token_type??`Bearer`,expires_in:e.expires_in}}let a;try{a=await r.json()}catch{throw new k(`Unexpected response from server: ${r.status}`)}switch(a.error){case`authorization_pending`:break;case`slow_down`:i=typeof a.interval==`number`&&Number.isFinite(a.interval)&&a.interval>0?Math.max(1,Math.min(a.interval,30))*1e3:Math.min(i+5e3,j);break;case`expired_token`:throw new k(`Device code has expired. Please try again.`,`expired_token`);case`access_denied`:throw new k(`Authorization request was denied.`,`access_denied`);default:throw new k(`Authorization error: ${a.error}${a.error_description?` - ${a.error_description}`:``}`,a.error)}}catch(e){if(e instanceof k)throw e;if(e instanceof DOMException&&e.name===`AbortError`)throw new k(`Authorization cancelled`,`cancelled`);console.warn(`Network error during polling, retrying:`,e)}try{await L(i,n.signal)}catch(e){throw e instanceof DOMException&&e.name===`AbortError`?new k(`Authorization cancelled`,`cancelled`):e}}throw new k(`Timeout waiting for authorization. Please try again.`,`timeout`)}function L(e,t){return new Promise((n,r)=>{if(t?.aborted){r(new DOMException(`Aborted`,`AbortError`));return}let i=setTimeout(n,e);t?.addEventListener(`abort`,()=>{clearTimeout(i),r(new DOMException(`Aborted`,`AbortError`))},{once:!0})})}var R=`/api/v1/settings/profiles`,z=100,B=class extends O{constructor(e){super(e),this.kind=`cloud`,this.orgId=e.orgId??null,this.proxy=e.proxy?{...e.proxy,host:e.proxy.host.replace(/\/+$/,``),path:e.proxy.path??`/api/cloud-proxy`}:void 0}async request(e){return e.hostOverride?this.requestThroughProxy(e):this.requestDirect(e)}startDeviceFlow(e={}){return F(this.host,e)}pollForToken(e,t){return I(this.host,e,t)}async getOrganizations(){let e=await this.get(`/api/organizations`);return{items:e?.items??[],currentOrgId:e?.current_org_id??null}}getCurrentApiKey(){return this.get(`/api/keys/current`)}async getOrganizationMe(e){let t=await this.get(`/api/organizations/${encodeURIComponent(e)}/me`);return{orgId:t?.org_id??e,userId:t?.user_id??``,role:t?.role??null,permissions:Array.isArray(t?.permissions)?t.permissions:null}}getSettings(){return this.get(`/api/v1/settings`)}async getSettingsWithDerivedFields(){let e=await this.getSettings();return{...e,agent_settings:q(e),conversation_settings:J(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async saveSettings(e){let t={};if(e.agent_settings_diff){let n={...e.agent_settings_diff};n.agent_context===null&&delete n.agent_context,Object.keys(n).length>0&&(t.agent_settings_diff=n)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(t.conversation_settings_diff=e.conversation_settings_diff),e.app_preferences)for(let[n,r]of Object.entries(e.app_preferences))r!==void 0&&(t[n]=r);await this.post(`/api/v1/settings`,t)}getSettingsSchema(){return this.get(`/api/v1/settings/agent-schema`)}getConversationSettingsSchema(){return this.get(`/api/v1/settings/conversation-schema`)}listProfiles(){return this.get(this.profileBasePath())}async getProfile(e){let t=await this.get(`${this.profileBasePath()}/${encodeURIComponent(e)}`);return{name:t.name,config:t.config??t.llm??{},api_key_set:t.api_key_set??!1}}saveProfile(e,t){return this.post(`${this.profileBasePath()}/${encodeURIComponent(e)}`,t)}deleteProfile(e){return this.delete(`${this.profileBasePath()}/${encodeURIComponent(e)}`)}renameProfile(e,t){return this.post(`${this.profileBasePath()}/${encodeURIComponent(e)}/rename`,{new_name:t})}async activateProfile(e){let t=await this.post(`${this.profileBasePath()}/${encodeURIComponent(e)}/activate`,{});return{name:t.name,message:t.message,llm_applied:t.model!=null||t.llm!=null}}async listSecrets(){let e=[],t=null;do{let n=new URLSearchParams({limit:String(z)});t&&n.set(`page_id`,t);let r=await this.get(`/api/v1/secrets/search?${n.toString()}`);e.push(...r.items??[]),t=r.next_page_id}while(t);return e}async createSecret(e,t,n){await this.post(`/api/v1/secrets`,{name:e,value:t,description:n})}async updateSecret(e,t,n){await this.put(`/api/v1/secrets/${encodeURIComponent(e)}`,{name:t,description:n})}async deleteSecret(e){await this.delete(`/api/v1/secrets/${encodeURIComponent(e)}`)}async listSkills(){let e=[],t=null;do{let n=new URLSearchParams({limit:String(z)});t&&n.set(`page_id`,t);let r=await this.get(`/api/v1/skills/search?${n.toString()}`);e.push(...r.items??[]),t=r.next_page_id}while(t);return e}searchRepositories(e){let t=new URLSearchParams;return t.set(`provider`,e.provider),t.set(`limit`,String(e.limit??100)),e.query&&t.set(`query`,e.query),e.pageId&&t.set(`page_id`,e.pageId),e.installationId&&t.set(`installation_id`,e.installationId),this.get(`/api/v1/git/repositories/search?${t.toString()}`)}getInstallations(e){let t=new URLSearchParams;return t.set(`provider`,e.provider),t.set(`limit`,String(e.limit??100)),e.pageId&&t.set(`page_id`,e.pageId),this.get(`/api/v1/git/installations/search?${t.toString()}`)}getRepositoryBranches(e){let t=new URLSearchParams;return t.set(`provider`,e.provider),t.set(`repository`,e.repository),t.set(`limit`,String(e.limit??30)),t.set(`query`,e.query??``),e.pageId&&t.set(`page_id`,e.pageId),this.get(`/api/v1/git/branches/search?${t.toString()}`)}getSuggestedTasks(e={}){let t=new URLSearchParams;return t.set(`limit`,String(e.limit??30)),e.pageId&&t.set(`page_id`,e.pageId),this.get(`/api/v1/git/suggested-tasks/search?${t.toString()}`)}searchModels(e){return this.get(`/api/v1/config/models/search${G(e)}`)}searchProviders(e){return this.get(`/api/v1/config/providers/search${G(e)}`)}searchConversations(e=20,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),t&&n.set(`page_id`,t),n.set(`sort_order`,`UPDATED_AT_DESC`),this.get(`/api/v1/app-conversations/search?${n.toString()}`)}getConversations(e){if(e.length===0)return Promise.resolve([]);let t=new URLSearchParams;for(let n of e)t.append(`ids`,n);return this.get(`/api/v1/app-conversations?${t}`)}createConversation(e){return this.post(`/api/v1/app-conversations`,e)}downloadConversation(e){return this.get(`/api/v1/app-conversations/${e}/download`,{responseType:`blob`})}async deleteConversation(e){await this.delete(`/api/v1/app-conversations/${e}`)}updateConversationPublicFlag(e,t){return this.patch(`/api/v1/app-conversations/${e}`,{public:t})}async pauseSandbox(e){await this.post(`/api/v1/sandboxes/${e}/pause`,{})}async resumeSandbox(e){await this.post(`/api/v1/sandboxes/${e}/resume`,{})}getSandboxes(e){if(e.length===0)return Promise.resolve([]);let t=new URLSearchParams;for(let n of e)t.append(`id`,n);return this.get(`/api/v1/sandboxes?${t}`)}readConversationFile(e,t){let n=new URLSearchParams({file_path:t});return this.get(`/api/v1/app-conversations/${e}/file?${n}`,{responseType:`text`})}async getConversationStartTask(e){let t=new URLSearchParams;return t.append(`ids`,e),(await this.get(`/api/v1/app-conversations/start-tasks?${t}`))?.[0]??null}async switchConversationProfile(e,t){await this.post(`/api/v1/app-conversations/${e}/switch_profile`,{profile_name:t})}async switchConversationAcpModel(e,t){await this.post(`/api/v1/app-conversations/${e}/switch_acp_model`,{model:t})}async listAutomations(e=50,t=0){return this.get(`/api/automation/v1?${K(e,t)}`)}getAutomation(e){return this.get(`/api/automation/v1/${encodeURIComponent(e)}`)}updateAutomation(e,t){return this.patch(`/api/automation/v1/${encodeURIComponent(e)}`,t)}async deleteAutomation(e){await this.delete(`/api/automation/v1/${encodeURIComponent(e)}`)}dispatchAutomation(e){return this.post(`/api/automation/v1/${encodeURIComponent(e)}/dispatch`)}listAutomationRuns(e,t=50,n=0){return this.get(`/api/automation/v1/${encodeURIComponent(e)}/runs?${K(t,n)}`)}downloadAutomationTarball(e){return this.get(`/api/automation/v1/${encodeURIComponent(e)}/tarball`,{responseType:`blob`})}getAutomationHealth(){return this.get(`/api/automation/health`,{timeoutSeconds:5})}profileBasePath(){return this.orgId?`/api/organizations/${encodeURIComponent(this.orgId)}/profiles`:R}buildUpstreamAuthHeaders(e){let t=e.authMode??`bearer`;return t===`none`?{}:t===`session-api-key`?e.sessionApiKey?{"X-Session-API-Key":e.sessionApiKey}:{}:this.apiKey?{Authorization:`Bearer ${this.apiKey}`}:{}}async requestDirect(e){let t={...this.buildUpstreamAuthHeaders(e),...this.orgId?{"X-Org-Id":this.orgId}:{},...e.headers??{}};return V({host:this.host,method:e.method,path:e.path,params:e.params,body:e.body,headers:t,timeoutMs:e.timeoutSeconds?e.timeoutSeconds*1e3:this.timeout,acceptableStatusCodes:e.acceptableStatusCodes,responseType:e.responseType})}async requestThroughProxy(e){if(!this.proxy)throw Error(`CloudClient proxy options are required for hostOverride requests`);let t={...this.buildUpstreamAuthHeaders(e),...this.orgId?{"X-Org-Id":this.orgId}:{},...e.headers??{}},n={"Content-Type":`application/json`,...this.proxy.apiKey?{"X-Session-API-Key":this.proxy.apiKey}:{},...this.proxy.headers??{}},r=this.proxy.path??`/api/cloud-proxy`;return V({host:this.proxy.host,method:`POST`,path:r,body:{host:e.hostOverride,method:e.method,path:W(e.path,e.params),headers:t,body:e.body??null,...e.timeoutSeconds?{timeout_seconds:e.timeoutSeconds}:{}},headers:n,timeoutMs:this.timeout,acceptableStatusCodes:e.acceptableStatusCodes,responseType:e.responseType})}};async function V(e){let t=`${e.host.replace(/\/+$/,``)}${W(e.path,e.params)}`,n={...e.body instanceof FormData?{}:{"Content-Type":`application/json`},...e.headers??{}},r={method:e.method,headers:n,signal:AbortSignal.timeout(e.timeoutMs)};e.body!==void 0&&e.method!==`GET`&&(r.body=e.body instanceof FormData?e.body:JSON.stringify(e.body));let i;try{i=await fetch(t,r)}catch(t){throw t instanceof Error&&(t.name===`TimeoutError`||t.name===`AbortError`)?Error(`Request timeout after ${e.timeoutMs}ms`,{cause:t}):t}if(!(e.acceptableStatusCodes?.has(i.status)||!e.acceptableStatusCodes&&i.ok))throw await H(i);return U(i,e.responseType??`auto`)}async function H(e){let t;try{t=e.headers.get(`content-type`)?.includes(`application/json`)?await e.json():await e.text()}catch{t=null}return new n(e.status,e.statusText,t,`HTTP request failed (${e.status} ${e.statusText}): ${JSON.stringify(t)}`)}async function U(e,t){if(e.status===204)return;if(t===`blob`)return await e.blob();if(t===`arrayBuffer`)return await e.arrayBuffer();if(t===`text`)return await e.text();let n=e.headers.get(`content-type`);return t===`json`||n?.includes(`application/json`)?await e.json():await e.text()}function W(e,t){if(!t)return e;let[n,r=``]=e.split(`?`),i=new URLSearchParams(r);for(let[e,n]of Object.entries(t))n!=null&&(Array.isArray(n)?n.forEach(t=>i.append(e,String(t))):i.append(e,String(n)));let a=i.toString();return a?`${n}?${a}`:n}function G(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}function K(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}function q(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),e.mcp_config&&Object.keys(e.mcp_config).length>0&&(t.mcp_config=e.mcp_config),t}function J(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}export{n as S,s as _,F as a,i as b,T as c,S as d,x as f,l as g,m as h,I as i,w as l,y as m,k as n,D as o,b as p,M as r,E as s,B as t,C as u,o as v,r as x,a as y};
@@ -1,4 +1,4 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./createLucideIcon-D4Tak8A1.js";import{t as r}from"./iconBase-CuvxAQZ5.js";var i=n(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]);function a(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e){if(Array.isArray(e))return e}function s(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function l(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./createLucideIcon-D4Tak8A1.js";import{t as r}from"./iconBase-Dz51Zn5x.js";var i=n(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]);function a(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e){if(Array.isArray(e))return e}function s(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function l(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?u(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t){if(e==null)return{};var n,r,i=p(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function p(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function m(e,t){return o(e)||c(e,t)||_(e,t)||l()}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function g(e){var t=h(e,`string`);return typeof t==`symbol`?t:t+``}function _(e,t){if(e){if(typeof e==`string`)return a(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?y(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function x(){var e=[...arguments];return function(t){return e.reduceRight(function(e,t){return t(e)},t)}}function S(e){return function t(){var n=this,r=[...arguments];return r.length>=e.length?e.apply(this,r):function(){var e=[...arguments];return t.apply(n,[].concat(r,e))}}}function C(e){return{}.toString.call(e).includes(`Object`)}function w(e){return!Object.keys(e).length}function T(e){return typeof e==`function`}function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function D(e,t){return C(t)||M(`changeType`),Object.keys(t).some(function(t){return!E(e,t)})&&M(`changeField`),t}function O(e){T(e)||M(`selectorType`)}function k(e){T(e)||C(e)||M(`handlerType`),C(e)&&Object.values(e).some(function(e){return!T(e)})&&M(`handlersType`)}function A(e){e||M(`initialIsRequired`),C(e)||M(`initialType`),w(e)&&M(`initialContent`)}function j(e,t){throw Error(e[t]||e.default)}var M=S(j)({initialIsRequired:`initial state is required`,initialType:`initial state should be an object`,initialContent:`initial state shouldn't be an empty object`,handlerType:`handler should be an object or a function`,handlersType:`all handlers should be a functions`,selectorType:`selector should be a function`,changeType:`provided value of changes should be an object`,changeField:`it seams you want to change a field in the state which is not specified in the "initial" state`,default:"an unknown error accured in `state-local` package"}),N={changes:D,selector:O,handler:k,initial:A};function P(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};N.initial(e),N.handler(t);var n={current:e},r=S(ee)(n,t),i=S(I)(n),a=S(N.changes)(e),o=S(F)(n);function s(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(e){return e};return N.selector(e),e(n.current)}function c(e){x(r,i,a,o)(e)}return[s,c]}function F(e,t){return T(t)?t(e.current):t}function I(e,t){return e.current=b(b({},e.current),t),t}function ee(e,t,n){return T(t)?t(e.current):Object.keys(n).forEach(function(n){return t[n]?.call(t,e.current[n])}),n}var te={create:P},ne={paths:{vs:`https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs`}};function re(e){return function t(){var n=this,r=[...arguments];return r.length>=e.length?e.apply(this,r):function(){var e=[...arguments];return t.apply(n,[].concat(r,e))}}}function ie(e){return{}.toString.call(e).includes(`Object`)}function ae(e){return e||L(`configIsRequired`),ie(e)||L(`configType`),e.urls?(oe(),{paths:{vs:e.urls.monacoBase}}):e}function oe(){console.warn(ce.deprecation)}function se(e,t){throw Error(e[t]||e.default)}var ce={configIsRequired:`the configuration object is required`,configType:`the configuration object should be an object`,default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
3
3
  You are using deprecated way of configuration.
4
4
 
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./rolldown-runtime-BFRubm34.js";import{c as n,s as r}from"./vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B8XNNEQZ.js";import{c as i,d as a}from"./vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dc5nKwLO.js";function o(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function s(e){return e.join(` `).trim()}var c=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(a());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),l=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),u=t(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(c()),r=l();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),d=p(`end`),f=p(`start`);function p(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function m(e){let t=f(e),n=d(e);if(t&&n)return{start:t,end:n}}function h(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?_(e.position):`start`in e||`end`in e?_(e):`line`in e||`column`in e?g(e):``}function g(e){return v(e&&e.line)+`:`+v(e&&e.column)}function _(e){return g(e&&e.start)+`-`+g(e&&e.end)}function v(e){return e&&typeof e==`number`?e:1}var y=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=h(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};y.prototype.file=``,y.prototype.name=``,y.prototype.reason=``,y.prototype.message=``,y.prototype.stack=``,y.prototype.column=void 0,y.prototype.line=void 0,y.prototype.ancestors=void 0,y.prototype.cause=void 0,y.prototype.fatal=void 0,y.prototype.place=void 0,y.prototype.ruleId=void 0,y.prototype.source=void 0;var b=9,x=32;function ee(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(S(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(S(t.slice(i),i>0,!1)),a.join(``)}function S(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===b||t===x;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===b||t===x;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}var C=(function(e){if(e==null)return T;if(typeof e==`function`)return w(e);if(typeof e==`object`)return Array.isArray(e)?te(e):ne(e);if(typeof e==`string`)return re(e);throw Error(`Expected function, string, or object as test`)});function te(e){let t=[],n=-1;for(;++n<e.length;)t[n]=C(e[n]);return w(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ne(e){let t=e;return w(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function re(e){return w(t);function t(t){return t&&t.type===e}}function w(e){return t;function t(t,n,r){return!!(E(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function T(){return!0}function E(e){return typeof e==`object`&&!!e&&`type`in e}function ie(e){return e}var D=[];function O(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=C(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+ie(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=D,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=k(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function k(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?D:[e]}function A(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),O(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}function j(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?M(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function M(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var N={basename:ae,dirname:oe,extname:se,join:ce,sep:`/`};function ae(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);P(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function oe(e){if(P(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function se(e){P(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function ce(...e){let t=-1,n;for(;++t<e.length;)P(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:le(n)}function le(e){P(e);let t=e.codePointAt(0)===47,n=ue(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ue(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function P(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var F={cwd:I};function I(){return`/`}function L(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function R(e){if(typeof e==`string`)e=new URL(e);else if(!L(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return z(e)}function z(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var B=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],V=class{constructor(e){let t;t=e?L(e)?{path:e}:typeof e==`string`||de(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:F.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<B.length;){let e=B[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)B.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?N.basename(this.path):void 0}set basename(e){U(e,`basename`),H(e,`basename`),this.path=N.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?N.dirname(this.path):void 0}set dirname(e){W(this.basename,`dirname`),this.path=N.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?N.extname(this.path):void 0}set extname(e){if(H(e,`extname`),W(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=N.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){L(e)&&(e=R(e)),U(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?N.basename(this.path,this.extname):void 0}set stem(e){U(e,`stem`),H(e,`stem`),this.path=N.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new y(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function H(e,t){if(e&&e.includes(N.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+N.sep+"`")}function U(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function W(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function de(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var G=e(r(),1),fe=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),pe={}.hasOwnProperty,me=new class e extends fe{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=j()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,G.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(J(`data`,this.frozen),this.namespace[e]=t,this):pe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(J(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Z(e),n=this.parser||this.Parser;return K(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),K(`process`,this.parser||this.Parser),q(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Z(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);ge(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,r;return this.freeze(),K(`processSync`,this.parser||this.Parser),q(`processSync`,this.compiler||this.Compiler),this.process(e,i),X(`processSync`,`process`,t),r;function i(e,i){t=!0,n(e),r=i}}run(e,t,n){Y(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Z(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let r=!1,i;return this.run(e,t,a),X(`runSync`,`run`,r),i;function a(e,t){n(e),i=t,r=!0}}stringify(e,t){this.freeze();let n=Z(t),r=this.compiler||this.Compiler;return q(`stringify`,r),Y(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(J(`use`,this.frozen),e!=null)if(typeof e==`function`)c(e,t);else if(typeof e==`object`)Array.isArray(e)?s(e):o(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function a(e){if(typeof e==`function`)c(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;c(t,n)}else o(e);else throw TypeError("Expected usable value, not `"+e+"`")}function o(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(r.settings=(0,G.default)(!0,r.settings,e.settings))}function s(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];a(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function c(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(a===-1)n.push([e,...t]);else if(t.length>0){let[r,...o]=t,s=n[a][1];i(s)&&i(r)&&(r=(0,G.default)(!0,s,r)),n[a]=[e,r,...o]}}}}().freeze();function K(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function q(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function J(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Y(e){if(!i(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function X(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Z(e){return he(e)?e:new V(e)}function he(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function ge(e){return typeof e==`string`||_e(e)}function _e(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Q={}.hasOwnProperty;function ve(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Q.call(t,e)){let n=String(t[e]);i=Q.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function ye(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=$(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=$(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function $(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
1
+ import{a as e,t}from"./rolldown-runtime-BFRubm34.js";import{c as n,s as r}from"./vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js";import{c as i,d as a}from"./vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js";function o(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function s(e){return e.join(` `).trim()}var c=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(a());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),l=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),u=t(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(c()),r=l();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),d=p(`end`),f=p(`start`);function p(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function m(e){let t=f(e),n=d(e);if(t&&n)return{start:t,end:n}}function h(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?_(e.position):`start`in e||`end`in e?_(e):`line`in e||`column`in e?g(e):``}function g(e){return v(e&&e.line)+`:`+v(e&&e.column)}function _(e){return g(e&&e.start)+`-`+g(e&&e.end)}function v(e){return e&&typeof e==`number`?e:1}var y=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=h(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};y.prototype.file=``,y.prototype.name=``,y.prototype.reason=``,y.prototype.message=``,y.prototype.stack=``,y.prototype.column=void 0,y.prototype.line=void 0,y.prototype.ancestors=void 0,y.prototype.cause=void 0,y.prototype.fatal=void 0,y.prototype.place=void 0,y.prototype.ruleId=void 0,y.prototype.source=void 0;var b=9,x=32;function ee(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(S(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(S(t.slice(i),i>0,!1)),a.join(``)}function S(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===b||t===x;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===b||t===x;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}var C=(function(e){if(e==null)return T;if(typeof e==`function`)return w(e);if(typeof e==`object`)return Array.isArray(e)?te(e):ne(e);if(typeof e==`string`)return re(e);throw Error(`Expected function, string, or object as test`)});function te(e){let t=[],n=-1;for(;++n<e.length;)t[n]=C(e[n]);return w(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ne(e){let t=e;return w(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function re(e){return w(t);function t(t){return t&&t.type===e}}function w(e){return t;function t(t,n,r){return!!(E(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function T(){return!0}function E(e){return typeof e==`object`&&!!e&&`type`in e}function ie(e){return e}var D=[];function O(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=C(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+ie(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=D,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=k(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function k(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?D:[e]}function A(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),O(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}function j(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?M(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function M(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var N={basename:ae,dirname:oe,extname:se,join:ce,sep:`/`};function ae(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);P(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function oe(e){if(P(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function se(e){P(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function ce(...e){let t=-1,n;for(;++t<e.length;)P(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:le(n)}function le(e){P(e);let t=e.codePointAt(0)===47,n=ue(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ue(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function P(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var F={cwd:I};function I(){return`/`}function L(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function R(e){if(typeof e==`string`)e=new URL(e);else if(!L(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return z(e)}function z(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var B=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],V=class{constructor(e){let t;t=e?L(e)?{path:e}:typeof e==`string`||de(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:F.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<B.length;){let e=B[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)B.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?N.basename(this.path):void 0}set basename(e){U(e,`basename`),H(e,`basename`),this.path=N.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?N.dirname(this.path):void 0}set dirname(e){W(this.basename,`dirname`),this.path=N.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?N.extname(this.path):void 0}set extname(e){if(H(e,`extname`),W(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=N.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){L(e)&&(e=R(e)),U(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?N.basename(this.path,this.extname):void 0}set stem(e){U(e,`stem`),H(e,`stem`),this.path=N.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new y(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function H(e,t){if(e&&e.includes(N.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+N.sep+"`")}function U(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function W(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function de(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var G=e(r(),1),fe=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),pe={}.hasOwnProperty,me=new class e extends fe{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=j()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,G.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(J(`data`,this.frozen),this.namespace[e]=t,this):pe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(J(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Z(e),n=this.parser||this.Parser;return K(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),K(`process`,this.parser||this.Parser),q(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Z(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);ge(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,r;return this.freeze(),K(`processSync`,this.parser||this.Parser),q(`processSync`,this.compiler||this.Compiler),this.process(e,i),X(`processSync`,`process`,t),r;function i(e,i){t=!0,n(e),r=i}}run(e,t,n){Y(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Z(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let r=!1,i;return this.run(e,t,a),X(`runSync`,`run`,r),i;function a(e,t){n(e),i=t,r=!0}}stringify(e,t){this.freeze();let n=Z(t),r=this.compiler||this.Compiler;return q(`stringify`,r),Y(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(J(`use`,this.frozen),e!=null)if(typeof e==`function`)c(e,t);else if(typeof e==`object`)Array.isArray(e)?s(e):o(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function a(e){if(typeof e==`function`)c(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;c(t,n)}else o(e);else throw TypeError("Expected usable value, not `"+e+"`")}function o(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(r.settings=(0,G.default)(!0,r.settings,e.settings))}function s(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];a(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function c(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(a===-1)n.push([e,...t]);else if(t.length>0){let[r,...o]=t,s=n[a][1];i(s)&&i(r)&&(r=(0,G.default)(!0,s,r)),n[a]=[e,r,...o]}}}}().freeze();function K(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function q(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function J(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Y(e){if(!i(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function X(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Z(e){return he(e)?e:new V(e)}function he(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function ge(e){return typeof e==`string`||_e(e)}function _e(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Q={}.hasOwnProperty;function ve(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Q.call(t,e)){let n=String(t[e]);i=Q.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function ye(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=$(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=$(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function $(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
2
2
  `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var be={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};export{s as _,V as a,C as c,h as d,d as f,o as g,u as h,me as i,ee as l,m,ye as n,A as o,f as p,ve as r,O as s,be as t,y as u};