decocms 4.391.0 → 4.392.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 (349) hide show
  1. package/dist/client/assets/{AlertCircle-C7XYh1LP.js → AlertCircle-BkKLjYOC.js} +1 -1
  2. package/dist/client/assets/{AreaChart-C4sq-vdL.js → AreaChart-4FTrmWBy.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DKFKdEhW.js → ArrowLeft-D4nwRJ7-.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-C3zict5j.js → ArrowRight-nQPozIrY.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CxvPahwH.js → ArrowUp-Csn5SgJE.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-C8NgDV6x.js → CartesianChart-CHtKyIdH.js} +1 -1
  7. package/dist/client/assets/{Check-BwfKMLPG.js → Check-DprX_HgP.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-DEKqa3kd.js → CheckCircle-CwAfwIdO.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-q4oPKOr-.js → ChevronUp-CyHQIeNg.js} +1 -1
  10. package/dist/client/assets/{Copy01-917cUj_E.js → Copy01-DR_-PStN.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-hELMg_Sx.js → CreditCard01-FkjJLYf6.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CjkUMOgL.js → DotsVertical-Dh229HKQ.js} +1 -1
  13. package/dist/client/assets/{Download01-CPeKzo-8.js → Download01-lVVtAHBG.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-CsBQXAp7.js → ErrorBarContext-DDcgfLvN.js} +1 -1
  15. package/dist/client/assets/{Eye-DCYC67JM.js → Eye-D9WzxUGv.js} +1 -1
  16. package/dist/client/assets/{Globe04-DoMDE8nx.js → Globe04-Bk2xL1SC.js} +1 -1
  17. package/dist/client/assets/{Image01-DxuQg5ZH.js → Image01-O4A1bE82.js} +1 -1
  18. package/dist/client/assets/{Key01-BfSgijgm.js → Key01-WM4N1I8T.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-DjraUMOt.js → LayoutLeft-CBXXkPNJ.js} +1 -1
  20. package/dist/client/assets/{Line-kqxWGZSf.js → Line-BXcAkRE_.js} +1 -1
  21. package/dist/client/assets/{Link01-BWLuQcpR.js → Link01-rd8UL2Hq.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-B9ClJ_Qg.js → LinkExternal01-OC7bJzsH.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DOO4XwwF.js → Monitor01-BOIxDnr9.js} +1 -1
  24. package/dist/client/assets/{Package-DRQz4wLi.js → Package-DJRudEqC.js} +1 -1
  25. package/dist/client/assets/{Palette-Dvhh2dSK.js → Palette-VrU8myRy.js} +1 -1
  26. package/dist/client/assets/{Plus-Ba6qwkMK.js → Plus-EIOtFjq1.js} +1 -1
  27. package/dist/client/assets/{SearchLg-CMgR0JDw.js → SearchLg-Cy2aS2d4.js} +1 -1
  28. package/dist/client/assets/{SearchMd-Txysqj2G.js → SearchMd-Dwq1kb4C.js} +1 -1
  29. package/dist/client/assets/{Sector-DGonhzTP.js → Sector-BaFN9F45.js} +1 -1
  30. package/dist/client/assets/{Share07-Bk6B9aSm.js → Share07-Ur7Alsr-.js} +1 -1
  31. package/dist/client/assets/{Stars01-B4M5Dqxf.js → Stars01-saCtWzGm.js} +1 -1
  32. package/dist/client/assets/{Sun--gVdMihW.js → Sun-Bmp5okv3.js} +1 -1
  33. package/dist/client/assets/{Tool01-BHCuYnNd.js → Tool01-CqjpAjrJ.js} +1 -1
  34. package/dist/client/assets/{Trash01-CsCfpAji.js → Trash01-MoXZVaMM.js} +1 -1
  35. package/dist/client/assets/{Upload01-CSXC71XX.js → Upload01-Z35KMD6X.js} +1 -1
  36. package/dist/client/assets/{User01-Dw-e2hAE.js → User01-_Z4o9XPX.js} +1 -1
  37. package/dist/client/assets/{UserSquare-CwnA5RxT.js → UserSquare-ByDmpErs.js} +1 -1
  38. package/dist/client/assets/{Users01-CeFLwGnt.js → Users01-B2otW_h5.js} +1 -1
  39. package/dist/client/assets/{X-OWtKWzrO.js → X-BRHZvFk-.js} +1 -1
  40. package/dist/client/assets/{XCircle-DSYCUNqi.js → XCircle-68p2HGyq.js} +1 -1
  41. package/dist/client/assets/{XClose-CYkHWH70.js → XClose-B_-S5kSO.js} +1 -1
  42. package/dist/client/assets/{Zap-W432e5DT.js → Zap-BGStwy0Y.js} +1 -1
  43. package/dist/client/assets/{ZoomOut-t3-E-TJP.js → ZoomOut-Dk-PLGvk.js} +1 -1
  44. package/dist/client/assets/{access-gate-Cg_ZEu1m.js → access-gate-CkZodJF2.js} +1 -1
  45. package/dist/client/assets/{add-connection-dialog-BFpQrV1k.js → add-connection-dialog-jtuixO8U.js} +1 -1
  46. package/dist/client/assets/{agent-analytics-D1EjitJe.js → agent-analytics-BtqK3hRG.js} +1 -1
  47. package/dist/client/assets/agent-app-DlfFJWt-.js +1 -0
  48. package/dist/client/assets/{agent-assets-B2PIS79l.js → agent-assets-maHEov_K.js} +1 -1
  49. package/dist/client/assets/{agent-automation-B37IfcjV.js → agent-automation-bf2OG2sM.js} +1 -1
  50. package/dist/client/assets/{agent-automations-UJ7wVYS6.js → agent-automations-NSSJ8UC8.js} +1 -1
  51. package/dist/client/assets/{agent-connect-sources-DtkW9_19.js → agent-connect-sources-BrGwcHvu.js} +1 -1
  52. package/dist/client/assets/agent-deck-D09g0smk.js +1 -0
  53. package/dist/client/assets/{agent-e2e-C60x1wsY.js → agent-e2e-CuKF4QOK.js} +1 -1
  54. package/dist/client/assets/{agent-experiments-C0Ha4-43.js → agent-experiments-s7oZkl1k.js} +1 -1
  55. package/dist/client/assets/agent-file-qAWPqT7R.js +1 -0
  56. package/dist/client/assets/{agent-git-ChsmxB_p.js → agent-git-CWSuOyJy.js} +1 -1
  57. package/dist/client/assets/{agent-hosting-BTt1UCz2.js → agent-hosting-Di77sQHu.js} +1 -1
  58. package/dist/client/assets/{agent-icon-CewaSqRN.js → agent-icon-6AdBkGaO.js} +1 -1
  59. package/dist/client/assets/agent-library-file-BLnRCE8n.js +1 -0
  60. package/dist/client/assets/{agent-monitor-Dmt-MVQY.js → agent-monitor-B9o0fejZ.js} +1 -1
  61. package/dist/client/assets/{agent-overview-BXFbKQLp.js → agent-overview-OWVwHS4B.js} +1 -1
  62. package/dist/client/assets/agent-settings-ew-LCSM1.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-B2yXdhY9.js → agent-site-editor-BOk2KLbD.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-D_NxFHDa.js +2 -0
  65. package/dist/client/assets/{agent-site-editor-content-UlMqjZ3O.js → agent-site-editor-content-BOIzBWOR.js} +2 -2
  66. package/dist/client/assets/{agent-site-editor-preview-DiTZwOol.js → agent-site-editor-preview-DUYI8NnI.js} +3 -3
  67. package/dist/client/assets/agent-view-PkFXJhDQ.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-DMzVSbsJ.js → agent-view-guard-Db4nVuK3.js} +1 -1
  69. package/dist/client/assets/{agents-list-BnlBae8r.js → agents-list-CjHfhGVC.js} +1 -1
  70. package/dist/client/assets/{ai-providers-D8qSbVhm.js → ai-providers-DcpVLn7E.js} +1 -1
  71. package/dist/client/assets/{alert-dialog-KH9mOL8K.js → alert-dialog-D0e9AwWt.js} +1 -1
  72. package/dist/client/assets/{alert-ChROIeKI.js → alert-icE3dxLJ.js} +1 -1
  73. package/dist/client/assets/{api-keys-CZbYOMZG.js → api-keys-9OgC6BZu.js} +1 -1
  74. package/dist/client/assets/api-keys-owtIrYeb.js +1 -0
  75. package/dist/client/assets/app-editor-PEm397pW.js +1 -0
  76. package/dist/client/assets/{asset-utils-DqvmEDqL.js → asset-utils-BqzLBcE9.js} +1 -1
  77. package/dist/client/assets/{auth-tV1hCKGk.js → auth-OYBtHxwv.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-axyosd37.js → auth-catchall-DhoM1zX4.js} +1 -1
  79. package/dist/client/assets/{auth-entry-C3FjXF1z.js → auth-entry-BbQarBsO.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-ClAafGt_.js → auth-split-layout-V3Czx8-D.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-CQZSXOm4.js → authenticate-and-persist-oauth-DLAycEKw.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-D2yNk0A6.js → automation-list-row-BZH2n_9j.js} +1 -1
  83. package/dist/client/assets/{automation-runs-n2c8AyrZ.js → automation-runs-CsHp5Z2T.js} +1 -1
  84. package/dist/client/assets/{automations-ChT4kwhx.js → automations-ZsdWSFCZ.js} +1 -1
  85. package/dist/client/assets/{autosend-BDpreygY.js → autosend-CgTirNYr.js} +1 -1
  86. package/dist/client/assets/{avatar-rHLwoa5q.js → avatar-CN207mly.js} +1 -1
  87. package/dist/client/assets/{badge-Ebj_JDGo.js → badge-qd39z3zD.js} +1 -1
  88. package/dist/client/assets/{block-document-D8lBFBEJ.js → block-document-DQfXGg6f.js} +1 -1
  89. package/dist/client/assets/{blocks-preview-workspace-context-1mgSOVZ1.js → blocks-preview-workspace-context-CCbECGmW.js} +1 -1
  90. package/dist/client/assets/{breadcrumb-IWYYE82J.js → breadcrumb-DdnuJbqz.js} +1 -1
  91. package/dist/client/assets/{buckets-BEOrP3so.js → buckets-BR6Bor58.js} +1 -1
  92. package/dist/client/assets/{build-improve-prompt-doc-DjnFeIXb.js → build-improve-prompt-doc-BmD45xRb.js} +1 -1
  93. package/dist/client/assets/{bulk-category-panel-DG1PiULV.js → bulk-category-panel-D9ckxB_H.js} +1 -1
  94. package/dist/client/assets/{calendar-DdzLC-JC.js → calendar-B37S6JBq.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-D-DecLGu.js → capability-load-error-BRZrVLZD.js} +1 -1
  96. package/dist/client/assets/{category-editor-DN0tRUvD.js → category-editor-BHWnzcXa.js} +1 -1
  97. package/dist/client/assets/{chart-C5by6Kji.js → chart-BXZqqDJp.js} +1 -1
  98. package/dist/client/assets/{chat-context-Ca0p-LeW.js → chat-context-B7SXSssX.js} +1 -1
  99. package/dist/client/assets/{chat-draft-CqAn_Vfs.js → chat-draft-9Q2iU_8d.js} +1 -1
  100. package/dist/client/assets/{checkbox-D4TitUUf.js → checkbox-CDGwwz7A.js} +1 -1
  101. package/dist/client/assets/{choose-editor-Brxm1-_M.js → choose-editor-BoqBTmuM.js} +1 -1
  102. package/dist/client/assets/{claim-phase-copy-CBG91KTW.js → claim-phase-copy-CxXmb5l0.js} +1 -1
  103. package/dist/client/assets/{cli-auth-success-3FFVHifo.js → cli-auth-success-rYkvOpEH.js} +1 -1
  104. package/dist/client/assets/{client-icons-HzHax-dy.js → client-icons-bX5Gp6OB.js} +1 -1
  105. package/dist/client/assets/{collapsible-BFyLpGJL.js → collapsible-BiiGqDaH.js} +1 -1
  106. package/dist/client/assets/{collection-detail-BOk6G1-2.js → collection-detail-DXJwKJBF.js} +1 -1
  107. package/dist/client/assets/{collection-display-button-Dwy7g0C4.js → collection-display-button-D25UtbFW.js} +1 -1
  108. package/dist/client/assets/{collection-search-CD1yqrrY.js → collection-search-DRwcgF3_.js} +1 -1
  109. package/dist/client/assets/{collection-table-wrapper-CkK5eldi.js → collection-table-wrapper-D7taL9RN.js} +1 -1
  110. package/dist/client/assets/{collection-tabs-Caw1XzY7.js → collection-tabs-BUetX-HR.js} +1 -1
  111. package/dist/client/assets/{combobox-BtRPybRg.js → combobox-Da5PqudH.js} +1 -1
  112. package/dist/client/assets/{command-BNilmTZt.js → command-DUn50fWV.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-JVn9bFto.js → companion-mcps-section-CFpWWxNF.js} +1 -1
  114. package/dist/client/assets/{connect-BvHDasOC.js → connect-DHf61HXd.js} +1 -1
  115. package/dist/client/assets/{connect-layout-CRRbDj2T.js → connect-layout-DK-_F95J.js} +1 -1
  116. package/dist/client/assets/{connection-BLi7jQlA.js → connection-ByM_Wxez.js} +1 -1
  117. package/dist/client/assets/{connection-card-CkuD5goh.js → connection-card-D1WSVVai.js} +1 -1
  118. package/dist/client/assets/{connection-detail-DSNfYQGP.js → connection-detail-XoTcYGJg.js} +1 -1
  119. package/dist/client/assets/{connection-form-helpers-Cxrr2Bda.js → connection-form-helpers-LZzOtsqA.js} +1 -1
  120. package/dist/client/assets/{connections-Bq3GdwN4.js → connections-Dc7VgZut.js} +1 -1
  121. package/dist/client/assets/{create-organization-dialog-BpWZlGx5.js → create-organization-dialog-BlsBTS9F.js} +1 -1
  122. package/dist/client/assets/{decofile-api-D_m1F5Sh.js → decofile-api-D_h3Gblx.js} +1 -1
  123. package/dist/client/assets/{decopilot-Bvwnv_0E.js → decopilot-BQM8zkXa.js} +1 -1
  124. package/dist/client/assets/{dialog-BiHCD51F.js → dialog-CEQ8xYb3.js} +1 -1
  125. package/dist/client/assets/{discover-LrqJpVdG.js → discover-B6FPiTo_.js} +1 -1
  126. package/dist/client/assets/{domain-settings-BQkUypwg.js → domain-settings-D6so49Vx.js} +1 -1
  127. package/dist/client/assets/{download-app-dialog-BQ7HWcho.js → download-app-dialog-BOUSactv.js} +1 -1
  128. package/dist/client/assets/{drawer-HIpVVhTG.js → drawer-CNUtN90U.js} +1 -1
  129. package/dist/client/assets/{editor-VChyWwG_.js → editor-8v48sdVc.js} +1 -1
  130. package/dist/client/assets/{empty-state-DsElBMMJ.js → empty-state-DLvt1AQB.js} +1 -1
  131. package/dist/client/assets/{empty-state-DNI9ET09.js → empty-state-QFwDYr7H.js} +1 -1
  132. package/dist/client/assets/{extract-connection-data-BU2XiGI0.js → extract-connection-data-DP-zmz5Q.js} +1 -1
  133. package/dist/client/assets/{feature-gate-B0K-1NS-.js → feature-gate-B8bhUftk.js} +1 -1
  134. package/dist/client/assets/{feature-paywall-rzCx2Z5k.js → feature-paywall-BF1C4cYL.js} +1 -1
  135. package/dist/client/assets/{file-explorer-DRSvz84I.js → file-explorer-tJcKXm9O.js} +1 -1
  136. package/dist/client/assets/{file-preview-CZuyFB46.js → file-preview-GeE7dLFh.js} +1 -1
  137. package/dist/client/assets/{file-share-button-FPPBVpL5.js → file-share-button-DK5pFiIR.js} +1 -1
  138. package/dist/client/assets/{file-type-icon-CCjwL9Av.js → file-type-icon-C9z8EvLi.js} +1 -1
  139. package/dist/client/assets/{folder-icon-WLjnWVkJ.js → folder-icon-Cl7zUUMu.js} +1 -1
  140. package/dist/client/assets/{form-AcJZamdD.js → form-ICzsWaOl.js} +1 -1
  141. package/dist/client/assets/{gateway-client-DoWzklSe.js → gateway-client-CMZ4oDRs.js} +1 -1
  142. package/dist/client/assets/{general-DGfXMRcM.js → general-BTklTVWC.js} +1 -1
  143. package/dist/client/assets/{github-icon-B2uCnmRP.js → github-icon-Pp60gmhg.js} +1 -1
  144. package/dist/client/assets/{home-Cgik3wDb.js → home-Ck6f_BFT.js} +1 -1
  145. package/dist/client/assets/{hooks-CSI_fDo2.js → hooks-3t4Zk0rP.js} +1 -1
  146. package/dist/client/assets/{hooks-DKYPCdyl.js → hooks-BEHfl18c.js} +1 -1
  147. package/dist/client/assets/{icon-button-Nlg6U8EQ.js → icon-button-CEyo5F-q.js} +1 -1
  148. package/dist/client/assets/{index-5B52xTOA.js → index-BXjVPuWq.js} +2 -2
  149. package/dist/client/assets/{index-CGY-kq-c.js → index-C7k3ti7I.js} +1 -1
  150. package/dist/client/assets/{index-DegK9iwb.js → index-CBaY8-yx.js} +1 -1
  151. package/dist/client/assets/{index-Cgykainw.js → index-D313xBO7.js} +1 -1
  152. package/dist/client/assets/{index-BNXm3Ibu.js → index-D49Ap67e.js} +1 -1
  153. package/dist/client/assets/{index-DJ6iEqkv.js → index-DKSgz6Qe.js} +1 -1
  154. package/dist/client/assets/{index-CWlUHRjI.js → index-DQPolR15.js} +1 -1
  155. package/dist/client/assets/{index-DNgF6jv5.js → index-DXnwcsgu.js} +1 -1
  156. package/dist/client/assets/{index-BnUF69Xj.js → index-Dd7YA0wO.js} +1 -1
  157. package/dist/client/assets/{index-BwHxRbrA.js → index-DhsHr6CQ.js} +1 -1
  158. package/dist/client/assets/{index-BPIh7S-h.js → index-DjDdMrVR.js} +1 -1
  159. package/dist/client/assets/{index-B63HDk2l.js → index-DmHYU5Jv.js} +1 -1
  160. package/dist/client/assets/{index-BJcmrbaj.js → index-KiFQUocN.js} +1 -1
  161. package/dist/client/assets/{index-DWriZztG.js → index-hrky3hw7.js} +1 -1
  162. package/dist/client/assets/{index-redirect-CLTJoOM7.js → index-redirect-BcfqEAXA.js} +1 -1
  163. package/dist/client/assets/{infiniteQueryObserver-DBtLPG-c.js → infiniteQueryObserver-Dtc-EzzV.js} +1 -1
  164. package/dist/client/assets/{infra-billing-BLcNotql.js → infra-billing-CVI-zBju.js} +1 -1
  165. package/dist/client/assets/{input-Cgb0vElp.js → input-5Vh9A50N.js} +1 -1
  166. package/dist/client/assets/{input-Ch7PZbUp.js → input-Cz6PEVOa.js} +1 -1
  167. package/dist/client/assets/{input-BYNWWBGn.js → input-jA0cyLeu.js} +1 -1
  168. package/dist/client/assets/{integration-icon-BRrj_nQ-.js → integration-icon-DpGaJPqf.js} +1 -1
  169. package/dist/client/assets/{label-C-VUR_VH.js → label-B-hIAyEG.js} +1 -1
  170. package/dist/client/assets/{last-preview-page-DmKL_HCV.js → last-preview-page-D_5WShZX.js} +1 -1
  171. package/dist/client/assets/{layout-Dndl7jJ6.js → layout-EBsFU16Q.js} +1 -1
  172. package/dist/client/assets/{legacy-agents-deep-DbUHvQXm.js → legacy-agents-deep-DHZFMgtx.js} +1 -1
  173. package/dist/client/assets/{legacy-main-redirect-BDHkK4M3.js → legacy-main-redirect-TARyxreh.js} +1 -1
  174. package/dist/client/assets/{library-BJd5CNj1.js → library-DiDgWybK.js} +1 -1
  175. package/dist/client/assets/{login-zkd8IBqZ.js → login-Du05c0lX.js} +1 -1
  176. package/dist/client/assets/{markdown-DY9ms4Kt.js → markdown-JyzoCkIb.js} +1 -1
  177. package/dist/client/assets/{mcp-app-renderer-Ca7_cQUC.js → mcp-app-renderer-Dho2sriU.js} +1 -1
  178. package/dist/client/assets/{mcp-oauth-ByCC8Qls.js → mcp-oauth-BsYwCxip.js} +1 -1
  179. package/dist/client/assets/{members-a_7qKrc3.js → members-D777BHbd.js} +1 -1
  180. package/dist/client/assets/{message-templates-DiFOx0xp.js → message-templates-m5gmdutf.js} +1 -1
  181. package/dist/client/assets/{mini-report-page-_9d-KnLe.js → mini-report-page-DD4E9yua.js} +1 -1
  182. package/dist/client/assets/{mock-board-Cl3QcdfQ.js → mock-board-CU2MT2Cn.js} +3 -3
  183. package/dist/client/assets/{monaco-editor-xdEx-cEX.js → monaco-editor-UNL8fcds.js} +1 -1
  184. package/dist/client/assets/{monitoring-stats-row-C-ERvfTT.js → monitoring-stats-row-hfHeWldd.js} +1 -1
  185. package/dist/client/assets/{multi-select-BdEksOFD.js → multi-select-D1S6DpsY.js} +1 -1
  186. package/dist/client/assets/{mustache-BKQuQMuu.js → mustache-B3VPKOlY.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-CEUMbLnm.js → oauth-callback-BJ1FZDuV.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-ai-provider-8aWeFFWU.js → oauth-callback-ai-provider-Cj0C-sHE.js} +1 -1
  189. package/dist/client/assets/{onboarding-3uv-gOaj.js → onboarding-CNFRIIYZ.js} +1 -1
  190. package/dist/client/assets/{optimistic-project-sidebar-views-xseDJWMX.js → optimistic-project-sidebar-views-BZWLlGP7.js} +1 -1
  191. package/dist/client/assets/{org-file-open-context-B29htGOp.js → org-file-open-context-CLLI0osj.js} +1 -1
  192. package/dist/client/assets/{organization-choice-DchBMlW8.js → organization-choice-Co_olCzF.js} +1 -1
  193. package/dist/client/assets/{orgs-DYC7jWHm.js → orgs-BbFiiSvG.js} +1 -1
  194. package/dist/client/assets/{page-seo-form-CTIEkIEt.js → page-seo-form-Ct1PF3Wn.js} +1 -1
  195. package/dist/client/assets/{pair-M2hhQDoi.js → pair-Cj8MO08M.js} +1 -1
  196. package/dist/client/assets/{plan-ladder-CPVLeaon.js → plan-ladder-CroHkgan.js} +1 -1
  197. package/dist/client/assets/{popover-NaqlKnjU.js → popover-BXcek1Hz.js} +1 -1
  198. package/dist/client/assets/{post-calendar-BfUoToPJ.js → post-calendar-DkjO4N15.js} +1 -1
  199. package/dist/client/assets/{post-editor-Ue8krvKh.js → post-editor-Zf0e0QhC.js} +1 -1
  200. package/dist/client/assets/{preview-content-DS5Ompc6.js → preview-content-LUVEaNWA.js} +1 -1
  201. package/dist/client/assets/{preview-dialog-BTzt83qx.js → preview-dialog-B_N4Wm8H.js} +1 -1
  202. package/dist/client/assets/{primitives-1pmXVOYN.js → primitives-B9g5mKnw.js} +1 -1
  203. package/dist/client/assets/{profile-B9oH7nfx.js → profile-CkRx-pZP.js} +1 -1
  204. package/dist/client/assets/{project-app-view-1JBqF3nD.js → project-app-view-CtK00PMV.js} +1 -1
  205. package/dist/client/assets/{project-feed-SXSGQo-T.js → project-feed-CmnBizbK.js} +1 -1
  206. package/dist/client/assets/{project-icon-BP9y_bVa.js → project-icon-BAgtAQdl.js} +1 -1
  207. package/dist/client/assets/project-reports-BnzGDwbR.js +1 -0
  208. package/dist/client/assets/project-tasks-DnQYBYTz.js +1 -0
  209. package/dist/client/assets/{prompts-uMiCY1xV.js → prompts-9g8ZK7sg.js} +1 -1
  210. package/dist/client/assets/record-editor-p8nwikHU.js +1 -0
  211. package/dist/client/assets/{redirect-editor-DNG5nxGs.js → redirect-editor-CPoPIede.js} +1 -1
  212. package/dist/client/assets/reports-CslYQZhU.js +1 -0
  213. package/dist/client/assets/{reports-DUu4ahpn.js → reports-DZ5oU-3M.js} +1 -1
  214. package/dist/client/assets/{reports-onboarding-iaeaNf3d.js → reports-onboarding-TtEiw8JU.js} +1 -1
  215. package/dist/client/assets/{reports-tab-CZptCQUr.js → reports-tab-B3En1ZDA.js} +2 -2
  216. package/dist/client/assets/{repositories-Hw7C6ZgN.js → repositories-C1ZMb5NE.js} +1 -1
  217. package/dist/client/assets/{repository-import-picker-hQls-kLa.js → repository-import-picker-BT3rxmLN.js} +1 -1
  218. package/dist/client/assets/{repository-picker-D9AC6JjL.js → repository-picker-DuHE2dO-.js} +1 -1
  219. package/dist/client/assets/{require-capability-CSIXPRnh.js → require-capability-B7I2060A.js} +1 -1
  220. package/dist/client/assets/{required-auth-layout-DbtOtVgf.js → required-auth-layout-C-UkwO5v.js} +1 -1
  221. package/dist/client/assets/{reset-password-BosYJf-x.js → reset-password-B-cj7Men.js} +1 -1
  222. package/dist/client/assets/{resizable-BW_ZfeKg.js → resizable-BJUgDs8n.js} +1 -1
  223. package/dist/client/assets/{review-settings-CyXxb_JJ.js → review-settings-Bb8NJMQz.js} +1 -1
  224. package/dist/client/assets/{rich-text-link-control-Cx23rF91.js → rich-text-link-control-DJ14cUam.js} +1 -1
  225. package/dist/client/assets/{roles-DYB6kIkD.js → roles-C1NH-XPz.js} +1 -1
  226. package/dist/client/assets/{route-BFj4AjyI.js → route-B2ePzPd-.js} +1 -1
  227. package/dist/client/assets/{route-CqVARKbP.js → route-BThmSbvN.js} +1 -1
  228. package/dist/client/assets/{route-DreSOndn.js → route-QXcz4ooq.js} +1 -1
  229. package/dist/client/assets/{route-page-header-C4PBl-Ei.js → route-page-header-DVc7qqV3.js} +1 -1
  230. package/dist/client/assets/{runnable-block-editor-BYvjt7bK.js → runnable-block-editor-D4VmOeE6.js} +1 -1
  231. package/dist/client/assets/{sandbox-lifecycle-context-CrFzAnv2.js → sandbox-lifecycle-context-AITt9SFn.js} +1 -1
  232. package/dist/client/assets/{schema-DKsfkUZc.js → schema-HvsPHig2.js} +1 -1
  233. package/dist/client/assets/{scroll-area-CT2uLFlc.js → scroll-area-B9TNVFOh.js} +1 -1
  234. package/dist/client/assets/{search-input-CpUyBIsL.js → search-input-BYznh7fn.js} +1 -1
  235. package/dist/client/assets/{search-toggle-ICz_71ey.js → search-toggle-D2dsQJ72.js} +1 -1
  236. package/dist/client/assets/{secret-picker-nvhL5xBH.js → secret-picker-xlltrCiX.js} +1 -1
  237. package/dist/client/assets/{secrets-BsGL5oXU.js → secrets-B5RaQlDi.js} +1 -1
  238. package/dist/client/assets/{sections-editor-BNZOfvDP.js → sections-editor-kuSvf51k.js} +1 -1
  239. package/dist/client/assets/{select-co_8WMTl.js → select-CEIWIlq5.js} +1 -1
  240. package/dist/client/assets/{select-model-BBqA9ay-.js → select-model-qRI3mSHf.js} +1 -1
  241. package/dist/client/assets/{seo-editor-Bx4CKLoh.js → seo-editor-CWlzswz5.js} +1 -1
  242. package/dist/client/assets/{separator-DKH_YXVG.js → separator-Cpj5oE0e.js} +1 -1
  243. package/dist/client/assets/{settings-tab-BIz8TjB6.js → settings-tab-BooHFZvX.js} +1 -1
  244. package/dist/client/assets/{sheet-D9m0P3zo.js → sheet-CZl-3Y9o.js} +1 -1
  245. package/dist/client/assets/{shell-layout-AEte0VG5.js → shell-layout-BSxIDFaG.js} +1 -1
  246. package/dist/client/assets/{sidebar-D8Tc1UVx.js → sidebar-7CWbl_bl.js} +1 -1
  247. package/dist/client/assets/{skill-preview-B86S1JCw.js → skill-preview-Tgm7mXyM.js} +1 -1
  248. package/dist/client/assets/{skills-o02v8rby.js → skills-C4ZfRjYT.js} +1 -1
  249. package/dist/client/assets/{sso-xeQB96hz.js → sso-cHp0zbQ3.js} +1 -1
  250. package/dist/client/assets/{switch-C79E3ozz.js → switch-CMovvBtT.js} +1 -1
  251. package/dist/client/assets/{synced-repos-CPP8uZb_.js → synced-repos-Bb1D53Kk.js} +1 -1
  252. package/dist/client/assets/{table-B2xlqq1s.js → table-Mxzf5xaU.js} +1 -1
  253. package/dist/client/assets/{tabs-BTbWvXbF.js → tabs-DFQVgSff.js} +1 -1
  254. package/dist/client/assets/{task-board-DA1OXSBE.js → task-board-DUUzYgHL.js} +1 -1
  255. package/dist/client/assets/{task-route-aKPomJc2.js → task-route-BX8w2Rjd.js} +1 -1
  256. package/dist/client/assets/{task-status-DKGIHoqf.js → task-status-CBoZVvlo.js} +1 -1
  257. package/dist/client/assets/{taskboard-analytics-DXJiOTGC.js → taskboard-analytics-C-0wNMBq.js} +1 -1
  258. package/dist/client/assets/{tasks-mKRo1giX.js → tasks-CAoYJ069.js} +1 -1
  259. package/dist/client/assets/tasks-D_s9KqLA.js +1 -0
  260. package/dist/client/assets/{textarea--CRK0SIu.js → textarea-CFGSOAdM.js} +1 -1
  261. package/dist/client/assets/{thread-button-D-I-zXqG.js → thread-button-BPN32umw.js} +1 -1
  262. package/dist/client/assets/{thread-intent-DaU5iLn7.js → thread-intent-CL-RZ3xC.js} +1 -1
  263. package/dist/client/assets/{thread-route-CQon9zXo.js → thread-route-BeNaYBi6.js} +1 -1
  264. package/dist/client/assets/{thread-route-CwQ1im2n.js → thread-route-D6veYgnC.js} +1 -1
  265. package/dist/client/assets/{thread-sheet-body-OK14moQD.js → thread-sheet-body-3yp_eW9s.js} +1 -1
  266. package/dist/client/assets/{toggle-group-BLjpDOou.js → toggle-group-FgYkeeMJ.js} +1 -1
  267. package/dist/client/assets/{toolbar-icon-button-Ck3bLZJt.js → toolbar-icon-button-D8s1qsiv.js} +1 -1
  268. package/dist/client/assets/{tooltip-CHcv7vpK.js → tooltip-DQkrtNIS.js} +1 -1
  269. package/dist/client/assets/{track-DiO9emD6.js → track-CvTgjFSl.js} +1 -1
  270. package/dist/client/assets/{types-BV0w2KFI.js → types-DOmOcfmj.js} +1 -1
  271. package/dist/client/assets/{usage-stats-wWvfQfpH.js → usage-stats-ChzSEknt.js} +1 -1
  272. package/dist/client/assets/{use-ai-providers-IgWeF_Yp.js → use-ai-providers-PA3bKtu9.js} +1 -1
  273. package/dist/client/assets/{use-automations-BfH1FiaI.js → use-automations-DQiLrhFA.js} +1 -1
  274. package/dist/client/assets/{use-autosave-BdAGMOMk.js → use-autosave-B9KyuBmH.js} +1 -1
  275. package/dist/client/assets/{use-connect-companion-BqdT6eBl.js → use-connect-companion-BAlQ75Fu.js} +1 -1
  276. package/dist/client/assets/{use-connection-BEwzIksW.js → use-connection-Bmf_twoJ.js} +1 -1
  277. package/dist/client/assets/{use-copy-DMwFFOiz.js → use-copy-Dkez88Q7.js} +1 -1
  278. package/dist/client/assets/{use-create-virtual-mcp-BhmqvSWN.js → use-create-virtual-mcp-irWGimzn.js} +1 -1
  279. package/dist/client/assets/{use-date-fns-locale-LLY33UYn.js → use-date-fns-locale-DhZXbX1s.js} +1 -1
  280. package/dist/client/assets/{use-debounced-autosave-DFCrc7Hc.js → use-debounced-autosave-CUIz7iBP.js} +1 -1
  281. package/dist/client/assets/{use-debounced-value-C3kyQhaa.js → use-debounced-value-gQqkvdtq.js} +1 -1
  282. package/dist/client/assets/{use-deco-credits-CnJjtOEx.js → use-deco-credits-DBkXeLio.js} +1 -1
  283. package/dist/client/assets/{use-decopilot-events-quQMn9Rz.js → use-decopilot-events-8DtCOkHI.js} +1 -1
  284. package/dist/client/assets/{use-delete-connection-CGCA29gw.js → use-delete-connection-CULlkGbi.js} +1 -1
  285. package/dist/client/assets/{use-deployment-admin-C3JAYevP.js → use-deployment-admin-CuEPP_O7.js} +1 -1
  286. package/dist/client/assets/{use-entitlements-D0BQDImb.js → use-entitlements-BDw_aV7K.js} +1 -1
  287. package/dist/client/assets/{use-fast-preview-draft-url-DnkLv2gW.js → use-fast-preview-draft-url-lIYWJxyh.js} +1 -1
  288. package/dist/client/assets/{use-file-configs-CqSvS8B1.js → use-file-configs-DbNVJwRU.js} +1 -1
  289. package/dist/client/assets/{use-in-settings-DrFPuBfp.js → use-in-settings-HYmS00zY.js} +1 -1
  290. package/dist/client/assets/{use-infinite-scroll-BJrYoU-n.js → use-infinite-scroll-DI9sJuoF.js} +1 -1
  291. package/dist/client/assets/{use-join-requests-NBzlLqHC.js → use-join-requests-DnWpYGfz.js} +1 -1
  292. package/dist/client/assets/{use-main-panel-tabs-BoZrmxBr.js → use-main-panel-tabs-bowMf_Wl.js} +1 -1
  293. package/dist/client/assets/{use-mcp-auth-status-aufdX61a.js → use-mcp-auth-status-15vEZFK8.js} +1 -1
  294. package/dist/client/assets/{use-mcp-client-9whVU7s_.js → use-mcp-client-CEfXtGHX.js} +1 -1
  295. package/dist/client/assets/{use-mcp-prompts-FcI-EfBr.js → use-mcp-prompts-DYXFxZm3.js} +1 -1
  296. package/dist/client/assets/{use-mcp-tools-BluO18uV.js → use-mcp-tools-DhPgK81T.js} +1 -1
  297. package/dist/client/assets/{use-members-B-Krz1vH.js → use-members-Bqs9AXxu.js} +1 -1
  298. package/dist/client/assets/{use-mobile-BokN3khf.js → use-mobile-B9UMtXTk.js} +1 -1
  299. package/dist/client/assets/{use-navigate-to-agent-BaR6MzKD.js → use-navigate-to-agent-B1JvOWsV.js} +1 -1
  300. package/dist/client/assets/{use-open-billing-url-K-Rdvgdr.js → use-open-billing-url-7xCMgLwn.js} +1 -1
  301. package/dist/client/assets/{use-org-auth-client-lynMCVmX.js → use-org-auth-client-i-ldXIGA.js} +1 -1
  302. package/dist/client/assets/{use-org-fs-XPr29KJT.js → use-org-fs-CindHBpT.js} +1 -1
  303. package/dist/client/assets/{use-org-repo-syncs-zQQE7FPx.js → use-org-repo-syncs-ryZodKfG.js} +1 -1
  304. package/dist/client/assets/{use-org-sso-BGw8bd5o.js → use-org-sso-DwHFwpP3.js} +1 -1
  305. package/dist/client/assets/{use-organization-roles-BQf-ZmCb.js → use-organization-roles-DwmKsrtO.js} +1 -1
  306. package/dist/client/assets/{use-organization-settings-C3DPM_fy.js → use-organization-settings-CHoxVZzD.js} +1 -1
  307. package/dist/client/assets/{use-panel-navigate-LbotBi2g.js → use-panel-navigate-DCNzNKpd.js} +1 -1
  308. package/dist/client/assets/{use-project-native-view-presence-CdsjA_Hh.js → use-project-native-view-presence-jSr_D6a5.js} +1 -1
  309. package/dist/client/assets/{use-project-scope-DRX-2oGI.js → use-project-scope-DSz7-cMo.js} +1 -1
  310. package/dist/client/assets/{use-releases-BTCtYDrn.js → use-releases-B4_a2Wbs.js} +1 -1
  311. package/dist/client/assets/{use-reports-diagnostic-CQ7iP30h.js → use-reports-diagnostic-CayVLjSF.js} +1 -1
  312. package/dist/client/assets/{use-route-default-main-DwKotY2X.js → use-route-default-main-Bp27auUh.js} +1 -1
  313. package/dist/client/assets/{use-secrets-Dc5jrOaj.js → use-secrets-DvfFzb9R.js} +1 -1
  314. package/dist/client/assets/{use-section-preview-base-Rm-klB36.js → use-section-preview-base-LWWxqaRh.js} +1 -1
  315. package/dist/client/assets/{use-session-runtime-B9APT_KV.js → use-session-runtime--s9nNGg_.js} +1 -1
  316. package/dist/client/assets/{use-tags-BPI1SCn2.js → use-tags-liibMW90.js} +1 -1
  317. package/dist/client/assets/{use-task-board-analytics-DCCDxEFW.js → use-task-board-analytics-BfaotLHv.js} +1 -1
  318. package/dist/client/assets/{use-task-metadata-D9xWgzqM.js → use-task-metadata-DzOggew3.js} +1 -1
  319. package/dist/client/assets/{use-thread-outputs-CCVACMN4.js → use-thread-outputs-ByWpU3bY.js} +1 -1
  320. package/dist/client/assets/{use-virtual-mcp-BHMUr50m.js → use-virtual-mcp-jn9aVKmB.js} +1 -1
  321. package/dist/client/assets/useInfiniteQuery-5ulNHqM2.js +1 -0
  322. package/dist/client/assets/{useQueries-BDbrh3nq.js → useQueries-Wm7PFE53.js} +1 -1
  323. package/dist/client/assets/useSuspenseInfiniteQuery-f3QGNJ2Y.js +1 -0
  324. package/dist/client/assets/{users-CdmDAxqG.js → users-BwXBAOd3.js} +1 -1
  325. package/dist/client/assets/{utils-DzlNpEnS.js → utils-Bx4oeOWP.js} +1 -1
  326. package/dist/client/assets/{variant-calendar-LRgRK_pr.js → variant-calendar-C64D2VEe.js} +1 -1
  327. package/dist/client/assets/{variant-matcher-override-DaA1IQ19.js → variant-matcher-override-CRrwy0fz.js} +1 -1
  328. package/dist/client/assets/{view-mode-toggle-CRJbz_JG.js → view-mode-toggle-SPa1NLBA.js} +1 -1
  329. package/dist/client/assets/{virtual-mcp-CvQogmVE.js → virtual-mcp-BxG5l8hm.js} +1 -1
  330. package/dist/client/index.html +1 -1
  331. package/dist/server/cli.js +2 -2
  332. package/dist/server/server.js +2 -2
  333. package/package.json +1 -1
  334. package/dist/client/assets/agent-app-BcFdYaLo.js +0 -1
  335. package/dist/client/assets/agent-deck-CqCZ2x7G.js +0 -1
  336. package/dist/client/assets/agent-file-CNeACefi.js +0 -1
  337. package/dist/client/assets/agent-library-file--vWeiKWs.js +0 -1
  338. package/dist/client/assets/agent-settings-CnZ-S3Vz.js +0 -1
  339. package/dist/client/assets/agent-site-editor-code-DPsDecNC.js +0 -2
  340. package/dist/client/assets/agent-view-an830Uqi.js +0 -1
  341. package/dist/client/assets/api-keys-BMKbKOJm.js +0 -1
  342. package/dist/client/assets/app-editor-CTsyrIFH.js +0 -1
  343. package/dist/client/assets/project-reports-B90QYi1D.js +0 -1
  344. package/dist/client/assets/project-tasks-IhGM501W.js +0 -1
  345. package/dist/client/assets/record-editor-CykxZI4S.js +0 -1
  346. package/dist/client/assets/reports-0zqQqIQH.js +0 -1
  347. package/dist/client/assets/tasks-D_7zBKxD.js +0 -1
  348. package/dist/client/assets/useInfiniteQuery-DHlpZiWe.js +0 -1
  349. package/dist/client/assets/useSuspenseInfiniteQuery-Balc4sSo.js +0 -1
