decocms 4.390.2 → 4.390.4

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 (353) hide show
  1. package/dist/client/assets/{AlertCircle-DamanO0X.js → AlertCircle-iVRTcaBg.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DAjzIUVt.js → AreaChart-vGEKzI4F.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-SpZlA2bb.js → ArrowLeft-DfZNe3Vl.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DAZKfxXh.js → ArrowRight-CswoMXm3.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BtBGOCWY.js → ArrowUp-ZHCqKDUA.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-C4cSotGX.js → CartesianChart-_SxUX3gE.js} +1 -1
  7. package/dist/client/assets/{Check-CeoOppXe.js → Check-ocmT1xhM.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-CaiMiFDe.js → CheckCircle-BmHBdTYn.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DeResoiH.js → ChevronUp-BEGO8LAp.js} +1 -1
  10. package/dist/client/assets/{Copy01-CF3qS6LP.js → Copy01-Djl84HjT.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-DGTLrWaP.js → CreditCard01-DA21YZ9t.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-DKsMx6HW.js → DotsVertical-GP-H6-nS.js} +1 -1
  13. package/dist/client/assets/{Download01-CgN_oEm1.js → Download01-CQZ78LGI.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-BU77D7cf.js → ErrorBarContext-CU0G222G.js} +1 -1
  15. package/dist/client/assets/{Eye-C56Lk2NI.js → Eye-CNk4ml55.js} +1 -1
  16. package/dist/client/assets/{Globe04-u4Rssq_0.js → Globe04-B3-IlgJ4.js} +1 -1
  17. package/dist/client/assets/{Image01-BBs4WVyw.js → Image01-zHW5odO5.js} +1 -1
  18. package/dist/client/assets/{Key01-DSGm0aza.js → Key01-BCjLeK7M.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-BN-mFj8G.js → LayoutLeft-dzqHSKuH.js} +1 -1
  20. package/dist/client/assets/{Line-DHWVZx2q.js → Line-BPNz1hy-.js} +1 -1
  21. package/dist/client/assets/{Link01-BqaeC2vU.js → Link01-CBc36KC8.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-LsY731Ce.js → LinkExternal01-JGUyp91x.js} +1 -1
  23. package/dist/client/assets/{Monitor01-Wv2_lYrq.js → Monitor01-DMBIX-hP.js} +1 -1
  24. package/dist/client/assets/{Package-BpLpYayL.js → Package-VT7-ZGoy.js} +1 -1
  25. package/dist/client/assets/{Palette-zNU-Z5w1.js → Palette-CPW0a6wF.js} +1 -1
  26. package/dist/client/assets/{Plus-BJXRYkOi.js → Plus-ojokEQ8x.js} +1 -1
  27. package/dist/client/assets/{SearchLg-CfdMUZPl.js → SearchLg-C-i1c0zU.js} +1 -1
  28. package/dist/client/assets/{SearchMd-DYmOASVZ.js → SearchMd-MG_xST09.js} +1 -1
  29. package/dist/client/assets/{Sector-Bq5ZB3Ar.js → Sector-DLq_M76x.js} +1 -1
  30. package/dist/client/assets/{Share07-CYv18Ut8.js → Share07-uQomrLCR.js} +1 -1
  31. package/dist/client/assets/{Stars01-qZBU4wqC.js → Stars01-DxtRb5WZ.js} +1 -1
  32. package/dist/client/assets/{Sun-CzrsJre-.js → Sun-BEdjuN6j.js} +1 -1
  33. package/dist/client/assets/{Tool01-UcpZc1Ld.js → Tool01-COB6rywP.js} +1 -1
  34. package/dist/client/assets/{Trash01-BKZ4yEpo.js → Trash01-DTUu7NOU.js} +1 -1
  35. package/dist/client/assets/{Upload01-BRaprouM.js → Upload01-Dty36l1w.js} +1 -1
  36. package/dist/client/assets/{User01-BSxIafNg.js → User01-BSto60sn.js} +1 -1
  37. package/dist/client/assets/{UserSquare--C8Iia3e.js → UserSquare-C8brDzYe.js} +1 -1
  38. package/dist/client/assets/{Users01-B2oROtAL.js → Users01-CxwIEg0g.js} +1 -1
  39. package/dist/client/assets/{X-LWyEp2XB.js → X-B5gw2EHv.js} +1 -1
  40. package/dist/client/assets/{XCircle-DedN3aZE.js → XCircle-seVaST6e.js} +1 -1
  41. package/dist/client/assets/{XClose-BlVZtXd9.js → XClose-B5O4OZct.js} +1 -1
  42. package/dist/client/assets/{Zap-C-Muwsv6.js → Zap-D7YN1rKW.js} +1 -1
  43. package/dist/client/assets/{ZoomOut-AvI_Dq16.js → ZoomOut-qVaUZ9ca.js} +1 -1
  44. package/dist/client/assets/{access-gate-m0zDXVj7.js → access-gate-BIKeQRL_.js} +1 -1
  45. package/dist/client/assets/{add-connection-dialog-BiKX4PXE.js → add-connection-dialog-BCh8Kz04.js} +1 -1
  46. package/dist/client/assets/{agent-analytics-B_ci0URg.js → agent-analytics--KcDdN57.js} +1 -1
  47. package/dist/client/assets/agent-app-Br6aux_w.js +1 -0
  48. package/dist/client/assets/{agent-assets-BzoN_gMM.js → agent-assets-CB6ZSzqA.js} +1 -1
  49. package/dist/client/assets/{agent-automation-Dmy3s50D.js → agent-automation-B57x68Um.js} +1 -1
  50. package/dist/client/assets/{agent-automations-D31L4_Mi.js → agent-automations-DsNAcyrP.js} +1 -1
  51. package/dist/client/assets/{agent-connect-sources-De_J8Bsc.js → agent-connect-sources-D1XyNIWt.js} +1 -1
  52. package/dist/client/assets/agent-deck-Vhc8akKy.js +1 -0
  53. package/dist/client/assets/{agent-e2e-Z4oZKkm4.js → agent-e2e-DPPSPIQv.js} +1 -1
  54. package/dist/client/assets/{agent-experiments-B3cD_qx8.js → agent-experiments-CMIDfL0o.js} +1 -1
  55. package/dist/client/assets/agent-file-BJobJMYY.js +1 -0
  56. package/dist/client/assets/{agent-git-Bchws8e_.js → agent-git-BBWRyZCE.js} +1 -1
  57. package/dist/client/assets/{agent-hosting-Dazy2DCD.js → agent-hosting-BIMxJVDi.js} +1 -1
  58. package/dist/client/assets/{agent-icon-CPxPcoq5.js → agent-icon-BsnTrJjJ.js} +1 -1
  59. package/dist/client/assets/agent-library-file-SIskwRA5.js +1 -0
  60. package/dist/client/assets/{agent-monitor-Cj7LgZDo.js → agent-monitor-CbmXFCNk.js} +1 -1
  61. package/dist/client/assets/{agent-overview-Ds8-BVsG.js → agent-overview-BPW1OhWv.js} +1 -1
  62. package/dist/client/assets/agent-settings-CzdAFelD.js +1 -0
  63. package/dist/client/assets/agent-site-editor-code-tjytfPRA.js +2 -0
  64. package/dist/client/assets/{agent-site-editor-content-BQxGoqPl.js → agent-site-editor-content-Y18YyEWw.js} +2 -2
  65. package/dist/client/assets/{agent-site-editor-BW9PhmFL.js → agent-site-editor-m4t0aVDo.js} +1 -1
  66. package/dist/client/assets/agent-site-editor-preview-BOHOs4hS.js +518 -0
  67. package/dist/client/assets/agent-view-B0TeCTGP.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-C8R1CHth.js → agent-view-guard-DBlz_p2t.js} +1 -1
  69. package/dist/client/assets/{agents-list-DSIIP3XZ.js → agents-list-7X7ucg0e.js} +1 -1
  70. package/dist/client/assets/{ai-providers-Dct1QzzE.js → ai-providers-Bm2tLrMu.js} +1 -1
  71. package/dist/client/assets/{alert-ybxZR-_H.js → alert-DslM1OpO.js} +1 -1
  72. package/dist/client/assets/{alert-dialog-i1rWKvRm.js → alert-dialog-BhgAEu2i.js} +1 -1
  73. package/dist/client/assets/api-keys-BdpkM46E.js +1 -0
  74. package/dist/client/assets/{api-keys-DmWjHAe8.js → api-keys-Dq1Bnar4.js} +1 -1
  75. package/dist/client/assets/app-editor-C3rD0azc.js +1 -0
  76. package/dist/client/assets/{asset-utils-BgRAe4M3.js → asset-utils-D3ZIfM_Z.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-C16Xey8R.js → auth-catchall-pT36A0zr.js} +1 -1
  78. package/dist/client/assets/{auth-entry-Dgu2wJP7.js → auth-entry-2UXAVZ_y.js} +1 -1
  79. package/dist/client/assets/{auth-split-layout-DJ0hv-R1.js → auth-split-layout-BjGbJo38.js} +1 -1
  80. package/dist/client/assets/{auth-tf_g8iMx.js → auth-uih7AqvO.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-BicDqk1l.js → authenticate-and-persist-oauth-B9I5UxEd.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-w0CSDHI8.js → automation-list-row-6I49gBmF.js} +1 -1
  83. package/dist/client/assets/{automation-runs-rkj7KELU.js → automation-runs-EAqUU_Ij.js} +1 -1
  84. package/dist/client/assets/{automations-DnFKJ6bm.js → automations-CQPehM0c.js} +1 -1
  85. package/dist/client/assets/{autosend-BIORjgyl.js → autosend-BJW1PfVQ.js} +1 -1
  86. package/dist/client/assets/{avatar-BbSwUQyb.js → avatar-_8aGoMXJ.js} +1 -1
  87. package/dist/client/assets/{badge-uMQ2OSUk.js → badge-DMewhq-R.js} +1 -1
  88. package/dist/client/assets/{block-document-DAIAQG-x.js → block-document-Dcc8Ersi.js} +1 -1
  89. package/dist/client/assets/{blocks-preview-workspace-context-BtvKAriM.js → blocks-preview-workspace-context-BRSFaO-e.js} +1 -1
  90. package/dist/client/assets/{breadcrumb-BVc9LdQK.js → breadcrumb-ClrBbM2y.js} +1 -1
  91. package/dist/client/assets/{buckets-0jHe56LN.js → buckets-8W4ppyWH.js} +1 -1
  92. package/dist/client/assets/{build-improve-prompt-doc-xdV3Tlej.js → build-improve-prompt-doc-CX4X_Kjx.js} +1 -1
  93. package/dist/client/assets/{bulk-category-panel-CO-Kfl87.js → bulk-category-panel-DRm2c8X2.js} +1 -1
  94. package/dist/client/assets/{calendar-C1IdNLA-.js → calendar-B83nuFOI.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-CInYqvLQ.js → capability-load-error-BUHyT4vC.js} +1 -1
  96. package/dist/client/assets/{category-editor-CF1CmT95.js → category-editor-DmtS6BHb.js} +1 -1
  97. package/dist/client/assets/{chart-BFWDjh6T.js → chart-O1DWzSgB.js} +1 -1
  98. package/dist/client/assets/{chat-context-CD2t905l.js → chat-context-H6Zpj-Vd.js} +1 -1
  99. package/dist/client/assets/{chat-draft-l_u8rYm5.js → chat-draft-BXT8ntBy.js} +1 -1
  100. package/dist/client/assets/{checkbox-CUWuaZGT.js → checkbox-JC6LoT32.js} +1 -1
  101. package/dist/client/assets/{choose-editor-Bz1SjYXJ.js → choose-editor-D-IXY8oL.js} +1 -1
  102. package/dist/client/assets/{claim-phase-copy-1wO5q55y.js → claim-phase-copy-CPiQ28RG.js} +1 -1
  103. package/dist/client/assets/{cli-auth-success-D1BosDTZ.js → cli-auth-success-CQt2stGY.js} +1 -1
  104. package/dist/client/assets/{client-icons-CeAdASOH.js → client-icons-D5aE3fDf.js} +1 -1
  105. package/dist/client/assets/{collapsible-C549VSAh.js → collapsible-B930Znij.js} +1 -1
  106. package/dist/client/assets/{collection-detail-lQn0BuV4.js → collection-detail-DILC7xOI.js} +1 -1
  107. package/dist/client/assets/{collection-display-button-CbpEAZR9.js → collection-display-button-DKuiVs_e.js} +1 -1
  108. package/dist/client/assets/{collection-search-BY_D-4Xu.js → collection-search-DFVK1KQ8.js} +1 -1
  109. package/dist/client/assets/{collection-table-wrapper-BZawHAOe.js → collection-table-wrapper-DvM7LDpZ.js} +1 -1
  110. package/dist/client/assets/{collection-tabs-D3p6wXuz.js → collection-tabs-DWdbo1Je.js} +1 -1
  111. package/dist/client/assets/{combobox-BR9S1uNJ.js → combobox-BoqrgDcx.js} +1 -1
  112. package/dist/client/assets/{command-Bc5s50z4.js → command-C3KYPhtk.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-BdQdBU7y.js → companion-mcps-section-DhDS_06A.js} +1 -1
  114. package/dist/client/assets/{connect-GXni-cDM.js → connect-Dyr51oJk.js} +1 -1
  115. package/dist/client/assets/{connect-layout-ktsi_xnC.js → connect-layout-BNbZXyRv.js} +1 -1
  116. package/dist/client/assets/{connection-TjS3izkF.js → connection-D9jQPSCJ.js} +1 -1
  117. package/dist/client/assets/{connection-card-DNEz_R0k.js → connection-card-D-LytxKQ.js} +1 -1
  118. package/dist/client/assets/{connection-detail-DZhQtk0s.js → connection-detail-CNt-Uyzd.js} +1 -1
  119. package/dist/client/assets/{connection-form-helpers-CA2nMjJf.js → connection-form-helpers-DSpcP1Dc.js} +1 -1
  120. package/dist/client/assets/{connections-DIJc1yUL.js → connections-C7W7axzQ.js} +1 -1
  121. package/dist/client/assets/{create-organization-dialog-CrlhgrRM.js → create-organization-dialog-DBxZ2XGo.js} +1 -1
  122. package/dist/client/assets/{decofile-api-D7ZHCNUy.js → decofile-api-CAHmkQlU.js} +1 -1
  123. package/dist/client/assets/{decopilot-4Rul2XdF.js → decopilot-BnOOn6v6.js} +1 -1
  124. package/dist/client/assets/{dialog-Mrm_FjPO.js → dialog-BTnr_AVV.js} +1 -1
  125. package/dist/client/assets/{discover-CF7nCkwv.js → discover-U5K5oM8Q.js} +1 -1
  126. package/dist/client/assets/{domain-settings-CUKeC08b.js → domain-settings-CzbkVMPe.js} +1 -1
  127. package/dist/client/assets/{download-app-dialog-DTIeBDIH.js → download-app-dialog-nvCUSnk2.js} +1 -1
  128. package/dist/client/assets/{drawer-DfjSUJ0a.js → drawer-D6LfOfIo.js} +1 -1
  129. package/dist/client/assets/{editor-uV92rbnR.js → editor-BqmQJegj.js} +1 -1
  130. package/dist/client/assets/{empty-state-Q_WUfReS.js → empty-state-DMiHCSxy.js} +1 -1
  131. package/dist/client/assets/{empty-state-DVbnWIsr.js → empty-state-DMmxHRTF.js} +1 -1
  132. package/dist/client/assets/{extract-connection-data-CuwPMaw3.js → extract-connection-data-CZjdLMbg.js} +1 -1
  133. package/dist/client/assets/{feature-gate-2LgTTjZY.js → feature-gate-ByUUxxIv.js} +1 -1
  134. package/dist/client/assets/{feature-paywall-DwvSEvIn.js → feature-paywall-C9xFi1nx.js} +1 -1
  135. package/dist/client/assets/{file-explorer-C7qmBiQz.js → file-explorer-DmorIYyd.js} +1 -1
  136. package/dist/client/assets/{file-preview-sHM9JOsS.js → file-preview-DG6yyUI3.js} +1 -1
  137. package/dist/client/assets/{file-share-button-BY0Cu7BG.js → file-share-button-B2dbicF1.js} +1 -1
  138. package/dist/client/assets/{file-type-icon-D0g6iuIX.js → file-type-icon-BkowPfFv.js} +1 -1
  139. package/dist/client/assets/{folder-icon-ByxAU6Yp.js → folder-icon-D4_mI7nX.js} +1 -1
  140. package/dist/client/assets/{form-CLzrUZNk.js → form-Cs0YGgAz.js} +1 -1
  141. package/dist/client/assets/{gateway-client-Dhtlqu_k.js → gateway-client-D0N_12qS.js} +1 -1
  142. package/dist/client/assets/{general-knk_TeIm.js → general-C7u2nzrT.js} +1 -1
  143. package/dist/client/assets/{github-icon-DoIk_7id.js → github-icon-BuR6fL8l.js} +1 -1
  144. package/dist/client/assets/{home-oMo4RW6o.js → home-DVyMZFQG.js} +1 -1
  145. package/dist/client/assets/{hooks-BMOMofPN.js → hooks-BIIUffrO.js} +1 -1
  146. package/dist/client/assets/{hooks-Bx2wDd6l.js → hooks-CZw8Nj9H.js} +1 -1
  147. package/dist/client/assets/{icon-button-DE6YwbX0.js → icon-button-ffXmg1OC.js} +1 -1
  148. package/dist/client/assets/{index-6OXJCbT4.js → index-B0qiS0Xy.js} +1 -1
  149. package/dist/client/assets/index-B7WbW8e4.css +1 -0
  150. package/dist/client/assets/{index-DVrVTpLB.js → index-BSqcExWu.js} +1 -1
  151. package/dist/client/assets/{index-Bu2UvNKO.js → index-BYhU0OAw.js} +1 -1
  152. package/dist/client/assets/{index-C3yI-wPZ.js → index-Bo1CTi_x.js} +1 -1
  153. package/dist/client/assets/{index-CzMuJ5VR.js → index-CC4ky7Bt.js} +1 -1
  154. package/dist/client/assets/{index-CIRfHbNo.js → index-CJvGo7M-.js} +2 -2
  155. package/dist/client/assets/{index-CDIKK8XE.js → index-CwPMc6DD.js} +1 -1
  156. package/dist/client/assets/{index-BGSZ0_sE.js → index-DbCXB6UC.js} +1 -1
  157. package/dist/client/assets/{index-BGP_58ye.js → index-DnfITnHh.js} +1 -1
  158. package/dist/client/assets/{index-d9TZlbfN.js → index-DqJtHo4n.js} +1 -1
  159. package/dist/client/assets/{index-DqS2eDeC.js → index-IKyehAj0.js} +1 -1
  160. package/dist/client/assets/{index-ovl7iN7e.js → index-P6xk5T3b.js} +1 -1
  161. package/dist/client/assets/{index-C4h6JdMm.js → index-R-0H4aXt.js} +1 -1
  162. package/dist/client/assets/{index-Dq4ETK4D.js → index-cLR8hRUZ.js} +1 -1
  163. package/dist/client/assets/{index-redirect-CzPTkmTV.js → index-redirect-UW05aF5k.js} +1 -1
  164. package/dist/client/assets/{infiniteQueryObserver-Dtng7G3d.js → infiniteQueryObserver-Co_jht2h.js} +1 -1
  165. package/dist/client/assets/{infra-billing-Bw4GRy_4.js → infra-billing-BNNb1HUT.js} +1 -1
  166. package/dist/client/assets/{input-vVq9PHOi.js → input-CW1e_IGW.js} +1 -1
  167. package/dist/client/assets/{input-CHdcX8S5.js → input-DmhYaSfN.js} +1 -1
  168. package/dist/client/assets/{input-BT_0BgE5.js → input-ctnVSOTh.js} +1 -1
  169. package/dist/client/assets/{integration-icon-Dk--6q6l.js → integration-icon-DBmxvUTr.js} +1 -1
  170. package/dist/client/assets/{label-D50PwmJo.js → label-4VvccInH.js} +1 -1
  171. package/dist/client/assets/{last-preview-page-Ay_yzntY.js → last-preview-page-CvHaNJZf.js} +1 -1
  172. package/dist/client/assets/{layout-BSBqypiA.js → layout-YtNzwgmw.js} +1 -1
  173. package/dist/client/assets/{legacy-agents-deep-BDEWrQHc.js → legacy-agents-deep-D_WKz4Q4.js} +1 -1
  174. package/dist/client/assets/{legacy-main-redirect-CIB1MgqH.js → legacy-main-redirect-Cuoc1Q6w.js} +1 -1
  175. package/dist/client/assets/{library-n9grrWz3.js → library-C5hSt5jS.js} +1 -1
  176. package/dist/client/assets/{login-BIRI0tX8.js → login-BHMe1ZN5.js} +1 -1
  177. package/dist/client/assets/{markdown-D24pd38Z.js → markdown-DgiLeH6x.js} +1 -1
  178. package/dist/client/assets/{mcp-app-renderer-DG3CrmIu.js → mcp-app-renderer-Dpmk1Vv4.js} +1 -1
  179. package/dist/client/assets/{mcp-oauth-Cry0Iydf.js → mcp-oauth-C2J7M1Qy.js} +1 -1
  180. package/dist/client/assets/{members-Bv-_s4bC.js → members-DZUeyWSF.js} +1 -1
  181. package/dist/client/assets/{message-templates-NTWQzKwa.js → message-templates-DEiaR-4t.js} +1 -1
  182. package/dist/client/assets/{mini-report-page-Ciz9Dfjq.js → mini-report-page-DZ2brjJR.js} +1 -1
  183. package/dist/client/assets/{mock-board-COHQ1ooL.js → mock-board-C3-S11yK.js} +3 -3
  184. package/dist/client/assets/{monaco-editor-eaoEeVnH.js → monaco-editor-CWYBB1Jc.js} +1 -1
  185. package/dist/client/assets/{monitoring-stats-row-Bvlv58gP.js → monitoring-stats-row-BIOo_dNd.js} +1 -1
  186. package/dist/client/assets/{multi-select-CzC0rEJJ.js → multi-select-CQmA6upg.js} +1 -1
  187. package/dist/client/assets/{mustache-DPx1n11E.js → mustache-CCIaSVE8.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-DQz1nrgX.js → oauth-callback-JKin_sKW.js} +1 -1
  189. package/dist/client/assets/{oauth-callback-ai-provider-SzX3-OhZ.js → oauth-callback-ai-provider-CVBe8y5A.js} +1 -1
  190. package/dist/client/assets/{onboarding-DJHWCOJQ.js → onboarding-CiuzJ17Q.js} +1 -1
  191. package/dist/client/assets/{optimistic-project-sidebar-views-DrV8hFzZ.js → optimistic-project-sidebar-views-B1t6VhD_.js} +1 -1
  192. package/dist/client/assets/{org-file-open-context-CPc9Gmwl.js → org-file-open-context-BpKzz2X6.js} +1 -1
  193. package/dist/client/assets/{organization-choice-FsHJP5ly.js → organization-choice-DtGmLZl3.js} +1 -1
  194. package/dist/client/assets/{orgs-oiIXpw2r.js → orgs-C7GJQT2F.js} +1 -1
  195. package/dist/client/assets/{page-seo-form-Cl4iQBHJ.js → page-seo-form-CJEF56bx.js} +1 -1
  196. package/dist/client/assets/{pair-Cb-OQogc.js → pair-B42JzU0G.js} +1 -1
  197. package/dist/client/assets/{plan-ladder-0h_s2Opb.js → plan-ladder-DZj3EnLg.js} +1 -1
  198. package/dist/client/assets/{popover-BeMA1p6R.js → popover-Dc6K6r1C.js} +1 -1
  199. package/dist/client/assets/{post-calendar-CGYQt2F3.js → post-calendar-CdMKYMS2.js} +1 -1
  200. package/dist/client/assets/{post-editor-jkJ4iVh0.js → post-editor-my4ezea6.js} +1 -1
  201. package/dist/client/assets/{preview-content-CLDea9bT.js → preview-content-CziYH8nP.js} +1 -1
  202. package/dist/client/assets/{preview-dialog-CNhc9GEX.js → preview-dialog-DDwPGbj2.js} +1 -1
  203. package/dist/client/assets/{primitives-BgF4Jb6N.js → primitives-BeUcpT_l.js} +1 -1
  204. package/dist/client/assets/{profile-CXuZoTDK.js → profile-BOKysRT9.js} +1 -1
  205. package/dist/client/assets/{project-app-view-CrMbD3xy.js → project-app-view-CRETWS5_.js} +1 -1
  206. package/dist/client/assets/{project-feed-CSAt8TDH.js → project-feed-DnXMTyTK.js} +1 -1
  207. package/dist/client/assets/{project-icon-wLSVGikU.js → project-icon-CQHpgqjE.js} +1 -1
  208. package/dist/client/assets/project-reports-D_REhIUx.js +1 -0
  209. package/dist/client/assets/project-tasks-CCtFBWbk.js +1 -0
  210. package/dist/client/assets/{prompts-FczZDZhL.js → prompts-Buirx6sq.js} +1 -1
  211. package/dist/client/assets/record-editor-CvRbpNqI.js +1 -0
  212. package/dist/client/assets/{redirect-editor-C8CXeIKx.js → redirect-editor-T_gO2ARt.js} +1 -1
  213. package/dist/client/assets/reports-CyGj47MI.js +1 -0
  214. package/dist/client/assets/{reports-BnpzgMUZ.js → reports-D29xfPX4.js} +1 -1
  215. package/dist/client/assets/{reports-onboarding-BjA0RUmv.js → reports-onboarding-Cd6ZQZfG.js} +1 -1
  216. package/dist/client/assets/{reports-tab-6kIPzfDa.js → reports-tab-C8QCg1Zh.js} +2 -2
  217. package/dist/client/assets/{repositories-UyvGNZyE.js → repositories-eEvxM93v.js} +1 -1
  218. package/dist/client/assets/{repository-import-picker-DGMV6v91.js → repository-import-picker-CYhmnGT6.js} +1 -1
  219. package/dist/client/assets/{repository-picker-CAnr38vT.js → repository-picker-CJrIw77i.js} +1 -1
  220. package/dist/client/assets/{require-capability-C3pocO29.js → require-capability-CQeOwSD4.js} +1 -1
  221. package/dist/client/assets/{required-auth-layout-CRoz7eVL.js → required-auth-layout-CE8AnY1F.js} +1 -1
  222. package/dist/client/assets/{reset-password-BcTo1zVh.js → reset-password-DFPIxqxe.js} +1 -1
  223. package/dist/client/assets/{resizable-DMdqS7KS.js → resizable-C4Edp607.js} +1 -1
  224. package/dist/client/assets/{review-settings-Dos4EaZT.js → review-settings-CbjseDbt.js} +1 -1
  225. package/dist/client/assets/{rich-text-link-control-ChhDCbLg.js → rich-text-link-control-Do2n6JIO.js} +1 -1
  226. package/dist/client/assets/{roles-Dso_rZka.js → roles-CJoQe-iA.js} +1 -1
  227. package/dist/client/assets/{route-Dpgu6bM3.js → route-DFFPgrtv.js} +1 -1
  228. package/dist/client/assets/{route-CAV5Iqq6.js → route-euoZW6b2.js} +1 -1
  229. package/dist/client/assets/{route-page-header-szay9ZHs.js → route-page-header-CEYsqpu_.js} +1 -1
  230. package/dist/client/assets/{route-BW7OU3VN.js → route-wRSR0-RQ.js} +1 -1
  231. package/dist/client/assets/runnable-block-editor-Bm9IpSRw.js +17 -0
  232. package/dist/client/assets/{sandbox-lifecycle-context-DQkSTq-X.js → sandbox-lifecycle-context-CFfKpmMd.js} +1 -1
  233. package/dist/client/assets/{schema-CuA-4jkq.js → schema--090tLTs.js} +1 -1
  234. package/dist/client/assets/{scroll-area-DULf_VBP.js → scroll-area-DaAnCQrg.js} +1 -1
  235. package/dist/client/assets/{search-input-PUZww2fu.js → search-input-Cq2H58ks.js} +1 -1
  236. package/dist/client/assets/{search-toggle-DjiUvJCk.js → search-toggle-BzE09wAY.js} +1 -1
  237. package/dist/client/assets/{secret-picker-CtP3cGK6.js → secret-picker-FNqMA4b3.js} +1 -1
  238. package/dist/client/assets/{secrets-BFQYAqak.js → secrets-B79xiOvr.js} +1 -1
  239. package/dist/client/assets/{sections-editor-zyGXF2HJ.js → sections-editor-Bch82FO0.js} +1 -1
  240. package/dist/client/assets/{select-DopB4Bge.js → select-_7jCWmPs.js} +1 -1
  241. package/dist/client/assets/{select-model-DwZgxu7Z.js → select-model-C991WVaS.js} +1 -1
  242. package/dist/client/assets/{seo-editor-BHduREOx.js → seo-editor-COzsrOm2.js} +1 -1
  243. package/dist/client/assets/{separator-Dfqi-trY.js → separator-CTDFfWkU.js} +1 -1
  244. package/dist/client/assets/{settings-tab-DHGTgDCA.js → settings-tab-OQmnW7Ut.js} +1 -1
  245. package/dist/client/assets/{sheet-B07_w8Cy.js → sheet-fXc9nA9M.js} +1 -1
  246. package/dist/client/assets/{shell-layout-CiIUdC3d.js → shell-layout-CFgBlrHw.js} +1 -1
  247. package/dist/client/assets/{sidebar-WPwPo4Mo.js → sidebar-CD_qlBS1.js} +1 -1
  248. package/dist/client/assets/{skill-preview-4uKeVlCE.js → skill-preview-iGSQpWTN.js} +1 -1
  249. package/dist/client/assets/{skills-Z8QbBG5G.js → skills-Bo3AuN87.js} +1 -1
  250. package/dist/client/assets/{sso-D_WopQAs.js → sso-bCqIdarJ.js} +1 -1
  251. package/dist/client/assets/{switch-CcpcKSH6.js → switch-_-H0ZzQ0.js} +1 -1
  252. package/dist/client/assets/{synced-repos-Dx3NDxK3.js → synced-repos-CJ3PDs71.js} +1 -1
  253. package/dist/client/assets/{table-eWLURdnt.js → table-B0ylfHsr.js} +1 -1
  254. package/dist/client/assets/{tabs-C-VUdz3i.js → tabs-CbBMI_3w.js} +1 -1
  255. package/dist/client/assets/{task-board-C0tuJmTv.js → task-board-BOtwbMNd.js} +1 -1
  256. package/dist/client/assets/{task-route-K8xxtdH-.js → task-route-ClDUjCmA.js} +1 -1
  257. package/dist/client/assets/{task-status-DYCL1yMW.js → task-status-DCDgnDj7.js} +1 -1
  258. package/dist/client/assets/{taskboard-analytics-DGqeyHZi.js → taskboard-analytics-CiRR6YhP.js} +1 -1
  259. package/dist/client/assets/{tasks-DW-13Om3.js → tasks-MLHolUxt.js} +1 -1
  260. package/dist/client/assets/tasks-pXX1X4bj.js +1 -0
  261. package/dist/client/assets/{textarea-DF8NPlrq.js → textarea-Pm894Vb7.js} +1 -1
  262. package/dist/client/assets/{thread-button-DfRqzbbf.js → thread-button-0yNolO5U.js} +1 -1
  263. package/dist/client/assets/{thread-intent-DrnToeJq.js → thread-intent-CZ1rMWWZ.js} +1 -1
  264. package/dist/client/assets/{thread-route-oXaLzozB.js → thread-route-Cz0k6s-0.js} +1 -1
  265. package/dist/client/assets/{thread-route-_5woxobJ.js → thread-route-DDyPLFny.js} +1 -1
  266. package/dist/client/assets/{thread-sheet-body-L3KiT5N3.js → thread-sheet-body-CoOlYiyz.js} +1 -1
  267. package/dist/client/assets/{toggle-group-DS1tggto.js → toggle-group-BCKZnr8W.js} +1 -1
  268. package/dist/client/assets/{toolbar-icon-button-CHTgVRqh.js → toolbar-icon-button-SVo3Fo7H.js} +1 -1
  269. package/dist/client/assets/{tooltip-D49FN_aN.js → tooltip-ChaEDFwp.js} +1 -1
  270. package/dist/client/assets/{track-C1nVqj6n.js → track-CO4eg07r.js} +1 -1
  271. package/dist/client/assets/{types-xUlwJqmy.js → types-DOMFbfVw.js} +1 -1
  272. package/dist/client/assets/{usage-stats-iRnsAutO.js → usage-stats-rx7t_Nos.js} +1 -1
  273. package/dist/client/assets/{use-ai-providers-CvzsHl-J.js → use-ai-providers-8tdExCCT.js} +1 -1
  274. package/dist/client/assets/{use-automations-SyRhYI2V.js → use-automations-C3DIh181.js} +1 -1
  275. package/dist/client/assets/{use-autosave-zQPr0q1b.js → use-autosave-Bra0uvzP.js} +1 -1
  276. package/dist/client/assets/{use-connect-companion-C9x-d8Io.js → use-connect-companion-Bull_Zxw.js} +1 -1
  277. package/dist/client/assets/{use-connection-DJ_-6CKa.js → use-connection-_01X3r9K.js} +1 -1
  278. package/dist/client/assets/{use-copy-BcYXDKFV.js → use-copy-DYjRVCxp.js} +1 -1
  279. package/dist/client/assets/{use-create-virtual-mcp-Bq_y-eu_.js → use-create-virtual-mcp-Bj3aYXDp.js} +1 -1
  280. package/dist/client/assets/{use-date-fns-locale-D0LsXuaH.js → use-date-fns-locale-yvDr0D7T.js} +1 -1
  281. package/dist/client/assets/{use-debounced-autosave-CuCDxLLJ.js → use-debounced-autosave-DbVxH1pQ.js} +1 -1
  282. package/dist/client/assets/{use-debounced-value-BHs38KlD.js → use-debounced-value-BAx8VCR0.js} +1 -1
  283. package/dist/client/assets/{use-deco-credits-DlkNmD5l.js → use-deco-credits-yiRW4WkY.js} +1 -1
  284. package/dist/client/assets/{use-decopilot-events-bFNJbvta.js → use-decopilot-events-D9jYfL-F.js} +1 -1
  285. package/dist/client/assets/{use-delete-connection-9eqhDSAH.js → use-delete-connection-C_I3mgoO.js} +1 -1
  286. package/dist/client/assets/{use-deployment-admin-C6RecmX2.js → use-deployment-admin-ByTSklJo.js} +1 -1
  287. package/dist/client/assets/{use-entitlements-Czw7GDek.js → use-entitlements-C3RfsquV.js} +1 -1
  288. package/dist/client/assets/{use-fast-preview-draft-url-BVc9QL4W.js → use-fast-preview-draft-url-D8zl5mEv.js} +1 -1
  289. package/dist/client/assets/{use-file-configs-HQwDeDNl.js → use-file-configs-DOTdJIrl.js} +1 -1
  290. package/dist/client/assets/{use-in-settings-5HBhdptJ.js → use-in-settings-C7yJRVKh.js} +1 -1
  291. package/dist/client/assets/{use-infinite-scroll-CN_tSwpY.js → use-infinite-scroll-D7ecDjvR.js} +1 -1
  292. package/dist/client/assets/{use-join-requests-b5UAVNZB.js → use-join-requests-Ilb6bw8C.js} +1 -1
  293. package/dist/client/assets/{use-main-panel-tabs-Cwhf_l7Z.js → use-main-panel-tabs-CnSLB640.js} +1 -1
  294. package/dist/client/assets/{use-mcp-auth-status-CP_j-a5t.js → use-mcp-auth-status-BZ3hpP0X.js} +1 -1
  295. package/dist/client/assets/{use-mcp-client-CnIZ_wv0.js → use-mcp-client-CNhRUvA5.js} +1 -1
  296. package/dist/client/assets/{use-mcp-prompts-eemqvkiM.js → use-mcp-prompts-EbPPuTcd.js} +1 -1
  297. package/dist/client/assets/{use-mcp-tools-DViJqpMQ.js → use-mcp-tools-BPf00IDz.js} +1 -1
  298. package/dist/client/assets/{use-members-D2JQSmob.js → use-members-B3lGJD1d.js} +1 -1
  299. package/dist/client/assets/{use-mobile-B5qpDLZq.js → use-mobile-DX7VP8iK.js} +1 -1
  300. package/dist/client/assets/{use-navigate-to-agent-DSnSYxD2.js → use-navigate-to-agent-g6nQp_q-.js} +1 -1
  301. package/dist/client/assets/{use-open-billing-url-4fzqiTvB.js → use-open-billing-url-UFHRZeDE.js} +1 -1
  302. package/dist/client/assets/{use-org-auth-client-D6LbyZqv.js → use-org-auth-client-DbfrlNFJ.js} +1 -1
  303. package/dist/client/assets/{use-org-fs-YTzVKtQ-.js → use-org-fs-BJVySa9m.js} +1 -1
  304. package/dist/client/assets/{use-org-repo-syncs-CiMWpZzV.js → use-org-repo-syncs-Bu37nqQ2.js} +1 -1
  305. package/dist/client/assets/{use-org-sso-B_sUEO3Y.js → use-org-sso-BlWvz-NF.js} +1 -1
  306. package/dist/client/assets/{use-organization-roles-E9lBVhF9.js → use-organization-roles-DE7kCN9L.js} +1 -1
  307. package/dist/client/assets/{use-organization-settings-DpV4hf3B.js → use-organization-settings-BLQ6mu_F.js} +1 -1
  308. package/dist/client/assets/{use-panel-navigate-ClgRa3d3.js → use-panel-navigate-BsGJc9V3.js} +1 -1
  309. package/dist/client/assets/{use-project-native-view-presence-ojMcETii.js → use-project-native-view-presence-KEUHlmpo.js} +1 -1
  310. package/dist/client/assets/{use-project-scope-Y_iTk8Hz.js → use-project-scope-BGBC-ayH.js} +1 -1
  311. package/dist/client/assets/{use-releases-Dx4mnL7m.js → use-releases-CQr6l3Pj.js} +1 -1
  312. package/dist/client/assets/{use-reports-diagnostic-XVMvTq7T.js → use-reports-diagnostic-CofOdWW9.js} +1 -1
  313. package/dist/client/assets/{use-route-default-main-BhDdbyHl.js → use-route-default-main-B3Le2s3e.js} +1 -1
  314. package/dist/client/assets/{use-secrets-BB1Osv03.js → use-secrets-C61EqNPY.js} +1 -1
  315. package/dist/client/assets/{use-section-preview-base-DLktnSfm.js → use-section-preview-base-lO8EHufR.js} +1 -1
  316. package/dist/client/assets/{use-session-runtime-DO5r3w4m.js → use-session-runtime-CJtUNfm9.js} +1 -1
  317. package/dist/client/assets/{use-tags-CEeYoNdt.js → use-tags-Cw8Tl4V2.js} +1 -1
  318. package/dist/client/assets/{use-task-board-analytics-D7G9K6PS.js → use-task-board-analytics-P3ACpavh.js} +1 -1
  319. package/dist/client/assets/{use-task-metadata-BdSaCf9d.js → use-task-metadata-Bh8dwwJo.js} +1 -1
  320. package/dist/client/assets/{use-thread-outputs-DHTiy2SY.js → use-thread-outputs-DWb5Ffwp.js} +1 -1
  321. package/dist/client/assets/{use-virtual-mcp-DfVXeR1f.js → use-virtual-mcp-DYsZ_S7V.js} +1 -1
  322. package/dist/client/assets/useInfiniteQuery-ChD58h72.js +1 -0
  323. package/dist/client/assets/{useQueries-D83VS41L.js → useQueries-BkAl2Nho.js} +1 -1
  324. package/dist/client/assets/useSuspenseInfiniteQuery-C9oYMcau.js +1 -0
  325. package/dist/client/assets/{users-DOJ2AeT_.js → users-D9VRrUZq.js} +1 -1
  326. package/dist/client/assets/{utils-Botpu0EJ.js → utils-SncAWk77.js} +1 -1
  327. package/dist/client/assets/{variant-calendar-D8XdwW-M.js → variant-calendar-Bc7nrgXK.js} +1 -1
  328. package/dist/client/assets/{variant-matcher-override-C8VoWaON.js → variant-matcher-override-B6vu1CuI.js} +1 -1
  329. package/dist/client/assets/{view-mode-toggle-BPl38sGT.js → view-mode-toggle-BaA42o_l.js} +1 -1
  330. package/dist/client/assets/{virtual-mcp-RQTG-mIx.js → virtual-mcp-C32FiGUT.js} +1 -1
  331. package/dist/client/index.html +2 -2
  332. package/dist/server/cli.js +1 -1
  333. package/dist/server/server.js +1 -1
  334. package/package.json +1 -1
  335. package/dist/client/assets/agent-app-Bfmsm5RQ.js +0 -1
  336. package/dist/client/assets/agent-deck--dfvwlwZ.js +0 -1
  337. package/dist/client/assets/agent-file-C6zCpSBU.js +0 -1
  338. package/dist/client/assets/agent-library-file-Cak5Iflg.js +0 -1
  339. package/dist/client/assets/agent-settings-BGNj6VxT.js +0 -1
  340. package/dist/client/assets/agent-site-editor-code-Cm41tdxL.js +0 -2
  341. package/dist/client/assets/agent-site-editor-preview-DfKy_DS-.js +0 -518
  342. package/dist/client/assets/agent-view-B5dq3i8X.js +0 -1
  343. package/dist/client/assets/api-keys-5id7lbRp.js +0 -1
  344. package/dist/client/assets/app-editor-BpT90ZR4.js +0 -1
  345. package/dist/client/assets/index-B88q0man.css +0 -1
  346. package/dist/client/assets/project-reports-C57rGt8f.js +0 -1
  347. package/dist/client/assets/project-tasks-eJ1qu-Dh.js +0 -1
  348. package/dist/client/assets/record-editor-pT-KeZ17.js +0 -1
  349. package/dist/client/assets/reports-Cf79syUF.js +0 -1
  350. package/dist/client/assets/runnable-block-editor-BMG0H3oq.js +0 -17
  351. package/dist/client/assets/tasks-BXxuWADk.js +0 -1
  352. package/dist/client/assets/useInfiniteQuery-BjPoSioc.js +0 -1
  353. package/dist/client/assets/useSuspenseInfiniteQuery-nb02ukIZ.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-CIRfHbNo.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-CJvGo7M-.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,8 +50,8 @@
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-CIRfHbNo.js"></script>
54
- <link rel="stylesheet" crossorigin href="/assets/index-B88q0man.css">
53
+ <script type="module" crossorigin src="/assets/index-CJvGo7M-.js"></script>
54
+ <link rel="stylesheet" crossorigin href="/assets/index-B7WbW8e4.css">
55
55
  </head>
