decocms 4.191.0 → 4.191.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BsTMg_mO.js → AlertCircle-gXXi16HE.js} +1 -1
- package/dist/client/assets/{AreaChart-DRiknJMD.js → AreaChart-DBA2ABIc.js} +1 -1
- package/dist/client/assets/{ArrowUp-Dp4whRay.js → ArrowUp-BdeNepSu.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DVSp3eEa.js → ArrowUpRight-BBiSl5Oq.js} +1 -1
- package/dist/client/assets/{Check-CLOVT2mu.js → Check-CudRtq4o.js} +1 -1
- package/dist/client/assets/{CheckCircle-MD17N35-.js → CheckCircle-BTC25cRA.js} +1 -1
- package/dist/client/assets/{ChevronDown-3N18EpT4.js → ChevronDown-BCh6IzYA.js} +1 -1
- package/dist/client/assets/{ChevronRight-BnbugLgv.js → ChevronRight-Df6auvwl.js} +1 -1
- package/dist/client/assets/{ChevronUp-BFObbj62.js → ChevronUp-CPhPjSbb.js} +1 -1
- package/dist/client/assets/{Copy01-B2BY13GN.js → Copy01-Bm2bejC7.js} +1 -1
- package/dist/client/assets/{CpuChip01-DST7hLjn.js → CpuChip01-jhdATxgf.js} +1 -1
- package/dist/client/assets/{CreditCard01-B5ruoxEK.js → CreditCard01-CYcemzQS.js} +1 -1
- package/dist/client/assets/{DotsVertical-CHWg5GBY.js → DotsVertical-HjAa7bLg.js} +1 -1
- package/dist/client/assets/{Eye-CPrDtwan.js → Eye-BWOy49D7.js} +1 -1
- package/dist/client/assets/{FilterLines-DF9vRnGK.js → FilterLines-DuuSfWre.js} +1 -1
- package/dist/client/assets/{HardDrive-Ctj5EbG3.js → HardDrive-dJoi_HOG.js} +1 -1
- package/dist/client/assets/{Key01--BR5BO-l.js → Key01-xKyixbrB.js} +1 -1
- package/dist/client/assets/{LayoutLeft-B6SxB5MY.js → LayoutLeft-CDfDr-3P.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BgU1Gqvu.js → LinkExternal01-BW7kmbZt.js} +1 -1
- package/dist/client/assets/{LogOut01-CoBAOa-l.js → LogOut01-CniTxeyO.js} +1 -1
- package/dist/client/assets/{Monitor01-DK9pEPjb.js → Monitor01-CsA6pkdS.js} +1 -1
- package/dist/client/assets/{Palette-CX3QD5u0.js → Palette-DLpZBdXp.js} +1 -1
- package/dist/client/assets/{Play-DHmoXCFk.js → Play-uOCL3unX.js} +1 -1
- package/dist/client/assets/{Plus-VGvDTgLu.js → Plus-Be0ecR8g.js} +1 -1
- package/dist/client/assets/{SearchLg-CxZuzWWx.js → SearchLg-CwPnP5iO.js} +1 -1
- package/dist/client/assets/{SearchMd-C2NE3rSW.js → SearchMd-DfuU36Fl.js} +1 -1
- package/dist/client/assets/{Settings02-C0sFEF7i.js → Settings02-D4mCcYjS.js} +1 -1
- package/dist/client/assets/{Shield01-DvtOXfTT.js → Shield01-DUHw-9h2.js} +1 -1
- package/dist/client/assets/{Star01-Btas0K2g.js → Star01-CbSptdea.js} +1 -1
- package/dist/client/assets/{Stars01-6gJW_3qP.js → Stars01-DdGVD-AD.js} +1 -1
- package/dist/client/assets/{Stars02-CHp54D4x.js → Stars02-CWbWYm12.js} +1 -1
- package/dist/client/assets/{Sun-PEMCeWQl.js → Sun-B43A91aD.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DglfqcBq.js → SwitchHorizontal01-DIAi741e.js} +1 -1
- package/dist/client/assets/{Tool01-CpYLmOX9.js → Tool01-CFA4lxvc.js} +1 -1
- package/dist/client/assets/{Tool02-BefNGDPA.js → Tool02-BLjMRn-B.js} +1 -1
- package/dist/client/assets/{Trash01-DcXN20ie.js → Trash01-Q1a4BD3I.js} +1 -1
- package/dist/client/assets/{TrendUp01-BrnjrQaT.js → TrendUp01-CxF3A-9S.js} +1 -1
- package/dist/client/assets/{Upload01-CEsJf4Cv.js → Upload01-DBAvH9az.js} +1 -1
- package/dist/client/assets/{User01-DOBVuWTU.js → User01-C8zC2Qbx.js} +1 -1
- package/dist/client/assets/{Users01-BQCAwQFK.js → Users01-DldkuE_8.js} +1 -1
- package/dist/client/assets/{Users03-pgGWgf4D.js → Users03-D0zBlRuz.js} +1 -1
- package/dist/client/assets/{X-xk16R3ws.js → X-Dvohw1UY.js} +1 -1
- package/dist/client/assets/{XCircle-Dlxz1V1Z.js → XCircle-CGl4pcGa.js} +1 -1
- package/dist/client/assets/{XClose-Da4RA_eJ.js → XClose-DTtlqU53.js} +1 -1
- package/dist/client/assets/{Zap-BibvLFf1.js → Zap-CNrUxT_b.js} +1 -1
- package/dist/client/assets/{ZapSquare-_zCESDxF.js → ZapSquare-Dvu3eFet.js} +1 -1
- package/dist/client/assets/{access-gate-BCIy4zB4.js → access-gate-ByxhwyYd.js} +1 -1
- package/dist/client/assets/{agent-icon-CqrsU3-8.js → agent-icon-DTefGUSj.js} +1 -1
- package/dist/client/assets/{agents-list-BW1LJ4pk.js → agents-list-Bl2DdJqn.js} +1 -1
- package/dist/client/assets/{ai-providers-BYEsET6u.js → ai-providers-CcMsJUd2.js} +1 -1
- package/dist/client/assets/{alert-Cj8ElObF.js → alert-BrAo0U7R.js} +1 -1
- package/dist/client/assets/{alert-dialog-BdJM8Sos.js → alert-dialog-DOozDcTb.js} +1 -1
- package/dist/client/assets/{app-editor-BR42hbfO.js → app-editor-DfxEjPnv.js} +1 -1
- package/dist/client/assets/{auth-B5gP7uRb.js → auth-CQbRa05u.js} +1 -1
- package/dist/client/assets/{auth-catchall-DBvWzvRF.js → auth-catchall-DF83Xovn.js} +1 -1
- package/dist/client/assets/{auth-entry-BfwlXTBY.js → auth-entry-CN-YOTqi.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DPBQEnNn.js → auth-split-layout-BIxIRwfL.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CtcCFsrP.js → authenticate-and-persist-oauth-CzURp2E8.js} +1 -1
- package/dist/client/assets/{automation-list-row-D9VZEXW3.js → automation-list-row-Bbk83muP.js} +1 -1
- package/dist/client/assets/{automation-runs-B210HHDr.js → automation-runs-DudLi_mS.js} +1 -1
- package/dist/client/assets/{automations-kzO_mvvH.js → automations-Dj-MIL9O.js} +1 -1
- package/dist/client/assets/{avatar-CtMwapQQ.js → avatar-CxPUovxT.js} +1 -1
- package/dist/client/assets/{badge-1HTbfgiS.js → badge-C3BH62bi.js} +1 -1
- package/dist/client/assets/{billing-CQHwUluF.js → billing-1YWpk8VJ.js} +1 -1
- package/dist/client/assets/{block-document-CqwvGbFl.js → block-document-BG_o2vjm.js} +1 -1
- package/dist/client/assets/{brand-context-BrkRNBFy.js → brand-context-BSwJi7fT.js} +1 -1
- package/dist/client/assets/{buckets-DgGkMLyh.js → buckets-3lZF6Nk4.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-B--oKlOx.js → bulk-category-panel-CQ3N5M9o.js} +1 -1
- package/dist/client/assets/{capability-load-error-BAhRy56J.js → capability-load-error-DF4YqRXF.js} +1 -1
- package/dist/client/assets/{card-Dc_3L0g6.js → card-JNB9JNR5.js} +1 -1
- package/dist/client/assets/{category-editor-CLBoJToC.js → category-editor-K50LNr0j.js} +1 -1
- package/dist/client/assets/{chat-context-DyDcVoVZ.js → chat-context-C35Dl0E7.js} +1 -1
- package/dist/client/assets/{checkbox-B8oe9iuP.js → checkbox-B_u2xsZc.js} +1 -1
- package/dist/client/assets/{cli-auth-success-B5YnG1VX.js → cli-auth-success-De7oPfvP.js} +1 -1
- package/dist/client/assets/{collection-detail-DiY9qkE7.js → collection-detail-yjx6x1pU.js} +1 -1
- package/dist/client/assets/{collection-display-button-Duc2qxP4.js → collection-display-button-DsheGIm7.js} +1 -1
- package/dist/client/assets/{collection-search--bk0-GKf.js → collection-search-BKEkNSUm.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B845B2Wt.js → collection-table-wrapper-DXb2BITb.js} +1 -1
- package/dist/client/assets/{collection-tabs-Cvjf-ShN.js → collection-tabs-BP1a3R6j.js} +1 -1
- package/dist/client/assets/{command-CnBeOs6q.js → command-DcO-h9xd.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BG9Y8xgk.js → commerce-onboarding-B6pMARoP.js} +1 -1
- package/dist/client/assets/{connect-CWuG158A.js → connect-DOtrjXZ2.js} +1 -1
- package/dist/client/assets/{connection-card-B2B8kgXU.js → connection-card-CRM0t8Ye.js} +1 -1
- package/dist/client/assets/{connection-detail-hBpFrM-l.js → connection-detail-Fpb9yb5y.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DjG6cd7j.js → connection-form-helpers-D9U-mr_a.js} +1 -1
- package/dist/client/assets/{connection-KLZ9uFLt.js → connection-yo5zVnYj.js} +1 -1
- package/dist/client/assets/{connections-l2_6_Cr_.js → connections-Dv3jj8CI.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-AYVGycUd.js → decopilot-sse-pool-BAn8oDWO.js} +1 -1
- package/dist/client/assets/{dialog-DNrF68nL.js → dialog-DY1c2mh2.js} +1 -1
- package/dist/client/assets/{domain-settings-BEijkQAd.js → domain-settings-DUsXouP0.js} +1 -1
- package/dist/client/assets/{drawer-Bo2Z3S6O.js → drawer-DRjYU5qs.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DMXPHn_q.js → dropdown-menu-BTYQG1AP.js} +1 -1
- package/dist/client/assets/{empty-state-CGP4vr8d.js → empty-state-DS6eC_TN.js} +1 -1
- package/dist/client/assets/{extract-connection-data-MkDuzeVx.js → extract-connection-data-Db_zvfFq.js} +1 -1
- package/dist/client/assets/{file-explorer-CqpQzyqz.js → file-explorer-ChThI4uM.js} +1 -1
- package/dist/client/assets/{form-DtUDcWoT.js → form-Cq4pA55c.js} +1 -1
- package/dist/client/assets/{general-DqYofAce.js → general-D0A6Eebr.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Bi-1tdqa.js → github-repo-picker-WYdPWtsY.js} +1 -1
- package/dist/client/assets/{hooks-vPOV4nWj.js → hooks-CS2rSe9i.js} +1 -1
- package/dist/client/assets/{index-DAd1rgfm.js → index-B1S3o90n.js} +1 -1
- package/dist/client/assets/{index-Cz6RvobK.js → index-BaZfthu4.js} +1 -1
- package/dist/client/assets/{index-Cat6MVmh.js → index-C79gb8TI.js} +1 -1
- package/dist/client/assets/{index-BrhBP-w6.js → index-CCZNLfaJ.js} +1 -1
- package/dist/client/assets/{index-BZGdCxug.js → index-CDH4_5_a.js} +1 -1
- package/dist/client/assets/{index-kGYKLf1V.js → index-Cm18aWCb.js} +1 -1
- package/dist/client/assets/{index-DR678kUd.js → index-DVDKFrpq.js} +1 -1
- package/dist/client/assets/{index-DJbhXAHc.js → index-D_Wv19BY.js} +3 -3
- package/dist/client/assets/{index-JI8ymajl.js → index-DrojPaMc.js} +5 -5
- package/dist/client/assets/{index-RMootzql.js → index-Dwo7u-9_.js} +1 -1
- package/dist/client/assets/{index-redirect-KmT0Rat7.js → index-redirect-aFzHlW4s.js} +1 -1
- package/dist/client/assets/{index-JDc3tFIZ.js → index-waZryMar.js} +1 -1
- package/dist/client/assets/{input-BMY3-B8L.js → input-C0AWNCXx.js} +1 -1
- package/dist/client/assets/{integration-icon-BOGN--MG.js → integration-icon-Df19jx_K.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CrkAzn6o.js → invite-member-dialog-np1XdkRq.js} +1 -1
- package/dist/client/assets/{label-DiRpsP_K.js → label-CidyQbjY.js} +1 -1
- package/dist/client/assets/{layout-Dyg_TxaW.js → layout-hqBOdhse.js} +1 -1
- package/dist/client/assets/{login-F4shDH1v.js → login-ussNy6hN.js} +1 -1
- package/dist/client/assets/{mcp-oauth-gnQpoN4F.js → mcp-oauth-931_sv50.js} +1 -1
- package/dist/client/assets/{members-CKu6XSMb.js → members-tisfa0Qb.js} +1 -1
- package/dist/client/assets/{monaco-editor-FeVCquWq.js → monaco-editor-XAgWBouN.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BMWcxe9W.js → monitoring-stats-row-C4bb_lHd.js} +1 -1
- package/dist/client/assets/{multi-select-CrKn32XK.js → multi-select-BeaAIXje.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dbye_HJ9.js → oauth-callback-CKtkDu-C.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CHhv1wKt.js → oauth-callback-ai-provider-BiPwJAOe.js} +1 -1
- package/dist/client/assets/{onboarding-CTPcZKMT.js → onboarding-8ziorKlj.js} +1 -1
- package/dist/client/assets/{org-layout-D2DVskQj.js → org-layout--9BWrhYH.js} +1 -1
- package/dist/client/assets/{organization-choice-DVuf11vf.js → organization-choice-4qSO88xj.js} +1 -1
- package/dist/client/assets/{orgs-q9BAn-AQ.js → orgs-BvBrYNwn.js} +1 -1
- package/dist/client/assets/{page-seo-form-CI7AOF84.js → page-seo-form-CEZfydcK.js} +1 -1
- package/dist/client/assets/{popover-CjmbxOXf.js → popover-C-NzAp7z.js} +1 -1
- package/dist/client/assets/{post-editor-Cq00nscR.js → post-editor-d5az3HV5.js} +1 -1
- package/dist/client/assets/{primitives-CtXapLfz.js → primitives-i_WKbhj-.js} +1 -1
- package/dist/client/assets/{profile-BAOrtvWe.js → profile-CWj4yzDd.js} +1 -1
- package/dist/client/assets/project-app-view-2OFPmu_w.js +1 -0
- package/dist/client/assets/record-editor-DmZbaAwu.js +1 -0
- package/dist/client/assets/{redirect-editor-DTHcy5ri.js → redirect-editor-DSg_Weh1.js} +1 -1
- package/dist/client/assets/registry-BOnddWPb.js +2 -0
- package/dist/client/assets/{registry-layout-YXlenhW6.js → registry-layout-CB3IK0ro.js} +1 -1
- package/dist/client/assets/{reports-6Ua9IWGM.js → reports-ovqRNoYr.js} +1 -1
- package/dist/client/assets/{require-capability-CA9_b8mk.js → require-capability-BMn-Z656.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CKpMC6lI.js → required-auth-layout-7f2FgWp7.js} +1 -1
- package/dist/client/assets/{reset-password-CK7Ve7vy.js → reset-password-BKbULSN0.js} +1 -1
- package/dist/client/assets/{roles-N_mRVgr2.js → roles-Bqcg1rO2.js} +1 -1
- package/dist/client/assets/{search-input-BCgNhbz6.js → search-input-CawcfY9G.js} +1 -1
- package/dist/client/assets/{secrets-Bi9cxtDE.js → secrets-DwcwwrQR.js} +1 -1
- package/dist/client/assets/{sections-editor-BT_adW_K.js → sections-editor-Qx_T3YIA.js} +1 -1
- package/dist/client/assets/{select-aMmaVH6I.js → select-cDHzBUxF.js} +1 -1
- package/dist/client/assets/{select-model-D72aiBZK.js → select-model-MzrLWKJc.js} +1 -1
- package/dist/client/assets/{self-tool-result-DxOgRTcI.js → self-tool-result-DBlzH-bt.js} +1 -1
- package/dist/client/assets/{seo-editor-CBp2vdl1.js → seo-editor-mDC9mSIL.js} +1 -1
- package/dist/client/assets/{settings-layout-Da4ZkwK-.js → settings-layout-BxBa_skt.js} +1 -1
- package/dist/client/assets/{settings-section-D5KUD_Ol.js → settings-section-Cypwf8EP.js} +1 -1
- package/dist/client/assets/{shell-controls-BI07PKAg.js → shell-controls-CmcoZn6O.js} +1 -1
- package/dist/client/assets/{shell-layout-BQP-ls1h.js → shell-layout-CpLOW-Yt.js} +1 -1
- package/dist/client/assets/{sidebar-DIlSjNlc.js → sidebar-BAw3f4ud.js} +1 -1
- package/dist/client/assets/{skeleton-Ck_nzZ0B.js → skeleton-BE-IOITA.js} +1 -1
- package/dist/client/assets/{spinner-ultkd13c.js → spinner-qScEUsr3.js} +1 -1
- package/dist/client/assets/{sso-C1RRSbWN.js → sso-ChkCSk8A.js} +1 -1
- package/dist/client/assets/{store-CvqiLA03.js → store-CWj4KLAN.js} +1 -1
- package/dist/client/assets/store-registry-CKtY2k7m.js +2 -0
- package/dist/client/assets/{studio-tools-g9l_Lako.js → studio-tools-Dk1OT6JH.js} +1 -1
- package/dist/client/assets/{switch-CucPRESb.js → switch-rmr8nktt.js} +1 -1
- package/dist/client/assets/{tab-id-DULre6_T.js → tab-id-BEtqk1xQ.js} +1 -1
- package/dist/client/assets/{table-BAk2BxjG.js → table-22PHZ4l5.js} +1 -1
- package/dist/client/assets/{tabs-CVOsztrV.js → tabs-Be0o6WQc.js} +1 -1
- package/dist/client/assets/{textarea-CBJF0EiA.js → textarea-DHzl-_9c.js} +1 -1
- package/dist/client/assets/{toggle-group-B56xrSD7.js → toggle-group-BW7Wu6Fd.js} +1 -1
- package/dist/client/assets/{toolbar-Bkh5CnuX.js → toolbar-92awaqVo.js} +1 -1
- package/dist/client/assets/{tooltip-CMP2kXO9.js → tooltip-DyJAY1Rm.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BExRCTAo.js → use-ai-providers-Qyr6Cre_.js} +1 -1
- package/dist/client/assets/{use-automations-D611gkF6.js → use-automations-0B99YQcb.js} +1 -1
- package/dist/client/assets/{use-autosave-BBeD9Tit.js → use-autosave-DFVy_-x6.js} +1 -1
- package/dist/client/assets/{use-capability-BtwKf6ag.js → use-capability-CAsuOLOY.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BIqsRxMQ.js → use-clock-tick-D0eZzT5S.js} +1 -1
- package/dist/client/assets/{use-connection-D6eu7Vlk.js → use-connection-D-kwDh51.js} +1 -1
- package/dist/client/assets/{use-copy-DK-PrADC.js → use-copy-Bb4rpNXv.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CH6uC_CB.js → use-create-virtual-mcp-BhmgnmHB.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BaF8IIs1.js → use-debounced-autosave-B3mbTFsO.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BD8kJOci.js → use-debounced-value-Dlc9u4kA.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CBk1ZDf3.js → use-deco-credits-flcnRczu.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Bm0ghwAr.js → use-decopilot-events-DimNNWFJ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CMNG0L4l.js → use-delete-connection-DObikMsN.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-G-Q99HIy.js → use-deployment-admin-D6HUsFd-.js} +1 -1
- package/dist/client/assets/{use-file-configs-CqTJHT57.js → use-file-configs-lz3Mc5JI.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-QShFZE1I.js → use-infinite-scroll-XCS5Af1U.js} +1 -1
- package/dist/client/assets/{use-join-requests-CG7Sf9Iz.js → use-join-requests-GYlo4LtU.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D_6qVJ-s.js → use-mcp-client-eCtggULi.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C2kk2bFT.js → use-mcp-tools-Cdnz8Pao.js} +1 -1
- package/dist/client/assets/{use-members-GJFqMc91.js → use-members-aTKLTk5x.js} +1 -1
- package/dist/client/assets/{use-mobile-CD5N_rFV.js → use-mobile-CGvg9ulC.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BdRntNgr.js → use-navigate-to-agent-CFVr-rON.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-uFU9d-No.js → use-open-billing-url-CdVDFj_S.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DM9PWdEG.js → use-org-auth-client-C0ClAL5a.js} +1 -1
- package/dist/client/assets/{use-org-sso-B6qbaFgg.js → use-org-sso-B-maktN3.js} +1 -1
- package/dist/client/assets/{use-organization-roles-WbNk9iGf.js → use-organization-roles-BDzsFT30.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BJj5N_fg.js → use-organization-settings-B5iWzChr.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DzfawIwa.js → use-registry-connections-BO7FFOce.js} +1 -1
- package/dist/client/assets/{use-secrets-DOG6C0ah.js → use-secrets-D-hbkD4k.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-NIxhkMvm.js → use-section-preview-base-BUFr2Cz0.js} +1 -1
- package/dist/client/assets/{use-status-sounds-B07RJTq3.js → use-status-sounds-B6iKDpVb.js} +1 -1
- package/dist/client/assets/{use-tags-BnOKnAng.js → use-tags-rdT89vaz.js} +1 -1
- package/dist/client/assets/{use-view-mode-BynvbNBt.js → use-view-mode-Cg4dHCpH.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BWlHECY3.js → use-virtual-mcp-C2YmEyJY.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-d2CY2Roh.js +1 -0
- package/dist/client/assets/{useRouterState-iqIHcrr_.js → useRouterState-BY6DdY7J.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B2jyuRF1.js +1 -0
- package/dist/client/assets/{users--0e4qDE5.js → users-DC5VjGj3.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bv3cUp8t.js → variant-calendar-D7AtzsnW.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-B9-cjjaO.js → view-mode-toggle-PujV2Z6c.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/project-app-view-Dx7BAsvk.js +0 -1
- package/dist/client/assets/record-editor-BxR0nX57.js +0 -1
- package/dist/client/assets/registry-D_OJ6D8F.js +0 -2
- package/dist/client/assets/store-registry-Caf7N0kt.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CnjXrtVN.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CeBo0y5-.js +0 -1
package/dist/server/cli.js
CHANGED
|
@@ -1310,7 +1310,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var Qc1=O(()=>{Tx()});f
|
|
|
1310
1310
|
`.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await af`
|
|
1311
1311
|
DELETE FROM kysely_migration WHERE name = ${X}
|
|
1312
1312
|
`.execute($)}}async function Ei1($){await Ou6($),await Lu6($);let Z=new Li1({db:$,provider:{getMigrations:()=>Promise.resolve(Al0)}}),{error:X,results:Q}=await Z.migrateToLatest(),Y=0;if(Q?.forEach((G)=>{if(G.status==="Success")Y++;else if(G.status==="Error")console.error(`Failed to execute migration "${G.migrationName}"`)}),X)throw console.error("Failed to migrate"),console.error(X),X;return Y}async function Du6($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await ag0();let G=X??H6(),J=async()=>{if(!Z&&!X)await Nw(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await Ei1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function Eu6(){let $=H6(),Z=new Li1({db:$.db,provider:{getMigrations:()=>Promise.resolve(Al0)}}),{error:X,results:Q}=await Z.migrateDown();if(Q?.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}"`)}),X)throw console.error("Failed to rollback migration"),console.error(X),X}var ji1=O(()=>{Oi1();sg0();n7()});async function h50($){let Z={...process.env},X=v00($,Z);console.log(yU1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?xl1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (r$0(),o$0)),{outputs:G,services:J}=await Y({home:X.settings.dataDir,externalDatabaseUrl:X.externalDatabaseUrl,externalNatsUrl:X.externalNatsUrl});if(!X.skipMigrations){let{migrateBetterAuth:W}=await Promise.resolve().then(() => (sg0(),bl1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (n7(),sc1)),{migrateToLatest:N}=await Promise.resolve().then(() => (ji1(),zi1)),U=H(G.databaseUrl);await N({keepOpen:!0,database:U,skipBetterAuth:!0})}let K={...X.settings,betterAuthSecret:Q,databaseUrl:G.databaseUrl,natsUrls:G.natsUrls,...G.s3?{s3Endpoint:G.s3.endpoint,s3Bucket:G.s3.bucket,s3AccessKeyId:G.s3.accessKeyId,s3SecretAccessKey:G.s3.secretAccessKey,s3ForcePathStyle:G.s3.forcePathStyle}:{},...G.natsTunnel?{natsPublicUrl:G.natsTunnel.publicUrl,natsAccountJwt:G.natsTunnel.accountJwt,natsAccountSigningKey:G.natsTunnel.accountSigningKey,natsOperatorJwt:G.natsTunnel.operatorJwt,natsTunnelPublicEnabled:!0,natsCredsPath:G.natsTunnel.credsPath}:{}};return Yc1(K),{settings:K,services:J.map((W)=>({name:W.name==="PostgreSQL"?"Postgres":W.name,port:W.port})),managedServiceNames:J.filter((W)=>W.owner==="managed").map((W)=>W.name)}}var Tl0=O(()=>{Tx();fl1();f8()});var Ti1={};w0(Ti1,{updateService:()=>dD,subscribeCliState:()=>ql0,setTuiConsoleIntercepted:()=>u50,setServerUrl:()=>Rm,setMigrationsDone:()=>Tm,setDevMode:()=>Pu6,resetCliStateForTests:()=>zu6,isTuiConsoleIntercepted:()=>c50,getCliState:()=>Il0,addLogEntry:()=>Ow});function Pi1(){return{services:[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}],migrationsStatus:"pending",serverUrl:null,logs:[]}}function zu6(){VQ=Pi1()}function ju6(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function Am(){for(let $ of Rl0)$()}function Il0(){return VQ}function ql0($){return Rl0.add($),()=>Rl0.delete($)}function dD($){VQ={...VQ,services:VQ.services.map((Z)=>Z.name===$.name?$:Z)},Am()}function Tm(){VQ={...VQ,migrationsStatus:"done"},Am()}function Rm($){VQ={...VQ,serverUrl:$},Am()}function Ow($){let Z=[...VQ.logs,$];VQ={...VQ,logs:Z.length>500?Z.slice(-500):Z},Am()}function Pu6(){VQ={...VQ,services:[...ju6(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},Am()}function u50($){Ai1=$}function c50(){return Ai1}var VQ,Rl0,Ai1=!1;var mD=O(()=>{VQ=Pi1();Rl0=new Set});import{createServer as Ri1}from"net";function Au6($){return new Promise((Z)=>{let X=Ri1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function Im($){if(await Au6($))return $;let Z=await new Promise((X,Q)=>{let Y=Ri1();Y.once("error",Q),Y.listen(0,"0.0.0.0",()=>{let G=Y.address(),J=typeof G==="object"&&G?G.port:0;Y.close(()=>X(J))})});return console.warn(`Port ${$} is in use, using port ${Z} instead.`),Z}var Ml0=()=>{};function qm($){return $.replace(/\x1b\[[0-9;]*m/g,"")}var kl0={};w0(kl0,{startDevServer:()=>Ru6});import{join as Tu6}from"path";function Ii1($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
|
|
1313
|
-
`);Q=G.pop()??"";for(let J of G){let K=qm(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;Ow({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}if(Q.trim()){let G=qm(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)Ow({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function Ru6($){let{baseUrl:Z,noTui:X}=$,Q=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=Q?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=Q?await Im(Number(Y)+1):await Im(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await h50({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)dD({name:L.name,status:"ready",port:L.port});Tm();let N=Tu6(import.meta.dir,"..","..","..","..",".."),U=X===!0,F=Bun.spawn(["bun","run","dev:servers"],{cwd:N,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:G,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.natsPublicUrl&&K.natsAccountJwt&&K.natsAccountSigningKey?{NATS_PUBLIC_URL:K.natsPublicUrl,NATS_ACCOUNT_JWT:K.natsAccountJwt,NATS_ACCOUNT_SIGNING_KEY:K.natsAccountSigningKey,NATS_OPERATOR_JWT:K.natsOperatorJwt??"",NATS_TUNNEL_PUBLIC_ENABLED:"true",...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)Ii1(F.stdout),Ii1(F.stderr);Rm(G),dD({name:"Vite",status:"ready",port:Number(Y)}),dD({name:"API",status:"ready",port:Number(K.port)});let B=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (r$0(),o$0));await D(K.dataDir)}};return process.on("SIGINT",()=>B("SIGINT")),process.on("SIGTERM",()=>B("SIGTERM")),{port:Number(Y),process:F}}var Vl0=O(()=>{Tl0();mD();Ml0()});var l50;var Sl0=O(()=>{l50={name:"decocms",version:"4.191.0",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.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":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@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":"^2.9.1","@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":"^3.0.10","@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","@nats-io/jwt":"0.0.10-5","@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:"^6.0.208","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 qu6,Text as qi1}from"ink";import{jsx as Mu6,jsxs as Mi1}from"react/jsx-runtime";function ki1({version:$}){return Mi1(qu6,{flexDirection:"column",marginTop:1,children:[D50.map((Z,X)=>Mu6(qi1,{color:E50[X],children:Z},X)),Mi1(qi1,{dimColor:!0,children:[" v",$]})]})}var Vi1=O(()=>{Um()});import{Box as iD,Text as Lw}from"ink";import{Spinner as ku6}from"@inkjs/ui";import{jsx as bY,jsxs as sf}from"react/jsx-runtime";function Si1({status:$}){if($==="pending")return bY(ku6,{label:""});return bY(Lw,{color:"green",children:"\u2713"})}function Vu6($){return`${$.name}: ${$.port||"...."}`}function Ci1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return sf(iD,{flexDirection:"column",paddingBottom:1,children:[bY(ki1,{version:l50.version}),bY(iD,{marginBottom:1,children:bY(Lw,{dimColor:!0,children:"\u2500".repeat(80)})}),bY(iD,{children:sf(Lw,{dimColor:!0,children:["Home: ",X]})}),sf(iD,{gap:2,children:[$.map((Y)=>sf(iD,{gap:1,children:[bY(Lw,{children:Vu6(Y)}),bY(Si1,{status:Y.status})]},Y.name)),sf(iD,{gap:1,children:[bY(Lw,{children:"Migrations"}),bY(Si1,{status:Z})]})]}),bY(iD,{children:Q?sf(Lw,{children:["Open in browser: ",bY(Lw,{color:"cyan",children:Q})]}):bY(Lw,{dimColor:!0,children:"Starting..."})})]})}var _i1=O(()=>{Sl0();Vi1()});import{Box as Su6,Text as Mm}from"ink";import{jsx as Cl0,jsxs as _l0}from"react/jsx-runtime";function Cu6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function vi1({logs:$}){return Cl0(Su6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Cl0(Mm,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return _l0(Mm,{children:[_l0(Mm,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Cl0(Mm,{color:Cu6(Z.status),children:Z.status}),_l0(Mm,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var xi1=()=>{};var vl0={};w0(vl0,{App:()=>xu6});import{Box as _u6}from"ink";import{useSyncExternalStore as vu6}from"react";import{jsx as fi1,jsxs as fu6}from"react/jsx-runtime";function xu6({home:$}){let Z=vu6(ql0,Il0);return fu6(_u6,{flexDirection:"column",children:[fi1(Ci1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),fi1(vi1,{logs:Z.logs})]})}var xl0=O(()=>{_i1();xi1();mD()});var KJ="thread-gate",MN="decopilot-hosted-harness",dG="automations",Dw="background-tools";var bi1="7";function yi1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:bi1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var gi1=()=>{};function bu6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function fl0($,Z){for(let X=0;X<$.length;X++){let Q=$[X];if(Q===void 0)continue;if(Q===Z)return $[X+1];if(Q.startsWith(`${Z}=`))return Q.slice(Z.length+1)}return}function hi1(){let $=bu6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:fl0($,"--cpu-prof-dir")??process.cwd(),name:fl0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(fl0($,"--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 ui1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=hD();if(!X)return;let Q={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);Q={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:X.rss,heapUsed:X.heapUsed,heapTotal:X.heapTotal,external:X.external,arrayBuffers:X.arrayBuffers,...Q}))};return Z().catch(()=>{}),d50=setInterval(()=>void Z().catch(()=>{}),$),d50.unref?.(),process.on("SIGUSR2",()=>{try{let X=Bun.generateHeapSnapshot("v8"),Q=typeof X==="string"?X:JSON.stringify(X),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,Q),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(X){console.error("[heap-watch] snapshot failed:",X)}}),()=>{if(d50)clearInterval(d50)}}var d50;var ci1=()=>{};import*as yu6 from"bun:jsc";function li1(){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{gu6()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let X,Q=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-Q;Q=G+Z;let K=[];try{K=hu6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let N of K){let U=N.frames.find((B)=>B.sourceURL&&!/Unknown Executable/.test(B.category??""))??N.frames[0];if(!U)continue;let F=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),w=`${U.name??"?"} @ ${F}:${U.line??"?"}`;W.set(w,(W.get(w)??0)+1)}let H=[...W.entries()].sort((N,U)=>U[1]-N[1]).slice(0,8).map(([N,U])=>({frame:N,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var gu6,hu6;var di1=O(()=>{({startSamplingProfiler:gu6,samplingProfilerStackTraces:hu6}=yu6)});function mi1(){hi1();let $=[ui1(),mc1(),li1()];return()=>{for(let Z of $)Z()}}var ii1=O(()=>{cg0();ci1();di1()});var nD=_((ni1)=>{Object.defineProperty(ni1,"__esModule",{value:!0});ni1.RepublishHeaders=ni1.DirectMsgHeaders=ni1.JsHeaders=ni1.AdvisoryKind=void 0;ni1.isOrderedPushConsumerOptions=uu6;ni1.isPullConsumer=cu6;ni1.isPushConsumer=lu6;ni1.isBoundPushConsumerOptions=du6;function uu6($){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 cu6($){return $.isPullConsumer()}function lu6($){return $.isPushConsumer()}function du6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}ni1.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"};ni1.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"};ni1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};ni1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var yY=_((ti1)=>{Object.defineProperty(ti1,"__esModule",{value:!0});ti1.TD=ti1.TE=ti1.Empty=void 0;ti1.encode=su6;ti1.decode=eu6;ti1.Empty=new Uint8Array(0);ti1.TE=new TextEncoder;ti1.TD=new TextDecoder;function au6(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}function su6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(ti1.TE.encode($[X]));if(Z.length===0)return ti1.Empty;if(Z.length===1)return Z[0];return au6(...Z)}function eu6($){if(!$||$.length===0)return"";return ti1.TD.decode($)}});var gY=_((ai1)=>{Object.defineProperty(ai1,"__esModule",{value:!0});ai1.errors=ai1.PermissionViolationError=ai1.NoRespondersError=ai1.TimeoutError=ai1.RequestError=ai1.ProtocolError=ai1.ConnectionError=ai1.DrainingConnectionError=ai1.ClosedConnectionError=ai1.AuthorizationError=ai1.UserAuthenticationExpiredError=ai1.InvalidOperationError=ai1.InvalidArgumentError=ai1.InvalidSubjectError=void 0;class yl0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}ai1.InvalidSubjectError=yl0;class m50 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,X){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((Q)=>`'${Q}'`),$=$.join(",");else $=`'${$}'`;return new m50(`${$} ${Z}`,X)}}ai1.InvalidArgumentError=m50;class gl0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}ai1.InvalidOperationError=gl0;class i50 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new i50($);return null}}ai1.UserAuthenticationExpiredError=i50;class n50 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],X=$.toLowerCase();for(let Q=0;Q<Z.length;Q++)if(X.indexOf(Z[Q])!==-1)return new n50($);return null}}ai1.AuthorizationError=n50;class hl0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}ai1.ClosedConnectionError=hl0;class ul0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}ai1.DrainingConnectionError=ul0;class cl0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}ai1.ConnectionError=cl0;class ll0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}ai1.ProtocolError=ll0;class dl0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof p50}}ai1.RequestError=dl0;class ml0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}ai1.TimeoutError=ml0;class p50 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}ai1.NoRespondersError=p50;class t50 extends Error{operation;subject;queue;constructor($,Z,X,Q,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=X,this.queue=Q}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let X="publish",Q="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(X=G[1].toLowerCase(),Q=G[2],X==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new t50($,X,Q,Y)}}ai1.PermissionViolationError=t50;ai1.errors={AuthorizationError:n50,ClosedConnectionError:hl0,ConnectionError:cl0,DrainingConnectionError:ul0,InvalidArgumentError:m50,InvalidOperationError:gl0,InvalidSubjectError:yl0,NoRespondersError:p50,PermissionViolationError:t50,ProtocolError:ll0,RequestError:dl0,TimeoutError:ml0,UserAuthenticationExpiredError:i50}});var WJ=_((Xn1)=>{Object.defineProperty(Xn1,"__esModule",{value:!0});Xn1.SimpleMutex=Xn1.Perf=void 0;Xn1.extend=Lc6;Xn1.render=Dc6;Xn1.timeout=Ec6;Xn1.delay=zc6;Xn1.deadline=jc6;Xn1.deferred=nl0;Xn1.debugDeferred=Pc6;Xn1.shuffle=Ac6;Xn1.collect=Tc6;Xn1.jitter=Zn1;Xn1.backoff=Rc6;Xn1.nanos=Ic6;Xn1.millis=qc6;Xn1.randomToken=Vc6;var Oc6=yY(),il0=gY();function Lc6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Dc6($){return Oc6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function Ec6($,Z=!0){let X=Z?new il0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new il0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function zc6($=0){let Z,X=new Promise((Q)=>{let Y=setTimeout(()=>{Q()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),Q()}}});return Object.assign(X,Z)}async function jc6($,Z=1000){let X=nl0(),Q=setTimeout(()=>{X.reject(new il0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function nl0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Pc6(){let $={},Z=new Promise((X,Q)=>{$={resolve:(Y)=>{console.trace("resolve",Y),X(Y)},reject:(Y)=>{console.trace("reject"),Q(Y)}}});return Object.assign(Z,$)}function Ac6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Tc6($){let Z=[];for await(let X of $)Z.push(X);return Z}class ei1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,X){let Q=this.timers.get(Z);if(Q===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(X);if(Y===void 0)throw Error(`${X} is not defined`);this.measures.set($,Y-Q)}getEntries(){let $=[];return this.measures.forEach((Z,X)=>{$.push({name:X,duration:Z})}),$}}Xn1.Perf=ei1;class $n1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=nl0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Xn1.SimpleMutex=$n1;function Zn1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function Rc6($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(X){return Zn1(X>Z?$[Z]:$[X])}}}function Ic6($){return $*1e6}function qc6($){return Math.floor($/1e6)}var Mc6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",kN=new Uint8Array(62);for(let $=0;$<62;$++)kN[$]=Mc6.charCodeAt($);var kc6=218340105584896;function Vc6(){let $=Math.floor(Math.random()*kc6),Z=$%62,X=kN[Z];$=($-Z)/62,Z=$%62;let Q=kN[Z];$=($-Z)/62,Z=$%62;let Y=kN[Z];$=($-Z)/62,Z=$%62;let G=kN[Z];$=($-Z)/62,Z=$%62;let J=kN[Z];$=($-Z)/62,Z=$%62;let K=kN[Z];$=($-Z)/62,Z=$%62;let W=kN[Z];$=($-Z)/62;let H=kN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var Nn1=_((Wn1)=>{Object.defineProperty(Wn1,"__esModule",{value:!0});Wn1.nuid=Wn1.NuidImpl=void 0;var ic6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ew=62,r50=12,Jn1=10,Yn1=33,nc6=333,Gn1=r50+Jn1,tl0=new Uint8Array(Ew);for(let $=0;$<Ew;$++)tl0[$]=ic6.charCodeAt($);var o50=4294967296,Kn1=BigInt(Ew)**BigInt(Jn1),km=Number(Kn1/(1n<<32n)),pl0=Number(Kn1%(1n<<32n));function pc6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function tc6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else pc6($)}class ol0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Gn1),this.cbuf=new Uint8Array(r50),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(km+1)),this.seqLo=Math.floor(Math.random()*o50);while($++<8&&this.seqHi===km&&this.seqLo>=pl0);if(this.seqHi===km&&this.seqLo>=pl0)this.seqLo=0;this.inc=Math.random()*(nc6-Yn1)+Yn1|0}setPre(){tc6(this.cbuf);for(let $=0;$<r50;$++)this.buf[$]=tl0[this.cbuf[$]%Ew]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Gn1-1;X>=r50;X--){let Q=Math.floor($/Ew),G=($-Q*Ew)*o50+Z,J=Math.floor(G/Ew),K=G-J*Ew;this.buf[X]=tl0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=o50)this.seqLo-=o50,this.seqHi+=1;if(this.seqHi>km||this.seqHi===km&&this.seqLo>=pl0)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()}}Wn1.NuidImpl=ol0;Wn1.nuid=new ol0});var Bn1=_((Fn1)=>{Object.defineProperty(Fn1,"__esModule",{value:!0});Fn1.nuid=Fn1.Nuid=void 0;var Un1=Nn1();Fn1.Nuid=Un1.NuidImpl;Fn1.nuid=Un1.nuid});var s50=_((a50)=>{Object.defineProperty(a50,"__esModule",{value:!0});a50.nuid=a50.Nuid=void 0;var On1=Bn1();Object.defineProperty(a50,"Nuid",{enumerable:!0,get:function(){return On1.Nuid}});Object.defineProperty(a50,"nuid",{enumerable:!0,get:function(){return On1.nuid}})});var zw=_((Ln1)=>{Object.defineProperty(Ln1,"__esModule",{value:!0});Ln1.DEFAULT_HOST=Ln1.DEFAULT_PORT=Ln1.Match=void 0;Ln1.syncIterator=$l6;Ln1.createInbox=Zl6;var sc6=s50(),ec6=gY();Ln1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function $l6($){let Z=$[Symbol.asyncIterator]();return{async next(){let X=await Z.next();if(X.done)return Promise.resolve(null);return Promise.resolve(X.value)}}}function Zl6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw ec6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${sc6.nuid.next()}`}Ln1.DEFAULT_PORT=4222;Ln1.DEFAULT_HOST="127.0.0.1"});var Vm=_((jn1)=>{Object.defineProperty(jn1,"__esModule",{value:!0});jn1.DataBuffer=void 0;var En1=yY();class zn1{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}static fromAscii($){if(!$)$="";return En1.TE.encode($)}static toAscii($){return En1.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 X=0;X<this.buffers.length;X++)$.set(this.buffers[X],Z),Z+=this.buffers[X].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 X=this.byteLength;if($===void 0||$>X)$=X;let Q=Z.subarray(0,$);if(X>$)this.buffers.push(Z.subarray($));return this.byteLength=X-$,Q}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let X=0;X<Z.length;X++)if(Z[X]&&Z[X].length)this.buffers.push(Z[X]),this.byteLength+=Z[X].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}}jn1.DataBuffer=zn1});var pD=_((Tn1)=>{Object.defineProperty(Tn1,"__esModule",{value:!0});Tn1.LF=Tn1.CR=Tn1.CRLF=Tn1.CR_LF_LEN=Tn1.CR_LF=void 0;Tn1.setTransportFactory=Hl6;Tn1.defaultPort=Nl6;Tn1.getUrlParseFn=Ul6;Tn1.newTransport=Fl6;Tn1.getResolveFn=wl6;Tn1.protoLen=An1;Tn1.extractProtocolMessage=Bl6;var Jl6=yY(),Kl6=zw(),Wl6=Vm(),hY;function Hl6($){hY=$}function Nl6(){return hY!==void 0&&hY.defaultPort!==void 0?hY.defaultPort:Kl6.DEFAULT_PORT}function Ul6(){return hY!==void 0&&hY.urlParseFn?hY.urlParseFn:void 0}function Fl6(){if(!hY||typeof hY.factory!=="function")throw Error("transport fn is not set");return hY.factory()}function wl6(){return hY!==void 0&&hY.dnsResolveFn?hY.dnsResolveFn:void 0}Tn1.CR_LF=`\r
|
|
1313
|
+
`);Q=G.pop()??"";for(let J of G){let K=qm(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;Ow({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}if(Q.trim()){let G=qm(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)Ow({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function Ru6($){let{baseUrl:Z,noTui:X}=$,Q=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=Q?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=Q?await Im(Number(Y)+1):await Im(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await h50({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)dD({name:L.name,status:"ready",port:L.port});Tm();let N=Tu6(import.meta.dir,"..","..","..","..",".."),U=X===!0,F=Bun.spawn(["bun","run","dev:servers"],{cwd:N,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:G,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.natsPublicUrl&&K.natsAccountJwt&&K.natsAccountSigningKey?{NATS_PUBLIC_URL:K.natsPublicUrl,NATS_ACCOUNT_JWT:K.natsAccountJwt,NATS_ACCOUNT_SIGNING_KEY:K.natsAccountSigningKey,NATS_OPERATOR_JWT:K.natsOperatorJwt??"",NATS_TUNNEL_PUBLIC_ENABLED:"true",...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)Ii1(F.stdout),Ii1(F.stderr);Rm(G),dD({name:"Vite",status:"ready",port:Number(Y)}),dD({name:"API",status:"ready",port:Number(K.port)});let B=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (r$0(),o$0));await D(K.dataDir)}};return process.on("SIGINT",()=>B("SIGINT")),process.on("SIGTERM",()=>B("SIGTERM")),{port:Number(Y),process:F}}var Vl0=O(()=>{Tl0();mD();Ml0()});var l50;var Sl0=O(()=>{l50={name:"decocms",version:"4.191.1",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",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.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":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@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":"^2.9.1","@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":"^3.0.10","@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","@nats-io/jwt":"0.0.10-5","@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:"^6.0.208","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 qu6,Text as qi1}from"ink";import{jsx as Mu6,jsxs as Mi1}from"react/jsx-runtime";function ki1({version:$}){return Mi1(qu6,{flexDirection:"column",marginTop:1,children:[D50.map((Z,X)=>Mu6(qi1,{color:E50[X],children:Z},X)),Mi1(qi1,{dimColor:!0,children:[" v",$]})]})}var Vi1=O(()=>{Um()});import{Box as iD,Text as Lw}from"ink";import{Spinner as ku6}from"@inkjs/ui";import{jsx as bY,jsxs as sf}from"react/jsx-runtime";function Si1({status:$}){if($==="pending")return bY(ku6,{label:""});return bY(Lw,{color:"green",children:"\u2713"})}function Vu6($){return`${$.name}: ${$.port||"...."}`}function Ci1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return sf(iD,{flexDirection:"column",paddingBottom:1,children:[bY(ki1,{version:l50.version}),bY(iD,{marginBottom:1,children:bY(Lw,{dimColor:!0,children:"\u2500".repeat(80)})}),bY(iD,{children:sf(Lw,{dimColor:!0,children:["Home: ",X]})}),sf(iD,{gap:2,children:[$.map((Y)=>sf(iD,{gap:1,children:[bY(Lw,{children:Vu6(Y)}),bY(Si1,{status:Y.status})]},Y.name)),sf(iD,{gap:1,children:[bY(Lw,{children:"Migrations"}),bY(Si1,{status:Z})]})]}),bY(iD,{children:Q?sf(Lw,{children:["Open in browser: ",bY(Lw,{color:"cyan",children:Q})]}):bY(Lw,{dimColor:!0,children:"Starting..."})})]})}var _i1=O(()=>{Sl0();Vi1()});import{Box as Su6,Text as Mm}from"ink";import{jsx as Cl0,jsxs as _l0}from"react/jsx-runtime";function Cu6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function vi1({logs:$}){return Cl0(Su6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Cl0(Mm,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return _l0(Mm,{children:[_l0(Mm,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Cl0(Mm,{color:Cu6(Z.status),children:Z.status}),_l0(Mm,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var xi1=()=>{};var vl0={};w0(vl0,{App:()=>xu6});import{Box as _u6}from"ink";import{useSyncExternalStore as vu6}from"react";import{jsx as fi1,jsxs as fu6}from"react/jsx-runtime";function xu6({home:$}){let Z=vu6(ql0,Il0);return fu6(_u6,{flexDirection:"column",children:[fi1(Ci1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),fi1(vi1,{logs:Z.logs})]})}var xl0=O(()=>{_i1();xi1();mD()});var KJ="thread-gate",MN="decopilot-hosted-harness",dG="automations",Dw="background-tools";var bi1="7";function yi1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:bi1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var gi1=()=>{};function bu6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function fl0($,Z){for(let X=0;X<$.length;X++){let Q=$[X];if(Q===void 0)continue;if(Q===Z)return $[X+1];if(Q.startsWith(`${Z}=`))return Q.slice(Z.length+1)}return}function hi1(){let $=bu6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:fl0($,"--cpu-prof-dir")??process.cwd(),name:fl0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(fl0($,"--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 ui1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=hD();if(!X)return;let Q={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);Q={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:X.rss,heapUsed:X.heapUsed,heapTotal:X.heapTotal,external:X.external,arrayBuffers:X.arrayBuffers,...Q}))};return Z().catch(()=>{}),d50=setInterval(()=>void Z().catch(()=>{}),$),d50.unref?.(),process.on("SIGUSR2",()=>{try{let X=Bun.generateHeapSnapshot("v8"),Q=typeof X==="string"?X:JSON.stringify(X),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,Q),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(X){console.error("[heap-watch] snapshot failed:",X)}}),()=>{if(d50)clearInterval(d50)}}var d50;var ci1=()=>{};import*as yu6 from"bun:jsc";function li1(){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{gu6()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let X,Q=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-Q;Q=G+Z;let K=[];try{K=hu6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let N of K){let U=N.frames.find((B)=>B.sourceURL&&!/Unknown Executable/.test(B.category??""))??N.frames[0];if(!U)continue;let F=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),w=`${U.name??"?"} @ ${F}:${U.line??"?"}`;W.set(w,(W.get(w)??0)+1)}let H=[...W.entries()].sort((N,U)=>U[1]-N[1]).slice(0,8).map(([N,U])=>({frame:N,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var gu6,hu6;var di1=O(()=>{({startSamplingProfiler:gu6,samplingProfilerStackTraces:hu6}=yu6)});function mi1(){hi1();let $=[ui1(),mc1(),li1()];return()=>{for(let Z of $)Z()}}var ii1=O(()=>{cg0();ci1();di1()});var nD=_((ni1)=>{Object.defineProperty(ni1,"__esModule",{value:!0});ni1.RepublishHeaders=ni1.DirectMsgHeaders=ni1.JsHeaders=ni1.AdvisoryKind=void 0;ni1.isOrderedPushConsumerOptions=uu6;ni1.isPullConsumer=cu6;ni1.isPushConsumer=lu6;ni1.isBoundPushConsumerOptions=du6;function uu6($){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 cu6($){return $.isPullConsumer()}function lu6($){return $.isPushConsumer()}function du6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}ni1.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"};ni1.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"};ni1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};ni1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var yY=_((ti1)=>{Object.defineProperty(ti1,"__esModule",{value:!0});ti1.TD=ti1.TE=ti1.Empty=void 0;ti1.encode=su6;ti1.decode=eu6;ti1.Empty=new Uint8Array(0);ti1.TE=new TextEncoder;ti1.TD=new TextDecoder;function au6(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}function su6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(ti1.TE.encode($[X]));if(Z.length===0)return ti1.Empty;if(Z.length===1)return Z[0];return au6(...Z)}function eu6($){if(!$||$.length===0)return"";return ti1.TD.decode($)}});var gY=_((ai1)=>{Object.defineProperty(ai1,"__esModule",{value:!0});ai1.errors=ai1.PermissionViolationError=ai1.NoRespondersError=ai1.TimeoutError=ai1.RequestError=ai1.ProtocolError=ai1.ConnectionError=ai1.DrainingConnectionError=ai1.ClosedConnectionError=ai1.AuthorizationError=ai1.UserAuthenticationExpiredError=ai1.InvalidOperationError=ai1.InvalidArgumentError=ai1.InvalidSubjectError=void 0;class yl0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}ai1.InvalidSubjectError=yl0;class m50 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,X){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((Q)=>`'${Q}'`),$=$.join(",");else $=`'${$}'`;return new m50(`${$} ${Z}`,X)}}ai1.InvalidArgumentError=m50;class gl0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}ai1.InvalidOperationError=gl0;class i50 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new i50($);return null}}ai1.UserAuthenticationExpiredError=i50;class n50 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],X=$.toLowerCase();for(let Q=0;Q<Z.length;Q++)if(X.indexOf(Z[Q])!==-1)return new n50($);return null}}ai1.AuthorizationError=n50;class hl0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}ai1.ClosedConnectionError=hl0;class ul0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}ai1.DrainingConnectionError=ul0;class cl0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}ai1.ConnectionError=cl0;class ll0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}ai1.ProtocolError=ll0;class dl0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof p50}}ai1.RequestError=dl0;class ml0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}ai1.TimeoutError=ml0;class p50 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}ai1.NoRespondersError=p50;class t50 extends Error{operation;subject;queue;constructor($,Z,X,Q,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=X,this.queue=Q}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let X="publish",Q="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(X=G[1].toLowerCase(),Q=G[2],X==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new t50($,X,Q,Y)}}ai1.PermissionViolationError=t50;ai1.errors={AuthorizationError:n50,ClosedConnectionError:hl0,ConnectionError:cl0,DrainingConnectionError:ul0,InvalidArgumentError:m50,InvalidOperationError:gl0,InvalidSubjectError:yl0,NoRespondersError:p50,PermissionViolationError:t50,ProtocolError:ll0,RequestError:dl0,TimeoutError:ml0,UserAuthenticationExpiredError:i50}});var WJ=_((Xn1)=>{Object.defineProperty(Xn1,"__esModule",{value:!0});Xn1.SimpleMutex=Xn1.Perf=void 0;Xn1.extend=Lc6;Xn1.render=Dc6;Xn1.timeout=Ec6;Xn1.delay=zc6;Xn1.deadline=jc6;Xn1.deferred=nl0;Xn1.debugDeferred=Pc6;Xn1.shuffle=Ac6;Xn1.collect=Tc6;Xn1.jitter=Zn1;Xn1.backoff=Rc6;Xn1.nanos=Ic6;Xn1.millis=qc6;Xn1.randomToken=Vc6;var Oc6=yY(),il0=gY();function Lc6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Dc6($){return Oc6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function Ec6($,Z=!0){let X=Z?new il0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new il0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function zc6($=0){let Z,X=new Promise((Q)=>{let Y=setTimeout(()=>{Q()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),Q()}}});return Object.assign(X,Z)}async function jc6($,Z=1000){let X=nl0(),Q=setTimeout(()=>{X.reject(new il0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function nl0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Pc6(){let $={},Z=new Promise((X,Q)=>{$={resolve:(Y)=>{console.trace("resolve",Y),X(Y)},reject:(Y)=>{console.trace("reject"),Q(Y)}}});return Object.assign(Z,$)}function Ac6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Tc6($){let Z=[];for await(let X of $)Z.push(X);return Z}class ei1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,X){let Q=this.timers.get(Z);if(Q===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(X);if(Y===void 0)throw Error(`${X} is not defined`);this.measures.set($,Y-Q)}getEntries(){let $=[];return this.measures.forEach((Z,X)=>{$.push({name:X,duration:Z})}),$}}Xn1.Perf=ei1;class $n1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=nl0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Xn1.SimpleMutex=$n1;function Zn1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function Rc6($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(X){return Zn1(X>Z?$[Z]:$[X])}}}function Ic6($){return $*1e6}function qc6($){return Math.floor($/1e6)}var Mc6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",kN=new Uint8Array(62);for(let $=0;$<62;$++)kN[$]=Mc6.charCodeAt($);var kc6=218340105584896;function Vc6(){let $=Math.floor(Math.random()*kc6),Z=$%62,X=kN[Z];$=($-Z)/62,Z=$%62;let Q=kN[Z];$=($-Z)/62,Z=$%62;let Y=kN[Z];$=($-Z)/62,Z=$%62;let G=kN[Z];$=($-Z)/62,Z=$%62;let J=kN[Z];$=($-Z)/62,Z=$%62;let K=kN[Z];$=($-Z)/62,Z=$%62;let W=kN[Z];$=($-Z)/62;let H=kN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var Nn1=_((Wn1)=>{Object.defineProperty(Wn1,"__esModule",{value:!0});Wn1.nuid=Wn1.NuidImpl=void 0;var ic6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ew=62,r50=12,Jn1=10,Yn1=33,nc6=333,Gn1=r50+Jn1,tl0=new Uint8Array(Ew);for(let $=0;$<Ew;$++)tl0[$]=ic6.charCodeAt($);var o50=4294967296,Kn1=BigInt(Ew)**BigInt(Jn1),km=Number(Kn1/(1n<<32n)),pl0=Number(Kn1%(1n<<32n));function pc6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function tc6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else pc6($)}class ol0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Gn1),this.cbuf=new Uint8Array(r50),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(km+1)),this.seqLo=Math.floor(Math.random()*o50);while($++<8&&this.seqHi===km&&this.seqLo>=pl0);if(this.seqHi===km&&this.seqLo>=pl0)this.seqLo=0;this.inc=Math.random()*(nc6-Yn1)+Yn1|0}setPre(){tc6(this.cbuf);for(let $=0;$<r50;$++)this.buf[$]=tl0[this.cbuf[$]%Ew]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Gn1-1;X>=r50;X--){let Q=Math.floor($/Ew),G=($-Q*Ew)*o50+Z,J=Math.floor(G/Ew),K=G-J*Ew;this.buf[X]=tl0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=o50)this.seqLo-=o50,this.seqHi+=1;if(this.seqHi>km||this.seqHi===km&&this.seqLo>=pl0)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()}}Wn1.NuidImpl=ol0;Wn1.nuid=new ol0});var Bn1=_((Fn1)=>{Object.defineProperty(Fn1,"__esModule",{value:!0});Fn1.nuid=Fn1.Nuid=void 0;var Un1=Nn1();Fn1.Nuid=Un1.NuidImpl;Fn1.nuid=Un1.nuid});var s50=_((a50)=>{Object.defineProperty(a50,"__esModule",{value:!0});a50.nuid=a50.Nuid=void 0;var On1=Bn1();Object.defineProperty(a50,"Nuid",{enumerable:!0,get:function(){return On1.Nuid}});Object.defineProperty(a50,"nuid",{enumerable:!0,get:function(){return On1.nuid}})});var zw=_((Ln1)=>{Object.defineProperty(Ln1,"__esModule",{value:!0});Ln1.DEFAULT_HOST=Ln1.DEFAULT_PORT=Ln1.Match=void 0;Ln1.syncIterator=$l6;Ln1.createInbox=Zl6;var sc6=s50(),ec6=gY();Ln1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function $l6($){let Z=$[Symbol.asyncIterator]();return{async next(){let X=await Z.next();if(X.done)return Promise.resolve(null);return Promise.resolve(X.value)}}}function Zl6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw ec6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${sc6.nuid.next()}`}Ln1.DEFAULT_PORT=4222;Ln1.DEFAULT_HOST="127.0.0.1"});var Vm=_((jn1)=>{Object.defineProperty(jn1,"__esModule",{value:!0});jn1.DataBuffer=void 0;var En1=yY();class zn1{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}static fromAscii($){if(!$)$="";return En1.TE.encode($)}static toAscii($){return En1.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 X=0;X<this.buffers.length;X++)$.set(this.buffers[X],Z),Z+=this.buffers[X].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 X=this.byteLength;if($===void 0||$>X)$=X;let Q=Z.subarray(0,$);if(X>$)this.buffers.push(Z.subarray($));return this.byteLength=X-$,Q}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let X=0;X<Z.length;X++)if(Z[X]&&Z[X].length)this.buffers.push(Z[X]),this.byteLength+=Z[X].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}}jn1.DataBuffer=zn1});var pD=_((Tn1)=>{Object.defineProperty(Tn1,"__esModule",{value:!0});Tn1.LF=Tn1.CR=Tn1.CRLF=Tn1.CR_LF_LEN=Tn1.CR_LF=void 0;Tn1.setTransportFactory=Hl6;Tn1.defaultPort=Nl6;Tn1.getUrlParseFn=Ul6;Tn1.newTransport=Fl6;Tn1.getResolveFn=wl6;Tn1.protoLen=An1;Tn1.extractProtocolMessage=Bl6;var Jl6=yY(),Kl6=zw(),Wl6=Vm(),hY;function Hl6($){hY=$}function Nl6(){return hY!==void 0&&hY.defaultPort!==void 0?hY.defaultPort:Kl6.DEFAULT_PORT}function Ul6(){return hY!==void 0&&hY.urlParseFn?hY.urlParseFn:void 0}function Fl6(){if(!hY||typeof hY.factory!=="function")throw Error("transport fn is not set");return hY.factory()}function wl6(){return hY!==void 0&&hY.dnsResolveFn?hY.dnsResolveFn:void 0}Tn1.CR_LF=`\r
|
|
1314
1314
|
`;Tn1.CR_LF_LEN=Tn1.CR_LF.length;Tn1.CRLF=Wl6.DataBuffer.fromAscii(Tn1.CR_LF);Tn1.CR=new Uint8Array(Tn1.CRLF)[0];Tn1.LF=new Uint8Array(Tn1.CRLF)[1];function An1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===Tn1.CR&&$[X]===Tn1.LF)return X+1}return 0}function Bl6($){let Z=An1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return Jl6.TD.decode(Q)}return""}});var $d0=_((Cn1)=>{Object.defineProperty(Cn1,"__esModule",{value:!0});Cn1.ipV4=kn1;Cn1.isIP=Il6;Cn1.parseIP=Vn1;var Sm=4,tD=16,e50=48,Mn1=57,In1=65,Tl6=70,qn1=97,Rl6=102,el0=16777215;function kn1($,Z,X,Q){let Y=new Uint8Array(tD);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((J,K)=>{Y[K]=J}),Y[12]=$,Y[13]=Z,Y[14]=X,Y[15]=Q,Y}function Il6($){return Vn1($)!==void 0}function Vn1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return Sn1($);case":":return ql6($)}return}function Sn1($){let Z=new Uint8Array(Sm);for(let X=0;X<Sm;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=Ml6($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return kn1(Z[0],Z[1],Z[2],Z[3])}function ql6($){let Z=new Uint8Array(tD),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<tD){let{n:Y,c:G,ok:J}=kl6($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=tD-Sm)return;if(Q+Sm>tD)return;let K=Sn1($);if(K===void 0)return;Z[Q]=K[12],Z[Q+1]=K[13],Z[Q+2]=K[14],Z[Q+3]=K[15],$="",Q+=Sm;break}if(Z[Q]=Y>>8,Z[Q+1]=Y,Q+=2,$=$.substring(G),$.length===0)break;if($[0]!==":"||$.length==1)return;if($=$.substring(1),$[0]===":"){if(X>=0)return;if(X=Q,$=$.substring(1),$.length===0)break}}if($.length!==0)return;if(Q<tD){if(X<0)return;let Y=tD-Q;for(let G=Q-1;G>=X;G--)Z[G+Y]=Z[G];for(let G=X+Y-1;G>=X;G--)Z[G]=0}else if(X>=0)return;return Z}function Ml6($){let Z=0,X=0;for(Z=0;Z<$.length&&e50<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=Mn1;Z++)if(X=X*10+($.charCodeAt(Z)-e50),X>=el0)return{n:el0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function kl6($){let Z=0,X=0;for(X=0;X<$.length;X++){if(e50<=$.charCodeAt(X)&&$.charCodeAt(X)<=Mn1)Z*=16,Z+=$.charCodeAt(X)-e50;else if(qn1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Rl6)Z*=16,Z+=$.charCodeAt(X)-qn1+10;else if(In1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Tl6)Z*=16,Z+=$.charCodeAt(X)-In1+10;else break;if(Z>=el0)return{n:0,c:X,ok:!1}}if(X===0)return{n:0,c:X,ok:!1};return{n:Z,c:X,ok:!0}}});var Jd0=_((vn1)=>{Object.defineProperty(vn1,"__esModule",{value:!0});vn1.Servers=vn1.ServerImpl=void 0;vn1.isIPV4OrHostname=_n1;vn1.hostPort=Gd0;var Zd0=pD(),Xd0=WJ(),Qd0=$d0(),_l6=zw(),vl6=gY();function _n1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function Yd0($){return!_n1($)}function xl6($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function Gd0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=xl6($),Yd0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=Yd0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):_l6.DEFAULT_PORT,Y=new URL(`${X===80?"https":"http"}://${$}`);Y.port=`${X}`;let G=Y.hostname;if(G.charAt(0)==="[")G=G.substring(1,G.length-1);return{listen:Y.host,hostname:G,port:X}}class ef{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=Gd0($);this.listen=X.listen,this.hostname=X.hostname,this.port=X.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,Qd0.isIP)(this.hostname))return[this];else{let X=await $.fn(this.hostname);if($.debug)console.log(`resolve ${this.hostname} = ${X.join(",")}`);for(let Q of X){let Y=this.port===80?"https":"http",G=new URL(`${Y}://${Yd0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new ef(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,Xd0.shuffle)(Z);return this.resolves=Z,Z}}vn1.ServerImpl=ef;class $90{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw vl6.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,Zd0.getUrlParseFn)(),X=new Map;for(let Y of this.servers)X.set(Y.listen,Y);let Q=[];for(let Y of $){Y=Z?Z(Y):Y;let{listen:G}=Gd0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new ef(Y))}if(this.randomize)(0,Xd0.shuffle)(Q);if(this.servers=Q,this.currentServer===void 0||!Q.includes(this.currentServer))this.currentServer=Q[0],this.firstSelect=!0}clear(){this.servers.length=0}updateTLSName(){let $=this.getCurrentServer();if(!(0,Qd0.isIP)($.hostname))this.tlsName=$.hostname,this.servers.forEach((Z)=>{if(Z.gossiped)Z.tlsName=this.tlsName})}getCurrentServer(){return this.currentServer}addServer($,Z=!1){let X=(0,Zd0.getUrlParseFn)();$=X?X($):$;let Q=new ef($,Z);if((0,Qd0.isIP)(Q.hostname))Q.tlsName=this.tlsName;this.servers.push(Q)}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 $90.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return $90.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 X=[],Q=[],Y=(0,Zd0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new ef(K,!0);G.set(K,W)});let J=[];if(this.servers.forEach((K,W)=>{let H=K.listen;if(K.gossiped&&this.currentServer.listen!==H&&G.get(H)===void 0)J.push(W);G.delete(H)}),J.reverse(),J.forEach((K)=>{let W=this.servers.splice(K,1);Q=Q.concat(W[0].listen)}),G.forEach((K,W)=>{this.servers.push(K),X.push(W)}),this.randomize&&X.length>0){let K=this.currentServer,W=this.servers.filter((H)=>H!==K);(0,Xd0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}vn1.Servers=$90});var Z90=_((yn1)=>{Object.defineProperty(yn1,"__esModule",{value:!0});yn1.QueuedIteratorImpl=void 0;var Kd0=WJ(),fn1=gY();class bn1{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,Kd0.deferred)(),this.yields=[],this.iterClosed=(0,Kd0.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(X){}}return}if(typeof $==="function")this.pendingFiltered++;this.yields.push($),this.signal.resolve()}async*iterate(){if(this.noIterator)throw new fn1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new fn1.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 Q=$[Z];try{Q()}catch(Y){throw Y}if(this.err)throw this.err;continue}this.processed++,this.inflight--;let X=this.profile?Date.now():0;yield $[Z],this.time=this.profile?Date.now()-X:0}if(this.done)break;else if(this.yields.length===0)$.length=0,this.yields=$,this.signal=(0,Kd0.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}}yn1.QueuedIteratorImpl=bn1});var Wd0=_((cn1)=>{Object.defineProperty(cn1,"__esModule",{value:!0});cn1.MuxSubscription=void 0;var gl6=zw(),hn1=gY();class un1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,gl6.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((X)=>{X.resolver(Z,{})}),!0;if(Z.operation==="publish"){let X=this.all().find((Q)=>{return Q.requestSubject===Z.subject});if(X)return X.resolver(Z,{}),!0}return!1}dispatcher(){return($,Z)=>{let X=this.getToken(Z);if(X){let Q=this.get(X);if(Q){if($===null)$=Z?.data?.length===0&&Z.headers?.code===503?new hn1.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new hn1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}cn1.MuxSubscription=un1});var Hd0=_((mn1)=>{Object.defineProperty(mn1,"__esModule",{value:!0});mn1.Heartbeat=void 0;var hl6=WJ();class dn1{ph;interval;maxOut;timer;pendings;constructor($,Z,X){this.ph=$,this.interval=Z,this.maxOut=X,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,hl6.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})}}mn1.Heartbeat=dn1});var Fd0=_((on1)=>{Object.defineProperty(on1,"__esModule",{value:!0});on1.DenoBuffer=on1.MAX_SIZE=on1.AssertionError=void 0;on1.assert=pn1;on1.concat=tn1;on1.append=cl6;on1.readAll=ll6;on1.writeAll=dl6;var ul6=yY();class Nd0 extends Error{constructor($){super($);this.name="AssertionError"}}on1.AssertionError=Nd0;function pn1($,Z="Assertion failed."){if(!$)throw new Nd0(Z)}var nn1=32768;on1.MAX_SIZE=4294967294;function X90($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function tn1($,Z){if($===void 0&&Z===void 0)return new Uint8Array(0);if($===void 0)return Z;if(Z===void 0)return $;let X=new Uint8Array($.length+Z.length);return X.set($,0),X.set(Z,$.length),X}function cl6($,Z){return tn1($,Uint8Array.of(Z))}class Ud0{_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($){pn1($<=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=X90(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(ul6.TE.encode($))}write($){let Z=this._grow($.byteLength);return X90($,this._buf,Z)}_grow($){let Z=this.length;if(Z===0&&this._off!==0)this.reset();let X=this._tryGrowByReslice($);if(X>=0)return X;let Q=this.capacity;if($<=Math.floor(Q/2)-Z)X90(this._buf.subarray(this._off),this._buf);else if(Q+$>on1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,on1.MAX_SIZE));X90(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,on1.MAX_SIZE)),Z}grow($){if($<0)throw Error("Buffer._grow: negative count");let Z=this._grow($);this._reslice(Z)}readFrom($){let Z=0,X=new Uint8Array(nn1);while(!0){let Q=this.capacity-this.length<nn1,Y=Q?X:new Uint8Array(this._buf.buffer,this.length),G=$.read(Y);if(G===null)return Z;if(Q)this.write(Y.subarray(0,G));else this._reslice(this.length+G);Z+=G}}}on1.DenoBuffer=Ud0;function ll6($){let Z=new Ud0;return Z.readFrom($),Z.bytes()}function dl6($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var Od0=_(($p1)=>{Object.defineProperty($p1,"__esModule",{value:!0});$p1.cc=$p1.State=$p1.Parser=$p1.Kind=void 0;$p1.describe=rl6;var wd0=Fd0(),Bd0=yY();$p1.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function rl6($){let Z,X="";switch($.kind){case $p1.Kind.MSG:Z="MSG";break;case $p1.Kind.OK:Z="OK";break;case $p1.Kind.ERR:Z="ERR",X=Bd0.TD.decode($.data);break;case $p1.Kind.PING:Z="PING";break;case $p1.Kind.PONG:Z="PONG";break;case $p1.Kind.INFO:Z="INFO",X=Bd0.TD.decode($.data)}return`${Z}: ${X}`}function an1(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var sn1=48,al6=57,$b=67108864;class en1{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=$p1.State.OP_START,this.as=0,this.drop=0,this.hdr=0}parse($){let Z;for(Z=0;Z<$.length;Z++){let X=$[Z];switch(this.state){case $p1.State.OP_START:switch(X){case $p1.cc.M:case $p1.cc.m:this.state=$p1.State.OP_M,this.hdr=-1,this.ma=an1();break;case $p1.cc.H:case $p1.cc.h:this.state=$p1.State.OP_H,this.hdr=0,this.ma=an1();break;case $p1.cc.P:case $p1.cc.p:this.state=$p1.State.OP_P;break;case $p1.cc.PLUS:this.state=$p1.State.OP_PLUS;break;case $p1.cc.MINUS:this.state=$p1.State.OP_MINUS;break;case $p1.cc.I:case $p1.cc.i:this.state=$p1.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_H:switch(X){case $p1.cc.M:case $p1.cc.m:this.state=$p1.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_M:switch(X){case $p1.cc.S:case $p1.cc.s:this.state=$p1.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_MS:switch(X){case $p1.cc.G:case $p1.cc.g:this.state=$p1.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_MSG:switch(X){case $p1.cc.SPACE:case $p1.cc.TAB:this.state=$p1.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_MSG_SPC:switch(X){case $p1.cc.SPACE:case $p1.cc.TAB:continue;default:this.state=$p1.State.MSG_ARG,this.as=Z}break;case $p1.State.MSG_ARG:switch(X){case $p1.cc.CR:this.drop=1;break;case $p1.cc.NL:{let Q=this.argBuf?this.argBuf.bytes():$.subarray(this.as,Z-this.drop);this.processMsgArgs(Q),this.drop=0,this.as=Z+1,this.state=$p1.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case $p1.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:$p1.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=$p1.State.MSG_END}else{let Q=this.ma.size-this.msgBuf.length,Y=$.length-Z;if(Y<Q)Q=Y;if(Q>0)this.msgBuf.write($.subarray(Z,Z+Q)),Z=Z+Q-1;else this.msgBuf.writeByte(X)}else if(Z-this.as>=this.ma.size)this.dispatcher.push({kind:$p1.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=$p1.State.MSG_END;break;case $p1.State.MSG_END:switch(X){case $p1.cc.NL:this.drop=0,this.as=Z+1,this.state=$p1.State.OP_START;break;default:continue}break;case $p1.State.OP_PLUS:switch(X){case $p1.cc.O:case $p1.cc.o:this.state=$p1.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_PLUS_O:switch(X){case $p1.cc.K:case $p1.cc.k:this.state=$p1.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_PLUS_OK:switch(X){case $p1.cc.NL:this.dispatcher.push({kind:$p1.Kind.OK}),this.drop=0,this.state=$p1.State.OP_START;break}break;case $p1.State.OP_MINUS:switch(X){case $p1.cc.E:case $p1.cc.e:this.state=$p1.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_MINUS_E:switch(X){case $p1.cc.R:case $p1.cc.r:this.state=$p1.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_MINUS_ER:switch(X){case $p1.cc.R:case $p1.cc.r:this.state=$p1.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_MINUS_ERR:switch(X){case $p1.cc.SPACE:case $p1.cc.TAB:this.state=$p1.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_MINUS_ERR_SPC:switch(X){case $p1.cc.SPACE:case $p1.cc.TAB:continue;default:this.state=$p1.State.MINUS_ERR_ARG,this.as=Z}break;case $p1.State.MINUS_ERR_ARG:switch(X){case $p1.cc.CR:this.drop=1;break;case $p1.cc.NL:{let Q;if(this.argBuf)Q=this.argBuf.bytes(),this.argBuf=void 0;else Q=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:$p1.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=$p1.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case $p1.State.OP_P:switch(X){case $p1.cc.I:case $p1.cc.i:this.state=$p1.State.OP_PI;break;case $p1.cc.O:case $p1.cc.o:this.state=$p1.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_PO:switch(X){case $p1.cc.N:case $p1.cc.n:this.state=$p1.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_PON:switch(X){case $p1.cc.G:case $p1.cc.g:this.state=$p1.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_PONG:switch(X){case $p1.cc.NL:this.dispatcher.push({kind:$p1.Kind.PONG}),this.drop=0,this.state=$p1.State.OP_START;break}break;case $p1.State.OP_PI:switch(X){case $p1.cc.N:case $p1.cc.n:this.state=$p1.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_PIN:switch(X){case $p1.cc.G:case $p1.cc.g:this.state=$p1.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_PING:switch(X){case $p1.cc.NL:this.dispatcher.push({kind:$p1.Kind.PING}),this.drop=0,this.state=$p1.State.OP_START;break}break;case $p1.State.OP_I:switch(X){case $p1.cc.N:case $p1.cc.n:this.state=$p1.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_IN:switch(X){case $p1.cc.F:case $p1.cc.f:this.state=$p1.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_INF:switch(X){case $p1.cc.O:case $p1.cc.o:this.state=$p1.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_INFO:switch(X){case $p1.cc.SPACE:case $p1.cc.TAB:this.state=$p1.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case $p1.State.OP_INFO_SPC:switch(X){case $p1.cc.SPACE:case $p1.cc.TAB:continue;default:this.state=$p1.State.INFO_ARG,this.as=Z}break;case $p1.State.INFO_ARG:switch(X){case $p1.cc.CR:this.drop=1;break;case $p1.cc.NL:{let Q;if(this.argBuf)Q=this.argBuf.bytes(),this.argBuf=void 0;else Q=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:$p1.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=$p1.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===$p1.State.MSG_ARG||this.state===$p1.State.MINUS_ERR_ARG||this.state===$p1.State.INFO_ARG)&&!this.argBuf)this.argBuf=new wd0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===$p1.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new wd0.DenoBuffer($.subarray(this.as))}}cloneMsgArg(){let $=this.ma.subject.length,Z=this.ma.reply?this.ma.reply.length:0,X=new Uint8Array($+Z);if(X.set(this.ma.subject),this.ma.reply)X.set(this.ma.reply,$);if(this.argBuf=new wd0.DenoBuffer(X),this.ma.subject=X.subarray(0,$),this.ma.reply)this.ma.reply=X.subarray($)}processMsgArgs($){if(this.hdr>=0)return this.processHeaderMsgArgs($);let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case $p1.cc.SPACE:case $p1.cc.TAB:case $p1.cc.CR:case $p1.cc.NL:if(X>=0)Z.push($.subarray(X,Q)),X=-1;break;default:if(X<0)X=Q}if(X>=0)Z.push($.subarray(X));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],$b);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],$b);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}: ${Bd0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case $p1.cc.SPACE:case $p1.cc.TAB:case $p1.cc.CR:case $p1.cc.NL:if(X>=0)Z.push($.subarray(X,Q)),X=-1;break;default:if(X<0)X=Q}if(X>=0)Z.push($.subarray(X));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],$b),this.ma.size=this.protoParseInt(Z[3],$b);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],$b),this.ma.size=this.protoParseInt(Z[4],$b);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 X=0;for(let Q=0;Q<$.length;Q++){if($[Q]<sn1||$[Q]>al6)return-1;X=X*10+($[Q]-sn1)}return Z!==void 0&&X>Z?-1:X}}$p1.Parser=en1;$p1.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};$p1.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 G90=_((Xp1)=>{Object.defineProperty(Xp1,"__esModule",{value:!0});Xp1.MsgHdrsImpl=void 0;Xp1.canonicalMIMEHeaderKey=Dd0;Xp1.headers=$d6;var Zp1=yY(),HJ=zw(),Y90=gY();function Dd0($){let N=!0,U=Array($.length);for(let F=0;F<$.length;F++){let w=$.charCodeAt(F);if(w===58||w<33||w>126)throw Y90.InvalidArgumentError.format("header",`'${$[F]}' is not a valid character in a header name`);if(N&&97<=w&&w<=122)w-=32;else if(!N&&65<=w&&w<=90)w+=32;U[F]=w,N=w==45}return String.fromCharCode(...U)}function $d6($=0,Z=""){if($===0&&Z!=="")throw Y90.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw Y90.InvalidArgumentError.format("description","is required");return new Zb($,Z)}var Ld0="NATS/1.0";class Zb{_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,X]of this.headers){let Q=$.values(Z);if(X.length!==Q.length)return!1;let Y=[...X].sort(),G=[...Q].sort();for(let J=0;J<Y.length;J++)if(Y[J]!==G[J])return!1}return!0}return!1}static decode($){let Z=new Zb,Q=Zp1.TD.decode($).split(`\r
|
|
1315
1315
|
`),Y=Q[0];if(Y!==Ld0){let G=Y.replace(Ld0,"").trim();if(G.length>0){if(Z._code=parseInt(G,10),isNaN(Z._code))Z._code=0;let J=Z._code.toString();G=G.replace(J,""),Z._description=G.trim()}}if(Q.length>=1)Q.slice(1).map((G)=>{if(G){let J=G.indexOf(":");if(J>-1){let K=G.slice(0,J),W=G.slice(J+1).trim();Z.append(K,W)}}});return Z}toString(){if(this.headers.size===0&&this._code===0)return"";let $=Ld0;if(this._code>0&&this._description!=="")$+=` ${this._code} ${this._description}`;for(let[Z,X]of this.headers)for(let Q=0;Q<X.length;Q++)$=`${$}\r
|
|
1316
1316
|
${Z}: ${X[Q]}`;return`${$}\r
|
|
@@ -2813,7 +2813,7 @@ Use this to continue with the user's request \u2014 do NOT call subtask again fo
|
|
|
2813
2813
|
Task description:
|
|
2814
2814
|
${Z.description}
|
|
2815
2815
|
`:"","How to work:",`- Call \`${W}\` with the task id below to find the pull request under review.`,J?`- The repository ${J.owner}/${J.name} is already cloned at your working directory and \`git\` and \`gh\` are authenticated \u2014 check the PR's branch out there to inspect / exercise the change.`:K?"- Your working directory is EMPTY. Call `mcp__studio__TASK_ADD_REPO` with the connectionId of the PR's repository FIRST; it clones the repository and waits for the checkout, and `git` and `gh` are authenticated once it returns.":"- Load the PR's repository to inspect / exercise the change.",`- End the run by calling \`${H}\` exactly once with the task id, reviewer "${X}", the reviewToken below, and your decision:`," - `approve` when it's good to ship. Include a short summary of what you verified."," - `request_changes` when something is wrong or missing. Include specific, actionable notes \u2014 the task goes back to the Super Agent with your notes.","- The reviewToken proves you are this reviewer \u2014 pass it through EXACTLY as given. Without it your approval won't count toward an automatic merge.",`- \`${H}\` is how the verdict is recorded. A review that ends without it is thrown away and the task stays stuck In Review, so call it even when your notes are short.`,"",`(task id: ${Z.id})`,`(reviewToken: ${Q})`].join(`
|
|
2816
|
-
`);await va($,Z,{title:`${Ht[X]}: ${Z.title}`,prompt:U,temperature:0.3,...K?{harnessId:"claude-code",agent:{instructions:N,disallowedTools:md4[X]}}:{},...J?{repo:J}:{}}),await rZ($,{taskBoardItemId:Z.id,action:"review_requested",actorId:null,data:{reviewer:X}});let F=await $.storage.taskBoard.getById(Z.id,Y);if(F)h$(Y,F)}var r_8,md4,id4,nd4=2;var kZ1=O(()=>{YX();jH();oZ();IZ1();MZ1();r_8=new Set(["completed","failed","expired"]),md4={qa:["Edit","NotebookEdit"],code_review:["Write","Edit","NotebookEdit"]},id4={qa:"You are the QA Agent. Your job is to confirm the task ACTUALLY SOLVED THE "+"PROBLEM \u2014 not to review code style. Exercise the feature/behavior the task "+"describes (use the PR's preview / dev server when available), check the acceptance criteria implied by the title and description, and look for regressions in the affected flow. Judge outcomes, not the diff.",code_review:"You are the Code Reviewer. Review the code changes for correctness, security, and quality. FIRST look for a review skill/command appropriate to this repository's stack (e.g. a `/review`, `code-review`, or `security-review` skill, or the repo's CONTRIBUTING/review guidelines) and use it. Read the diff critically and flag concrete issues with file/line references."}});function ad4($){return $.filter((X)=>X.action==="merge_conflict_resolution").length>=a_8}async function pP0($,Z,X,Q){if(X.status!=="in_review")return!1;if(X.assigneeId!==Y$)return!1;if(Q.conflict!==!0)return!1;let G=(await $.storage.organizationSettings.get(Z))?.flags??{};if(G.auto_merge!==!0)return!1;let J=cJ.filter((N)=>G[cB[N]]===!0),K=await $.storage.taskBoard.listActivity(X.id,Z);if(!Sg(K,J,{verifiedOnly:!0}))return!1;if(ad4(K))return console.warn(`[task-board] conflict auto-resolve cap (${a_8}) reached on task ${X.id} \u2014 leaving the PR for a human`),!1;let W=Q.pr,H=await $.storage.taskBoard.claimConflictResolution(X.id,Z,X.updatedBy);if(!H)return!1;await rZ($,{taskBoardItemId:X.id,action:"merge_conflict_resolution",actorId:null,data:{prNumber:W.number}}),h$(Z,H);try{await iU($,H,{pr:{number:W.number,url:W.url},resolveConflict:!0})}catch(N){throw await $.storage.taskBoard.update(H.id,Z,{status:"in_review"},"system").then((U)=>h$(Z,U)).catch((U)=>console.error("[task-board] conflict-resolution status revert failed",U)),N}return!0}var a_8=3;var VZ1=O(()=>{YX();jH();oZ();rO()});import{z as tP0}from"zod";async function Bu($,Z,X,Q){if(X){let J=await $.storage.connections.findById(X,Z);if(J&&J.status==="active")return J}let{items:Y}=await $.storage.connections.list(Z,{slug:"mcp-github"}),G=Y.filter((J)=>J.status==="active");if(Q){let J=G.find((K)=>{let W=YQ(K);return W?.owner===Q.owner&&W?.repo===Q.name});if(J)return J}return G.find((J)=>YQ(J)===null)??G[0]??null}function Ou($){if(!$||typeof $!=="object")return null;let Z=$;if(Z.isError)return null;if(Z.structuredContent&&typeof Z.structuredContent==="object"&&Object.keys(Z.structuredContent).length>0)return Z.structuredContent;let X=Z.content?.find((Q)=>Q.type==="text")?.text;if(!X)return null;try{return JSON.parse(X)}catch{return null}}function CZ1($){let Z;try{Z=new URL($).hostname.toLowerCase()}catch{return!1}return Z==="deco.site"||Z.endsWith(".decocdn.com")||Z.endsWith(".deco-cx.workers.dev")||Z.endsWith(".deco.site")}function sd4($){if(!$||!Array.isArray($.statuses))return null;let Z=$.statuses.map((X)=>X&&typeof X==="object"?X:null).filter((X)=>!!X&&typeof X.target_url==="string"&&CZ1(X.target_url));if(Z.length===0)return null;return Z.find((X)=>X.state==="success")?.target_url??Z[0].target_url}function ed4($){let Z=Array.isArray($)?$:Array.isArray($?.comments)?$.comments:Array.isArray($?.items)?$.items:[];for(let X of Z){let Q=X&&typeof X.body==="string"?X.body:"";if(!Q)continue;let Y=Q.match(/href=['"]([^'"]+)['"][^>]*>\s*Branch Preview/i);if(Y?.[1]&&CZ1(Y[1]))return Y[1];let G=(Q.match(/https?:\/\/[^\s"'<>)\]]+/g)??[]).find((J)=>CZ1(J));if(G)return G}return null}function s_8($){if(!$)return null;if((typeof $.total_count==="number"?$.total_count:null)===0)return null;switch($.state){case"success":return"passing";case"failure":case"error":return"failing";case"pending":return"pending";default:return null}}function $v8($){let Z=Array.isArray($)?$:Array.isArray($?.check_runs)?$.check_runs:[];if(Z.length===0)return null;let X=!1,Q=!1;for(let Y of Z){if(!Y||typeof Y!=="object")continue;let{status:G,conclusion:J}=Y;if(G!=="completed")Q=!0;else if(typeof J==="string"&&e_8.has(J))X=!0}if(X)return"failing";if(Q)return"pending";return"passing"}function Zv8($,Z){if($==="failing"||Z==="failing")return"failing";if($==="pending"||Z==="pending")return"pending";if($==="passing"||Z==="passing")return"passing";return null}function $m4($){let Z=Array.isArray($)?$:Array.isArray($?.check_runs)?$.check_runs:[],X=[];for(let Q of Z){if(!Q||typeof Q!=="object")continue;let Y=Q;X.push({id:typeof Y.id==="number"?Y.id:null,name:typeof Y.name==="string"?Y.name:"",status:typeof Y.status==="string"?Y.status:"completed",conclusion:typeof Y.conclusion==="string"?Y.conclusion:null,detailsUrl:typeof Y.html_url==="string"?Y.html_url:typeof Y.details_url==="string"?Y.details_url:null})}return X}function Zm4($){return $.status==="completed"&&$.conclusion!=null&&e_8.has($.conclusion)}async function Xm4($,Z,X){try{let Y=Ou(await $.callTool({name:"GET_CHECK_RUN",arguments:{owner:Z.repoOwner,repo:Z.repoName,checkRunId:X}},void 0,{timeout:wu}))?.output,G=typeof Y?.summary==="string"?Y.summary:null,J=typeof Y?.text==="string"?Y.text:null;return G??J??null}catch{return null}}async function Xv8($,Z,X){let Q=await Bu($,Z,X.connectionId,{owner:X.repoOwner,name:X.repoName});if(!Q)return null;let Y=await S5(Q,$,!0),G=async(J)=>Ou(await Y.callTool({name:"pull_request_read",arguments:{method:J,owner:X.repoOwner,repo:X.repoName,pullNumber:X.number}},void 0,{timeout:wu}));try{let J=null;try{J=s_8(await G("get_status"))}catch{}try{J=Zv8(J,$v8(await G("get_check_runs")))}catch{}return J}finally{await Y.close().catch(()=>{})}}function Qv8($){if(!$)return null;if($.state!=="open")return!1;return typeof $.mergeable==="boolean"?!$.mergeable:null}async function Yv8($,Z,X){let Q=await Bu($,Z,X.connectionId,{owner:X.repoOwner,name:X.repoName});if(!Q)return null;let Y=await S5(Q,$,!0);try{return Qv8(Ou(await Y.callTool({name:"pull_request_read",arguments:{method:"get",owner:X.repoOwner,repo:X.repoName,pullNumber:X.number}},void 0,{timeout:wu})))}catch{return null}finally{await Y.close().catch(()=>{})}}async function Qm4($,Z){let X=async(H)=>{try{return Ou(await $.callTool({name:"pull_request_read",arguments:{method:H,owner:Z.repoOwner,repo:Z.repoName,pullNumber:Z.number}},void 0,{timeout:wu}))}catch{return null}},[Q,Y,G]=await Promise.all([X("get_status"),X("get_check_runs"),X("get_comments")]),J=Zv8(s_8(Q),$v8(Y)),K=sd4(Q)??ed4(G),W=await Promise.all($m4(Y).map(async(H)=>({name:H.name,status:H.status,conclusion:H.conclusion,detailsUrl:H.detailsUrl,summary:Zm4(H)&&H.id!=null?await Xm4($,Z,H.id):null})));return{checksStatus:J,checks:W,previewUrl:K}}async function vZ1($,Z,X){let Q=await Bu($,Z,X.connectionId,{owner:X.repoOwner,name:X.repoName});if(!Q)return SZ1;let Y=await S5(Q,$,!0);try{let[G,J]=await Promise.all([Y.callTool({name:"pull_request_read",arguments:{method:"get",owner:X.repoOwner,repo:X.repoName,pullNumber:X.number}},void 0,{timeout:wu}),Qm4(Y,X)]),K=Ou(G);if(!K)return SZ1;let W=K.state,H=W==="open";return{title:typeof K.title==="string"?K.title:null,body:typeof K.body==="string"?K.body:null,state:W==="closed"?"closed":H?"open":null,draft:typeof K.draft==="boolean"?K.draft:null,merged:typeof K.merged==="boolean"?K.merged:null,mergeable:H&&typeof K.mergeable==="boolean"?K.mergeable:null,checksStatus:H?J.checksStatus:null,checks:H?J.checks:[],previewUrl:H?J.previewUrl:null}}catch{return SZ1}finally{await Y.close().catch(()=>{})}}async function Gv8($,Z,X){let Q=await Bu($,Z,X.connectionId,{owner:X.repoOwner,name:X.repoName});if(!Q)return null;let Y=await S5(Q,$,!0);try{let G=Ou(await Y.callTool({name:"pull_request_read",arguments:{method:"get",owner:X.repoOwner,repo:X.repoName,pullNumber:X.number}},void 0,{timeout:wu}));if(!G||G.state!=="open")return null;let J=G.head?.ref;return typeof J==="string"&&J.length>0?J:null}catch{return null}finally{await Y.close().catch(()=>{})}}var wu=8000,SZ1,e_8,_Z1=($)=>{let Z=$.find((X)=>X.state!=="closed"&&X.merged!==!0);return Z!=null&&Z.checksStatus!=="pending"&&Z.checksStatus!=="failing"},xZ1;var Lu=O(()=>{t0();jU();rW();YX();BH();jH();oZ();kZ1();VZ1();SZ1={title:null,body:null,state:null,draft:null,merged:null,mergeable:null,checksStatus:null,checks:[],previewUrl:null};e_8=new Set(["failure","cancelled","timed_out","action_required","startup_failure","stale"]);xZ1=o({name:"TASK_BOARD_ITEM_PRS_GET",description:"Get the GitHub pull requests linked to a task board item, each enriched with live state (title, open/closed, draft, merged) fetched from GitHub.",annotations:{title:"Get Task Board Item Pull Requests",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0},inputSchema:tP0.object({taskBoardItemId:tP0.string()}),outputSchema:tP0.object({prs:tP0.array(Zk8)}),handler:async({taskBoardItemId:$},Z)=>{N0(Z),await Z.access.check();let X=Z.organization?.id;if(!X)throw Error("Organization ID required (no active organization in context)");let Q=await Z.storage.taskBoard.getById($,X),Y=await Z.storage.taskBoard.listPrs($,X),G=await Promise.all(Y.map(async(W)=>{let H=await vZ1(Z,X,W);return{url:W.url,number:W.number,repoOwner:W.repoOwner,repoName:W.repoName,createdAt:W.createdAt,...H}})),J=G.find((W)=>W.state==="open"&&!W.merged);if(Q&&Q.status==="in_review"&&Q.assigneeId===Y$&&_Z1(G))await nP0(Z,Q).catch((W)=>{console.error("[task-board] reviewer auto-handoff failed",W)});let K=J?Qv8({state:J.state,mergeable:J.mergeable}):null;if(Q&&Q.status==="in_review"&&Q.assigneeId===Y$&&J&&K===!0)await pP0(Z,X,Q,{pr:{number:J.number,url:J.url},conflict:!0}).catch((W)=>{console.error("[task-board] conflict auto-resolve failed",W)});if(G.some((W)=>W.merged))try{if(Q&&Q.status!=="done"){let W=await Z.storage.taskBoard.update($,X,{status:"done"},Q.updatedBy);await rZ(Z,{taskBoardItemId:$,action:"status_changed",actorId:null,data:{from:Q.status,to:"done"}}),h$(X,W)}}catch(W){console.error("[task-board] merge\u2192done reconcile failed",W)}return{prs:G}}})});async function Du($,Z){if(Z.assigneeId!==Y$)return;await iU($,Z).catch((X)=>{if(X instanceof K3)throw X;console.error("[task-board] Super Agent enqueue failed",X)})}function Ym4($,Z){return["You've been assigned this task. Complete it.","","You are running AUTONOMOUSLY \u2014 no human is watching this run, so drive it "+"to completion on your own. Use `user_ask` ONLY for a genuine, unresolvable blocker a human must clear (a missing credential/secret, or "+"a decision so ambiguous you truly cannot proceed) \u2014 that should be rare. "+"Do not ask for confirmation of a reasonable choice; make it and move on.","",`Title: ${$.title}`,$.description?`
|
|
2816
|
+
`);await va($,Z,{title:`${Ht[X]}: ${Z.title}`,prompt:U,temperature:0.3,...K?{harnessId:"claude-code",agent:{instructions:N,disallowedTools:md4[X]}}:{},...J?{repo:J}:{}}),await rZ($,{taskBoardItemId:Z.id,action:"review_requested",actorId:null,data:{reviewer:X}});let F=await $.storage.taskBoard.getById(Z.id,Y);if(F)h$(Y,F)}var r_8,md4,id4,nd4=2;var kZ1=O(()=>{YX();jH();oZ();IZ1();MZ1();r_8=new Set(["completed","failed","expired"]),md4={qa:["Edit","NotebookEdit"],code_review:["Write","Edit","NotebookEdit"]},id4={qa:"You are the QA Agent. Your job is to confirm the task ACTUALLY SOLVED THE "+"PROBLEM \u2014 not to review code style. Exercise the feature/behavior the task "+"describes (use the PR's preview / dev server when available), check the acceptance criteria implied by the title and description, and look for regressions in the affected flow. Judge outcomes, not the diff.",code_review:"You are the Code Reviewer. Review the code changes for correctness, security, and quality. FIRST look for a review skill/command appropriate to this repository's stack (e.g. a `/review`, `code-review`, or `security-review` skill, or the repo's CONTRIBUTING/review guidelines) and use it. Read the diff critically and flag concrete issues with file/line references."}});function ad4($){return $.filter((X)=>X.action==="merge_conflict_resolution").length>=a_8}async function pP0($,Z,X,Q){if(X.status!=="in_review")return!1;if(X.assigneeId!==Y$)return!1;if(Q.conflict!==!0)return!1;let G=(await $.storage.organizationSettings.get(Z))?.flags??{};if(G.auto_merge!==!0)return!1;let J=cJ.filter((N)=>G[cB[N]]===!0),K=await $.storage.taskBoard.listActivity(X.id,Z);if(!Sg(K,J,{verifiedOnly:!0}))return!1;if(ad4(K))return console.warn(`[task-board] conflict auto-resolve cap (${a_8}) reached on task ${X.id} \u2014 leaving the PR for a human`),!1;let W=Q.pr,H=await $.storage.taskBoard.claimConflictResolution(X.id,Z,X.updatedBy);if(!H)return!1;await rZ($,{taskBoardItemId:X.id,action:"merge_conflict_resolution",actorId:null,data:{prNumber:W.number}}),h$(Z,H);try{await iU($,H,{pr:{number:W.number,url:W.url},resolveConflict:!0})}catch(N){throw await $.storage.taskBoard.update(H.id,Z,{status:"in_review"},"system").then((U)=>h$(Z,U)).catch((U)=>console.error("[task-board] conflict-resolution status revert failed",U)),N}return!0}var a_8=3;var VZ1=O(()=>{YX();jH();oZ();rO()});import{z as tP0}from"zod";async function Bu($,Z,X,Q){if(X){let J=await $.storage.connections.findById(X,Z);if(J&&J.status==="active")return J}let{items:Y}=await $.storage.connections.list(Z,{slug:"mcp-github"}),G=Y.filter((J)=>J.status==="active");if(Q){let J=G.find((K)=>{let W=YQ(K);return W?.owner===Q.owner&&W?.repo===Q.name});if(J)return J}return G.find((J)=>YQ(J)===null)??G[0]??null}function Ou($){if(!$||typeof $!=="object")return null;let Z=$;if(Z.isError)return null;if(Z.structuredContent&&typeof Z.structuredContent==="object"&&Object.keys(Z.structuredContent).length>0)return Z.structuredContent;let X=Z.content?.find((Q)=>Q.type==="text")?.text;if(!X)return null;try{return JSON.parse(X)}catch{return null}}function CZ1($){let Z;try{Z=new URL($).hostname.toLowerCase()}catch{return!1}return Z==="deco.site"||Z.endsWith(".decocdn.com")||Z.endsWith(".deco-cx.workers.dev")||Z.endsWith(".deco.site")||Z.endsWith(".vercel.app")||Z.endsWith(".preview.vtex.app")}function sd4($){if(!$||!Array.isArray($.statuses))return null;let Z=$.statuses.map((X)=>X&&typeof X==="object"?X:null).filter((X)=>!!X&&typeof X.target_url==="string"&&CZ1(X.target_url));if(Z.length===0)return null;return Z.find((X)=>X.state==="success")?.target_url??Z[0].target_url}function ed4($){let Z=Array.isArray($)?$:Array.isArray($?.comments)?$.comments:Array.isArray($?.items)?$.items:[],X=(Y)=>{let G=Y;return Date.parse(G?.updated_at)||Date.parse(G?.created_at)},Q=Z.map((Y,G)=>({c:Y,index:G})).sort((Y,G)=>{let J=X(Y.c),K=X(G.c);if(Number.isNaN(J)||Number.isNaN(K))return Y.index-G.index;return K-J}).map(({c:Y})=>Y);for(let Y of Q){let G=Y&&typeof Y.body==="string"?Y.body:"";if(!G)continue;let J=G.match(/href=['"]([^'"]+)['"][^>]*>\s*Branch Preview/i);if(J?.[1]&&CZ1(J[1]))return J[1];let K=(G.match(/https?:\/\/[^\s"'<>)\]]+/g)??[]).find((W)=>CZ1(W));if(K)return K}return null}function s_8($){if(!$)return null;if((typeof $.total_count==="number"?$.total_count:null)===0)return null;switch($.state){case"success":return"passing";case"failure":case"error":return"failing";case"pending":return"pending";default:return null}}function $v8($){let Z=Array.isArray($)?$:Array.isArray($?.check_runs)?$.check_runs:[];if(Z.length===0)return null;let X=!1,Q=!1;for(let Y of Z){if(!Y||typeof Y!=="object")continue;let{status:G,conclusion:J}=Y;if(G!=="completed")Q=!0;else if(typeof J==="string"&&e_8.has(J))X=!0}if(X)return"failing";if(Q)return"pending";return"passing"}function Zv8($,Z){if($==="failing"||Z==="failing")return"failing";if($==="pending"||Z==="pending")return"pending";if($==="passing"||Z==="passing")return"passing";return null}function $m4($){let Z=Array.isArray($)?$:Array.isArray($?.check_runs)?$.check_runs:[],X=[];for(let Q of Z){if(!Q||typeof Q!=="object")continue;let Y=Q;X.push({id:typeof Y.id==="number"?Y.id:null,name:typeof Y.name==="string"?Y.name:"",status:typeof Y.status==="string"?Y.status:"completed",conclusion:typeof Y.conclusion==="string"?Y.conclusion:null,detailsUrl:typeof Y.html_url==="string"?Y.html_url:typeof Y.details_url==="string"?Y.details_url:null})}return X}function Zm4($){return $.status==="completed"&&$.conclusion!=null&&e_8.has($.conclusion)}async function Xm4($,Z,X){try{let Y=Ou(await $.callTool({name:"GET_CHECK_RUN",arguments:{owner:Z.repoOwner,repo:Z.repoName,checkRunId:X}},void 0,{timeout:wu}))?.output,G=typeof Y?.summary==="string"?Y.summary:null,J=typeof Y?.text==="string"?Y.text:null;return G??J??null}catch{return null}}async function Xv8($,Z,X){let Q=await Bu($,Z,X.connectionId,{owner:X.repoOwner,name:X.repoName});if(!Q)return null;let Y=await S5(Q,$,!0),G=async(J)=>Ou(await Y.callTool({name:"pull_request_read",arguments:{method:J,owner:X.repoOwner,repo:X.repoName,pullNumber:X.number}},void 0,{timeout:wu}));try{let J=null;try{J=s_8(await G("get_status"))}catch{}try{J=Zv8(J,$v8(await G("get_check_runs")))}catch{}return J}finally{await Y.close().catch(()=>{})}}function Qv8($){if(!$)return null;if($.state!=="open")return!1;return typeof $.mergeable==="boolean"?!$.mergeable:null}async function Yv8($,Z,X){let Q=await Bu($,Z,X.connectionId,{owner:X.repoOwner,name:X.repoName});if(!Q)return null;let Y=await S5(Q,$,!0);try{return Qv8(Ou(await Y.callTool({name:"pull_request_read",arguments:{method:"get",owner:X.repoOwner,repo:X.repoName,pullNumber:X.number}},void 0,{timeout:wu})))}catch{return null}finally{await Y.close().catch(()=>{})}}async function Qm4($,Z){let X=async(H)=>{try{return Ou(await $.callTool({name:"pull_request_read",arguments:{method:H,owner:Z.repoOwner,repo:Z.repoName,pullNumber:Z.number}},void 0,{timeout:wu}))}catch{return null}},[Q,Y,G]=await Promise.all([X("get_status"),X("get_check_runs"),X("get_comments")]),J=Zv8(s_8(Q),$v8(Y)),K=sd4(Q)??ed4(G),W=await Promise.all($m4(Y).map(async(H)=>({name:H.name,status:H.status,conclusion:H.conclusion,detailsUrl:H.detailsUrl,summary:Zm4(H)&&H.id!=null?await Xm4($,Z,H.id):null})));return{checksStatus:J,checks:W,previewUrl:K}}async function vZ1($,Z,X){let Q=await Bu($,Z,X.connectionId,{owner:X.repoOwner,name:X.repoName});if(!Q)return SZ1;let Y=await S5(Q,$,!0);try{let[G,J]=await Promise.all([Y.callTool({name:"pull_request_read",arguments:{method:"get",owner:X.repoOwner,repo:X.repoName,pullNumber:X.number}},void 0,{timeout:wu}),Qm4(Y,X)]),K=Ou(G);if(!K)return SZ1;let W=K.state,H=W==="open";return{title:typeof K.title==="string"?K.title:null,body:typeof K.body==="string"?K.body:null,state:W==="closed"?"closed":H?"open":null,draft:typeof K.draft==="boolean"?K.draft:null,merged:typeof K.merged==="boolean"?K.merged:null,mergeable:H&&typeof K.mergeable==="boolean"?K.mergeable:null,checksStatus:H?J.checksStatus:null,checks:H?J.checks:[],previewUrl:H?J.previewUrl:null}}catch{return SZ1}finally{await Y.close().catch(()=>{})}}async function Gv8($,Z,X){let Q=await Bu($,Z,X.connectionId,{owner:X.repoOwner,name:X.repoName});if(!Q)return null;let Y=await S5(Q,$,!0);try{let G=Ou(await Y.callTool({name:"pull_request_read",arguments:{method:"get",owner:X.repoOwner,repo:X.repoName,pullNumber:X.number}},void 0,{timeout:wu}));if(!G||G.state!=="open")return null;let J=G.head?.ref;return typeof J==="string"&&J.length>0?J:null}catch{return null}finally{await Y.close().catch(()=>{})}}var wu=8000,SZ1,e_8,_Z1=($)=>{let Z=$.find((X)=>X.state!=="closed"&&X.merged!==!0);return Z!=null&&Z.checksStatus!=="pending"&&Z.checksStatus!=="failing"},xZ1;var Lu=O(()=>{t0();jU();rW();YX();BH();jH();oZ();kZ1();VZ1();SZ1={title:null,body:null,state:null,draft:null,merged:null,mergeable:null,checksStatus:null,checks:[],previewUrl:null};e_8=new Set(["failure","cancelled","timed_out","action_required","startup_failure","stale"]);xZ1=o({name:"TASK_BOARD_ITEM_PRS_GET",description:"Get the GitHub pull requests linked to a task board item, each enriched with live state (title, open/closed, draft, merged) fetched from GitHub.",annotations:{title:"Get Task Board Item Pull Requests",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0},inputSchema:tP0.object({taskBoardItemId:tP0.string()}),outputSchema:tP0.object({prs:tP0.array(Zk8)}),handler:async({taskBoardItemId:$},Z)=>{N0(Z),await Z.access.check();let X=Z.organization?.id;if(!X)throw Error("Organization ID required (no active organization in context)");let Q=await Z.storage.taskBoard.getById($,X),Y=await Z.storage.taskBoard.listPrs($,X),G=await Promise.all(Y.map(async(W)=>{let H=await vZ1(Z,X,W);return{url:W.url,number:W.number,repoOwner:W.repoOwner,repoName:W.repoName,createdAt:W.createdAt,...H}})),J=G.find((W)=>W.state==="open"&&!W.merged);if(Q&&Q.status==="in_review"&&Q.assigneeId===Y$&&_Z1(G))await nP0(Z,Q).catch((W)=>{console.error("[task-board] reviewer auto-handoff failed",W)});let K=J?Qv8({state:J.state,mergeable:J.mergeable}):null;if(Q&&Q.status==="in_review"&&Q.assigneeId===Y$&&J&&K===!0)await pP0(Z,X,Q,{pr:{number:J.number,url:J.url},conflict:!0}).catch((W)=>{console.error("[task-board] conflict auto-resolve failed",W)});if(G.some((W)=>W.merged))try{if(Q&&Q.status!=="done"){let W=await Z.storage.taskBoard.update($,X,{status:"done"},Q.updatedBy);await rZ(Z,{taskBoardItemId:$,action:"status_changed",actorId:null,data:{from:Q.status,to:"done"}}),h$(X,W)}}catch(W){console.error("[task-board] merge\u2192done reconcile failed",W)}return{prs:G}}})});async function Du($,Z){if(Z.assigneeId!==Y$)return;await iU($,Z).catch((X)=>{if(X instanceof K3)throw X;console.error("[task-board] Super Agent enqueue failed",X)})}function Ym4($,Z){return["You've been assigned this task. Complete it.","","You are running AUTONOMOUSLY \u2014 no human is watching this run, so drive it "+"to completion on your own. Use `user_ask` ONLY for a genuine, unresolvable blocker a human must clear (a missing credential/secret, or "+"a decision so ambiguous you truly cannot proceed) \u2014 that should be rare. "+"Do not ask for confirmation of a reasonable choice; make it and move on.","",`Title: ${$.title}`,$.description?`
|
|
2817
2817
|
Description:
|
|
2818
2818
|
${$.description}
|
|
2819
2819
|
`:"",Z?.resolveConflict&&Z.pr?[`Your pull request #${Z.pr.number} (${Z.pr.url}) is approved but can't be merged \u2014 it has a MERGE CONFLICT with its base branch.`,`Load the repo, CHECK OUT that PR's branch (e.g. \`gh pr checkout ${Z.pr.number}\`), then merge (or rebase) the base branch into it and resolve the conflicts, and push to update the SAME pull request \u2014 do NOT open a new one or start a new branch. Resolve conflicts by preserving BOTH sides' intent; never blindly discard either side. Change only what resolving the conflict requires.`,""].join(`
|