@@ -1 +1 @@
1
- import{ap as t,aq as e,aH as l,bP as a,bN as s,bO as o,cX as c,bQ as d,dT as I,cZ as A,bR as g}from"./index-5B52xTOA.js";const v=t({connection_id:e().describe("Connection ID"),selected_tools:a(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),u=500,w=200,R=200,k=20,_=50,P=100,E=20,U=100,T=50,C=100,N=8192,y=v.extend({selected_tools:a(e()).max(u).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).max(u).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).max(u).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),V=t({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),O=t({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:t({type:c("ext-app"),appId:e(),args:d(e(),g()).optional()})}),S=o(["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations","experiments"]),oe=o(["on","off"]),D=new Map([["manual","on"],["auto","on"]]),L=o(["on","off","manual","auto"]);function X(n){if(!n)return null;const i=D.get(n);return i||(n==="on"||n==="off"?n:null)}const F=t({defaultMainView:t({type:e(),id:e().optional(),toolName:e().optional()}).nullable().optional(),chatDefaultOpen:s().nullable().optional(),cmsDefaultOpen:s().nullable().optional(),cms:L.nullable().optional().describe("How this agent offers content editing. Absent means on; the retired `manual` / `auto` read as on too."),sidebarViews:a(S).max(10).nullable().optional().describe("Deprecated layout-scoped sidebar selections. Read only as a fallback when metadata.sidebarViews is absent."),tabs:a(O).max(E).optional()});function se(n){return X(n?.cms)??"on"}function le(n,i){const r=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...r?{defaultMainView:{type:"site-editor"}}:{}}}const h=t({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:d(e(),g()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:l().int().positive().optional(),maxHeight:l().int().positive().optional()}),H=t({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:a(V).max(P).nullable().optional(),layout:F.nullable().optional(),homeTile:h.nullable().optional(),homeTiles:a(h).max(k).nullable().optional(),homePrompts:a(e()).max(_).nullable().optional()}),B=/^[A-Za-z_][A-Za-z0-9_]*$/,f=e().min(1).regex(B,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),j=A("kind",[t({key:f,kind:c("literal"),value:e().max(N)}),t({key:f,kind:c("secret"),secretId:e().min(1)})]),G=t({selected:e().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:e().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:e().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:a(j).max(C).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config.")}),q=t({url:e().describe("GitHub repository URL"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:l().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),z=o(["agent-sandbox","local-api"]),K={sandboxHandle:e().describe("Provider-specific handle"),previewUrl:e().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:e().nullable().optional().describe("Direct sandbox API URL for runtimes that expose one. Equal to previewUrl for local-api; null/absent for AgentSandbox, which routes control traffic through hosted Studio."),createdAt:l().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:t({packageManager:e().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:e().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:e().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},x=t(K);function re(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,r={};for(const[p,b]of Object.entries(i))if(!(!b||typeof b!="object")&&!(p!=="agent-sandbox"&&p!=="local-api"))try{r[p]=x.parse(b)}catch{}return r}const W=d(e().describe("userId"),d(e().describe("branch"),I(z,x))),Z=t({id:e().describe("Stable identifier for this knowledge file"),name:e().describe("File name shown in the UI"),kind:o(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:e().describe("Org filesystem (Library) volume the file lives in"),path:e().describe("Path within the volume"),url:e().describe("Same-origin URL to read the file (display/download)"),contentType:e().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:l().nullable().optional().describe("File size in bytes"),addedAt:e().describe("ISO timestamp when the file was attached")}),Y=a(Z).max(U).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),Q=o(["smart","code-review","open"]),$=Q.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),J=s().nullable().optional().describe("Enable Fast Preview (sandbox-less): render the draft instantly on the preview server's own page via a ?__draft pointer, with reads/writes served by the decofile API against GitHub. Requires previewServerUrl (or legacy productionUrl) to be set to take effect."),ee=s().nullable().optional().describe("EXPERIMENTAL: with Fast Preview on, refresh content edits via an in-place /live/previews render (no commit, no reload) instead of a commit + re-navigation. Deco-runtime preview targets only. Requires fastPreview."),te=e().nullable().optional().describe("Preview server URL — the deployment the CMS preview renders against (often the live site, e.g. https://acme.com). Painted in the preview iframe, and the render target for Fast Preview drafts. Supersedes the legacy productionUrl key."),ae=t({branch:e().describe("Git branch backing this release"),name:e().describe('User-facing name, e.g. "Black Friday 2026"'),color:e().describe("Dot color token shown in the version switcher"),createdBy:e().optional().describe("User ID who created the release"),createdAt:e().optional().describe("ISO 8601 creation timestamp")}),ne=a(ae).max(T).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),m={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:a(e()).max(R).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:e().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:H.nullable().optional().describe("UI customization settings"),sidebarViews:a(S).max(10).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:c(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),githubRepo:q.nullable().optional().describe("Linked GitHub repository"),runtime:G.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:Y,siteSlug:e().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:$,previewServerUrl:te,productionUrl:e().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:s().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:J,releases:ne,fastPreviewInPlace:ee},ce=t({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:o(["active","inactive"]).describe("Current status"),pinned:s().describe("Whether this space is pinned to the sidebar"),metadata:t(m).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:W.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:a(v).describe("Connections with their selected tools, resources, and prompts")}),M=t({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});t({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:o(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:s().optional().default(!1).describe("Pin to sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:a(M).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});t({title:e().min(1).max(255).optional().describe("New name"),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:o(["active","inactive"]).optional().describe("New status"),pinned:s().optional().describe("Pin/unpin from sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).optional().describe("New connections (replaces existing)"),prompts:a(M).max(20).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});export{oe as C,B as E,T as R,ce as V,re as p,se as r,le as w};
1
+ import{ap as t,aq as e,aH as l,bP as a,bN as s,bO as o,cX as c,bQ as d,dT as I,cZ as A,bR as g}from"./index-BXjVPuWq.js";const v=t({connection_id:e().describe("Connection ID"),selected_tools:a(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),u=500,w=200,R=200,k=20,_=50,P=100,E=20,U=100,T=50,C=100,N=8192,y=v.extend({selected_tools:a(e()).max(u).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).max(u).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).max(u).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),V=t({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),O=t({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:t({type:c("ext-app"),appId:e(),args:d(e(),g()).optional()})}),S=o(["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations","experiments"]),oe=o(["on","off"]),D=new Map([["manual","on"],["auto","on"]]),L=o(["on","off","manual","auto"]);function X(n){if(!n)return null;const i=D.get(n);return i||(n==="on"||n==="off"?n:null)}const F=t({defaultMainView:t({type:e(),id:e().optional(),toolName:e().optional()}).nullable().optional(),chatDefaultOpen:s().nullable().optional(),cmsDefaultOpen:s().nullable().optional(),cms:L.nullable().optional().describe("How this agent offers content editing. Absent means on; the retired `manual` / `auto` read as on too."),sidebarViews:a(S).max(10).nullable().optional().describe("Deprecated layout-scoped sidebar selections. Read only as a fallback when metadata.sidebarViews is absent."),tabs:a(O).max(E).optional()});function se(n){return X(n?.cms)??"on"}function le(n,i){const r=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...r?{defaultMainView:{type:"site-editor"}}:{}}}const h=t({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:d(e(),g()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:l().int().positive().optional(),maxHeight:l().int().positive().optional()}),H=t({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:a(V).max(P).nullable().optional(),layout:F.nullable().optional(),homeTile:h.nullable().optional(),homeTiles:a(h).max(k).nullable().optional(),homePrompts:a(e()).max(_).nullable().optional()}),B=/^[A-Za-z_][A-Za-z0-9_]*$/,f=e().min(1).regex(B,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),j=A("kind",[t({key:f,kind:c("literal"),value:e().max(N)}),t({key:f,kind:c("secret"),secretId:e().min(1)})]),G=t({selected:e().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:e().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:e().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:a(j).max(C).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config.")}),q=t({url:e().describe("GitHub repository URL"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:l().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),z=o(["agent-sandbox","local-api"]),K={sandboxHandle:e().describe("Provider-specific handle"),previewUrl:e().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:e().nullable().optional().describe("Direct sandbox API URL for runtimes that expose one. Equal to previewUrl for local-api; null/absent for AgentSandbox, which routes control traffic through hosted Studio."),createdAt:l().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:t({packageManager:e().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:e().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:e().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},x=t(K);function re(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,r={};for(const[p,b]of Object.entries(i))if(!(!b||typeof b!="object")&&!(p!=="agent-sandbox"&&p!=="local-api"))try{r[p]=x.parse(b)}catch{}return r}const W=d(e().describe("userId"),d(e().describe("branch"),I(z,x))),Z=t({id:e().describe("Stable identifier for this knowledge file"),name:e().describe("File name shown in the UI"),kind:o(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:e().describe("Org filesystem (Library) volume the file lives in"),path:e().describe("Path within the volume"),url:e().describe("Same-origin URL to read the file (display/download)"),contentType:e().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:l().nullable().optional().describe("File size in bytes"),addedAt:e().describe("ISO timestamp when the file was attached")}),Y=a(Z).max(U).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),Q=o(["smart","code-review","open"]),$=Q.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),J=s().nullable().optional().describe("Enable Fast Preview (sandbox-less): render the draft instantly on the preview server's own page via a ?__draft pointer, with reads/writes served by the decofile API against GitHub. Requires previewServerUrl (or legacy productionUrl) to be set to take effect."),ee=s().nullable().optional().describe("EXPERIMENTAL: with Fast Preview on, refresh content edits via an in-place /live/previews render (no commit, no reload) instead of a commit + re-navigation. Deco-runtime preview targets only. Requires fastPreview."),te=e().nullable().optional().describe("Preview server URL — the deployment the CMS preview renders against (often the live site, e.g. https://acme.com). Painted in the preview iframe, and the render target for Fast Preview drafts. Supersedes the legacy productionUrl key."),ae=t({branch:e().describe("Git branch backing this release"),name:e().describe('User-facing name, e.g. "Black Friday 2026"'),color:e().describe("Dot color token shown in the version switcher"),createdBy:e().optional().describe("User ID who created the release"),createdAt:e().optional().describe("ISO 8601 creation timestamp")}),ne=a(ae).max(T).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),m={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:a(e()).max(R).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:e().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:H.nullable().optional().describe("UI customization settings"),sidebarViews:a(S).max(10).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:c(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),githubRepo:q.nullable().optional().describe("Linked GitHub repository"),runtime:G.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:Y,siteSlug:e().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:$,previewServerUrl:te,productionUrl:e().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:s().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:J,releases:ne,fastPreviewInPlace:ee},ce=t({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:o(["active","inactive"]).describe("Current status"),pinned:s().describe("Whether this space is pinned to the sidebar"),metadata:t(m).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:W.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:a(v).describe("Connections with their selected tools, resources, and prompts")}),M=t({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});t({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:o(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:s().optional().default(!1).describe("Pin to sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:a(M).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});t({title:e().min(1).max(255).optional().describe("New name"),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:o(["active","inactive"]).optional().describe("New status"),pinned:s().optional().describe("Pin/unpin from sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).optional().describe("New connections (replaces existing)"),prompts:a(M).max(20).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});export{oe as C,B as E,T as R,ce as V,re as p,se as r,le as w};
@@ -50,7 +50,7 @@
50
50
  <meta name="twitter:description" content="Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in." />
51
51
  <meta name="twitter:image" content="/og-image.png" />
52
52
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
53
- <script type="module" crossorigin src="/assets/index-5B52xTOA.js"></script>
53
+ <script type="module" crossorigin src="/assets/index-BXjVPuWq.js"></script>
54
54
  <link rel="stylesheet" crossorigin href="/assets/index-B7WbW8e4.css">
55
55
  </head>
56
56
  <body>
@@ -2105,7 +2105,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var E8$=L(()=>{_h()});f
2105
2105
  `.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${G}/${K}, keeping in old table`);continue}}await Jl`
2106
2106
  DELETE FROM kysely_migration WHERE name = ${Q}
2107
2107
  `.execute($)}}async function oZ$($){await i34($),await p34($);let Z=new nZ$({db:$,provider:{getMigrations:()=>Promise.resolve(o01)}}),{error:Q,results:X}=await Z.migrateToLatest(),Y=0;if(X?.forEach((J)=>{if(J.status==="Success")Y++;else if(J.status==="Error")console.error(`Failed to execute migration "${J.migrationName}"`)}),Q)throw console.error("Failed to migrate"),console.error(Q),Q;return Y}async function n34($){let{keepOpen:Z=!1,database:Q,skipBetterAuth:X=!1}=$??{},Y="skipped";if(!X&&!Q)Y=await Gr0();let J=Q??K8(),G=async()=>{if(!Z&&!Q)await bD(J).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await oZ$(J.db);return await G(),{betterAuth:Y,kysely:K}}catch(K){throw await G(),K}}async function t34(){let $=K8(),Z=new nZ$({db:$.db,provider:{getMigrations:()=>Promise.resolve(o01)}}),{error:Q,results:X}=await Z.migrateDown();if(X?.forEach((Y)=>{if(Y.status==="Success")console.log(`\u2705 Migration "${Y.migrationName}" rolled back successfully`);else if(Y.status==="Error")console.error(`\u274C Failed to rollback migration "${Y.migrationName}"`)}),Q)throw console.error("Failed to rollback migration"),console.error(Q),Q}var aZ$=L(()=>{pZ$();Kr0();NX()});async function rG0($){let Z={...process.env},Q=hZ0($,Z);console.log(PI1(Q.settings.encryptionKey));let X=Q.settings.betterAuthSecret||(Q.settings.localMode?a4$(Q.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (aJ0(),rJ0)),{outputs:J,services:G}=await Y({home:Q.settings.dataDir,externalDatabaseUrl:Q.externalDatabaseUrl,externalNatsUrl:Q.externalNatsUrl});if(!Q.skipMigrations){let{migrateBetterAuth:W}=await Promise.resolve().then(() => (Kr0(),e4$));await W(J.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (NX(),O4$)),{migrateToLatest:F}=await Promise.resolve().then(() => (aZ$(),rZ$)),U=H(J.databaseUrl);await F({keepOpen:!0,database:U,skipBetterAuth:!0})}let K={...Q.settings,betterAuthSecret:X,databaseUrl:J.databaseUrl,natsUrls:J.natsUrls,...J.s3?{s3Endpoint:J.s3.endpoint,s3Bucket:J.s3.bucket,s3AccessKeyId:J.s3.accessKeyId,s3SecretAccessKey:J.s3.secretAccessKey,s3ForcePathStyle:J.s3.forcePathStyle}:{}};return z8$(K),{settings:K,services:G.map((W)=>({name:W.name==="PostgreSQL"?"Postgres":W.name,port:W.port})),managedServiceNames:G.filter((W)=>W.owner==="managed").map((W)=>W.name)}}var r01=L(()=>{_h();s4$();H$()});var Z7$={};K0(Z7$,{updateService:()=>oP,subscribeCliState:()=>e01,setTuiConsoleIntercepted:()=>aG0,setServerUrl:()=>yr,setMigrationsDone:()=>br,setDevMode:()=>r34,resetCliStateForTests:()=>o34,isTuiConsoleIntercepted:()=>sG0,getCliState:()=>s01,addLogEntry:()=>cD});function sZ$(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function eZ$(){return{services:sZ$(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function o34(){JJ=eZ$()}function fr(){for(let $ of a01)$()}function s01(){return JJ}function e01($){return a01.add($),()=>a01.delete($)}function oP($){JJ={...JJ,services:JJ.services.map((Z)=>Z.name===$.name?$:Z)},fr()}function br(){JJ={...JJ,migrationsStatus:"done"},fr()}function yr($){JJ={...JJ,serverUrl:$},fr()}function cD($){let Z=[...JJ.logs,$];JJ={...JJ,logs:Z.length>500?Z.slice(-500):Z},fr()}function r34(){JJ={...JJ,services:[...sZ$(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},fr()}function aG0($){$7$=$}function sG0(){return $7$}var JJ,a01,$7$=!1;var rP=L(()=>{JJ=eZ$();a01=new Set});import{createServer as Q7$}from"net";function a34($){return new Promise((Z)=>{let Q=Q7$();Q.once("error",()=>Z(!1)),Q.listen($,"0.0.0.0",()=>{Q.close(()=>Z(!0))})})}async function gr($){if(await a34($))return $;let Z=await new Promise((Q,X)=>{let Y=Q7$();Y.once("error",X),Y.listen(0,"0.0.0.0",()=>{let J=Y.address(),G=typeof J==="object"&&J?J.port:0;Y.close(()=>Q(G))})});return console.warn(`Port ${$} is in use, using port ${Z} instead.`),Z}var $11=()=>{};var Q11={};K0(Q11,{startDevServer:()=>e34,pipeToLogStore:()=>Z11});import{join as s34}from"path";function Z11($){let Z=$.getReader(),Q=new TextDecoder,X="";function Y(){let J=X.split(`
2108
- `);X=J.pop()??"";for(let G of J){let K=Bun.stripANSI(G).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;cD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:J,value:G}=await Z.read();if(J)break;X+=Q.decode(G,{stream:!0}),Y()}}catch{}if(X.trim()){let J=Bun.stripANSI(X).replace(/^\[\d+\]\s*/,"").trim();if(J)cD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:J})}})()}async function e34($){let{baseUrl:Z,noTui:Q}=$,X=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=X?process.env.PORT:$.vitePort,J=Z||`http://localhost:${Y}`,G=X?await gr(Number(Y)+1):await gr(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await rG0({port:String(G),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)oP({name:D.name,status:"ready",port:D.port});br();let F=s34(import.meta.dir,"..","..","..","..",".."),U=Q===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:J,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)Z11(N.stdout),Z11(N.stderr);yr(J),oP({name:"Vite",status:"ready",port:Number(Y)}),oP({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(N.kill(D),await N.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (aJ0(),rJ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var X11=L(()=>{r01();rP();$11()});var eG0;var Y11=L(()=>{eG0={name:"decocms",version:"4.391.0",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^4.0.58","@ai-sdk/google":"^4.0.76","@ai-sdk/openai":"^4.0.71","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^3.1.0","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^4.0.17","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^7.0.107","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as ZK4,Text as X7$}from"ink";import{jsx as QK4,jsxs as Y7$}from"react/jsx-runtime";function J7$({version:$}){return Y7$(ZK4,{flexDirection:"column",marginTop:1,children:[zG0.map((Z,Q)=>QK4(X7$,{color:PG0[Q],children:Z},Q)),Y7$(X7$,{dimColor:!0,children:[" v",$]})]})}var G7$=L(()=>{zr()});import{Box as aP,Text as mD}from"ink";import{Spinner as XK4}from"@inkjs/ui";import{jsx as AG,jsxs as Gl}from"react/jsx-runtime";function K7$({status:$}){if($==="pending")return AG(XK4,{label:""});return AG(mD,{color:"green",children:"\u2713"})}function YK4($){return`${$.name}: ${$.port||"...."}`}function W7$({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Gl(aP,{flexDirection:"column",paddingBottom:1,children:[AG(J7$,{version:eG0.version}),AG(aP,{marginBottom:1,children:AG(mD,{dimColor:!0,children:"\u2500".repeat(80)})}),AG(aP,{children:Gl(mD,{dimColor:!0,children:["Home: ",Q]})}),Gl(aP,{gap:2,children:[$.map((Y)=>Gl(aP,{gap:1,children:[AG(mD,{children:YK4(Y)}),AG(K7$,{status:Y.status})]},Y.name)),Gl(aP,{gap:1,children:[AG(mD,{children:"Migrations"}),AG(K7$,{status:Z})]})]}),AG(aP,{children:X?Gl(mD,{children:["Open in browser: ",AG(mD,{color:"cyan",children:X})]}):AG(mD,{dimColor:!0,children:"Starting..."})})]})}var H7$=L(()=>{Y11();G7$()});import{Box as JK4,Text as hr}from"ink";import{jsx as J11,jsxs as G11}from"react/jsx-runtime";function GK4($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function F7$({logs:$}){return J11(JK4,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return J11(hr,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return G11(hr,{children:[G11(hr,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),J11(hr,{color:GK4(Z.status),children:Z.status}),G11(hr,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var U7$=()=>{};var K11={};K0(K11,{App:()=>HK4});import{Box as KK4}from"ink";import{useSyncExternalStore as WK4}from"react";import{jsx as N7$,jsxs as FK4}from"react/jsx-runtime";function HK4({home:$}){let Z=WK4(e01,s01);return FK4(KK4,{flexDirection:"column",children:[N7$(W7$,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),N7$(F7$,{logs:Z.logs})]})}var W11=L(()=>{H7$();U7$();rP()});var $K="thread-gate",qB="decopilot-hosted-harness",MB="decopilot-hosted-harness-sandboxed",ZK="automations",dD="background-tools",sP="task-board-github-reads";var B7$="13";function L7$($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:B7$,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var O7$=()=>{};import UK4 from"pg";async function w7$($,Z){let{databaseUrl:Q,lockTimeoutMs:X=NK4}=$,Y=$.log??((W)=>console.log(W)),J=new UK4.Client({connectionString:Q});await J.connect();let G=Date.now(),K=!1;try{while(!K){if(K=(await J.query("SELECT pg_try_advisory_lock($1) AS locked",[D7$.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-G>=X)throw Error(`Timed out after ${X}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await k$(BK4)}let W=Date.now()-G;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await J.query("SELECT pg_advisory_unlock($1)",[D7$.toString()])}catch{}await J.end().catch(()=>{})}}var D7$=8314027461559302n,NK4=600000,BK4=500;var j7$=L(()=>{w8()});function LK4(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function H11($,Z){for(let Q=0;Q<$.length;Q++){let X=$[Q];if(X===void 0)continue;if(X===Z)return $[Q+1];if(X.startsWith(`${Z}=`))return X.slice(Z.length+1)}return}function E7$(){let $=LK4();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:H11($,"--cpu-prof-dir")??process.cwd(),name:H11($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(H11($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function z7$(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=iP();if(!Q)return;let X={};try{let{heapStats:Y}=await import("bun:jsc"),J=Y(),G=Object.entries(J.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);X={objectCount:J.objectCount,heapSize:J.heapSize,top:Object.fromEntries(G)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:Q.rss,heapUsed:Q.heapUsed,heapTotal:Q.heapTotal,external:Q.external,arrayBuffers:Q.arrayBuffers,...X}))};return Z().catch(()=>{}),$30=setInterval(()=>void Z().catch(()=>{}),$),$30.unref?.(),process.on("SIGUSR2",()=>{try{let Q=Bun.generateHeapSnapshot("v8"),X=typeof Q==="string"?Q:JSON.stringify(Q),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,X),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(Q){console.error("[heap-watch] snapshot failed:",Q)}}),()=>{if($30)clearInterval($30)}}var $30;var P7$=()=>{};import*as OK4 from"bun:jsc";function T7$(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{DK4()}catch(J){return console.error("[stall-watchdog] failed to start sampling profiler:",J),()=>{}}let Q,X=performance.now()+Z,Y=()=>{let J=performance.now(),G=J-X;X=J+Z;let K=[];try{K=wK4()?.traces??[]}catch{}if(G>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(G),samplesInWindow:K.length,top:H}))}Q=setTimeout(Y,Z),Q.unref?.()};return Q=setTimeout(Y,Z),Q.unref?.(),()=>{if(Q)clearTimeout(Q)}}var DK4,wK4;var A7$=L(()=>{({startSamplingProfiler:DK4,samplingProfilerStackTraces:wK4}=OK4)});function R7$(){E7$();let $=[z7$(),K4$(),T7$()];return()=>{for(let Z of $)Z()}}var q7$=L(()=>{so0();P7$();A7$()});var eP=b((M7$)=>{Object.defineProperty(M7$,"__esModule",{value:!0});M7$.RepublishHeaders=M7$.DirectMsgHeaders=M7$.JsHeaders=M7$.AdvisoryKind=void 0;M7$.isOrderedPushConsumerOptions=jK4;M7$.isPullConsumer=EK4;M7$.isPushConsumer=zK4;M7$.isBoundPushConsumerOptions=PK4;function jK4($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function EK4($){return $.isPullConsumer()}function zK4($){return $.isPushConsumer()}function PK4($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}M7$.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};M7$.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};M7$.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};M7$.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var RG=b((V7$)=>{Object.defineProperty(V7$,"__esModule",{value:!0});V7$.TD=V7$.TE=V7$.Empty=void 0;V7$.encode=SK4;V7$.decode=CK4;V7$.Empty=new Uint8Array(0);V7$.TE=new TextEncoder;V7$.TD=new TextDecoder;function kK4(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}function SK4(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(V7$.TE.encode($[Q]));if(Z.length===0)return V7$.Empty;if(Z.length===1)return Z[0];return kK4(...Z)}function CK4($){if(!$||$.length===0)return"";return V7$.TD.decode($)}});var qG=b((C7$)=>{Object.defineProperty(C7$,"__esModule",{value:!0});C7$.errors=C7$.PermissionViolationError=C7$.NoRespondersError=C7$.TimeoutError=C7$.RequestError=C7$.ProtocolError=C7$.ConnectionError=C7$.DrainingConnectionError=C7$.ClosedConnectionError=C7$.AuthorizationError=C7$.UserAuthenticationExpiredError=C7$.InvalidOperationError=C7$.InvalidArgumentError=C7$.InvalidSubjectError=void 0;class U11 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}C7$.InvalidSubjectError=U11;class Z30 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,Q){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((X)=>`'${X}'`),$=$.join(",");else $=`'${$}'`;return new Z30(`${$} ${Z}`,Q)}}C7$.InvalidArgumentError=Z30;class N11 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}C7$.InvalidOperationError=N11;class Q30 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new Q30($);return null}}C7$.UserAuthenticationExpiredError=Q30;class X30 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],Q=$.toLowerCase();for(let X=0;X<Z.length;X++)if(Q.indexOf(Z[X])!==-1)return new X30($);return null}}C7$.AuthorizationError=X30;class B11 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}C7$.ClosedConnectionError=B11;class L11 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}C7$.DrainingConnectionError=L11;class O11 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}C7$.ConnectionError=O11;class D11 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}C7$.ProtocolError=D11;class w11 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof Y30}}C7$.RequestError=w11;class j11 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}C7$.TimeoutError=j11;class Y30 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}C7$.NoRespondersError=Y30;class J30 extends Error{operation;subject;queue;constructor($,Z,Q,X,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=Q,this.queue=X}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let Q="publish",X="",Y=void 0,J=$.match(/(Publish|Subscription) to "(\S+)"/);if(J){if(Q=J[1].toLowerCase(),X=J[2],Q==="subscription"){let G=$.match(/using queue "(\S+)"/);if(G)Y=G[1]}}return new J30($,Q,X,Y)}}C7$.PermissionViolationError=J30;C7$.errors={AuthorizationError:X30,ClosedConnectionError:B11,ConnectionError:O11,DrainingConnectionError:L11,InvalidArgumentError:Z30,InvalidOperationError:N11,InvalidSubjectError:U11,NoRespondersError:Y30,PermissionViolationError:J30,ProtocolError:D11,RequestError:w11,TimeoutError:j11,UserAuthenticationExpiredError:Q30}});var yW=b((b7$)=>{Object.defineProperty(b7$,"__esModule",{value:!0});b7$.SimpleMutex=b7$.Perf=void 0;b7$.extend=tK4;b7$.render=oK4;b7$.timeout=rK4;b7$.delay=aK4;b7$.deadline=sK4;b7$.deferred=z11;b7$.debugDeferred=eK4;b7$.shuffle=$W4;b7$.collect=ZW4;b7$.jitter=f7$;b7$.backoff=QW4;b7$.nanos=XW4;b7$.millis=YW4;b7$.randomToken=KW4;var nK4=RG(),E11=qG();function tK4($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function oK4($){return nK4.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function rK4($,Z=!0){let Q=Z?new E11.TimeoutError:null,X,Y,J=new Promise((G,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new E11.TimeoutError);else K(Q)},$)});return Object.assign(J,X)}function aK4($=0){let Z,Q=new Promise((X)=>{let Y=setTimeout(()=>{X()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),X()}}});return Object.assign(Q,Z)}async function sK4($,Z=1000){let Q=z11(),X=setTimeout(()=>{Q.reject(new E11.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function z11(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function eK4(){let $={},Z=new Promise((Q,X)=>{$={resolve:(Y)=>{console.trace("resolve",Y),Q(Y)},reject:(Y)=>{console.trace("reject"),X(Y)}}});return Object.assign(Z,$)}function $W4($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function ZW4($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class v7${timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,Q){let X=this.timers.get(Z);if(X===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(Q);if(Y===void 0)throw Error(`${Q} is not defined`);this.measures.set($,Y-X)}getEntries(){let $=[];return this.measures.forEach((Z,Q)=>{$.push({name:Q,duration:Z})}),$}}b7$.Perf=v7$;class x7${max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=z11();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}b7$.SimpleMutex=x7$;function f7$($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function QW4($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(Q){return f7$(Q>Z?$[Z]:$[Q])}}}function XW4($){return $*1e6}function YW4($){return Math.floor($/1e6)}var JW4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",IB=new Uint8Array(62);for(let $=0;$<62;$++)IB[$]=JW4.charCodeAt($);var GW4=218340105584896;function KW4(){let $=Math.floor(Math.random()*GW4),Z=$%62,Q=IB[Z];$=($-Z)/62,Z=$%62;let X=IB[Z];$=($-Z)/62,Z=$%62;let Y=IB[Z];$=($-Z)/62,Z=$%62;let J=IB[Z];$=($-Z)/62,Z=$%62;let G=IB[Z];$=($-Z)/62,Z=$%62;let K=IB[Z];$=($-Z)/62,Z=$%62;let W=IB[Z];$=($-Z)/62;let H=IB[$];return String.fromCharCode(Q,X,Y,J,G,K,W,H)}});var d7$=b((c7$)=>{Object.defineProperty(c7$,"__esModule",{value:!0});c7$.nuid=c7$.NuidImpl=void 0;var AW4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",iD=62,K30=12,u7$=10,g7$=33,RW4=333,h7$=K30+u7$,T11=new Uint8Array(iD);for(let $=0;$<iD;$++)T11[$]=AW4.charCodeAt($);var G30=4294967296,l7$=BigInt(iD)**BigInt(u7$),ur=Number(l7$/(1n<<32n)),P11=Number(l7$%(1n<<32n));function qW4($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function MW4($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else qW4($)}class A11{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(h7$),this.cbuf=new Uint8Array(K30),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(ur+1)),this.seqLo=Math.floor(Math.random()*G30);while($++<8&&this.seqHi===ur&&this.seqLo>=P11);if(this.seqHi===ur&&this.seqLo>=P11)this.seqLo=0;this.inc=Math.random()*(RW4-g7$)+g7$|0}setPre(){MW4(this.cbuf);for(let $=0;$<K30;$++)this.buf[$]=T11[this.cbuf[$]%iD]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=h7$-1;Q>=K30;Q--){let X=Math.floor($/iD),J=($-X*iD)*G30+Z,G=Math.floor(J/iD),K=J-G*iD;this.buf[Q]=T11[K],$=X,Z=G}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=G30)this.seqLo-=G30,this.seqHi+=1;if(this.seqHi>ur||this.seqHi===ur&&this.seqLo>=P11)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}c7$.NuidImpl=A11;c7$.nuid=new A11});var t7$=b((p7$)=>{Object.defineProperty(p7$,"__esModule",{value:!0});p7$.nuid=p7$.Nuid=void 0;var i7$=d7$();p7$.Nuid=i7$.NuidImpl;p7$.nuid=i7$.nuid});var H30=b((W30)=>{Object.defineProperty(W30,"__esModule",{value:!0});W30.nuid=W30.Nuid=void 0;var o7$=t7$();Object.defineProperty(W30,"Nuid",{enumerable:!0,get:function(){return o7$.Nuid}});Object.defineProperty(W30,"nuid",{enumerable:!0,get:function(){return o7$.nuid}})});var pD=b((r7$)=>{Object.defineProperty(r7$,"__esModule",{value:!0});r7$.DEFAULT_HOST=r7$.DEFAULT_PORT=r7$.Match=void 0;r7$.syncIterator=_W4;r7$.createInbox=vW4;var SW4=H30(),CW4=qG();r7$.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function _W4($){let Z=$[Symbol.asyncIterator]();return{async next(){let Q=await Z.next();if(Q.done)return Promise.resolve(null);return Promise.resolve(Q.value)}}}function vW4($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw CW4.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${SW4.nuid.next()}`}r7$.DEFAULT_PORT=4222;r7$.DEFAULT_HOST="127.0.0.1"});var lr=b(($Q$)=>{Object.defineProperty($Q$,"__esModule",{value:!0});$Q$.DataBuffer=void 0;var s7$=RG();class e7${buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}static fromAscii($){if(!$)$="";return s7$.TE.encode($)}static toAscii($){return s7$.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let Q=0;Q<this.buffers.length;Q++)$.set(this.buffers[Q],Z),Z+=this.buffers[Q].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let Q=this.byteLength;if($===void 0||$>Q)$=Q;let X=Z.subarray(0,$);if(Q>$)this.buffers.push(Z.subarray($));return this.byteLength=Q-$,X}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let Q=0;Q<Z.length;Q++)if(Z[Q]&&Z[Q].length)this.buffers.push(Z[Q]),this.byteLength+=Z[Q].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}$Q$.DataBuffer=e7$});var $T=b((XQ$)=>{Object.defineProperty(XQ$,"__esModule",{value:!0});XQ$.LF=XQ$.CR=XQ$.CRLF=XQ$.CR_LF_LEN=XQ$.CR_LF=void 0;XQ$.setTransportFactory=lW4;XQ$.defaultPort=cW4;XQ$.getUrlParseFn=mW4;XQ$.newTransport=dW4;XQ$.getResolveFn=iW4;XQ$.protoLen=QQ$;XQ$.extractProtocolMessage=pW4;var gW4=RG(),hW4=pD(),uW4=lr(),MG;function lW4($){MG=$}function cW4(){return MG!==void 0&&MG.defaultPort!==void 0?MG.defaultPort:hW4.DEFAULT_PORT}function mW4(){return MG!==void 0&&MG.urlParseFn?MG.urlParseFn:void 0}function dW4(){if(!MG||typeof MG.factory!=="function")throw Error("transport fn is not set");return MG.factory()}function iW4(){return MG!==void 0&&MG.dnsResolveFn?MG.dnsResolveFn:void 0}XQ$.CR_LF=`\r
2108
+ `);X=J.pop()??"";for(let G of J){let K=Bun.stripANSI(G).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;cD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:J,value:G}=await Z.read();if(J)break;X+=Q.decode(G,{stream:!0}),Y()}}catch{}if(X.trim()){let J=Bun.stripANSI(X).replace(/^\[\d+\]\s*/,"").trim();if(J)cD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:J})}})()}async function e34($){let{baseUrl:Z,noTui:Q}=$,X=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=X?process.env.PORT:$.vitePort,J=Z||`http://localhost:${Y}`,G=X?await gr(Number(Y)+1):await gr(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await rG0({port:String(G),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)oP({name:D.name,status:"ready",port:D.port});br();let F=s34(import.meta.dir,"..","..","..","..",".."),U=Q===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:J,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)Z11(N.stdout),Z11(N.stderr);yr(J),oP({name:"Vite",status:"ready",port:Number(Y)}),oP({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(N.kill(D),await N.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (aJ0(),rJ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var X11=L(()=>{r01();rP();$11()});var eG0;var Y11=L(()=>{eG0={name:"decocms",version:"4.392.0",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^4.0.58","@ai-sdk/google":"^4.0.76","@ai-sdk/openai":"^4.0.71","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^3.1.0","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^4.0.17","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^7.0.107","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as ZK4,Text as X7$}from"ink";import{jsx as QK4,jsxs as Y7$}from"react/jsx-runtime";function J7$({version:$}){return Y7$(ZK4,{flexDirection:"column",marginTop:1,children:[zG0.map((Z,Q)=>QK4(X7$,{color:PG0[Q],children:Z},Q)),Y7$(X7$,{dimColor:!0,children:[" v",$]})]})}var G7$=L(()=>{zr()});import{Box as aP,Text as mD}from"ink";import{Spinner as XK4}from"@inkjs/ui";import{jsx as AG,jsxs as Gl}from"react/jsx-runtime";function K7$({status:$}){if($==="pending")return AG(XK4,{label:""});return AG(mD,{color:"green",children:"\u2713"})}function YK4($){return`${$.name}: ${$.port||"...."}`}function W7$({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Gl(aP,{flexDirection:"column",paddingBottom:1,children:[AG(J7$,{version:eG0.version}),AG(aP,{marginBottom:1,children:AG(mD,{dimColor:!0,children:"\u2500".repeat(80)})}),AG(aP,{children:Gl(mD,{dimColor:!0,children:["Home: ",Q]})}),Gl(aP,{gap:2,children:[$.map((Y)=>Gl(aP,{gap:1,children:[AG(mD,{children:YK4(Y)}),AG(K7$,{status:Y.status})]},Y.name)),Gl(aP,{gap:1,children:[AG(mD,{children:"Migrations"}),AG(K7$,{status:Z})]})]}),AG(aP,{children:X?Gl(mD,{children:["Open in browser: ",AG(mD,{color:"cyan",children:X})]}):AG(mD,{dimColor:!0,children:"Starting..."})})]})}var H7$=L(()=>{Y11();G7$()});import{Box as JK4,Text as hr}from"ink";import{jsx as J11,jsxs as G11}from"react/jsx-runtime";function GK4($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function F7$({logs:$}){return J11(JK4,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return J11(hr,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return G11(hr,{children:[G11(hr,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),J11(hr,{color:GK4(Z.status),children:Z.status}),G11(hr,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var U7$=()=>{};var K11={};K0(K11,{App:()=>HK4});import{Box as KK4}from"ink";import{useSyncExternalStore as WK4}from"react";import{jsx as N7$,jsxs as FK4}from"react/jsx-runtime";function HK4({home:$}){let Z=WK4(e01,s01);return FK4(KK4,{flexDirection:"column",children:[N7$(W7$,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),N7$(F7$,{logs:Z.logs})]})}var W11=L(()=>{H7$();U7$();rP()});var $K="thread-gate",qB="decopilot-hosted-harness",MB="decopilot-hosted-harness-sandboxed",ZK="automations",dD="background-tools",sP="task-board-github-reads";var B7$="13";function L7$($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:B7$,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var O7$=()=>{};import UK4 from"pg";async function w7$($,Z){let{databaseUrl:Q,lockTimeoutMs:X=NK4}=$,Y=$.log??((W)=>console.log(W)),J=new UK4.Client({connectionString:Q});await J.connect();let G=Date.now(),K=!1;try{while(!K){if(K=(await J.query("SELECT pg_try_advisory_lock($1) AS locked",[D7$.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-G>=X)throw Error(`Timed out after ${X}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await k$(BK4)}let W=Date.now()-G;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await J.query("SELECT pg_advisory_unlock($1)",[D7$.toString()])}catch{}await J.end().catch(()=>{})}}var D7$=8314027461559302n,NK4=600000,BK4=500;var j7$=L(()=>{w8()});function LK4(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function H11($,Z){for(let Q=0;Q<$.length;Q++){let X=$[Q];if(X===void 0)continue;if(X===Z)return $[Q+1];if(X.startsWith(`${Z}=`))return X.slice(Z.length+1)}return}function E7$(){let $=LK4();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:H11($,"--cpu-prof-dir")??process.cwd(),name:H11($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(H11($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function z7$(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=iP();if(!Q)return;let X={};try{let{heapStats:Y}=await import("bun:jsc"),J=Y(),G=Object.entries(J.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);X={objectCount:J.objectCount,heapSize:J.heapSize,top:Object.fromEntries(G)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:Q.rss,heapUsed:Q.heapUsed,heapTotal:Q.heapTotal,external:Q.external,arrayBuffers:Q.arrayBuffers,...X}))};return Z().catch(()=>{}),$30=setInterval(()=>void Z().catch(()=>{}),$),$30.unref?.(),process.on("SIGUSR2",()=>{try{let Q=Bun.generateHeapSnapshot("v8"),X=typeof Q==="string"?Q:JSON.stringify(Q),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,X),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(Q){console.error("[heap-watch] snapshot failed:",Q)}}),()=>{if($30)clearInterval($30)}}var $30;var P7$=()=>{};import*as OK4 from"bun:jsc";function T7$(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{DK4()}catch(J){return console.error("[stall-watchdog] failed to start sampling profiler:",J),()=>{}}let Q,X=performance.now()+Z,Y=()=>{let J=performance.now(),G=J-X;X=J+Z;let K=[];try{K=wK4()?.traces??[]}catch{}if(G>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(G),samplesInWindow:K.length,top:H}))}Q=setTimeout(Y,Z),Q.unref?.()};return Q=setTimeout(Y,Z),Q.unref?.(),()=>{if(Q)clearTimeout(Q)}}var DK4,wK4;var A7$=L(()=>{({startSamplingProfiler:DK4,samplingProfilerStackTraces:wK4}=OK4)});function R7$(){E7$();let $=[z7$(),K4$(),T7$()];return()=>{for(let Z of $)Z()}}var q7$=L(()=>{so0();P7$();A7$()});var eP=b((M7$)=>{Object.defineProperty(M7$,"__esModule",{value:!0});M7$.RepublishHeaders=M7$.DirectMsgHeaders=M7$.JsHeaders=M7$.AdvisoryKind=void 0;M7$.isOrderedPushConsumerOptions=jK4;M7$.isPullConsumer=EK4;M7$.isPushConsumer=zK4;M7$.isBoundPushConsumerOptions=PK4;function jK4($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function EK4($){return $.isPullConsumer()}function zK4($){return $.isPushConsumer()}function PK4($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}M7$.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};M7$.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};M7$.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};M7$.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var RG=b((V7$)=>{Object.defineProperty(V7$,"__esModule",{value:!0});V7$.TD=V7$.TE=V7$.Empty=void 0;V7$.encode=SK4;V7$.decode=CK4;V7$.Empty=new Uint8Array(0);V7$.TE=new TextEncoder;V7$.TD=new TextDecoder;function kK4(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}function SK4(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(V7$.TE.encode($[Q]));if(Z.length===0)return V7$.Empty;if(Z.length===1)return Z[0];return kK4(...Z)}function CK4($){if(!$||$.length===0)return"";return V7$.TD.decode($)}});var qG=b((C7$)=>{Object.defineProperty(C7$,"__esModule",{value:!0});C7$.errors=C7$.PermissionViolationError=C7$.NoRespondersError=C7$.TimeoutError=C7$.RequestError=C7$.ProtocolError=C7$.ConnectionError=C7$.DrainingConnectionError=C7$.ClosedConnectionError=C7$.AuthorizationError=C7$.UserAuthenticationExpiredError=C7$.InvalidOperationError=C7$.InvalidArgumentError=C7$.InvalidSubjectError=void 0;class U11 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}C7$.InvalidSubjectError=U11;class Z30 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,Q){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((X)=>`'${X}'`),$=$.join(",");else $=`'${$}'`;return new Z30(`${$} ${Z}`,Q)}}C7$.InvalidArgumentError=Z30;class N11 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}C7$.InvalidOperationError=N11;class Q30 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new Q30($);return null}}C7$.UserAuthenticationExpiredError=Q30;class X30 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],Q=$.toLowerCase();for(let X=0;X<Z.length;X++)if(Q.indexOf(Z[X])!==-1)return new X30($);return null}}C7$.AuthorizationError=X30;class B11 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}C7$.ClosedConnectionError=B11;class L11 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}C7$.DrainingConnectionError=L11;class O11 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}C7$.ConnectionError=O11;class D11 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}C7$.ProtocolError=D11;class w11 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof Y30}}C7$.RequestError=w11;class j11 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}C7$.TimeoutError=j11;class Y30 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}C7$.NoRespondersError=Y30;class J30 extends Error{operation;subject;queue;constructor($,Z,Q,X,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=Q,this.queue=X}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let Q="publish",X="",Y=void 0,J=$.match(/(Publish|Subscription) to "(\S+)"/);if(J){if(Q=J[1].toLowerCase(),X=J[2],Q==="subscription"){let G=$.match(/using queue "(\S+)"/);if(G)Y=G[1]}}return new J30($,Q,X,Y)}}C7$.PermissionViolationError=J30;C7$.errors={AuthorizationError:X30,ClosedConnectionError:B11,ConnectionError:O11,DrainingConnectionError:L11,InvalidArgumentError:Z30,InvalidOperationError:N11,InvalidSubjectError:U11,NoRespondersError:Y30,PermissionViolationError:J30,ProtocolError:D11,RequestError:w11,TimeoutError:j11,UserAuthenticationExpiredError:Q30}});var yW=b((b7$)=>{Object.defineProperty(b7$,"__esModule",{value:!0});b7$.SimpleMutex=b7$.Perf=void 0;b7$.extend=tK4;b7$.render=oK4;b7$.timeout=rK4;b7$.delay=aK4;b7$.deadline=sK4;b7$.deferred=z11;b7$.debugDeferred=eK4;b7$.shuffle=$W4;b7$.collect=ZW4;b7$.jitter=f7$;b7$.backoff=QW4;b7$.nanos=XW4;b7$.millis=YW4;b7$.randomToken=KW4;var nK4=RG(),E11=qG();function tK4($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function oK4($){return nK4.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function rK4($,Z=!0){let Q=Z?new E11.TimeoutError:null,X,Y,J=new Promise((G,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new E11.TimeoutError);else K(Q)},$)});return Object.assign(J,X)}function aK4($=0){let Z,Q=new Promise((X)=>{let Y=setTimeout(()=>{X()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),X()}}});return Object.assign(Q,Z)}async function sK4($,Z=1000){let Q=z11(),X=setTimeout(()=>{Q.reject(new E11.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function z11(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function eK4(){let $={},Z=new Promise((Q,X)=>{$={resolve:(Y)=>{console.trace("resolve",Y),Q(Y)},reject:(Y)=>{console.trace("reject"),X(Y)}}});return Object.assign(Z,$)}function $W4($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function ZW4($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class v7${timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,Q){let X=this.timers.get(Z);if(X===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(Q);if(Y===void 0)throw Error(`${Q} is not defined`);this.measures.set($,Y-X)}getEntries(){let $=[];return this.measures.forEach((Z,Q)=>{$.push({name:Q,duration:Z})}),$}}b7$.Perf=v7$;class x7${max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=z11();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}b7$.SimpleMutex=x7$;function f7$($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function QW4($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(Q){return f7$(Q>Z?$[Z]:$[Q])}}}function XW4($){return $*1e6}function YW4($){return Math.floor($/1e6)}var JW4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",IB=new Uint8Array(62);for(let $=0;$<62;$++)IB[$]=JW4.charCodeAt($);var GW4=218340105584896;function KW4(){let $=Math.floor(Math.random()*GW4),Z=$%62,Q=IB[Z];$=($-Z)/62,Z=$%62;let X=IB[Z];$=($-Z)/62,Z=$%62;let Y=IB[Z];$=($-Z)/62,Z=$%62;let J=IB[Z];$=($-Z)/62,Z=$%62;let G=IB[Z];$=($-Z)/62,Z=$%62;let K=IB[Z];$=($-Z)/62,Z=$%62;let W=IB[Z];$=($-Z)/62;let H=IB[$];return String.fromCharCode(Q,X,Y,J,G,K,W,H)}});var d7$=b((c7$)=>{Object.defineProperty(c7$,"__esModule",{value:!0});c7$.nuid=c7$.NuidImpl=void 0;var AW4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",iD=62,K30=12,u7$=10,g7$=33,RW4=333,h7$=K30+u7$,T11=new Uint8Array(iD);for(let $=0;$<iD;$++)T11[$]=AW4.charCodeAt($);var G30=4294967296,l7$=BigInt(iD)**BigInt(u7$),ur=Number(l7$/(1n<<32n)),P11=Number(l7$%(1n<<32n));function qW4($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function MW4($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else qW4($)}class A11{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(h7$),this.cbuf=new Uint8Array(K30),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(ur+1)),this.seqLo=Math.floor(Math.random()*G30);while($++<8&&this.seqHi===ur&&this.seqLo>=P11);if(this.seqHi===ur&&this.seqLo>=P11)this.seqLo=0;this.inc=Math.random()*(RW4-g7$)+g7$|0}setPre(){MW4(this.cbuf);for(let $=0;$<K30;$++)this.buf[$]=T11[this.cbuf[$]%iD]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=h7$-1;Q>=K30;Q--){let X=Math.floor($/iD),J=($-X*iD)*G30+Z,G=Math.floor(J/iD),K=J-G*iD;this.buf[Q]=T11[K],$=X,Z=G}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=G30)this.seqLo-=G30,this.seqHi+=1;if(this.seqHi>ur||this.seqHi===ur&&this.seqLo>=P11)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}c7$.NuidImpl=A11;c7$.nuid=new A11});var t7$=b((p7$)=>{Object.defineProperty(p7$,"__esModule",{value:!0});p7$.nuid=p7$.Nuid=void 0;var i7$=d7$();p7$.Nuid=i7$.NuidImpl;p7$.nuid=i7$.nuid});var H30=b((W30)=>{Object.defineProperty(W30,"__esModule",{value:!0});W30.nuid=W30.Nuid=void 0;var o7$=t7$();Object.defineProperty(W30,"Nuid",{enumerable:!0,get:function(){return o7$.Nuid}});Object.defineProperty(W30,"nuid",{enumerable:!0,get:function(){return o7$.nuid}})});var pD=b((r7$)=>{Object.defineProperty(r7$,"__esModule",{value:!0});r7$.DEFAULT_HOST=r7$.DEFAULT_PORT=r7$.Match=void 0;r7$.syncIterator=_W4;r7$.createInbox=vW4;var SW4=H30(),CW4=qG();r7$.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function _W4($){let Z=$[Symbol.asyncIterator]();return{async next(){let Q=await Z.next();if(Q.done)return Promise.resolve(null);return Promise.resolve(Q.value)}}}function vW4($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw CW4.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${SW4.nuid.next()}`}r7$.DEFAULT_PORT=4222;r7$.DEFAULT_HOST="127.0.0.1"});var lr=b(($Q$)=>{Object.defineProperty($Q$,"__esModule",{value:!0});$Q$.DataBuffer=void 0;var s7$=RG();class e7${buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}static fromAscii($){if(!$)$="";return s7$.TE.encode($)}static toAscii($){return s7$.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let Q=0;Q<this.buffers.length;Q++)$.set(this.buffers[Q],Z),Z+=this.buffers[Q].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let Q=this.byteLength;if($===void 0||$>Q)$=Q;let X=Z.subarray(0,$);if(Q>$)this.buffers.push(Z.subarray($));return this.byteLength=Q-$,X}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let Q=0;Q<Z.length;Q++)if(Z[Q]&&Z[Q].length)this.buffers.push(Z[Q]),this.byteLength+=Z[Q].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}$Q$.DataBuffer=e7$});var $T=b((XQ$)=>{Object.defineProperty(XQ$,"__esModule",{value:!0});XQ$.LF=XQ$.CR=XQ$.CRLF=XQ$.CR_LF_LEN=XQ$.CR_LF=void 0;XQ$.setTransportFactory=lW4;XQ$.defaultPort=cW4;XQ$.getUrlParseFn=mW4;XQ$.newTransport=dW4;XQ$.getResolveFn=iW4;XQ$.protoLen=QQ$;XQ$.extractProtocolMessage=pW4;var gW4=RG(),hW4=pD(),uW4=lr(),MG;function lW4($){MG=$}function cW4(){return MG!==void 0&&MG.defaultPort!==void 0?MG.defaultPort:hW4.DEFAULT_PORT}function mW4(){return MG!==void 0&&MG.urlParseFn?MG.urlParseFn:void 0}function dW4(){if(!MG||typeof MG.factory!=="function")throw Error("transport fn is not set");return MG.factory()}function iW4(){return MG!==void 0&&MG.dnsResolveFn?MG.dnsResolveFn:void 0}XQ$.CR_LF=`\r
2109
2109
  `;XQ$.CR_LF_LEN=XQ$.CR_LF.length;XQ$.CRLF=uW4.DataBuffer.fromAscii(XQ$.CR_LF);XQ$.CR=new Uint8Array(XQ$.CRLF)[0];XQ$.LF=new Uint8Array(XQ$.CRLF)[1];function QQ$($){for(let Z=0;Z<$.length;Z++){let Q=Z+1;if($.byteLength>Q&&$[Z]===XQ$.CR&&$[Q]===XQ$.LF)return Q+1}return 0}function pW4($){let Z=QQ$($);if(Z>0){let X=new Uint8Array($).slice(0,Z);return gW4.TD.decode(X)}return""}});var V11=b((UQ$)=>{Object.defineProperty(UQ$,"__esModule",{value:!0});UQ$.ipV4=WQ$;UQ$.isIP=XH4;UQ$.parseIP=HQ$;var cr=4,ZT=16,F30=48,KQ$=57,JQ$=65,ZH4=70,GQ$=97,QH4=102,I11=16777215;function WQ$($,Z,Q,X){let Y=new Uint8Array(ZT);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((G,K)=>{Y[K]=G}),Y[12]=$,Y[13]=Z,Y[14]=Q,Y[15]=X,Y}function XH4($){return HQ$($)!==void 0}function HQ$($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return FQ$($);case":":return YH4($)}return}function FQ$($){let Z=new Uint8Array(cr);for(let Q=0;Q<cr;Q++){if($.length===0)return;if(Q>0){if($[0]!==".")return;$=$.substring(1)}let{n:X,c:Y,ok:J}=JH4($);if(!J||X>255)return;$=$.substring(Y),Z[Q]=X}return WQ$(Z[0],Z[1],Z[2],Z[3])}function YH4($){let Z=new Uint8Array(ZT),Q=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(Q=0,$=$.substring(2),$.length===0)return Z}let X=0;while(X<ZT){let{n:Y,c:J,ok:G}=GH4($);if(!G||Y>65535)return;if(J<$.length&&$[J]==="."){if(Q<0&&X!=ZT-cr)return;if(X+cr>ZT)return;let K=FQ$($);if(K===void 0)return;Z[X]=K[12],Z[X+1]=K[13],Z[X+2]=K[14],Z[X+3]=K[15],$="",X+=cr;break}if(Z[X]=Y>>8,Z[X+1]=Y,X+=2,$=$.substring(J),$.length===0)break;if($[0]!==":"||$.length==1)return;if($=$.substring(1),$[0]===":"){if(Q>=0)return;if(Q=X,$=$.substring(1),$.length===0)break}}if($.length!==0)return;if(X<ZT){if(Q<0)return;let Y=ZT-X;for(let J=X-1;J>=Q;J--)Z[J+Y]=Z[J];for(let J=Q+Y-1;J>=Q;J--)Z[J]=0}else if(Q>=0)return;return Z}function JH4($){let Z=0,Q=0;for(Z=0;Z<$.length&&F30<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=KQ$;Z++)if(Q=Q*10+($.charCodeAt(Z)-F30),Q>=I11)return{n:I11,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:Q,c:Z,ok:!0}}function GH4($){let Z=0,Q=0;for(Q=0;Q<$.length;Q++){if(F30<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=KQ$)Z*=16,Z+=$.charCodeAt(Q)-F30;else if(GQ$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=QH4)Z*=16,Z+=$.charCodeAt(Q)-GQ$+10;else if(JQ$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=ZH4)Z*=16,Z+=$.charCodeAt(Q)-JQ$+10;else break;if(Z>=I11)return{n:0,c:Q,ok:!1}}if(Q===0)return{n:0,c:Q,ok:!1};return{n:Z,c:Q,ok:!0}}});var x11=b((BQ$)=>{Object.defineProperty(BQ$,"__esModule",{value:!0});BQ$.Servers=BQ$.ServerImpl=void 0;BQ$.isIPV4OrHostname=NQ$;BQ$.hostPort=v11;var k11=$T(),S11=yW(),C11=V11(),FH4=pD(),UH4=qG();function NQ$($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function _11($){return!NQ$($)}function NH4($){let Q=$.toUpperCase().indexOf("::FFFF:");if(Q!==-1&&$.indexOf(".")!==-1){let X=$.substring(Q+7);return X=X.replace("[",""),X.replace("]","")}return $}function v11($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=NH4($),_11($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=_11($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),Q=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):FH4.DEFAULT_PORT,Y=new URL(`${Q===80?"https":"http"}://${$}`);Y.port=`${Q}`;let J=Y.hostname;if(J.charAt(0)==="[")J=J.substring(1,J.length-1);return{listen:Y.host,hostname:J,port:Q}}class Kl{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let Q=v11($);this.listen=Q.listen,this.hostname=Q.hostname,this.port=Q.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=Z}toString(){return this.listen}async resolve($){if(!$.fn||$.resolve===!1)return[this];let Z=[];if((0,C11.isIP)(this.hostname))return[this];else{let Q=await $.fn(this.hostname);if($.debug)console.log(`resolve ${this.hostname} = ${Q.join(",")}`);for(let X of Q){let Y=this.port===80?"https":"http",J=new URL(`${Y}://${_11(X)?"["+X+"]":X}`);J.port=`${this.port}`;let G=new Kl(J.host,!1);G.tlsName=this.hostname,Z.push(G)}}if($.randomize)(0,S11.shuffle)(Z);return this.resolves=Z,Z}}BQ$.ServerImpl=Kl;class U30{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw UH4.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,k11.getUrlParseFn)(),Q=new Map;for(let Y of this.servers)Q.set(Y.listen,Y);let X=[];for(let Y of $){Y=Z?Z(Y):Y;let{listen:J}=v11(Y),G=Q.get(J);if(G)G.gossiped=!1,X.push(G);else X.push(new Kl(Y))}if(this.randomize)(0,S11.shuffle)(X);if(this.servers=X,this.currentServer===void 0||!X.includes(this.currentServer))this.currentServer=X[0],this.firstSelect=!0}clear(){this.servers.length=0}updateTLSName(){let $=this.getCurrentServer();if(!(0,C11.isIP)($.hostname))this.tlsName=$.hostname,this.servers.forEach((Z)=>{if(Z.gossiped)Z.tlsName=this.tlsName})}getCurrentServer(){return this.currentServer}addServer($,Z=!1){let Q=(0,k11.getUrlParseFn)();$=Q?Q($):$;let X=new Kl($,Z);if((0,C11.isIP)(X.hostname))X.tlsName=this.tlsName;this.servers.push(X)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;let $=this.servers.shift();if($)this.servers.push($),this.currentServer=$;return $}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer($){if($){let Z=this.servers.indexOf($);this.servers.splice(Z,1)}}snapshot(){return U30.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return U30.freezeAll([$,...this.servers.slice(0,Z),...this.servers.slice(Z+1)])}static freezeAll($){return $.map((Z)=>Object.freeze({hostname:Z.hostname,port:Z.port,listen:Z.listen,src:Z.src,tlsName:Z.tlsName,reconnects:Z.reconnects,lastConnect:Z.lastConnect,gossiped:Z.gossiped,didConnect:Z.didConnect}))}find($){return this.servers.find((Z)=>Z.listen===$.listen)}setCurrent($){this.currentServer=$}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update($,Z){let Q=[],X=[],Y=(0,k11.getUrlParseFn)(),J=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new Kl(K,!0);J.set(K,W)});let G=[];if(this.servers.forEach((K,W)=>{let H=K.listen;if(K.gossiped&&this.currentServer.listen!==H&&J.get(H)===void 0)G.push(W);J.delete(H)}),G.reverse(),G.forEach((K)=>{let W=this.servers.splice(K,1);X=X.concat(W[0].listen)}),J.forEach((K,W)=>{this.servers.push(K),Q.push(W)}),this.randomize&&Q.length>0){let K=this.currentServer,W=this.servers.filter((H)=>H!==K);(0,S11.shuffle)(W),this.servers=K?[K,...W]:W}return{added:Q,deleted:X}}}BQ$.Servers=U30});var N30=b((wQ$)=>{Object.defineProperty(wQ$,"__esModule",{value:!0});wQ$.QueuedIteratorImpl=void 0;var f11=yW(),OQ$=qG();class DQ${inflight;processed;received;noIterator;iterClosed;done;signal;yields;filtered;pendingFiltered;ctx;_data;err;time;profile;yielding;didBreak;constructor(){this.inflight=0,this.filtered=0,this.pendingFiltered=0,this.processed=0,this.received=0,this.noIterator=!1,this.done=!1,this.signal=(0,f11.deferred)(),this.yields=[],this.iterClosed=(0,f11.deferred)(),this.time=0,this.yielding=!1,this.didBreak=!1,this.profile=!1}[Symbol.asyncIterator](){return this.iterate()}push($){if(this.done)return;if(this.didBreak){if(typeof $==="function"){let Z=$;try{Z()}catch(Q){}}return}if(typeof $==="function")this.pendingFiltered++;this.yields.push($),this.signal.resolve()}async*iterate(){if(this.noIterator)throw new OQ$.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new OQ$.InvalidOperationError("iterator is already yielding");this.yielding=!0;try{while(!0){if(this.yields.length===0)await this.signal;if(this.err)throw this.err;let $=this.yields;this.inflight=$.length,this.yields=[];for(let Z=0;Z<$.length;Z++){if(typeof $[Z]==="function"){this.pendingFiltered--;let X=$[Z];try{X()}catch(Y){throw Y}if(this.err)throw this.err;continue}this.processed++,this.inflight--;let Q=this.profile?Date.now():0;yield $[Z],this.time=this.profile?Date.now()-Q:0}if(this.done)break;else if(this.yields.length===0)$.length=0,this.yields=$,this.signal=(0,f11.deferred)()}}finally{this.didBreak=!0,this.stop()}}stop($){if(this.done)return;this.err=$,this.done=!0,this.signal.resolve(),this.iterClosed.resolve($)}getProcessed(){return this.noIterator?this.received:this.processed}getPending(){return this.yields.length+this.inflight-this.pendingFiltered}getReceived(){return this.received-this.filtered}}wQ$.QueuedIteratorImpl=DQ$});var b11=b((PQ$)=>{Object.defineProperty(PQ$,"__esModule",{value:!0});PQ$.MuxSubscription=void 0;var DH4=pD(),EQ$=qG();class zQ${baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,DH4.createInbox)($)}.`,this.baseInbox}add($){if(!isNaN($.received))$.received=0;this.reqs.set($.token,$)}get($){return this.reqs.get($)}cancel($){this.reqs.delete($.token)}getToken($){let Z=$.subject||"";if(Z.indexOf(this.baseInbox)===0)return Z.substring(this.baseInbox.length);return null}all(){return Array.from(this.reqs.values())}handleError($,Z){if($)return this.all().forEach((Q)=>{Q.resolver(Z,{})}),!0;if(Z.operation==="publish"){let Q=this.all().find((X)=>{return X.requestSubject===Z.subject});if(Q)return Q.resolver(Z,{}),!0}return!1}dispatcher(){return($,Z)=>{let Q=this.getToken(Z);if(Q){let X=this.get(Q);if(X){if($===null)$=Z?.data?.length===0&&Z.headers?.code===503?new EQ$.NoRespondersError(X.requestSubject):null;X.resolver($,Z)}}}}close(){let $=new EQ$.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}PQ$.MuxSubscription=zQ$});var y11=b((RQ$)=>{Object.defineProperty(RQ$,"__esModule",{value:!0});RQ$.Heartbeat=void 0;var wH4=yW();class AQ${ph;interval;maxOut;timer;pendings;constructor($,Z,Q){this.ph=$,this.interval=Z,this.maxOut=Q,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel($){if(this.timer)clearTimeout(this.timer),this.timer=void 0;if(this._reset(),$)this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:"ping",pendingPings:this.pendings.length+1}),this.pendings.length===this.maxOut){this.cancel(!0);return}let $=(0,wH4.deferred)();this.ph.flush($).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push($),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(($)=>{return $.resolve(),!1})}}RQ$.Heartbeat=AQ$});var u11=b((kQ$)=>{Object.defineProperty(kQ$,"__esModule",{value:!0});kQ$.DenoBuffer=kQ$.MAX_SIZE=kQ$.AssertionError=void 0;kQ$.assert=IQ$;kQ$.concat=VQ$;kQ$.append=EH4;kQ$.readAll=zH4;kQ$.writeAll=PH4;var jH4=RG();class g11 extends Error{constructor($){super($);this.name="AssertionError"}}kQ$.AssertionError=g11;function IQ$($,Z="Assertion failed."){if(!$)throw new g11(Z)}var MQ$=32768;kQ$.MAX_SIZE=4294967294;function B30($,Z,Q=0){let X=Z.byteLength-Q;if($.byteLength>X)$=$.subarray(0,X);return Z.set($,Q),$.byteLength}function VQ$($,Z){if($===void 0&&Z===void 0)return new Uint8Array(0);if($===void 0)return Z;if(Z===void 0)return $;let Q=new Uint8Array($.length+Z.length);return Q.set($,0),Q.set(Z,$.length),Q}function EH4($,Z){return VQ$($,Uint8Array.of(Z))}class h11{_buf;_off;constructor($){if(this._off=0,$==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array($)}bytes($={copy:!0}){if($.copy===!1)return this._buf.subarray(this._off);return this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate($){if($===0){this.reset();return}if($<0||$>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+$)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice($){let Z=this._buf.byteLength;if($<=this.capacity-Z)return this._reslice(Z+$),Z;return-1}_reslice($){IQ$($<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,$)}readByte(){let $=new Uint8Array(1);if(this.read($))return $[0];return null}read($){if(this.empty()){if(this.reset(),$.byteLength===0)return 0;return null}let Z=B30(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(jH4.TE.encode($))}write($){let Z=this._grow($.byteLength);return B30($,this._buf,Z)}_grow($){let Z=this.length;if(Z===0&&this._off!==0)this.reset();let Q=this._tryGrowByReslice($);if(Q>=0)return Q;let X=this.capacity;if($<=Math.floor(X/2)-Z)B30(this._buf.subarray(this._off),this._buf);else if(X+$>kQ$.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*X+$,kQ$.MAX_SIZE));B30(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,kQ$.MAX_SIZE)),Z}grow($){if($<0)throw Error("Buffer._grow: negative count");let Z=this._grow($);this._reslice(Z)}readFrom($){let Z=0,Q=new Uint8Array(MQ$);while(!0){let X=this.capacity-this.length<MQ$,Y=X?Q:new Uint8Array(this._buf.buffer,this.length),J=$.read(Y);if(J===null)return Z;if(X)this.write(Y.subarray(0,J));else this._reslice(this.length+J);Z+=J}}}kQ$.DenoBuffer=h11;function zH4($){let Z=new h11;return Z.readFrom($),Z.bytes()}function PH4($,Z){let Q=0;while(Q<Z.length)Q+=$.write(Z.subarray(Q))}});var m11=b((xQ$)=>{Object.defineProperty(xQ$,"__esModule",{value:!0});xQ$.cc=xQ$.State=xQ$.Parser=xQ$.Kind=void 0;xQ$.describe=VH4;var l11=u11(),c11=RG();xQ$.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function VH4($){let Z,Q="";switch($.kind){case xQ$.Kind.MSG:Z="MSG";break;case xQ$.Kind.OK:Z="OK";break;case xQ$.Kind.ERR:Z="ERR",Q=c11.TD.decode($.data);break;case xQ$.Kind.PING:Z="PING";break;case xQ$.Kind.PONG:Z="PONG";break;case xQ$.Kind.INFO:Z="INFO",Q=c11.TD.decode($.data)}return`${Z}: ${Q}`}function CQ$(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var _Q$=48,kH4=57,Wl=67108864;class vQ${dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=xQ$.State.OP_START,this.as=0,this.drop=0,this.hdr=0}parse($){let Z;for(Z=0;Z<$.length;Z++){let Q=$[Z];switch(this.state){case xQ$.State.OP_START:switch(Q){case xQ$.cc.M:case xQ$.cc.m:this.state=xQ$.State.OP_M,this.hdr=-1,this.ma=CQ$();break;case xQ$.cc.H:case xQ$.cc.h:this.state=xQ$.State.OP_H,this.hdr=0,this.ma=CQ$();break;case xQ$.cc.P:case xQ$.cc.p:this.state=xQ$.State.OP_P;break;case xQ$.cc.PLUS:this.state=xQ$.State.OP_PLUS;break;case xQ$.cc.MINUS:this.state=xQ$.State.OP_MINUS;break;case xQ$.cc.I:case xQ$.cc.i:this.state=xQ$.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_H:switch(Q){case xQ$.cc.M:case xQ$.cc.m:this.state=xQ$.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_M:switch(Q){case xQ$.cc.S:case xQ$.cc.s:this.state=xQ$.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_MS:switch(Q){case xQ$.cc.G:case xQ$.cc.g:this.state=xQ$.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_MSG:switch(Q){case xQ$.cc.SPACE:case xQ$.cc.TAB:this.state=xQ$.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_MSG_SPC:switch(Q){case xQ$.cc.SPACE:case xQ$.cc.TAB:continue;default:this.state=xQ$.State.MSG_ARG,this.as=Z}break;case xQ$.State.MSG_ARG:switch(Q){case xQ$.cc.CR:this.drop=1;break;case xQ$.cc.NL:{let X=this.argBuf?this.argBuf.bytes():$.subarray(this.as,Z-this.drop);this.processMsgArgs(X),this.drop=0,this.as=Z+1,this.state=xQ$.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;case xQ$.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let X=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:xQ$.Kind.MSG,msg:this.ma,data:X}),this.argBuf=void 0,this.msgBuf=void 0,this.state=xQ$.State.MSG_END}else{let X=this.ma.size-this.msgBuf.length,Y=$.length-Z;if(Y<X)X=Y;if(X>0)this.msgBuf.write($.subarray(Z,Z+X)),Z=Z+X-1;else this.msgBuf.writeByte(Q)}else if(Z-this.as>=this.ma.size)this.dispatcher.push({kind:xQ$.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=xQ$.State.MSG_END;break;case xQ$.State.MSG_END:switch(Q){case xQ$.cc.NL:this.drop=0,this.as=Z+1,this.state=xQ$.State.OP_START;break;default:continue}break;case xQ$.State.OP_PLUS:switch(Q){case xQ$.cc.O:case xQ$.cc.o:this.state=xQ$.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_PLUS_O:switch(Q){case xQ$.cc.K:case xQ$.cc.k:this.state=xQ$.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_PLUS_OK:switch(Q){case xQ$.cc.NL:this.dispatcher.push({kind:xQ$.Kind.OK}),this.drop=0,this.state=xQ$.State.OP_START;break}break;case xQ$.State.OP_MINUS:switch(Q){case xQ$.cc.E:case xQ$.cc.e:this.state=xQ$.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_MINUS_E:switch(Q){case xQ$.cc.R:case xQ$.cc.r:this.state=xQ$.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_MINUS_ER:switch(Q){case xQ$.cc.R:case xQ$.cc.r:this.state=xQ$.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_MINUS_ERR:switch(Q){case xQ$.cc.SPACE:case xQ$.cc.TAB:this.state=xQ$.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_MINUS_ERR_SPC:switch(Q){case xQ$.cc.SPACE:case xQ$.cc.TAB:continue;default:this.state=xQ$.State.MINUS_ERR_ARG,this.as=Z}break;case xQ$.State.MINUS_ERR_ARG:switch(Q){case xQ$.cc.CR:this.drop=1;break;case xQ$.cc.NL:{let X;if(this.argBuf)X=this.argBuf.bytes(),this.argBuf=void 0;else X=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:xQ$.Kind.ERR,data:X}),this.drop=0,this.as=Z+1,this.state=xQ$.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(Q))}break;case xQ$.State.OP_P:switch(Q){case xQ$.cc.I:case xQ$.cc.i:this.state=xQ$.State.OP_PI;break;case xQ$.cc.O:case xQ$.cc.o:this.state=xQ$.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_PO:switch(Q){case xQ$.cc.N:case xQ$.cc.n:this.state=xQ$.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_PON:switch(Q){case xQ$.cc.G:case xQ$.cc.g:this.state=xQ$.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_PONG:switch(Q){case xQ$.cc.NL:this.dispatcher.push({kind:xQ$.Kind.PONG}),this.drop=0,this.state=xQ$.State.OP_START;break}break;case xQ$.State.OP_PI:switch(Q){case xQ$.cc.N:case xQ$.cc.n:this.state=xQ$.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_PIN:switch(Q){case xQ$.cc.G:case xQ$.cc.g:this.state=xQ$.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_PING:switch(Q){case xQ$.cc.NL:this.dispatcher.push({kind:xQ$.Kind.PING}),this.drop=0,this.state=xQ$.State.OP_START;break}break;case xQ$.State.OP_I:switch(Q){case xQ$.cc.N:case xQ$.cc.n:this.state=xQ$.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_IN:switch(Q){case xQ$.cc.F:case xQ$.cc.f:this.state=xQ$.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_INF:switch(Q){case xQ$.cc.O:case xQ$.cc.o:this.state=xQ$.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_INFO:switch(Q){case xQ$.cc.SPACE:case xQ$.cc.TAB:this.state=xQ$.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case xQ$.State.OP_INFO_SPC:switch(Q){case xQ$.cc.SPACE:case xQ$.cc.TAB:continue;default:this.state=xQ$.State.INFO_ARG,this.as=Z}break;case xQ$.State.INFO_ARG:switch(Q){case xQ$.cc.CR:this.drop=1;break;case xQ$.cc.NL:{let X;if(this.argBuf)X=this.argBuf.bytes(),this.argBuf=void 0;else X=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:xQ$.Kind.INFO,data:X}),this.drop=0,this.as=Z+1,this.state=xQ$.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;default:throw this.fail($.subarray(Z))}}if((this.state===xQ$.State.MSG_ARG||this.state===xQ$.State.MINUS_ERR_ARG||this.state===xQ$.State.INFO_ARG)&&!this.argBuf)this.argBuf=new l11.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===xQ$.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new l11.DenoBuffer($.subarray(this.as))}}cloneMsgArg(){let $=this.ma.subject.length,Z=this.ma.reply?this.ma.reply.length:0,Q=new Uint8Array($+Z);if(Q.set(this.ma.subject),this.ma.reply)Q.set(this.ma.reply,$);if(this.argBuf=new l11.DenoBuffer(Q),this.ma.subject=Q.subarray(0,$),this.ma.reply)this.ma.reply=Q.subarray($)}processMsgArgs($){if(this.hdr>=0)return this.processHeaderMsgArgs($);let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case xQ$.cc.SPACE:case xQ$.cc.TAB:case xQ$.cc.CR:case xQ$.cc.NL:if(Q>=0)Z.push($.subarray(Q,X)),Q=-1;break;default:if(Q<0)Q=X}if(Q>=0)Z.push($.subarray(Q));switch(Z.length){case 3:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(Z[2],Wl);break;case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.size=this.protoParseInt(Z[3],Wl);break;default:throw this.fail($,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail($,"processMsgArgs Bad or Missing Size Error")}fail($,Z=""){if(!Z)Z=`parse error [${this.state}]`;else Z=`${Z} [${this.state}]`;return Error(`${Z}: ${c11.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case xQ$.cc.SPACE:case xQ$.cc.TAB:case xQ$.cc.CR:case xQ$.cc.NL:if(Q>=0)Z.push($.subarray(Q,X)),Q=-1;break;default:if(Q<0)Q=X}if(Q>=0)Z.push($.subarray(Q));switch(Z.length){case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(Z[2],Wl),this.ma.size=this.protoParseInt(Z[3],Wl);break;case 5:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.hdr=this.protoParseInt(Z[3],Wl),this.ma.size=this.protoParseInt(Z[4],Wl);break;default:throw this.fail($,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail($,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt($,Z){if($.length===0||$.length>15)return-1;let Q=0;for(let X=0;X<$.length;X++){if($[X]<_Q$||$[X]>kH4)return-1;Q=Q*10+($[X]-_Q$)}return Z!==void 0&&Q>Z?-1:Q}}xQ$.Parser=vQ$;xQ$.State={OP_START:0,OP_PLUS:1,OP_PLUS_O:2,OP_PLUS_OK:3,OP_MINUS:4,OP_MINUS_E:5,OP_MINUS_ER:6,OP_MINUS_ERR:7,OP_MINUS_ERR_SPC:8,MINUS_ERR_ARG:9,OP_M:10,OP_MS:11,OP_MSG:12,OP_MSG_SPC:13,MSG_ARG:14,MSG_PAYLOAD:15,MSG_END:16,OP_H:17,OP_P:18,OP_PI:19,OP_PIN:20,OP_PING:21,OP_PO:22,OP_PON:23,OP_PONG:24,OP_I:25,OP_IN:26,OP_INF:27,OP_INFO:28,OP_INFO_SPC:29,INFO_ARG:30};xQ$.cc={CR:13,E:69,e:101,F:70,f:102,G:71,g:103,H:72,h:104,I:73,i:105,K:75,k:107,M:77,m:109,MINUS:45,N:78,n:110,NL:10,O:79,o:111,P:80,p:112,PLUS:43,R:82,r:114,S:83,s:115,SPACE:32,TAB:9}});var D30=b((bQ$)=>{Object.defineProperty(bQ$,"__esModule",{value:!0});bQ$.MsgHdrsImpl=void 0;bQ$.canonicalMIMEHeaderKey=i11;bQ$.headers=_H4;var fQ$=RG(),gW=pD(),O30=qG();function i11($){let F=!0,U=Array($.length);for(let N=0;N<$.length;N++){let B=$.charCodeAt(N);if(B===58||B<33||B>126)throw O30.InvalidArgumentError.format("header",`'${$[N]}' is not a valid character in a header name`);if(F&&97<=B&&B<=122)B-=32;else if(!F&&65<=B&&B<=90)B+=32;U[N]=B,F=B==45}return String.fromCharCode(...U)}function _H4($=0,Z=""){if($===0&&Z!=="")throw O30.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw O30.InvalidArgumentError.format("description","is required");return new Hl($,Z)}var d11="NATS/1.0";class Hl{_code;headers;_description;constructor($=0,Z=""){this._code=$,this._description=Z,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals($){if($&&this.headers.size===$.headers.size&&this._code===$._code){for(let[Z,Q]of this.headers){let X=$.values(Z);if(Q.length!==X.length)return!1;let Y=[...Q].sort(),J=[...X].sort();for(let G=0;G<Y.length;G++)if(Y[G]!==J[G])return!1}return!0}return!1}static decode($){let Z=new Hl,X=fQ$.TD.decode($).split(`\r
2110
2110
  `),Y=X[0];if(Y!==d11){let J=Y.replace(d11,"").trim();if(J.length>0){if(Z._code=parseInt(J,10),isNaN(Z._code))Z._code=0;let G=Z._code.toString();J=J.replace(G,""),Z._description=J.trim()}}if(X.length>=1)X.slice(1).map((J)=>{if(J){let G=J.indexOf(":");if(G>-1){let K=J.slice(0,G),W=J.slice(G+1).trim();Z.append(K,W)}}});return Z}toString(){if(this.headers.size===0&&this._code===0)return"";let $=d11;if(this._code>0&&this._description!=="")$+=` ${this._code} ${this._description}`;for(let[Z,Q]of this.headers)for(let X=0;X<Q.length;X++)$=`${$}\r
2111
2111
  ${Z}: ${Q[X]}`;return`${$}\r
@@ -3631,7 +3631,7 @@ ${Y}`:Y}case"media":return"";case"mediaSingle":case"mediaGroup":return yi(WN(Q),
3631
3631
  `),E=Z.description&&F?KS0(Z.description):Z.description,z=Z.description&&E?WS0(Z.description,E):null,A=[...F?[]:[j,""],`Task title: ${Z.title}`,E?`
3632
3632
  Task description:
3633
3633
  ${E}
3634
- `:"",...z?[z,""]:[],"How to work:",`- Call \`${B}\` with the task id below to find the pull request under review.`,H?`- The repository ${H.owner}/${H.name} is already cloned at your working directory and \`git\` and its CLI (\`gh\` for GitHub, \`glab\` for GitLab; Bitbucket has no CLI \u2014 use the REST API with \`curl\` and \`$BITBUCKET_TOKEN\`) are authenticated \u2014 check the PR's branch out there to inspect / exercise the change. ${q$0}`:F?`- Your working directory is EMPTY. Call \`mcp__studio__TASK_ADD_REPO\` ${N?`with id \`${N}\` (${Z.repo}) FIRST \u2014 do NOT call it with no arguments, that only lists the org's repositories and costs you a turn.`:"with the id of the PR's repository FIRST;"} it clones the repository and waits for the checkout, and \`git\` and its CLI are authenticated once it returns. ${q$0}`:"- Load the PR's repository to inspect / exercise the change.",`- ${tv$}`,...U>0?[`- This is a RE-REVIEW. You already reviewed an earlier version of this pull request and asked for changes, and there are more commits since (a human re-delegated the card, or your own fixes from that round are in the history). Read your own previous notes with \`${w}\`, then review WHAT MOVED SINCE \u2014 \`gh pr diff <number>\` still shows the whole PR, so narrow it with \`git log --since='${new Date(U).toISOString()}' --oneline\` and diff only those commits. Confirm your earlier notes were addressed and check the new commits for their own problems. Do NOT re-read the parts of the PR you already cleared.`]:[],"- Fix the issues you find on the PR's branch, run the repository's own checks, and push to that same PR. You are the last automated run on this task \u2014 nothing picks up findings you only describe.",`- THEN exercise the change. If the PR has a deploy \`previewUrl\` (from \`${B}\`), use it \u2014 re-read it after your push so you get the preview of YOUR commit, wait for it if it is still building, and deep-link to the page/route the task affects (not root). If there is NO preview, exercise it in the sandbox instead: run the repository's own checks, and for a UI change build and serve it locally and capture it (a Flutter app compiles to web for exactly this \u2014 see the \`flutter-app\` skill). Either way, if you cannot exercise it at all, do NOT approve \u2014 \`request_changes\` saying which path you tried and what blocked it.`,"- For a VISUAL change, capture before/after by running `qa-screenshot <url> org/output/qa/<name>.png [--mobile] [--full] [--selector=<css>] [--console]` (headless Chromium, baked into the sandbox; also works against a dev server you started on localhost \u2014 none is running by default, this pod is a checkout). Choose the framing: default is the top viewport, `--full` is the whole page, and `--selector='<css>'` frames just the component you changed (best for a focused before/after). Add `--mobile` too for a responsive change, and `--console` to catch the runtime errors a screenshot alone reports as a pass. WRITE them under `org/output/` \u2014 that's what surfaces them on the task. Then `Read` the files to actually LOOK at them: a screenshot you never opened is not verification. To INTERACT with a page \u2014 click, hit-test with `document.elementFromPoint`, fill a form \u2014 `qa-screenshot` is not enough, but the browser it drives is yours: write a throwaway node script that requires the global playwright-core: `const { chromium } = require(\"/usr/local/lib/node_modules/playwright-core\"); chromium.launch({ executablePath: \"/usr/bin/chromium\", args: [\"--no-sandbox\"] })`. Do NOT report a check as impossible because Playwright is missing \u2014 it is installed.",`- Record what you validated with \`${D}\` (scenarios + pass/fail, the exact URL + viewport, and anything you couldn't verify) BEFORE your decision. EMBED the before/after shots inline as markdown images referencing their org/output path, and put each before/after PAIR in a two-column table so they render side by side, e.g.:
3634
+ `:"",...z?[z,""]:[],"How to work:",`- Call \`${B}\` with the task id below to find the pull request under review.`,H?`- The repository ${H.owner}/${H.name} is already cloned at your working directory and \`git\` and its CLI (\`gh\` for GitHub, \`glab\` for GitLab; Bitbucket has no CLI \u2014 use the REST API with \`curl\` and \`$BITBUCKET_TOKEN\`) are authenticated \u2014 check the PR's branch out there to inspect / exercise the change. ${q$0}`:F?`- Your working directory is EMPTY. Call \`mcp__studio__TASK_ADD_REPO\` ${N?`with id \`${N}\` (${Z.repo}) FIRST \u2014 do NOT call it with no arguments, that only lists the org's repositories and costs you a turn.`:"with the id of the PR's repository FIRST;"} it clones the repository and waits for the checkout, and \`git\` and its CLI are authenticated once it returns. ${q$0}`:"- Load the PR's repository to inspect / exercise the change.",`- ${tv$}`,...U>0?[`- This is a RE-REVIEW. You already reviewed an earlier version of this pull request and asked for changes, and there are more commits since (a human re-delegated the card, or your own fixes from that round are in the history). Read your own previous notes with \`${w}\`, then review WHAT MOVED SINCE \u2014 \`gh pr diff <number>\` still shows the whole PR, so narrow it with \`git log --since='${new Date(U).toISOString()}' --oneline\` and diff only those commits. Confirm your earlier notes were addressed and check the new commits for their own problems. Do NOT re-read the parts of the PR you already cleared.`]:[],"- Fix the issues you find on the PR's branch, run the repository's own checks, and push to that same PR. You are the last automated run on this task \u2014 nothing picks up findings you only describe.",`- THEN exercise the change. If the PR has a deploy \`previewUrl\` (from \`${B}\`), use it \u2014 re-read it after your push so you get the preview of YOUR commit, wait for it if it is still building, and deep-link to the page/route the task affects (not root). If there is NO preview, exercise it in the sandbox instead: run the repository's own checks, and for a UI change build and serve it locally and capture it (a Flutter app runs on an Android emulator, but only on the Android sandbox image \u2014 see the \`flutter-app\` skill). Either way, if you cannot exercise it at all, do NOT approve \u2014 \`request_changes\` saying which path you tried and what blocked it.`,"- For a VISUAL change, capture before/after by running `qa-screenshot <url> org/output/qa/<name>.png [--mobile] [--full] [--selector=<css>] [--console]` (headless Chromium, baked into the sandbox; also works against a dev server you started on localhost \u2014 none is running by default, this pod is a checkout). Choose the framing: default is the top viewport, `--full` is the whole page, and `--selector='<css>'` frames just the component you changed (best for a focused before/after). Add `--mobile` too for a responsive change, and `--console` to catch the runtime errors a screenshot alone reports as a pass. WRITE them under `org/output/` \u2014 that's what surfaces them on the task. Then `Read` the files to actually LOOK at them: a screenshot you never opened is not verification. To INTERACT with a page \u2014 click, hit-test with `document.elementFromPoint`, fill a form \u2014 `qa-screenshot` is not enough, but the browser it drives is yours: write a throwaway node script that requires the global playwright-core: `const { chromium } = require(\"/usr/local/lib/node_modules/playwright-core\"); chromium.launch({ executablePath: \"/usr/bin/chromium\", args: [\"--no-sandbox\"] })`. Do NOT report a check as impossible because Playwright is missing \u2014 it is installed.",`- Record what you validated with \`${D}\` (scenarios + pass/fail, the exact URL + viewport, and anything you couldn't verify) BEFORE your decision. EMBED the before/after shots inline as markdown images referencing their org/output path, and put each before/after PAIR in a two-column table so they render side by side, e.g.:
3635
3635
 
3636
3636
  | Before | After |
3637
3637
  | --- | --- |