decocms 4.335.4 → 4.335.5

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 (257) hide show
  1. package/dist/client/assets/{AlertCircle-BawGC1kp.js → AlertCircle-DkXErK78.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DpgNjYbJ.js → AreaChart-C8rXR_Do.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DAHOvtJW.js → ArrowLeft-nyFzJAF7.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-BYkw_uv9.js → ArrowUp-BsH1JQDE.js} +1 -1
  5. package/dist/client/assets/{Check-D50Qz8pd.js → Check-DhPzBUin.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-DYo4yeC6.js → CheckCircle-DbWErBsi.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-B366HM4z.js → ChevronRight-Cgzp06X7.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-hDysfF54.js → ChevronSelectorVertical-4msYrwrQ.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DiPLvM5v.js → ChevronUp-BHEDGf01.js} +1 -1
  10. package/dist/client/assets/{Copy01-wjgNpbHM.js → Copy01-B2wknoSd.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-BARv2b55.js → CreditCard01-BqFQTNVJ.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-C5ZAJeIV.js → DotsVertical-CJKQ5OKe.js} +1 -1
  13. package/dist/client/assets/{Download01-Cp8tCYEj.js → Download01-B92LLlkv.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-DMR3NBxM.js → ErrorBarContext-Ceqv17JV.js} +1 -1
  15. package/dist/client/assets/{Eye-04eGXQWm.js → Eye-COEW3kab.js} +1 -1
  16. package/dist/client/assets/{GitBranch01-BkBspkIH.js → GitBranch01-BYv7lYbJ.js} +1 -1
  17. package/dist/client/assets/{Globe01-B3WKrszB.js → Globe01-CpHtL3_S.js} +1 -1
  18. package/dist/client/assets/{HardDrive-B1lGKQQL.js → HardDrive-s6aHvTkZ.js} +1 -1
  19. package/dist/client/assets/{Image01-DuMpyolM.js → Image01-DzmzghUe.js} +1 -1
  20. package/dist/client/assets/{Key01-DBgMeUTs.js → Key01-BE_KAWE-.js} +1 -1
  21. package/dist/client/assets/{Link01-Dn9-GB6A.js → Link01-Bu-GiSBD.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-B5R9GWYR.js → LinkExternal01-B1ZpJJPQ.js} +1 -1
  23. package/dist/client/assets/{Monitor01-B82ksyKe.js → Monitor01-B5pQXW2m.js} +1 -1
  24. package/dist/client/assets/{Package-Dne4I7eU.js → Package-CVhm08ke.js} +1 -1
  25. package/dist/client/assets/{Palette-C4PW0nnS.js → Palette-BcF_s5q5.js} +1 -1
  26. package/dist/client/assets/{Play-CaESL_5l.js → Play-BtxbJVzC.js} +1 -1
  27. package/dist/client/assets/{Plus-6QlnmG7X.js → Plus-CsKngGuQ.js} +1 -1
  28. package/dist/client/assets/{SearchMd-ryPT7rxv.js → SearchMd-W7yXXDTJ.js} +1 -1
  29. package/dist/client/assets/{Sector-CZCIYKSf.js → Sector-Cw15cdya.js} +1 -1
  30. package/dist/client/assets/{Settings02-4GByZEin.js → Settings02-C-aI-tWH.js} +1 -1
  31. package/dist/client/assets/{Share07-BKp8_1LW.js → Share07-BAIRkREV.js} +1 -1
  32. package/dist/client/assets/{Shield01-CoHqiHHO.js → Shield01-C4vXcSMh.js} +1 -1
  33. package/dist/client/assets/{Stars01-CV8WfUpL.js → Stars01-0Qvp46bC.js} +1 -1
  34. package/dist/client/assets/{Sun-D9qQ8V1c.js → Sun-BiuHyV4K.js} +1 -1
  35. package/dist/client/assets/{Tool01-CepDUjO3.js → Tool01-Lpy5rhsr.js} +1 -1
  36. package/dist/client/assets/{Tool02-DdG_5-W8.js → Tool02-g0s22FxS.js} +1 -1
  37. package/dist/client/assets/{Trash01-C6Ou_hlQ.js → Trash01-D7ZPlmCM.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-DrNdYLD4.js → TrendUp01-DuwufgFk.js} +1 -1
  39. package/dist/client/assets/{Upload01-DkBOH9fh.js → Upload01-BG4c8c9K.js} +1 -1
  40. package/dist/client/assets/{User01-C-2ChFyL.js → User01-DS4N984M.js} +1 -1
  41. package/dist/client/assets/{UserSquare-DrToBYR4.js → UserSquare-Dwn5UlhY.js} +1 -1
  42. package/dist/client/assets/{Users01-CRoUmw6V.js → Users01-D6PoAtch.js} +1 -1
  43. package/dist/client/assets/{Users03-DN1IDxHZ.js → Users03-Dmh-Hpx0.js} +1 -1
  44. package/dist/client/assets/{XCircle-CBWbsT40.js → XCircle-C-_3rX1F.js} +1 -1
  45. package/dist/client/assets/{XClose-A4VFkjrc.js → XClose-wQ6j1uwj.js} +1 -1
  46. package/dist/client/assets/{Zap-DP8syq_X.js → Zap-CX8wcGAM.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-DTYLnleU.js → ZoomOut-BDRyaej7.js} +1 -1
  48. package/dist/client/assets/{access-gate-ta9zuKWv.js → access-gate-_Vfpq2gY.js} +1 -1
  49. package/dist/client/assets/{agent-icon-BRoPbkxd.js → agent-icon-CLvBDlBI.js} +1 -1
  50. package/dist/client/assets/{agents-list-C0r18LDs.js → agents-list-uJI4xQB3.js} +1 -1
  51. package/dist/client/assets/{ai-providers-j1NPv67A.js → ai-providers-BJ6E9ewb.js} +1 -1
  52. package/dist/client/assets/{alert-Cx4zhMzx.js → alert-8fh2nE-F.js} +1 -1
  53. package/dist/client/assets/{alert-dialog-DQkitV36.js → alert-dialog-DCuxpr9z.js} +1 -1
  54. package/dist/client/assets/{analytics-tab-CSiIjm1o.js → analytics-tab-9Otlp_6n.js} +1 -1
  55. package/dist/client/assets/api-keys-C-mBCgMY.js +1 -0
  56. package/dist/client/assets/{api-keys-Y6hdDGVF.js → api-keys-CQCP6k9I.js} +1 -1
  57. package/dist/client/assets/app-editor-DaesYL_L.js +1 -0
  58. package/dist/client/assets/{auth-BonfJbpi.js → auth-BEBPh5eQ.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-BO4gTv7Q.js → auth-catchall-D5HTWfy1.js} +1 -1
  60. package/dist/client/assets/{auth-entry-CRPmcnXA.js → auth-entry-jzIKNpot.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-DkuNxQTt.js → auth-split-layout-_26EcRfh.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-BXIxJO7G.js → authenticate-and-persist-oauth-CawOOdZR.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-CmtWVLX6.js → automation-list-row-BzTbowTj.js} +1 -1
  64. package/dist/client/assets/{automation-runs-CFfbViJw.js → automation-runs-D20mZNyW.js} +1 -1
  65. package/dist/client/assets/{automations-BH9v-Bo7.js → automations-DvF_1xiP.js} +1 -1
  66. package/dist/client/assets/{autosend-DQusdBG_.js → autosend-DVckbPpo.js} +1 -1
  67. package/dist/client/assets/{avatar-BUe1abT6.js → avatar-B8mdJCa-.js} +1 -1
  68. package/dist/client/assets/{badge-BjiEQuif.js → badge-DtjY8TtR.js} +1 -1
  69. package/dist/client/assets/{block-document-Cj4OnoOw.js → block-document-g-lLT_T2.js} +1 -1
  70. package/dist/client/assets/{breadcrumb-CxF2wYfL.js → breadcrumb-CJ_vjC7z.js} +1 -1
  71. package/dist/client/assets/{buckets-Z4Pi6QIs.js → buckets-D2cDuuTg.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-BZRf9CUh.js → bulk-category-panel-DQ_-gX4G.js} +1 -1
  73. package/dist/client/assets/{capability-load-error-BcT3mAZI.js → capability-load-error-B6H4F98O.js} +1 -1
  74. package/dist/client/assets/{cards-DW1vhrc1.js → cards-DhOPI6sE.js} +1 -1
  75. package/dist/client/assets/{category-editor-DE4Xjik0.js → category-editor-DZAmeto9.js} +1 -1
  76. package/dist/client/assets/{cdn-tab-D4G5-rGw.js → cdn-tab-DIOi-X7j.js} +1 -1
  77. package/dist/client/assets/{chart-Bd4b_fVC.js → chart-BHNtxmZ5.js} +1 -1
  78. package/dist/client/assets/{chat-context-b0GmCrhs.js → chat-context-DEDhjfBk.js} +1 -1
  79. package/dist/client/assets/{checkbox-Bhj4AUZs.js → checkbox-Be7jzOoS.js} +1 -1
  80. package/dist/client/assets/{choose-editor-DcKlxPyH.js → choose-editor-zQOdE8Ej.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-mUIAj9X0.js → cli-auth-success-BcdOQIta.js} +1 -1
  82. package/dist/client/assets/{client-icons-DCR8EFIh.js → client-icons-D-00vmrI.js} +1 -1
  83. package/dist/client/assets/{collection-detail-DAGScCtV.js → collection-detail-CkhC6mv-.js} +1 -1
  84. package/dist/client/assets/{collection-display-button-NvPvsKPR.js → collection-display-button-Bys_SBuK.js} +1 -1
  85. package/dist/client/assets/{collection-search-BCsXpSHE.js → collection-search-BZvxdZ2z.js} +1 -1
  86. package/dist/client/assets/{collection-table-wrapper-CcjzxNLW.js → collection-table-wrapper-9R-Qm9Z1.js} +1 -1
  87. package/dist/client/assets/{collection-tabs-CquGY0e9.js → collection-tabs-B3_daFGe.js} +1 -1
  88. package/dist/client/assets/{command-_eMlwt6K.js → command-BYsoEu13.js} +1 -1
  89. package/dist/client/assets/{commerce-onboarding-DvIkWZy6.js → commerce-onboarding-uwX2SpER.js} +1 -1
  90. package/dist/client/assets/{connect-BhFzvomI.js → connect-BfufI0uK.js} +1 -1
  91. package/dist/client/assets/{connect-layout-BziJud9I.js → connect-layout-X-hnfLrm.js} +1 -1
  92. package/dist/client/assets/{connection-Dhn66lIi.js → connection-CHgRA4wn.js} +1 -1
  93. package/dist/client/assets/{connection-card-C9cMC74v.js → connection-card--LN_jYcC.js} +1 -1
  94. package/dist/client/assets/{connection-detail-C_d_GO5N.js → connection-detail-BN_4XbCJ.js} +1 -1
  95. package/dist/client/assets/{connection-form-helpers-BCJYrFWh.js → connection-form-helpers--H0qnET4.js} +1 -1
  96. package/dist/client/assets/{connections-CKAPcyfx.js → connections-D2VogeP2.js} +1 -1
  97. package/dist/client/assets/{create-organization-dialog-4cBtmtGy.js → create-organization-dialog-CSkXKpbv.js} +1 -1
  98. package/dist/client/assets/{decopilot-sse-pool-B-fcCk-K.js → decopilot-sse-pool-CPDW4Qwb.js} +1 -1
  99. package/dist/client/assets/{dialog-CqKyQDlv.js → dialog-U2qFdhAX.js} +1 -1
  100. package/dist/client/assets/differenceInSeconds-C3x8sHUj.js +1 -0
  101. package/dist/client/assets/{domain-settings-rsmsli5t.js → domain-settings-DwgCvEBh.js} +1 -1
  102. package/dist/client/assets/{drawer-BnFsDyq0.js → drawer-CsIZzUcP.js} +1 -1
  103. package/dist/client/assets/{dropdown-menu-C2mZs1a5.js → dropdown-menu-D_Miiz9f.js} +1 -1
  104. package/dist/client/assets/{e2e-tab-CmVSnkMr.js → e2e-tab-B7qw7BdB.js} +1 -1
  105. package/dist/client/assets/{editor-Cin_5tu-.js → editor-DNe4bLdj.js} +1 -1
  106. package/dist/client/assets/{empty-state-CVOgJpTh.js → empty-state-Xpm1QK7i.js} +1 -1
  107. package/dist/client/assets/{empty-state-BfG2Bmb1.js → empty-state-bjpeaW-Z.js} +1 -1
  108. package/dist/client/assets/{extract-connection-data-CQY-ygil.js → extract-connection-data-BLCrhV7i.js} +1 -1
  109. package/dist/client/assets/{file-explorer-C39GwJYn.js → file-explorer-Dxgn4j_H.js} +1 -1
  110. package/dist/client/assets/{file-type-icon-DLS5OPI-.js → file-type-icon-CyHtRlEV.js} +1 -1
  111. package/dist/client/assets/{folder-icon-KLloGijH.js → folder-icon-DEEGyAQl.js} +1 -1
  112. package/dist/client/assets/{form-BT0_lKIF.js → form-8hUmXBGb.js} +1 -1
  113. package/dist/client/assets/{format-time-BnbuEtat.js → format-time-BtXRrtv4.js} +1 -1
  114. package/dist/client/assets/{general-Cw2aImbX.js → general-C1znYUI0.js} +1 -1
  115. package/dist/client/assets/{github-icon-DT8soM3-.js → github-icon-Cjn4Ny1J.js} +1 -1
  116. package/dist/client/assets/{github-repo-picker-B2eN4ZfY.js → github-repo-picker-Z1yfkJA2.js} +1 -1
  117. package/dist/client/assets/{hooks-Dq2_eaLg.js → hooks-CypM9t3s.js} +1 -1
  118. package/dist/client/assets/{hosting-tab-B9rrIEHx.js → hosting-tab-kius9-Gy.js} +1 -1
  119. package/dist/client/assets/{index-BdpKgdHi.js → index-BEywsCAt.js} +1 -1
  120. package/dist/client/assets/{index-weBGyocH.js → index-BYFW0DhO.js} +2 -2
  121. package/dist/client/assets/{index-32TCcut-.js → index-BoXYmQW_.js} +1 -1
  122. package/dist/client/assets/{index-Bvn7iwD5.js → index-C8dM3vjB.js} +1 -1
  123. package/dist/client/assets/{index-Cd2okj64.js → index-CFfAxyoZ.js} +1 -1
  124. package/dist/client/assets/{index-Cru7mZmr.js → index-CLP5ehJj.js} +1 -1
  125. package/dist/client/assets/{index-CLfdz-Nf.js → index-CTPaXMYq.js} +1 -1
  126. package/dist/client/assets/index-CUOGPjNf.js +823 -0
  127. package/dist/client/assets/{index-DGwcFVmZ.js → index-DFjj2z0x.js} +1 -1
  128. package/dist/client/assets/{index-CN5UL2xs.js → index-d0MmeExy.js} +1 -1
  129. package/dist/client/assets/{index-redirect-DyiKnyn8.js → index-redirect-BzZikeln.js} +1 -1
  130. package/dist/client/assets/{infra-billing-DqVf4yB0.js → infra-billing-Ba9WSVbM.js} +1 -1
  131. package/dist/client/assets/{input-CFnTtw2k.js → input-C2C9h9WJ.js} +1 -1
  132. package/dist/client/assets/{integration-icon-DRrrpuyS.js → integration-icon-BKkvkxjs.js} +1 -1
  133. package/dist/client/assets/{invite-member-dialog-B_nbbtBp.js → invite-member-dialog-DU4Y1udC.js} +1 -1
  134. package/dist/client/assets/{label-MlXrew-u.js → label-ChpEwj_L.js} +1 -1
  135. package/dist/client/assets/{layout-C_lx84HD.js → layout-BmFRY6YO.js} +1 -1
  136. package/dist/client/assets/{login-CqEdAL0i.js → login-CEq9YHAK.js} +1 -1
  137. package/dist/client/assets/{markdown-A8j5Qvc3.js → markdown-BDX_1DK9.js} +1 -1
  138. package/dist/client/assets/{mcp-app-renderer-Da9POrmv.js → mcp-app-renderer-Cj0SSXRd.js} +1 -1
  139. package/dist/client/assets/{mcp-oauth-_QOCWffw.js → mcp-oauth-C7fK1Egn.js} +1 -1
  140. package/dist/client/assets/{members--WPsqdt3.js → members-BIQIwfvI.js} +1 -1
  141. package/dist/client/assets/{monaco-editor-CKT0_nEP.js → monaco-editor-COGgBpMd.js} +1 -1
  142. package/dist/client/assets/{monitoring-stats-row-tPH6uGRR.js → monitoring-stats-row-D_1E_gzz.js} +1 -1
  143. package/dist/client/assets/{multi-select-B-S-Xb9-.js → multi-select-z570vxLS.js} +1 -1
  144. package/dist/client/assets/{oauth-callback-B6VALoxf.js → oauth-callback-DCOxtIHb.js} +1 -1
  145. package/dist/client/assets/{oauth-callback-ai-provider-0flaQQ7e.js → oauth-callback-ai-provider-CjpGeCHk.js} +1 -1
  146. package/dist/client/assets/{onboarding-x2RTFfmW.js → onboarding-k3m1QoNC.js} +1 -1
  147. package/dist/client/assets/{org-layout-NCxshhcB.js → org-layout-E8Zv_sdI.js} +1 -1
  148. package/dist/client/assets/{organization-choice-ltEF0-KQ.js → organization-choice-Ta0_QMfC.js} +1 -1
  149. package/dist/client/assets/{orgs-DmoPeZFE.js → orgs-zQDkYYY4.js} +1 -1
  150. package/dist/client/assets/{page-seo-form-C3Aunaar.js → page-seo-form-CKPuyl-E.js} +1 -1
  151. package/dist/client/assets/{popover-dodrM04j.js → popover-CmOKcG2M.js} +1 -1
  152. package/dist/client/assets/{post-calendar-bmfTmaL6.js → post-calendar-VErAmHAl.js} +1 -1
  153. package/dist/client/assets/{post-editor-SpHrxC7t.js → post-editor-DHf2sKhc.js} +1 -1
  154. package/dist/client/assets/{primitives-DPvJzv1K.js → primitives-ja9G6O8P.js} +1 -1
  155. package/dist/client/assets/{profile-CSZS-QNP.js → profile-lk8DFEh3.js} +1 -1
  156. package/dist/client/assets/{project-app-view-1sp0oB0K.js → project-app-view-B8HifYoQ.js} +1 -1
  157. package/dist/client/assets/{project-icon-F4BdYNaJ.js → project-icon-BwZ8B5Nt.js} +1 -1
  158. package/dist/client/assets/{prompts-Bs4ozupN.js → prompts-DFqtxdoB.js} +1 -1
  159. package/dist/client/assets/pt-BR-z8aNQunR.js +1 -0
  160. package/dist/client/assets/record-editor-XgONmsuo.js +1 -0
  161. package/dist/client/assets/redirect-editor-Df7pHfkk.js +1 -0
  162. package/dist/client/assets/registry--Eiz0SYA.js +2 -0
  163. package/dist/client/assets/{registry-layout-B2U7_fFB.js → registry-layout-6xiCaqpj.js} +1 -1
  164. package/dist/client/assets/{reports-zZPN7lBN.js → reports-Bv1Tw2QT.js} +1 -1
  165. package/dist/client/assets/{require-capability-B48NtYdb.js → require-capability-BFQmtnxP.js} +1 -1
  166. package/dist/client/assets/{required-auth-layout-DxMLFYG_.js → required-auth-layout-BlZwF6cH.js} +1 -1
  167. package/dist/client/assets/{reset-password-WaCZpZil.js → reset-password-DrzhSJWg.js} +1 -1
  168. package/dist/client/assets/{review-settings-53EpRpGO.js → review-settings-3kGqSvY5.js} +1 -1
  169. package/dist/client/assets/{roles-BJ1OpBCB.js → roles-Br7dsm1F.js} +1 -1
  170. package/dist/client/assets/{schema-CMNTDy4A.js → schema-UMHi6Dfe.js} +1 -1
  171. package/dist/client/assets/{scroll-area-C_cHkZF7.js → scroll-area-shLIOrXE.js} +1 -1
  172. package/dist/client/assets/{search-input-J6NuIFHz.js → search-input-DTZZQgYe.js} +1 -1
  173. package/dist/client/assets/{secrets-c7Jrvv5H.js → secrets-6Y-p69m4.js} +1 -1
  174. package/dist/client/assets/{sections-editor-BCTdCZec.js → sections-editor-BMl5PAY7.js} +1 -1
  175. package/dist/client/assets/{select-vFCmbR33.js → select-DtIUmOWr.js} +1 -1
  176. package/dist/client/assets/{select-model-Dj7N0cyA.js → select-model-DXeyWR4L.js} +1 -1
  177. package/dist/client/assets/{self-tool-result-CeMjOtPq.js → self-tool-result-D5oDSMGv.js} +1 -1
  178. package/dist/client/assets/{seo-editor-C_NbHFip.js → seo-editor-uek53oSS.js} +1 -1
  179. package/dist/client/assets/settings-layout-COwYZpQX.js +1 -0
  180. package/dist/client/assets/settings-sidebar-tiZ-qpIN.js +1 -0
  181. package/dist/client/assets/{shell-controls-BmYdBLDp.js → shell-controls-Bju_X5xx.js} +1 -1
  182. package/dist/client/assets/{shell-layout-CRQj4_aW.js → shell-layout-DcJ2OL9P.js} +1 -1
  183. package/dist/client/assets/{skill-preview-BYjF0_Nr.js → skill-preview-CWU61utM.js} +1 -1
  184. package/dist/client/assets/{skills-J3_FU-Fk.js → skills-BbqmEZC_.js} +1 -1
  185. package/dist/client/assets/{sso-BNKikXI1.js → sso-Dmu8oInz.js} +1 -1
  186. package/dist/client/assets/{store-5cPEEs-4.js → store-B3gDaZAM.js} +1 -1
  187. package/dist/client/assets/store-registry-BkdPJ-P1.js +2 -0
  188. package/dist/client/assets/{switch-T5LrSBrw.js → switch--5EfNQI5.js} +1 -1
  189. package/dist/client/assets/{synced-repos-BfOZXh6-.js → synced-repos-CukpYenC.js} +1 -1
  190. package/dist/client/assets/{table-CHKwG1gN.js → table-DyTYCFjs.js} +1 -1
  191. package/dist/client/assets/{tabs-CdOMDht3.js → tabs-C40AAyFe.js} +1 -1
  192. package/dist/client/assets/{task-board-CQ-3ZPwA.js → task-board-DOll2CPC.js} +1 -1
  193. package/dist/client/assets/{task-route-D37LOthe.js → task-route-DOwSG1cM.js} +1 -1
  194. package/dist/client/assets/{tasks-0aJV4DxN.js → tasks--1FIMuSH.js} +1 -1
  195. package/dist/client/assets/{textarea-DPeZ6xxO.js → textarea-BqKXwvHp.js} +1 -1
  196. package/dist/client/assets/{thread-intent-CcWHzfkw.js → thread-intent-BGpE5f0m.js} +1 -1
  197. package/dist/client/assets/{thread-route-B8U1rz53.js → thread-route-Dnvi0Gyz.js} +1 -1
  198. package/dist/client/assets/{toggle-group-C2G8ll2X.js → toggle-group-Bg9UxZnH.js} +1 -1
  199. package/dist/client/assets/{toolbar-DvObSBys.js → toolbar-Dov4ap4F.js} +1 -1
  200. package/dist/client/assets/{toolbar-icon-button-lmaFup2h.js → toolbar-icon-button-DNTK2U9T.js} +1 -1
  201. package/dist/client/assets/{track-CimVJAlT.js → track-DSv-HBp2.js} +1 -1
  202. package/dist/client/assets/{types-DdSDF2P_.js → types-QSIn08FY.js} +1 -1
  203. package/dist/client/assets/{use-ai-providers-BIIefz3U.js → use-ai-providers-TPGH2tOh.js} +1 -1
  204. package/dist/client/assets/{use-automations-CVjhC86A.js → use-automations-Cht-yWCv.js} +1 -1
  205. package/dist/client/assets/{use-autosave-B-pvSoqg.js → use-autosave-B90W2GZU.js} +1 -1
  206. package/dist/client/assets/{use-connection-C0PxJ5SV.js → use-connection-CTdE4vps.js} +1 -1
  207. package/dist/client/assets/{use-copy-c3VKc4aO.js → use-copy-rWugYGnz.js} +1 -1
  208. package/dist/client/assets/{use-create-virtual-mcp-Bkb-dPNa.js → use-create-virtual-mcp-DA3Yl-aU.js} +1 -1
  209. package/dist/client/assets/{use-debounced-autosave-B7pm8_yo.js → use-debounced-autosave-B8o54x5H.js} +1 -1
  210. package/dist/client/assets/{use-debounced-value-D4xMKhQx.js → use-debounced-value--9PTnjO2.js} +1 -1
  211. package/dist/client/assets/{use-decopilot-events-Dy9qX9Gr.js → use-decopilot-events-R7r7gJde.js} +1 -1
  212. package/dist/client/assets/{use-delete-connection-CWcunwsJ.js → use-delete-connection-P0qKIKu9.js} +1 -1
  213. package/dist/client/assets/{use-deployment-admin-_kPMz7Lq.js → use-deployment-admin-BPw4zd_K.js} +1 -1
  214. package/dist/client/assets/{use-destination-route-GypAYhp8.js → use-destination-route-Yiz1Yyiq.js} +1 -1
  215. package/dist/client/assets/{use-file-configs-CAGnWxDH.js → use-file-configs-LRMUkmhG.js} +1 -1
  216. package/dist/client/assets/{use-infinite-scroll-CmJNRT41.js → use-infinite-scroll-vUX1oplI.js} +1 -1
  217. package/dist/client/assets/{use-join-requests-Ck6Ncm4p.js → use-join-requests-C8VI7j2w.js} +1 -1
  218. package/dist/client/assets/{use-mcp-auth-status-Bb8E9QEq.js → use-mcp-auth-status-3Q04dybz.js} +1 -1
  219. package/dist/client/assets/{use-mcp-client-DbyyfwFL.js → use-mcp-client-B8KExIQP.js} +1 -1
  220. package/dist/client/assets/{use-mcp-prompts-CsSNH5CL.js → use-mcp-prompts-DqFxtfai.js} +1 -1
  221. package/dist/client/assets/{use-members-Bjha068Y.js → use-members-BHp3tATO.js} +1 -1
  222. package/dist/client/assets/{use-navigate-to-agent-C0f7F1ii.js → use-navigate-to-agent-CUlgd9lK.js} +1 -1
  223. package/dist/client/assets/{use-org-auth-client-BigyyemQ.js → use-org-auth-client-CgYm4ea4.js} +1 -1
  224. package/dist/client/assets/{use-org-notice-P1qnXHWT.js → use-org-notice-C5n8woPc.js} +1 -1
  225. package/dist/client/assets/{use-org-sso-CAY5lnB6.js → use-org-sso-CeKGwleH.js} +1 -1
  226. package/dist/client/assets/{use-organization-roles-C6_B89sW.js → use-organization-roles-DF5taRAS.js} +1 -1
  227. package/dist/client/assets/{use-organization-settings-CYKZsssD.js → use-organization-settings-xhFeNBEl.js} +1 -1
  228. package/dist/client/assets/{use-panel-navigate-DhHRD0vs.js → use-panel-navigate-s8WzziEf.js} +1 -1
  229. package/dist/client/assets/{use-registry-connections-B5BQuLSP.js → use-registry-connections-QYmYiae-.js} +1 -1
  230. package/dist/client/assets/{use-secrets-CKxZifey.js → use-secrets-CiP4DqpE.js} +1 -1
  231. package/dist/client/assets/{use-section-preview-base-C_KIWBbX.js → use-section-preview-base-BJUC-5QY.js} +1 -1
  232. package/dist/client/assets/{use-status-sounds-BYP0fHF7.js → use-status-sounds-Bx6EMZ1N.js} +1 -1
  233. package/dist/client/assets/{use-tags-heuT8B5T.js → use-tags-CU0743CE.js} +1 -1
  234. package/dist/client/assets/{use-view-mode-1L7Auq80.js → use-view-mode-D9GxxTRm.js} +1 -1
  235. package/dist/client/assets/{use-virtual-mcp-Cz_si5KP.js → use-virtual-mcp-WZp5R4vZ.js} +1 -1
  236. package/dist/client/assets/useInfiniteQuery-C6i4yfVE.js +1 -0
  237. package/dist/client/assets/useSuspenseInfiniteQuery-CCla4NuB.js +1 -0
  238. package/dist/client/assets/{users-DzAipJ2h.js → users-CmUeSgSj.js} +1 -1
  239. package/dist/client/assets/{variant-calendar-OCDzsbSq.js → variant-calendar-Berln5Bi.js} +1 -1
  240. package/dist/client/assets/{view-mode-toggle-CCcVUJ4z.js → view-mode-toggle-CAwCj5Nl.js} +1 -1
  241. package/dist/client/index.html +1 -1
  242. package/dist/server/cli.js +1 -1
  243. package/dist/server/server.js +1 -1
  244. package/package.json +1 -1
  245. package/dist/client/assets/api-keys-DleEuEE3.js +0 -1
  246. package/dist/client/assets/app-editor-DX0Q8L_M.js +0 -1
  247. package/dist/client/assets/differenceInSeconds-NQ4PDo0z.js +0 -1
  248. package/dist/client/assets/index-Cte8O9kW.js +0 -823
  249. package/dist/client/assets/pt-BR-CLy76QW2.js +0 -1
  250. package/dist/client/assets/record-editor-q6xGGJdo.js +0 -1
  251. package/dist/client/assets/redirect-editor-DEiKow0E.js +0 -1
  252. package/dist/client/assets/registry-D6HHrCD_.js +0 -2
  253. package/dist/client/assets/settings-layout-C9VX-BJG.js +0 -1
  254. package/dist/client/assets/settings-sidebar-BK9LTxfw.js +0 -1
  255. package/dist/client/assets/store-registry-C4Ow0plu.js +0 -2
  256. package/dist/client/assets/useInfiniteQuery-C47LPQTE.js +0 -1
  257. package/dist/client/assets/useSuspenseInfiniteQuery-DtPmDJxo.js +0 -1
