decocms 2.279.4 → 2.280.0

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 (228) hide show
  1. package/dist/client/assets/{AlertCircle-CEilS6cR.js → AlertCircle-Dv4ZIM5J.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-DSwx4IX3.js → ArrowNarrowLeft-BvT4bMLP.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-Ko5wAfL7.js → CheckCircle-DeGJG8Ey.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-Be4lVzvR.js → ChevronDown-DA_i6htU.js} +1 -1
  5. package/dist/client/assets/{ChevronRight-Dl1oyiXi.js → ChevronRight-CPnYdMqx.js} +1 -1
  6. package/dist/client/assets/{ChevronUp-Br-o6DqX.js → ChevronUp-BAjyIVOE.js} +1 -1
  7. package/dist/client/assets/{Container-BikrIt05.js → Container-D86p6vhP.js} +1 -1
  8. package/dist/client/assets/{LinkExternal01-DjLDyTuR.js → LinkExternal01-Cfxvdz-p.js} +1 -1
  9. package/dist/client/assets/{Lock01-BWBjIjcA.js → Lock01-DMzDPwhT.js} +1 -1
  10. package/dist/client/assets/{Palette-npxPqkwL.js → Palette-DVhkaDgv.js} +1 -1
  11. package/dist/client/assets/{Play-DsEaCK4x.js → Play-Dx7-OOlg.js} +1 -1
  12. package/dist/client/assets/{Plus-3pgqg7ye.js → Plus-D9-fqNSD.js} +1 -1
  13. package/dist/client/assets/{SearchMd-B1ES2efv.js → SearchMd-DNA-TN_H.js} +1 -1
  14. package/dist/client/assets/{Settings02-CZ8z5m7j.js → Settings02-DQjDcLoY.js} +1 -1
  15. package/dist/client/assets/{Star01-BeBdOnyd.js → Star01-CaUtmy-K.js} +1 -1
  16. package/dist/client/assets/{Sun-DqEjGh0W.js → Sun-CEZa3eLS.js} +1 -1
  17. package/dist/client/assets/{Tool01-sHnbUKmU.js → Tool01-B1xrcBi5.js} +1 -1
  18. package/dist/client/assets/{Trash01-C86SDHba.js → Trash01-B4DTIo_P.js} +1 -1
  19. package/dist/client/assets/{Upload01-DQoYYKo3.js → Upload01-DH1j0KZc.js} +1 -1
  20. package/dist/client/assets/{User01-DisUuiTU.js → User01-BZLj0_M8.js} +1 -1
  21. package/dist/client/assets/{Users03-DPaLThya.js → Users03-DrJ8OfaH.js} +1 -1
  22. package/dist/client/assets/{X-faz11WMu.js → X-DoL-OQpW.js} +1 -1
  23. package/dist/client/assets/{XCircle-DcnOx3o6.js → XCircle-BEVX_MSl.js} +1 -1
  24. package/dist/client/assets/{Zap-RywdJI-6.js → Zap-CAlzQ_SF.js} +1 -1
  25. package/dist/client/assets/{ZapSquare-C2CuBY_F.js → ZapSquare-6X_ovY4u.js} +1 -1
  26. package/dist/client/assets/{accordion-CrXENhKS.js → accordion-DPKwR5jf.js} +1 -1
  27. package/dist/client/assets/{agent-icon-B7tXdvWJ.js → agent-icon-E67drceM.js} +1 -1
  28. package/dist/client/assets/agents-list-Ch7lWVOr.js +1 -0
  29. package/dist/client/assets/ai-providers-nM9qYzBZ.js +1 -0
  30. package/dist/client/assets/{alert-dialog-DPNSWK0C.js → alert-dialog-82nIWhf3.js} +1 -1
  31. package/dist/client/assets/{auth-catchall-DjM7yLtb.js → auth-catchall-BJdcQwN-.js} +1 -1
  32. package/dist/client/assets/{automation-list-row-BaryT-Si.js → automation-list-row-DXJDNS03.js} +1 -1
  33. package/dist/client/assets/{automations-DQbRygJA.js → automations-CkAigK39.js} +1 -1
  34. package/dist/client/assets/{avatar-C6d78R0W.js → avatar-CKWhFcDc.js} +1 -1
  35. package/dist/client/assets/{badge-B1bb6NY8.js → badge-DPuCicf3.js} +1 -1
  36. package/dist/client/assets/{brand-context-ubi86tCi.js → brand-context-xEuKSfj0.js} +1 -1
  37. package/dist/client/assets/{card-VmNXdIl9.js → card-BJoLtmz9.js} +1 -1
  38. package/dist/client/assets/{chat-context-BbZ-RBhM.js → chat-context-Bf3aWPzj.js} +1 -1
  39. package/dist/client/assets/{checkbox-CAGdj4ly.js → checkbox-C12E3_oq.js} +1 -1
  40. package/dist/client/assets/{collection-detail-xWNCvSYV.js → collection-detail-ByVwt639.js} +1 -1
  41. package/dist/client/assets/{collection-display-button-BSyfAyep.js → collection-display-button-CXXhefCT.js} +1 -1
  42. package/dist/client/assets/{collection-search-Dg7Paf_D.js → collection-search-tscZfmSz.js} +1 -1
  43. package/dist/client/assets/{collection-table-wrapper-B24nieNR.js → collection-table-wrapper-C82FjZ_i.js} +1 -1
  44. package/dist/client/assets/{collection-tabs-BiUVPH62.js → collection-tabs-XtEbMyOP.js} +1 -1
  45. package/dist/client/assets/{collections-cNdZZ911.js → collections-8sPPrJ7A.js} +1 -1
  46. package/dist/client/assets/{command-BGAPQAyu.js → command-C8CTcwNt.js} +1 -1
  47. package/dist/client/assets/{connection-card-BaKrYQZ0.js → connection-card-Dfd5kF4A.js} +1 -1
  48. package/dist/client/assets/{connection-detail-10aKIu7_.js → connection-detail-LgljwVBZ.js} +1 -1
  49. package/dist/client/assets/{connection-form-helpers-DDT-e8Qf.js → connection-form-helpers-D1CgFjH6.js} +1 -1
  50. package/dist/client/assets/{connections-BIIoe1Fp.js → connections-welzjCFH.js} +1 -1
  51. package/dist/client/assets/{constants-DOLR7-In.js → constants-CgzsWzve.js} +1 -1
  52. package/dist/client/assets/{constants-OdWrtR0n.js → constants-DlB9FruN.js} +1 -1
  53. package/dist/client/assets/{dialog-BBlf6Y0-.js → dialog-D3TqImE0.js} +1 -1
  54. package/dist/client/assets/{drawer-BoTS4Bqi.js → drawer-1xwox4c6.js} +1 -1
  55. package/dist/client/assets/{dropdown-menu-FXqXZNLp.js → dropdown-menu-ccbFc3oF.js} +1 -1
  56. package/dist/client/assets/{dynamic-plugin-layout-CtgRG0MU.js → dynamic-plugin-layout-C7MWhlg7.js} +1 -1
  57. package/dist/client/assets/{empty-state-X2E_7LTc.js → empty-state-BuT1lOPL.js} +1 -1
  58. package/dist/client/assets/{empty-state-Cs7wxKmu.js → empty-state-C1zz-mei.js} +1 -1
  59. package/dist/client/assets/{extract-connection-data-B-Wb5fIO.js → extract-connection-data-Aua_YhKg.js} +1 -1
  60. package/dist/client/assets/{features-BUxBwL8b.js → features-CXUvkC78.js} +1 -1
  61. package/dist/client/assets/{form-BvPuLp3p.js → form-ruWBs7d7.js} +1 -1
  62. package/dist/client/assets/{general-D2AJdg3z.js → general-DH_bFCOl.js} +1 -1
  63. package/dist/client/assets/{index-C8d--zI5.js → index-AHroOw7q.js} +1 -1
  64. package/dist/client/assets/{index-kfK6OLDe.js → index-BEoI9ZVb.js} +1 -1
  65. package/dist/client/assets/{index-BxxSf9yJ.js → index-BV6L1SjJ.js} +1 -1
  66. package/dist/client/assets/{index-D5d06kaF.js → index-CCmiT65y.js} +1 -1
  67. package/dist/client/assets/{index-Ch9qbqUU.js → index-CQ8ZZoPX.js} +1 -1
  68. package/dist/client/assets/index-CTmUD6-Y.js +739 -0
  69. package/dist/client/assets/index-C_Ncklfg.css +1 -0
  70. package/dist/client/assets/{index-Dorgz0DN.js → index-DJgqpEYW.js} +2 -2
  71. package/dist/client/assets/{index-qeyHcjD9.js → index-DrsCmq1f.js} +1 -1
  72. package/dist/client/assets/{index-s0sdZ5L_.js → index-DumcCt6F.js} +1 -1
  73. package/dist/client/assets/{index-B8be3s7t.js → index-z8VezSz0.js} +1 -1
  74. package/dist/client/assets/{infiniteQueryObserver-hlyWaAvC.js → infiniteQueryObserver-DH4hUCgR.js} +1 -1
  75. package/dist/client/assets/{input-CMnzIdr8.js → input-DV5eim50.js} +1 -1
  76. package/dist/client/assets/{integration-icon-C2aL4IRd.js → integration-icon-D2tCV60I.js} +1 -1
  77. package/dist/client/assets/{label-kikML6oQ.js → label-C86GM8X1.js} +1 -1
  78. package/dist/client/assets/{layout-D47IedlQ.js → layout-DxCigiwD.js} +1 -1
  79. package/dist/client/assets/lean-canvas-recruit-modal-CCGjmni2.js +116 -0
  80. package/dist/client/assets/{login-q3jLGKfv.js → login-DprsK4_L.js} +1 -1
  81. package/dist/client/assets/{members-iNFIg-rI.js → members-B-VFLfzJ.js} +1 -1
  82. package/dist/client/assets/{monaco-editor-DblQESYG.js → monaco-editor-R56ulXRY.js} +1 -1
  83. package/dist/client/assets/{monitoring-stats-row-DcUf2si8.js → monitoring-stats-row--PsDRgYi.js} +1 -1
  84. package/dist/client/assets/{oauth-callback-Dp11GOxx.js → oauth-callback-Ca5_CCq3.js} +1 -1
  85. package/dist/client/assets/{oauth-callback-ai-provider-B60qZO1Q.js → oauth-callback-ai-provider-DDk9IcKl.js} +1 -1
  86. package/dist/client/assets/{onboarding-Ls_Xz5aM.js → onboarding-DerxM89t.js} +1 -1
  87. package/dist/client/assets/{org-layout-D2WgV9rb.js → org-layout-DIERSToF.js} +1 -1
  88. package/dist/client/assets/{org-plugin-layout-CFSIDp0m.js → org-plugin-layout-ClNRZqNK.js} +1 -1
  89. package/dist/client/assets/{plugin-empty-state-CtOhHxMj.js → plugin-empty-state-D0vL52dh.js} +1 -1
  90. package/dist/client/assets/{plugin-header-cYrniSu5.js → plugin-header-DmExVElz.js} +1 -1
  91. package/dist/client/assets/{plugin-layout-DjQ7GFQD.js → plugin-layout-DW3szgLc.js} +1 -1
  92. package/dist/client/assets/{popover-xAirnQIV.js → popover-MsdpfhQu.js} +1 -1
  93. package/dist/client/assets/{profile-NL4vJdwI.js → profile-G3V9Se8H.js} +1 -1
  94. package/dist/client/assets/{project-app-view-DH8ksEqJ.js → project-app-view-8soha8U5.js} +1 -1
  95. package/dist/client/assets/registry-1MdxVVj5.js +2 -0
  96. package/dist/client/assets/{registry-layout-BsuMreOd.js → registry-layout-DmdT-OpW.js} +1 -1
  97. package/dist/client/assets/{required-auth-layout-CkKjV0G_.js → required-auth-layout-CExQRzBC.js} +1 -1
  98. package/dist/client/assets/{reset-password-DEmP_a1g.js → reset-password-CKscqHTM.js} +1 -1
  99. package/dist/client/assets/{scroll-area-UPgVs2bF.js → scroll-area-Co4wJj7O.js} +1 -1
  100. package/dist/client/assets/{search-input-CnrAmvY9.js → search-input-C1TJuPFM.js} +1 -1
  101. package/dist/client/assets/{select-model-BxT0iVSc.js → select-model-FUOpAZDM.js} +1 -1
  102. package/dist/client/assets/{select-C2IlresN.js → select-pAgHYIrL.js} +1 -1
  103. package/dist/client/assets/{settings-layout-Dv5OM4G4.js → settings-layout-DQBzl0lu.js} +1 -1
  104. package/dist/client/assets/{shell-layout-Dd5_p2cO.js → shell-layout-DUNitdZU.js} +1 -1
  105. package/dist/client/assets/{skeleton-CuU32mjh.js → skeleton-qER9eMeG.js} +1 -1
  106. package/dist/client/assets/{sso-DkJ7XF7r.js → sso-CJiIyGby.js} +1 -1
  107. package/dist/client/assets/store-registry-C3XskpEA.js +2 -0
  108. package/dist/client/assets/{store-DRVo25gF.js → store-rkPIhDm8.js} +1 -1
  109. package/dist/client/assets/{switch-WtRCKaAC.js → switch-D5-PzV-X.js} +1 -1
  110. package/dist/client/assets/{table-CDG3Pcei.js → table-DvXCcwv1.js} +1 -1
  111. package/dist/client/assets/{tabs-CvpfD2VC.js → tabs-Ce-3s0xL.js} +1 -1
  112. package/dist/client/assets/{task-status-DkPKuVRh.js → task-status-CffQzU_t.js} +1 -1
  113. package/dist/client/assets/{textarea-DzDNZNQx.js → textarea-BVTjXq38.js} +1 -1
  114. package/dist/client/assets/{toggle-group-ChSEkXLp.js → toggle-group-gsh8C-OR.js} +1 -1
  115. package/dist/client/assets/{tools-list-DWtwkfXV.js → tools-list-PtfMhobA.js} +1 -1
  116. package/dist/client/assets/{types-DpfrgOgc.js → types-BvKkBpVu.js} +1 -1
  117. package/dist/client/assets/{use-ai-providers-DL7syVKl.js → use-ai-providers-B5sNJvkO.js} +1 -1
  118. package/dist/client/assets/{use-collections-CJP9C70C.js → use-collections-BrU9UZ67.js} +1 -1
  119. package/dist/client/assets/{use-connection-Bfx2DpWp.js → use-connection-8il0FBHR.js} +1 -1
  120. package/dist/client/assets/{use-copy-CzzLW-t1.js → use-copy-CyDx0Roq.js} +1 -1
  121. package/dist/client/assets/{use-create-virtual-mcp-DBUGdDxL.js → use-create-virtual-mcp-DVarqFbA.js} +1 -1
  122. package/dist/client/assets/{use-decopilot-events-Co7G03Q-.js → use-decopilot-events-ZWKgln1k.js} +1 -1
  123. package/dist/client/assets/{use-delete-connection-BrJd-KQI.js → use-delete-connection-D0QU8RrP.js} +1 -1
  124. package/dist/client/assets/{use-infinite-scroll-MYeIU5rj.js → use-infinite-scroll-BxyvVOYa.js} +1 -1
  125. package/dist/client/assets/{use-list-state-CmsEU35V.js → use-list-state-DJ-Ih_V8.js} +1 -1
  126. package/dist/client/assets/{use-mcp-tools-BNvGRf7N.js → use-mcp-tools-Dtq2tMkx.js} +1 -1
  127. package/dist/client/assets/{use-members-VPKM2sg7.js → use-members-DJxwunXF.js} +1 -1
  128. package/dist/client/assets/{use-mobile-D_sy_mOx.js → use-mobile-BsrW-Uvz.js} +1 -1
  129. package/dist/client/assets/{use-navigate-to-agent-C8TD8oUz.js → use-navigate-to-agent-IOD6ymJx.js} +1 -1
  130. package/dist/client/assets/{use-org-sso-C8hw6vY4.js → use-org-sso-MYxHdY37.js} +1 -1
  131. package/dist/client/assets/{use-organization-settings-DfMTERs8.js → use-organization-settings-DgEflTxA.js} +1 -1
  132. package/dist/client/assets/{use-registry-connections-zu0-7yyQ.js → use-registry-connections-DOXnVkDT.js} +1 -1
  133. package/dist/client/assets/{use-status-sounds-D7ItdC7B.js → use-status-sounds-Bw0QWLxv.js} +1 -1
  134. package/dist/client/assets/{use-tasks-Cx0JalUc.js → use-tasks-OBM9Y7nP.js} +1 -1
  135. package/dist/client/assets/{use-view-mode-DIuslnT_.js → use-view-mode-BGx43I5y.js} +1 -1
  136. package/dist/client/assets/{use-virtual-mcp-VazaMZSE.js → use-virtual-mcp-zjP22P87.js} +1 -1
  137. package/dist/client/assets/useInfiniteQuery-BE9sdfbg.js +1 -0
  138. package/dist/client/assets/{user-Dy3Y5T-r.js → user-Ct2oIzgq.js} +1 -1
  139. package/dist/client/assets/{view-mode-toggle-BIFsJdKF.js → view-mode-toggle-DG-ttgGl.js} +1 -1
  140. package/dist/client/assets/workflow-detail-BvQnVA1D.js +1 -0
  141. package/dist/client/assets/{workflow-C9tzbaL5.js → workflow-xyFm_Ta1.js} +1 -1
  142. package/dist/client/index.html +2 -2
  143. package/dist/server/cli.js +1 -1
  144. package/dist/server/node_modules/get-east-asian-width/index.d.ts +60 -0
  145. package/dist/server/node_modules/get-east-asian-width/index.js +30 -0
  146. package/dist/server/node_modules/get-east-asian-width/lookup-data.js +18 -0
  147. package/dist/server/node_modules/get-east-asian-width/lookup.js +135 -0
  148. package/dist/server/node_modules/get-east-asian-width/package.json +71 -0
  149. package/dist/server/node_modules/get-east-asian-width/readme.md +65 -0
  150. package/dist/server/node_modules/get-east-asian-width/utilities.js +24 -0
  151. package/dist/server/node_modules/onetime/index.d.ts +64 -0
  152. package/dist/server/node_modules/onetime/index.js +44 -0
  153. package/dist/server/node_modules/{mimic-fn → onetime}/license +1 -1
  154. package/dist/server/node_modules/{mimic-fn → onetime}/package.json +16 -15
  155. package/dist/server/node_modules/onetime/readme.md +94 -0
  156. package/package.json +1 -1
  157. package/dist/client/assets/agents-list-EpavPOW6.js +0 -1
  158. package/dist/client/assets/ai-providers-CMhjDlJa.js +0 -1
  159. package/dist/client/assets/index-BQpr-5K9.js +0 -450
  160. package/dist/client/assets/index-D6N00IK2.css +0 -1
  161. package/dist/client/assets/lean-canvas-recruit-modal-DxUrUDHg.js +0 -116
  162. package/dist/client/assets/registry-ZNk-XnLr.js +0 -2
  163. package/dist/client/assets/store-registry-dHAn3ird.js +0 -2
  164. package/dist/client/assets/useInfiniteQuery-C3Jmw0Ad.js +0 -1
  165. package/dist/client/assets/workflow-detail-bN77di8o.js +0 -1
  166. package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
  167. package/dist/server/node_modules/ansi-styles/index.js +0 -223
  168. package/dist/server/node_modules/ansi-styles/package.json +0 -54
  169. package/dist/server/node_modules/ansi-styles/readme.md +0 -173
  170. package/dist/server/node_modules/mimic-fn/index.d.ts +0 -54
  171. package/dist/server/node_modules/mimic-fn/index.js +0 -13
  172. package/dist/server/node_modules/mimic-fn/readme.md +0 -69
  173. package/dist/server/node_modules/pg/LICENSE +0 -21
  174. package/dist/server/node_modules/pg/README.md +0 -95
  175. package/dist/server/node_modules/pg/esm/index.mjs +0 -20
  176. package/dist/server/node_modules/pg/lib/client.js +0 -743
  177. package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
  178. package/dist/server/node_modules/pg/lib/connection.js +0 -221
  179. package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
  180. package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
  181. package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
  182. package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
  183. package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
  184. package/dist/server/node_modules/pg/lib/defaults.js +0 -91
  185. package/dist/server/node_modules/pg/lib/index.js +0 -73
  186. package/dist/server/node_modules/pg/lib/native/client.js +0 -323
  187. package/dist/server/node_modules/pg/lib/native/index.js +0 -2
  188. package/dist/server/node_modules/pg/lib/native/query.js +0 -165
  189. package/dist/server/node_modules/pg/lib/query.js +0 -252
  190. package/dist/server/node_modules/pg/lib/result.js +0 -109
  191. package/dist/server/node_modules/pg/lib/stream.js +0 -83
  192. package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
  193. package/dist/server/node_modules/pg/lib/utils.js +0 -217
  194. package/dist/server/node_modules/pg/package.json +0 -76
  195. package/dist/server/node_modules/pg-int8/LICENSE +0 -13
  196. package/dist/server/node_modules/pg-int8/README.md +0 -16
  197. package/dist/server/node_modules/pg-int8/index.js +0 -100
  198. package/dist/server/node_modules/pg-int8/package.json +0 -24
  199. package/dist/server/node_modules/pg-pool/LICENSE +0 -21
  200. package/dist/server/node_modules/pg-pool/README.md +0 -357
  201. package/dist/server/node_modules/pg-pool/esm/index.mjs +0 -5
  202. package/dist/server/node_modules/pg-pool/index.js +0 -517
  203. package/dist/server/node_modules/pg-pool/package.json +0 -51
  204. package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
  205. package/dist/server/node_modules/postgres-array/index.js +0 -97
  206. package/dist/server/node_modules/postgres-array/license +0 -21
  207. package/dist/server/node_modules/postgres-array/package.json +0 -35
  208. package/dist/server/node_modules/postgres-array/readme.md +0 -43
  209. package/dist/server/node_modules/postgres-bytea/index.js +0 -33
  210. package/dist/server/node_modules/postgres-bytea/license +0 -21
  211. package/dist/server/node_modules/postgres-bytea/package.json +0 -34
  212. package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
  213. package/dist/server/node_modules/postgres-date/index.js +0 -116
  214. package/dist/server/node_modules/postgres-date/license +0 -21
  215. package/dist/server/node_modules/postgres-date/package.json +0 -33
  216. package/dist/server/node_modules/postgres-date/readme.md +0 -49
  217. package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
  218. package/dist/server/node_modules/postgres-interval/index.js +0 -125
  219. package/dist/server/node_modules/postgres-interval/license +0 -21
  220. package/dist/server/node_modules/postgres-interval/package.json +0 -36
  221. package/dist/server/node_modules/postgres-interval/readme.md +0 -48
  222. package/dist/server/node_modules/split2/LICENSE +0 -13
  223. package/dist/server/node_modules/split2/README.md +0 -85
  224. package/dist/server/node_modules/split2/bench.js +0 -27
  225. package/dist/server/node_modules/split2/index.js +0 -141
  226. package/dist/server/node_modules/split2/package.json +0 -39
  227. package/dist/server/node_modules/split2/test.js +0 -409
  228. /package/dist/server/node_modules/{ansi-styles → get-east-asian-width}/license +0 -0