56
56
  <body>
57
57
  <div id="root"></div>
@@ -2105,7 +2105,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var D8$=L(()=>{Ch()});f
2105
2105
  `.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${G}/${K}, keeping in old table`);continue}}await Yl`
2106
2106
  DELETE FROM kysely_migration WHERE name = ${Q}
2107
2107
  `.execute($)}}async function pZ$($){await u34($),await l34($);let Z=new dZ$({db:$,provider:{getMigrations:()=>Promise.resolve(i01)}}),{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 c34($){let{keepOpen:Z=!1,database:Q,skipBetterAuth:X=!1}=$??{},Y="skipped";if(!X&&!Q)Y=await Xa0();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 pZ$(J.db);return await G(),{betterAuth:Y,kysely:K}}catch(K){throw await G(),K}}async function m34(){let $=K8(),Z=new dZ$({db:$.db,provider:{getMigrations:()=>Promise.resolve(i01)}}),{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 tZ$=L(()=>{mZ$();Ya0();NX()});async function oG0($){let Z={...process.env},Q=gZ0($,Z);console.log(jI1(Q.settings.encryptionKey));let X=Q.settings.betterAuthSecret||(Q.settings.localMode?t4$(Q.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (aJ0(),oJ0)),{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(() => (Ya0(),a4$));await W(J.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (NX(),N4$)),{migrateToLatest:F}=await Promise.resolve().then(() => (tZ$(),nZ$)),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 w8$(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 p01=L(()=>{Ch();o4$();H$()});var sZ$={};W0(sZ$,{updateService:()=>oP,subscribeCliState:()=>o01,setTuiConsoleIntercepted:()=>aG0,setServerUrl:()=>ya,setMigrationsDone:()=>ba,setDevMode:()=>i34,resetCliStateForTests:()=>d34,isTuiConsoleIntercepted:()=>rG0,getCliState:()=>t01,addLogEntry:()=>cD});function oZ$(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function aZ$(){return{services:oZ$(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function d34(){JJ=aZ$()}function fa(){for(let $ of n01)$()}function t01(){return JJ}function o01($){return n01.add($),()=>n01.delete($)}function oP($){JJ={...JJ,services:JJ.services.map((Z)=>Z.name===$.name?$:Z)},fa()}function ba(){JJ={...JJ,migrationsStatus:"done"},fa()}function ya($){JJ={...JJ,serverUrl:$},fa()}function cD($){let Z=[...JJ.logs,$];JJ={...JJ,logs:Z.length>500?Z.slice(-500):Z},fa()}function i34(){JJ={...JJ,services:[...oZ$(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},fa()}function aG0($){rZ$=$}function rG0(){return rZ$}var JJ,n01,rZ$=!1;var aP=L(()=>{JJ=aZ$();n01=new Set});import{createServer as eZ$}from"net";function p34($){return new Promise((Z)=>{let Q=eZ$();Q.once("error",()=>Z(!1)),Q.listen($,"0.0.0.0",()=>{Q.close(()=>Z(!0))})})}async function ga($){if(await p34($))return $;let Z=await new Promise((Q,X)=>{let Y=eZ$();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 a01=()=>{};var s01={};W0(s01,{startDevServer:()=>t34,pipeToLogStore:()=>r01});import{join as n34}from"path";function r01($){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 t34($){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 ga(Number(Y)+1):await ga(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await oG0({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});ba();let F=n34(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)r01(N.stdout),r01(N.stderr);ya(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(),oJ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var e01=L(()=>{p01();aP();a01()});var sG0;var $11=L(()=>{sG0={name:"decocms",version:"4.390.2",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 a34,Text as $7$}from"ink";import{jsx as r34,jsxs as Z7$}from"react/jsx-runtime";function Q7$({version:$}){return Z7$(a34,{flexDirection:"column",marginTop:1,children:[EG0.map((Z,Q)=>r34($7$,{color:zG0[Q],children:Z},Q)),Z7$($7$,{dimColor:!0,children:[" v",$]})]})}var X7$=L(()=>{za()});import{Box as rP,Text as mD}from"ink";import{Spinner as s34}from"@inkjs/ui";import{jsx as AG,jsxs as Jl}from"react/jsx-runtime";function Y7$({status:$}){if($==="pending")return AG(s34,{label:""});return AG(mD,{color:"green",children:"\u2713"})}function e34($){return`${$.name}: ${$.port||"...."}`}function J7$({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Jl(rP,{flexDirection:"column",paddingBottom:1,children:[AG(Q7$,{version:sG0.version}),AG(rP,{marginBottom:1,children:AG(mD,{dimColor:!0,children:"\u2500".repeat(80)})}),AG(rP,{children:Jl(mD,{dimColor:!0,children:["Home: ",Q]})}),Jl(rP,{gap:2,children:[$.map((Y)=>Jl(rP,{gap:1,children:[AG(mD,{children:e34(Y)}),AG(Y7$,{status:Y.status})]},Y.name)),Jl(rP,{gap:1,children:[AG(mD,{children:"Migrations"}),AG(Y7$,{status:Z})]})]}),AG(rP,{children:X?Jl(mD,{children:["Open in browser: ",AG(mD,{color:"cyan",children:X})]}):AG(mD,{dimColor:!0,children:"Starting..."})})]})}var G7$=L(()=>{$11();X7$()});import{Box as $K4,Text as ha}from"ink";import{jsx as Z11,jsxs as Q11}from"react/jsx-runtime";function ZK4($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function K7$({logs:$}){return Z11($K4,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return Z11(ha,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Q11(ha,{children:[Q11(ha,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Z11(ha,{color:ZK4(Z.status),children:Z.status}),Q11(ha,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var W7$=()=>{};var X11={};W0(X11,{App:()=>YK4});import{Box as QK4}from"ink";import{useSyncExternalStore as XK4}from"react";import{jsx as H7$,jsxs as JK4}from"react/jsx-runtime";function YK4({home:$}){let Z=XK4(o01,t01);return JK4(QK4,{flexDirection:"column",children:[H7$(J7$,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),H7$(K7$,{logs:Z.logs})]})}var Y11=L(()=>{G7$();W7$();aP()});var $K="thread-gate",qB="decopilot-hosted-harness",MB="decopilot-hosted-harness-sandboxed",ZK="automations",dD="background-tools",sP="task-board-github-reads";var F7$="13";function U7$($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:F7$,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var N7$=()=>{};import GK4 from"pg";async function L7$($,Z){let{databaseUrl:Q,lockTimeoutMs:X=KK4}=$,Y=$.log??((W)=>console.log(W)),J=new GK4.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",[B7$.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$(WK4)}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)",[B7$.toString()])}catch{}await J.end().catch(()=>{})}}var B7$=8314027461559302n,KK4=600000,WK4=500;var O7$=L(()=>{w8()});function HK4(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function J11($,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 D7$(){let $=HK4();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:J11($,"--cpu-prof-dir")??process.cwd(),name:J11($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(J11($,"--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 w7$(){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(()=>{}),eG0=setInterval(()=>void Z().catch(()=>{}),$),eG0.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(eG0)clearInterval(eG0)}}var eG0;var j7$=()=>{};import*as FK4 from"bun:jsc";function E7$(){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{UK4()}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=NK4()?.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 UK4,NK4;var z7$=L(()=>{({startSamplingProfiler:UK4,samplingProfilerStackTraces:NK4}=FK4)});function P7$(){D7$();let $=[w7$(),Y4$(),E7$()];return()=>{for(let Z of $)Z()}}var T7$=L(()=>{oo0();j7$();z7$()});var eP=b((A7$)=>{Object.defineProperty(A7$,"__esModule",{value:!0});A7$.RepublishHeaders=A7$.DirectMsgHeaders=A7$.JsHeaders=A7$.AdvisoryKind=void 0;A7$.isOrderedPushConsumerOptions=BK4;A7$.isPullConsumer=LK4;A7$.isPushConsumer=OK4;A7$.isBoundPushConsumerOptions=DK4;function BK4($){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 LK4($){return $.isPullConsumer()}function OK4($){return $.isPushConsumer()}function DK4($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}A7$.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"};A7$.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"};A7$.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};A7$.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var RG=b((q7$)=>{Object.defineProperty(q7$,"__esModule",{value:!0});q7$.TD=q7$.TE=q7$.Empty=void 0;q7$.encode=qK4;q7$.decode=MK4;q7$.Empty=new Uint8Array(0);q7$.TE=new TextEncoder;q7$.TD=new TextDecoder;function RK4(...$){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 qK4(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(q7$.TE.encode($[Q]));if(Z.length===0)return q7$.Empty;if(Z.length===1)return Z[0];return RK4(...Z)}function MK4($){if(!$||$.length===0)return"";return q7$.TD.decode($)}});var qG=b((V7$)=>{Object.defineProperty(V7$,"__esModule",{value:!0});V7$.errors=V7$.PermissionViolationError=V7$.NoRespondersError=V7$.TimeoutError=V7$.RequestError=V7$.ProtocolError=V7$.ConnectionError=V7$.DrainingConnectionError=V7$.ClosedConnectionError=V7$.AuthorizationError=V7$.UserAuthenticationExpiredError=V7$.InvalidOperationError=V7$.InvalidArgumentError=V7$.InvalidSubjectError=void 0;class K11 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}V7$.InvalidSubjectError=K11;class $30 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 $30(`${$} ${Z}`,Q)}}V7$.InvalidArgumentError=$30;class W11 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}V7$.InvalidOperationError=W11;class Z30 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new Z30($);return null}}V7$.UserAuthenticationExpiredError=Z30;class Q30 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 Q30($);return null}}V7$.AuthorizationError=Q30;class H11 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}V7$.ClosedConnectionError=H11;class F11 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}V7$.DrainingConnectionError=F11;class U11 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}V7$.ConnectionError=U11;class N11 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}V7$.ProtocolError=N11;class B11 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof X30}}V7$.RequestError=B11;class L11 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}V7$.TimeoutError=L11;class X30 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}V7$.NoRespondersError=X30;class Y30 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 Y30($,Q,X,Y)}}V7$.PermissionViolationError=Y30;V7$.errors={AuthorizationError:Q30,ClosedConnectionError:H11,ConnectionError:U11,DrainingConnectionError:F11,InvalidArgumentError:$30,InvalidOperationError:W11,InvalidSubjectError:K11,NoRespondersError:X30,PermissionViolationError:Y30,ProtocolError:N11,RequestError:B11,TimeoutError:L11,UserAuthenticationExpiredError:Z30}});var yW=b((v7$)=>{Object.defineProperty(v7$,"__esModule",{value:!0});v7$.SimpleMutex=v7$.Perf=void 0;v7$.extend=mK4;v7$.render=dK4;v7$.timeout=iK4;v7$.delay=pK4;v7$.deadline=nK4;v7$.deferred=D11;v7$.debugDeferred=tK4;v7$.shuffle=oK4;v7$.collect=aK4;v7$.jitter=_7$;v7$.backoff=rK4;v7$.nanos=sK4;v7$.millis=eK4;v7$.randomToken=QW4;var cK4=RG(),O11=qG();function mK4($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function dK4($){return cK4.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function iK4($,Z=!0){let Q=Z?new O11.TimeoutError:null,X,Y,J=new Promise((G,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new O11.TimeoutError);else K(Q)},$)});return Object.assign(J,X)}function pK4($=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 nK4($,Z=1000){let Q=D11(),X=setTimeout(()=>{Q.reject(new O11.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function D11(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function tK4(){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 oK4($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function aK4($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class S7${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})}),$}}v7$.Perf=S7$;class C7${max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=D11();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}v7$.SimpleMutex=C7$;function _7$($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function rK4($=[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 _7$(Q>Z?$[Z]:$[Q])}}}function sK4($){return $*1e6}function eK4($){return Math.floor($/1e6)}var $W4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",IB=new Uint8Array(62);for(let $=0;$<62;$++)IB[$]=$W4.charCodeAt($);var ZW4=218340105584896;function QW4(){let $=Math.floor(Math.random()*ZW4),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 l7$=b((h7$)=>{Object.defineProperty(h7$,"__esModule",{value:!0});h7$.nuid=h7$.NuidImpl=void 0;var jW4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",iD=62,G30=12,y7$=10,f7$=33,EW4=333,b7$=G30+y7$,j11=new Uint8Array(iD);for(let $=0;$<iD;$++)j11[$]=jW4.charCodeAt($);var J30=4294967296,g7$=BigInt(iD)**BigInt(y7$),ua=Number(g7$/(1n<<32n)),w11=Number(g7$%(1n<<32n));function zW4($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function PW4($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else zW4($)}class E11{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(b7$),this.cbuf=new Uint8Array(G30),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(ua+1)),this.seqLo=Math.floor(Math.random()*J30);while($++<8&&this.seqHi===ua&&this.seqLo>=w11);if(this.seqHi===ua&&this.seqLo>=w11)this.seqLo=0;this.inc=Math.random()*(EW4-f7$)+f7$|0}setPre(){PW4(this.cbuf);for(let $=0;$<G30;$++)this.buf[$]=j11[this.cbuf[$]%iD]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=b7$-1;Q>=G30;Q--){let X=Math.floor($/iD),J=($-X*iD)*J30+Z,G=Math.floor(J/iD),K=J-G*iD;this.buf[Q]=j11[K],$=X,Z=G}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=J30)this.seqLo-=J30,this.seqHi+=1;if(this.seqHi>ua||this.seqHi===ua&&this.seqLo>=w11)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()}}h7$.NuidImpl=E11;h7$.nuid=new E11});var i7$=b((m7$)=>{Object.defineProperty(m7$,"__esModule",{value:!0});m7$.nuid=m7$.Nuid=void 0;var c7$=l7$();m7$.Nuid=c7$.NuidImpl;m7$.nuid=c7$.nuid});var W30=b((K30)=>{Object.defineProperty(K30,"__esModule",{value:!0});K30.nuid=K30.Nuid=void 0;var p7$=i7$();Object.defineProperty(K30,"Nuid",{enumerable:!0,get:function(){return p7$.Nuid}});Object.defineProperty(K30,"nuid",{enumerable:!0,get:function(){return p7$.nuid}})});var pD=b((n7$)=>{Object.defineProperty(n7$,"__esModule",{value:!0});n7$.DEFAULT_HOST=n7$.DEFAULT_PORT=n7$.Match=void 0;n7$.syncIterator=IW4;n7$.createInbox=VW4;var qW4=W30(),MW4=qG();n7$.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function IW4($){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 MW4.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${qW4.nuid.next()}`}n7$.DEFAULT_PORT=4222;n7$.DEFAULT_HOST="127.0.0.1"});var la=b((r7$)=>{Object.defineProperty(r7$,"__esModule",{value:!0});r7$.DataBuffer=void 0;var o7$=RG();class a7${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 o7$.TE.encode($)}static toAscii($){return o7$.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}}r7$.DataBuffer=a7$});var $T=b(($Q$)=>{Object.defineProperty($Q$,"__esModule",{value:!0});$Q$.LF=$Q$.CR=$Q$.CRLF=$Q$.CR_LF_LEN=$Q$.CR_LF=void 0;$Q$.setTransportFactory=bW4;$Q$.defaultPort=yW4;$Q$.getUrlParseFn=gW4;$Q$.newTransport=hW4;$Q$.getResolveFn=uW4;$Q$.protoLen=e7$;$Q$.extractProtocolMessage=lW4;var vW4=RG(),xW4=pD(),fW4=la(),MG;function bW4($){MG=$}function yW4(){return MG!==void 0&&MG.defaultPort!==void 0?MG.defaultPort:xW4.DEFAULT_PORT}function gW4(){return MG!==void 0&&MG.urlParseFn?MG.urlParseFn:void 0}function hW4(){if(!MG||typeof MG.factory!=="function")throw Error("transport fn is not set");return MG.factory()}function uW4(){return MG!==void 0&&MG.dnsResolveFn?MG.dnsResolveFn:void 0}$Q$.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 t34($){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 ga(Number(Y)+1):await ga(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await oG0({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});ba();let F=n34(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)r01(N.stdout),r01(N.stderr);ya(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(),oJ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var e01=L(()=>{p01();aP();a01()});var sG0;var $11=L(()=>{sG0={name:"decocms",version:"4.390.4",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 a34,Text as $7$}from"ink";import{jsx as r34,jsxs as Z7$}from"react/jsx-runtime";function Q7$({version:$}){return Z7$(a34,{flexDirection:"column",marginTop:1,children:[EG0.map((Z,Q)=>r34($7$,{color:zG0[Q],children:Z},Q)),Z7$($7$,{dimColor:!0,children:[" v",$]})]})}var X7$=L(()=>{za()});import{Box as rP,Text as mD}from"ink";import{Spinner as s34}from"@inkjs/ui";import{jsx as AG,jsxs as Jl}from"react/jsx-runtime";function Y7$({status:$}){if($==="pending")return AG(s34,{label:""});return AG(mD,{color:"green",children:"\u2713"})}function e34($){return`${$.name}: ${$.port||"...."}`}function J7$({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Jl(rP,{flexDirection:"column",paddingBottom:1,children:[AG(Q7$,{version:sG0.version}),AG(rP,{marginBottom:1,children:AG(mD,{dimColor:!0,children:"\u2500".repeat(80)})}),AG(rP,{children:Jl(mD,{dimColor:!0,children:["Home: ",Q]})}),Jl(rP,{gap:2,children:[$.map((Y)=>Jl(rP,{gap:1,children:[AG(mD,{children:e34(Y)}),AG(Y7$,{status:Y.status})]},Y.name)),Jl(rP,{gap:1,children:[AG(mD,{children:"Migrations"}),AG(Y7$,{status:Z})]})]}),AG(rP,{children:X?Jl(mD,{children:["Open in browser: ",AG(mD,{color:"cyan",children:X})]}):AG(mD,{dimColor:!0,children:"Starting..."})})]})}var G7$=L(()=>{$11();X7$()});import{Box as $K4,Text as ha}from"ink";import{jsx as Z11,jsxs as Q11}from"react/jsx-runtime";function ZK4($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function K7$({logs:$}){return Z11($K4,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return Z11(ha,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Q11(ha,{children:[Q11(ha,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Z11(ha,{color:ZK4(Z.status),children:Z.status}),Q11(ha,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var W7$=()=>{};var X11={};W0(X11,{App:()=>YK4});import{Box as QK4}from"ink";import{useSyncExternalStore as XK4}from"react";import{jsx as H7$,jsxs as JK4}from"react/jsx-runtime";function YK4({home:$}){let Z=XK4(o01,t01);return JK4(QK4,{flexDirection:"column",children:[H7$(J7$,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),H7$(K7$,{logs:Z.logs})]})}var Y11=L(()=>{G7$();W7$();aP()});var $K="thread-gate",qB="decopilot-hosted-harness",MB="decopilot-hosted-harness-sandboxed",ZK="automations",dD="background-tools",sP="task-board-github-reads";var F7$="13";function U7$($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:F7$,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var N7$=()=>{};import GK4 from"pg";async function L7$($,Z){let{databaseUrl:Q,lockTimeoutMs:X=KK4}=$,Y=$.log??((W)=>console.log(W)),J=new GK4.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",[B7$.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$(WK4)}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)",[B7$.toString()])}catch{}await J.end().catch(()=>{})}}var B7$=8314027461559302n,KK4=600000,WK4=500;var O7$=L(()=>{w8()});function HK4(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function J11($,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 D7$(){let $=HK4();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:J11($,"--cpu-prof-dir")??process.cwd(),name:J11($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(J11($,"--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 w7$(){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(()=>{}),eG0=setInterval(()=>void Z().catch(()=>{}),$),eG0.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(eG0)clearInterval(eG0)}}var eG0;var j7$=()=>{};import*as FK4 from"bun:jsc";function E7$(){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{UK4()}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=NK4()?.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 UK4,NK4;var z7$=L(()=>{({startSamplingProfiler:UK4,samplingProfilerStackTraces:NK4}=FK4)});function P7$(){D7$();let $=[w7$(),Y4$(),E7$()];return()=>{for(let Z of $)Z()}}var T7$=L(()=>{oo0();j7$();z7$()});var eP=b((A7$)=>{Object.defineProperty(A7$,"__esModule",{value:!0});A7$.RepublishHeaders=A7$.DirectMsgHeaders=A7$.JsHeaders=A7$.AdvisoryKind=void 0;A7$.isOrderedPushConsumerOptions=BK4;A7$.isPullConsumer=LK4;A7$.isPushConsumer=OK4;A7$.isBoundPushConsumerOptions=DK4;function BK4($){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 LK4($){return $.isPullConsumer()}function OK4($){return $.isPushConsumer()}function DK4($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}A7$.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"};A7$.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"};A7$.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};A7$.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var RG=b((q7$)=>{Object.defineProperty(q7$,"__esModule",{value:!0});q7$.TD=q7$.TE=q7$.Empty=void 0;q7$.encode=qK4;q7$.decode=MK4;q7$.Empty=new Uint8Array(0);q7$.TE=new TextEncoder;q7$.TD=new TextDecoder;function RK4(...$){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 qK4(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(q7$.TE.encode($[Q]));if(Z.length===0)return q7$.Empty;if(Z.length===1)return Z[0];return RK4(...Z)}function MK4($){if(!$||$.length===0)return"";return q7$.TD.decode($)}});var qG=b((V7$)=>{Object.defineProperty(V7$,"__esModule",{value:!0});V7$.errors=V7$.PermissionViolationError=V7$.NoRespondersError=V7$.TimeoutError=V7$.RequestError=V7$.ProtocolError=V7$.ConnectionError=V7$.DrainingConnectionError=V7$.ClosedConnectionError=V7$.AuthorizationError=V7$.UserAuthenticationExpiredError=V7$.InvalidOperationError=V7$.InvalidArgumentError=V7$.InvalidSubjectError=void 0;class K11 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}V7$.InvalidSubjectError=K11;class $30 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 $30(`${$} ${Z}`,Q)}}V7$.InvalidArgumentError=$30;class W11 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}V7$.InvalidOperationError=W11;class Z30 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new Z30($);return null}}V7$.UserAuthenticationExpiredError=Z30;class Q30 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 Q30($);return null}}V7$.AuthorizationError=Q30;class H11 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}V7$.ClosedConnectionError=H11;class F11 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}V7$.DrainingConnectionError=F11;class U11 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}V7$.ConnectionError=U11;class N11 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}V7$.ProtocolError=N11;class B11 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof X30}}V7$.RequestError=B11;class L11 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}V7$.TimeoutError=L11;class X30 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}V7$.NoRespondersError=X30;class Y30 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 Y30($,Q,X,Y)}}V7$.PermissionViolationError=Y30;V7$.errors={AuthorizationError:Q30,ClosedConnectionError:H11,ConnectionError:U11,DrainingConnectionError:F11,InvalidArgumentError:$30,InvalidOperationError:W11,InvalidSubjectError:K11,NoRespondersError:X30,PermissionViolationError:Y30,ProtocolError:N11,RequestError:B11,TimeoutError:L11,UserAuthenticationExpiredError:Z30}});var yW=b((v7$)=>{Object.defineProperty(v7$,"__esModule",{value:!0});v7$.SimpleMutex=v7$.Perf=void 0;v7$.extend=mK4;v7$.render=dK4;v7$.timeout=iK4;v7$.delay=pK4;v7$.deadline=nK4;v7$.deferred=D11;v7$.debugDeferred=tK4;v7$.shuffle=oK4;v7$.collect=aK4;v7$.jitter=_7$;v7$.backoff=rK4;v7$.nanos=sK4;v7$.millis=eK4;v7$.randomToken=QW4;var cK4=RG(),O11=qG();function mK4($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function dK4($){return cK4.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function iK4($,Z=!0){let Q=Z?new O11.TimeoutError:null,X,Y,J=new Promise((G,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new O11.TimeoutError);else K(Q)},$)});return Object.assign(J,X)}function pK4($=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 nK4($,Z=1000){let Q=D11(),X=setTimeout(()=>{Q.reject(new O11.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function D11(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function tK4(){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 oK4($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function aK4($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class S7${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})}),$}}v7$.Perf=S7$;class C7${max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=D11();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}v7$.SimpleMutex=C7$;function _7$($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function rK4($=[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 _7$(Q>Z?$[Z]:$[Q])}}}function sK4($){return $*1e6}function eK4($){return Math.floor($/1e6)}var $W4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",IB=new Uint8Array(62);for(let $=0;$<62;$++)IB[$]=$W4.charCodeAt($);var ZW4=218340105584896;function QW4(){let $=Math.floor(Math.random()*ZW4),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 l7$=b((h7$)=>{Object.defineProperty(h7$,"__esModule",{value:!0});h7$.nuid=h7$.NuidImpl=void 0;var jW4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",iD=62,G30=12,y7$=10,f7$=33,EW4=333,b7$=G30+y7$,j11=new Uint8Array(iD);for(let $=0;$<iD;$++)j11[$]=jW4.charCodeAt($);var J30=4294967296,g7$=BigInt(iD)**BigInt(y7$),ua=Number(g7$/(1n<<32n)),w11=Number(g7$%(1n<<32n));function zW4($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function PW4($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else zW4($)}class E11{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(b7$),this.cbuf=new Uint8Array(G30),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(ua+1)),this.seqLo=Math.floor(Math.random()*J30);while($++<8&&this.seqHi===ua&&this.seqLo>=w11);if(this.seqHi===ua&&this.seqLo>=w11)this.seqLo=0;this.inc=Math.random()*(EW4-f7$)+f7$|0}setPre(){PW4(this.cbuf);for(let $=0;$<G30;$++)this.buf[$]=j11[this.cbuf[$]%iD]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=b7$-1;Q>=G30;Q--){let X=Math.floor($/iD),J=($-X*iD)*J30+Z,G=Math.floor(J/iD),K=J-G*iD;this.buf[Q]=j11[K],$=X,Z=G}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=J30)this.seqLo-=J30,this.seqHi+=1;if(this.seqHi>ua||this.seqHi===ua&&this.seqLo>=w11)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()}}h7$.NuidImpl=E11;h7$.nuid=new E11});var i7$=b((m7$)=>{Object.defineProperty(m7$,"__esModule",{value:!0});m7$.nuid=m7$.Nuid=void 0;var c7$=l7$();m7$.Nuid=c7$.NuidImpl;m7$.nuid=c7$.nuid});var W30=b((K30)=>{Object.defineProperty(K30,"__esModule",{value:!0});K30.nuid=K30.Nuid=void 0;var p7$=i7$();Object.defineProperty(K30,"Nuid",{enumerable:!0,get:function(){return p7$.Nuid}});Object.defineProperty(K30,"nuid",{enumerable:!0,get:function(){return p7$.nuid}})});var pD=b((n7$)=>{Object.defineProperty(n7$,"__esModule",{value:!0});n7$.DEFAULT_HOST=n7$.DEFAULT_PORT=n7$.Match=void 0;n7$.syncIterator=IW4;n7$.createInbox=VW4;var qW4=W30(),MW4=qG();n7$.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function IW4($){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 MW4.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${qW4.nuid.next()}`}n7$.DEFAULT_PORT=4222;n7$.DEFAULT_HOST="127.0.0.1"});var la=b((r7$)=>{Object.defineProperty(r7$,"__esModule",{value:!0});r7$.DataBuffer=void 0;var o7$=RG();class a7${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 o7$.TE.encode($)}static toAscii($){return o7$.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}}r7$.DataBuffer=a7$});var $T=b(($Q$)=>{Object.defineProperty($Q$,"__esModule",{value:!0});$Q$.LF=$Q$.CR=$Q$.CRLF=$Q$.CR_LF_LEN=$Q$.CR_LF=void 0;$Q$.setTransportFactory=bW4;$Q$.defaultPort=yW4;$Q$.getUrlParseFn=gW4;$Q$.newTransport=hW4;$Q$.getResolveFn=uW4;$Q$.protoLen=e7$;$Q$.extractProtocolMessage=lW4;var vW4=RG(),xW4=pD(),fW4=la(),MG;function bW4($){MG=$}function yW4(){return MG!==void 0&&MG.defaultPort!==void 0?MG.defaultPort:xW4.DEFAULT_PORT}function gW4(){return MG!==void 0&&MG.urlParseFn?MG.urlParseFn:void 0}function hW4(){if(!MG||typeof MG.factory!=="function")throw Error("transport fn is not set");return MG.factory()}function uW4(){return MG!==void 0&&MG.dnsResolveFn?MG.dnsResolveFn:void 0}$Q$.CR_LF=`\r
2109
2109
  `;$Q$.CR_LF_LEN=$Q$.CR_LF.length;$Q$.CRLF=fW4.DataBuffer.fromAscii($Q$.CR_LF);$Q$.CR=new Uint8Array($Q$.CRLF)[0];$Q$.LF=new Uint8Array($Q$.CRLF)[1];function e7$($){for(let Z=0;Z<$.length;Z++){let Q=Z+1;if($.byteLength>Q&&$[Z]===$Q$.CR&&$[Q]===$Q$.LF)return Q+1}return 0}function lW4($){let Z=e7$($);if(Z>0){let X=new Uint8Array($).slice(0,Z);return vW4.TD.decode(X)}return""}});var R11=b((WQ$)=>{Object.defineProperty(WQ$,"__esModule",{value:!0});WQ$.ipV4=JQ$;WQ$.isIP=sW4;WQ$.parseIP=GQ$;var ca=4,ZT=16,H30=48,YQ$=57,QQ$=65,aW4=70,XQ$=97,rW4=102,A11=16777215;function JQ$($,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 sW4($){return GQ$($)!==void 0}function GQ$($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return KQ$($);case":":return eW4($)}return}function KQ$($){let Z=new Uint8Array(ca);for(let Q=0;Q<ca;Q++){if($.length===0)return;if(Q>0){if($[0]!==".")return;$=$.substring(1)}let{n:X,c:Y,ok:J}=$H4($);if(!J||X>255)return;$=$.substring(Y),Z[Q]=X}return JQ$(Z[0],Z[1],Z[2],Z[3])}function eW4($){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}=ZH4($);if(!G||Y>65535)return;if(J<$.length&&$[J]==="."){if(Q<0&&X!=ZT-ca)return;if(X+ca>ZT)return;let K=KQ$($);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+=ca;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 $H4($){let Z=0,Q=0;for(Z=0;Z<$.length&&H30<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=YQ$;Z++)if(Q=Q*10+($.charCodeAt(Z)-H30),Q>=A11)return{n:A11,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:Q,c:Z,ok:!0}}function ZH4($){let Z=0,Q=0;for(Q=0;Q<$.length;Q++){if(H30<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=YQ$)Z*=16,Z+=$.charCodeAt(Q)-H30;else if(XQ$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=rW4)Z*=16,Z+=$.charCodeAt(Q)-XQ$+10;else if(QQ$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=aW4)Z*=16,Z+=$.charCodeAt(Q)-QQ$+10;else break;if(Z>=A11)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 S11=b((FQ$)=>{Object.defineProperty(FQ$,"__esModule",{value:!0});FQ$.Servers=FQ$.ServerImpl=void 0;FQ$.isIPV4OrHostname=HQ$;FQ$.hostPort=k11;var q11=$T(),M11=yW(),I11=R11(),JH4=pD(),GH4=qG();function HQ$($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function V11($){return!HQ$($)}function KH4($){let Q=$.toUpperCase().indexOf("::FFFF:");if(Q!==-1&&$.indexOf(".")!==-1){let X=$.substring(Q+7);return X=X.replace("[",""),X.replace("]","")}return $}function k11($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=KH4($),V11($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=V11($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),Q=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):JH4.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 Gl{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let Q=k11($);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,I11.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}://${V11(X)?"["+X+"]":X}`);J.port=`${this.port}`;let G=new Gl(J.host,!1);G.tlsName=this.hostname,Z.push(G)}}if($.randomize)(0,M11.shuffle)(Z);return this.resolves=Z,Z}}FQ$.ServerImpl=Gl;class F30{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw GH4.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,q11.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}=k11(Y),G=Q.get(J);if(G)G.gossiped=!1,X.push(G);else X.push(new Gl(Y))}if(this.randomize)(0,M11.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,I11.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,q11.getUrlParseFn)();$=Q?Q($):$;let X=new Gl($,Z);if((0,I11.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 F30.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return F30.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,q11.getUrlParseFn)(),J=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new Gl(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,M11.shuffle)(W),this.servers=K?[K,...W]:W}return{added:Q,deleted:X}}}FQ$.Servers=F30});var U30=b((LQ$)=>{Object.defineProperty(LQ$,"__esModule",{value:!0});LQ$.QueuedIteratorImpl=void 0;var C11=yW(),NQ$=qG();class BQ${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,C11.deferred)(),this.yields=[],this.iterClosed=(0,C11.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 NQ$.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new NQ$.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,C11.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}}LQ$.QueuedIteratorImpl=BQ$});var _11=b((jQ$)=>{Object.defineProperty(jQ$,"__esModule",{value:!0});jQ$.MuxSubscription=void 0;var UH4=pD(),DQ$=qG();class wQ${baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,UH4.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 DQ$.NoRespondersError(X.requestSubject):null;X.resolver($,Z)}}}}close(){let $=new DQ$.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}jQ$.MuxSubscription=wQ$});var v11=b((PQ$)=>{Object.defineProperty(PQ$,"__esModule",{value:!0});PQ$.Heartbeat=void 0;var NH4=yW();class zQ${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,NH4.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})}}PQ$.Heartbeat=zQ$});var b11=b((MQ$)=>{Object.defineProperty(MQ$,"__esModule",{value:!0});MQ$.DenoBuffer=MQ$.MAX_SIZE=MQ$.AssertionError=void 0;MQ$.assert=RQ$;MQ$.concat=qQ$;MQ$.append=LH4;MQ$.readAll=OH4;MQ$.writeAll=DH4;var BH4=RG();class x11 extends Error{constructor($){super($);this.name="AssertionError"}}MQ$.AssertionError=x11;function RQ$($,Z="Assertion failed."){if(!$)throw new x11(Z)}var AQ$=32768;MQ$.MAX_SIZE=4294967294;function N30($,Z,Q=0){let X=Z.byteLength-Q;if($.byteLength>X)$=$.subarray(0,X);return Z.set($,Q),$.byteLength}function qQ$($,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 LH4($,Z){return qQ$($,Uint8Array.of(Z))}class f11{_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($){RQ$($<=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=N30(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(BH4.TE.encode($))}write($){let Z=this._grow($.byteLength);return N30($,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)N30(this._buf.subarray(this._off),this._buf);else if(X+$>MQ$.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*X+$,MQ$.MAX_SIZE));N30(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,MQ$.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(AQ$);while(!0){let X=this.capacity-this.length<AQ$,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}}}MQ$.DenoBuffer=f11;function OH4($){let Z=new f11;return Z.readFrom($),Z.bytes()}function DH4($,Z){let Q=0;while(Q<Z.length)Q+=$.write(Z.subarray(Q))}});var h11=b((CQ$)=>{Object.defineProperty(CQ$,"__esModule",{value:!0});CQ$.cc=CQ$.State=CQ$.Parser=CQ$.Kind=void 0;CQ$.describe=AH4;var y11=b11(),g11=RG();CQ$.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function AH4($){let Z,Q="";switch($.kind){case CQ$.Kind.MSG:Z="MSG";break;case CQ$.Kind.OK:Z="OK";break;case CQ$.Kind.ERR:Z="ERR",Q=g11.TD.decode($.data);break;case CQ$.Kind.PING:Z="PING";break;case CQ$.Kind.PONG:Z="PONG";break;case CQ$.Kind.INFO:Z="INFO",Q=g11.TD.decode($.data)}return`${Z}: ${Q}`}function VQ$(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var kQ$=48,RH4=57,Kl=67108864;class SQ${dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=CQ$.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 CQ$.State.OP_START:switch(Q){case CQ$.cc.M:case CQ$.cc.m:this.state=CQ$.State.OP_M,this.hdr=-1,this.ma=VQ$();break;case CQ$.cc.H:case CQ$.cc.h:this.state=CQ$.State.OP_H,this.hdr=0,this.ma=VQ$();break;case CQ$.cc.P:case CQ$.cc.p:this.state=CQ$.State.OP_P;break;case CQ$.cc.PLUS:this.state=CQ$.State.OP_PLUS;break;case CQ$.cc.MINUS:this.state=CQ$.State.OP_MINUS;break;case CQ$.cc.I:case CQ$.cc.i:this.state=CQ$.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_H:switch(Q){case CQ$.cc.M:case CQ$.cc.m:this.state=CQ$.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_M:switch(Q){case CQ$.cc.S:case CQ$.cc.s:this.state=CQ$.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_MS:switch(Q){case CQ$.cc.G:case CQ$.cc.g:this.state=CQ$.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_MSG:switch(Q){case CQ$.cc.SPACE:case CQ$.cc.TAB:this.state=CQ$.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_MSG_SPC:switch(Q){case CQ$.cc.SPACE:case CQ$.cc.TAB:continue;default:this.state=CQ$.State.MSG_ARG,this.as=Z}break;case CQ$.State.MSG_ARG:switch(Q){case CQ$.cc.CR:this.drop=1;break;case CQ$.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=CQ$.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;case CQ$.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let X=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:CQ$.Kind.MSG,msg:this.ma,data:X}),this.argBuf=void 0,this.msgBuf=void 0,this.state=CQ$.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:CQ$.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=CQ$.State.MSG_END;break;case CQ$.State.MSG_END:switch(Q){case CQ$.cc.NL:this.drop=0,this.as=Z+1,this.state=CQ$.State.OP_START;break;default:continue}break;case CQ$.State.OP_PLUS:switch(Q){case CQ$.cc.O:case CQ$.cc.o:this.state=CQ$.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_PLUS_O:switch(Q){case CQ$.cc.K:case CQ$.cc.k:this.state=CQ$.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_PLUS_OK:switch(Q){case CQ$.cc.NL:this.dispatcher.push({kind:CQ$.Kind.OK}),this.drop=0,this.state=CQ$.State.OP_START;break}break;case CQ$.State.OP_MINUS:switch(Q){case CQ$.cc.E:case CQ$.cc.e:this.state=CQ$.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_MINUS_E:switch(Q){case CQ$.cc.R:case CQ$.cc.r:this.state=CQ$.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_MINUS_ER:switch(Q){case CQ$.cc.R:case CQ$.cc.r:this.state=CQ$.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_MINUS_ERR:switch(Q){case CQ$.cc.SPACE:case CQ$.cc.TAB:this.state=CQ$.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_MINUS_ERR_SPC:switch(Q){case CQ$.cc.SPACE:case CQ$.cc.TAB:continue;default:this.state=CQ$.State.MINUS_ERR_ARG,this.as=Z}break;case CQ$.State.MINUS_ERR_ARG:switch(Q){case CQ$.cc.CR:this.drop=1;break;case CQ$.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:CQ$.Kind.ERR,data:X}),this.drop=0,this.as=Z+1,this.state=CQ$.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(Q))}break;case CQ$.State.OP_P:switch(Q){case CQ$.cc.I:case CQ$.cc.i:this.state=CQ$.State.OP_PI;break;case CQ$.cc.O:case CQ$.cc.o:this.state=CQ$.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_PO:switch(Q){case CQ$.cc.N:case CQ$.cc.n:this.state=CQ$.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_PON:switch(Q){case CQ$.cc.G:case CQ$.cc.g:this.state=CQ$.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_PONG:switch(Q){case CQ$.cc.NL:this.dispatcher.push({kind:CQ$.Kind.PONG}),this.drop=0,this.state=CQ$.State.OP_START;break}break;case CQ$.State.OP_PI:switch(Q){case CQ$.cc.N:case CQ$.cc.n:this.state=CQ$.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_PIN:switch(Q){case CQ$.cc.G:case CQ$.cc.g:this.state=CQ$.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_PING:switch(Q){case CQ$.cc.NL:this.dispatcher.push({kind:CQ$.Kind.PING}),this.drop=0,this.state=CQ$.State.OP_START;break}break;case CQ$.State.OP_I:switch(Q){case CQ$.cc.N:case CQ$.cc.n:this.state=CQ$.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_IN:switch(Q){case CQ$.cc.F:case CQ$.cc.f:this.state=CQ$.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_INF:switch(Q){case CQ$.cc.O:case CQ$.cc.o:this.state=CQ$.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_INFO:switch(Q){case CQ$.cc.SPACE:case CQ$.cc.TAB:this.state=CQ$.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case CQ$.State.OP_INFO_SPC:switch(Q){case CQ$.cc.SPACE:case CQ$.cc.TAB:continue;default:this.state=CQ$.State.INFO_ARG,this.as=Z}break;case CQ$.State.INFO_ARG:switch(Q){case CQ$.cc.CR:this.drop=1;break;case CQ$.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:CQ$.Kind.INFO,data:X}),this.drop=0,this.as=Z+1,this.state=CQ$.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;default:throw this.fail($.subarray(Z))}}if((this.state===CQ$.State.MSG_ARG||this.state===CQ$.State.MINUS_ERR_ARG||this.state===CQ$.State.INFO_ARG)&&!this.argBuf)this.argBuf=new y11.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===CQ$.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new y11.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 y11.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 CQ$.cc.SPACE:case CQ$.cc.TAB:case CQ$.cc.CR:case CQ$.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],Kl);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],Kl);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}: ${g11.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case CQ$.cc.SPACE:case CQ$.cc.TAB:case CQ$.cc.CR:case CQ$.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],Kl),this.ma.size=this.protoParseInt(Z[3],Kl);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],Kl),this.ma.size=this.protoParseInt(Z[4],Kl);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]<kQ$||$[X]>RH4)return-1;Q=Q*10+($[X]-kQ$)}return Z!==void 0&&Q>Z?-1:Q}}CQ$.Parser=SQ$;CQ$.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};CQ$.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 O30=b((vQ$)=>{Object.defineProperty(vQ$,"__esModule",{value:!0});vQ$.MsgHdrsImpl=void 0;vQ$.canonicalMIMEHeaderKey=l11;vQ$.headers=IH4;var _Q$=RG(),gW=pD(),L30=qG();function l11($){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 L30.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 IH4($=0,Z=""){if($===0&&Z!=="")throw L30.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw L30.InvalidArgumentError.format("description","is required");return new Wl($,Z)}var u11="NATS/1.0";class Wl{_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 Wl,X=_Q$.TD.decode($).split(`\r
2110
2110
  `),Y=X[0];if(Y!==u11){let J=Y.replace(u11,"").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 $=u11;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