@@ -1 +1 @@
1
- import{r as x,bp as b,j as c,bm as m,bs as k,b9 as p,du as M,dv as T,br as S,dw as A,bo as F,bC as $,c as C,l as P}from"./index-weBGyocH.js";var j="Toggle",_=x.forwardRef((r,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...a}=r,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":r.disabled?"":void 0,...a,ref:e,onClick:k(r.onClick,()=>{r.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((r,e)=>{const{type:l,...s}=r;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:r.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...a,ref:e})})}),B=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:r.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...a,ref:e})})});h.displayName=v;var[O,H]=w(v),R=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:a,dir:t,loop:o=!0,...i}=r,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:a,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((r,e)=>{const l=y(f,r.__scopeToggleGroup),s=H(f,r.__scopeToggleGroup),n=I(r.__scopeToggleGroup),a=l.value.includes(r.value),t=s.disabled||r.disabled,o={...r,pressed:a,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:a,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,value:s,...n}=r,a=y(f,l),t={role:"radio","aria-checked":r.pressed,"aria-pressed":void 0},o=a.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?a.onItemActivate(s):a.onItemDeactivate(s)}})}),L=h,U=N;const q=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),E=x.createContext({size:"default",variant:"default"});function K(r){const e=C.c(20);let l,s,n,a,t;e[0]!==r?({className:s,variant:t,size:a,children:l,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);let o;e[6]!==s?(o=P("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==a||e[9]!==t?(i={variant:t,size:a},e[8]=a,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(E.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==a||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(L,{"data-slot":"toggle-group","data-variant":t,"data-size":a,className:o,...n,children:d}),e[14]=n,e[15]=a,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function Q(r){const e=C.c(18);let l,s,n,a,t;e[0]!==r?({className:s,children:l,variant:t,size:a,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);const o=x.useContext(E),i=o.variant||t,d=o.size||a;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==a||e[10]!==t?(u=P(q({variant:o.variant||t,size:o.size||a}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=a,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(U,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{K as T,Q as a};
1
+ import{r as x,bp as b,j as c,bm as m,bs as k,b9 as p,du as M,dv as T,br as S,dw as A,bo as F,bC as $,c as C,l as P}from"./index-BYFW0DhO.js";var j="Toggle",_=x.forwardRef((r,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...a}=r,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":r.disabled?"":void 0,...a,ref:e,onClick:k(r.onClick,()=>{r.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((r,e)=>{const{type:l,...s}=r;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:r.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...a,ref:e})})}),B=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:r.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...a,ref:e})})});h.displayName=v;var[O,H]=w(v),R=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:a,dir:t,loop:o=!0,...i}=r,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:a,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((r,e)=>{const l=y(f,r.__scopeToggleGroup),s=H(f,r.__scopeToggleGroup),n=I(r.__scopeToggleGroup),a=l.value.includes(r.value),t=s.disabled||r.disabled,o={...r,pressed:a,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:a,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,value:s,...n}=r,a=y(f,l),t={role:"radio","aria-checked":r.pressed,"aria-pressed":void 0},o=a.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?a.onItemActivate(s):a.onItemDeactivate(s)}})}),L=h,U=N;const q=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),E=x.createContext({size:"default",variant:"default"});function K(r){const e=C.c(20);let l,s,n,a,t;e[0]!==r?({className:s,variant:t,size:a,children:l,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);let o;e[6]!==s?(o=P("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==a||e[9]!==t?(i={variant:t,size:a},e[8]=a,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(E.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==a||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(L,{"data-slot":"toggle-group","data-variant":t,"data-size":a,className:o,...n,children:d}),e[14]=n,e[15]=a,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function Q(r){const e=C.c(18);let l,s,n,a,t;e[0]!==r?({className:s,children:l,variant:t,size:a,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);const o=x.useContext(E),i=o.variant||t,d=o.size||a;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==a||e[10]!==t?(u=P(q({variant:o.variant||t,size:o.size||a}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=a,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(U,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{K as T,Q as a};
@@ -1 +1 @@
1
- import{c as r,r as f,j as c,l as T,aB as g}from"./index-weBGyocH.js";const h=f.createContext(null);function m(){const l=f.use(h);if(!l)throw new Error("Toolbar.* must be used inside <Toolbar>");return l}function E(l){const e=r.c(8),{children:t}=l,[s,n]=f.useState(null),[o,a]=f.useState(null),[x,j]=f.useState(null),[b,p]=f.useState(null);let u;e[0]!==x||e[1]!==b||e[2]!==o||e[3]!==s?(u={togglesEl:s,setTogglesEl:n,tabsEl:o,setTabsEl:a,centerEl:x,setCenterEl:j,rightEl:b,setRightEl:p},e[0]=x,e[1]=b,e[2]=o,e[3]=s,e[4]=u):u=e[4];let d;return e[5]!==t||e[6]!==u?(d=c.jsx(h,{value:u,children:t}),e[5]=t,e[6]=u,e[7]=d):d=e[7],d}function i(l){const e=r.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx(E,{children:c.jsx("div",{className:"flex flex-col h-full min-h-0",children:t})}),e[0]=t,e[1]=s):s=e[1],s}function C(l){const e=r.c(10);let t,s,n;e[0]!==l?({children:t,className:s,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let o;e[4]!==s?(o=T("relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",s),e[4]=s,e[5]=o):o=e[5];let a;return e[6]!==t||e[7]!==n||e[8]!==o?(a=c.jsx("div",{className:o,...n,children:t}),e[6]=t,e[7]=n,e[8]=o,e[9]=a):a=e[9],a}function v(l){const e=r.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:t}),e[0]=t,e[1]=s):s=e[1],s}function S(l){const e=r.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:t}),e[0]=t,e[1]=s):s=e[1],s}function N(){const l=r.c(2),{setCenterEl:e}=m();let t;return l[0]!==e?(t=c.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),l[0]=e,l[1]=t):t=l[1],t}function $(l){const e=r.c(3),{children:t}=l,{centerEl:s}=m();if(!s)return null;let n;return e[0]!==s||e[1]!==t?(n=g.createPortal(t,s),e[0]=s,e[1]=t,e[2]=n):n=e[2],n}function R(l){const e=r.c(5),{className:t}=l,{setTabsEl:s}=m();let n;e[0]!==t?(n=T("shrink-0 flex items-center",t),e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==s||e[3]!==n?(o=c.jsx("div",{ref:s,className:n}),e[2]=s,e[3]=n,e[4]=o):o=e[4],o}function w(l){const e=r.c(3),{children:t}=l,{tabsEl:s}=m();if(!s)return null;let n;return e[0]!==t||e[1]!==s?(n=g.createPortal(t,s),e[0]=t,e[1]=s,e[2]=n):n=e[2],n}function y(l){const e=r.c(5),{className:t}=l,{setTogglesEl:s}=m();let n;e[0]!==t?(n=T("contents",t),e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==s||e[3]!==n?(o=c.jsx("div",{ref:s,className:n}),e[2]=s,e[3]=n,e[4]=o):o=e[4],o}function P(){const l=r.c(2),{setRightEl:e}=m();let t;return l[0]!==e?(t=c.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),l[0]=e,l[1]=t):t=l[1],t}i.Provider=E;i.Header=C;i.LeftColumn=v;i.RightColumn=S;i.CenterSlot=N;i.Center=$;i.TabsSlot=R;i.Tabs=w;i.TogglesSlot=y;i.RightSlot=P;export{i as T};
1
+ import{c as r,r as f,j as c,l as T,aB as g}from"./index-BYFW0DhO.js";const h=f.createContext(null);function m(){const l=f.use(h);if(!l)throw new Error("Toolbar.* must be used inside <Toolbar>");return l}function E(l){const e=r.c(8),{children:t}=l,[s,n]=f.useState(null),[o,a]=f.useState(null),[x,j]=f.useState(null),[b,p]=f.useState(null);let u;e[0]!==x||e[1]!==b||e[2]!==o||e[3]!==s?(u={togglesEl:s,setTogglesEl:n,tabsEl:o,setTabsEl:a,centerEl:x,setCenterEl:j,rightEl:b,setRightEl:p},e[0]=x,e[1]=b,e[2]=o,e[3]=s,e[4]=u):u=e[4];let d;return e[5]!==t||e[6]!==u?(d=c.jsx(h,{value:u,children:t}),e[5]=t,e[6]=u,e[7]=d):d=e[7],d}function i(l){const e=r.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx(E,{children:c.jsx("div",{className:"flex flex-col h-full min-h-0",children:t})}),e[0]=t,e[1]=s):s=e[1],s}function C(l){const e=r.c(10);let t,s,n;e[0]!==l?({children:t,className:s,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let o;e[4]!==s?(o=T("relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",s),e[4]=s,e[5]=o):o=e[5];let a;return e[6]!==t||e[7]!==n||e[8]!==o?(a=c.jsx("div",{className:o,...n,children:t}),e[6]=t,e[7]=n,e[8]=o,e[9]=a):a=e[9],a}function v(l){const e=r.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:t}),e[0]=t,e[1]=s):s=e[1],s}function S(l){const e=r.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:t}),e[0]=t,e[1]=s):s=e[1],s}function N(){const l=r.c(2),{setCenterEl:e}=m();let t;return l[0]!==e?(t=c.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),l[0]=e,l[1]=t):t=l[1],t}function $(l){const e=r.c(3),{children:t}=l,{centerEl:s}=m();if(!s)return null;let n;return e[0]!==s||e[1]!==t?(n=g.createPortal(t,s),e[0]=s,e[1]=t,e[2]=n):n=e[2],n}function R(l){const e=r.c(5),{className:t}=l,{setTabsEl:s}=m();let n;e[0]!==t?(n=T("shrink-0 flex items-center",t),e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==s||e[3]!==n?(o=c.jsx("div",{ref:s,className:n}),e[2]=s,e[3]=n,e[4]=o):o=e[4],o}function w(l){const e=r.c(3),{children:t}=l,{tabsEl:s}=m();if(!s)return null;let n;return e[0]!==t||e[1]!==s?(n=g.createPortal(t,s),e[0]=t,e[1]=s,e[2]=n):n=e[2],n}function y(l){const e=r.c(5),{className:t}=l,{setTogglesEl:s}=m();let n;e[0]!==t?(n=T("contents",t),e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==s||e[3]!==n?(o=c.jsx("div",{ref:s,className:n}),e[2]=s,e[3]=n,e[4]=o):o=e[4],o}function P(){const l=r.c(2),{setRightEl:e}=m();let t;return l[0]!==e?(t=c.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),l[0]=e,l[1]=t):t=l[1],t}i.Provider=E;i.Header=C;i.LeftColumn=v;i.RightColumn=S;i.CenterSlot=N;i.Center=$;i.TabsSlot=R;i.Tabs=w;i.TogglesSlot=y;i.RightSlot=P;export{i as T};
@@ -1 +1 @@
1
- import{c as f,l as u,j as b}from"./index-weBGyocH.js";const d="focus-visible:not-forced-colors:outline-none focus-visible:forced-colors:outline-2 focus-visible:forced-colors:outline-offset-0 focus-visible:ring-0 focus-visible:border-border focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50";function m(n){return u("[transition:background-color_180ms_ease,color_180ms_ease]",d,n?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground")}function g(n){const e=f.c(14);let o,s,t,r,c;e[0]!==n?({active:o,className:s,ref:r,type:c,...t}=n,e[0]=n,e[1]=o,e[2]=s,e[3]=t,e[4]=r,e[5]=c):(o=e[1],s=e[2],t=e[3],r=e[4],c=e[5]);const a=c===void 0?"button":c;let i;e[6]!==o||e[7]!==s?(i=u("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md","max-md:[&_svg]:size-5",m(o),s),e[6]=o,e[7]=s,e[8]=i):i=e[8];let l;return e[9]!==t||e[10]!==r||e[11]!==i||e[12]!==a?(l=b.jsx("button",{ref:r,type:a,className:i,...t}),e[9]=t,e[10]=r,e[11]=i,e[12]=a,e[13]=l):l=e[13],l}export{d as I,g as T,m as p};
1
+ import{c as f,l as u,j as b}from"./index-BYFW0DhO.js";const d="focus-visible:not-forced-colors:outline-none focus-visible:forced-colors:outline-2 focus-visible:forced-colors:outline-offset-0 focus-visible:ring-0 focus-visible:border-border focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50";function m(n){return u("[transition:background-color_180ms_ease,color_180ms_ease]",d,n?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground")}function g(n){const e=f.c(14);let o,s,t,r,c;e[0]!==n?({active:o,className:s,ref:r,type:c,...t}=n,e[0]=n,e[1]=o,e[2]=s,e[3]=t,e[4]=r,e[5]=c):(o=e[1],s=e[2],t=e[3],r=e[4],c=e[5]);const a=c===void 0?"button":c;let i;e[6]!==o||e[7]!==s?(i=u("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md","max-md:[&_svg]:size-5",m(o),s),e[6]=o,e[7]=s,e[8]=i):i=e[8];let l;return e[9]!==t||e[10]!==r||e[11]!==i||e[12]!==a?(l=b.jsx("button",{ref:r,type:a,className:i,...t}),e[9]=t,e[10]=r,e[11]=i,e[12]=a,e[13]=l):l=e[13],l}export{d as I,g as T,m as p};
@@ -1 +1 @@
1
- import{q as _,T as l}from"./index-weBGyocH.js";let s=!1;const p="report:auth-attempt:",f=3600*1e3;function h(e){const t=new URLSearchParams(e),n=t.get("share_id")||void 0,o=t.get("email_run_id")||void 0,r=t.get("utm_source")||void 0,u=t.get("utm_medium")||void 0,a=t.get("utm_campaign")||void 0;return{entrypoint:n||r==="share"?"share":o||t.has("d")||r==="email"?"email":r?"campaign":"direct",...n?{share_id:n}:{},...o?{email_run_id:o}:{},...r?{utm_source:r}:{},...u?{utm_medium:u}:{},...a?{utm_campaign:a}:{}}}function c(){return h(typeof window>"u"?"":window.location.search)}function i(e){return`${p}${e}`}function g(){try{return globalThis.crypto.randomUUID()}catch{return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}}function d(e){try{const t=window.sessionStorage.getItem(i(e));if(!t)return null;const n=JSON.parse(t);return n.domain!==e||typeof n.attempt_id!="string"||typeof n.gate_shown_at!="number"||Date.now()-n.gate_shown_at>f?(window.sessionStorage.removeItem(i(e)),null):n}catch{return null}}function m(e){try{window.sessionStorage.setItem(i(e.domain),JSON.stringify(e))}catch{}}function w(e){const t=d(e);if(t)return t;const n={attempt_id:g(),domain:e,gate_shown_at:Date.now(),...c()};return m(n),n}function y(e,t){const n={...w(e),...t};return m(n),n}function T(e){return{auth_attempt_id:e.attempt_id,entrypoint:e.entrypoint,...e.share_id?{share_id:e.share_id}:{},...e.email_run_id?{email_run_id:e.email_run_id}:{},...e.utm_source?{utm_source:e.utm_source}:{},...e.utm_medium?{utm_medium:e.utm_medium}:{},...e.utm_campaign?{utm_campaign:e.utm_campaign}:{}}}function R(e){const t=d(e);if(!t)return null;try{window.sessionStorage.removeItem(i(e))}catch{}return t}function S(e){const t=e.toLowerCase();return t==="invalid_email"?"invalid_email":t.includes("429")||t.includes("rate limit")?"rate_limited":t.includes("otp")||t.includes("verification code")||t.includes("invalid code")||t.includes("expired code")||t.includes("código")||t.includes("codigo")?"invalid_or_expired_code":t.includes("401")||t.includes("unauthorized")?"invalid_credentials":t.includes("409")||t.includes("already exists")?"account_exists":t.includes("network")||t.includes("fetch")?"network":t.includes("cancel")||t.includes("closed")?"cancelled":"unknown"}function I(e){s=e}function M(e,t,n){if(_())try{l.capture(e,{...c(),...t,...s?{report_preview:"reviewer"}:{}},n)}catch{}}export{S as a,w as b,M as c,T as d,R as e,h as r,I as s,y as u};
1
+ import{q as _,T as l}from"./index-BYFW0DhO.js";let s=!1;const p="report:auth-attempt:",f=3600*1e3;function h(e){const t=new URLSearchParams(e),n=t.get("share_id")||void 0,o=t.get("email_run_id")||void 0,r=t.get("utm_source")||void 0,u=t.get("utm_medium")||void 0,a=t.get("utm_campaign")||void 0;return{entrypoint:n||r==="share"?"share":o||t.has("d")||r==="email"?"email":r?"campaign":"direct",...n?{share_id:n}:{},...o?{email_run_id:o}:{},...r?{utm_source:r}:{},...u?{utm_medium:u}:{},...a?{utm_campaign:a}:{}}}function c(){return h(typeof window>"u"?"":window.location.search)}function i(e){return`${p}${e}`}function g(){try{return globalThis.crypto.randomUUID()}catch{return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}}function d(e){try{const t=window.sessionStorage.getItem(i(e));if(!t)return null;const n=JSON.parse(t);return n.domain!==e||typeof n.attempt_id!="string"||typeof n.gate_shown_at!="number"||Date.now()-n.gate_shown_at>f?(window.sessionStorage.removeItem(i(e)),null):n}catch{return null}}function m(e){try{window.sessionStorage.setItem(i(e.domain),JSON.stringify(e))}catch{}}function w(e){const t=d(e);if(t)return t;const n={attempt_id:g(),domain:e,gate_shown_at:Date.now(),...c()};return m(n),n}function y(e,t){const n={...w(e),...t};return m(n),n}function T(e){return{auth_attempt_id:e.attempt_id,entrypoint:e.entrypoint,...e.share_id?{share_id:e.share_id}:{},...e.email_run_id?{email_run_id:e.email_run_id}:{},...e.utm_source?{utm_source:e.utm_source}:{},...e.utm_medium?{utm_medium:e.utm_medium}:{},...e.utm_campaign?{utm_campaign:e.utm_campaign}:{}}}function R(e){const t=d(e);if(!t)return null;try{window.sessionStorage.removeItem(i(e))}catch{}return t}function S(e){const t=e.toLowerCase();return t==="invalid_email"?"invalid_email":t.includes("429")||t.includes("rate limit")?"rate_limited":t.includes("otp")||t.includes("verification code")||t.includes("invalid code")||t.includes("expired code")||t.includes("código")||t.includes("codigo")?"invalid_or_expired_code":t.includes("401")||t.includes("unauthorized")?"invalid_credentials":t.includes("409")||t.includes("already exists")?"account_exists":t.includes("network")||t.includes("fetch")?"network":t.includes("cancel")||t.includes("closed")?"cancelled":"unknown"}function I(e){s=e}function M(e,t,n){if(_())try{l.capture(e,{...c(),...t,...s?{report_preview:"reviewer"}:{}},n)}catch{}}export{S as a,w as b,M as c,T as d,R as e,h as r,I as s,y as u};
@@ -1,4 +1,4 @@
1
- import{ce as l,aj as e,ak as h,ag as r,d1 as b,ae as t,ah as p,af as d,am as c,ao as m,cc as v,d2 as E,d3 as I,d4 as w,d5 as x,d6 as T,d7 as z,d8 as C,d9 as D,da as O,db as B,dc as V,dd as W,de as $,df as F,dg as K,cq as j,dh as J,di as Z,dj as Q,dk as Y,dl as G,dm as X,dn as ee,co as te}from"./index-weBGyocH.js";import{P as oe}from"./use-mcp-client-DbyyfwFL.js";(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(o,s)=>(typeof require<"u"?require:o)[s]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});class se extends oe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(o,s){}_ensureEventSlot(o){let s=this._eventSlots.get(o);if(!s){let i=this.eventSchemas[o];if(!i)throw Error(`Unknown event: ${String(o)}`);s={listeners:[]},this._eventSlots.set(o,s);let a=i.shape.method.value;this._registeredMethods.add(a);let u=s;super.setNotificationHandler(i,g=>{let R=g.params;this.onEventDispatch(o,R),u.onHandler?.(R);for(let A of[...u.listeners])A(R)})}return s}setEventHandler(o,s){let i=this._ensureEventSlot(o);i.onHandler&&s&&console.warn(`[MCP Apps] on${String(o)} handler replaced. Use addEventListener("${String(o)}", …) to add multiple listeners without replacing.`),i.onHandler=s}getEventHandler(o){return this._eventSlots.get(o)?.onHandler}addEventListener(o,s){this._ensureEventSlot(o).listeners.push(s)}removeEventListener(o,s){let i=this._eventSlots.get(o);if(!i)return;let a=i.listeners.indexOf(s);a!==-1&&i.listeners.splice(a,1)}setRequestHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setRequestHandler"),super.setRequestHandler(o,s)};setNotificationHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setNotificationHandler"),super.setNotificationHandler(o,s)};warnIfRequestHandlerReplaced(o,s,i){s&&i&&console.warn(`[MCP Apps] ${o} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(o,s)=>{let i=o.shape.method.value;this._registeredMethods.add(i),super.setRequestHandler(o,s)};_assertMethodNotRegistered(o,s){let i=o.shape.method.value;if(this._registeredMethods.has(i))throw Error(`Handler for "${i}" already registered (via ${s}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(i)}}var L="2026-01-26",ie="ui/notifications/tool-input-partial",re=l([e("light"),e("dark")]).describe("Color theme preference for the host environment."),f=l([e("inline"),e("fullscreen"),e("pip")]).describe("Display mode for UI presentation."),ae=l([e("--color-background-primary"),e("--color-background-secondary"),e("--color-background-tertiary"),e("--color-background-inverse"),e("--color-background-ghost"),e("--color-background-info"),e("--color-background-danger"),e("--color-background-success"),e("--color-background-warning"),e("--color-background-disabled"),e("--color-text-primary"),e("--color-text-secondary"),e("--color-text-tertiary"),e("--color-text-inverse"),e("--color-text-ghost"),e("--color-text-info"),e("--color-text-danger"),e("--color-text-success"),e("--color-text-warning"),e("--color-text-disabled"),e("--color-border-primary"),e("--color-border-secondary"),e("--color-border-tertiary"),e("--color-border-inverse"),e("--color-border-ghost"),e("--color-border-info"),e("--color-border-danger"),e("--color-border-success"),e("--color-border-warning"),e("--color-border-disabled"),e("--color-ring-primary"),e("--color-ring-secondary"),e("--color-ring-inverse"),e("--color-ring-info"),e("--color-ring-danger"),e("--color-ring-success"),e("--color-ring-warning"),e("--font-sans"),e("--font-mono"),e("--font-weight-normal"),e("--font-weight-medium"),e("--font-weight-semibold"),e("--font-weight-bold"),e("--font-text-xs-size"),e("--font-text-sm-size"),e("--font-text-md-size"),e("--font-text-lg-size"),e("--font-heading-xs-size"),e("--font-heading-sm-size"),e("--font-heading-md-size"),e("--font-heading-lg-size"),e("--font-heading-xl-size"),e("--font-heading-2xl-size"),e("--font-heading-3xl-size"),e("--font-text-xs-line-height"),e("--font-text-sm-line-height"),e("--font-text-md-line-height"),e("--font-text-lg-line-height"),e("--font-heading-xs-line-height"),e("--font-heading-sm-line-height"),e("--font-heading-md-line-height"),e("--font-heading-lg-line-height"),e("--font-heading-xl-line-height"),e("--font-heading-2xl-line-height"),e("--font-heading-3xl-line-height"),e("--border-radius-xs"),e("--border-radius-sm"),e("--border-radius-md"),e("--border-radius-lg"),e("--border-radius-xl"),e("--border-radius-full"),e("--border-width-regular"),e("--shadow-hairline"),e("--shadow-sm"),e("--shadow-md"),e("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),ne=h(ae.describe(`Style variables for theming MCP apps.
1
+ import{ce as l,aj as e,ak as h,ag as r,d1 as b,ae as t,ah as p,af as d,am as c,ao as m,cc as v,d2 as E,d3 as I,d4 as w,d5 as x,d6 as T,d7 as z,d8 as C,d9 as D,da as O,db as B,dc as V,dd as W,de as $,df as F,dg as K,cq as j,dh as J,di as Z,dj as Q,dk as Y,dl as G,dm as X,dn as ee,co as te}from"./index-BYFW0DhO.js";import{P as oe}from"./use-mcp-client-B8KExIQP.js";(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(o,s)=>(typeof require<"u"?require:o)[s]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});class se extends oe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(o,s){}_ensureEventSlot(o){let s=this._eventSlots.get(o);if(!s){let i=this.eventSchemas[o];if(!i)throw Error(`Unknown event: ${String(o)}`);s={listeners:[]},this._eventSlots.set(o,s);let a=i.shape.method.value;this._registeredMethods.add(a);let u=s;super.setNotificationHandler(i,g=>{let R=g.params;this.onEventDispatch(o,R),u.onHandler?.(R);for(let A of[...u.listeners])A(R)})}return s}setEventHandler(o,s){let i=this._ensureEventSlot(o);i.onHandler&&s&&console.warn(`[MCP Apps] on${String(o)} handler replaced. Use addEventListener("${String(o)}", …) to add multiple listeners without replacing.`),i.onHandler=s}getEventHandler(o){return this._eventSlots.get(o)?.onHandler}addEventListener(o,s){this._ensureEventSlot(o).listeners.push(s)}removeEventListener(o,s){let i=this._eventSlots.get(o);if(!i)return;let a=i.listeners.indexOf(s);a!==-1&&i.listeners.splice(a,1)}setRequestHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setRequestHandler"),super.setRequestHandler(o,s)};setNotificationHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setNotificationHandler"),super.setNotificationHandler(o,s)};warnIfRequestHandlerReplaced(o,s,i){s&&i&&console.warn(`[MCP Apps] ${o} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(o,s)=>{let i=o.shape.method.value;this._registeredMethods.add(i),super.setRequestHandler(o,s)};_assertMethodNotRegistered(o,s){let i=o.shape.method.value;if(this._registeredMethods.has(i))throw Error(`Handler for "${i}" already registered (via ${s}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(i)}}var L="2026-01-26",ie="ui/notifications/tool-input-partial",re=l([e("light"),e("dark")]).describe("Color theme preference for the host environment."),f=l([e("inline"),e("fullscreen"),e("pip")]).describe("Display mode for UI presentation."),ae=l([e("--color-background-primary"),e("--color-background-secondary"),e("--color-background-tertiary"),e("--color-background-inverse"),e("--color-background-ghost"),e("--color-background-info"),e("--color-background-danger"),e("--color-background-success"),e("--color-background-warning"),e("--color-background-disabled"),e("--color-text-primary"),e("--color-text-secondary"),e("--color-text-tertiary"),e("--color-text-inverse"),e("--color-text-ghost"),e("--color-text-info"),e("--color-text-danger"),e("--color-text-success"),e("--color-text-warning"),e("--color-text-disabled"),e("--color-border-primary"),e("--color-border-secondary"),e("--color-border-tertiary"),e("--color-border-inverse"),e("--color-border-ghost"),e("--color-border-info"),e("--color-border-danger"),e("--color-border-success"),e("--color-border-warning"),e("--color-border-disabled"),e("--color-ring-primary"),e("--color-ring-secondary"),e("--color-ring-inverse"),e("--color-ring-info"),e("--color-ring-danger"),e("--color-ring-success"),e("--color-ring-warning"),e("--font-sans"),e("--font-mono"),e("--font-weight-normal"),e("--font-weight-medium"),e("--font-weight-semibold"),e("--font-weight-bold"),e("--font-text-xs-size"),e("--font-text-sm-size"),e("--font-text-md-size"),e("--font-text-lg-size"),e("--font-heading-xs-size"),e("--font-heading-sm-size"),e("--font-heading-md-size"),e("--font-heading-lg-size"),e("--font-heading-xl-size"),e("--font-heading-2xl-size"),e("--font-heading-3xl-size"),e("--font-text-xs-line-height"),e("--font-text-sm-line-height"),e("--font-text-md-line-height"),e("--font-text-lg-line-height"),e("--font-heading-xs-line-height"),e("--font-heading-sm-line-height"),e("--font-heading-md-line-height"),e("--font-heading-lg-line-height"),e("--font-heading-xl-line-height"),e("--font-heading-2xl-line-height"),e("--font-heading-3xl-line-height"),e("--border-radius-xs"),e("--border-radius-sm"),e("--border-radius-md"),e("--border-radius-lg"),e("--border-radius-xl"),e("--border-radius-full"),e("--border-width-regular"),e("--shadow-hairline"),e("--shadow-sm"),e("--shadow-md"),e("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),ne=h(ae.describe(`Style variables for theming MCP apps.
2
2
 
3
3
  Individual style keys are optional - hosts may provide any subset of these values.
4
4
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
@@ -1 +1 @@
1
- import{c as p,G as m,a7 as R,K as h,m as y,x as S,bE as D}from"./index-weBGyocH.js";const P=["deco","anthropic","openrouter","llmapi","google","openai-compatible"],M=new Set(P);function O(o){return M.has(o)}const A={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"]},v={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"]},L={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"]},T={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},x={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},K={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function _(o){return o.toLowerCase().replace(/[^a-z0-9]/g,"")}function w(o){return _(o).includes("deepresearch")}const q=["sonar","searchpreview","online"];function I(o){const e=_(o);return e.includes("deepresearch")?!1:q.some(t=>e.includes(t))}function C(o){return o.asyncResearch!==!0&&I(o.modelId)}function F(o){return o.asyncResearch===!0||w(o.modelId)||I(o.modelId)}function u(o,e,t,n){for(const i of t){const s=o.find(a=>a.modelId===i);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}for(const i of t){const s=o.find(a=>a.modelId.includes(i));if(s)return{keyId:e,modelId:s.modelId,title:s.title}}if(n){const i=o.find(n);if(i)return{keyId:e,modelId:i.modelId,title:i.title}}return null}function b(o,e){const t={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const n of o){const i=e[n.id]??[],s=n.providerId;t.chat.fast||(t.chat.fast=u(i,n.id,A[s]??[])),t.chat.smart||(t.chat.smart=u(i,n.id,v[s]??[])),t.chat.thinking||(t.chat.thinking=u(i,n.id,L[s]??[])),t.image||(t.image=u(i,n.id,T[s]??[],a=>a.capabilities?.includes("image")===!0)),t.webSearch||(t.webSearch=u(i,n.id,x[s]??[],C)),t.deepResearch||(t.deepResearch=u(i,n.id,K[s]??[],F))}return t}function H(o,e){return{queryKey:h.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await D(o,"AI_PROVIDER_KEY_LIST",{})}}function $(){const o=p.c(7),{org:e}=m(),t=R();let n;o[0]!==e.id?(n=h.aiProviders(e.id),o[0]=e.id,o[1]=n):n=o[1];let i;o[2]!==t?(i=async()=>await t.call("AI_PROVIDERS_LIST",{}),o[2]=t,o[3]=i):i=o[3];let s;o[4]!==n||o[5]!==i?(s={queryKey:n,staleTime:1/0,queryFn:i},o[4]=n,o[5]=i,o[6]=s):s=o[6];const{data:a}=S(s);return a}function N(){const o=p.c(5),{org:e}=m();let t;o[0]!==e.id||o[1]!==e.slug?(t=H(e.slug,e.id),o[0]=e.id,o[1]=e.slug,o[2]=t):t=o[2];const{data:n}=S(t);let i;return o[3]!==n?.keys?(i=n?.keys??[],o[3]=n?.keys,o[4]=i):i=o[4],i}function G(){const o=p.c(2),e=N();let t;return o[0]!==e?(t=e.filter(Q),o[0]=e,o[1]=t):t=o[1],t}function Q(o){return O(o.providerId)}function E(o){const e=p.c(15),{org:t}=m(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=h.aiProviderModels(t.id,o??""),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];const s=!!o;let a;e[3]!==o||e[4]!==n?(a=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o??""}),e[3]=o,e[4]=n,e[5]=a):a=e[5];let r;e[6]!==i||e[7]!==s||e[8]!==a?(r={queryKey:i,enabled:s,staleTime:6e4,queryFn:a},e[6]=i,e[7]=s,e[8]=a,e[9]=r):r=e[9];const{data:l,isLoading:c}=y(r);let d;e[10]!==l?.models?(d=l?.models??[],e[10]=l?.models,e[11]=d):d=e[11];const g=!!o&&c;let f;return e[12]!==d||e[13]!==g?(f={models:d,isLoading:g},e[12]=d,e[13]=g,e[14]=f):f=e[14],f}function z(o){const e=p.c(8),t=o[0],n=o[1],i=o[2],{models:s}=E(t?.id),{models:a}=E(n?.id),{models:r}=E(i?.id);let l;if(e[0]!==t||e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==s||e[5]!==a||e[6]!==r){const c={};t?.id&&(c[t.id]=s),n?.id&&(c[n.id]=a),i?.id&&(c[i.id]=r),l=b(o,c),e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=s,e[5]=a,e[6]=r,e[7]=l}else l=e[7];return l}function B(o){const e=p.c(11),{org:t}=m(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=h.aiProviderModels(t.id,o),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];let s;e[3]!==o||e[4]!==n?(s=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,staleTime:6e4,queryFn:s},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:r}=S(a);let l;return e[9]!==r?.models?(l=r?.models??[],e[9]=r?.models,e[10]=l):l=e[10],l}export{z as a,E as b,F as c,N as d,O as e,$ as f,B as g,C as i,b as p,G as u};
1
+ import{c as p,G as m,a7 as R,K as h,m as y,x as S,bE as D}from"./index-BYFW0DhO.js";const P=["deco","anthropic","openrouter","llmapi","google","openai-compatible"],M=new Set(P);function O(o){return M.has(o)}const A={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"]},v={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"]},L={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"]},T={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},x={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},K={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function _(o){return o.toLowerCase().replace(/[^a-z0-9]/g,"")}function w(o){return _(o).includes("deepresearch")}const q=["sonar","searchpreview","online"];function I(o){const e=_(o);return e.includes("deepresearch")?!1:q.some(t=>e.includes(t))}function C(o){return o.asyncResearch!==!0&&I(o.modelId)}function F(o){return o.asyncResearch===!0||w(o.modelId)||I(o.modelId)}function u(o,e,t,n){for(const i of t){const s=o.find(a=>a.modelId===i);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}for(const i of t){const s=o.find(a=>a.modelId.includes(i));if(s)return{keyId:e,modelId:s.modelId,title:s.title}}if(n){const i=o.find(n);if(i)return{keyId:e,modelId:i.modelId,title:i.title}}return null}function b(o,e){const t={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const n of o){const i=e[n.id]??[],s=n.providerId;t.chat.fast||(t.chat.fast=u(i,n.id,A[s]??[])),t.chat.smart||(t.chat.smart=u(i,n.id,v[s]??[])),t.chat.thinking||(t.chat.thinking=u(i,n.id,L[s]??[])),t.image||(t.image=u(i,n.id,T[s]??[],a=>a.capabilities?.includes("image")===!0)),t.webSearch||(t.webSearch=u(i,n.id,x[s]??[],C)),t.deepResearch||(t.deepResearch=u(i,n.id,K[s]??[],F))}return t}function H(o,e){return{queryKey:h.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await D(o,"AI_PROVIDER_KEY_LIST",{})}}function $(){const o=p.c(7),{org:e}=m(),t=R();let n;o[0]!==e.id?(n=h.aiProviders(e.id),o[0]=e.id,o[1]=n):n=o[1];let i;o[2]!==t?(i=async()=>await t.call("AI_PROVIDERS_LIST",{}),o[2]=t,o[3]=i):i=o[3];let s;o[4]!==n||o[5]!==i?(s={queryKey:n,staleTime:1/0,queryFn:i},o[4]=n,o[5]=i,o[6]=s):s=o[6];const{data:a}=S(s);return a}function N(){const o=p.c(5),{org:e}=m();let t;o[0]!==e.id||o[1]!==e.slug?(t=H(e.slug,e.id),o[0]=e.id,o[1]=e.slug,o[2]=t):t=o[2];const{data:n}=S(t);let i;return o[3]!==n?.keys?(i=n?.keys??[],o[3]=n?.keys,o[4]=i):i=o[4],i}function G(){const o=p.c(2),e=N();let t;return o[0]!==e?(t=e.filter(Q),o[0]=e,o[1]=t):t=o[1],t}function Q(o){return O(o.providerId)}function E(o){const e=p.c(15),{org:t}=m(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=h.aiProviderModels(t.id,o??""),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];const s=!!o;let a;e[3]!==o||e[4]!==n?(a=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o??""}),e[3]=o,e[4]=n,e[5]=a):a=e[5];let r;e[6]!==i||e[7]!==s||e[8]!==a?(r={queryKey:i,enabled:s,staleTime:6e4,queryFn:a},e[6]=i,e[7]=s,e[8]=a,e[9]=r):r=e[9];const{data:l,isLoading:c}=y(r);let d;e[10]!==l?.models?(d=l?.models??[],e[10]=l?.models,e[11]=d):d=e[11];const g=!!o&&c;let f;return e[12]!==d||e[13]!==g?(f={models:d,isLoading:g},e[12]=d,e[13]=g,e[14]=f):f=e[14],f}function z(o){const e=p.c(8),t=o[0],n=o[1],i=o[2],{models:s}=E(t?.id),{models:a}=E(n?.id),{models:r}=E(i?.id);let l;if(e[0]!==t||e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==s||e[5]!==a||e[6]!==r){const c={};t?.id&&(c[t.id]=s),n?.id&&(c[n.id]=a),i?.id&&(c[i.id]=r),l=b(o,c),e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=s,e[5]=a,e[6]=r,e[7]=l}else l=e[7];return l}function B(o){const e=p.c(11),{org:t}=m(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=h.aiProviderModels(t.id,o),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];let s;e[3]!==o||e[4]!==n?(s=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,staleTime:6e4,queryFn:s},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:r}=S(a);let l;return e[9]!==r?.models?(l=r?.models??[],e[9]=r?.models,e[10]=l):l=e[10],l}export{z as a,E as b,F as c,N as d,O as e,$ as f,B as g,C as i,b as p,G as u};
@@ -1 +1 @@
1
- import{c as U,G as q,a7 as I,K as T,m as Q,n as x,e as y,t as m}from"./index-weBGyocH.js";import{u as z}from"./use-mcp-client-DbyyfwFL.js";import{S as J}from"./constants-BRGHAWVM.js";function V(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function st(t){const e=U.c(12),{org:s}=q(),l=t??J;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=z(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(V)},e[6]=i,e[7]=o):o=e[7];const c=!!t;let r;return e[8]!==n||e[9]!==o||e[10]!==c?(r={queryKey:n,queryFn:o,enabled:c,staleTime:3e4},e[8]=n,e[9]=o,e[10]=c,e[11]=r):r=e[11],Q(r)}function it(t){const e=U.c(9),{org:s}=q(),l=I();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],Q(n)}function ot(t){const e=U.c(10),{org:s}=q(),l=I();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],Q(o)}function at(t,e){const s=U.c(12),{org:l}=q(),a=I();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let c;return s[8]!==i||s[9]!==n||s[10]!==o?(c={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=c):c=s[11],Q(c)}function nt(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function lt(){const t=U.c(64),{org:e}=q(),s=I(),l=x();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let c;t[6]!==s?(c=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=c):c=t[7];let r;t[8]!==i?(r=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=r):r=t[9];let d;t[10]!==c||t[11]!==r?(d={mutationFn:c,onSuccess:r,onError:X},t[10]=c,t[11]=r,t[12]=d):d=t[12];const D=y(d);let A;t[13]!==s?(A=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=A):A=t[14];let p;t[15]!==i||t[16]!==o?(p=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=p):p=t[17];let G;t[18]!==A||t[19]!==p?(G={mutationFn:A,onSuccess:p,onError:W},t[18]=A,t[19]=p,t[20]=G):G=t[20];const j=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:H},t[27]=g,t[28]=_,t[29]=$):$=t[29];const k=y($);let S;t[30]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=S):S=t[31];let E;t[32]!==i||t[33]!==o?(E=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=E):E=t[34];let K;t[35]!==S||t[36]!==E?(K={mutationFn:S,onSuccess:E},t[35]=S,t[36]=E,t[37]=K):K=t[37];const P=y(K);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let C;t[43]!==O||t[44]!==R?(C={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=C):C=t[45];const h=y(C);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let b;t[51]!==F||t[52]!==N?(b={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=b):b=t[53];const v=y(b);let L;t[54]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},t[54]=s,t[55]=L):L=t[55];const w=y(L);let M;return t[56]!==D||t[57]!==k||t[58]!==w||t[59]!==P||t[60]!==v||t[61]!==h||t[62]!==j?(M={create:D,update:j,remove:k,triggerAdd:P,triggerRemove:v,triggerRotateToken:h,run:w},t[56]=D,t[57]=k,t[58]=w,t[59]=P,t[60]=v,t[61]=h,t[62]=j,t[63]=M):M=t[63],M}function Y(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function B(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function H(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{st as a,ot as b,it as c,nt as d,at as e,lt as u};
1
+ import{c as U,G as q,a7 as I,K as T,m as Q,n as x,e as y,t as m}from"./index-BYFW0DhO.js";import{u as z}from"./use-mcp-client-B8KExIQP.js";import{S as J}from"./constants-BRGHAWVM.js";function V(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function st(t){const e=U.c(12),{org:s}=q(),l=t??J;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=z(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(V)},e[6]=i,e[7]=o):o=e[7];const c=!!t;let r;return e[8]!==n||e[9]!==o||e[10]!==c?(r={queryKey:n,queryFn:o,enabled:c,staleTime:3e4},e[8]=n,e[9]=o,e[10]=c,e[11]=r):r=e[11],Q(r)}function it(t){const e=U.c(9),{org:s}=q(),l=I();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],Q(n)}function ot(t){const e=U.c(10),{org:s}=q(),l=I();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],Q(o)}function at(t,e){const s=U.c(12),{org:l}=q(),a=I();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let c;return s[8]!==i||s[9]!==n||s[10]!==o?(c={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=c):c=s[11],Q(c)}function nt(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function lt(){const t=U.c(64),{org:e}=q(),s=I(),l=x();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let c;t[6]!==s?(c=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=c):c=t[7];let r;t[8]!==i?(r=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=r):r=t[9];let d;t[10]!==c||t[11]!==r?(d={mutationFn:c,onSuccess:r,onError:X},t[10]=c,t[11]=r,t[12]=d):d=t[12];const D=y(d);let A;t[13]!==s?(A=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=A):A=t[14];let p;t[15]!==i||t[16]!==o?(p=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=p):p=t[17];let G;t[18]!==A||t[19]!==p?(G={mutationFn:A,onSuccess:p,onError:W},t[18]=A,t[19]=p,t[20]=G):G=t[20];const j=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:H},t[27]=g,t[28]=_,t[29]=$):$=t[29];const k=y($);let S;t[30]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=S):S=t[31];let E;t[32]!==i||t[33]!==o?(E=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=E):E=t[34];let K;t[35]!==S||t[36]!==E?(K={mutationFn:S,onSuccess:E},t[35]=S,t[36]=E,t[37]=K):K=t[37];const P=y(K);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let C;t[43]!==O||t[44]!==R?(C={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=C):C=t[45];const h=y(C);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let b;t[51]!==F||t[52]!==N?(b={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=b):b=t[53];const v=y(b);let L;t[54]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},t[54]=s,t[55]=L):L=t[55];const w=y(L);let M;return t[56]!==D||t[57]!==k||t[58]!==w||t[59]!==P||t[60]!==v||t[61]!==h||t[62]!==j?(M={create:D,update:j,remove:k,triggerAdd:P,triggerRemove:v,triggerRotateToken:h,run:w},t[56]=D,t[57]=k,t[58]=w,t[59]=P,t[60]=v,t[61]=h,t[62]=j,t[63]=M):M=t[63],M}function Y(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function B(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function H(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{st as a,ot as b,it as c,nt as d,at as e,lt as u};
@@ -1 +1 @@
1
- import{c as T,r as o}from"./index-weBGyocH.js";const y=700;function x(r,l,_){const e=T.c(7),f=y,[a,m]=o.useState(r),[i,S]=o.useState(r),[A,d]=o.useState(!1),t=o.useRef(null);r!==i&&(S(r),A||m(r));let s;e[0]!==f||e[1]!==l?(s=u=>{m(u),d(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,d(!1),l(u)},f)},e[0]=f,e[1]=l,e[2]=s):s=e[2];const p=s;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=u=>{m(u),t.current&&clearTimeout(t.current),t.current=null,d(!1)},e[3]=c):c=e[3];const E=c;let n;return e[4]!==a||e[5]!==p?(n=[a,p,E],e[4]=a,e[5]=p,e[6]=n):n=e[6],n}export{x as u};
1
+ import{c as T,r as o}from"./index-BYFW0DhO.js";const y=700;function x(r,l,_){const e=T.c(7),f=y,[a,m]=o.useState(r),[i,S]=o.useState(r),[A,d]=o.useState(!1),t=o.useRef(null);r!==i&&(S(r),A||m(r));let s;e[0]!==f||e[1]!==l?(s=u=>{m(u),d(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,d(!1),l(u)},f)},e[0]=f,e[1]=l,e[2]=s):s=e[2];const p=s;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=u=>{m(u),t.current&&clearTimeout(t.current),t.current=null,d(!1)},e[3]=c):c=e[3];const E=c;let n;return e[4]!==a||e[5]!==p?(n=[a,p,E],e[4]=a,e[5]=p,e[6]=n):n=e[6],n}export{x as u};
@@ -1 +1 @@
1
- import{c as f,G as C,c8 as A,eO as N,c7 as S}from"./index-weBGyocH.js";import{u as I}from"./use-mcp-client-DbyyfwFL.js";import{S as O}from"./constants-BRGHAWVM.js";function b(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const m=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:O,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const p=I(a);return N(u.id,"CONNECTIONS",p,m)}function _(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:O,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=I(n);return S(i.id,"CONNECTIONS",t,l)}function x(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:O,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=I(i);return A(o.id,"CONNECTIONS",n)}export{_ as a,x as b,b as u};
1
+ import{c as f,G as C,c8 as A,eO as N,c7 as S}from"./index-BYFW0DhO.js";import{u as I}from"./use-mcp-client-B8KExIQP.js";import{S as O}from"./constants-BRGHAWVM.js";function b(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const m=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:O,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const p=I(a);return N(u.id,"CONNECTIONS",p,m)}function _(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:O,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=I(n);return S(i.id,"CONNECTIONS",t,l)}function x(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:O,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=I(i);return A(o.id,"CONNECTIONS",n)}export{_ as a,x as b,b as u};
@@ -1 +1 @@
1
- import{c as i,r as n}from"./index-weBGyocH.js";function p(){const e=i.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async c=>{await navigator.clipboard.writeText(c),a(!0),setTimeout(()=>a(!1),2e3)},e[0]=t):t=e[0];const r=t;let o;return e[1]!==s?(o={handleCopy:r,copied:s},e[1]=s,e[2]=o):o=e[2],o}export{p as u};
1
+ import{c as i,r as n}from"./index-BYFW0DhO.js";function p(){const e=i.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async c=>{await navigator.clipboard.writeText(c),a(!0),setTimeout(()=>a(!1),2e3)},e[0]=t):t=e[0];const r=t;let o;return e[1]!==s?(o={handleCopy:r,copied:s},e[1]=s,e[2]=o):o=e[2],o}export{p as u};
@@ -1 +1 @@
1
- import{c as g}from"./index-weBGyocH.js";import{b as p}from"./use-virtual-mcp-Cz_si5KP.js";import{u as f}from"./use-navigate-to-agent-C0f7F1ii.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:u}=d,c=u===void 0?!1:u,t=p(),o=f();let s;e[2]!==t.create||e[3]!==c||e[4]!==o?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&o(l.id,{panel:"settings"}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=s):s=e[5];const r=s;let a;return e[6]!==t.create.isPending||e[7]!==r?(a={createVirtualMCP:r,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=r,e[8]=a):a=e[8],a}export{A as u};
1
+ import{c as g}from"./index-BYFW0DhO.js";import{b as p}from"./use-virtual-mcp-WZp5R4vZ.js";import{u as f}from"./use-navigate-to-agent-CUlgd9lK.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:u}=d,c=u===void 0?!1:u,t=p(),o=f();let s;e[2]!==t.create||e[3]!==c||e[4]!==o?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&o(l.id,{panel:"settings"}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=s):s=e[5];const r=s;let a;return e[6]!==t.create.isPending||e[7]!==r?(a={createVirtualMCP:r,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=r,e[8]=a):a=e[8],a}export{A as u};
@@ -1 +1 @@
1
- import{r as t}from"./index-weBGyocH.js";function f({save:u,delayMs:n=1e3}){const r=t.useRef(u);r.current=u;const e=t.useRef(null),c=()=>{r.current().catch(()=>{})},o=()=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,c()},n)},s=()=>(e.current&&(clearTimeout(e.current),e.current=null),r.current());return t.useEffect(()=>()=>{e.current&&(clearTimeout(e.current),e.current=null,c())},[]),{schedule:o,flush:s}}export{f as u};
1
+ import{r as t}from"./index-BYFW0DhO.js";function f({save:u,delayMs:n=1e3}){const r=t.useRef(u);r.current=u;const e=t.useRef(null),c=()=>{r.current().catch(()=>{})},o=()=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,c()},n)},s=()=>(e.current&&(clearTimeout(e.current),e.current=null),r.current());return t.useEffect(()=>()=>{e.current&&(clearTimeout(e.current),e.current=null,c())},[]),{schedule:o,flush:s}}export{f as u};
@@ -1 +1 @@
1
- import{c as m,r as n}from"./index-weBGyocH.js";function p(e,o){const t=m.c(4),[s,u]=n.useState(e);let c,r;return t[0]!==o||t[1]!==e?(c=()=>{const i=setTimeout(()=>u(e),o);return()=>clearTimeout(i)},r=[e,o],t[0]=o,t[1]=e,t[2]=c,t[3]=r):(c=t[2],r=t[3]),n.useEffect(c,r),s}export{p as u};
1
+ import{c as m,r as n}from"./index-BYFW0DhO.js";function p(e,o){const t=m.c(4),[s,u]=n.useState(e);let c,r;return t[0]!==o||t[1]!==e?(c=()=>{const i=setTimeout(()=>u(e),o);return()=>clearTimeout(i)},r=[e,o],t[0]=o,t[1]=e,t[2]=c,t[3]=r):(c=t[2],r=t[3]),n.useEffect(c,r),s}export{p as u};
@@ -1 +1 @@
1
- import{r as n}from"./index-weBGyocH.js";import{d as h,D as u}from"./decopilot-sse-pool-B-fcCk-K.js";const E=()=>0;function m(d){const{orgSlug:t,taskId:a,enabled:s=!0,onStep:S,onFinish:i,onTaskStatus:l,onReconnect:p}=d,c=n.useRef({taskId:a,onStep:S,onFinish:i,onTaskStatus:l,onReconnect:p});c.current={taskId:a,onStep:S,onFinish:i,onTaskStatus:l,onReconnect:p};const o=n.useRef(null),b=n.useRef(s),f=n.useRef(t);(!o.current||b.current!==s||f.current!==t)&&(b.current=s,f.current=t,o.current=k=>{if(!s||!t)return()=>{};const R=T=>{let e;try{e=JSON.parse(T.data)}catch{return}const r=c.current;if(!(r.taskId&&e.subject!==r.taskId)){switch(e.type){case u.STEP:r.onStep?.(e);break;case u.FINISH:r.onFinish?.(e);break;case u.THREAD_STATUS:r.onTaskStatus?.(e);break}k()}};return h.subscribe(t,R,()=>c.current.onReconnect?.())}),n.useSyncExternalStore(o.current,E,E)}export{m as u};
1
+ import{r as n}from"./index-BYFW0DhO.js";import{d as h,D as u}from"./decopilot-sse-pool-CPDW4Qwb.js";const E=()=>0;function m(d){const{orgSlug:t,taskId:a,enabled:s=!0,onStep:S,onFinish:i,onTaskStatus:l,onReconnect:p}=d,c=n.useRef({taskId:a,onStep:S,onFinish:i,onTaskStatus:l,onReconnect:p});c.current={taskId:a,onStep:S,onFinish:i,onTaskStatus:l,onReconnect:p};const o=n.useRef(null),b=n.useRef(s),f=n.useRef(t);(!o.current||b.current!==s||f.current!==t)&&(b.current=s,f.current=t,o.current=k=>{if(!s||!t)return()=>{};const R=T=>{let e;try{e=JSON.parse(T.data)}catch{return}const r=c.current;if(!(r.taskId&&e.subject!==r.taskId)){switch(e.type){case u.STEP:r.onStep?.(e);break;case u.FINISH:r.onFinish?.(e);break;case u.THREAD_STATUS:r.onTaskStatus?.(e);break}k()}};return h.subscribe(t,R,()=>c.current.onReconnect?.())}),n.useSyncExternalStore(o.current,E,E)}export{m as u};
@@ -1 +1 @@
1
- import{c as oe,b as le,j as n,G as se,n as ie,a7 as ce,r as re,t as W,c5 as ae,c6 as de}from"./index-weBGyocH.js";import{c as Y,d as z,b as V,f as X,g as Z,e as ee,a as te,A as ne}from"./alert-dialog-DQkitV36.js";function ge(B){const e=oe.c(86),{deleteState:s,cancelDelete:a,confirmDelete:d,confirmForceDelete:c}=B,t=le(),w=s.mode==="deleting";let m;e[0]!==a?(m=P=>{P||a()},e[0]=a,e[1]=m):m=e[1];let u;e[2]!==t?(u=t("common.deleteConnectionDialogs.title"),e[2]=t,e[3]=u):u=e[3];let D;e[4]!==u?(D=n.jsx(Y,{children:u}),e[4]=u,e[5]=D):D=e[5];let C;e[6]!==t?(C=t("common.deleteConnectionDialogs.description"),e[6]=t,e[7]=C):C=e[7];const H=s.mode==="deleting"&&s.connection.title;let o;e[8]!==H?(o=n.jsx("span",{className:"font-medium text-foreground",children:H}),e[8]=H,e[9]=o):o=e[9];let l;e[10]!==C||e[11]!==o?(l=n.jsxs(z,{children:[C," ",o,"."]}),e[10]=C,e[11]=o,e[12]=l):l=e[12];let i;e[13]!==D||e[14]!==l?(i=n.jsxs(V,{children:[D,l]}),e[13]=D,e[14]=l,e[15]=i):i=e[15];let f;e[16]!==t?(f=t("common.deleteConnectionDialogs.cancel"),e[16]=t,e[17]=f):f=e[17];let r;e[18]!==f?(r=n.jsx(X,{children:f}),e[18]=f,e[19]=r):r=e[19];let g;e[20]!==t?(g=t("common.deleteConnectionDialogs.delete"),e[20]=t,e[21]=g):g=e[21];let x;e[22]!==d||e[23]!==g?(x=n.jsx(Z,{onClick:d,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:g}),e[22]=d,e[23]=g,e[24]=x):x=e[24];let h;e[25]!==r||e[26]!==x?(h=n.jsxs(ee,{children:[r,x]}),e[25]=r,e[26]=x,e[27]=h):h=e[27];let j;e[28]!==h||e[29]!==i?(j=n.jsxs(te,{children:[i,h]}),e[28]=h,e[29]=i,e[30]=j):j=e[30];let N;e[31]!==w||e[32]!==j||e[33]!==m?(N=n.jsx(ne,{open:w,onOpenChange:m,children:j}),e[31]=w,e[32]=j,e[33]=m,e[34]=N):N=e[34];const G=s.mode==="force-deleting";let p;e[35]!==a?(p=P=>{P||a()},e[35]=a,e[36]=p):p=e[36];let E;e[37]!==t?(E=t("common.deleteConnectionDialogs.forceDeleteTitle"),e[37]=t,e[38]=E):E=e[38];let y;e[39]!==E?(y=n.jsx(Y,{children:E}),e[39]=E,e[40]=y):y=e[40];let O;e[41]!==t?(O=t("common.deleteConnectionDialogs.forceDeleteDescription"),e[41]=t,e[42]=O):O=e[42];const J=s.mode==="force-deleting"&&s.connection.title;let v;e[43]!==J?(v=n.jsx("span",{className:"font-medium text-foreground",children:J}),e[43]=J,e[44]=v):v=e[44];let S;e[45]!==t?(S=t("common.deleteConnectionDialogs.isUsedByAgents"),e[45]=t,e[46]=S):S=e[46];const M=s.mode==="force-deleting"&&s.agentNames;let T;e[47]!==M?(T=n.jsx("span",{className:"font-medium text-foreground",children:M}),e[47]=M,e[48]=T):T=e[48];let A;e[49]!==O||e[50]!==v||e[51]!==S||e[52]!==T?(A=n.jsxs("p",{children:[O," ",v," ",S," ",T,"."]}),e[49]=O,e[50]=v,e[51]=S,e[52]=T,e[53]=A):A=e[53];let _;e[54]!==t?(_=t("common.deleteConnectionDialogs.forceDeleteWarning"),e[54]=t,e[55]=_):_=e[55];let F;e[56]!==_?(F=n.jsx("p",{className:"mt-2",children:_}),e[56]=_,e[57]=F):F=e[57];let I;e[58]!==A||e[59]!==F?(I=n.jsx(z,{asChild:!0,children:n.jsxs("div",{children:[A,F]})}),e[58]=A,e[59]=F,e[60]=I):I=e[60];let L;e[61]!==y||e[62]!==I?(L=n.jsxs(V,{children:[y,I]}),e[61]=y,e[62]=I,e[63]=L):L=e[63];let b;e[64]!==t?(b=t("common.deleteConnectionDialogs.cancel"),e[64]=t,e[65]=b):b=e[65];let R;e[66]!==b?(R=n.jsx(X,{children:b}),e[66]=b,e[67]=R):R=e[67];let q;e[68]!==t?(q=t("common.deleteConnectionDialogs.deleteAnyway"),e[68]=t,e[69]=q):q=e[69];let U;e[70]!==c||e[71]!==q?(U=n.jsx(Z,{onClick:c,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:q}),e[70]=c,e[71]=q,e[72]=U):U=e[72];let K;e[73]!==R||e[74]!==U?(K=n.jsxs(ee,{children:[R,U]}),e[73]=R,e[74]=U,e[75]=K):K=e[75];let $;e[76]!==L||e[77]!==K?($=n.jsxs(te,{children:[L,K]}),e[76]=L,e[77]=K,e[78]=$):$=e[78];let k;e[79]!==G||e[80]!==p||e[81]!==$?(k=n.jsx(ne,{open:G,onOpenChange:p,children:$}),e[79]=G,e[80]=p,e[81]=$,e[82]=k):k=e[82];let Q;return e[83]!==N||e[84]!==k?(Q=n.jsxs(n.Fragment,{children:[N,k]}),e[83]=N,e[84]=k,e[85]=Q):Q=e[85],Q}function ue({onSuccess:B}={}){const{org:e}=se(),s=ie(),a=ce(),[d,c]=re.useState({mode:"idle"}),t=()=>{s.invalidateQueries({predicate:o=>{const l=o.queryKey;return l[1]===e.id&&l[3]==="collection"&&l[4]==="CONNECTIONS"}})},w=o=>{ae(o),s.invalidateQueries({predicate:l=>l.queryKey[1]===de&&l.queryKey[3]===o})},m=o=>{t(),w(o),W.success("Connection deleted successfully"),c({mode:"idle"}),B?.()};return{deleteState:d,requestDelete:o=>{c({mode:"deleting",connection:o})},cancelDelete:()=>{c({mode:"idle"})},confirmDelete:async()=>{if(d.mode!=="deleting")return;const o=d.connection;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o.id}),m(o.id)}catch(l){const i=l instanceof Error?l.message:String(l),f=i.replace(/^Error:\s*/,"");try{const r=JSON.parse(f);if(r.code==="CONNECTION_IN_USE"&&r.agentNames){c({mode:"force-deleting",connection:o,agentNames:r.agentNames.map(g=>`"${g}"`).join(", ")});return}}catch{}W.error(`Failed to delete connection: ${i}`)}},confirmForceDelete:async()=>{if(d.mode!=="force-deleting")return;const o=d.connection.id;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o,force:!0}),m(o)}catch(l){const i=l instanceof Error?l.message:String(l);W.error(`Failed to delete connection: ${i}`)}}}}export{ge as D,ue as u};
1
+ import{c as oe,b as le,j as n,G as se,n as ie,a7 as ce,r as re,t as W,c5 as ae,c6 as de}from"./index-BYFW0DhO.js";import{c as Y,d as z,b as V,f as X,g as Z,e as ee,a as te,A as ne}from"./alert-dialog-DCuxpr9z.js";function ge(B){const e=oe.c(86),{deleteState:s,cancelDelete:a,confirmDelete:d,confirmForceDelete:c}=B,t=le(),w=s.mode==="deleting";let m;e[0]!==a?(m=P=>{P||a()},e[0]=a,e[1]=m):m=e[1];let u;e[2]!==t?(u=t("common.deleteConnectionDialogs.title"),e[2]=t,e[3]=u):u=e[3];let D;e[4]!==u?(D=n.jsx(Y,{children:u}),e[4]=u,e[5]=D):D=e[5];let C;e[6]!==t?(C=t("common.deleteConnectionDialogs.description"),e[6]=t,e[7]=C):C=e[7];const H=s.mode==="deleting"&&s.connection.title;let o;e[8]!==H?(o=n.jsx("span",{className:"font-medium text-foreground",children:H}),e[8]=H,e[9]=o):o=e[9];let l;e[10]!==C||e[11]!==o?(l=n.jsxs(z,{children:[C," ",o,"."]}),e[10]=C,e[11]=o,e[12]=l):l=e[12];let i;e[13]!==D||e[14]!==l?(i=n.jsxs(V,{children:[D,l]}),e[13]=D,e[14]=l,e[15]=i):i=e[15];let f;e[16]!==t?(f=t("common.deleteConnectionDialogs.cancel"),e[16]=t,e[17]=f):f=e[17];let r;e[18]!==f?(r=n.jsx(X,{children:f}),e[18]=f,e[19]=r):r=e[19];let g;e[20]!==t?(g=t("common.deleteConnectionDialogs.delete"),e[20]=t,e[21]=g):g=e[21];let x;e[22]!==d||e[23]!==g?(x=n.jsx(Z,{onClick:d,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:g}),e[22]=d,e[23]=g,e[24]=x):x=e[24];let h;e[25]!==r||e[26]!==x?(h=n.jsxs(ee,{children:[r,x]}),e[25]=r,e[26]=x,e[27]=h):h=e[27];let j;e[28]!==h||e[29]!==i?(j=n.jsxs(te,{children:[i,h]}),e[28]=h,e[29]=i,e[30]=j):j=e[30];let N;e[31]!==w||e[32]!==j||e[33]!==m?(N=n.jsx(ne,{open:w,onOpenChange:m,children:j}),e[31]=w,e[32]=j,e[33]=m,e[34]=N):N=e[34];const G=s.mode==="force-deleting";let p;e[35]!==a?(p=P=>{P||a()},e[35]=a,e[36]=p):p=e[36];let E;e[37]!==t?(E=t("common.deleteConnectionDialogs.forceDeleteTitle"),e[37]=t,e[38]=E):E=e[38];let y;e[39]!==E?(y=n.jsx(Y,{children:E}),e[39]=E,e[40]=y):y=e[40];let O;e[41]!==t?(O=t("common.deleteConnectionDialogs.forceDeleteDescription"),e[41]=t,e[42]=O):O=e[42];const J=s.mode==="force-deleting"&&s.connection.title;let v;e[43]!==J?(v=n.jsx("span",{className:"font-medium text-foreground",children:J}),e[43]=J,e[44]=v):v=e[44];let S;e[45]!==t?(S=t("common.deleteConnectionDialogs.isUsedByAgents"),e[45]=t,e[46]=S):S=e[46];const M=s.mode==="force-deleting"&&s.agentNames;let T;e[47]!==M?(T=n.jsx("span",{className:"font-medium text-foreground",children:M}),e[47]=M,e[48]=T):T=e[48];let A;e[49]!==O||e[50]!==v||e[51]!==S||e[52]!==T?(A=n.jsxs("p",{children:[O," ",v," ",S," ",T,"."]}),e[49]=O,e[50]=v,e[51]=S,e[52]=T,e[53]=A):A=e[53];let _;e[54]!==t?(_=t("common.deleteConnectionDialogs.forceDeleteWarning"),e[54]=t,e[55]=_):_=e[55];let F;e[56]!==_?(F=n.jsx("p",{className:"mt-2",children:_}),e[56]=_,e[57]=F):F=e[57];let I;e[58]!==A||e[59]!==F?(I=n.jsx(z,{asChild:!0,children:n.jsxs("div",{children:[A,F]})}),e[58]=A,e[59]=F,e[60]=I):I=e[60];let L;e[61]!==y||e[62]!==I?(L=n.jsxs(V,{children:[y,I]}),e[61]=y,e[62]=I,e[63]=L):L=e[63];let b;e[64]!==t?(b=t("common.deleteConnectionDialogs.cancel"),e[64]=t,e[65]=b):b=e[65];let R;e[66]!==b?(R=n.jsx(X,{children:b}),e[66]=b,e[67]=R):R=e[67];let q;e[68]!==t?(q=t("common.deleteConnectionDialogs.deleteAnyway"),e[68]=t,e[69]=q):q=e[69];let U;e[70]!==c||e[71]!==q?(U=n.jsx(Z,{onClick:c,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:q}),e[70]=c,e[71]=q,e[72]=U):U=e[72];let K;e[73]!==R||e[74]!==U?(K=n.jsxs(ee,{children:[R,U]}),e[73]=R,e[74]=U,e[75]=K):K=e[75];let $;e[76]!==L||e[77]!==K?($=n.jsxs(te,{children:[L,K]}),e[76]=L,e[77]=K,e[78]=$):$=e[78];let k;e[79]!==G||e[80]!==p||e[81]!==$?(k=n.jsx(ne,{open:G,onOpenChange:p,children:$}),e[79]=G,e[80]=p,e[81]=$,e[82]=k):k=e[82];let Q;return e[83]!==N||e[84]!==k?(Q=n.jsxs(n.Fragment,{children:[N,k]}),e[83]=N,e[84]=k,e[85]=Q):Q=e[85],Q}function ue({onSuccess:B}={}){const{org:e}=se(),s=ie(),a=ce(),[d,c]=re.useState({mode:"idle"}),t=()=>{s.invalidateQueries({predicate:o=>{const l=o.queryKey;return l[1]===e.id&&l[3]==="collection"&&l[4]==="CONNECTIONS"}})},w=o=>{ae(o),s.invalidateQueries({predicate:l=>l.queryKey[1]===de&&l.queryKey[3]===o})},m=o=>{t(),w(o),W.success("Connection deleted successfully"),c({mode:"idle"}),B?.()};return{deleteState:d,requestDelete:o=>{c({mode:"deleting",connection:o})},cancelDelete:()=>{c({mode:"idle"})},confirmDelete:async()=>{if(d.mode!=="deleting")return;const o=d.connection;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o.id}),m(o.id)}catch(l){const i=l instanceof Error?l.message:String(l),f=i.replace(/^Error:\s*/,"");try{const r=JSON.parse(f);if(r.code==="CONNECTION_IN_USE"&&r.agentNames){c({mode:"force-deleting",connection:o,agentNames:r.agentNames.map(g=>`"${g}"`).join(", ")});return}}catch{}W.error(`Failed to delete connection: ${i}`)}},confirmForceDelete:async()=>{if(d.mode!=="force-deleting")return;const o=d.connection.id;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o,force:!0}),m(o)}catch(l){const i=l instanceof Error?l.message:String(l);W.error(`Failed to delete connection: ${i}`)}}}}export{ge as D,ue as u};
@@ -1 +1 @@
1
- import{c as s,m,K as c}from"./index-weBGyocH.js";function l(){const e=s.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:c.deploymentAdminMe(),queryFn:d,staleTime:1/0,retry:2},e[0]=t):t=e[0];const{data:a,isLoading:i}=m(t),r=a==="admin",o=a==="unverified";let n;return e[1]!==i||e[2]!==r||e[3]!==o?(n={isAdmin:r,loading:i,needsEmailVerification:o},e[1]=i,e[2]=r,e[3]=o,e[4]=n):n=e[4],n}async function d(){const e=await fetch("/api/_admin/me",{credentials:"include"});if(e.status>=500)throw new Error(`admin/me request failed: ${e.status}`);return e.ok?"admin":(await e.json().catch(u)).error==="email_not_verified"?"unverified":"denied"}function u(){return{}}export{l as u};
1
+ import{c as s,m,K as c}from"./index-BYFW0DhO.js";function l(){const e=s.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:c.deploymentAdminMe(),queryFn:d,staleTime:1/0,retry:2},e[0]=t):t=e[0];const{data:a,isLoading:i}=m(t),r=a==="admin",o=a==="unverified";let n;return e[1]!==i||e[2]!==r||e[3]!==o?(n={isAdmin:r,loading:i,needsEmailVerification:o},e[1]=i,e[2]=r,e[3]=o,e[4]=n):n=e[4],n}async function d(){const e=await fetch("/api/_admin/me",{credentials:"include"});if(e.status>=500)throw new Error(`admin/me request failed: ${e.status}`);return e.ok?"admin":(await e.json().catch(u)).error==="email_not_verified"?"unverified":"denied"}function u(){return{}}export{l as u};
@@ -1 +1 @@
1
- import{c as n,k as s,b1 as a}from"./index-weBGyocH.js";const o={home:"/$org/home",agents:"/$org/agents/{-$panel}",tasks:"/$org/tasks/{-$taskKey}",reports:"/$org/reports",library:"/$org/library",discover:"/$org/discover",orgIndex:"/$org/"};function m(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:c},t[0]=e):e=t[0],s(e)}function c(t){return t.matches.at(-1)?.fullPath??""}function p(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:l},t[0]=e):e=t[0],s(e)}function l(t){const e=t.matches.at(-1)?.params?.panel;return e===void 0?void 0:a(e)}const i=new Map([[o.reports,"project-only"],[o.library,"org-only"]]);function g(t,e){const r=i.get(t);return r===void 0?!0:r==="project-only"?e!==null:e===null}export{o as D,p as a,g as r,m as u};
1
+ import{c as n,k as s,b1 as a}from"./index-BYFW0DhO.js";const o={home:"/$org/home",agents:"/$org/agents/{-$panel}",tasks:"/$org/tasks/{-$taskKey}",reports:"/$org/reports",library:"/$org/library",discover:"/$org/discover",orgIndex:"/$org/"};function m(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:c},t[0]=e):e=t[0],s(e)}function c(t){return t.matches.at(-1)?.fullPath??""}function p(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:l},t[0]=e):e=t[0],s(e)}function l(t){const e=t.matches.at(-1)?.params?.panel;return e===void 0?void 0:a(e)}const i=new Map([[o.reports,"project-only"],[o.library,"org-only"]]);function g(t,e){const r=i.get(t);return r===void 0?!0:r==="project-only"?e!==null:e===null}export{o as D,p as a,g as r,m as u};
@@ -1 +1 @@
1
- import{c as u,G as c,a7 as r,K as a,m as y,x as F,n as C,e as d}from"./index-weBGyocH.js";function E(){const e=u.c(7),{org:n}=c(),o=r();let i;e[0]!==n.id?(i=a.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:l}=F(s);return l.configs}function I(){const e=u.c(7),{org:n}=c(),o=r();let i;e[0]!==n.id?(i=a.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;return e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6],y(s)}function m(){const e=u.c(8),{org:n}=c(),o=r(),i=C();let t;e[0]!==o?(t=f=>o.call("FILE_CONFIG_CREATE",{...f}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:a.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],d(l)}function q(){const e=u.c(8),{org:n}=c(),o=r(),i=C();let t;e[0]!==o?(t=f=>o.call("FILE_CONFIG_DELETE",{id:f}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:a.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],d(l)}export{I as a,m as b,q as c,E as u};
1
+ import{c as u,G as c,a7 as r,K as a,m as y,x as F,n as C,e as d}from"./index-BYFW0DhO.js";function E(){const e=u.c(7),{org:n}=c(),o=r();let i;e[0]!==n.id?(i=a.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:l}=F(s);return l.configs}function I(){const e=u.c(7),{org:n}=c(),o=r();let i;e[0]!==n.id?(i=a.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;return e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6],y(s)}function m(){const e=u.c(8),{org:n}=c(),o=r(),i=C();let t;e[0]!==o?(t=f=>o.call("FILE_CONFIG_CREATE",{...f}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:a.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],d(l)}function q(){const e=u.c(8),{org:n}=c(),o=r(),i=C();let t;e[0]!==o?(t=f=>o.call("FILE_CONFIG_DELETE",{id:f}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:a.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],d(l)}export{I as a,m as b,q as c,E as u};
@@ -1 +1 @@
1
- import{bJ as d,fc as l,fd as v,r as i}from"./index-weBGyocH.js";var b=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,u=super.createResult(e,t),{isFetching:r,isRefetching:h,isError:a,isRefetchError:g}=u,s=n.fetchMeta?.fetchMore?.direction,o=a&&s==="forward",P=r&&s==="forward",c=a&&s==="backward",f=r&&s==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,n.data),hasPreviousPage:l(t,n.data),isFetchNextPageError:o,isFetchingNextPage:P,isFetchPreviousPageError:c,isFetchingPreviousPage:f,isRefetchError:g&&!o&&!c,isRefetching:h&&!P&&!f}}};function p(e,t,n=!1,u){const r=i.useRef(null),h=i.useRef(null),a=i.useRef(e),g=i.useRef(t),s=i.useRef(n),o=i.useRef(u);a.current=e,g.current=t,s.current=n,o.current=u;const[P]=i.useState(()=>c=>{h.current=c,r.current&&(r.current.disconnect(),r.current=null),c&&queueMicrotask(()=>{if(h.current!==c)return;const f=new IntersectionObserver(R=>{R[0]?.isIntersecting&&g.current&&!s.current&&a.current()},{root:o.current?.current??null,rootMargin:"0px 0px 200px 0px"});f.observe(c),r.current=f})});return P}export{b as I,p as u};
1
+ import{bJ as d,fc as l,fd as v,r as i}from"./index-BYFW0DhO.js";var b=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,u=super.createResult(e,t),{isFetching:r,isRefetching:h,isError:a,isRefetchError:g}=u,s=n.fetchMeta?.fetchMore?.direction,o=a&&s==="forward",P=r&&s==="forward",c=a&&s==="backward",f=r&&s==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,n.data),hasPreviousPage:l(t,n.data),isFetchNextPageError:o,isFetchingNextPage:P,isFetchPreviousPageError:c,isFetchingPreviousPage:f,isRefetchError:g&&!o&&!c,isRefetching:h&&!P&&!f}}};function p(e,t,n=!1,u){const r=i.useRef(null),h=i.useRef(null),a=i.useRef(e),g=i.useRef(t),s=i.useRef(n),o=i.useRef(u);a.current=e,g.current=t,s.current=n,o.current=u;const[P]=i.useState(()=>c=>{h.current=c,r.current&&(r.current.disconnect(),r.current=null),c&&queueMicrotask(()=>{if(h.current!==c)return;const f=new IntersectionObserver(R=>{R[0]?.isIntersecting&&g.current&&!s.current&&a.current()},{root:o.current?.current??null,rootMargin:"0px 0px 200px 0px"});f.observe(c),r.current=f})});return P}export{b as I,p as u};
@@ -1 +1 @@
1
- import{c as O,G as T,a7 as A,bZ as _,K as I,m as b,n as v,b as J,e as N,t as p}from"./index-weBGyocH.js";function j(){const e=O.c(10),{org:u}=T(),d=A(),{capabilities:c,isPrivileged:f}=_(),s=f||!!c["members:manage"];let i;e[0]!==u.id?(i=I.organizationJoinRequests(u.id),e[0]=u.id,e[1]=i):i=e[1];let t;e[2]!==d?(t=()=>d.call("ORGANIZATION_JOIN_REQUEST_LIST",{}),e[2]=d,e[3]=t):t=e[3];const o=!!u.id&&s;let n;e[4]!==i||e[5]!==t||e[6]!==o?(n={queryKey:i,queryFn:t,enabled:o},e[4]=i,e[5]=t,e[6]=o,e[7]=n):n=e[7];const{data:a}=b(n);let l;return e[8]!==a?.requests?(l=a?.requests??[],e[8]=a?.requests,e[9]=l):l=e[9],l}function F(){const e=O.c(29),{org:u,locator:d}=T(),c=A(),f=v(),s=J();let i;e[0]!==d||e[1]!==u||e[2]!==f?(i=()=>{f.invalidateQueries({queryKey:I.organizationJoinRequests(u.id)}),f.invalidateQueries({queryKey:I.members(d)})},e[0]=d,e[1]=u,e[2]=f,e[3]=i):i=e[3];const t=i;let o;e[4]!==c?(o=r=>c.call("ORGANIZATION_JOIN_REQUEST_APPROVE",{requestId:r}),e[4]=c,e[5]=o):o=e[5];let n;e[6]!==t||e[7]!==s?(n=()=>{t(),p.success(s("settings.joinRequestsSection.approved"))},e[6]=t,e[7]=s,e[8]=n):n=e[8];let a;e[9]!==s?(a=r=>p.error(r instanceof Error?r.message:s("settings.joinRequestsSection.approveFailed")),e[9]=s,e[10]=a):a=e[10];let l;e[11]!==o||e[12]!==n||e[13]!==a?(l={mutationFn:o,onSuccess:n,onError:a},e[11]=o,e[12]=n,e[13]=a,e[14]=l):l=e[14];const y=N(l);let q;e[15]!==c?(q=r=>c.call("ORGANIZATION_JOIN_REQUEST_DENY",{requestId:r}),e[15]=c,e[16]=q):q=e[16];let R;e[17]!==t||e[18]!==s?(R=()=>{t(),p.success(s("settings.joinRequestsSection.denied"))},e[17]=t,e[18]=s,e[19]=R):R=e[19];let g;e[20]!==s?(g=r=>p.error(r instanceof Error?r.message:s("settings.joinRequestsSection.denyFailed")),e[20]=s,e[21]=g):g=e[21];let m;e[22]!==q||e[23]!==R||e[24]!==g?(m={mutationFn:q,onSuccess:R,onError:g},e[22]=q,e[23]=R,e[24]=g,e[25]=m):m=e[25];const S=N(m);let E;return e[26]!==y||e[27]!==S?(E={approve:y,deny:S},e[26]=y,e[27]=S,e[28]=E):E=e[28],E}export{F as a,j as u};
1
+ import{c as O,G as T,a7 as A,bZ as _,K as I,m as b,n as v,b as J,e as N,t as p}from"./index-BYFW0DhO.js";function j(){const e=O.c(10),{org:u}=T(),d=A(),{capabilities:c,isPrivileged:f}=_(),s=f||!!c["members:manage"];let i;e[0]!==u.id?(i=I.organizationJoinRequests(u.id),e[0]=u.id,e[1]=i):i=e[1];let t;e[2]!==d?(t=()=>d.call("ORGANIZATION_JOIN_REQUEST_LIST",{}),e[2]=d,e[3]=t):t=e[3];const o=!!u.id&&s;let n;e[4]!==i||e[5]!==t||e[6]!==o?(n={queryKey:i,queryFn:t,enabled:o},e[4]=i,e[5]=t,e[6]=o,e[7]=n):n=e[7];const{data:a}=b(n);let l;return e[8]!==a?.requests?(l=a?.requests??[],e[8]=a?.requests,e[9]=l):l=e[9],l}function F(){const e=O.c(29),{org:u,locator:d}=T(),c=A(),f=v(),s=J();let i;e[0]!==d||e[1]!==u||e[2]!==f?(i=()=>{f.invalidateQueries({queryKey:I.organizationJoinRequests(u.id)}),f.invalidateQueries({queryKey:I.members(d)})},e[0]=d,e[1]=u,e[2]=f,e[3]=i):i=e[3];const t=i;let o;e[4]!==c?(o=r=>c.call("ORGANIZATION_JOIN_REQUEST_APPROVE",{requestId:r}),e[4]=c,e[5]=o):o=e[5];let n;e[6]!==t||e[7]!==s?(n=()=>{t(),p.success(s("settings.joinRequestsSection.approved"))},e[6]=t,e[7]=s,e[8]=n):n=e[8];let a;e[9]!==s?(a=r=>p.error(r instanceof Error?r.message:s("settings.joinRequestsSection.approveFailed")),e[9]=s,e[10]=a):a=e[10];let l;e[11]!==o||e[12]!==n||e[13]!==a?(l={mutationFn:o,onSuccess:n,onError:a},e[11]=o,e[12]=n,e[13]=a,e[14]=l):l=e[14];const y=N(l);let q;e[15]!==c?(q=r=>c.call("ORGANIZATION_JOIN_REQUEST_DENY",{requestId:r}),e[15]=c,e[16]=q):q=e[16];let R;e[17]!==t||e[18]!==s?(R=()=>{t(),p.success(s("settings.joinRequestsSection.denied"))},e[17]=t,e[18]=s,e[19]=R):R=e[19];let g;e[20]!==s?(g=r=>p.error(r instanceof Error?r.message:s("settings.joinRequestsSection.denyFailed")),e[20]=s,e[21]=g):g=e[21];let m;e[22]!==q||e[23]!==R||e[24]!==g?(m={mutationFn:q,onSuccess:R,onError:g},e[22]=q,e[23]=R,e[24]=g,e[25]=m):m=e[25];const S=N(m);let E;return e[26]!==y||e[27]!==S?(E={approve:y,deny:S},e[26]=y,e[27]=S,e[28]=E):E=e[28],E}export{F as a,j as u};
@@ -1 +1 @@
1
- import{c as b,b as k,C as N,b7 as S,j as o,a4 as g,a1 as v,a2 as T,a3 as $,G as A,K as L,x as _}from"./index-weBGyocH.js";import{B as I}from"./badge-BjiEQuif.js";import{g as H}from"./types-DdSDF2P_.js";import{s as P}from"./Eye-04eGXQWm.js";import{s as U,aV as w}from"./agent-icon-BRoPbkxd.js";import{i as O}from"./mcp-oauth-_QOCWffw.js";const R=[{key:"readOnlyHint",labelKey:"tools.toolsList.readOnly",Icon:P,variant:"secondary"},{key:"destructiveHint",labelKey:"tools.toolsList.destructive",Icon:N,variant:"destructive"},{key:"idempotentHint",labelKey:"tools.toolsList.idempotent",Icon:S,variant:"secondary"},{key:"openWorldHint",labelKey:"tools.toolsList.openWorld",Icon:U,variant:"outline"}];function F(y){const e=b.c(22),{annotations:c,_meta:r}=y,t=k();let l;e[0]!==r?(l=H(r),e[0]=r,e[1]=l):l=e[1];const n=!!l;let s,i,a,u,d;if(e[2]!==c||e[3]!==n||e[4]!==t){d=Symbol.for("react.early_return_sentinel");e:{const x=c?R.filter(h=>c[h.key]===!0):[];if(x.length===0&&!n){d=null;break e}s=$,i="flex gap-1 flex-nowrap",e[10]!==n||e[11]!==t?(a=n&&o.jsxs(g,{children:[o.jsx(v,{asChild:!0,children:o.jsx(I,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:o.jsx(w,{})})}),o.jsx(T,{children:t("tools.toolsList.interactive")})]}),e[10]=n,e[11]=t,e[12]=a):a=e[12];let m;e[13]!==t?(m=h=>{const{labelKey:j,Icon:C,variant:K}=h;return o.jsxs(g,{children:[o.jsx(v,{asChild:!0,children:o.jsx(I,{asChild:!0,variant:K,className:"size-6 p-1",children:o.jsx(C,{})})}),o.jsx(T,{children:t(j)})]},j)},e[13]=t,e[14]=m):m=e[14],u=x.map(m)}e[2]=c,e[3]=n,e[4]=t,e[5]=s,e[6]=i,e[7]=a,e[8]=u,e[9]=d}else s=e[5],i=e[6],a=e[7],u=e[8],d=e[9];if(d!==Symbol.for("react.early_return_sentinel"))return d;let p;e[15]!==i||e[16]!==a||e[17]!==u?(p=o.jsxs("div",{className:i,children:[a,u]}),e[15]=i,e[16]=a,e[17]=u,e[18]=p):p=e[18];let f;return e[19]!==s||e[20]!==p?(f=o.jsx(s,{children:p}),e[19]=s,e[20]=p,e[21]=f):f=e[21],f}function G(y){const e=b.c(11),{connectionId:c}=y,{org:r}=A();let t,l,n;e[0]!==c||e[1]!==r.slug?(t=new URL(`/api/${r.slug}/mcp/${c}`,window.location.origin),n=_,l=L.isMCPAuthenticated(t.href,null),e[0]=c,e[1]=r.slug,e[2]=t,e[3]=l,e[4]=n):(t=e[2],l=e[3],n=e[4]);let s;e[5]!==t||e[6]!==r.id?(s=()=>O({url:t.href,token:null,orgId:r.id}),e[5]=t,e[6]=r.id,e[7]=s):s=e[7];let i;e[8]!==l||e[9]!==s?(i={queryKey:l,queryFn:s},e[8]=l,e[9]=s,e[10]=i):i=e[10];const{data:a}=n(i);return a}export{F as T,G as u};
1
+ import{c as b,b as k,C as N,b7 as S,j as o,a4 as g,a1 as v,a2 as T,a3 as $,G as A,K as L,x as _}from"./index-BYFW0DhO.js";import{B as I}from"./badge-DtjY8TtR.js";import{g as H}from"./types-QSIn08FY.js";import{s as P}from"./Eye-COEW3kab.js";import{s as U,aV as w}from"./agent-icon-CLvBDlBI.js";import{i as O}from"./mcp-oauth-C7fK1Egn.js";const R=[{key:"readOnlyHint",labelKey:"tools.toolsList.readOnly",Icon:P,variant:"secondary"},{key:"destructiveHint",labelKey:"tools.toolsList.destructive",Icon:N,variant:"destructive"},{key:"idempotentHint",labelKey:"tools.toolsList.idempotent",Icon:S,variant:"secondary"},{key:"openWorldHint",labelKey:"tools.toolsList.openWorld",Icon:U,variant:"outline"}];function F(y){const e=b.c(22),{annotations:c,_meta:r}=y,t=k();let l;e[0]!==r?(l=H(r),e[0]=r,e[1]=l):l=e[1];const n=!!l;let s,i,a,u,d;if(e[2]!==c||e[3]!==n||e[4]!==t){d=Symbol.for("react.early_return_sentinel");e:{const x=c?R.filter(h=>c[h.key]===!0):[];if(x.length===0&&!n){d=null;break e}s=$,i="flex gap-1 flex-nowrap",e[10]!==n||e[11]!==t?(a=n&&o.jsxs(g,{children:[o.jsx(v,{asChild:!0,children:o.jsx(I,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:o.jsx(w,{})})}),o.jsx(T,{children:t("tools.toolsList.interactive")})]}),e[10]=n,e[11]=t,e[12]=a):a=e[12];let m;e[13]!==t?(m=h=>{const{labelKey:j,Icon:C,variant:K}=h;return o.jsxs(g,{children:[o.jsx(v,{asChild:!0,children:o.jsx(I,{asChild:!0,variant:K,className:"size-6 p-1",children:o.jsx(C,{})})}),o.jsx(T,{children:t(j)})]},j)},e[13]=t,e[14]=m):m=e[14],u=x.map(m)}e[2]=c,e[3]=n,e[4]=t,e[5]=s,e[6]=i,e[7]=a,e[8]=u,e[9]=d}else s=e[5],i=e[6],a=e[7],u=e[8],d=e[9];if(d!==Symbol.for("react.early_return_sentinel"))return d;let p;e[15]!==i||e[16]!==a||e[17]!==u?(p=o.jsxs("div",{className:i,children:[a,u]}),e[15]=i,e[16]=a,e[17]=u,e[18]=p):p=e[18];let f;return e[19]!==s||e[20]!==p?(f=o.jsx(s,{children:p}),e[19]=s,e[20]=p,e[21]=f):f=e[21],f}function G(y){const e=b.c(11),{connectionId:c}=y,{org:r}=A();let t,l,n;e[0]!==c||e[1]!==r.slug?(t=new URL(`/api/${r.slug}/mcp/${c}`,window.location.origin),n=_,l=L.isMCPAuthenticated(t.href,null),e[0]=c,e[1]=r.slug,e[2]=t,e[3]=l,e[4]=n):(t=e[2],l=e[3],n=e[4]);let s;e[5]!==t||e[6]!==r.id?(s=()=>O({url:t.href,token:null,orgId:r.id}),e[5]=t,e[6]=r.id,e[7]=s):s=e[7];let i;e[8]!==l||e[9]!==s?(i={queryKey:l,queryFn:s},e[8]=l,e[9]=s,e[10]=i):i=e[10];const{data:a}=n(i);return a}export{F as T,G as u};
@@ -1,4 +1,4 @@
1
- import{ee as ue,ef as de,eg as he,da as fe,eh as pe,cM as _,cN as g,ei as me,ej as _e,ek as we,el as M,em as ge,en as D,eo as Te,ep as q,eq as ye,er as L,es as ke,et as ve,eu as Se,ev as W,cs as Ce,cu as be,cp as Re,d5 as se,dh as Ie,dn as Ee,dl as qe,dH as Pe,ew as $e,ex as Me,ey as A,ez as Ae,eA as He,dm as Oe,di as xe,dj as Ue,dk as Ne,cq as je,eB as Fe,eC as De,eD as Le,dc as Ve,eE as Qe,eF as ze,dD as x,eG as Je,co as N,c as Q,x as re,K as z,m as We}from"./index-weBGyocH.js";import{S as Ke}from"./constants-BRGHAWVM.js";import{U as P,a as H,e as K}from"./auth-BonfJbpi.js";function U(a){return!!a._zod}function b(a,e){return U(a)?ue(a,e):a.safeParse(e)}function oe(a){if(!a)return;let e;if(U(a)?e=a._zod?.def?.shape:e=a.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function Ge(a){if(U(a)){const o=a._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}const t=a._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const s=a.value;if(s!==void 0)return s}function R(a){return a==="completed"||a==="failed"||a==="cancelled"}function G(a){const t=oe(a)?.method;if(!t)throw new Error("Schema is missing a method literal");const s=Ge(t);if(typeof s!="string")throw new Error("Schema method literal must be a string");return s}function B(a,e){const t=b(a,e);if(!t.success)throw t.error;return t.data}const Be=6e4;class Ze{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(de,t=>{this._oncancel(t)}),this.setNotificationHandler(he,t=>{this._onprogress(t)}),this.setRequestHandler(fe,t=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(pe,async(t,s)=>{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new _(g.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(me,async(t,s)=>{const r=async()=>{const o=t.params.taskId;if(this._taskMessageQueue){let i;for(;i=await this._taskMessageQueue.dequeue(o,s.sessionId);){if(i.type==="response"||i.type==="error"){const u=i.message,p=u.id,l=this._requestResolvers.get(p);if(l)if(this._requestResolvers.delete(p),i.type==="response")l(u);else{const d=u,f=new _(d.error.code,d.error.message,d.error.data);l(f)}else{const d=i.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${p}`))}continue}await this._transport?.send(i.message,{relatedRequestId:s.requestId})}}const n=await this._taskStore.getTask(o,s.sessionId);if(!n)throw new _(g.InvalidParams,`Task not found: ${o}`);if(!R(n.status))return await this._waitForTaskUpdate(o,s.signal),await r();if(R(n.status)){const i=await this._taskStore.getTaskResult(o,s.sessionId);return this._clearTaskQueue(o),{...i,_meta:{...i._meta,[q]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(_e,async(t,s)=>{try{const{tasks:r,nextCursor:o}=await this._taskStore.listTasks(t.params?.cursor,s.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new _(g.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(we,async(t,s)=>{try{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new _(g.InvalidParams,`Task not found: ${t.params.taskId}`);if(R(r.status))throw new _(g.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(t.params.taskId,"cancelled","Client cancelled task execution.",s.sessionId),this._clearTaskQueue(t.params.taskId);const o=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!o)throw new _(g.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof _?r:new _(g.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,s,r,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:s,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const s=Date.now()-t.startTime;if(t.maxTotalTimeout&&s>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),_.fromError(g.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:s});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const s=this.transport?.onerror;this._transport.onerror=o=>{s?.(o),this._onerror(o)};const r=this._transport?.onmessage;this._transport.onmessage=(o,n)=>{r?.(o,n),M(o)||ge(o)?this._onresponse(o):D(o)?this._onrequest(o,n):Te(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const s of this._timeoutInfo.values())clearTimeout(s.timeoutId);this._timeoutInfo.clear();for(const s of this._requestHandlerAbortControllers.values())s.abort();this._requestHandlerAbortControllers.clear();const t=_.fromError(g.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const s of e.values())s(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(s=>this._onerror(new Error(`Uncaught error in notification handler: ${s}`)))}_onrequest(e,t){const s=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,o=e.params?._meta?.[q]?.taskId;if(s===void 0){const l={jsonrpc:"2.0",id:e.id,error:{code:g.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:l,timestamp:Date.now()},r?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):r?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}const n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);const i=ye(e.params)?e.params.task:void 0,u=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,p={signal:n.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(n.signal.aborted)return;const d={relatedRequestId:e.id};o&&(d.relatedTask={taskId:o}),await this.notification(l,d)},sendRequest:async(l,d,f)=>{if(n.signal.aborted)throw new _(g.ConnectionClosed,"Request was cancelled");const m={...f,relatedRequestId:e.id};o&&!m.relatedTask&&(m.relatedTask={taskId:o});const T=m.relatedTask?.taskId??o;return T&&u&&await u.updateTaskStatus(T,"input_required"),await this.request(l,d,m)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:o,taskStore:u,taskRequestedTtl:i?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{i&&this.assertTaskHandlerCapability(e.method)}).then(()=>s(e,p)).then(async l=>{if(n.signal.aborted)return;const d={result:l,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)},async l=>{if(n.signal.aborted)return;const d={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:g.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===n&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...s}=e.params,r=Number(t),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const n=this._responseHandlers.get(r),i=this._timeoutInfo.get(r);if(i&&n&&i.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(u){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),n(u);return}o(s)}_onresponse(e){const t=Number(e.id),s=this._requestResolvers.get(t);if(s){if(this._requestResolvers.delete(t),M(e))s(e);else{const n=new _(e.error.code,e.error.message,e.error.data);s(n)}return}const r=this._responseHandlers.get(t);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let o=!1;if(M(e)&&e.result&&typeof e.result=="object"){const n=e.result;if(n.task&&typeof n.task=="object"){const i=n.task;typeof i.taskId=="string"&&(o=!0,this._taskProgressTokens.set(i.taskId,t))}}if(o||this._progressHandlers.delete(t),M(e))r(e);else{const n=_.fromError(e.error.code,e.error.message,e.error.data);r(n)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,s){const{task:r}=s??{};if(!r){try{yield{type:"result",result:await this.request(e,t,s)}}catch(n){yield{type:"error",error:n instanceof _?n:new _(g.InternalError,String(n))}}return}let o;try{const n=await this.request(e,L,s);if(n.task)o=n.task.taskId,yield{type:"taskCreated",task:n.task};else throw new _(g.InternalError,"Task creation did not return a task");for(;;){const i=await this.getTask({taskId:o},s);if(yield{type:"taskStatus",task:i},R(i.status)){i.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},t,s)}:i.status==="failed"?yield{type:"error",error:new _(g.InternalError,`Task ${o} failed`)}:i.status==="cancelled"&&(yield{type:"error",error:new _(g.InternalError,`Task ${o} was cancelled`)});return}if(i.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},t,s)};return}const u=i.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(p=>setTimeout(p,u)),s?.signal?.throwIfAborted()}}catch(n){yield{type:"error",error:n instanceof _?n:new _(g.InternalError,String(n))}}}request(e,t,s){const{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n,task:i,relatedTask:u}=s??{};return new Promise((p,l)=>{const d=c=>{l(c)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),i&&this.assertTaskCapability(e.method)}catch(c){d(c);return}s?.signal?.throwIfAborted();const f=this._requestMessageId++,m={...e,jsonrpc:"2.0",id:f};s?.onprogress&&(this._progressHandlers.set(f,s.onprogress),m.params={...e.params,_meta:{...e.params?._meta||{},progressToken:f}}),i&&(m.params={...m.params,task:i}),u&&(m.params={...m.params,_meta:{...m.params?._meta||{},[q]:u}});const T=c=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(c)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n}).catch(v=>this._onerror(new Error(`Failed to send cancellation: ${v}`)));const w=c instanceof _?c:new _(g.RequestTimeout,String(c));l(w)};this._responseHandlers.set(f,c=>{if(!s?.signal?.aborted){if(c instanceof Error)return l(c);try{const w=b(t,c.result);w.success?p(w.data):l(w.error)}catch(w){l(w)}}}),s?.signal?.addEventListener("abort",()=>{T(s?.signal?.reason)});const y=s?.timeout??Be,k=()=>T(_.fromError(g.RequestTimeout,"Request timed out",{timeout:y}));this._setupTimeout(f,y,s?.maxTotalTimeout,k,s?.resetTimeoutOnProgress??!1);const h=u?.taskId;if(h){const c=w=>{const v=this._responseHandlers.get(f);v?v(w):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,c),this._enqueueTaskMessage(h,{type:"request",message:m,timestamp:Date.now()}).catch(w=>{this._cleanupTimeout(f),l(w)})}else this._transport.send(m,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n}).catch(c=>{this._cleanupTimeout(f),l(c)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},ke,t)}async getTaskResult(e,t,s){return this.request({method:"tasks/result",params:e},t,s)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},ve,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},Se,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const s=t?.relatedTask?.taskId;if(s){const i={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[q]:t.relatedTask}}};await this._enqueueTaskMessage(s,{type:"notification",message:i,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let i={...e,jsonrpc:"2.0"};t?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[q]:t.relatedTask}}}),this._transport?.send(i,t).catch(u=>this._onerror(u))});return}let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[q]:t.relatedTask}}}),await this._transport.send(n,t)}setRequestHandler(e,t){const s=G(e);this.assertRequestHandlerCapability(s),this._requestHandlers.set(s,(r,o)=>{const n=B(e,r);return Promise.resolve(t(n,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const s=G(e);this._notificationHandlers.set(s,r=>{const o=B(e,r);return Promise.resolve(t(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,s){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,s,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const s=await this._taskMessageQueue.dequeueAll(e,t);for(const r of s)if(r.type==="request"&&D(r.message)){const o=r.message.id,n=this._requestResolvers.get(o);n?(n(new _(g.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let s=this._options?.defaultTaskPollInterval??1e3;try{const r=await this._taskStore?.getTask(e);r?.pollInterval&&(s=r.pollInterval)}catch{}return new Promise((r,o)=>{if(t.aborted){o(new _(g.InvalidRequest,"Request cancelled"));return}const n=setTimeout(r,s);t.addEventListener("abort",()=>{clearTimeout(n),o(new _(g.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const s=this._taskStore;if(!s)throw new Error("No task store configured");return{createTask:async r=>{if(!e)throw new Error("No request provided");return await s.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async r=>{const o=await s.getTask(r,t);if(!o)throw new _(g.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,n)=>{await s.storeTaskResult(r,o,n,t);const i=await s.getTask(r,t);if(i){const u=W.parse({method:"notifications/tasks/status",params:i});await this.notification(u),R(i.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>s.getTaskResult(r,t),updateTaskStatus:async(r,o,n)=>{const i=await s.getTask(r,t);if(!i)throw new _(g.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(R(i.status))throw new _(g.InvalidParams,`Cannot update task "${r}" from terminal status "${i.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await s.updateTaskStatus(r,o,n,t);const u=await s.getTask(r,t);if(u){const p=W.parse({method:"notifications/tasks/status",params:u});await this.notification(p),R(u.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>s.listTasks(r,t)}}}function Z(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)}function Ye(a,e){const t={...a};for(const s in e){const r=s,o=e[r];if(o===void 0)continue;const n=t[r];Z(n)&&Z(o)?t[r]={...n,...o}:t[r]=o}return t}var Xe=be();const et=Ce(Xe);function tt(){const a=new et({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Re(a),a}class st{constructor(e){this._ajv=e??tt()}getValidator(e){const t="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return s=>t(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}}class rt{constructor(e){this._client=e}async*callToolStream(e,t=se,s){const r=this._client,o={...s,task:s?.task??(r.isToolTask(e.name)?{}:void 0)},n=r.requestStream({method:"tools/call",params:e},t,o),i=r.getToolOutputValidator(e.name);for await(const u of n){if(u.type==="result"&&i){const p=u.result;if(!p.structuredContent&&!p.isError){yield{type:"error",error:new _(g.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(p.structuredContent)try{const l=i(p.structuredContent);if(!l.valid){yield{type:"error",error:new _(g.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof _){yield{type:"error",error:l};return}yield{type:"error",error:new _(g.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)};return}}yield u}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,s){return this._client.getTaskResult({taskId:e},t,s)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,s){return this._client.requestStream(e,t,s)}}function ot(a,e,t){if(!a)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!a.tools?.call)throw new Error(`${t} does not support task creation for tools/call (required for ${e})`);break}}function at(a,e,t){if(!a)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!a.sampling?.createMessage)throw new Error(`${t} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!a.elicitation?.create)throw new Error(`${t} does not support task creation for elicitation/create (required for ${e})`);break}}function O(a,e){if(!(!a||e===null||typeof e!="object")){if(a.type==="object"&&a.properties&&typeof a.properties=="object"){const t=e,s=a.properties;for(const r of Object.keys(s)){const o=s[r];t[r]===void 0&&Object.prototype.hasOwnProperty.call(o,"default")&&(t[r]=o.default),t[r]!==void 0&&O(o,t[r])}}if(Array.isArray(a.anyOf))for(const t of a.anyOf)typeof t!="boolean"&&O(t,e);if(Array.isArray(a.oneOf))for(const t of a.oneOf)typeof t!="boolean"&&O(t,e)}}function nt(a){if(!a)return{supportsFormMode:!1,supportsUrlMode:!1};const e=a.form!==void 0,t=a.url!==void 0;return{supportsFormMode:e||!e&&!t,supportsUrlMode:t}}let it=class extends Ze{constructor(e,t){super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new st,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",Ie,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",Ee,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",qe,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new rt(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Ye(this._capabilities,e)}setRequestHandler(e,t){const r=oe(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o;if(U(r)){const i=r;o=i._zod?.def?.value??i.value}else{const i=r;o=i._def?.value??i.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");const n=o;if(n==="elicitation/create"){const i=async(u,p)=>{const l=b(De,u);if(!l.success){const c=l.error instanceof Error?l.error.message:String(l.error);throw new _(g.InvalidParams,`Invalid elicitation request: ${c}`)}const{params:d}=l.data;d.mode=d.mode??"form";const{supportsFormMode:f,supportsUrlMode:m}=nt(this._capabilities.elicitation);if(d.mode==="form"&&!f)throw new _(g.InvalidParams,"Client does not support form-mode elicitation requests");if(d.mode==="url"&&!m)throw new _(g.InvalidParams,"Client does not support URL-mode elicitation requests");const T=await Promise.resolve(t(u,p));if(d.task){const c=b(L,T);if(!c.success){const w=c.error instanceof Error?c.error.message:String(c.error);throw new _(g.InvalidParams,`Invalid task creation result: ${w}`)}return c.data}const y=b(Le,T);if(!y.success){const c=y.error instanceof Error?y.error.message:String(y.error);throw new _(g.InvalidParams,`Invalid elicitation result: ${c}`)}const k=y.data,h=d.mode==="form"?d.requestedSchema:void 0;if(d.mode==="form"&&k.action==="accept"&&k.content&&h&&this._capabilities.elicitation?.form?.applyDefaults)try{O(h,k.content)}catch{}return k};return super.setRequestHandler(e,i)}if(n==="sampling/createMessage"){const i=async(u,p)=>{const l=b(Ve,u);if(!l.success){const k=l.error instanceof Error?l.error.message:String(l.error);throw new _(g.InvalidParams,`Invalid sampling request: ${k}`)}const{params:d}=l.data,f=await Promise.resolve(t(u,p));if(d.task){const k=b(L,f);if(!k.success){const h=k.error instanceof Error?k.error.message:String(k.error);throw new _(g.InvalidParams,`Invalid task creation result: ${h}`)}return k.data}const T=d.tools||d.toolChoice?Qe:ze,y=b(T,f);if(!y.success){const k=y.error instanceof Error?y.error.message:String(y.error);throw new _(g.InvalidParams,`Invalid sampling result: ${k}`)}return y.data};return super.setRequestHandler(e,i)}return super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId===void 0)try{const s=await this.request({method:"initialize",params:{protocolVersion:Pe,capabilities:this._capabilities,clientInfo:this._clientInfo}},$e,t);if(s===void 0)throw new Error(`Server sent invalid initialize result: ${s}`);if(!Me.includes(s.protocolVersion))throw new Error(`Server's protocol version is not supported: ${s.protocolVersion}`);this._serverCapabilities=s.capabilities,this._serverVersion=s.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(s.protocolVersion),this._instructions=s.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(s){throw this.close(),s}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break}}assertTaskCapability(e){ot(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&at(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},A,e)}async complete(e,t){return this.request({method:"completion/complete",params:e},Ae,t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},A,t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},He,t)}async listPrompts(e,t){return this.request({method:"prompts/list",params:e},Oe,t)}async listResources(e,t){return this.request({method:"resources/list",params:e},xe,t)}async listResourceTemplates(e,t){return this.request({method:"resources/templates/list",params:e},Ue,t)}async readResource(e,t){return this.request({method:"resources/read",params:e},Ne,t)}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},A,t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},A,t)}async callTool(e,t=se,s){if(this.isToolTaskRequired(e.name))throw new _(g.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const r=await this.request({method:"tools/call",params:e},t,s),o=this.getToolOutputValidator(e.name);if(o){if(!r.structuredContent&&!r.isError)throw new _(g.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(r.structuredContent)try{const n=o(r.structuredContent);if(!n.valid)throw new _(g.InvalidParams,`Structured content does not match the tool's output schema: ${n.errorMessage}`)}catch(n){throw n instanceof _?n:new _(g.InvalidParams,`Failed to validate structured content: ${n instanceof Error?n.message:String(n)}`)}}return r}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const t of e){if(t.outputSchema){const r=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,r)}const s=t.execution?.taskSupport;(s==="required"||s==="optional")&&this._cachedKnownTaskTools.add(t.name),s==="required"&&this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){const s=await this.request({method:"tools/list",params:e},je,t);return this.cacheToolMetadata(s.tools),s}_setupListChangedHandler(e,t,s,r){const o=Fe.safeParse(s);if(!o.success)throw new Error(`Invalid ${e} listChanged options: ${o.error.message}`);if(typeof s.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);const{autoRefresh:n,debounceMs:i}=o.data,{onChanged:u}=s,p=async()=>{if(!n){u(null,null);return}try{const d=await r();u(null,d)}catch(d){const f=d instanceof Error?d:new Error(String(d));u(f,null)}},l=()=>{if(i){const d=this._listChangedDebounceTimers.get(e);d&&clearTimeout(d);const f=setTimeout(p,i);this._listChangedDebounceTimers.set(e,f)}else p()};this.setNotificationHandler(t,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};const j=a=>[{type:"text",text:a}];function ct(a){const e=x(a,typeof window<"u"?window.location.origin:void 0);if(!e)throw new Error("RestSelfClient requires either studioUrl or a browser environment.");const t={"Content-Type":"application/json",Accept:"application/json",...a.token?{Authorization:`Bearer ${a.token}`}:{}},s=u=>new URL(`/api/${encodeURIComponent(a.orgSlug)}${u}`,e).href,r=async u=>{let p;try{p=await fetch(s(`/tools/${encodeURIComponent(u.name)}`),{method:"POST",headers:t,credentials:"include",body:JSON.stringify(u.arguments??{})})}catch(d){const f=d instanceof Error?d.message:"Network error";return{content:j(f),isError:!0}}if(!p.ok){let d=`${u.name} failed (${p.status})`;try{const f=await p.json();f?.error&&(d=f.error)}catch{}return{content:j(d),isError:!0}}const l=await p.json().catch(()=>({}));return{content:j(typeof l=="string"?l:JSON.stringify(l)),structuredContent:l}},o=async()=>{const u=await fetch(s("/tools"),{method:"GET",headers:t,credentials:"include"});return u.ok?await u.json():{tools:[]}},n=u=>()=>Promise.reject(new Error(`RestSelfClient: ${u} is not supported over REST for the self connection`));return{callTool:r,listTools:o,listPrompts:n("listPrompts"),getPrompt:n("getPrompt"),listResources:n("listResources"),readResource:n("readResource"),listResourceTemplates:n("listResourceTemplates"),close:()=>Promise.resolve(),toJSON:()=>a.toJSONString}}function V(a){return a?a instanceof Headers?Object.fromEntries(a.entries()):Array.isArray(a)?Object.fromEntries(a):{...a}:{}}function lt(a=fetch,e){return e?async(t,s)=>{const r={...e,...s,headers:s?.headers?{...V(e.headers),...V(s.headers)}:e.headers};return a(t,r)}:a}class Y extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}const X=10,ut=13,I=32;function F(a){}function dt(a){if(typeof a=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:e=F,onError:t=F,onRetry:s=F,onComment:r}=a,o=[];let n=!0,i,u="",p=0,l;function d(h){if(n&&(n=!1,h.charCodeAt(0)===239&&h.charCodeAt(1)===187&&h.charCodeAt(2)===191&&(h=h.slice(3))),o.length===0){const v=f(h);v!==""&&o.push(v);return}if(h.indexOf(`
1
+ import{ee as ue,ef as de,eg as he,da as fe,eh as pe,cM as _,cN as g,ei as me,ej as _e,ek as we,el as M,em as ge,en as D,eo as Te,ep as q,eq as ye,er as L,es as ke,et as ve,eu as Se,ev as W,cs as Ce,cu as be,cp as Re,d5 as se,dh as Ie,dn as Ee,dl as qe,dH as Pe,ew as $e,ex as Me,ey as A,ez as Ae,eA as He,dm as Oe,di as xe,dj as Ue,dk as Ne,cq as je,eB as Fe,eC as De,eD as Le,dc as Ve,eE as Qe,eF as ze,dD as x,eG as Je,co as N,c as Q,x as re,K as z,m as We}from"./index-BYFW0DhO.js";import{S as Ke}from"./constants-BRGHAWVM.js";import{U as P,a as H,e as K}from"./auth-BEBPh5eQ.js";function U(a){return!!a._zod}function b(a,e){return U(a)?ue(a,e):a.safeParse(e)}function oe(a){if(!a)return;let e;if(U(a)?e=a._zod?.def?.shape:e=a.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function Ge(a){if(U(a)){const o=a._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}const t=a._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const s=a.value;if(s!==void 0)return s}function R(a){return a==="completed"||a==="failed"||a==="cancelled"}function G(a){const t=oe(a)?.method;if(!t)throw new Error("Schema is missing a method literal");const s=Ge(t);if(typeof s!="string")throw new Error("Schema method literal must be a string");return s}function B(a,e){const t=b(a,e);if(!t.success)throw t.error;return t.data}const Be=6e4;class Ze{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(de,t=>{this._oncancel(t)}),this.setNotificationHandler(he,t=>{this._onprogress(t)}),this.setRequestHandler(fe,t=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(pe,async(t,s)=>{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new _(g.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(me,async(t,s)=>{const r=async()=>{const o=t.params.taskId;if(this._taskMessageQueue){let i;for(;i=await this._taskMessageQueue.dequeue(o,s.sessionId);){if(i.type==="response"||i.type==="error"){const u=i.message,p=u.id,l=this._requestResolvers.get(p);if(l)if(this._requestResolvers.delete(p),i.type==="response")l(u);else{const d=u,f=new _(d.error.code,d.error.message,d.error.data);l(f)}else{const d=i.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${p}`))}continue}await this._transport?.send(i.message,{relatedRequestId:s.requestId})}}const n=await this._taskStore.getTask(o,s.sessionId);if(!n)throw new _(g.InvalidParams,`Task not found: ${o}`);if(!R(n.status))return await this._waitForTaskUpdate(o,s.signal),await r();if(R(n.status)){const i=await this._taskStore.getTaskResult(o,s.sessionId);return this._clearTaskQueue(o),{...i,_meta:{...i._meta,[q]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(_e,async(t,s)=>{try{const{tasks:r,nextCursor:o}=await this._taskStore.listTasks(t.params?.cursor,s.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new _(g.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(we,async(t,s)=>{try{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new _(g.InvalidParams,`Task not found: ${t.params.taskId}`);if(R(r.status))throw new _(g.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(t.params.taskId,"cancelled","Client cancelled task execution.",s.sessionId),this._clearTaskQueue(t.params.taskId);const o=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!o)throw new _(g.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof _?r:new _(g.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,s,r,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:s,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const s=Date.now()-t.startTime;if(t.maxTotalTimeout&&s>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),_.fromError(g.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:s});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const s=this.transport?.onerror;this._transport.onerror=o=>{s?.(o),this._onerror(o)};const r=this._transport?.onmessage;this._transport.onmessage=(o,n)=>{r?.(o,n),M(o)||ge(o)?this._onresponse(o):D(o)?this._onrequest(o,n):Te(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const s of this._timeoutInfo.values())clearTimeout(s.timeoutId);this._timeoutInfo.clear();for(const s of this._requestHandlerAbortControllers.values())s.abort();this._requestHandlerAbortControllers.clear();const t=_.fromError(g.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const s of e.values())s(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(s=>this._onerror(new Error(`Uncaught error in notification handler: ${s}`)))}_onrequest(e,t){const s=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,o=e.params?._meta?.[q]?.taskId;if(s===void 0){const l={jsonrpc:"2.0",id:e.id,error:{code:g.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:l,timestamp:Date.now()},r?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):r?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}const n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);const i=ye(e.params)?e.params.task:void 0,u=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,p={signal:n.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(n.signal.aborted)return;const d={relatedRequestId:e.id};o&&(d.relatedTask={taskId:o}),await this.notification(l,d)},sendRequest:async(l,d,f)=>{if(n.signal.aborted)throw new _(g.ConnectionClosed,"Request was cancelled");const m={...f,relatedRequestId:e.id};o&&!m.relatedTask&&(m.relatedTask={taskId:o});const T=m.relatedTask?.taskId??o;return T&&u&&await u.updateTaskStatus(T,"input_required"),await this.request(l,d,m)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:o,taskStore:u,taskRequestedTtl:i?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{i&&this.assertTaskHandlerCapability(e.method)}).then(()=>s(e,p)).then(async l=>{if(n.signal.aborted)return;const d={result:l,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)},async l=>{if(n.signal.aborted)return;const d={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:g.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===n&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...s}=e.params,r=Number(t),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const n=this._responseHandlers.get(r),i=this._timeoutInfo.get(r);if(i&&n&&i.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(u){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),n(u);return}o(s)}_onresponse(e){const t=Number(e.id),s=this._requestResolvers.get(t);if(s){if(this._requestResolvers.delete(t),M(e))s(e);else{const n=new _(e.error.code,e.error.message,e.error.data);s(n)}return}const r=this._responseHandlers.get(t);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let o=!1;if(M(e)&&e.result&&typeof e.result=="object"){const n=e.result;if(n.task&&typeof n.task=="object"){const i=n.task;typeof i.taskId=="string"&&(o=!0,this._taskProgressTokens.set(i.taskId,t))}}if(o||this._progressHandlers.delete(t),M(e))r(e);else{const n=_.fromError(e.error.code,e.error.message,e.error.data);r(n)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,s){const{task:r}=s??{};if(!r){try{yield{type:"result",result:await this.request(e,t,s)}}catch(n){yield{type:"error",error:n instanceof _?n:new _(g.InternalError,String(n))}}return}let o;try{const n=await this.request(e,L,s);if(n.task)o=n.task.taskId,yield{type:"taskCreated",task:n.task};else throw new _(g.InternalError,"Task creation did not return a task");for(;;){const i=await this.getTask({taskId:o},s);if(yield{type:"taskStatus",task:i},R(i.status)){i.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},t,s)}:i.status==="failed"?yield{type:"error",error:new _(g.InternalError,`Task ${o} failed`)}:i.status==="cancelled"&&(yield{type:"error",error:new _(g.InternalError,`Task ${o} was cancelled`)});return}if(i.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},t,s)};return}const u=i.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(p=>setTimeout(p,u)),s?.signal?.throwIfAborted()}}catch(n){yield{type:"error",error:n instanceof _?n:new _(g.InternalError,String(n))}}}request(e,t,s){const{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n,task:i,relatedTask:u}=s??{};return new Promise((p,l)=>{const d=c=>{l(c)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),i&&this.assertTaskCapability(e.method)}catch(c){d(c);return}s?.signal?.throwIfAborted();const f=this._requestMessageId++,m={...e,jsonrpc:"2.0",id:f};s?.onprogress&&(this._progressHandlers.set(f,s.onprogress),m.params={...e.params,_meta:{...e.params?._meta||{},progressToken:f}}),i&&(m.params={...m.params,task:i}),u&&(m.params={...m.params,_meta:{...m.params?._meta||{},[q]:u}});const T=c=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(c)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n}).catch(v=>this._onerror(new Error(`Failed to send cancellation: ${v}`)));const w=c instanceof _?c:new _(g.RequestTimeout,String(c));l(w)};this._responseHandlers.set(f,c=>{if(!s?.signal?.aborted){if(c instanceof Error)return l(c);try{const w=b(t,c.result);w.success?p(w.data):l(w.error)}catch(w){l(w)}}}),s?.signal?.addEventListener("abort",()=>{T(s?.signal?.reason)});const y=s?.timeout??Be,k=()=>T(_.fromError(g.RequestTimeout,"Request timed out",{timeout:y}));this._setupTimeout(f,y,s?.maxTotalTimeout,k,s?.resetTimeoutOnProgress??!1);const h=u?.taskId;if(h){const c=w=>{const v=this._responseHandlers.get(f);v?v(w):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,c),this._enqueueTaskMessage(h,{type:"request",message:m,timestamp:Date.now()}).catch(w=>{this._cleanupTimeout(f),l(w)})}else this._transport.send(m,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n}).catch(c=>{this._cleanupTimeout(f),l(c)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},ke,t)}async getTaskResult(e,t,s){return this.request({method:"tasks/result",params:e},t,s)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},ve,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},Se,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const s=t?.relatedTask?.taskId;if(s){const i={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[q]:t.relatedTask}}};await this._enqueueTaskMessage(s,{type:"notification",message:i,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let i={...e,jsonrpc:"2.0"};t?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[q]:t.relatedTask}}}),this._transport?.send(i,t).catch(u=>this._onerror(u))});return}let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[q]:t.relatedTask}}}),await this._transport.send(n,t)}setRequestHandler(e,t){const s=G(e);this.assertRequestHandlerCapability(s),this._requestHandlers.set(s,(r,o)=>{const n=B(e,r);return Promise.resolve(t(n,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const s=G(e);this._notificationHandlers.set(s,r=>{const o=B(e,r);return Promise.resolve(t(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,s){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,s,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const s=await this._taskMessageQueue.dequeueAll(e,t);for(const r of s)if(r.type==="request"&&D(r.message)){const o=r.message.id,n=this._requestResolvers.get(o);n?(n(new _(g.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let s=this._options?.defaultTaskPollInterval??1e3;try{const r=await this._taskStore?.getTask(e);r?.pollInterval&&(s=r.pollInterval)}catch{}return new Promise((r,o)=>{if(t.aborted){o(new _(g.InvalidRequest,"Request cancelled"));return}const n=setTimeout(r,s);t.addEventListener("abort",()=>{clearTimeout(n),o(new _(g.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const s=this._taskStore;if(!s)throw new Error("No task store configured");return{createTask:async r=>{if(!e)throw new Error("No request provided");return await s.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async r=>{const o=await s.getTask(r,t);if(!o)throw new _(g.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,n)=>{await s.storeTaskResult(r,o,n,t);const i=await s.getTask(r,t);if(i){const u=W.parse({method:"notifications/tasks/status",params:i});await this.notification(u),R(i.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>s.getTaskResult(r,t),updateTaskStatus:async(r,o,n)=>{const i=await s.getTask(r,t);if(!i)throw new _(g.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(R(i.status))throw new _(g.InvalidParams,`Cannot update task "${r}" from terminal status "${i.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await s.updateTaskStatus(r,o,n,t);const u=await s.getTask(r,t);if(u){const p=W.parse({method:"notifications/tasks/status",params:u});await this.notification(p),R(u.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>s.listTasks(r,t)}}}function Z(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)}function Ye(a,e){const t={...a};for(const s in e){const r=s,o=e[r];if(o===void 0)continue;const n=t[r];Z(n)&&Z(o)?t[r]={...n,...o}:t[r]=o}return t}var Xe=be();const et=Ce(Xe);function tt(){const a=new et({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Re(a),a}class st{constructor(e){this._ajv=e??tt()}getValidator(e){const t="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return s=>t(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}}class rt{constructor(e){this._client=e}async*callToolStream(e,t=se,s){const r=this._client,o={...s,task:s?.task??(r.isToolTask(e.name)?{}:void 0)},n=r.requestStream({method:"tools/call",params:e},t,o),i=r.getToolOutputValidator(e.name);for await(const u of n){if(u.type==="result"&&i){const p=u.result;if(!p.structuredContent&&!p.isError){yield{type:"error",error:new _(g.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(p.structuredContent)try{const l=i(p.structuredContent);if(!l.valid){yield{type:"error",error:new _(g.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof _){yield{type:"error",error:l};return}yield{type:"error",error:new _(g.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)};return}}yield u}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,s){return this._client.getTaskResult({taskId:e},t,s)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,s){return this._client.requestStream(e,t,s)}}function ot(a,e,t){if(!a)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!a.tools?.call)throw new Error(`${t} does not support task creation for tools/call (required for ${e})`);break}}function at(a,e,t){if(!a)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!a.sampling?.createMessage)throw new Error(`${t} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!a.elicitation?.create)throw new Error(`${t} does not support task creation for elicitation/create (required for ${e})`);break}}function O(a,e){if(!(!a||e===null||typeof e!="object")){if(a.type==="object"&&a.properties&&typeof a.properties=="object"){const t=e,s=a.properties;for(const r of Object.keys(s)){const o=s[r];t[r]===void 0&&Object.prototype.hasOwnProperty.call(o,"default")&&(t[r]=o.default),t[r]!==void 0&&O(o,t[r])}}if(Array.isArray(a.anyOf))for(const t of a.anyOf)typeof t!="boolean"&&O(t,e);if(Array.isArray(a.oneOf))for(const t of a.oneOf)typeof t!="boolean"&&O(t,e)}}function nt(a){if(!a)return{supportsFormMode:!1,supportsUrlMode:!1};const e=a.form!==void 0,t=a.url!==void 0;return{supportsFormMode:e||!e&&!t,supportsUrlMode:t}}let it=class extends Ze{constructor(e,t){super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new st,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",Ie,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",Ee,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",qe,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new rt(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Ye(this._capabilities,e)}setRequestHandler(e,t){const r=oe(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o;if(U(r)){const i=r;o=i._zod?.def?.value??i.value}else{const i=r;o=i._def?.value??i.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");const n=o;if(n==="elicitation/create"){const i=async(u,p)=>{const l=b(De,u);if(!l.success){const c=l.error instanceof Error?l.error.message:String(l.error);throw new _(g.InvalidParams,`Invalid elicitation request: ${c}`)}const{params:d}=l.data;d.mode=d.mode??"form";const{supportsFormMode:f,supportsUrlMode:m}=nt(this._capabilities.elicitation);if(d.mode==="form"&&!f)throw new _(g.InvalidParams,"Client does not support form-mode elicitation requests");if(d.mode==="url"&&!m)throw new _(g.InvalidParams,"Client does not support URL-mode elicitation requests");const T=await Promise.resolve(t(u,p));if(d.task){const c=b(L,T);if(!c.success){const w=c.error instanceof Error?c.error.message:String(c.error);throw new _(g.InvalidParams,`Invalid task creation result: ${w}`)}return c.data}const y=b(Le,T);if(!y.success){const c=y.error instanceof Error?y.error.message:String(y.error);throw new _(g.InvalidParams,`Invalid elicitation result: ${c}`)}const k=y.data,h=d.mode==="form"?d.requestedSchema:void 0;if(d.mode==="form"&&k.action==="accept"&&k.content&&h&&this._capabilities.elicitation?.form?.applyDefaults)try{O(h,k.content)}catch{}return k};return super.setRequestHandler(e,i)}if(n==="sampling/createMessage"){const i=async(u,p)=>{const l=b(Ve,u);if(!l.success){const k=l.error instanceof Error?l.error.message:String(l.error);throw new _(g.InvalidParams,`Invalid sampling request: ${k}`)}const{params:d}=l.data,f=await Promise.resolve(t(u,p));if(d.task){const k=b(L,f);if(!k.success){const h=k.error instanceof Error?k.error.message:String(k.error);throw new _(g.InvalidParams,`Invalid task creation result: ${h}`)}return k.data}const T=d.tools||d.toolChoice?Qe:ze,y=b(T,f);if(!y.success){const k=y.error instanceof Error?y.error.message:String(y.error);throw new _(g.InvalidParams,`Invalid sampling result: ${k}`)}return y.data};return super.setRequestHandler(e,i)}return super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId===void 0)try{const s=await this.request({method:"initialize",params:{protocolVersion:Pe,capabilities:this._capabilities,clientInfo:this._clientInfo}},$e,t);if(s===void 0)throw new Error(`Server sent invalid initialize result: ${s}`);if(!Me.includes(s.protocolVersion))throw new Error(`Server's protocol version is not supported: ${s.protocolVersion}`);this._serverCapabilities=s.capabilities,this._serverVersion=s.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(s.protocolVersion),this._instructions=s.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(s){throw this.close(),s}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break}}assertTaskCapability(e){ot(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&at(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},A,e)}async complete(e,t){return this.request({method:"completion/complete",params:e},Ae,t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},A,t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},He,t)}async listPrompts(e,t){return this.request({method:"prompts/list",params:e},Oe,t)}async listResources(e,t){return this.request({method:"resources/list",params:e},xe,t)}async listResourceTemplates(e,t){return this.request({method:"resources/templates/list",params:e},Ue,t)}async readResource(e,t){return this.request({method:"resources/read",params:e},Ne,t)}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},A,t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},A,t)}async callTool(e,t=se,s){if(this.isToolTaskRequired(e.name))throw new _(g.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const r=await this.request({method:"tools/call",params:e},t,s),o=this.getToolOutputValidator(e.name);if(o){if(!r.structuredContent&&!r.isError)throw new _(g.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(r.structuredContent)try{const n=o(r.structuredContent);if(!n.valid)throw new _(g.InvalidParams,`Structured content does not match the tool's output schema: ${n.errorMessage}`)}catch(n){throw n instanceof _?n:new _(g.InvalidParams,`Failed to validate structured content: ${n instanceof Error?n.message:String(n)}`)}}return r}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const t of e){if(t.outputSchema){const r=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,r)}const s=t.execution?.taskSupport;(s==="required"||s==="optional")&&this._cachedKnownTaskTools.add(t.name),s==="required"&&this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){const s=await this.request({method:"tools/list",params:e},je,t);return this.cacheToolMetadata(s.tools),s}_setupListChangedHandler(e,t,s,r){const o=Fe.safeParse(s);if(!o.success)throw new Error(`Invalid ${e} listChanged options: ${o.error.message}`);if(typeof s.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);const{autoRefresh:n,debounceMs:i}=o.data,{onChanged:u}=s,p=async()=>{if(!n){u(null,null);return}try{const d=await r();u(null,d)}catch(d){const f=d instanceof Error?d:new Error(String(d));u(f,null)}},l=()=>{if(i){const d=this._listChangedDebounceTimers.get(e);d&&clearTimeout(d);const f=setTimeout(p,i);this._listChangedDebounceTimers.set(e,f)}else p()};this.setNotificationHandler(t,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};const j=a=>[{type:"text",text:a}];function ct(a){const e=x(a,typeof window<"u"?window.location.origin:void 0);if(!e)throw new Error("RestSelfClient requires either studioUrl or a browser environment.");const t={"Content-Type":"application/json",Accept:"application/json",...a.token?{Authorization:`Bearer ${a.token}`}:{}},s=u=>new URL(`/api/${encodeURIComponent(a.orgSlug)}${u}`,e).href,r=async u=>{let p;try{p=await fetch(s(`/tools/${encodeURIComponent(u.name)}`),{method:"POST",headers:t,credentials:"include",body:JSON.stringify(u.arguments??{})})}catch(d){const f=d instanceof Error?d.message:"Network error";return{content:j(f),isError:!0}}if(!p.ok){let d=`${u.name} failed (${p.status})`;try{const f=await p.json();f?.error&&(d=f.error)}catch{}return{content:j(d),isError:!0}}const l=await p.json().catch(()=>({}));return{content:j(typeof l=="string"?l:JSON.stringify(l)),structuredContent:l}},o=async()=>{const u=await fetch(s("/tools"),{method:"GET",headers:t,credentials:"include"});return u.ok?await u.json():{tools:[]}},n=u=>()=>Promise.reject(new Error(`RestSelfClient: ${u} is not supported over REST for the self connection`));return{callTool:r,listTools:o,listPrompts:n("listPrompts"),getPrompt:n("getPrompt"),listResources:n("listResources"),readResource:n("readResource"),listResourceTemplates:n("listResourceTemplates"),close:()=>Promise.resolve(),toJSON:()=>a.toJSONString}}function V(a){return a?a instanceof Headers?Object.fromEntries(a.entries()):Array.isArray(a)?Object.fromEntries(a):{...a}:{}}function lt(a=fetch,e){return e?async(t,s)=>{const r={...e,...s,headers:s?.headers?{...V(e.headers),...V(s.headers)}:e.headers};return a(t,r)}:a}class Y extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}const X=10,ut=13,I=32;function F(a){}function dt(a){if(typeof a=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:e=F,onError:t=F,onRetry:s=F,onComment:r}=a,o=[];let n=!0,i,u="",p=0,l;function d(h){if(n&&(n=!1,h.charCodeAt(0)===239&&h.charCodeAt(1)===187&&h.charCodeAt(2)===191&&(h=h.slice(3))),o.length===0){const v=f(h);v!==""&&o.push(v);return}if(h.indexOf(`
2
2
  `)===-1&&h.indexOf("\r")===-1){o.push(h);return}o.push(h);const c=o.join("");o.length=0;const w=f(c);w!==""&&o.push(w)}function f(h){let c=0;if(h.indexOf("\r")===-1){let w=h.indexOf(`
3
3
  `,c);for(;w!==-1;){if(c===w){p>0&&e({id:i,event:l,data:u}),i=void 0,u="",p=0,l=void 0,c=w+1,w=h.indexOf(`
4
4
  `,c);continue}const v=h.charCodeAt(c);if(ee(h,c,v)){const S=h.charCodeAt(c+5)===I?c+6:c+5,C=h.slice(S,w);if(p===0&&h.charCodeAt(w+1)===X){e({id:i,event:l,data:C}),i=void 0,u="",l=void 0,c=w+2,w=h.indexOf(`
@@ -1 +1 @@
1
- import{c as l,m as u,cM as m,cN as f,x as y,K as n}from"./index-weBGyocH.js";async function c(r){if(!r.getServerCapabilities()?.prompts)return{prompts:[]};try{return await r.listPrompts()}catch(t){if(t instanceof m&&t.code===f.MethodNotFound)return{prompts:[]};throw t}}async function b(r,e,t){if(!r.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await r.getPrompt({name:e,arguments:t??{}})}function g(r){const e=l.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=()=>c(t),e[5]=t,e[6]=o):o=e[6];const p=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==i||e[9]!==o||e[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},e[7]=s,e[8]=i,e[9]=o,e[10]=p,e[11]=a):a=e[11],y(a)}function q(r){const e=l.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=()=>c(t),e[5]=t,e[6]=o):o=e[6];const p=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==i||e[9]!==o||e[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},e[7]=s,e[8]=i,e[9]=o,e[10]=p,e[11]=a):a=e[11],u(a)}export{q as a,b as g,c as l,g as u};
1
+ import{c as l,m as u,cM as m,cN as f,x as y,K as n}from"./index-BYFW0DhO.js";async function c(r){if(!r.getServerCapabilities()?.prompts)return{prompts:[]};try{return await r.listPrompts()}catch(t){if(t instanceof m&&t.code===f.MethodNotFound)return{prompts:[]};throw t}}async function b(r,e,t){if(!r.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await r.getPrompt({name:e,arguments:t??{}})}function g(r){const e=l.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=()=>c(t),e[5]=t,e[6]=o):o=e[6];const p=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==i||e[9]!==o||e[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},e[7]=s,e[8]=i,e[9]=o,e[10]=p,e[11]=a):a=e[11],y(a)}function q(r){const e=l.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=()=>c(t),e[5]=t,e[6]=o):o=e[6];const p=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==i||e[9]!==o||e[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},e[7]=s,e[8]=i,e[9]=o,e[10]=p,e[11]=a):a=e[11],u(a)}export{q as a,b as g,c as l,g as u};
@@ -1 +1 @@
1
- import{c,G as m,x as b,m as M,K as f}from"./index-weBGyocH.js";import{u as y}from"./use-org-auth-client-BigyyemQ.js";const p=300*1e3;function d(){const t=c.c(7),{locator:e}=m(),o=y();let r;t[0]!==e?(r=f.members(e),t[0]=e,t[1]=r):r=t[1];let s;t[2]!==o?(s=()=>o.organization.listMembers(),t[2]=o,t[3]=s):s=t[3];let n;return t[4]!==r||t[5]!==s?(n={queryKey:r,queryFn:s},t[4]=r,t[5]=s,t[6]=n):n=t[6],b(n)}function q(t){const e=c.c(10);let o;e[0]!==t?(o=t===void 0?{}:t,e[0]=t,e[1]=o):o=e[1];const{enabled:r}=o,s=r===void 0?!0:r,{locator:n}=m(),a=y();let u;e[2]!==n?(u=f.members(n),e[2]=n,e[3]=u):u=e[3];let i;e[4]!==a?(i=()=>a.organization.listMembers(),e[4]=a,e[5]=i):i=e[5];let l;return e[6]!==s||e[7]!==u||e[8]!==i?(l={queryKey:u,queryFn:i,staleTime:p,enabled:s},e[6]=s,e[7]=u,e[8]=i,e[9]=l):l=e[9],M(l)}export{d as a,q as u};
1
+ import{c,G as m,x as b,m as M,K as f}from"./index-BYFW0DhO.js";import{u as y}from"./use-org-auth-client-CgYm4ea4.js";const p=300*1e3;function d(){const t=c.c(7),{locator:e}=m(),o=y();let r;t[0]!==e?(r=f.members(e),t[0]=e,t[1]=r):r=t[1];let s;t[2]!==o?(s=()=>o.organization.listMembers(),t[2]=o,t[3]=s):s=t[3];let n;return t[4]!==r||t[5]!==s?(n={queryKey:r,queryFn:s},t[4]=r,t[5]=s,t[6]=n):n=t[6],b(n)}function q(t){const e=c.c(10);let o;e[0]!==t?(o=t===void 0?{}:t,e[0]=t,e[1]=o):o=e[1];const{enabled:r}=o,s=r===void 0?!0:r,{locator:n}=m(),a=y();let u;e[2]!==n?(u=f.members(n),e[2]=n,e[3]=u):u=e[3];let i;e[4]!==a?(i=()=>a.organization.listMembers(),e[4]=a,e[5]=i):i=e[5];let l;return e[6]!==s||e[7]!==u||e[8]!==i?(l={queryKey:u,queryFn:i,staleTime:p,enabled:s},e[6]=s,e[7]=u,e[8]=i,e[9]=l):l=e[9],M(l)}export{d as a,q as u};
@@ -1,4 +1,4 @@
1
- import{c as p,m as y,x as v,K as b,bE as x,G as k,d as J,n as V,a as z,y as Y}from"./index-weBGyocH.js";import{D as F}from"./use-destination-route-GypAYhp8.js";import{d as X,g as W}from"./use-virtual-mcp-Cz_si5KP.js";import{a as Z}from"./hooks-Dq2_eaLg.js";import{p as ee,d as R,w as te}from"./thread-intent-CcWHzfkw.js";import{g as $}from"./github-repo-COLY3wWI.js";import{u as O}from"./use-mcp-client-DbyyfwFL.js";function Ke(t){const e=p.c(12);let n,o;e[0]!==t?({client:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let r;e[3]!==n?(r=b.mcpToolsList(n),e[3]=n,e[4]=r):r=e[4];let l;e[5]!==n?(l=async()=>await n.listTools(),e[5]=n,e[6]=l):l=e[6];const u=o.staleTime??3e4;let s;return e[7]!==o||e[8]!==r||e[9]!==l||e[10]!==u?(s={...o,queryKey:r,queryFn:l,staleTime:u,retry:!1},e[7]=o,e[8]=r,e[9]=l,e[10]=u,e[11]=s):s=e[11],v(s)}function De(t){const e=p.c(12);let n,o;e[0]!==t?({client:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let r;e[3]!==n?(r=b.mcpToolsList(n),e[3]=n,e[4]=r):r=e[4];let l;e[5]!==n?(l=async()=>await n.listTools(),e[5]=n,e[6]=l):l=e[6];const u=o.staleTime??3e4;let s;return e[7]!==o||e[8]!==r||e[9]!==l||e[10]!==u?(s={...o,queryKey:r,queryFn:l,staleTime:u,retry:!1},e[7]=o,e[8]=r,e[9]=l,e[10]=u,e[11]=s):s=e[11],y(s)}function Ge(t){const e=p.c(21);let n,o,r,l;e[0]!==t?({client:n,toolName:l,toolArguments:r,...o}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=r,e[4]=l):(n=e[1],o=e[2],r=e[3],l=e[4]);let u,s,c;if(e[5]!==n||e[6]!==o||e[7]!==r||e[8]!==l){const m=JSON.stringify(r??{});c=v,u=o,s=b.mcpToolCall(n,l,m),e[5]=n,e[6]=o,e[7]=r,e[8]=l,e[9]=u,e[10]=s,e[11]=c}else u=e[9],s=e[10],c=e[11];let i;e[12]!==n||e[13]!==r||e[14]!==l?(i=async()=>await n.callTool({name:l,arguments:r}),e[12]=n,e[13]=r,e[14]=l,e[15]=i):i=e[15];const a=o.staleTime??3e4;let f;return e[16]!==u||e[17]!==s||e[18]!==i||e[19]!==a?(f={...u,queryKey:s,queryFn:i,staleTime:a,retry:!1},e[16]=u,e[17]=s,e[18]=i,e[19]=a,e[20]=f):f=e[20],c(f)}function U(t){const e=p.c(21);let n,o,r,l;e[0]!==t?({client:n,toolName:l,toolArguments:r,...o}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=r,e[4]=l):(n=e[1],o=e[2],r=e[3],l=e[4]);let u,s,c;if(e[5]!==n||e[6]!==o||e[7]!==r||e[8]!==l){const m=JSON.stringify(r??{});c=y,u=o,s=b.mcpToolCall(n,l,m),e[5]=n,e[6]=o,e[7]=r,e[8]=l,e[9]=u,e[10]=s,e[11]=c}else u=e[9],s=e[10],c=e[11];let i;e[12]!==n||e[13]!==r||e[14]!==l?(i=async()=>await n.callTool({name:l,arguments:r}),e[12]=n,e[13]=r,e[14]=l,e[15]=i):i=e[15];const a=o.staleTime??3e4;let f;return e[16]!==u||e[17]!==s||e[18]!==i||e[19]!==a?(f={...u,queryKey:s,queryFn:i,staleTime:a,retry:!1},e[16]=u,e[17]=s,e[18]=i,e[19]=a,e[20]=f):f=e[20],c(f)}function B(t,e){if(!e)return!0;if(t.partial)return!1;const n=ee(t.metadata?.runtime);return n===null||n===e}function A(t,e,n,o,r,l){let u=null;for(const s of t)s.virtual_mcp_id===e&&s.created_by===n&&(s.hidden||B(s,o)&&(r&&(!s.branch||!r.has(s.branch))||l&&s.branch===l||(!u||s.updated_at>u.updated_at)&&(u=s)));return u}function ne(t,e,n,o){return t.find(r=>!r.hidden&&r.virtual_mcp_id===e&&r.created_by===n&&r.title==="New chat"&&!r.harness_id&&B(r,o))}function oe(t,e,n,o,r,l){if(!r)return A(t,e,n,o)??void 0;if(l?.draftsMode)return A(t,e,n,o,void 0,l?.baseBranch)??void 0;const u=l?.knownBranches;return(u&&u.size>0?A(t,e,n,o,u)??void 0:void 0)??A(t,e,n,o)??ne(t,e,n,o)}function M(t){if(!t||typeof t!="object")return null;const e=t;return e.isError?e.content?.find(o=>o.type==="text")?.text?.trim()||"GitHub MCP tool returned an error":null}function j(t){const e=M(t);if(e)throw new Error(e)}function re(t){try{return JSON.parse(t)}catch{return null}}function le(t){if(!t||typeof t!="object")return null;const e=t,n=e.content?.find(l=>l.type==="text")?.text,o=n?re(n):null,r=e.structuredContent;return r==null?o:typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length===0?o??r:r}function S(t){const e=le(t);return e===null?null:e}function K(t){if(!t)return null;const e=t.match(/\/pull\/(\d+)\b/);if(!e)return null;const n=Number(e[1]);return Number.isFinite(n)&&n>0?n:null}function ue(t){if(!t||typeof t!="object")return null;const e=t.content?.find(r=>r.type==="text")?.text;if(!e)return null;const n=e.match(/https:\/\/github\.com\/[^\s"]+\/pull\/\d+/)?.[0],o=K(n);return!o||!n?null:{number:o,htmlUrl:n}}const L=/[\r\n<>]/,se=/^[^\s@<>]+@[^\s@<>]+\.[^\s@<>]+$/;function _(t){const e=t?.userName?.trim();if(!e||L.test(e))return null;const n=t?.userEmail?.trim();return!n||L.test(n)?{userName:e}:se.test(n)?{userName:e,userEmail:n}:{userName:e}}function ie(t){return t.split(`
1
+ import{c as p,m as y,x as v,K as b,bE as x,G as k,d as J,n as V,a as z,y as Y}from"./index-BYFW0DhO.js";import{D as F}from"./use-destination-route-Yiz1Yyiq.js";import{d as X,g as W}from"./use-virtual-mcp-WZp5R4vZ.js";import{a as Z}from"./hooks-CypM9t3s.js";import{p as ee,d as R,w as te}from"./thread-intent-BGpE5f0m.js";import{g as $}from"./github-repo-COLY3wWI.js";import{u as O}from"./use-mcp-client-B8KExIQP.js";function Ke(t){const e=p.c(12);let n,o;e[0]!==t?({client:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let r;e[3]!==n?(r=b.mcpToolsList(n),e[3]=n,e[4]=r):r=e[4];let l;e[5]!==n?(l=async()=>await n.listTools(),e[5]=n,e[6]=l):l=e[6];const u=o.staleTime??3e4;let s;return e[7]!==o||e[8]!==r||e[9]!==l||e[10]!==u?(s={...o,queryKey:r,queryFn:l,staleTime:u,retry:!1},e[7]=o,e[8]=r,e[9]=l,e[10]=u,e[11]=s):s=e[11],v(s)}function De(t){const e=p.c(12);let n,o;e[0]!==t?({client:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let r;e[3]!==n?(r=b.mcpToolsList(n),e[3]=n,e[4]=r):r=e[4];let l;e[5]!==n?(l=async()=>await n.listTools(),e[5]=n,e[6]=l):l=e[6];const u=o.staleTime??3e4;let s;return e[7]!==o||e[8]!==r||e[9]!==l||e[10]!==u?(s={...o,queryKey:r,queryFn:l,staleTime:u,retry:!1},e[7]=o,e[8]=r,e[9]=l,e[10]=u,e[11]=s):s=e[11],y(s)}function Ge(t){const e=p.c(21);let n,o,r,l;e[0]!==t?({client:n,toolName:l,toolArguments:r,...o}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=r,e[4]=l):(n=e[1],o=e[2],r=e[3],l=e[4]);let u,s,c;if(e[5]!==n||e[6]!==o||e[7]!==r||e[8]!==l){const m=JSON.stringify(r??{});c=v,u=o,s=b.mcpToolCall(n,l,m),e[5]=n,e[6]=o,e[7]=r,e[8]=l,e[9]=u,e[10]=s,e[11]=c}else u=e[9],s=e[10],c=e[11];let i;e[12]!==n||e[13]!==r||e[14]!==l?(i=async()=>await n.callTool({name:l,arguments:r}),e[12]=n,e[13]=r,e[14]=l,e[15]=i):i=e[15];const a=o.staleTime??3e4;let f;return e[16]!==u||e[17]!==s||e[18]!==i||e[19]!==a?(f={...u,queryKey:s,queryFn:i,staleTime:a,retry:!1},e[16]=u,e[17]=s,e[18]=i,e[19]=a,e[20]=f):f=e[20],c(f)}function U(t){const e=p.c(21);let n,o,r,l;e[0]!==t?({client:n,toolName:l,toolArguments:r,...o}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=r,e[4]=l):(n=e[1],o=e[2],r=e[3],l=e[4]);let u,s,c;if(e[5]!==n||e[6]!==o||e[7]!==r||e[8]!==l){const m=JSON.stringify(r??{});c=y,u=o,s=b.mcpToolCall(n,l,m),e[5]=n,e[6]=o,e[7]=r,e[8]=l,e[9]=u,e[10]=s,e[11]=c}else u=e[9],s=e[10],c=e[11];let i;e[12]!==n||e[13]!==r||e[14]!==l?(i=async()=>await n.callTool({name:l,arguments:r}),e[12]=n,e[13]=r,e[14]=l,e[15]=i):i=e[15];const a=o.staleTime??3e4;let f;return e[16]!==u||e[17]!==s||e[18]!==i||e[19]!==a?(f={...u,queryKey:s,queryFn:i,staleTime:a,retry:!1},e[16]=u,e[17]=s,e[18]=i,e[19]=a,e[20]=f):f=e[20],c(f)}function B(t,e){if(!e)return!0;if(t.partial)return!1;const n=ee(t.metadata?.runtime);return n===null||n===e}function A(t,e,n,o,r,l){let u=null;for(const s of t)s.virtual_mcp_id===e&&s.created_by===n&&(s.hidden||B(s,o)&&(r&&(!s.branch||!r.has(s.branch))||l&&s.branch===l||(!u||s.updated_at>u.updated_at)&&(u=s)));return u}function ne(t,e,n,o){return t.find(r=>!r.hidden&&r.virtual_mcp_id===e&&r.created_by===n&&r.title==="New chat"&&!r.harness_id&&B(r,o))}function oe(t,e,n,o,r,l){if(!r)return A(t,e,n,o)??void 0;if(l?.draftsMode)return A(t,e,n,o,void 0,l?.baseBranch)??void 0;const u=l?.knownBranches;return(u&&u.size>0?A(t,e,n,o,u)??void 0:void 0)??A(t,e,n,o)??ne(t,e,n,o)}function M(t){if(!t||typeof t!="object")return null;const e=t;return e.isError?e.content?.find(o=>o.type==="text")?.text?.trim()||"GitHub MCP tool returned an error":null}function j(t){const e=M(t);if(e)throw new Error(e)}function re(t){try{return JSON.parse(t)}catch{return null}}function le(t){if(!t||typeof t!="object")return null;const e=t,n=e.content?.find(l=>l.type==="text")?.text,o=n?re(n):null,r=e.structuredContent;return r==null?o:typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length===0?o??r:r}function S(t){const e=le(t);return e===null?null:e}function K(t){if(!t)return null;const e=t.match(/\/pull\/(\d+)\b/);if(!e)return null;const n=Number(e[1]);return Number.isFinite(n)&&n>0?n:null}function ue(t){if(!t||typeof t!="object")return null;const e=t.content?.find(r=>r.type==="text")?.text;if(!e)return null;const n=e.match(/https:\/\/github\.com\/[^\s"]+\/pull\/\d+/)?.[0],o=K(n);return!o||!n?null:{number:o,htmlUrl:n}}const L=/[\r\n<>]/,se=/^[^\s@<>]+@[^\s@<>]+\.[^\s@<>]+$/;function _(t){const e=t?.userName?.trim();if(!e||L.test(e))return null;const n=t?.userEmail?.trim();return!n||L.test(n)?{userName:e}:se.test(n)?{userName:e,userEmail:n}:{userName:e}}function ie(t){return t.split(`
2
2
  `).filter(e=>!/^Co-authored-by:\s/i.test(e)).join(`
3
3
  `).trimEnd()}function ce(t){const e=t.userName.trim(),n=t.userEmail?.trim();return n?`Co-authored-by: ${e} <${n}>`:`Co-authored-by: ${e}`}function D(t,e){const n=_(e);if(!n)return t;const o=ie(t),r=ce(n);if(o.includes(r))return o;const l=o.trimEnd();return l.length>0?`${l}
4
4
 
@@ -1 +1 @@
1
- import{c as x,G as j,a as i}from"./index-weBGyocH.js";function A(){const e=x.c(32),{org:O}=j(),o=O.id;let z;e[0]!==o?(z=R=>(f=>i.organization[R]({...f??{},organizationId:o})),e[0]=o,e[1]=z):z=e[1];const t=z;let M;e[2]!==o?(M=R=>(f=>{const y={...f??{}},h=y.query??{};return y.query={...h,organizationId:o},i.organization[R](y)}),e[2]=o,e[3]=M):M=e[3];const n=M;let a,r;e[4]!==n?(a=n("listMembers"),r=n("listRoles"),e[4]=n,e[5]=a,e[6]=r):(a=e[5],r=e[6]);let l,s,c,g,u,m,d,v,b;e[7]!==t?(g=t("inviteMember"),u=t("removeMember"),m=t("updateMemberRole"),d=t("addMember"),v=t("createRole"),b=t("updateRole"),l=t("deleteRole"),s=t("cancelInvitation"),c=t("update"),e[7]=t,e[8]=l,e[9]=s,e[10]=c,e[11]=g,e[12]=u,e[13]=m,e[14]=d,e[15]=v,e[16]=b):(l=e[8],s=e[9],c=e[10],g=e[11],u=e[12],m=e[13],d=e[14],v=e[15],b=e[16]);let p;e[17]!==n?(p=n("getActiveMember"),e[17]=n,e[18]=p):p=e[18];let I;return e[19]!==l||e[20]!==s||e[21]!==c||e[22]!==p||e[23]!==a||e[24]!==r||e[25]!==g||e[26]!==u||e[27]!==m||e[28]!==d||e[29]!==v||e[30]!==b?(I={organization:{listMembers:a,listRoles:r,inviteMember:g,removeMember:u,updateMemberRole:m,addMember:d,createRole:v,updateRole:b,deleteRole:l,cancelInvitation:s,update:c,getActiveMember:p,acceptInvitation:i.organization.acceptInvitation,rejectInvitation:i.organization.rejectInvitation,getInvitation:i.organization.getInvitation,list:i.organization.list,create:i.organization.create,getFullOrganization:i.organization.getFullOrganization}},e[19]=l,e[20]=s,e[21]=c,e[22]=p,e[23]=a,e[24]=r,e[25]=g,e[26]=u,e[27]=m,e[28]=d,e[29]=v,e[30]=b,e[31]=I):I=e[31],I}export{A as u};
1
+ import{c as x,G as j,a as i}from"./index-BYFW0DhO.js";function A(){const e=x.c(32),{org:O}=j(),o=O.id;let z;e[0]!==o?(z=R=>(f=>i.organization[R]({...f??{},organizationId:o})),e[0]=o,e[1]=z):z=e[1];const t=z;let M;e[2]!==o?(M=R=>(f=>{const y={...f??{}},h=y.query??{};return y.query={...h,organizationId:o},i.organization[R](y)}),e[2]=o,e[3]=M):M=e[3];const n=M;let a,r;e[4]!==n?(a=n("listMembers"),r=n("listRoles"),e[4]=n,e[5]=a,e[6]=r):(a=e[5],r=e[6]);let l,s,c,g,u,m,d,v,b;e[7]!==t?(g=t("inviteMember"),u=t("removeMember"),m=t("updateMemberRole"),d=t("addMember"),v=t("createRole"),b=t("updateRole"),l=t("deleteRole"),s=t("cancelInvitation"),c=t("update"),e[7]=t,e[8]=l,e[9]=s,e[10]=c,e[11]=g,e[12]=u,e[13]=m,e[14]=d,e[15]=v,e[16]=b):(l=e[8],s=e[9],c=e[10],g=e[11],u=e[12],m=e[13],d=e[14],v=e[15],b=e[16]);let p;e[17]!==n?(p=n("getActiveMember"),e[17]=n,e[18]=p):p=e[18];let I;return e[19]!==l||e[20]!==s||e[21]!==c||e[22]!==p||e[23]!==a||e[24]!==r||e[25]!==g||e[26]!==u||e[27]!==m||e[28]!==d||e[29]!==v||e[30]!==b?(I={organization:{listMembers:a,listRoles:r,inviteMember:g,removeMember:u,updateMemberRole:m,addMember:d,createRole:v,updateRole:b,deleteRole:l,cancelInvitation:s,update:c,getActiveMember:p,acceptInvitation:i.organization.acceptInvitation,rejectInvitation:i.organization.rejectInvitation,getInvitation:i.organization.getInvitation,list:i.organization.list,create:i.organization.create,getFullOrganization:i.organization.getFullOrganization}},e[19]=l,e[20]=s,e[21]=c,e[22]=p,e[23]=a,e[24]=r,e[25]=g,e[26]=u,e[27]=m,e[28]=d,e[29]=v,e[30]=b,e[31]=I):I=e[31],I}export{A as u};
@@ -1 +1 @@
1
- import{c as a,m as r,K as l}from"./index-weBGyocH.js";function y(t){const e=a.c(8);let n;e[0]!==t?(n=l.orgNotice(t??""),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==t?(s=async()=>{const o=await fetch(`/api/${t}/notice`,{credentials:"include"});return o.ok?(await o.json()).notice??null:null},e[2]=t,e[3]=s):s=e[3];const c=!!t;let i;return e[4]!==n||e[5]!==s||e[6]!==c?(i={queryKey:n,queryFn:s,enabled:c,staleTime:6e4},e[4]=n,e[5]=s,e[6]=c,e[7]=i):i=e[7],r(i)}export{y as u};
1
+ import{c as a,m as r,K as l}from"./index-BYFW0DhO.js";function y(t){const e=a.c(8);let n;e[0]!==t?(n=l.orgNotice(t??""),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==t?(s=async()=>{const o=await fetch(`/api/${t}/notice`,{credentials:"include"});return o.ok?(await o.json()).notice??null:null},e[2]=t,e[3]=s):s=e[3];const c=!!t;let i;return e[4]!==n||e[5]!==s||e[6]!==c?(i={queryKey:n,queryFn:s,enabled:c,staleTime:6e4},e[4]=n,e[5]=s,e[6]=c,e[7]=i):i=e[7],r(i)}export{y as u};
@@ -1 +1 @@
1
- import{c as u,m as S,n as r,e as y,K as c}from"./index-weBGyocH.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function m(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{q as a,C as b,O as c,h as d,m as u};
1
+ import{c as u,m as S,n as r,e as y,K as c}from"./index-BYFW0DhO.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function m(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{q as a,C as b,O as c,h as d,m as u};