@@ -1,116 +0,0 @@
1
- import{e as L,s as G,o as je,b as $e,r as v,K as Z,n as ze,a as He,j as t,c as me,B as ee,t as U,z as fe,a0 as We,a1 as Je,aA as be,C as Xe,l as ge,V as Ze,f as et}from"./index-Dorgz0DN.js";import{S as ne,u as P,d as ve,W as Be,j as Te}from"./constants-DOLR7-In.js";import{u as pe}from"./use-navigate-to-agent-C8TD8oUz.js";import{c as se,d as ie,a as oe,D as ae,b as tt}from"./dialog-BBlf6Y0-.js";import{i as Ee}from"./SearchMd-B1ES2efv.js";import{C as Fe}from"./collection-search-Dg7Paf_D.js";import{c as we,b as Se,D as Oe,a as Ae}from"./drawer-BoTS4Bqi.js";import{u as Le}from"./use-mobile-D_sy_mOx.js";import{I as Re}from"./integration-icon-C2aL4IRd.js";import{a as Me,u as nt}from"./use-connection-Bfx2DpWp.js";import{u as st,d as qe}from"./use-mcp-tools-BNvGRf7N.js";import{b as Ue,u as it}from"./use-virtual-mcp-VazaMZSE.js";import{i as ot}from"./Lock01-BWBjIjcA.js";import{I as at}from"./agent-icon-B7tXdvWJ.js";import{e as rt}from"./extract-connection-data-B-Wb5fIO.js";function ct(a){return a.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function lt(){const a=await fetch("/api/deco-sites");if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${a.status})`)}return a.json()}function Qt(a){const e=L.c(65),{open:n,onOpenChange:o,onBack:d}=a,{org:s}=G(),m=pe(),u=je(),{data:r}=$e.useSession(),[c,f]=v.useState(null),[h,l]=v.useState("");let g;e[0]!==s.id?(g={connectionId:ne,orgId:s.id},e[0]=s.id,e[1]=g):g=e[1];const I=P(g);let p;e[2]!==r?.user?.email?(p=Z.decoSites(r?.user?.email),e[2]=r?.user?.email,e[3]=p):p=e[3];const i=n&&!!r?.user?.email;let N;e[4]!==p||e[5]!==i?(N={queryKey:p,queryFn:lt,enabled:i,staleTime:6e4,retry:!1},e[4]=p,e[5]=i,e[6]=N):N=e[6];const{data:_,isLoading:x,error:y}=ze(N),C=_?.sites??[];let T;e[7]!==o?(T=b=>{b||(f(null),l("")),o(b)},e[7]=o,e[8]=T):T=e[8];const j=T;let S;e[9]!==h?(S=b=>b.name.toLowerCase().includes(h.toLowerCase())||b.domains?.[0]?.domain.toLowerCase().includes(h.toLowerCase()),e[9]=h,e[10]=S):S=e[10];const E=C.filter(S),w=!c||E.some(b=>b.name===c);let O;e[11]!==I||e[12]!==s.id?(O=async b=>{U("deco_site_import_started",{site_name:b});const R=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:b,orgId:s.id})}),M=await R.json().catch(mt);if(!R.ok)throw new Error(M.error??`Failed to create connection (${R.status})`);const A=M.connId;if(!A)throw new Error("Server did not return a connection ID");const ue=M.icon??null,X=ct(b),ke=await I.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:b,description:"Imported from deco.cx",pinned:!0,icon:ue??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:ue,themeColor:"#22C55E",slug:X,pinnedViews:[{connectionId:A,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:A,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:A,toolName:"get_monitor_data",label:"Monitor",icon:null},{connectionId:A,toolName:"list_pull_requests",label:"Pull Requests",icon:null},{connectionId:A,toolName:"list_releases",label:"Releases",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:A,toolName:"file_explorer"}}}},connections:[{connection_id:A}]}}}),Pe=ke.structuredContent??ke;return{slug:X,virtualMcpId:Pe.item.id,connId:A,item:Pe.item}},e[11]=I,e[12]=s.id,e[13]=O):O=e[13];let D;e[14]!==I||e[15]!==j||e[16]!==m||e[17]!==s.id||e[18]!==u?(D=b=>{const{slug:R,virtualMcpId:M,item:A}=b;U("deco_site_import_succeeded",{site_name:A.title,virtual_mcp_id:M,slug:R}),u.setQueryData(Z.collectionItem(I,s.id,"","VIRTUAL_MCP",M),{item:A}),u.invalidateQueries({predicate:ue=>{const X=ue.queryKey;return X[1]===s.id&&X[3]==="collection"&&X[4]==="VIRTUAL_MCP"}}),u.invalidateQueries({queryKey:Z.projects(s.id)}),fe.success(`Imported ${R} from deco.cx`),j(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),m(M)},e[14]=I,e[15]=j,e[16]=m,e[17]=s.id,e[18]=u,e[19]=D):D=e[19];let re;e[20]!==O||e[21]!==D?(re={mutationFn:O,onSuccess:D,onError:ut},e[20]=O,e[21]=D,e[22]=re):re=e[22];const k=He(re),he=ie,xe=se,Ke="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let V;e[23]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(oe,{className:"sr-only",children:t.jsx(ae,{children:"Import from deco.cx"})}),e[23]=V):V=e[23];let $;e[24]!==d?($=d&&t.jsx("button",{type:"button",onClick:d,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(Ee,{size:18})}),e[24]=d,e[25]=$):$=e[25];let ce;e[26]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[26]=ce):ce=e[26];let z;e[27]!==$?(z=t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[$,ce]}),e[27]=$,e[28]=z):z=e[28];let le;e[29]===Symbol.for("react.memo_cache_sentinel")?(le=b=>{b.key==="Escape"&&l("")},e[29]=le):le=e[29];let H;e[30]!==h?(H=t.jsx("div",{children:t.jsx(Fe,{value:h,onChange:l,placeholder:"Search sites...",onKeyDown:le})}),e[30]=h,e[31]=H):H=e[31];const Ye="pb-0 min-h-[300px]";let B;e[32]!==x?(B=x&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[32]=x,e[33]=B):B=e[33];const Ne=!x&&!y&&C.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),_e=!x&&C.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[E.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",h,"”"]}),E.map(b=>{const R=b.domains?.find(dt)?.domain??b.domains?.[0]?.domain,M=c===b.name;return t.jsxs("button",{type:"button",onClick:()=>f(b.name),className:me("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",M?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:b.thumb_url?t.jsx("img",{src:b.thumb_url,alt:b.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:b.name}),R&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:R})]})]},b.name)})]});let F;e[34]!==B||e[35]!==Ne||e[36]!==_e?(F=t.jsxs("div",{className:Ye,children:[B,Ne,_e]}),e[34]=B,e[35]=Ne,e[36]=_e,e[37]=F):F=e[37];let q;e[38]!==j?(q=()=>j(!1),e[38]=j,e[39]=q):q=e[39];let Q;e[40]!==k.isPending||e[41]!==q?(Q=t.jsx(ee,{variant:"outline",onClick:q,disabled:k.isPending,children:"Cancel"}),e[40]=k.isPending,e[41]=q,e[42]=Q):Q=e[42];const Ce=!c||!w||k.isPending||x;let K;e[43]!==k||e[44]!==c?(K=()=>c&&k.mutate(c),e[43]=k,e[44]=c,e[45]=K):K=e[45];const Ie=k.isPending?"Importing...":"Import";let Y;e[46]!==Ce||e[47]!==K||e[48]!==Ie?(Y=t.jsx(ee,{disabled:Ce,onClick:K,children:Ie}),e[46]=Ce,e[47]=K,e[48]=Ie,e[49]=Y):Y=e[49];let W;e[50]!==Q||e[51]!==Y?(W=t.jsxs(tt,{className:"px-8 py-5 border-t border-border",children:[Q,Y]}),e[50]=Q,e[51]=Y,e[52]=W):W=e[52];let J;e[53]!==xe||e[54]!==V||e[55]!==z||e[56]!==H||e[57]!==F||e[58]!==W?(J=t.jsxs(xe,{className:Ke,children:[V,z,H,F,W]}),e[53]=xe,e[54]=V,e[55]=z,e[56]=H,e[57]=F,e[58]=W,e[59]=J):J=e[59];let de;return e[60]!==he||e[61]!==j||e[62]!==n||e[63]!==J?(de=t.jsx(he,{open:n,onOpenChange:j,children:J}),e[60]=he,e[61]=j,e[62]=n,e[63]=J,e[64]=de):de=e[64],de}function dt(a){return a.production}function ut(a){U("deco_site_import_failed",{error:a instanceof Error?a.message:"Unknown error"}),fe.error("Import failed: "+(a instanceof Error?a.message:"Unknown error"))}function mt(){return{}}function Qe(a,e){const n=L.c(11),{org:o}=G();let d;n[0]!==o.id?(d=ve.REGISTRY(o.id),n[0]=o.id,n[1]=d):d=n[1];const s=d;let m;n[2]!==o.id||n[3]!==s?(m={connectionId:s,orgId:o.id},n[2]=o.id,n[3]=s,n[4]=m):m=n[4];const u=P(m);let r;n[5]!==a?(r={name:a},n[5]=a,n[6]=r):r=n[6];const c=e?.enabled??!0;let f;return n[7]!==u||n[8]!==r||n[9]!==c?(f={client:u,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:r,enabled:c,staleTime:3e5,select:ft},n[7]=u,n[8]=r,n[9]=c,n[10]=f):f=n[10],st(f)}function ft(a){return a.structuredContent?.item??null}const gt=["Full HAR capture with cache, TTFB, and request analysis","Screenshot capture for visual inspection","Page discovery via sitemap, navigation, and link crawling","SEO audit — meta tags, structured data, robots.txt","Third-party script inventory and size analysis","Dead link detection across the entire site","Deco-specific diagnostics (?__d debug mode)"];function Ge(a){const e=L.c(7),{onRecruit:n,isRecruiting:o,isLoading:d}=a;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a blackbox diagnostics agent that tests your storefront from the outside — no internal access needed. Give it a URL and it produces a detailed performance and health report."}),e[0]=s):s=e[0];let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=m):m=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"space-y-2",children:[m,t.jsx("ul",{className:"space-y-1.5",children:gt.map(pt)})]}),e[2]=u):u=e[2];const r=o||d,c=o?"Setting up...":"Add Site Diagnostics";let f;return e[3]!==n||e[4]!==r||e[5]!==c?(f=t.jsxs("div",{className:"flex flex-col gap-6",children:[s,u,t.jsx(ee,{onClick:n,disabled:r,className:"w-full cursor-pointer",children:c})]}),e[3]=n,e[4]=r,e[5]=c,e[6]=f):f=e[6],f}function pt(a){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),a]},a)}function Kt({open:a,onOpenChange:e,existingAgent:n}){const o=Le(),{org:d}=G(),s=pe(),m=Me(),u=Ue(),r=P({connectionId:ne,orgId:d.id}),c=qe({client:r}),[f,h]=v.useState(!1),l=Be.find(C=>C.id==="site-diagnostics"),{data:g,isLoading:I}=Qe(l.appId,{enabled:a}),p=g?.title||g?.server?.title||g?.server?.name||l.title,i=g?.server?.icons?.[0]?.src??l.icon,N=g?.server?.description??null,_=t.jsx(Re,{icon:i,name:p,size:"sm"}),x=async()=>{if(g){if(n){e(!1),s(n.id);return}h(!0);try{const C=await c.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:l.appId},limit:1,offset:0}});let T;const S=C?.structuredContent?.items?.find(w=>w.app_id===l.appId);if(S)T=S.id;else{const w=g.server?.remotes?.[0]?.url;if(!w)throw new Error("Registry item is missing a remote URL for site-diagnostics");T=(await m.create.mutateAsync({title:p,description:N,icon:g.server?.icons?.[0]?.src??l.icon,connection_type:"HTTP",connection_url:w,app_name:g.server?.name??"site-diagnostics",app_id:l.appId,metadata:{type:"site-diagnostics",source:"store",registry_item_id:l.appId,verified:!0}})).id}const E=await u.create.mutateAsync({title:p,description:N,icon:i,status:"active",connections:[{connection_id:T,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"site-diagnostics",instructions:null,ui:{pinnedViews:[{connectionId:T,toolName:"diagnose",label:"diagnose",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:T,toolName:"diagnose"}}}}});U("agent_recruit_confirmed",{template_id:"site-diagnostics",agent_id:E.id}),e(!1),s(E.id)}catch(C){U("agent_recruit_failed",{template_id:"site-diagnostics",error:C instanceof Error?C.message:String(C)}),console.error("Failed to create Site Diagnostics agent:",C)}finally{h(!1)}}},y=`Add ${p}`;return o?t.jsx(we,{open:a,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(Ae,{className:"text-xl font-semibold",children:y})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ge,{onRecruit:x,isRecruiting:f,isLoading:I})})]})}):t.jsx(ie,{open:a,onOpenChange:e,children:t.jsxs(se,{className:"sm:max-w-[500px] p-8",children:[t.jsx(oe,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(ae,{className:"text-xl font-semibold",children:y})]})}),t.jsx(Ge,{onRecruit:x,isRecruiting:f,isLoading:I})]})})}function te(a){const e=L.c(4),{size:n,className:o}=a;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=d):d=e[0];let s;return e[1]!==o||e[2]!==n?(s=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:o,children:d}),e[1]=o,e[2]=n,e[3]=s):s=e[3],s}const ht="deco/mcp-github";function xt(a){const{org:e}=G(),{data:n}=$e.useSession(),o=Me(),d=je(),[s,m]=v.useState("idle"),[u,r]=v.useState(null),[c,f]=v.useState(null),{data:h,isLoading:l}=Qe(ht,{enabled:a.enabled}),g=v.useRef(!1);a.enabled&&h&&!l&&!g.current&&n?.user?.id&&s==="idle"&&(g.current=!0,I());async function I(){if(!(!h||!n?.user?.id||!e))try{m("installing"),r(null);const i=rt(h,e.id,n.user.id,{remoteIndex:0});if(!i.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:_}=await o.create.mutateAsync(i);m("authenticating");const x=new URL(`/mcp/${_}`,window.location.origin),y=await We({url:x.href,token:null});if(y.supportsOAuth&&!y.isAuthenticated){const{token:C,tokenInfo:T,error:j}=await Je({connectionId:_,scope:"offline_access"});if(j||!C){try{await o.delete.mutateAsync(_)}catch{}throw new Error(j??"No token received from GitHub")}if(T)try{(await fetch(`/api/connections/${_}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:T.accessToken,refreshToken:T.refreshToken,expiresIn:T.expiresIn,scope:T.scope,clientId:T.clientId,clientSecret:T.clientSecret,tokenEndpoint:T.tokenEndpoint})})).ok||await o.update.mutateAsync({id:_,data:{connection_token:C}})}catch{await o.update.mutateAsync({id:_,data:{connection_token:C}})}}be(d,e.id),f(i),m("ready")}catch(i){r(i instanceof Error?i.message:String(i)),m("error")}}function p(){m("idle"),r(null),f(null),g.current=!1}return a.enabled&&l&&s==="idle"?{status:"installing",error:null,connection:null,retry:p}:{status:s,error:u,connection:c,retry:p}}function Yt(a){const e=L.c(16),{open:n,onOpenChange:o}=a,[d]=Xe(),[s,m]=v.useState(null);if(!d.experimental_vibecode)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(oe,{className:"sr-only",children:t.jsx(ae,{children:"Import from GitHub"})}),e[0]=u):u=e[0];let r;e[1]!==s?(r=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:s?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>m(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(Ee,{size:16})}),t.jsx("img",{src:s.avatarUrl,alt:s.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:s.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(te,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from GitHub"})]})}),e[1]=s,e[2]=r):r=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ge,{size:18,className:"animate-spin text-muted-foreground"})}),e[3]=c):c=e[3];let f;e[4]!==o?(f=()=>o(!1),e[4]=o,e[5]=f):f=e[5];let h;e[6]!==s||e[7]!==f?(h=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(v.Suspense,{fallback:c,children:t.jsx(Nt,{onComplete:f,selectedInstallation:s,onSelectInstallation:m})})}),e[6]=s,e[7]=f,e[8]=h):h=e[8];let l;e[9]!==r||e[10]!==h?(l=t.jsxs(se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[u,r,h]}),e[9]=r,e[10]=h,e[11]=l):l=e[11];let g;return e[12]!==o||e[13]!==n||e[14]!==l?(g=t.jsx(ie,{open:n,onOpenChange:o,children:l}),e[12]=o,e[13]=n,e[14]=l,e[15]=g):g=e[15],g}function Nt({onComplete:a,selectedInstallation:e,onSelectInstallation:n}){const{org:o}=G(),d=je(),s=pe(),[m,u]=v.useState(null),r=nt({slug:"mcp-github"}),c=xt({enabled:r.length===0}),f=r.length===1?r[0]??null:m,h=P({connectionId:f?.id??"",orgId:o.id}),l=P({connectionId:ne,orgId:o.id}),g=async(i,N)=>{try{const x=await h.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:N}});if(x.isError)return null;const C=x.content?.find(T=>T.type==="resource")?.resource?.text;if(!C)return null;try{const T=JSON.parse(C);return typeof T=="string"?T:JSON.stringify(T)}catch{return C}}catch{return null}},I=(i,N)=>{Promise.all([g(N,"AGENTS.md"),g(N,"CLAUDE.md")]).then(async([_,x])=>{const y=_??x??null;y&&(await l.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:y}}}}),be(d,o.id))}).catch(_=>{console.error("GitHub instructions fetch failed:",_)})},p=He({mutationFn:async i=>{if(!f||!e)throw new Error("No GitHub connection or installation");const N=f.id,_=await l.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!0,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:e.installationId,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"}}}},connections:[{connection_id:N}]}}}),x=_.structuredContent??_;return{virtualMcpId:x.item.id,repo:i,item:x.item}},onSuccess:({virtualMcpId:i,repo:N,item:_})=>{fe.success(`Imported ${N.name} from GitHub`),d.setQueryData(Z.collectionItem(l,o.id,"","VIRTUAL_MCP",i),{item:_}),be(d,o.id),a(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),s(i),I(i,N)},onError:i=>{fe.error("Failed to import repo: "+(i instanceof Error?i.message:"Unknown error"))}});return c.status==="installing"||c.status==="authenticating"?t.jsx(ye,{status:c.status,error:null,retry:c.retry}):c.status==="error"?t.jsx(ye,{status:"error",error:c.error,retry:c.retry}):r.length===0&&c.status==="idle"?t.jsx(ye,{status:"installing",error:null,retry:c.retry}):r.length>1&&!f?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),r.map(i=>t.jsxs("button",{type:"button",onClick:()=>u(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(te,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):f?e?t.jsx(Ct,{connectionId:f.id,orgId:o.id,installation:e,onSelectRepo:i=>p.mutate(i),isSaving:p.isPending}):t.jsx(_t,{connectionId:f.id,orgId:o.id,onSelect:n,showBackButton:r.length>1,onBack:()=>u(null)}):null}function _t(a){const e=L.c(30),{connectionId:n,orgId:o,onSelect:d,showBackButton:s,onBack:m}=a;let u;e[0]!==o?(u={connectionId:ne,orgId:o},e[0]=o,e[1]=u):u=e[1];const r=P(u);let c;e[2]!==n||e[3]!==o?(c=Z.githubUserOrgs(o,n),e[2]=n,e[3]=o,e[4]=c):c=e[4];let f;e[5]!==n||e[6]!==r?(f=async()=>{const T=(await r.callTool({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:n}})).content?.[0]?.text;if(!T)throw new Error("No response from GITHUB_LIST_USER_ORGS");return JSON.parse(T)},e[5]=n,e[6]=r,e[7]=f):f=e[7];let h;e[8]!==c||e[9]!==f?(h={queryKey:c,queryFn:f},e[8]=c,e[9]=f,e[10]=h):h=e[10];const l=ze(h);if(l.isLoading){let C;return e[11]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ge,{size:18,className:"animate-spin text-muted-foreground"})}),e[11]=C):C=e[11],C}if(l.isError){let C;return e[12]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[12]=C):C=e[12],C}const g=l.data;if(!g)return null;let I;e[13]!==m||e[14]!==s?(I=s&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(Ee,{size:12}),"Change connection"]})}),e[13]=m,e[14]=s,e[15]=I):I=e[15];let p;if(e[16]!==g.installations||e[17]!==d){let C;e[19]!==d?(C=T=>t.jsxs("button",{type:"button",onClick:()=>d(T),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:T.avatarUrl,alt:T.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:T.login}),T.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},T.installationId),e[19]=d,e[20]=C):C=e[20],p=g.installations.map(C),e[16]=g.installations,e[17]=d,e[18]=p}else p=e[18];let i;e[21]!==p?(i=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:p}),e[21]=p,e[22]=i):i=e[22];const N=g.appSlug?`https://github.com/apps/${g.appSlug}/installations/new`:"https://github.com/settings/installations";let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[23]=_):_=e[23];let x;e[24]!==N?(x=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:N,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",_]})}),e[24]=N,e[25]=x):x=e[25];let y;return e[26]!==x||e[27]!==I||e[28]!==i?(y=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[I,i,x]}),e[26]=x,e[27]=I,e[28]=i,e[29]=y):y=e[29],y}function Ct(a){const e=L.c(19),{connectionId:n,orgId:o,installation:d,onSelectRepo:s,isSaving:m}=a,[u,r]=v.useState(""),c=v.useDeferredValue(u),f=u!==c;let h;e[0]!==f||e[1]!==u?(h=t.jsx(Fe,{placeholder:"Search repositories...",value:u,onChange:r,isSearching:f}),e[0]=f,e[1]=u,e[2]=h):h=e[2];const l=f?"opacity-40":"opacity-100";let g;e[3]!==l?(g=me("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[3]=l,e[4]=g):g=e[4];let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ge,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=I):I=e[5];let p;e[6]!==n||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==s||e[11]!==o?(p=t.jsx(v.Suspense,{fallback:I,children:t.jsx(It,{connectionId:n,orgId:o,installation:d,query:c,onSelectRepo:s,isSaving:m})}),e[6]=n,e[7]=c,e[8]=d,e[9]=m,e[10]=s,e[11]=o,e[12]=p):p=e[12];let i;e[13]!==g||e[14]!==p?(i=t.jsx("div",{className:g,children:p}),e[13]=g,e[14]=p,e[15]=i):i=e[15];let N;return e[16]!==h||e[17]!==i?(N=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,i]}),e[16]=h,e[17]=i,e[18]=N):N=e[18],N}function It(a){const e=L.c(28),{connectionId:n,orgId:o,installation:d,query:s,onSelectRepo:m,isSaving:u}=a;let r;e[0]!==n||e[1]!==o?(r={connectionId:n,orgId:o},e[0]=n,e[1]=o,e[2]=r):r=e[2];const c=P(r),f=d.type==="User"?"user":"org",h=s?`${f}:${d.login} ${s} in:name`:`${f}:${d.login}`;let l;e[3]!==n||e[4]!==d.login||e[5]!==o||e[6]!==s?(l=Z.githubOrgRepos(o,n,d.login,s),e[3]=n,e[4]=d.login,e[5]=o,e[6]=s,e[7]=l):l=e[7];let g;e[8]!==c||e[9]!==h?(g=async()=>{const x=(await c.callTool({name:"search_repositories",arguments:{query:h,page:1,perPage:30}})).content?.[0]?.text;if(!x)throw new Error("No response from search_repositories");return(JSON.parse(x).items??[]).map(Tt)},e[8]=c,e[9]=h,e[10]=g):g=e[10];let I;e[11]!==l||e[12]!==g?(I={queryKey:l,queryFn:g},e[11]=l,e[12]=g,e[13]=I):I=e[13];const{data:p}=Ze(I);if(p.length===0){let _;e[14]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[14]=_):_=e[14];let x;e[15]!==s?(x=s&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[15]=s,e[16]=x):x=e[16];let y;return e[17]!==x?(y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[_,x]}),e[17]=x,e[18]=y):y=e[18],y}let i;if(e[19]!==u||e[20]!==m||e[21]!==p){let _;e[23]!==u||e[24]!==m?(_=x=>t.jsxs("button",{type:"button",onClick:()=>m(x),disabled:u,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(te,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:x.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[x.private?t.jsx(ot,{size:10}):t.jsx(at,{size:10}),x.private?"Private":"Public"]})]},x.fullName),e[23]=u,e[24]=m,e[25]=_):_=e[25],i=p.map(_),e[19]=u,e[20]=m,e[21]=p,e[22]=i}else i=e[22];let N;return e[26]!==i?(N=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:i}),e[26]=i,e[27]=N):N=e[27],N}function Tt(a){return{name:a.name,fullName:a.full_name,owner:a.full_name.split("/")[0]??"",url:a.html_url,private:a.private,description:a.description,updatedAt:a.updated_at}}function ye(a){const e=L.c(33),{status:n,error:o,retry:d}=a;if(n==="error"){let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(te,{className:"size-5 text-destructive"})}),e[0]=T):T=e[0];let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=j):j=e[1];const S=o??"Something went wrong while connecting to GitHub.";let E;e[2]!==S?(E=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[j,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:S})]}),e[2]=S,e[3]=E):E=e[3];let w;e[4]!==d?(w=t.jsx("button",{type:"button",onClick:d,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=d,e[5]=w):w=e[5];let O;return e[6]!==E||e[7]!==w?(O=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[T,E,w]}),e[6]=E,e[7]=w,e[8]=O):O=e[8],O}const s=n==="authenticating";let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(te,{className:"size-5 text-foreground"})}),e[9]=m):m=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"relative size-10",children:[m,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(ge,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=u):u=e[10];const r=s?"Authenticating with GitHub":"Setting up GitHub";let c;e[11]!==r?(c=t.jsx("p",{className:"text-sm font-medium",children:r}),e[11]=r,e[12]=c):c=e[12];const f=s?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==f?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:f}),e[13]=f,e[14]=h):h=e[14];let l;e[15]!==c||e[16]!==h?(l=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[c,h]}),e[15]=c,e[16]=h,e[17]=l):l=e[17];const g=s?"bg-muted-foreground/30":"bg-foreground animate-pulse";let I;e[18]!==g?(I=me("size-1.5 rounded-full",g),e[18]=g,e[19]=I):I=e[19];let p;e[20]!==I?(p=t.jsx("span",{className:I}),e[20]=I,e[21]=p):p=e[21];const i=s?"bg-foreground animate-pulse":"bg-muted-foreground/30";let N;e[22]!==i?(N=me("size-1.5 rounded-full",i),e[22]=i,e[23]=N):N=e[23];let _;e[24]!==N?(_=t.jsx("span",{className:N}),e[24]=N,e[25]=_):_=e[25];let x;e[26]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=x):x=e[26];let y;e[27]!==p||e[28]!==_?(y=t.jsxs("div",{className:"flex items-center gap-1.5",children:[p,_,x]}),e[27]=p,e[28]=_,e[29]=y):y=e[29];let C;return e[30]!==y||e[31]!==l?(C=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[u,l,y]}),e[30]=y,e[31]=l,e[32]=C):C=e[32],C}const yt=`<role>
2
- You are the Agent Manager. You create, configure, and maintain agents (Virtual MCPs) in this workspace.
3
- </role>
4
-
5
- <capabilities>
6
- - Create new agents with appropriate connections and instructions.
7
- - Update agent configurations: instructions, connections, tool/resource/prompt selection.
8
- - List and inspect existing agents and their current setup.
9
- - Delete agents that are no longer needed.
10
- - Configure agent plugins and pinned views.
11
- - Browse available connections to help decide what to aggregate into an agent.
12
- </capabilities>
13
-
14
- <constraints>
15
- - You can list and inspect connections but cannot create, modify, or delete them.
16
- - Always confirm with the user before deleting an agent.
17
- - When adding connections to an agent, verify the connection exists by listing or getting it first.
18
- - Do not broaden an agent's scope unless the user explicitly requests it.
19
- - Preserve existing behavior when updating — apply the smallest necessary change set.
20
- </constraints>
21
-
22
- <workflows>
23
- 1. Creating an agent:
24
- a. List available connections with COLLECTION_CONNECTIONS_LIST.
25
- b. Confirm the agent's purpose, target user, and scope with the user.
26
- c. Create the agent with COLLECTION_VIRTUAL_MCP_CREATE, including a focused title, description, selected connections, and XML-structured instructions.
27
- d. Verify the saved configuration with COLLECTION_VIRTUAL_MCP_GET.
28
-
29
- 2. Updating an agent:
30
- a. Get the current agent config with COLLECTION_VIRTUAL_MCP_GET.
31
- b. If the update changes connections, verify new connections exist with COLLECTION_CONNECTIONS_GET.
32
- c. Apply changes with COLLECTION_VIRTUAL_MCP_UPDATE using the smallest change set.
33
- d. Confirm the final state with COLLECTION_VIRTUAL_MCP_GET.
34
-
35
- 3. Reviewing agents:
36
- a. List all agents with COLLECTION_VIRTUAL_MCP_LIST.
37
- b. For detailed inspection, use COLLECTION_VIRTUAL_MCP_GET on specific agents.
38
- c. Cross-reference with COLLECTION_CONNECTIONS_LIST to identify unused or missing connections.
39
- </workflows>`,bt=`<role>
40
- You are the Automation Manager. You create, configure, and manage automations — background agents that run on triggers (cron schedules or events).
41
- </role>
42
-
43
- <capabilities>
44
- - Create automations with instructions, model configuration, and triggers.
45
- - Add and remove triggers (cron schedules or event-based).
46
- - Manually run automations for testing.
47
- - Update automation behavior, instructions, and model settings.
48
- - List and inspect existing automations.
49
- - Delete automations that are no longer needed.
50
- - Browse available agents and connections to configure automation targets.
51
- </capabilities>
52
-
53
- <constraints>
54
- - You can list and inspect agents and connections but cannot create, modify, or delete them.
55
- - Always confirm with the user before deleting an automation.
56
- - When assigning an agent to an automation, verify the agent exists first.
57
- - Validate cron expressions before adding cron triggers.
58
- - Warn the user about high-frequency triggers (less than 1 minute intervals).
59
- </constraints>
60
-
61
- <workflows>
62
- 1. Creating an automation:
63
- a. Clarify the automation's purpose, schedule, and expected behavior.
64
- b. If the automation targets an agent, list agents with COLLECTION_VIRTUAL_MCP_LIST and confirm the target.
65
- c. Create the automation with AUTOMATION_CREATE, including clear instructions and model config.
66
- d. Add triggers with AUTOMATION_TRIGGER_ADD (cron or event-based).
67
- e. Verify with AUTOMATION_GET.
68
-
69
- 2. Updating an automation:
70
- a. Get current config with AUTOMATION_GET.
71
- b. Apply changes with AUTOMATION_UPDATE.
72
- c. If triggers need updating, use AUTOMATION_TRIGGER_REMOVE and AUTOMATION_TRIGGER_ADD.
73
- d. Confirm the final state with AUTOMATION_GET.
74
-
75
- 3. Testing an automation:
76
- a. Get the automation config with AUTOMATION_GET to review its setup.
77
- b. Run it manually with AUTOMATION_RUN.
78
- c. Report the result to the user.
79
- </workflows>`,jt=`<role>
80
- You are the Connection Manager. You create, configure, test, and manage MCP connections in this workspace.
81
- </role>
82
-
83
- <capabilities>
84
- - Create new connections (HTTP, SSE, STDIO types) with proper configuration.
85
- - List and inspect existing connections and their status.
86
- - Update connection details: URL, headers, authentication, metadata.
87
- - Test connection health to verify connectivity.
88
- - Delete connections that are no longer needed.
89
- </capabilities>
90
-
91
- <constraints>
92
- - Always confirm with the user before deleting a connection.
93
- - Never expose connection tokens or secrets in responses — refer to them as "configured" or "not configured."
94
- - When creating HTTP connections, validate that a URL is provided.
95
- - Test connections after creation or URL changes to verify they work.
96
- - Warn the user if deleting a connection that might be in use by agents (suggest they check first).
97
- </constraints>
98
-
99
- <workflows>
100
- 1. Creating a connection:
101
- a. Clarify the connection type (HTTP, SSE, or STDIO) and target URL/command.
102
- b. Create with COLLECTION_CONNECTIONS_CREATE, including title, description, type, and URL.
103
- c. Test the new connection with CONNECTION_TEST.
104
- d. Report the result to the user.
105
-
106
- 2. Troubleshooting a connection:
107
- a. Get the connection details with COLLECTION_CONNECTIONS_GET.
108
- b. Run CONNECTION_TEST to check health.
109
- c. If the test fails, review the configuration and suggest fixes.
110
- d. After fixes, re-test to confirm.
111
-
112
- 3. Auditing connections:
113
- a. List all connections with COLLECTION_CONNECTIONS_LIST.
114
- b. Test each connection's health with CONNECTION_TEST.
115
- c. Report which connections are healthy, erroring, or inactive.
116
- </workflows>`,vt=[{id:"studio-agent-manager",title:"Agent Manager",icon:"icon://Bot?color=violet",description:"Create, configure, and manage agents",selectedTools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE","COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET"],instructions:yt,getId:Te.AGENT_MANAGER},{id:"studio-automation-manager",title:"Automation Manager",icon:"icon://Zap?color=amber",description:"Create, configure, and run automations with triggers",selectedTools:["AUTOMATION_CREATE","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_RUN","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET"],instructions:bt,getId:Te.AUTOMATION_MANAGER},{id:"studio-connection-manager",title:"Connection Manager",icon:"icon://Link01?color=cyan",description:"Create, configure, test, and manage connections",selectedTools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","CONNECTION_TEST"],instructions:jt,getId:Te.CONNECTION_MANAGER}],Et=[{title:"Agent Manager",description:"Create, configure, and manage agents"},{title:"Automation Manager",description:"Create, configure, and run automations with triggers"},{title:"Connection Manager",description:"Create, configure, test, and manage connections"}];function De(a){const e=L.c(7),{onInstall:n,isInstalling:o}=a;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Install a suite of pre-configured agents for managing your studio. Each agent is scoped to a specific domain with focused instructions."}),e[0]=d):d=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Included agents"}),e[1]=s):s=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"space-y-2",children:[s,t.jsx("ul",{className:"space-y-1.5",children:Et.map(wt)})]}),e[2]=m):m=e[2];const u=o?"Installing...":"Install Studio Pack";let r;return e[3]!==o||e[4]!==n||e[5]!==u?(r=t.jsxs("div",{className:"flex flex-col gap-6",children:[d,m,t.jsx(ee,{onClick:n,disabled:o,className:"w-full cursor-pointer",children:u})]}),e[3]=o,e[4]=n,e[5]=u,e[6]=r):r=e[6],r}function wt(a){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),t.jsxs("span",{children:[t.jsx("span",{className:"text-foreground font-medium",children:a.title})," ","— ",a.description]})]},a.title)}function Wt({open:a,onOpenChange:e}){const n=Le(),{org:o}=G(),d=Ue(),s=it(),m=et(),[u,r]=v.useState(!1),c=t.jsx(Re,{icon:"icon://Package?color=blue",name:"Studio Pack",size:"sm"}),f=async()=>{r(!0);try{const l=ve.SELF(o.id),g=new Set(s.map(p=>p.title));let I=0;for(const p of vt)g.has(p.title)||(await d.create.mutateAsync({title:p.title,description:p.description,icon:p.icon,status:"active",metadata:{instructions:p.instructions},connections:[{connection_id:l,selected_tools:[...p.selectedTools],selected_resources:null,selected_prompts:null}]}),I++);U("agent_recruit_confirmed",{template_id:"studio-pack",installed_count:I}),e(!1),m({to:"/$org",params:{org:o.slug}})}catch(l){U("agent_recruit_failed",{template_id:"studio-pack",error:l instanceof Error?l.message:String(l)}),console.error("Failed to install Studio Pack:",l)}finally{r(!1)}},h="Install Studio Pack";return n?t.jsx(we,{open:a,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[c,t.jsx(Ae,{className:"text-xl font-semibold",children:h})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(De,{onInstall:f,isInstalling:u})})]})}):t.jsx(ie,{open:a,onOpenChange:e,children:t.jsxs(se,{className:"sm:max-w-[500px] p-8",children:[t.jsx(oe,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[c,t.jsx(ae,{className:"text-xl font-semibold",children:h})]})}),t.jsx(De,{onInstall:f,isInstalling:u})]})})}const St="https://sites-lean-canva.decocache.com/api/mcp",Ot=["Build and update Lean Canvas business models visually","Interactive grid UI with all 9 canvas sections","Iterative updates — add information as you discover it","Covers: Problem, Solution, Key Metrics, Unique Value Proposition","Covers: Channels, Customer Segments, Cost Structure, Revenue Streams","Unfair Advantage analysis"];function Ve(a){const e=L.c(7),{onRecruit:n,isRecruiting:o}=a;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a Lean Canvas agent that helps you build and iterate on your business model. Describe your idea and it produces a visual, structured canvas."}),e[0]=d):d=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=s):s=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"space-y-2",children:[s,t.jsx("ul",{className:"space-y-1.5",children:Ot.map(At)})]}),e[2]=m):m=e[2];const u=o?"Setting up...":"Add Lean Canvas";let r;return e[3]!==o||e[4]!==n||e[5]!==u?(r=t.jsxs("div",{className:"flex flex-col gap-6",children:[d,m,t.jsx(ee,{onClick:n,disabled:o,className:"w-full cursor-pointer",children:u})]}),e[3]=o,e[4]=n,e[5]=u,e[6]=r):r=e[6],r}function At(a){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),a]},a)}function Jt({open:a,onOpenChange:e,existingAgent:n}){const o=Le(),{org:d}=G(),s=pe(),m=Me(),u=Ue(),r=P({connectionId:ne,orgId:d.id}),c=qe({client:r}),[f,h]=v.useState(!1),l=Be.find(i=>i.id==="lean-canvas"),g=t.jsx(Re,{icon:l.icon,name:l.title,size:"sm"}),I=async()=>{if(n){e(!1),s(n.id);return}h(!0);try{const i=await c.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:"lean-canvas"},limit:1,offset:0}});let N;const x=i?.structuredContent?.items?.find(T=>T.app_id==="lean-canvas"),y=ve.SELF(d.id);x?N=x.id:N=(await m.create.mutateAsync({title:l.title,description:"Lean Canvas business model builder",icon:l.icon,connection_type:"HTTP",connection_url:St,app_name:"lean-canvas",app_id:"lean-canvas",configuration_state:{OBJECT_STORAGE:{__type:"@deco/object-storage",value:y}},metadata:{type:"lean-canvas",source:"store",verified:!0}})).id;const C=await u.create.mutateAsync({title:l.title,description:"Lean Canvas business model builder",icon:l.icon,status:"active",connections:[{connection_id:N,selected_tools:null,selected_resources:null,selected_prompts:null},{connection_id:y,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"lean-canvas",instructions:null,ui:{pinnedViews:[{connectionId:N,toolName:"lean_canvas",label:"lean_canvas",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:N,toolName:"lean_canvas"}}}}});U("agent_recruit_confirmed",{template_id:"lean-canvas",agent_id:C.id}),e(!1),s(C.id)}catch(i){U("agent_recruit_failed",{template_id:"lean-canvas",error:i instanceof Error?i.message:String(i)}),console.error("Failed to create Lean Canvas agent:",i)}finally{h(!1)}},p=`Add ${l.title}`;return o?t.jsx(we,{open:a,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[g,t.jsx(Ae,{className:"text-xl font-semibold",children:p})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ve,{onRecruit:I,isRecruiting:f})})]})}):t.jsx(ie,{open:a,onOpenChange:e,children:t.jsxs(se,{className:"sm:max-w-[500px] p-8",children:[t.jsx(oe,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[g,t.jsx(ae,{className:"text-xl font-semibold",children:p})]})}),t.jsx(Ve,{onRecruit:I,isRecruiting:f})]})})}export{Yt as G,Qt as I,Jt as L,Kt as S,Wt as a,te as b};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BsuMreOd.js","assets/index-Dorgz0DN.js","assets/index-D6N00IK2.css","assets/ArrowNarrowLeft-DSwx4IX3.js","assets/CheckCircle-Ko5wAfL7.js","assets/Container-BikrIt05.js","assets/Settings02-CZ8z5m7j.js","assets/XCircle-DcnOx3o6.js","assets/constants-DOLR7-In.js","assets/useInfiniteQuery-C3Jmw0Ad.js","assets/infiniteQueryObserver-hlyWaAvC.js","assets/badge-B1bb6NY8.js","assets/input-CMnzIdr8.js","assets/dropdown-menu-FXqXZNLp.js","assets/ChevronDown-Be4lVzvR.js","assets/ChevronRight-Dl1oyiXi.js","assets/table-CDG3Pcei.js","assets/toggle-group-ChSEkXLp.js","assets/use-view-mode-DIuslnT_.js","assets/use-mobile-D_sy_mOx.js","assets/SearchMd-B1ES2efv.js","assets/dialog-BBlf6Y0-.js","assets/X-faz11WMu.js","assets/AlertCircle-CEilS6cR.js","assets/Upload01-DQoYYKo3.js","assets/alert-dialog-DPNSWK0C.js","assets/card-VmNXdIl9.js","assets/Trash01-C86SDHba.js","assets/label-kikML6oQ.js","assets/select-C2IlresN.js","assets/ChevronUp-Br-o6DqX.js","assets/switch-WtRCKaAC.js","assets/textarea-DzDNZNQx.js","assets/checkbox-CAGdj4ly.js","assets/LinkExternal01-DjLDyTuR.js","assets/use-copy-CzzLW-t1.js","assets/Plus-3pgqg7ye.js","assets/Play-DsEaCK4x.js"])))=>i.map(i=>d[i]);
2
- import{e as a,j as t,r,l as i,aF as o}from"./index-Dorgz0DN.js";const n=r.lazy(()=>o(()=>import("./registry-layout-BsuMreOd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37])));function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(i,{size:20,className:"animate-spin text-muted-foreground"})}),children:t.jsx(n,{})}),s[0]=e):e=s[0],e}export{c as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BsuMreOd.js","assets/index-Dorgz0DN.js","assets/index-D6N00IK2.css","assets/ArrowNarrowLeft-DSwx4IX3.js","assets/CheckCircle-Ko5wAfL7.js","assets/Container-BikrIt05.js","assets/Settings02-CZ8z5m7j.js","assets/XCircle-DcnOx3o6.js","assets/constants-DOLR7-In.js","assets/useInfiniteQuery-C3Jmw0Ad.js","assets/infiniteQueryObserver-hlyWaAvC.js","assets/badge-B1bb6NY8.js","assets/input-CMnzIdr8.js","assets/dropdown-menu-FXqXZNLp.js","assets/ChevronDown-Be4lVzvR.js","assets/ChevronRight-Dl1oyiXi.js","assets/table-CDG3Pcei.js","assets/toggle-group-ChSEkXLp.js","assets/use-view-mode-DIuslnT_.js","assets/use-mobile-D_sy_mOx.js","assets/SearchMd-B1ES2efv.js","assets/dialog-BBlf6Y0-.js","assets/X-faz11WMu.js","assets/AlertCircle-CEilS6cR.js","assets/Upload01-DQoYYKo3.js","assets/alert-dialog-DPNSWK0C.js","assets/card-VmNXdIl9.js","assets/Trash01-C86SDHba.js","assets/label-kikML6oQ.js","assets/select-C2IlresN.js","assets/ChevronUp-Br-o6DqX.js","assets/switch-WtRCKaAC.js","assets/textarea-DzDNZNQx.js","assets/checkbox-CAGdj4ly.js","assets/LinkExternal01-DjLDyTuR.js","assets/use-copy-CzzLW-t1.js","assets/Plus-3pgqg7ye.js","assets/Play-DsEaCK4x.js"])))=>i.map(i=>d[i]);
2
- import{e as n,f as c,g as m,j as r,l as f,r as l,aF as u}from"./index-Dorgz0DN.js";const g=l.lazy(()=>u(()=>import("./registry-layout-BsuMreOd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37])));function _(){const e=n.c(5),o=c();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:i}=m(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"h-full flex items-center justify-center",children:r.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=s):s=e[1];let a;return e[2]!==o||e[3]!==i?(a=r.jsx(l.Suspense,{fallback:s,children:r.jsx(g,{onBack:()=>o({to:"/$org/settings/store",params:{org:i}})})}),e[2]=o,e[3]=i,e[4]=a):a=e[4],a}export{_ as default};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-hlyWaAvC.js";import{bY as i}from"./index-Dorgz0DN.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{e as s,g as l,j as o,l as a,E as n,r as c}from"./index-Dorgz0DN.js";import{a as f}from"./index-qeyHcjD9.js";import"./index-kfK6OLDe.js";import"./constants-DOLR7-In.js";import"./collections-cNdZZ911.js";import"./index-Ch9qbqUU.js";import"./use-virtual-mcp-VazaMZSE.js";import"./use-collections-CJP9C70C.js";import"./monaco-editor-DblQESYG.js";import"./scroll-area-UPgVs2bF.js";import"./select-C2IlresN.js";import"./use-mobile-D_sy_mOx.js";import"./ChevronDown-Be4lVzvR.js";import"./ChevronUp-Br-o6DqX.js";import"./accordion-CrXENhKS.js";import"./agent-icon-B7tXdvWJ.js";import"./AlertCircle-CEilS6cR.js";import"./Tool01-sHnbUKmU.js";import"./SearchMd-B1ES2efv.js";import"./ArrowNarrowLeft-DSwx4IX3.js";import"./XCircle-DcnOx3o6.js";import"./ZapSquare-C2CuBY_F.js";import"./Users03-DPaLThya.js";import"./CheckCircle-Ko5wAfL7.js";import"./ChevronRight-Dl1oyiXi.js";import"./Container-BikrIt05.js";import"./Star01-BeBdOnyd.js";import"./Palette-npxPqkwL.js";import"./index-B8be3s7t.js";import"./X-faz11WMu.js";import"./LinkExternal01-DjLDyTuR.js";import"./Lock01-BWBjIjcA.js";import"./Sun-DqEjGh0W.js";import"./Play-DsEaCK4x.js";import"./Plus-3pgqg7ye.js";import"./Settings02-CZ8z5m7j.js";import"./Trash01-C86SDHba.js";import"./Upload01-DQoYYKo3.js";import"./User01-DisUuiTU.js";import"./Zap-RywdJI-6.js";import"./badge-B1bb6NY8.js";import"./view-mode-toggle-BIFsJdKF.js";import"./layout-D47IedlQ.js";import"./use-connection-Bfx2DpWp.js";import"./use-mcp-tools-BNvGRf7N.js";import"./dialog-BBlf6Y0-.js";import"./dropdown-menu-FXqXZNLp.js";import"./integration-icon-C2aL4IRd.js";import"./index-s0sdZ5L_.js";import"./empty-state-Cs7wxKmu.js";import"./create-sse-subscription-CxkOgzKf.js";import"./input-CMnzIdr8.js";function ct(){const t=s.c(4);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/workflows/$itemId"},t[0]=r):r=t[0];const{itemId:e}=l(r);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(a,{size:32,className:"animate-spin text-muted-foreground"})}),t[1]=i):i=t[1];const p=decodeURIComponent(e);let m;return t[2]!==p?(m=o.jsx(n,{children:o.jsx(c.Suspense,{fallback:i,children:o.jsx(f,{itemId:p})})}),t[2]=p,t[3]=m):m=t[3],m}export{ct as default};
@@ -1,236 +0,0 @@
1
- export type CSPair = { // eslint-disable-line @typescript-eslint/naming-convention
2
- /**
3
- The ANSI terminal control sequence for starting this style.
4
- */
5
- readonly open: string;
6
-
7
- /**
8
- The ANSI terminal control sequence for ending this style.
9
- */
10
- readonly close: string;
11
- };
12
-
13
- export type ColorBase = {
14
- /**
15
- The ANSI terminal control sequence for ending this color.
16
- */
17
- readonly close: string;
18
-
19
- ansi(code: number): string;
20
-
21
- ansi256(code: number): string;
22
-
23
- ansi16m(red: number, green: number, blue: number): string;
24
- };
25
-
26
- export type Modifier = {
27
- /**
28
- Resets the current color chain.
29
- */
30
- readonly reset: CSPair;
31
-
32
- /**
33
- Make text bold.
34
- */
35
- readonly bold: CSPair;
36
-
37
- /**
38
- Emitting only a small amount of light.
39
- */
40
- readonly dim: CSPair;
41
-
42
- /**
43
- Make text italic. (Not widely supported)
44
- */
45
- readonly italic: CSPair;
46
-
47
- /**
48
- Make text underline. (Not widely supported)
49
- */
50
- readonly underline: CSPair;
51
-
52
- /**
53
- Make text overline.
54
-
55
- Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.
56
- */
57
- readonly overline: CSPair;
58
-
59
- /**
60
- Inverse background and foreground colors.
61
- */
62
- readonly inverse: CSPair;
63
-
64
- /**
65
- Prints the text, but makes it invisible.
66
- */
67
- readonly hidden: CSPair;
68
-
69
- /**
70
- Puts a horizontal line through the center of the text. (Not widely supported)
71
- */
72
- readonly strikethrough: CSPair;
73
- };
74
-
75
- export type ForegroundColor = {
76
- readonly black: CSPair;
77
- readonly red: CSPair;
78
- readonly green: CSPair;
79
- readonly yellow: CSPair;
80
- readonly blue: CSPair;
81
- readonly cyan: CSPair;
82
- readonly magenta: CSPair;
83
- readonly white: CSPair;
84
-
85
- /**
86
- Alias for `blackBright`.
87
- */
88
- readonly gray: CSPair;
89
-
90
- /**
91
- Alias for `blackBright`.
92
- */
93
- readonly grey: CSPair;
94
-
95
- readonly blackBright: CSPair;
96
- readonly redBright: CSPair;
97
- readonly greenBright: CSPair;
98
- readonly yellowBright: CSPair;
99
- readonly blueBright: CSPair;
100
- readonly cyanBright: CSPair;
101
- readonly magentaBright: CSPair;
102
- readonly whiteBright: CSPair;
103
- };
104
-
105
- export type BackgroundColor = {
106
- readonly bgBlack: CSPair;
107
- readonly bgRed: CSPair;
108
- readonly bgGreen: CSPair;
109
- readonly bgYellow: CSPair;
110
- readonly bgBlue: CSPair;
111
- readonly bgCyan: CSPair;
112
- readonly bgMagenta: CSPair;
113
- readonly bgWhite: CSPair;
114
-
115
- /**
116
- Alias for `bgBlackBright`.
117
- */
118
- readonly bgGray: CSPair;
119
-
120
- /**
121
- Alias for `bgBlackBright`.
122
- */
123
- readonly bgGrey: CSPair;
124
-
125
- readonly bgBlackBright: CSPair;
126
- readonly bgRedBright: CSPair;
127
- readonly bgGreenBright: CSPair;
128
- readonly bgYellowBright: CSPair;
129
- readonly bgBlueBright: CSPair;
130
- readonly bgCyanBright: CSPair;
131
- readonly bgMagentaBright: CSPair;
132
- readonly bgWhiteBright: CSPair;
133
- };
134
-
135
- export type ConvertColor = {
136
- /**
137
- Convert from the RGB color space to the ANSI 256 color space.
138
-
139
- @param red - (`0...255`)
140
- @param green - (`0...255`)
141
- @param blue - (`0...255`)
142
- */
143
- rgbToAnsi256(red: number, green: number, blue: number): number;
144
-
145
- /**
146
- Convert from the RGB HEX color space to the RGB color space.
147
-
148
- @param hex - A hexadecimal string containing RGB data.
149
- */
150
- hexToRgb(hex: string): [red: number, green: number, blue: number];
151
-
152
- /**
153
- Convert from the RGB HEX color space to the ANSI 256 color space.
154
-
155
- @param hex - A hexadecimal string containing RGB data.
156
- */
157
- hexToAnsi256(hex: string): number;
158
-
159
- /**
160
- Convert from the ANSI 256 color space to the ANSI 16 color space.
161
-
162
- @param code - A number representing the ANSI 256 color.
163
- */
164
- ansi256ToAnsi(code: number): number;
165
-
166
- /**
167
- Convert from the RGB color space to the ANSI 16 color space.
168
-
169
- @param red - (`0...255`)
170
- @param green - (`0...255`)
171
- @param blue - (`0...255`)
172
- */
173
- rgbToAnsi(red: number, green: number, blue: number): number;
174
-
175
- /**
176
- Convert from the RGB HEX color space to the ANSI 16 color space.
177
-
178
- @param hex - A hexadecimal string containing RGB data.
179
- */
180
- hexToAnsi(hex: string): number;
181
- };
182
-
183
- /**
184
- Basic modifier names.
185
- */
186
- export type ModifierName = keyof Modifier;
187
-
188
- /**
189
- Basic foreground color names.
190
-
191
- [More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
192
- */
193
- export type ForegroundColorName = keyof ForegroundColor;
194
-
195
- /**
196
- Basic background color names.
197
-
198
- [More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
199
- */
200
- export type BackgroundColorName = keyof BackgroundColor;
201
-
202
- /**
203
- Basic color names. The combination of foreground and background color names.
204
-
205
- [More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
206
- */
207
- export type ColorName = ForegroundColorName | BackgroundColorName;
208
-
209
- /**
210
- Basic modifier names.
211
- */
212
- export const modifierNames: readonly ModifierName[];
213
-
214
- /**
215
- Basic foreground color names.
216
- */
217
- export const foregroundColorNames: readonly ForegroundColorName[];
218
-
219
- /**
220
- Basic background color names.
221
- */
222
- export const backgroundColorNames: readonly BackgroundColorName[];
223
-
224
- /*
225
- Basic color names. The combination of foreground and background color names.
226
- */
227
- export const colorNames: readonly ColorName[];
228
-
229
- declare const ansiStyles: {
230
- readonly modifier: Modifier;
231
- readonly color: ColorBase & ForegroundColor;
232
- readonly bgColor: ColorBase & BackgroundColor;
233
- readonly codes: ReadonlyMap<number, number>;
234
- } & ForegroundColor & BackgroundColor & Modifier & ConvertColor;
235
-
236
- export default ansiStyles;