decocms 4.502.10 → 4.503.2
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/{ActiveShapeUtils-CTZB0gAT.js → ActiveShapeUtils-CBLSJqBl.js} +1 -1
- package/dist/client/assets/{AlertCircle-DbZXzHU4.js → AlertCircle-BFUZ4yx0.js} +1 -1
- package/dist/client/assets/AreaChart-DKrmhkRJ.js +1 -0
- package/dist/client/assets/{ArrowLeft-DHzrTLxh.js → ArrowLeft-CK2OAC0l.js} +1 -1
- package/dist/client/assets/{ArrowUp-B82v86-f.js → ArrowUp-U6_gobY2.js} +1 -1
- package/dist/client/assets/{BarChart-BJWxjtS7.js → BarChart-DBqZyJQX.js} +1 -1
- package/dist/client/assets/{Building02-DlUkTaCT.js → Building02-Ddm6hNyu.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DpAvLSfP.js → CategoricalChart-DYWjGYq1.js} +3 -3
- package/dist/client/assets/{CheckCircle-C9xArOgT.js → CheckCircle-BWW06ZXQ.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DhFNZZ7b.js → ChevronSelectorVertical-DKcwgXpF.js} +1 -1
- package/dist/client/assets/{ChevronUp-9p6Wfyjc.js → ChevronUp-CTrNq9Nk.js} +1 -1
- package/dist/client/assets/{Copy01-C21BKNhK.js → Copy01-TJP2zB12.js} +1 -1
- package/dist/client/assets/{CreditCard01-BBQFm-D2.js → CreditCard01-Bm6_xB5H.js} +1 -1
- package/dist/client/assets/{DotsVertical-C79u6eki.js → DotsVertical-DKl8j3BE.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-BPj030RE.js → ErrorBarContext-CR5xIaDQ.js} +1 -1
- package/dist/client/assets/{Globe04-C7fefIAW.js → Globe04-ClrCqE7c.js} +1 -1
- package/dist/client/assets/{Image01-DLGYTG6l.js → Image01-Cf_YxPro.js} +1 -1
- package/dist/client/assets/{Key01-BdXZUygf.js → Key01-55Z6tHcr.js} +1 -1
- package/dist/client/assets/{Link01-nN5I95Fv.js → Link01-DNXOSsg9.js} +1 -1
- package/dist/client/assets/{LinkBroken01-zQXz81xm.js → LinkBroken01-Vuoqu_ZW.js} +1 -1
- package/dist/client/assets/{Monitor01-fhRCZgsV.js → Monitor01-C-mB2rao.js} +1 -1
- package/dist/client/assets/{Play-BVd9KRbk.js → Play-CUFyJJIt.js} +1 -1
- package/dist/client/assets/{Plus-BQGAsZcO.js → Plus-D-GSl2MA.js} +1 -1
- package/dist/client/assets/{SearchMd-DpkjOBW1.js → SearchMd-CkV8MM4H.js} +1 -1
- package/dist/client/assets/{Sector-BwVl_qyy.js → Sector-CNZsIxmG.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-B8fMxhTk.js → ShoppingBag01-dI1cRqeE.js} +1 -1
- package/dist/client/assets/{Sun-zOV0D2Wt.js → Sun-BPl8u-yx.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-rhX6IQru.js → SwitchHorizontal01-KDjTaTLX.js} +1 -1
- package/dist/client/assets/{Tool01-Dg-pQnlG.js → Tool01-CvAlZ6_R.js} +1 -1
- package/dist/client/assets/{Trash01-Xx4Vpu1z.js → Trash01-BzUZQR5Y.js} +1 -1
- package/dist/client/assets/{Upload01-BQIZ0qft.js → Upload01-CdgDB-zC.js} +1 -1
- package/dist/client/assets/{User01-G7-LShqY.js → User01-CinpYulR.js} +1 -1
- package/dist/client/assets/{UserSquare-nowvR0IP.js → UserSquare-0R6kuy9W.js} +1 -1
- package/dist/client/assets/{Users01-DQmBq_uH.js → Users01-DFSTtPtZ.js} +1 -1
- package/dist/client/assets/{XAxis-DnACCXBs.js → XAxis-CMCcO3jI.js} +1 -1
- package/dist/client/assets/{XClose-COhsaGEO.js → XClose-CXxsMd9c.js} +1 -1
- package/dist/client/assets/{ZoomOut-BfZ_MoNU.js → ZoomOut-C1rwTYBB.js} +1 -1
- package/dist/client/assets/{access-gate-CSIEzs4r.js → access-gate-BSx5LbNZ.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BJ9BKenv.js → add-connection-dialog-CNB1XZS8.js} +1 -1
- package/dist/client/assets/{agent-analytics-D6kjzCQ7.js → agent-analytics-BKsJAgnt.js} +1 -1
- package/dist/client/assets/agent-app-DBSthuoA.js +1 -0
- package/dist/client/assets/{agent-assets-zN5MFK69.js → agent-assets-CvHLRtfR.js} +1 -1
- package/dist/client/assets/{agent-automation-DrGgySuT.js → agent-automation-DG660AlN.js} +1 -1
- package/dist/client/assets/{agent-automations-B2esCZDo.js → agent-automations-DkNZsDdV.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-RG33fd5J.js → agent-connect-sources-DFGjLsvu.js} +1 -1
- package/dist/client/assets/agent-deck-DW69LMk-.js +1 -0
- package/dist/client/assets/{agent-e2e-kwpPDUnP.js → agent-e2e-CTTKhY1C.js} +1 -1
- package/dist/client/assets/{agent-experiments-CNdgRxuu.js → agent-experiments-B23reQrT.js} +1 -1
- package/dist/client/assets/{agent-file-DXydhQME.js → agent-file-CFgK4Fqg.js} +1 -1
- package/dist/client/assets/{agent-hosting-DlozufnU.js → agent-hosting-BL7RyxMT.js} +1 -1
- package/dist/client/assets/{agent-icon-w0fx2BM9.js → agent-icon-Bmu0Xuy8.js} +1 -1
- package/dist/client/assets/agent-library-D9aAC92j.js +1 -0
- package/dist/client/assets/agent-library-file-Dlq-Vts6.js +1 -0
- package/dist/client/assets/agent-monitor-Dxt5K5x_.js +1 -0
- package/dist/client/assets/agent-overview-CAzScYJD.js +1 -0
- package/dist/client/assets/{agent-releases-BkIdH2My.js → agent-releases-RSbZ96r7.js} +1 -1
- package/dist/client/assets/agent-settings-5EOlZJW6.js +1 -0
- package/dist/client/assets/{agent-site-editor-Dip0L8FQ.js → agent-site-editor-DFWKub_t.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-I8N3vaXE.js +2 -0
- package/dist/client/assets/agent-site-editor-content-uhd8Bnc-.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CV5DbDBm.js +1 -0
- package/dist/client/assets/agent-view-QNUTYcIi.js +1 -0
- package/dist/client/assets/{agent-view-guard-C6h6rG-Z.js → agent-view-guard-BwubZYi8.js} +1 -1
- package/dist/client/assets/{agents-list-DDQraAcj.js → agents-list-L7YgNFph.js} +1 -1
- package/dist/client/assets/{ai-providers-DmFV4s-Y.js → ai-providers-DEeLkiCM.js} +1 -1
- package/dist/client/assets/{alert-Bl0z1bzt.js → alert-CnRQ3m-7.js} +1 -1
- package/dist/client/assets/{alert-dialog-BudrRkY9.js → alert-dialog-BaBKldUA.js} +1 -1
- package/dist/client/assets/{analytics-sections-BYrQ2Tus.js → analytics-sections-BIEC86HP.js} +1 -1
- package/dist/client/assets/api-keys-BgtInlXe.js +1 -0
- package/dist/client/assets/{api-keys-Du67GzRh.js → api-keys-CmpJo1Rr.js} +1 -1
- package/dist/client/assets/{app-editor-4p8eBhOq.js → app-editor-BqvAOKlk.js} +1 -1
- package/dist/client/assets/{asset-utils-COm4-tit.js → asset-utils--N2gsOKr.js} +1 -1
- package/dist/client/assets/{auth-BBFulaR2.js → auth-BeK8rRbB.js} +1 -1
- package/dist/client/assets/{auth-catchall-BP0YZzgG.js → auth-catchall-fFMHk_ps.js} +1 -1
- package/dist/client/assets/{auth-entry-BfanHpTj.js → auth-entry-C1_Znn_c.js} +1 -1
- package/dist/client/assets/{auth-split-layout-OXHnaFJZ.js → auth-split-layout-CocPnGfp.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-uNX2a7wo.js → authenticate-and-persist-oauth-DJwJCiC8.js} +1 -1
- package/dist/client/assets/{automation-list-row-Cxes9h3I.js → automation-list-row-3WI1rtPZ.js} +1 -1
- package/dist/client/assets/{automation-runs-CkMQ30IJ.js → automation-runs-dkpbdf4I.js} +1 -1
- package/dist/client/assets/{automations-DYMDL0bR.js → automations-CaP79ol1.js} +1 -1
- package/dist/client/assets/{autosend-8U0-dRxu.js → autosend-B-VPnrp2.js} +1 -1
- package/dist/client/assets/{avatar--kF1Sxbg.js → avatar-yCbsNNbw.js} +1 -1
- package/dist/client/assets/{badge-CalXC-Hw.js → badge-Zdi_g359.js} +1 -1
- package/dist/client/assets/{block-document-DIEwEDyG.js → block-document-D4x1DRNW.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-DHduztUh.js → blocks-preview-workspace-context-CMtVQxL8.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-Dj62473g.js → blocks-tab-states-B7_Q2Byx.js} +3 -3
- package/dist/client/assets/{blog-schema-C78FYDZX.js → blog-schema-D0r94Mwa.js} +1 -1
- package/dist/client/assets/{board-analytics-C_fzmWgr.js → board-analytics-DjFw48Ii.js} +1 -1
- package/dist/client/assets/{buckets-CvusBLr6.js → buckets-DmovZm0n.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CvtJUY07.js → build-improve-prompt-doc-Cd4DLFMv.js} +1 -1
- package/dist/client/assets/{calendar-BrDGheLn.js → calendar-aMW3a7Qx.js} +1 -1
- package/dist/client/assets/{capability-load-error-unMOGE7-.js → capability-load-error-xmV40q_-.js} +1 -1
- package/dist/client/assets/{category-editor-BHP5YPUn.js → category-editor-BYf-_N2d.js} +1 -1
- package/dist/client/assets/{chart-DHN0nyqC.js → chart-D1eqwoYD.js} +1 -1
- package/dist/client/assets/{chat-context-C7boc8JM.js → chat-context-C4pDshj1.js} +1 -1
- package/dist/client/assets/{chat-draft-Y7uteI96.js → chat-draft-D5dlb_sl.js} +1 -1
- package/dist/client/assets/{checkbox-CWYWbV7j.js → checkbox-C2l5tKo2.js} +1 -1
- package/dist/client/assets/{choose-editor-CuZGoYGT.js → choose-editor-C_NzKjq2.js} +1 -1
- package/dist/client/assets/{cli-auth-success-B-M6jnbq.js → cli-auth-success-DSx-mAhh.js} +1 -1
- package/dist/client/assets/{client-icons-DNcBuTjH.js → client-icons-BasHQFnS.js} +1 -1
- package/dist/client/assets/cms-settings-editor-BB3l1bfM.js +1 -0
- package/dist/client/assets/{collapsible-dPqRUFUS.js → collapsible-CDZFoOK-.js} +1 -1
- package/dist/client/assets/{collection-detail-By5cY3Zd.js → collection-detail-DkNCk0OQ.js} +1 -1
- package/dist/client/assets/{collection-display-button-C8-mjKkg.js → collection-display-button--eCg5c5n.js} +1 -1
- package/dist/client/assets/{collection-search-Cpx0YrAf.js → collection-search-sopr7ssV.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DEDdyYPP.js → collection-table-wrapper-Cy3Cbckv.js} +1 -1
- package/dist/client/assets/{collection-tabs-dQf8n2Wy.js → collection-tabs-DU5QTifc.js} +1 -1
- package/dist/client/assets/{column-rules-CB8_X7l2.js → column-rules-Z54WqqNc.js} +1 -1
- package/dist/client/assets/{combobox-CIJ-TFnx.js → combobox-C2hXpc1p.js} +1 -1
- package/dist/client/assets/{command-D5QXIfZJ.js → command-BSGZ-TwS.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CCrMSp7z.js → companion-mcps-section-d9HGklIc.js} +1 -1
- package/dist/client/assets/{config-C_5rJ3AS.js → config-CddNRjRY.js} +1 -1
- package/dist/client/assets/{connect-D80egF9f.js → connect-BGfL3A9r.js} +1 -1
- package/dist/client/assets/{connect-layout-BZV7md2x.js → connect-layout-DoM7vuFX.js} +1 -1
- package/dist/client/assets/{connection-DodWF9zN.js → connection-B0eFNfCu.js} +1 -1
- package/dist/client/assets/{connection-card-BNE5emfZ.js → connection-card-BzTYJa6s.js} +1 -1
- package/dist/client/assets/{connection-detail-CsNgDg4n.js → connection-detail-Cwz-qT82.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C3pfz3w3.js → connection-form-helpers-ChgreO5F.js} +1 -1
- package/dist/client/assets/{connections-BTwsUVHU.js → connections-CnirV_66.js} +1 -1
- package/dist/client/assets/{content-tab-FdqIt_Oh.js → content-tab-BIEsoSfa.js} +3 -3
- package/dist/client/assets/{context-BSqPFNMt.js → context-DEuw9CjH.js} +1 -1
- package/dist/client/assets/{context-menu-DMp6u7s_.js → context-menu-CHrxflOD.js} +1 -1
- package/dist/client/assets/{core.esm-B8TX0IEB.js → core.esm-CWXW2IWJ.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DBgtiZ3V.js → create-organization-dialog-Bci4qKSS.js} +1 -1
- package/dist/client/assets/{daily-pulse-D6PbLmHv.js → daily-pulse-CRZ8lDnm.js} +1 -1
- package/dist/client/assets/{discover-CCdXzYXu.js → discover-C3iLTVFB.js} +1 -1
- package/dist/client/assets/{domain-settings-B97ncMbo.js → domain-settings-DdY9W_8b.js} +1 -1
- package/dist/client/assets/{drawer-CYWmH_yu.js → drawer-BpEasqMM.js} +1 -1
- package/dist/client/assets/{editor-BhHZG0fs.js → editor-DQK8Gbky.js} +1 -1
- package/dist/client/assets/{editor-classes-D8DelYa3.js → editor-classes-wKHzvXkJ.js} +1 -1
- package/dist/client/assets/{empty-state-D5cCxi9-.js → empty-state-Ck0Y0zH4.js} +1 -1
- package/dist/client/assets/{empty-state-CsxboN3T.js → empty-state-GUv-DLNf.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BAExt33p.js → extract-connection-data-CyaR6DQN.js} +1 -1
- package/dist/client/assets/{feature-gate-C4xy7xJ2.js → feature-gate-Cd3TCuYG.js} +1 -1
- package/dist/client/assets/{feature-paywall-yoBHjyVR.js → feature-paywall-HnwykYzM.js} +1 -1
- package/dist/client/assets/{file-explorer-0Yc8xmWi.js → file-explorer-B8GvovSI.js} +1 -1
- package/dist/client/assets/{file-preview-BdFmryUk.js → file-preview-KNDU2UhF.js} +1 -1
- package/dist/client/assets/{file-share-button-D-jwYu_R.js → file-share-button-BX7_JCXp.js} +1 -1
- package/dist/client/assets/{file-type-icon-DQMhIyFo.js → file-type-icon-C2WSm6EM.js} +1 -1
- package/dist/client/assets/flat-project-XWFiDywx.js +1 -0
- package/dist/client/assets/{folder-icon-qj3AAsYb.js → folder-icon-DOSAeTvE.js} +1 -1
- package/dist/client/assets/{form-DLKWVYAo.js → form-Dz-wry37.js} +1 -1
- package/dist/client/assets/{general-ek_y6y3g.js → general-lahSHdvs.js} +1 -1
- package/dist/client/assets/home-CfslMwmV.js +1 -0
- package/dist/client/assets/{hosted-publish-feedback-DxQxeJ4m.js → hosted-publish-feedback-D7K1BgAP.js} +1 -1
- package/dist/client/assets/{icon-button-_GCussIb.js → icon-button-BbQESQAz.js} +1 -1
- package/dist/client/assets/{index-B58qKdtq.js → index-BFWcpEys.js} +1 -1
- package/dist/client/assets/index-BX4Ek3Q9.js +5 -0
- package/dist/client/assets/{index-dpDf5Mys.js → index-BhuMySoe.js} +1 -1
- package/dist/client/assets/{index-DzGYQ4je.js → index-BoB02eW2.js} +37 -37
- package/dist/client/assets/{index-D5cXidcn.js → index-CAsLc9Zw.js} +1 -1
- package/dist/client/assets/{index-By2pGaur.js → index-CD1O2KuY.js} +5 -5
- package/dist/client/assets/{index-DRl6L2p1.js → index-COyZFAVd.js} +1 -1
- package/dist/client/assets/{index-Ch32U0g7.js → index-CVeMcxNw.js} +1 -1
- package/dist/client/assets/{index-C6EeQiXi.js → index-Cdsu1Nw_.js} +1 -1
- package/dist/client/assets/{index-2oqi1IPe.js → index-DSuQX-Dj.js} +1 -1
- package/dist/client/assets/{index-2P0tcyzM.js → index-DhnL-yRw.js} +1 -1
- package/dist/client/assets/{index-DEpAEWYh.js → index-DuSo48nd.js} +1 -1
- package/dist/client/assets/{index-CFsJz__8.js → index-Fqg3dcpq.js} +1 -1
- package/dist/client/assets/{index-DkvszBzo.js → index-mPiuZtAa.js} +1 -1
- package/dist/client/assets/{index-CO_EJ9J6.js → index-qp2WMoaq.js} +1 -1
- package/dist/client/assets/{index-redirect-BU3dut4I.js → index-redirect-LGC8XAQa.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-pgDKCF24.js → infiniteQueryObserver-BuOPvaCd.js} +1 -1
- package/dist/client/assets/{infra-billing-DiVJM4iA.js → infra-billing-C7a9CxBG.js} +1 -1
- package/dist/client/assets/{input-B1h4zvN9.js → input-CC2XqVda.js} +1 -1
- package/dist/client/assets/{input-B38h0Qtk.js → input-Dx6Yl3YV.js} +3 -3
- package/dist/client/assets/{integration-icon-BxOhvDOr.js → integration-icon-YHEiRLgT.js} +1 -1
- package/dist/client/assets/{jira-icon-DY_jBl8B.js → jira-icon-i9apovX2.js} +1 -1
- package/dist/client/assets/{label-CW8ZlpsA.js → label-CsyEQPG4.js} +1 -1
- package/dist/client/assets/{layout-DnHQN45O.js → layout-BT112QdT.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CIAoGOpa.js → legacy-agents-deep-HgU3c2Dz.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CsdcjRMa.js → legacy-main-redirect-jScx_XSf.js} +1 -1
- package/dist/client/assets/library-CWV47kSp.js +1 -0
- package/dist/client/assets/{library-tab-Dax3-FxG.js → library-tab-9158ORpA.js} +1 -1
- package/dist/client/assets/{login-CUYStE89.js → login-OE28YT2s.js} +1 -1
- package/dist/client/assets/{markdown-DeT-O_Oi.js → markdown-TXCHEe-4.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DcFodUL5.js → mcp-app-renderer-BAlCN3Lv.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BpHonAUS.js → mcp-oauth-BFqNJ-iQ.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BNbzufHU.js → mcp-oauth-CuU6LL15.js} +1 -1
- package/dist/client/assets/{members-DtzKsLnR.js → members-CbEEa2ua.js} +1 -1
- package/dist/client/assets/{memory-BfLKA6nk.js → memory-malk94i-.js} +1 -1
- package/dist/client/assets/{mini-report-page-DHTuyxkC.js → mini-report-page-Dhes7qGv.js} +1 -1
- package/dist/client/assets/{mock-board-BN3sYkpd.js → mock-board-B4GBU96k.js} +1 -1
- package/dist/client/assets/{monaco-editor-DIoQcD6P.js → monaco-editor-DIn5LVAo.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DWB3Il2o.js → monitoring-stats-row-CsXWM1-N.js} +1 -1
- package/dist/client/assets/{multi-select-DW--_mMy.js → multi-select-jv5l4gKB.js} +1 -1
- package/dist/client/assets/{mustache-C198M5dI.js → mustache-C3mAjW3w.js} +1 -1
- package/dist/client/assets/{new-project-dialog-rdjKEc0R.js → new-project-dialog-DCPZVRuS.js} +1 -1
- package/dist/client/assets/{oauth-callback-aF742nt_.js → oauth-callback-C7bM7rgT.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-C4-2VbK9.js → oauth-callback-ai-provider-maa6Zm5e.js} +1 -1
- package/dist/client/assets/{onboarding-DL3n8PFk.js → onboarding-ds1UbiQ9.js} +1 -1
- package/dist/client/assets/{openai-conversation-DCn05VED.js → openai-conversation-BSvbWT0F.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-D4gNzi2A.js → optimistic-project-sidebar-views-2rlAyeqj.js} +1 -1
- package/dist/client/assets/order-monitor-day-CZG8_Uqo.js +1 -0
- package/dist/client/assets/{organization-choice-CdLzIyKm.js → organization-choice-CGGV7pYx.js} +1 -1
- package/dist/client/assets/{orgs-CKuopKwY.js → orgs-DSh5ncFV.js} +1 -1
- package/dist/client/assets/{page-seo-form-8rJfoHEA.js → page-seo-form-BPMiXtW-.js} +1 -1
- package/dist/client/assets/{pair-D9iXgt--.js → pair-C9IKm4JE.js} +1 -1
- package/dist/client/assets/{plan-ladder-BpZwGVg8.js → plan-ladder-DbkDT52b.js} +1 -1
- package/dist/client/assets/{popover-BEsj6vR3.js → popover-CzNTcDJM.js} +1 -1
- package/dist/client/assets/{post-calendar-D-CBcyUU.js → post-calendar-DGIFZvru.js} +1 -1
- package/dist/client/assets/{post-editor-N7AeVTTK.js → post-editor-BINaZa6q.js} +1 -1
- package/dist/client/assets/{preview-content-CX-RAAIs.js → preview-content-BjX4Mivy.js} +1 -1
- package/dist/client/assets/{preview-dialog-BG9NdirF.js → preview-dialog-C8Boj2eR.js} +1 -1
- package/dist/client/assets/{preview-panel-DFmf2KiU.js → preview-panel-BTtWNKn9.js} +1 -1
- package/dist/client/assets/{preview-tab-Cq0FzOLH.js → preview-tab-BYhuHpLV.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-Ce-UR28c.js → product-picker-dialog-qxyRXjlS.js} +1 -1
- package/dist/client/assets/{profile-ssV3RkZV.js → profile-Cgb34CQu.js} +1 -1
- package/dist/client/assets/project-app-view-B5MD1o9B.js +1 -0
- package/dist/client/assets/project-feed-DnDlefHV.js +1 -0
- package/dist/client/assets/{project-icon-BOZuHsb6.js → project-icon-CP0m7tWm.js} +1 -1
- package/dist/client/assets/project-reports-8XAuspn6.js +1 -0
- package/dist/client/assets/project-tasks-CGbl7DTy.js +1 -0
- package/dist/client/assets/{projects-CkR0cdT4.js → projects-DmCmaniu.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Cpuqs4EG.js → projects-empty-state-fIhR2Z5I.js} +1 -1
- package/dist/client/assets/{prompts-BSPLyPpm.js → prompts-CW5UUH65.js} +1 -1
- package/dist/client/assets/record-editor--8X4AXV_.js +1 -0
- package/dist/client/assets/{redirect-editor-D805B62q.js → redirect-editor-CxJl2CVJ.js} +1 -1
- package/dist/client/assets/{reports-CNap1_Uc.js → reports-BXGEiRjn.js} +1 -1
- package/dist/client/assets/reports-eZ_It7qc.js +1 -0
- package/dist/client/assets/{reports-onboarding-CGwOTesM.js → reports-onboarding-DNEAbZJV.js} +1 -1
- package/dist/client/assets/reports-tab-CwK-fp7x.js +2 -0
- package/dist/client/assets/{repositories-CjjlbHXH.js → repositories-ClghJilC.js} +1 -1
- package/dist/client/assets/{repository-binding-Bi-DIonY.js → repository-binding-BYnKmLVI.js} +1 -1
- package/dist/client/assets/{repository-import-picker-DOf1x-tI.js → repository-import-picker-De4qAOck.js} +1 -1
- package/dist/client/assets/{repository-picker-BWuJDa_H.js → repository-picker-B7BUYgB7.js} +1 -1
- package/dist/client/assets/{require-capability-CwAFbuBD.js → require-capability-hn1SreP5.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CLr_4vv9.js → required-auth-layout-Mqzz7XgH.js} +1 -1
- package/dist/client/assets/{reset-password-CTxZk19a.js → reset-password-BOpvbCSW.js} +1 -1
- package/dist/client/assets/{resizable-DD98lqRp.js → resizable-DpCFVPH5.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BPVtTVku.js → resolve-tab-icon-8PRTNpAS.js} +1 -1
- package/dist/client/assets/{review-settings-CI3bfaH0.js → review-settings-Bw0A1sn1.js} +1 -1
- package/dist/client/assets/{roles-Dz-VLGCL.js → roles-BMCtr4MB.js} +1 -1
- package/dist/client/assets/{route-DobCmO6a.js → route-DLSqOpoM.js} +1 -1
- package/dist/client/assets/route-DnP6JRb8.js +1 -0
- package/dist/client/assets/route-yiouOCXy.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-BRQHpP7A.js → sandbox-lifecycle-context-Dg7K5ioC.js} +1 -1
- package/dist/client/assets/{schema-BGyA--3u.js → schema-D-qEbXZ-.js} +1 -1
- package/dist/client/assets/{schema-mfoOTdbg.js → schema-zU96PUAb.js} +1 -1
- package/dist/client/assets/{scroll-area-DaaLgz_s.js → scroll-area-D_ro8hTm.js} +1 -1
- package/dist/client/assets/{search-input-eg4Y4YFa.js → search-input-qNQGHbDh.js} +1 -1
- package/dist/client/assets/{search-toggle-zYkiRJNX.js → search-toggle-Dfh8XGYH.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-I7QauOs3.js → secret-ciphertext-DkD2R7dc.js} +1 -1
- package/dist/client/assets/{secret-picker-DfGNpKHv.js → secret-picker-CmVVvqgZ.js} +1 -1
- package/dist/client/assets/{secrets-Dc03pb2z.js → secrets-BDW-A1kb.js} +1 -1
- package/dist/client/assets/{sections-editor-BW5ddo_f.js → sections-editor-BKmXdadO.js} +1 -1
- package/dist/client/assets/{select-QBZaLypJ.js → select-C4iThYr6.js} +1 -1
- package/dist/client/assets/{select-model-Dq1aN4vX.js → select-model-BND792Uy.js} +1 -1
- package/dist/client/assets/{seo-editor-CHwUmjlz.js → seo-editor-ClpJZQda.js} +1 -1
- package/dist/client/assets/{separator-CdijOcZe.js → separator-DYHY_XVB.js} +1 -1
- package/dist/client/assets/{settings-tab-WSqsQnVz.js → settings-tab-A8T1BHYG.js} +1 -1
- package/dist/client/assets/{sheet-CkMWrJVJ.js → sheet-BXRHJIP3.js} +1 -1
- package/dist/client/assets/{shell-layout-SkoXOd1a.js → shell-layout-BhM3Q_22.js} +1 -1
- package/dist/client/assets/site-editor-LulM9jUZ.js +1 -0
- package/dist/client/assets/{site-editor-toast-B0pO5yON.js → site-editor-toast-DPPGE5LH.js} +1 -1
- package/dist/client/assets/{skills-3AkZMRJC.js → skills-Kw1j3-7B.js} +1 -1
- package/dist/client/assets/{slider-BUbDFjHG.js → slider-CpU4rmfX.js} +1 -1
- package/dist/client/assets/{sortable.esm-r_0kxOCd.js → sortable.esm-CBSg5QWi.js} +1 -1
- package/dist/client/assets/{sso-Dc5pWnzG.js → sso-GSEhvAQ2.js} +1 -1
- package/dist/client/assets/{suggestion-D84t4pYi.js → suggestion-BPVDnpZj.js} +1 -1
- package/dist/client/assets/{switch-BmYqPGgo.js → switch-63WSXheM.js} +1 -1
- package/dist/client/assets/{symbol-CJzDXO7c.js → symbol-rviHpBrN.js} +1 -1
- package/dist/client/assets/{synced-repos-fVXqYXys.js → synced-repos-D3YnOlYC.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-C5tGzEgb.js → tab-icon-glyph-Dqe-yN6V.js} +1 -1
- package/dist/client/assets/{table-CIfuKXR7.js → table-CLaOCONQ.js} +1 -1
- package/dist/client/assets/{tabs-D_cbCZvQ.js → tabs-BQUPeDjf.js} +1 -1
- package/dist/client/assets/{task-board-D3hDrEMs.js → task-board-DxxiAR5A.js} +1 -1
- package/dist/client/assets/task-key-BCHdFiOO.js +1 -0
- package/dist/client/assets/task-route-Ce6MTE8h.js +1 -0
- package/dist/client/assets/{task-status-BtShubbX.js → task-status-CMbp-PaL.js} +1 -1
- package/dist/client/assets/taskboard-analytics-_ZvfL2sj.js +1 -0
- package/dist/client/assets/{tasks-aU51vuBa.js → tasks-BarD4hla.js} +1 -1
- package/dist/client/assets/tasks-DcunZstc.js +1 -0
- package/dist/client/assets/{textarea-YNmZlxz9.js → textarea-CxYAsAPe.js} +1 -1
- package/dist/client/assets/{thread-analytics-CSwkdFem.js → thread-analytics-Cjx1orRq.js} +1 -1
- package/dist/client/assets/{thread-intent-C0peckWT.js → thread-intent-DikZOwd-.js} +1 -1
- package/dist/client/assets/{thread-route-BIabyzB_.js → thread-route-CRU_aqN9.js} +1 -1
- package/dist/client/assets/{thread-route-BiWGG6Nf.js → thread-route-ChugAIRh.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-o-wpyh-M.js → thread-sheet-body-DfFj6DBB.js} +1 -1
- package/dist/client/assets/{time-range-picker-BrI8y_uu.js → time-range-picker-Bf6M5ihN.js} +1 -1
- package/dist/client/assets/{toggle-group-CIDl0GvE.js → toggle-group-DbSldXZX.js} +1 -1
- package/dist/client/assets/{tool-namespace-1HqDTB0T.js → tool-namespace-pIFYrei5.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DXjKtTYI.js → toolbar-icon-button-B24Twz-b.js} +1 -1
- package/dist/client/assets/{tooltip-OOT2FRXJ.js → tooltip-Bs0EJaD7.js} +1 -1
- package/dist/client/assets/{tooltipContext-B-cNOrp0.js → tooltipContext-fXkDpiI8.js} +1 -1
- package/dist/client/assets/{track-Bbr1fYQY.js → track-BzGhLw1A.js} +1 -1
- package/dist/client/assets/{types-BETxN8TR.js → types-IpdOmnYx.js} +1 -1
- package/dist/client/assets/{url-slug-63gf-C65.js → url-slug-CMCbwnaP.js} +1 -1
- package/dist/client/assets/{usage-stats-B912Tchp.js → usage-stats-DuvxTL2m.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Boin6TrZ.js → use-ai-providers-Becg3IYt.js} +1 -1
- package/dist/client/assets/{use-app-takeover-bAb0Bn22.js → use-app-takeover-DFb1RzQs.js} +1 -1
- package/dist/client/assets/{use-automations-BA1S9JI2.js → use-automations-Cp9pysoO.js} +1 -1
- package/dist/client/assets/{use-autosave-nQjtFOs-.js → use-autosave-C5CskRdQ.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-CTkiB6Jn.js → use-chat-navigation-BJSvg7rH.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CEu8zq2_.js → use-clock-tick-B1PaG9d4.js} +1 -1
- package/dist/client/assets/{use-connect-companion-3Gaurk9V.js → use-connect-companion-ClLk9Ret.js} +1 -1
- package/dist/client/assets/{use-connection-CIk0SysG.js → use-connection-CLmhN_H7.js} +1 -1
- package/dist/client/assets/{use-copy-DdqqSOOQ.js → use-copy-T3xwaExj.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DLCnN0Bc.js → use-create-virtual-mcp-CVTk_yNo.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-D224q4hz.js → use-date-fns-locale-CYDYn543.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BeG6Pney.js → use-debounced-autosave-8fEcHiWI.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CIdisYkq.js → use-debounced-value-d254MtLc.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DkGJI-x1.js → use-deco-credits-BJdkVUlJ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BENb56k0.js → use-decopilot-events-D42PqykU.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Bp53G_uo.js → use-delete-connection-Bp41mUbu.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CzPDXfcD.js → use-deployment-admin-Cz36UM7j.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-BcmfbAuR.js → use-ensure-project-folder-DV9pI0pa.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-uP7_OFcR.js → use-fast-preview-draft-url-Dbj9pvCB.js} +1 -1
- package/dist/client/assets/{use-file-configs-Ch0NS5Pc.js → use-file-configs-D_kGDRPd.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-G4rzGI3v.js → use-infinite-scroll-C47I-wuH.js} +1 -1
- package/dist/client/assets/{use-join-requests-yp6IAr0h.js → use-join-requests-Cy3hlZv5.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-0bYC8cZT.js → use-main-panel-tabs-DjhEbRyd.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-yFWtpTs2.js → use-mcp-auth-status-5SUSMsp-.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CwFvp4EC.js → use-mcp-client-CEKqqblF.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CAOKsDB1.js → use-mcp-prompts-CwF-bqUg.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DV8Ssa-N.js → use-mcp-tools-_07-mu_D.js} +1 -1
- package/dist/client/assets/{use-members-DKlVbBsg.js → use-members-CFcpHrvE.js} +1 -1
- package/dist/client/assets/{use-mobile-Bv4e9giO.js → use-mobile-CYsZ0F3X.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Br865bX5.js → use-navigate-to-agent-DNsHLJD8.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-D1GUbTgf.js → use-open-billing-url-C1m0KS6b.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CNVATKKL.js → use-org-auth-client-9ZqTxhaU.js} +1 -1
- package/dist/client/assets/{use-org-fs-Byjmod8E.js → use-org-fs-Wo4_O8nn.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DsFnwWov.js → use-org-repo-syncs-HjlHy8Rb.js} +1 -1
- package/dist/client/assets/{use-org-sso-ktfOKKdk.js → use-org-sso-BSkklN8h.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DeL0SOnB.js → use-organization-roles-Dga2ANZJ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CRThO_Bk.js → use-organization-settings-DHSMN_14.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-Cqu8Xb_L.js → use-panel-navigate-62gIHptt.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-EAxaV-35.js → use-project-native-view-presence-D12oGF6A.js} +1 -1
- package/dist/client/assets/{use-project-scope-BFkfMXrm.js → use-project-scope-Dk4Q60O6.js} +1 -1
- package/dist/client/assets/{use-recent-apps-BdqTYWmf.js → use-recent-apps-CCwo686W.js} +1 -1
- package/dist/client/assets/{use-releases-DPoATUeI.js → use-releases-wK1mECcA.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BMtStgbM.js → use-reports-diagnostic-CfPcDRof.js} +1 -1
- package/dist/client/assets/{use-secrets-9Nv6GJGB.js → use-secrets-Cmhjz2bf.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BJN5vPDz.js → use-section-preview-base-DJFgOhQZ.js} +1 -1
- package/dist/client/assets/{use-tags-DzaE0p5G.js → use-tags-D0LqZNOI.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-yq3fDjmF.js → use-task-board-analytics-BpQqtB1w.js} +1 -1
- package/dist/client/assets/{use-task-board-events-Cm7RiaOR.js → use-task-board-events-BrTJpTlj.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CpuwpMX_.js → use-task-board-item-prs-BHRZFWqk.js} +1 -1
- package/dist/client/assets/{use-task-board-items-BXjcIp4o.js → use-task-board-items-CZjiF2uB.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CEqKqYBo.js → use-task-metadata-Bef5UioD.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-KrnGogU9.js → use-thread-analytics-CiJumHRj.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-Bhilo9S-.js → use-thread-outputs-BVEM1vsy.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-S3a_-GqY.js +1 -0
- package/dist/client/assets/{useQueries-CDCmtMzA.js → useQueries-D52x651p.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DiRI5XkI.js +1 -0
- package/dist/client/assets/{users-DpioRMZR.js → users-DfEzbgjc.js} +1 -1
- package/dist/client/assets/{utils-CyO0sFRF.js → utils-DVs-Bhj-.js} +1 -1
- package/dist/client/assets/{variant-calendar-D2Ue9ttA.js → variant-calendar-B4damr_G.js} +1 -1
- package/dist/client/assets/{variant-draft-pointer-DVvHww7x.js → variant-draft-pointer-BnxZeLy_.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DR63ro4_.js → view-mode-toggle-DKlegHXH.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BEkVRfgx.js → virtual-mcp-UT0zZzHO.js} +1 -1
- package/dist/client/assets/watch-sse-pool-BdkzrgTO.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/migrate-dbos.js +2 -2
- package/dist/server/migrate.js +244 -244
- package/dist/server/server.js +723 -693
- package/package.json +1 -1
- package/dist/client/assets/AreaChart-BDK36Hx4.js +0 -1
- package/dist/client/assets/agent-app-Cy0Wb8nQ.js +0 -1
- package/dist/client/assets/agent-deck-D_FtTpRb.js +0 -1
- package/dist/client/assets/agent-library-DuNdcBDQ.js +0 -1
- package/dist/client/assets/agent-library-file-BfuKcUpc.js +0 -1
- package/dist/client/assets/agent-monitor-CtwdZs_a.js +0 -1
- package/dist/client/assets/agent-overview-CXUTFZ-0.js +0 -1
- package/dist/client/assets/agent-settings-VI8Jye-y.js +0 -1
- package/dist/client/assets/agent-site-editor-code-H-580bQR.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Sx7h5Jhh.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-GqVBwoZa.js +0 -1
- package/dist/client/assets/agent-view-CYDFPIV_.js +0 -1
- package/dist/client/assets/api-keys-CcdfCp8Z.js +0 -1
- package/dist/client/assets/cms-settings-editor-D_UEmRaG.js +0 -1
- package/dist/client/assets/flat-project-Djf43rrR.js +0 -1
- package/dist/client/assets/home-B0VHSSDj.js +0 -1
- package/dist/client/assets/index-CEMpcZH2.js +0 -5
- package/dist/client/assets/library-qn0udAVP.js +0 -1
- package/dist/client/assets/project-app-view-CbRGVruN.js +0 -1
- package/dist/client/assets/project-feed-BYkTxe8U.js +0 -1
- package/dist/client/assets/project-reports-Cby7ToLK.js +0 -1
- package/dist/client/assets/project-tasks-DWvwJU4i.js +0 -1
- package/dist/client/assets/record-editor-BTpwFXbZ.js +0 -1
- package/dist/client/assets/reports-B_aoe-_-.js +0 -1
- package/dist/client/assets/reports-tab-BfjGKI8Z.js +0 -2
- package/dist/client/assets/route-B3ci9bDJ.js +0 -1
- package/dist/client/assets/route-BGgyso4O.js +0 -1
- package/dist/client/assets/site-editor-Db8otCJp.js +0 -1
- package/dist/client/assets/task-route-Ct_lSat4.js +0 -1
- package/dist/client/assets/taskboard-analytics-xs2Qkqls.js +0 -1
- package/dist/client/assets/tasks-B1SLqYgx.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Ddm9V9zO.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Zvo1j3mt.js +0 -1
- package/dist/client/assets/watch-sse-pool-DtoO-1Ad.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,b as X,r as Z,j as n,l as rt,B as tt,au as ut}from"./index-DzGYQ4je.js";import{D as ht,a2 as at,G as xt}from"./agent-icon-w0fx2BM9.js";import{L as gt}from"./label-CW8ZlpsA.js";import{S as lt}from"./scroll-area-DaaLgz_s.js";import{S as bt}from"./switch-BmYqPGgo.js";import{T as vt,c as yt,a as jt}from"./tooltip-OOT2FRXJ.js";import{V as Tt}from"./view-mode-toggle-DR63ro4_.js";import{aC as ct,aD as mt,aE as Nt,aF as _t,aG as kt,aH as U,aI as wt}from"./content-tab-FdqIt_Oh.js";import"./AlertCircle-DbZXzHU4.js";import"./Tool01-Dg-pQnlG.js";import"./ArrowUp-B82v86-f.js";import"./ArrowLeft-DHzrTLxh.js";import"./LinkBroken01-zQXz81xm.js";import"./ShoppingBag01-B8fMxhTk.js";import"./ZoomOut-BfZ_MoNU.js";import"./Building02-DlUkTaCT.js";import"./CheckCircle-C9xArOgT.js";import"./ChevronUp-9p6Wfyjc.js";import"./ChevronSelectorVertical-DhFNZZ7b.js";import"./UserSquare-nowvR0IP.js";import"./Copy01-C21BKNhK.js";import"./CreditCard01-BBQFm-D2.js";import"./DotsVertical-C79u6eki.js";import"./Image01-DLGYTG6l.js";import"./Globe04-C7fefIAW.js";import"./SwitchHorizontal01-rhX6IQru.js";import"./Key01-BdXZUygf.js";import"./Link01-nN5I95Fv.js";import"./Monitor01-fhRCZgsV.js";import"./Sun-zOV0D2Wt.js";import"./Play-BVd9KRbk.js";import"./Plus-BQGAsZcO.js";import"./SearchMd-DpkjOBW1.js";import"./Trash01-Xx4Vpu1z.js";import"./Upload01-BQIZ0qft.js";import"./User01-G7-LShqY.js";import"./Users01-DQmBq_uH.js";import"./XClose-COhsaGEO.js";import"./index-BdQq_4o_.js";import"./index-2oqi1IPe.js";import"./use-organization-settings-CRThO_Bk.js";import"./schema-mfoOTdbg.js";import"./task-board-D3hDrEMs.js";import"./chat-context-C7boc8JM.js";import"./use-panel-navigate-Cqu8Xb_L.js";import"./thread-route-BIabyzB_.js";import"./use-project-scope-BFkfMXrm.js";import"./repository-binding-Bi-DIonY.js";import"./use-mcp-client-CwFvp4EC.js";import"./auth-BBFulaR2.js";import"./autosend-8U0-dRxu.js";import"./thread-intent-C0peckWT.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DtoO-1Ad.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-BENb56k0.js";import"./use-ai-providers-Boin6TrZ.js";import"./use-chat-navigation-CTkiB6Jn.js";import"./location-BjlyegC2.js";import"./alert-dialog-BudrRkY9.js";import"./site-editor-toast-B0pO5yON.js";import"./input-B38h0Qtk.js";import"./usage-stats-B912Tchp.js";import"./tool-namespace-1HqDTB0T.js";import"./form-DLKWVYAo.js";import"./utils-CVEq3hMx.js";import"./markdown-DeT-O_Oi.js";import"./use-copy-DdqqSOOQ.js";import"./use-mobile-Bv4e9giO.js";import"./format-time-CAj8AQXM.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-_GCussIb.js";import"./file-type-icon-DQMhIyFo.js";import"./shell-layout-SkoXOd1a.js";import"./avatar--kF1Sxbg.js";import"./use-clock-tick-CEu8zq2_.js";import"./command-D5QXIfZJ.js";import"./index-dpDf5Mys.js";import"./integration-icon-BxOhvDOr.js";import"./project-icon-BOZuHsb6.js";import"./new-project-dialog-rdjKEc0R.js";import"./repository-import-picker-DOf1x-tI.js";import"./use-navigate-to-agent-Br865bX5.js";import"./repository-picker-BWuJDa_H.js";import"./useInfiniteQuery-Ddm9V9zO.js";import"./infiniteQueryObserver-pgDKCF24.js";import"./collection-search-Cpx0YrAf.js";import"./use-debounced-value-CIdisYkq.js";import"./required-auth-layout-CLr_4vv9.js";import"./use-org-sso-ktfOKKdk.js";import"./chat-draft-Y7uteI96.js";import"./select-QBZaLypJ.js";import"./tabs-D_cbCZvQ.js";import"./use-deco-credits-DkGJI-x1.js";import"./toggle-group-CIDl0GvE.js";import"./use-open-billing-url-D1GUbTgf.js";import"./index-DEpAEWYh.js";import"./checkbox-CWYWbV7j.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-BEsj6vR3.js";import"./drawer-CYWmH_yu.js";import"./input-B1h4zvN9.js";import"./suggestion-D84t4pYi.js";import"./use-project-native-view-presence-EAxaV-35.js";import"./use-file-configs-Ch0NS5Pc.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-CAOKsDB1.js";import"./use-org-fs-Byjmod8E.js";import"./question-004-sINsf4GQ.js";import"./use-members-DKlVbBsg.js";import"./use-org-auth-client-CNVATKKL.js";import"./feature-paywall-yoBHjyVR.js";import"./plan-ladder-BpZwGVg8.js";import"./add-connection-dialog-BJ9BKenv.js";import"./extract-connection-data-BAExt33p.js";import"./metadata-D72DunRR.js";import"./connection-DodWF9zN.js";import"./url-slug-63gf-C65.js";import"./connection-card-BNE5emfZ.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-YNmZlxz9.js";import"./use-connection-CIk0SysG.js";import"./schema-BGyA--3u.js";import"./connection-form-helpers-C3pfz3w3.js";import"./authenticate-and-persist-oauth-uNX2a7wo.js";import"./mcp-oauth-BpHonAUS.js";import"./mcp-oauth-BNbzufHU.js";import"./collection-tabs-dQf8n2Wy.js";import"./badge-CalXC-Hw.js";import"./use-infinite-scroll-G4rzGI3v.js";import"./useSuspenseInfiniteQuery-Zvo1j3mt.js";import"./use-task-board-events-Cm7RiaOR.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-CyO0sFRF.js";import"./index-C6EeQiXi.js";import"./pair-D9iXgt--.js";import"./collapsible-dPqRUFUS.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DcFodUL5.js";import"./types-BETxN8TR.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CkMWrJVJ.js";import"./use-thread-outputs-Bhilo9S-.js";import"./sandbox-git-api-CRxdlhrN.js";import"./blocks-tab-states-Dj62473g.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./secret-ciphertext-I7QauOs3.js";import"./alert-Bl0z1bzt.js";import"./monaco-editor-DIoQcD6P.js";import"./editor-BhHZG0fs.js";import"./calendar-BrDGheLn.js";import"./editor-classes-D8DelYa3.js";import"./core.esm-B8TX0IEB.js";import"./sortable.esm-r_0kxOCd.js";import"./combobox-CIJ-TFnx.js";import"./search-input-eg4Y4YFa.js";import"./asset-utils-COm4-tit.js";import"./empty-state-CsxboN3T.js";import"./mustache-C198M5dI.js";import"./sandbox-lifecycle-context-BRQHpP7A.js";import"./empty-state-D5cCxi9-.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Dt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Lt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Lt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Rt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Rt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Dt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Ht}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Bt(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Bt(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(jt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(vt,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(yt,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function sn(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(ht,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ut,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const D=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==D||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[D," ",M]}),t[28]=D,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let L;t[36]!==p||t[37]!==l||t[38]!==o?(L=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(bt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(gt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=L):L=t[39];let B;t[40]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(at,{}),t[40]=B):B=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:B,label:V},t[43]=V,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(xt,{}),t[45]=F):F=t[45];let R;t[46]!==o?(R=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=R):R=t[47];let O;t[48]!==R?(O={value:"timeline",icon:F,label:R},t[48]=R,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let H;t[53]!==P||t[54]!==s?(H=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=H):H=t[55];let z;t[56]!==L||t[57]!==H?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[L,H]}),t[56]=L,t[57]=H,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Jt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let q;return t[69]!==W||t[70]!==G?(q=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=q):q=t[71],q}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,qt=6;function Jt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const J=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,J),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:J},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,L]=w,B=dt(s,j),V=L[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),L.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:B.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const R=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=R)return null;const P=h(new Date(R)),H=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${H}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let D;t[16]!==k||t[17]!==C||t[18]!==$?(D=n.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=D):D=t[19];let M;return t[20]!==b||t[21]!==D?(M=n.jsx(b,{className:E,children:D}),t[20]=b,t[21]=D,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{sn as VariantCalendar};
|
|
1
|
+
import{c as K,b as X,r as Z,j as n,l as rt,B as tt,au as ut}from"./index-BoB02eW2.js";import{D as ht,a2 as at,G as xt}from"./agent-icon-Bmu0Xuy8.js";import{L as gt}from"./label-CsyEQPG4.js";import{S as lt}from"./scroll-area-D_ro8hTm.js";import{S as bt}from"./switch-63WSXheM.js";import{T as vt,c as yt,a as jt}from"./tooltip-Bs0EJaD7.js";import{V as Tt}from"./view-mode-toggle-DKlegHXH.js";import{aC as ct,aD as mt,aE as Nt,aF as _t,aG as kt,aH as U,aI as wt}from"./content-tab-BIEsoSfa.js";import"./AlertCircle-BFUZ4yx0.js";import"./Tool01-CvAlZ6_R.js";import"./ArrowUp-U6_gobY2.js";import"./ArrowLeft-CK2OAC0l.js";import"./LinkBroken01-Vuoqu_ZW.js";import"./ShoppingBag01-dI1cRqeE.js";import"./ZoomOut-C1rwTYBB.js";import"./Building02-Ddm6hNyu.js";import"./CheckCircle-BWW06ZXQ.js";import"./ChevronUp-CTrNq9Nk.js";import"./ChevronSelectorVertical-DKcwgXpF.js";import"./UserSquare-0R6kuy9W.js";import"./Copy01-TJP2zB12.js";import"./CreditCard01-Bm6_xB5H.js";import"./DotsVertical-DKl8j3BE.js";import"./Image01-Cf_YxPro.js";import"./Globe04-ClrCqE7c.js";import"./SwitchHorizontal01-KDjTaTLX.js";import"./Key01-55Z6tHcr.js";import"./Link01-DNXOSsg9.js";import"./Monitor01-C-mB2rao.js";import"./Sun-BPl8u-yx.js";import"./Play-CUFyJJIt.js";import"./Plus-D-GSl2MA.js";import"./SearchMd-CkV8MM4H.js";import"./Trash01-BzUZQR5Y.js";import"./Upload01-CdgDB-zC.js";import"./User01-CinpYulR.js";import"./Users01-DFSTtPtZ.js";import"./XClose-CXxsMd9c.js";import"./index-BdQq_4o_.js";import"./index-DSuQX-Dj.js";import"./use-organization-settings-DHSMN_14.js";import"./schema-zU96PUAb.js";import"./task-board-DxxiAR5A.js";import"./chat-context-C4pDshj1.js";import"./use-panel-navigate-62gIHptt.js";import"./thread-route-CRU_aqN9.js";import"./use-project-scope-Dk4Q60O6.js";import"./repository-binding-BYnKmLVI.js";import"./use-mcp-client-CEKqqblF.js";import"./auth-BeK8rRbB.js";import"./autosend-B-VPnrp2.js";import"./thread-intent-DikZOwd-.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BdkzrgTO.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-D42PqykU.js";import"./use-ai-providers-Becg3IYt.js";import"./use-chat-navigation-BJSvg7rH.js";import"./location-BjlyegC2.js";import"./alert-dialog-BaBKldUA.js";import"./site-editor-toast-DPPGE5LH.js";import"./input-Dx6Yl3YV.js";import"./usage-stats-DuvxTL2m.js";import"./tool-namespace-pIFYrei5.js";import"./form-Dz-wry37.js";import"./utils-CVEq3hMx.js";import"./markdown-TXCHEe-4.js";import"./use-copy-T3xwaExj.js";import"./use-mobile-CYsZ0F3X.js";import"./format-time-CAj8AQXM.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-BbQESQAz.js";import"./file-type-icon-C2WSm6EM.js";import"./shell-layout-BhM3Q_22.js";import"./avatar-yCbsNNbw.js";import"./use-clock-tick-B1PaG9d4.js";import"./command-BSGZ-TwS.js";import"./index-BhuMySoe.js";import"./integration-icon-YHEiRLgT.js";import"./project-icon-CP0m7tWm.js";import"./new-project-dialog-DCPZVRuS.js";import"./repository-import-picker-De4qAOck.js";import"./use-navigate-to-agent-DNsHLJD8.js";import"./repository-picker-B7BUYgB7.js";import"./useInfiniteQuery-S3a_-GqY.js";import"./infiniteQueryObserver-BuOPvaCd.js";import"./collection-search-sopr7ssV.js";import"./use-debounced-value-d254MtLc.js";import"./required-auth-layout-Mqzz7XgH.js";import"./use-org-sso-BSkklN8h.js";import"./chat-draft-D5dlb_sl.js";import"./select-C4iThYr6.js";import"./tabs-BQUPeDjf.js";import"./use-deco-credits-BJdkVUlJ.js";import"./toggle-group-DbSldXZX.js";import"./use-open-billing-url-C1m0KS6b.js";import"./index-DuSo48nd.js";import"./checkbox-C2l5tKo2.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-CzNTcDJM.js";import"./drawer-BpEasqMM.js";import"./input-CC2XqVda.js";import"./suggestion-BPVDnpZj.js";import"./use-project-native-view-presence-D12oGF6A.js";import"./use-file-configs-D_kGDRPd.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-CwF-bqUg.js";import"./use-org-fs-Wo4_O8nn.js";import"./question-004-sINsf4GQ.js";import"./use-members-CFcpHrvE.js";import"./use-org-auth-client-9ZqTxhaU.js";import"./feature-paywall-HnwykYzM.js";import"./plan-ladder-DbkDT52b.js";import"./add-connection-dialog-CNB1XZS8.js";import"./extract-connection-data-CyaR6DQN.js";import"./metadata-D72DunRR.js";import"./connection-B0eFNfCu.js";import"./url-slug-CMCbwnaP.js";import"./connection-card-BzTYJa6s.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CxYAsAPe.js";import"./use-connection-CLmhN_H7.js";import"./schema-D-qEbXZ-.js";import"./connection-form-helpers-ChgreO5F.js";import"./authenticate-and-persist-oauth-DJwJCiC8.js";import"./mcp-oauth-BFqNJ-iQ.js";import"./mcp-oauth-CuU6LL15.js";import"./collection-tabs-DU5QTifc.js";import"./badge-Zdi_g359.js";import"./use-infinite-scroll-C47I-wuH.js";import"./useSuspenseInfiniteQuery-DiRI5XkI.js";import"./use-task-board-events-BrTJpTlj.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-DVs-Bhj-.js";import"./index-Cdsu1Nw_.js";import"./pair-C9IKm4JE.js";import"./collapsible-CDZFoOK-.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BAlCN3Lv.js";import"./types-IpdOmnYx.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-BXRHJIP3.js";import"./use-thread-outputs-BVEM1vsy.js";import"./sandbox-git-api-CRxdlhrN.js";import"./blocks-tab-states-B7_Q2Byx.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./secret-ciphertext-DkD2R7dc.js";import"./alert-CnRQ3m-7.js";import"./monaco-editor-DIn5LVAo.js";import"./editor-DQK8Gbky.js";import"./calendar-aMW3a7Qx.js";import"./editor-classes-wKHzvXkJ.js";import"./core.esm-CWXW2IWJ.js";import"./sortable.esm-CBSg5QWi.js";import"./combobox-C2hXpc1p.js";import"./search-input-qNQGHbDh.js";import"./asset-utils--N2gsOKr.js";import"./empty-state-GUv-DLNf.js";import"./mustache-C3mAjW3w.js";import"./sandbox-lifecycle-context-Dg7K5ioC.js";import"./empty-state-Ck0Y0zH4.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Dt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Lt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Lt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Rt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Rt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Dt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Ht}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Bt(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Bt(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(jt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(vt,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(yt,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function sn(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(ht,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ut,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const D=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==D||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[D," ",M]}),t[28]=D,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let L;t[36]!==p||t[37]!==l||t[38]!==o?(L=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(bt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(gt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=L):L=t[39];let B;t[40]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(at,{}),t[40]=B):B=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:B,label:V},t[43]=V,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(xt,{}),t[45]=F):F=t[45];let R;t[46]!==o?(R=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=R):R=t[47];let O;t[48]!==R?(O={value:"timeline",icon:F,label:R},t[48]=R,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let H;t[53]!==P||t[54]!==s?(H=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=H):H=t[55];let z;t[56]!==L||t[57]!==H?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[L,H]}),t[56]=L,t[57]=H,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Jt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let q;return t[69]!==W||t[70]!==G?(q=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=q):q=t[71],q}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,qt=6;function Jt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const J=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,J),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:J},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,L]=w,B=dt(s,j),V=L[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),L.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:B.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const R=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=R)return null;const P=h(new Date(R)),H=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${H}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let D;t[16]!==k||t[17]!==C||t[18]!==$?(D=n.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=D):D=t[19];let M;return t[20]!==b||t[21]!==D?(M=n.jsx(b,{className:E,children:D}),t[20]=b,t[21]=D,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{sn as VariantCalendar};
|
package/dist/client/assets/{variant-draft-pointer-DVvHww7x.js → variant-draft-pointer-BnxZeLy_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aj as x,ah as p}from"./secret-ciphertext-
|
|
1
|
+
import{aj as x,ah as p}from"./secret-ciphertext-DkD2R7dc.js";const d="x-deco-matchers-override";function f({pageKey:t,prefix:n,variants:e,selectedIndex:r,decofile:a,meta:c}){if(!t||r<0||r>=e.length)return[];const o=[];for(let i=0;i<=r;i++){const u=e[i];if(!u)continue;const s=u.rule,l=i===r?"1":"0",m=(x(s,a,c)?p(s,a,c):null)??`${t}@${n}.${i}.rule`;o.push(`${m}=${l}`)}return o}function R(t,n,e,r){return!n.multivariate||n.variants.length<=1?[]:f({pageKey:t,prefix:"sections.variants",variants:n.variants,selectedIndex:n.index,decofile:e,meta:r})}function b({pageKey:t,page:n,sectionIndex:e,sectionLazy:r,mvObj:a,selectedVariantIndex:c,decofile:o,meta:i}){if(e<0)return[];const s=`${n.multivariate?`sections.variants.${n.index}.value`:"sections"}.${e}${r?".section":""}.variants`,l=Array.isArray(a.variants)?a.variants:[];return f({pageKey:t,prefix:s,variants:l,selectedIndex:c,decofile:o,meta:i})}function A(t,n){const e=`${n}@`;return t.map(r=>r.startsWith(e)?`props.${r.slice(e.length)}`:r)}function _(t,n){if(n.length===0)return t;try{const e=new URL(t,"http://local");e.searchParams.delete(d);for(const r of n)e.searchParams.append(d,r);return t.startsWith("http")?e.toString():`${e.pathname}${e.search}${e.hash}`}catch{return t}}const h="__variant=";function v(t,n,e){return`${t}@${n}=${e}`}function O(t,n){return!t||!n.multivariate||n.variants.length<=1?[]:n.index<0||n.index>=n.variants.length?[]:[v(t,"sections",n.index)]}function S(t){const n=Array.isArray(t.mvObj.variants)?t.mvObj.variants:[];if(!t.pageKey||t.sectionIndex<0)return[];if(t.selectedVariantIndex<0||t.selectedVariantIndex>=n.length)return[];const r=`${t.page.multivariate?`sections.variants.${t.page.index}.value`:"sections"}.${t.sectionIndex}${t.sectionLazy?".section":""}`;return[v(t.pageKey,r,t.selectedVariantIndex)]}function V(t){return encodeURIComponent(t).replace(/[!'()*]/g,n=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`)}function $(t,n){const e=t.lastIndexOf("@");if(e<=0)return t;const r=t.slice(0,e),a=r.indexOf("?"),c=a===-1?r:r.slice(0,a),i=[...a===-1?[]:r.slice(a+1).split("&").filter(s=>s&&!s.startsWith(h)),...n.map(s=>h+V(s))],u=i.length>0?`?${i.join("&")}`:"";return`${c}${u}${t.slice(e)}`}function I(t,n){if(n.length===0)return null;try{const e=new URL(t),r=e.hostname==="[::1]"?`localhost${e.port?`:${e.port}`:""}`:e.host;return $(`${r}${e.pathname}@local`,n)}catch{return null}}function w(t,n){if(n.length===0)return t;try{const e=new URL(t),r=e.searchParams.get("__draft");return!r||r==="off"?t:(e.searchParams.set("__draft",$(r,n)),e.toString())}catch{return t}}export{w as a,I as b,O as c,R as d,S as e,b as f,A as i,_ as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,r as T,l as f,j as i}from"./index-
|
|
1
|
+
import{c as $,r as T,l as f,j as i}from"./index-BoB02eW2.js";import{c as k,T as I,a as P}from"./tooltip-Bs0EJaD7.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function B(E){const t=$.c(27),{value:s,onValueChange:y,options:l,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,m=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=T.useState(x);let g,p;t[2]!==l||t[3]!==s?(g=()=>{const e=l.findIndex(j=>j.value===s),b=R.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,l],t[2]=l,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),T.useEffect(g,p);const o=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-full",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==o||t[9]!==m||t[10]!==y||t[11]!==l||t[12]!==s?(a=l.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{R.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label??e.tooltip,className:f("relative z-10 flex items-center justify-center gap-2 rounded-full transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(o.buttonWithLabel,"px-3"):o.button),children:[e.icon&&i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",o.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=o,t[9]=m,t[10]=y,t[11]=l,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":o.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-full border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as I}from"./url-slug-63gf-C65.js";import{aF as t,aG as e,aY as l,bW as a,bU as s,bV as o,d0 as c,cY as d,eg as A,d2 as R,cW as g}from"./index-DzGYQ4je.js";const w=t({connection_id:e().describe("Connection ID"),selected_tools:a(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),b=500,v=200,k=200,_=20,U=50,E=100,P=20,T=100,C=300,N=100,V=8192,y=w.extend({selected_tools:a(e()).max(b).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).max(b).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).max(b).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),D=t({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),O=t({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:t({type:c("ext-app"),appId:e(),args:d(e(),g()).optional()})}),S=o(["overview","reports","board","site-editor","assets","releases","hosting","e2e","analytics","cdn","automations","experiments"]),le=o(["on","off"]),L=new Map([["manual","on"],["auto","on"]]),X=o(["on","off","manual","auto"]);function F(n){if(!n)return null;const i=L.get(n);return i||(n==="on"||n==="off"?n:null)}const B=t({defaultMainView:t({type:e(),id:e().optional(),toolName:e().optional()}).nullable().optional(),chatDefaultOpen:s().nullable().optional(),cmsDefaultOpen:s().nullable().optional(),cms:X.nullable().optional().describe("How this agent offers content editing. Absent means on; the retired `manual` / `auto` read as on too."),sidebarViews:a(S).max(10).nullable().optional().describe("Deprecated layout-scoped sidebar selections. Read only as a fallback when metadata.sidebarViews is absent."),tabs:a(O).max(P).optional()});function re(n){return F(n?.cms)??"on"}function ce(n,i){const r=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...r?{defaultMainView:{type:"site-editor"}}:{}}}const m=t({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:d(e(),g()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:l().int().positive().optional(),maxHeight:l().int().positive().optional()}),H=t({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:a(D).max(E).nullable().optional(),layout:B.nullable().optional(),homeTile:m.nullable().optional(),homeTiles:a(m).max(_).nullable().optional(),homePrompts:a(e()).max(U).nullable().optional()}),j=/^[A-Za-z_][A-Za-z0-9_]*$/,f=e().min(1).regex(j,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),z=R("kind",[t({key:f,kind:c("literal"),value:e().max(V)}),t({key:f,kind:c("secret"),secretId:e().min(1)})]),q=t({selected:e().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:e().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:e().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:a(z).max(N).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config.")}),K=t({url:e().describe("Repository URL, including its provider host"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:l().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),G=o(["agent-sandbox","local-api"]),W={sandboxHandle:e().describe("Provider-specific handle"),previewUrl:e().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:e().nullable().optional().describe("Direct sandbox API URL for runtimes that expose one. Equal to previewUrl for local-api; null/absent for AgentSandbox, which routes control traffic through hosted Studio."),createdAt:l().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:t({packageManager:e().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:e().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:e().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},x=t(W);function de(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,r={};for(const[p,u]of Object.entries(i))if(!(!u||typeof u!="object")&&!(p!=="agent-sandbox"&&p!=="local-api"))try{r[p]=x.parse(u)}catch{}return r}const Y=d(e().describe("userId"),d(e().describe("branch"),A(G,x))),Z=t({id:e().describe("Stable identifier for this knowledge file"),name:e().describe("File name shown in the UI"),kind:o(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:e().describe("Org filesystem (Library) volume the file lives in"),path:e().describe("Path within the volume"),url:e().describe("Same-origin URL to read the file (display/download)"),contentType:e().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:l().nullable().optional().describe("File size in bytes"),addedAt:e().describe("ISO timestamp when the file was attached")}),$=a(Z).max(T).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),J=o(["smart","code-review","open"]),Q=J.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),ee=s().nullable().optional().describe("Enable Fast Preview (sandbox-less): render the draft instantly on the preview server's own page via a ?__draft pointer, with reads/writes served by the decofile API against GitHub. Requires previewServerUrl (or legacy productionUrl) to be set to take effect."),te=s().nullable().optional().describe("EXPERIMENTAL: with Fast Preview on, refresh content edits via an in-place /live/previews render (no commit, no reload) instead of a commit + re-navigation. Deco-runtime preview targets only. Requires fastPreview."),ae=e().nullable().optional().describe("Preview server URL — the deployment the CMS preview renders against (often the live site, e.g. https://acme.com). Painted in the preview iframe, and the render target for Fast Preview drafts. Supersedes the legacy productionUrl key."),ne=t({branch:e().describe("Git branch backing this release"),name:e().describe('User-facing name, e.g. "Black Friday 2026"'),color:e().describe("Dot color token shown in the version switcher"),createdBy:e().optional().describe("User ID who created the release"),createdAt:e().optional().describe("ISO 8601 creation timestamp")}),ie=a(ne).max(C).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),h={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:a(e()).max(k).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:e().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:H.nullable().optional().describe("UI customization settings"),sidebarViews:a(S).max(10).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:c(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),repository:K.nullable().optional().describe("Linked repository"),runtime:q.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:$,siteSlug:e().nullable().optional().describe("The project's site id (asset tenancy, CDN paths, site tokens). Set once when the site is created or imported; any write that would change it is refused."),publishPolicy:Q,previewServerUrl:ae,productionUrl:e().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:s().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:ee,releases:ie,fastPreviewInPlace:te},pe=t({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),url_slug:e().nullable().optional().describe("Name of the project in Studio URLs, unique in the organization"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:o(["active","inactive"]).describe("Current status"),pinned:s().describe("Whether this space is pinned to the sidebar"),metadata:t(h).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:Y.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:a(w).describe("Connections with their selected tools, resources, and prompts")}),M=t({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});t({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:o(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:s().optional().default(!1).describe("Pin to sidebar"),metadata:t(h).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(v).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:a(M).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});t({title:e().min(1).max(255).optional().describe("New name"),url_slug:I.nullish().describe("New URL slug. The old one keeps redirecting. Renaming does not change it. null keeps the current slug."),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:o(["active","inactive"]).optional().describe("New status"),pinned:s().optional().describe("Pin/unpin from sidebar"),metadata:t(h).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(v).optional().describe("New connections (replaces existing)"),prompts:a(M).max(20).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});export{le as C,j as E,C as R,pe as V,de as p,re as r,ce as w};
|
|
1
|
+
import{U as I}from"./url-slug-CMCbwnaP.js";import{aF as t,aG as e,aY as l,bW as a,bU as s,bV as o,d0 as c,cY as d,eg as A,d2 as R,cW as g}from"./index-BoB02eW2.js";const w=t({connection_id:e().describe("Connection ID"),selected_tools:a(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),b=500,v=200,k=200,_=20,U=50,E=100,P=20,T=100,C=300,N=100,V=8192,y=w.extend({selected_tools:a(e()).max(b).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).max(b).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).max(b).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),D=t({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),O=t({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:t({type:c("ext-app"),appId:e(),args:d(e(),g()).optional()})}),S=o(["overview","reports","board","site-editor","assets","releases","hosting","e2e","analytics","cdn","automations","experiments"]),le=o(["on","off"]),L=new Map([["manual","on"],["auto","on"]]),X=o(["on","off","manual","auto"]);function F(n){if(!n)return null;const i=L.get(n);return i||(n==="on"||n==="off"?n:null)}const B=t({defaultMainView:t({type:e(),id:e().optional(),toolName:e().optional()}).nullable().optional(),chatDefaultOpen:s().nullable().optional(),cmsDefaultOpen:s().nullable().optional(),cms:X.nullable().optional().describe("How this agent offers content editing. Absent means on; the retired `manual` / `auto` read as on too."),sidebarViews:a(S).max(10).nullable().optional().describe("Deprecated layout-scoped sidebar selections. Read only as a fallback when metadata.sidebarViews is absent."),tabs:a(O).max(P).optional()});function re(n){return F(n?.cms)??"on"}function ce(n,i){const r=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...r?{defaultMainView:{type:"site-editor"}}:{}}}const m=t({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:d(e(),g()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:l().int().positive().optional(),maxHeight:l().int().positive().optional()}),H=t({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:a(D).max(E).nullable().optional(),layout:B.nullable().optional(),homeTile:m.nullable().optional(),homeTiles:a(m).max(_).nullable().optional(),homePrompts:a(e()).max(U).nullable().optional()}),j=/^[A-Za-z_][A-Za-z0-9_]*$/,f=e().min(1).regex(j,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),z=R("kind",[t({key:f,kind:c("literal"),value:e().max(V)}),t({key:f,kind:c("secret"),secretId:e().min(1)})]),q=t({selected:e().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:e().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:e().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:a(z).max(N).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config.")}),K=t({url:e().describe("Repository URL, including its provider host"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:l().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),G=o(["agent-sandbox","local-api"]),W={sandboxHandle:e().describe("Provider-specific handle"),previewUrl:e().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:e().nullable().optional().describe("Direct sandbox API URL for runtimes that expose one. Equal to previewUrl for local-api; null/absent for AgentSandbox, which routes control traffic through hosted Studio."),createdAt:l().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:t({packageManager:e().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:e().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:e().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},x=t(W);function de(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,r={};for(const[p,u]of Object.entries(i))if(!(!u||typeof u!="object")&&!(p!=="agent-sandbox"&&p!=="local-api"))try{r[p]=x.parse(u)}catch{}return r}const Y=d(e().describe("userId"),d(e().describe("branch"),A(G,x))),Z=t({id:e().describe("Stable identifier for this knowledge file"),name:e().describe("File name shown in the UI"),kind:o(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:e().describe("Org filesystem (Library) volume the file lives in"),path:e().describe("Path within the volume"),url:e().describe("Same-origin URL to read the file (display/download)"),contentType:e().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:l().nullable().optional().describe("File size in bytes"),addedAt:e().describe("ISO timestamp when the file was attached")}),$=a(Z).max(T).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),J=o(["smart","code-review","open"]),Q=J.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),ee=s().nullable().optional().describe("Enable Fast Preview (sandbox-less): render the draft instantly on the preview server's own page via a ?__draft pointer, with reads/writes served by the decofile API against GitHub. Requires previewServerUrl (or legacy productionUrl) to be set to take effect."),te=s().nullable().optional().describe("EXPERIMENTAL: with Fast Preview on, refresh content edits via an in-place /live/previews render (no commit, no reload) instead of a commit + re-navigation. Deco-runtime preview targets only. Requires fastPreview."),ae=e().nullable().optional().describe("Preview server URL — the deployment the CMS preview renders against (often the live site, e.g. https://acme.com). Painted in the preview iframe, and the render target for Fast Preview drafts. Supersedes the legacy productionUrl key."),ne=t({branch:e().describe("Git branch backing this release"),name:e().describe('User-facing name, e.g. "Black Friday 2026"'),color:e().describe("Dot color token shown in the version switcher"),createdBy:e().optional().describe("User ID who created the release"),createdAt:e().optional().describe("ISO 8601 creation timestamp")}),ie=a(ne).max(C).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),h={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:a(e()).max(k).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:e().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:H.nullable().optional().describe("UI customization settings"),sidebarViews:a(S).max(10).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:c(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),repository:K.nullable().optional().describe("Linked repository"),runtime:q.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:$,siteSlug:e().nullable().optional().describe("The project's site id (asset tenancy, CDN paths, site tokens). Set once when the site is created or imported; any write that would change it is refused."),publishPolicy:Q,previewServerUrl:ae,productionUrl:e().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:s().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:ee,releases:ie,fastPreviewInPlace:te},pe=t({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),url_slug:e().nullable().optional().describe("Name of the project in Studio URLs, unique in the organization"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:o(["active","inactive"]).describe("Current status"),pinned:s().describe("Whether this space is pinned to the sidebar"),metadata:t(h).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:Y.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:a(w).describe("Connections with their selected tools, resources, and prompts")}),M=t({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});t({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:o(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:s().optional().default(!1).describe("Pin to sidebar"),metadata:t(h).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(v).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:a(M).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});t({title:e().min(1).max(255).optional().describe("New name"),url_slug:I.nullish().describe("New URL slug. The old one keeps redirecting. Renaming does not change it. null keeps the current slug."),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:o(["active","inactive"]).optional().describe("New status"),pinned:s().optional().describe("Pin/unpin from sidebar"),metadata:t(h).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(v).optional().describe("New connections (replaces existing)"),prompts:a(M).max(20).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});export{le as C,j as E,C as R,pe as V,de as p,re as r,ce as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bW as C,aG as T,aF as S}from"./index-BoB02eW2.js";import{T as O,a as w,b as L,c as N,d as P}from"./task-board-DxxiAR5A.js";import{e as F}from"./backoff-CrEUbyZT.js";const h={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},V=Object.values(h),y="notification.created",H=60,j=100,$=2e3,u=C(T().min(1)).max($),x=S({id:T().min(1).max(64),name:T().trim().min(1).max(H),projectIds:u}),Y=C(x).max(j),K=S({pinned:u,hidden:u,dismissed:u,hiddenFolders:u}),ee={pinned:[],hidden:[],dismissed:[],hiddenFolders:[]};S({folders:Y,preferences:K,joinedAt:T().nullable()});const M="project-folders.updated",v="order-monitor.store.evaluated",te=["orders_drop","denied_spike","cancel_spike"],X=3e4,q=1e3;function I(a){const{buildUrl:f,eventTypes:p,name:d,crossTab:_=!1}=a,c=new Map,l=_&&typeof BroadcastChannel<"u"&&typeof navigator<"u"&&typeof navigator.locks<"u";if(l&&!d)throw new Error("createSSESubscription: `name` is required when crossTab");function E(e,t){e.bootDone=!0;for(const s of e.handlers)try{s(t)}catch{}}function A(e){for(const t of e.reconnectHandlers)try{t()}catch{}}function m(e){const t=new EventSource(f(e.key));e.es=t,t.onopen=()=>{e.reconnectAttempt=0,e.bootDone&&(A(e),e.channel?.postMessage({kind:"reconnect"})),e.bootDone=!0},t.onerror=()=>{e.es===t&&t.readyState===EventSource.CLOSED&&U(e)};const s=n=>{e.channel?.postMessage({kind:"event",type:n.type,data:n.data}),E(e,n)};for(const n of p)t.addEventListener(n,s)}function U(e){if(e.refCount<=0||e.reconnectTimer)return;const t=F(X,q,e.reconnectAttempt,2,.5);e.reconnectAttempt++,e.reconnectTimer=setTimeout(()=>{e.reconnectTimer=null,!(e.refCount<=0||!e.isLeader)&&(e.es?.close(),m(e))},t)}function D(e){if(e.refCount<=0){e.releaseLeadership?.(),e.releaseLeadership=null;return}e.isLeader=!0,m(e)}function B(e){if(!l){D(e);return}e.lockAbort=new AbortController,navigator.locks.request(`sse-leader:${d}:${e.key}`,{signal:e.lockAbort.signal},()=>new Promise(t=>{e.releaseLeadership=t,D(e)})).catch(()=>{})}function W(e,t){t.kind==="event"?E(e,new MessageEvent(t.type,{data:t.data})):t.kind==="reconnect"&&A(e)}function g(e){const t=c.get(e);if(t)return t;const s={key:e,refCount:0,handlers:new Set,reconnectHandlers:new Set,bootDone:!1,es:null,isLeader:!1,reconnectAttempt:0,reconnectTimer:null,channel:null,lockAbort:null,releaseLeadership:null};if(c.set(e,s),l){const n=new BroadcastChannel(`sse:${d}:${e}`);n.onmessage=r=>W(s,r.data),s.channel=n}return s}function b(e){e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null),e.es?.close(),e.es=null,e.releaseLeadership?.(),e.releaseLeadership=null,e.lockAbort?.abort(),e.lockAbort=null,e.channel?.close(),e.channel=null,c.delete(e.key)}return{dispose(){for(const e of[...c.values()])b(e)},subscribe(e,t,s){const n=!c.has(e),r=g(e);r.refCount++,r.handlers.add(t),s&&r.reconnectHandlers.add(s),n&&B(r);let R=!1;return()=>{R||(R=!0,r.handlers.delete(t),s&&r.reconnectHandlers.delete(s),r.refCount--,r.refCount<=0&&b(r))}}}}function o(a,f){const p=new Set(f);return{dispose:()=>a.dispose(),subscribe(d,_,c){const l=E=>{p.has(E.type)&&_(E)};return a.subscribe(d,l,c)}}}const k=[...V,O,w,L,N,P,y,M,v],J=k,G=k,i=I({name:"watch",buildUrl:a=>`/api/${encodeURIComponent(a)}/watch?types=${J.join(",")}`,eventTypes:G,crossTab:!0}),se=o(i,[...V]),re=o(i,[O,w]),ne=o(i,[L]),ae=o(i,[N]),oe=o(i,[P]),ie=o(i,[y]),ce=o(i,[M]),de=o(i,[v]),le=I({buildUrl:a=>`/api/${encodeURIComponent(a)}/watch?scope=all&types=${h.THREAD_STATUS}`,eventTypes:[h.THREAD_STATUS]});export{h as D,ee as E,te as O,H as P,le as a,oe as b,ae as c,se as d,ne as e,ie as n,de as o,ce as p,re as t};
|
package/dist/client/index.html
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<meta name="twitter:description" content="Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in." />
|
|
51
51
|
<meta name="twitter:image" content="/og-image.png" />
|
|
52
52
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
53
|
-
<script type="module" crossorigin src="/assets/index-
|
|
53
|
+
<script type="module" crossorigin src="/assets/index-BoB02eW2.js"></script>
|
|
54
54
|
<link rel="stylesheet" crossorigin href="/assets/index-m9hX09uY.css">
|
|
55
55
|
</head>
|
|
56
56
|
<body>
|
package/dist/server/cli.js
CHANGED
|
@@ -78,7 +78,7 @@ _deco_commands() {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
_deco "$@"
|
|
81
|
-
`}async function Wv(t){let e=t||process.env.SHELL?.split("/").pop()||"bash",s,r;switch(e){case"bash":{s=Lv(),r=_2(k2(),".local/share/bash-completion/completions/deco");break}case"zsh":{s=zv(),r=_2(k2(),".zsh/completions/_deco");break}default:console.error(`Unsupported shell: ${e}`),console.log("Supported shells: bash, zsh"),process.exit(1)}if(Mv(l2(r),{recursive:!0}),await Uv(r,s,"utf8"),console.log(`Completion script installed to: ${r}`),console.log(""),e==="bash")console.log("To enable completions, add to your ~/.bashrc:"),console.log(` source "${r}"`);else console.log("To enable completions, add to your ~/.zshrc:"),console.log(` fpath=("${l2(r)}" $fpath)`),console.log(" autoload -U compinit && compinit");console.log(""),console.log("Then restart your shell.")}var v2=()=>{};import{homedir as qv}from"os";function Qv(t){let e=(t??"").trim();return dv.has(e)?e:"all"}function Hv(t){let e=(t??"").trim();return Jv.has(e)?e:"development"}function gt(t){return t==="true"||t==="1"}function g3(t,e,s){if(e===void 0||e==="")return;let r=Number(e);if(!Number.isSafeInteger(r)||r<=0)throw Error(`${t} must be a positive integer`);if(s!==void 0&&r>s)throw Error(`${t} must be at most ${s}`);return r}function Ke(t,e,s,r){return g3(t,e,r)??s}function Gv(t){let e={};for(let s of(t??"").split(",")){let r=s.trim();if(!r)continue;let n=r.indexOf("="),c=n>0?r.slice(0,n).trim():"",o=n>0?r.slice(n+1).trim():"";if(!c||!o){console.warn(`STRIPE_PLAN_PRICE_IDS: ignoring unparseable entry "${r}" \u2014 expected price_xxx=planId`);continue}e[c]=o}return e}function Kv(t,e,s,r){if(e===void 0||e==="")return s;let n=Number(e);if(!Number.isSafeInteger(n)||n<0)throw Error(`${t} must be a non-negative integer`);if(r!==void 0&&n>r)throw Error(`${t} must be at most ${r}`);return n}function v3(t,e){if(t===void 0||t==="")return e;return t==="true"||t==="1"}function Xv(t){return t===void 0||t===""||t==="true"||t==="1"}function po(t,e){return t||e}function g2(t){let e=t.DATA_DIR||t.DECOCMS_HOME||`${qv()}/deco`,s=Hv(t.NODE_ENV),r=t.VOICE_CONVERSATION_PROVIDER?.trim()||"elevenlabs",n={nodeEnv:s,port:Ke("PORT",t.PORT,3000,65535),baseUrl:t.BASE_URL,publicUrl:po(t.STUDIO_PUBLIC_URL,t.MESH_PUBLIC_URL),dataDir:e,voiceConversationProvider:r==="elevenlabs"||r==="openai"?r:null,openaiLiveApiKey:t.OPENAI_LIVE_API_KEY,openaiLiveModel:t.OPENAI_LIVE_MODEL?.trim()||"gpt-live-1",openaiLiveVoice:t.OPENAI_LIVE_VOICE?.trim()||"marin",elevenlabsApiKey:t.ELEVENLABS_API_KEY,elevenlabsVoiceId:t.ELEVENLABS_VOICE_ID||"JBFqnCBsd6RMkjVDRZzb",elevenlabsVoiceModel:t.ELEVENLABS_VOICE_MODEL||"eleven_v4_turbo",elevenlabsConversationModel:t.ELEVENLABS_CONVERSATION_MODEL?.trim()||"gemini-2.5-flash",databaseUrl:t.DATABASE_URL||"postgresql://postgres:postgres@localhost:5432/postgres",databasePgSsl:gt(t.DATABASE_PG_SSL),databasePoolMax:Ke("DATABASE_POOL_MAX",t.DATABASE_POOL_MAX,5),dbosPoolSize:Ke("DBOS_POOL_SIZE",t.DBOS_POOL_SIZE,5),betterAuthSecret:t.BETTER_AUTH_SECRET||"",encryptionKey:t.ENCRYPTION_KEY||"",studioJwtSecret:po(t.STUDIO_JWT_SECRET,t.MESH_JWT_SECRET),localMode:gt(t.DECOCMS_LOCAL_MODE),disableRateLimit:gt(t.DISABLE_RATE_LIMIT),jiraAllowLocalSiteUrl:gt(t.JIRA_ALLOW_LOCAL_SITE_URL),jiraSettleSeconds:Ke("JIRA_SETTLE_SECONDS",t.JIRA_SETTLE_SECONDS,20,3600),studioProvisionSecretKey:t.STUDIO_PROVISION_SECRET_KEY,deploymentAdminEmails:(t.DEPLOYMENT_ADMIN_EMAILS??"").split(",").map((c)=>c.trim().toLowerCase()).filter(Boolean),taskBoardAdminOrgIds:(t.STUDIO_ADMIN_ORG_IDS??"").split(",").map((c)=>c.trim()).filter(Boolean),deploymentAdminToken:t.DEPLOYMENT_ADMIN_TOKEN||void 0,clickhouseUrl:t.CLICKHOUSE_URL,clickhouseMaxMemoryUsage:g3("CLICKHOUSE_MAX_MEMORY_USAGE",t.CLICKHOUSE_MAX_MEMORY_USAGE),monitoringOtlpEndpoint:t.MONITORING_OTLP_ENDPOINT,otelServiceName:t.OTEL_SERVICE_NAME||"studio",natsUrls:(t.NATS_URL||"nats://localhost:4222").split(",").map((c)=>c.trim()).filter(Boolean),natsCredsPath:t.NATS_CREDS,natsUser:t.NATS_USER||void 0,natsPassword:t.NATS_PASSWORD||void 0,configPath:t.CONFIG_PATH||"./config.json",aiGatewayEnabled:gt(t.DECO_AI_GATEWAY_ENABLED),aiGatewayUrl:t.DECO_AI_GATEWAY_URL||"https://ai-site.deco.site",aiGatewayAdminToken:t.DECO_AI_GATEWAY_ADMIN_TOKEN,stripeWebhookSecret:t.STRIPE_WEBHOOK_SECRET,stripeSecretKey:t.STRIPE_SECRET_KEY,stripeOrgPriceId:t.STRIPE_ORG_PRICE_ID,stripePlanPriceIds:Gv(t.STRIPE_PLAN_PRICE_IDS),stripePortalConfigurationId:t.STRIPE_PORTAL_CONFIGURATION_ID,stripeTopupProductId:t.STRIPE_TOPUP_PRODUCT_ID,topupFeePercent:Kv("STUDIO_TOPUP_FEE_PERCENT",t.STUDIO_TOPUP_FEE_PERCENT,15,100),taskQuotaEnforced:gt(t.STUDIO_TASK_QUOTA_ENFORCED),freeTaskExecutions:Ke("STUDIO_FREE_TASKS",t.STUDIO_FREE_TASKS,3),monthlyTaskExecutions:Ke("STUDIO_MONTHLY_TASKS",t.STUDIO_MONTHLY_TASKS,10),maxRunsPerTask:Ke("STUDIO_MAX_RUNS_PER_TASK",t.STUDIO_MAX_RUNS_PER_TASK,5),enableDecoImport:gt(t.ENABLE_DECO_IMPORT),hostingControlPlaneGa:gt(t.HOSTING_CONTROL_PLANE_GA),monitorGa:gt(t.MONITOR_GA),plansEnabled:gt(t.STUDIO_PLANS_ENABLED),mcpCacheEnabled:v3(t.MCP_CACHE_ENABLED,s!=="development"),orgFsPublicSetsJson:t.ORGFS_PUBLIC_SETS,orgFsMountsDisabled:gt(t.DISABLE_ORGFS_MOUNTS),decopilotMaxConcurrentSubagents:Ke("DECOPILOT_MAX_CONCURRENT_SUBAGENTS",t.DECOPILOT_MAX_CONCURRENT_SUBAGENTS,4),decopilotMaxConcurrentHostedRuns:Ke("DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS",t.DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS,3),taskBoardReviewSweeperEnabled:v3(t.TASK_BOARD_REVIEW_SWEEPER_ENABLED,!0),boardTransitionSettleSeconds:Ke("BOARD_TRANSITION_SETTLE_SECONDS",t.BOARD_TRANSITION_SETTLE_SECONDS,20,3600),sandboxMaxConcurrentHostedRuns:Ke("SANDBOX_MAX_CONCURRENT_HOSTED_RUNS",t.SANDBOX_MAX_CONCURRENT_HOSTED_RUNS,12),s3Endpoint:t.S3_ENDPOINT,s3Bucket:t.S3_BUCKET,s3Region:t.S3_REGION||"auto",s3AccessKeyId:t.S3_ACCESS_KEY_ID,s3SecretAccessKey:t.S3_SECRET_ACCESS_KEY,s3ForcePathStyle:Xv(t.S3_FORCE_PATH_STYLE),monitoringS3Bucket:t.MONITORING_S3_BUCKET,monitoringS3Endpoint:t.MONITORING_S3_ENDPOINT,monitoringS3Region:t.MONITORING_S3_REGION,monitoringS3AccessKeyId:t.MONITORING_S3_ACCESS_KEY_ID,monitoringS3SecretAccessKey:t.MONITORING_S3_SECRET_ACCESS_KEY,monitoringS3Prefix:t.MONITORING_S3_PREFIX,duckdbExtensionDirectory:t.DUCKDB_EXTENSION_DIRECTORY||"/opt/duckdb/extensions",duckdbMemoryLimit:t.DUCKDB_MEMORY_LIMIT||void 0,duckdbThreads:g3("DUCKDB_THREADS",t.DUCKDB_THREADS),podName:t.POD_NAME||crypto.randomUUID(),dispatchRole:Qv(po(t.STUDIO_DISPATCH_ROLE,t.MESH_DISPATCH_ROLE)),agentSandboxEnabled:gt(t.STUDIO_AGENT_SANDBOX_ENABLED),sandboxStickyHeadRefEnabled:gt(t.SANDBOX_STICKY_HEAD_REF),taskBoardRerunReusesPrBranch:v3(t.TASK_BOARD_RERUN_REUSES_PR_BRANCH,!0),sandboxReleaseOnRunEndEnabled:gt(t.SANDBOX_RELEASE_ON_RUN_END),sandboxPrewarmOnThreadCreateEnabled:gt(t.SANDBOX_PREWARM_ON_THREAD_CREATE),sandboxPersistentHarnessEnabled:gt(t.SANDBOX_PERSISTENT_HARNESS),sandboxReleaseGraceMs:Ke("SANDBOX_RELEASE_GRACE_MS",t.SANDBOX_RELEASE_GRACE_MS,120000),decoSupabaseUrl:t.DECO_SUPABASE_URL,decoSupabaseServiceKey:t.DECO_SUPABASE_SERVICE_KEY,controlplaneRestUrl:t.CONTROLPLANE_REST_URL,controlplaneServiceToken:t.CONTROLPLANE_SERVICE_TOKEN,analyticsDataUrl:t.ANALYTICS_URL,analyticsMasterToken:t.ANALYTICS_MASTER_TOKEN,clickhouseAnalyticsUrl:t.CLICKHOUSE_ANALYTICS_ADDRESS,clickhouseAnalyticsUsername:t.CLICKHOUSE_ANALYTICS_USERNAME||"admin_monitor",clickhouseAnalyticsPassword:t.CLICKHOUSE_ANALYTICS_PASSWORD,customerLakeUrl:t.CUSTOMER_LAKE_URL,customerLakeAdminUsername:t.CUSTOMER_LAKE_ADMIN_USERNAME||"customer_lake_user_admin",customerLakeAdminPassword:t.CUSTOMER_LAKE_ADMIN_PASSWORD,customerLakeTenantSecret:t.CUSTOMER_LAKE_TENANT_SECRET,oneDollarStatsApiKey:t.ONEDOLLAR_BACKEND_API_KEY,reportsInternalApiUrl:po(t.REPORTS_INTERNAL_API_URL,t.COMMERCE_DISCOVERY_INTERNAL_API_URL),reportsInternalApiKey:po(t.REPORTS_INTERNAL_API_KEY,t.COMMERCE_DISCOVERY_INTERNAL_API_KEY),s3TenantBucket:t.S3_TENANT_BUCKET||"new-deco-sites-assets",s3TenantRegion:t.S3_TENANT_REGION||"us-west-2",s3TenantEndpoint:t.S3_TENANT_ENDPOINT,s3TenantPublicUrlBase:t.S3_TENANT_PUBLIC_URL_BASE||"https://assets.decocms.com",awsS3TenantRoleArn:t.AWS_S3_TENANT_ROLE_ARN,awsS3TenantProvisionerAccessKeyId:t.AWS_S3_TENANT_PROVISIONER_ACCESS_KEY_ID,awsS3TenantProvisionerSecretAccessKey:t.AWS_S3_TENANT_PROVISIONER_SECRET_ACCESS_KEY,deliveryR2AccountId:t.DELIVERY_R2_ACCOUNT_ID,deliveryR2AccessKeyId:t.DELIVERY_R2_ACCESS_KEY_ID,deliveryR2SecretAccessKey:t.DELIVERY_R2_SECRET_ACCESS_KEY,deliveryR2Bucket:t.DELIVERY_R2_BUCKET,deliveryR2Endpoint:t.DELIVERY_R2_ENDPOINT,deliveryPublicOrigin:t.DELIVERY_PUBLIC_ORIGIN,siteTokenSigningKey:t.DECO_SITE_TOKEN_SIGNING_KEY,cfDeliveryZoneId:t.CF_DELIVERY_ZONE_ID,cfPurgeApiToken:t.CF_PURGE_API_TOKEN};if(Boolean(n.natsUser)!==Boolean(n.natsPassword))throw Error("NATS_USER and NATS_PASSWORD must be set together");if(n.natsCredsPath&&n.natsUser)throw Error("Use either NATS_CREDS or NATS_USER/NATS_PASSWORD");if(n.plansEnabled&&!n.studioJwtSecret)throw Error("STUDIO_PLANS_ENABLED requires an explicit gateway JWT secret. Set STUDIO_JWT_SECRET (or its legacy alias MESH_JWT_SECRET) to the same value as the gateway's MESH_JWT_SECRET. Refusing to fall back to BETTER_AUTH_SECRET: that mismatch 401s every entitlements call, which every feature gate reads as 'no answer' and fails OPEN.");if(n.plansEnabled&&!n.studioProvisionSecretKey)throw Error("STUDIO_PLANS_ENABLED requires STUDIO_PROVISION_SECRET_KEY, set to the same value as the gateway's STUDIO_PROVISION_KEY. Without it the gateway cannot identify this server, falls back to a per-user membership callback that 401s for any user who never completed the gateway OAuth flow, and every feature gate then fails OPEN.");if(n.plansEnabled&&!n.aiGatewayEnabled)throw Error("STUDIO_PLANS_ENABLED requires DECO_AI_GATEWAY_ENABLED=true. Plans are read from the gateway; with it disabled there is no adapter to ask, so every feature gate fails OPEN on both server and client and the paid product is free fleet-wide.");if(n.plansEnabled&&Object.keys(n.stripePlanPriceIds).length>0&&!n.aiGatewayAdminToken)throw Error("STRIPE_PLAN_PRICE_IDS is set but DECO_AI_GATEWAY_ADMIN_TOKEN is not. The Stripe webhook places the paid tier through the gateway's admin API, so without the token a customer is charged and the entitlement "+"is never granted \u2014 and AI_PLAN_SET cannot repair it, it accepts only "+"'free'.");if(n.plansEnabled&&Object.keys(n.stripePlanPriceIds).length>1&&!n.stripePortalConfigurationId)console.warn("STRIPE_PLAN_PRICE_IDS maps more than one plan but STRIPE_PORTAL_CONFIGURATION_ID is unset. An org that already has a subscription cannot change tier: the account's default portal configuration lists only the legacy plans, not the tiers, so Stripe refuses the update flow. First-time checkout is unaffected.");return n}var dv,Jv;var a2=A(()=>{dv=new Set(["all","worker","api"]);Jv=new Set(["production","development","test"])});function ge(){return Zv??=Object.freeze(g2(process.env))}var Zv=null;var Rc=A(()=>{a2()});import{context as KBt,propagation as XBt,SpanKind as ZBt,SpanStatusCode as FBt}from"@opentelemetry/api";var fBt;var p2=A(()=>{tu();fBt=globalThis.fetch});var eu=A(()=>{Rc()});import{ExportResultCode as $i}from"@opentelemetry/core";import{mkdir as Fv,rename as jv,writeFile as fv}from"fs/promises";import{join as Bi}from"path";class Di{bufferItems=[];bufferBytes=0;flushTimer=null;flushQueue=Promise.resolve();basePath;flushThreshold;maxBufferBytes;isShutdown=!1;knownDirs=new Set;partitionKey;constructor(t){this.basePath=t.basePath,this.flushThreshold=t.flushThreshold??1000,this.maxBufferBytes=t.maxBufferBytes??10485760,this.partitionKey=t.partitionKey;let e=t.flushIntervalMs??60000;if(e>0&&e<3600000){if(this.flushTimer=setInterval(()=>{this.flush().catch((s)=>{console.error("[NDJSONExporter] Timer flush failed:",s)})},e),this.flushTimer&&typeof this.flushTimer==="object"&&"unref"in this.flushTimer)this.flushTimer.unref()}}exportRows(t){if(this.isShutdown)return Promise.resolve({code:$i.FAILED});for(let e of t){let s=JSON.stringify(e),r=this.partitionKey?this.partitionKey(e):"";this.bufferItems.push({partition:r,json:s}),this.bufferBytes+=Buffer.byteLength(s,"utf8")+1}if(this.bufferItems.length>=this.flushThreshold||this.bufferBytes>=this.maxBufferBytes)return this.flush().then(()=>({code:$i.SUCCESS})).catch((e)=>{return console.error("[NDJSONExporter] Flush failed:",e),{code:$i.FAILED}});return Promise.resolve({code:$i.SUCCESS})}async shutdown(){if(this.isShutdown=!0,this.flushTimer)clearInterval(this.flushTimer),this.flushTimer=null;try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}async forceFlush(){try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}flush(){let e=this.flushQueue.catch(()=>{}).then(()=>this.doFlush());return this.flushQueue=e,e}async doFlush(){if(this.bufferItems.length===0)return;let t=this.bufferItems;this.bufferItems=[],this.bufferBytes=0;let e=new Map;for(let n of t){let c=e.get(n.partition);if(!c)c=[],e.set(n.partition,c);c.push(n.json)}let s=await Promise.allSettled(Array.from(e.entries()).map(([n,c])=>this.writeNDJSON(c,n).then(()=>n))),r=s.find((n)=>n.status==="rejected");if(r){let n=new Set;for(let o of s)if(o.status==="fulfilled")n.add(o.value);let c=t.filter((o)=>!n.has(o.partition));this.bufferItems=c.concat(this.bufferItems),this.bufferBytes=0;for(let o of this.bufferItems)this.bufferBytes+=Buffer.byteLength(o.json,"utf8")+1;throw r.reason}}async writeNDJSON(t,e){let s=new Date,r=[String(s.getUTCFullYear()),String(s.getUTCMonth()+1).padStart(2,"0"),String(s.getUTCDate()).padStart(2,"0"),String(s.getUTCHours()).padStart(2,"0")],n=e?Bi(this.basePath,e,...r):Bi(this.basePath,...r);if(!this.knownDirs.has(n))await Fv(n,{recursive:!0,mode:448}),this.knownDirs.add(n);let c=`${crypto.randomUUID()}.ndjson`,o=Bi(n,`.${c}.tmp`),u=Bi(n,c),i=t.join(`
|
|
81
|
+
`}async function Wv(t){let e=t||process.env.SHELL?.split("/").pop()||"bash",s,r;switch(e){case"bash":{s=Lv(),r=_2(k2(),".local/share/bash-completion/completions/deco");break}case"zsh":{s=zv(),r=_2(k2(),".zsh/completions/_deco");break}default:console.error(`Unsupported shell: ${e}`),console.log("Supported shells: bash, zsh"),process.exit(1)}if(Mv(l2(r),{recursive:!0}),await Uv(r,s,"utf8"),console.log(`Completion script installed to: ${r}`),console.log(""),e==="bash")console.log("To enable completions, add to your ~/.bashrc:"),console.log(` source "${r}"`);else console.log("To enable completions, add to your ~/.zshrc:"),console.log(` fpath=("${l2(r)}" $fpath)`),console.log(" autoload -U compinit && compinit");console.log(""),console.log("Then restart your shell.")}var v2=()=>{};import{homedir as qv}from"os";function Qv(t){let e=(t??"").trim();return dv.has(e)?e:"all"}function Hv(t){let e=(t??"").trim();return Jv.has(e)?e:"development"}function gt(t){return t==="true"||t==="1"}function g3(t,e,s){if(e===void 0||e==="")return;let r=Number(e);if(!Number.isSafeInteger(r)||r<=0)throw Error(`${t} must be a positive integer`);if(s!==void 0&&r>s)throw Error(`${t} must be at most ${s}`);return r}function Ke(t,e,s,r){return g3(t,e,r)??s}function Gv(t){let e={};for(let s of(t??"").split(",")){let r=s.trim();if(!r)continue;let n=r.indexOf("="),c=n>0?r.slice(0,n).trim():"",o=n>0?r.slice(n+1).trim():"";if(!c||!o){console.warn(`STRIPE_PLAN_PRICE_IDS: ignoring unparseable entry "${r}" \u2014 expected price_xxx=planId`);continue}e[c]=o}return e}function Kv(t,e,s,r){if(e===void 0||e==="")return s;let n=Number(e);if(!Number.isSafeInteger(n)||n<0)throw Error(`${t} must be a non-negative integer`);if(r!==void 0&&n>r)throw Error(`${t} must be at most ${r}`);return n}function v3(t,e){if(t===void 0||t==="")return e;return t==="true"||t==="1"}function Xv(t){return t===void 0||t===""||t==="true"||t==="1"}function po(t,e){return t||e}function g2(t){let e=t.DATA_DIR||t.DECOCMS_HOME||`${qv()}/deco`,s=Hv(t.NODE_ENV),r=t.VOICE_CONVERSATION_PROVIDER?.trim()||"elevenlabs",n={nodeEnv:s,port:Ke("PORT",t.PORT,3000,65535),baseUrl:t.BASE_URL,publicUrl:po(t.STUDIO_PUBLIC_URL,t.MESH_PUBLIC_URL),dataDir:e,voiceConversationProvider:r==="elevenlabs"||r==="openai"?r:null,openaiLiveApiKey:t.OPENAI_LIVE_API_KEY,openaiLiveModel:t.OPENAI_LIVE_MODEL?.trim()||"gpt-live-1",openaiLiveVoice:t.OPENAI_LIVE_VOICE?.trim()||"marin",elevenlabsApiKey:t.ELEVENLABS_API_KEY,elevenlabsVoiceId:t.ELEVENLABS_VOICE_ID||"JBFqnCBsd6RMkjVDRZzb",elevenlabsVoiceModel:t.ELEVENLABS_VOICE_MODEL||"eleven_v4_turbo",elevenlabsConversationModel:t.ELEVENLABS_CONVERSATION_MODEL?.trim()||"gemini-2.5-flash",databaseUrl:t.DATABASE_URL||"postgresql://postgres:postgres@localhost:5432/postgres",databasePgSsl:gt(t.DATABASE_PG_SSL),databasePoolMax:Ke("DATABASE_POOL_MAX",t.DATABASE_POOL_MAX,5),dbosPoolSize:Ke("DBOS_POOL_SIZE",t.DBOS_POOL_SIZE,5),betterAuthSecret:t.BETTER_AUTH_SECRET||"",encryptionKey:t.ENCRYPTION_KEY||"",studioJwtSecret:po(t.STUDIO_JWT_SECRET,t.MESH_JWT_SECRET),localMode:gt(t.DECOCMS_LOCAL_MODE),disableRateLimit:gt(t.DISABLE_RATE_LIMIT),jiraAllowLocalSiteUrl:gt(t.JIRA_ALLOW_LOCAL_SITE_URL),jiraSettleSeconds:Ke("JIRA_SETTLE_SECONDS",t.JIRA_SETTLE_SECONDS,20,3600),studioProvisionSecretKey:t.STUDIO_PROVISION_SECRET_KEY,deploymentAdminEmails:(t.DEPLOYMENT_ADMIN_EMAILS??"").split(",").map((c)=>c.trim().toLowerCase()).filter(Boolean),taskBoardAdminOrgIds:(t.STUDIO_ADMIN_ORG_IDS??"").split(",").map((c)=>c.trim()).filter(Boolean),deploymentAdminToken:t.DEPLOYMENT_ADMIN_TOKEN||void 0,clickhouseUrl:t.CLICKHOUSE_URL,clickhouseMaxMemoryUsage:g3("CLICKHOUSE_MAX_MEMORY_USAGE",t.CLICKHOUSE_MAX_MEMORY_USAGE),monitoringOtlpEndpoint:t.MONITORING_OTLP_ENDPOINT,otelServiceName:t.OTEL_SERVICE_NAME||"studio",natsUrls:(t.NATS_URL||"nats://localhost:4222").split(",").map((c)=>c.trim()).filter(Boolean),natsCredsPath:t.NATS_CREDS,natsUser:t.NATS_USER||void 0,natsPassword:t.NATS_PASSWORD||void 0,configPath:t.CONFIG_PATH||"./config.json",aiGatewayEnabled:gt(t.DECO_AI_GATEWAY_ENABLED),aiGatewayUrl:t.DECO_AI_GATEWAY_URL||"https://ai-site.deco.site",aiGatewayAdminToken:t.DECO_AI_GATEWAY_ADMIN_TOKEN,stripeWebhookSecret:t.STRIPE_WEBHOOK_SECRET,stripeSecretKey:t.STRIPE_SECRET_KEY,stripeOrgPriceId:t.STRIPE_ORG_PRICE_ID,stripePlanPriceIds:Gv(t.STRIPE_PLAN_PRICE_IDS),stripePortalConfigurationId:t.STRIPE_PORTAL_CONFIGURATION_ID,stripeTopupProductId:t.STRIPE_TOPUP_PRODUCT_ID,topupFeePercent:Kv("STUDIO_TOPUP_FEE_PERCENT",t.STUDIO_TOPUP_FEE_PERCENT,15,100),taskQuotaEnforced:gt(t.STUDIO_TASK_QUOTA_ENFORCED),freeTaskExecutions:Ke("STUDIO_FREE_TASKS",t.STUDIO_FREE_TASKS,3),monthlyTaskExecutions:Ke("STUDIO_MONTHLY_TASKS",t.STUDIO_MONTHLY_TASKS,10),maxRunsPerTask:Ke("STUDIO_MAX_RUNS_PER_TASK",t.STUDIO_MAX_RUNS_PER_TASK,5),enableDecoImport:gt(t.ENABLE_DECO_IMPORT),hostingControlPlaneGa:gt(t.HOSTING_CONTROL_PLANE_GA),monitorGa:gt(t.MONITOR_GA),plansEnabled:gt(t.STUDIO_PLANS_ENABLED),mcpCacheEnabled:v3(t.MCP_CACHE_ENABLED,s!=="development"),orgFsPublicSetsJson:t.ORGFS_PUBLIC_SETS,orgFsMountsDisabled:gt(t.DISABLE_ORGFS_MOUNTS),decopilotMaxConcurrentSubagents:Ke("DECOPILOT_MAX_CONCURRENT_SUBAGENTS",t.DECOPILOT_MAX_CONCURRENT_SUBAGENTS,4),decopilotMaxConcurrentHostedRuns:Ke("DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS",t.DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS,3),taskBoardReviewSweeperEnabled:v3(t.TASK_BOARD_REVIEW_SWEEPER_ENABLED,!0),boardTransitionSettleSeconds:Ke("BOARD_TRANSITION_SETTLE_SECONDS",t.BOARD_TRANSITION_SETTLE_SECONDS,20,3600),sandboxMaxConcurrentHostedRuns:Ke("SANDBOX_MAX_CONCURRENT_HOSTED_RUNS",t.SANDBOX_MAX_CONCURRENT_HOSTED_RUNS,12),s3Endpoint:t.S3_ENDPOINT,s3Bucket:t.S3_BUCKET,s3Region:t.S3_REGION||"auto",s3AccessKeyId:t.S3_ACCESS_KEY_ID,s3SecretAccessKey:t.S3_SECRET_ACCESS_KEY,s3ForcePathStyle:Xv(t.S3_FORCE_PATH_STYLE),monitoringS3Bucket:t.MONITORING_S3_BUCKET,monitoringS3Endpoint:t.MONITORING_S3_ENDPOINT,monitoringS3Region:t.MONITORING_S3_REGION,monitoringS3AccessKeyId:t.MONITORING_S3_ACCESS_KEY_ID,monitoringS3SecretAccessKey:t.MONITORING_S3_SECRET_ACCESS_KEY,monitoringS3Prefix:t.MONITORING_S3_PREFIX,duckdbExtensionDirectory:t.DUCKDB_EXTENSION_DIRECTORY||"/opt/duckdb/extensions",duckdbMemoryLimit:t.DUCKDB_MEMORY_LIMIT||void 0,duckdbThreads:g3("DUCKDB_THREADS",t.DUCKDB_THREADS),podName:t.POD_NAME||crypto.randomUUID(),dispatchRole:Qv(po(t.STUDIO_DISPATCH_ROLE,t.MESH_DISPATCH_ROLE)),agentSandboxEnabled:gt(t.STUDIO_AGENT_SANDBOX_ENABLED),sandboxStickyHeadRefEnabled:gt(t.SANDBOX_STICKY_HEAD_REF),taskBoardRerunReusesPrBranch:v3(t.TASK_BOARD_RERUN_REUSES_PR_BRANCH,!0),sandboxReleaseOnRunEndEnabled:gt(t.SANDBOX_RELEASE_ON_RUN_END),sandboxPrewarmOnThreadCreateEnabled:gt(t.SANDBOX_PREWARM_ON_THREAD_CREATE),sandboxPersistentHarnessEnabled:gt(t.SANDBOX_PERSISTENT_HARNESS),sandboxReleaseGraceMs:Ke("SANDBOX_RELEASE_GRACE_MS",t.SANDBOX_RELEASE_GRACE_MS,120000),decoSupabaseUrl:t.DECO_SUPABASE_URL,decoSupabaseServiceKey:t.DECO_SUPABASE_SERVICE_KEY,controlplaneRestUrl:t.CONTROLPLANE_REST_URL,controlplaneServiceToken:t.CONTROLPLANE_SERVICE_TOKEN,analyticsDataUrl:t.ANALYTICS_URL,analyticsMasterToken:t.ANALYTICS_MASTER_TOKEN,clickhouseAnalyticsUrl:t.CLICKHOUSE_ANALYTICS_ADDRESS,clickhouseAnalyticsUsername:t.CLICKHOUSE_ANALYTICS_USERNAME||"admin_monitor",clickhouseAnalyticsPassword:t.CLICKHOUSE_ANALYTICS_PASSWORD,customerLakeUrl:t.CUSTOMER_LAKE_URL,customerLakeAdminUsername:t.CUSTOMER_LAKE_ADMIN_USERNAME||"customer_lake_user_admin",customerLakeAdminPassword:t.CUSTOMER_LAKE_ADMIN_PASSWORD,customerLakeTenantSecret:t.CUSTOMER_LAKE_TENANT_SECRET,orderMonitorIngestUrl:t.ORDER_MONITOR_INGEST_URL,oneDollarStatsApiKey:t.ONEDOLLAR_BACKEND_API_KEY,reportsInternalApiUrl:po(t.REPORTS_INTERNAL_API_URL,t.COMMERCE_DISCOVERY_INTERNAL_API_URL),reportsInternalApiKey:po(t.REPORTS_INTERNAL_API_KEY,t.COMMERCE_DISCOVERY_INTERNAL_API_KEY),s3TenantBucket:t.S3_TENANT_BUCKET||"new-deco-sites-assets",s3TenantRegion:t.S3_TENANT_REGION||"us-west-2",s3TenantEndpoint:t.S3_TENANT_ENDPOINT,s3TenantPublicUrlBase:t.S3_TENANT_PUBLIC_URL_BASE||"https://assets.decocms.com",awsS3TenantRoleArn:t.AWS_S3_TENANT_ROLE_ARN,awsS3TenantProvisionerAccessKeyId:t.AWS_S3_TENANT_PROVISIONER_ACCESS_KEY_ID,awsS3TenantProvisionerSecretAccessKey:t.AWS_S3_TENANT_PROVISIONER_SECRET_ACCESS_KEY,deliveryR2AccountId:t.DELIVERY_R2_ACCOUNT_ID,deliveryR2AccessKeyId:t.DELIVERY_R2_ACCESS_KEY_ID,deliveryR2SecretAccessKey:t.DELIVERY_R2_SECRET_ACCESS_KEY,deliveryR2Bucket:t.DELIVERY_R2_BUCKET,deliveryR2Endpoint:t.DELIVERY_R2_ENDPOINT,deliveryPublicOrigin:t.DELIVERY_PUBLIC_ORIGIN,siteTokenSigningKey:t.DECO_SITE_TOKEN_SIGNING_KEY,cfDeliveryZoneId:t.CF_DELIVERY_ZONE_ID,cfPurgeApiToken:t.CF_PURGE_API_TOKEN};if(Boolean(n.natsUser)!==Boolean(n.natsPassword))throw Error("NATS_USER and NATS_PASSWORD must be set together");if(n.natsCredsPath&&n.natsUser)throw Error("Use either NATS_CREDS or NATS_USER/NATS_PASSWORD");if(n.plansEnabled&&!n.studioJwtSecret)throw Error("STUDIO_PLANS_ENABLED requires an explicit gateway JWT secret. Set STUDIO_JWT_SECRET (or its legacy alias MESH_JWT_SECRET) to the same value as the gateway's MESH_JWT_SECRET. Refusing to fall back to BETTER_AUTH_SECRET: that mismatch 401s every entitlements call, which every feature gate reads as 'no answer' and fails OPEN.");if(n.plansEnabled&&!n.studioProvisionSecretKey)throw Error("STUDIO_PLANS_ENABLED requires STUDIO_PROVISION_SECRET_KEY, set to the same value as the gateway's STUDIO_PROVISION_KEY. Without it the gateway cannot identify this server, falls back to a per-user membership callback that 401s for any user who never completed the gateway OAuth flow, and every feature gate then fails OPEN.");if(n.plansEnabled&&!n.aiGatewayEnabled)throw Error("STUDIO_PLANS_ENABLED requires DECO_AI_GATEWAY_ENABLED=true. Plans are read from the gateway; with it disabled there is no adapter to ask, so every feature gate fails OPEN on both server and client and the paid product is free fleet-wide.");if(n.plansEnabled&&Object.keys(n.stripePlanPriceIds).length>0&&!n.aiGatewayAdminToken)throw Error("STRIPE_PLAN_PRICE_IDS is set but DECO_AI_GATEWAY_ADMIN_TOKEN is not. The Stripe webhook places the paid tier through the gateway's admin API, so without the token a customer is charged and the entitlement "+"is never granted \u2014 and AI_PLAN_SET cannot repair it, it accepts only "+"'free'.");if(n.plansEnabled&&Object.keys(n.stripePlanPriceIds).length>1&&!n.stripePortalConfigurationId)console.warn("STRIPE_PLAN_PRICE_IDS maps more than one plan but STRIPE_PORTAL_CONFIGURATION_ID is unset. An org that already has a subscription cannot change tier: the account's default portal configuration lists only the legacy plans, not the tiers, so Stripe refuses the update flow. First-time checkout is unaffected.");return n}var dv,Jv;var a2=A(()=>{dv=new Set(["all","worker","api"]);Jv=new Set(["production","development","test"])});function ge(){return Zv??=Object.freeze(g2(process.env))}var Zv=null;var Rc=A(()=>{a2()});import{context as KBt,propagation as XBt,SpanKind as ZBt,SpanStatusCode as FBt}from"@opentelemetry/api";var fBt;var p2=A(()=>{tu();fBt=globalThis.fetch});var eu=A(()=>{Rc()});import{ExportResultCode as $i}from"@opentelemetry/core";import{mkdir as Fv,rename as jv,writeFile as fv}from"fs/promises";import{join as Bi}from"path";class Di{bufferItems=[];bufferBytes=0;flushTimer=null;flushQueue=Promise.resolve();basePath;flushThreshold;maxBufferBytes;isShutdown=!1;knownDirs=new Set;partitionKey;constructor(t){this.basePath=t.basePath,this.flushThreshold=t.flushThreshold??1000,this.maxBufferBytes=t.maxBufferBytes??10485760,this.partitionKey=t.partitionKey;let e=t.flushIntervalMs??60000;if(e>0&&e<3600000){if(this.flushTimer=setInterval(()=>{this.flush().catch((s)=>{console.error("[NDJSONExporter] Timer flush failed:",s)})},e),this.flushTimer&&typeof this.flushTimer==="object"&&"unref"in this.flushTimer)this.flushTimer.unref()}}exportRows(t){if(this.isShutdown)return Promise.resolve({code:$i.FAILED});for(let e of t){let s=JSON.stringify(e),r=this.partitionKey?this.partitionKey(e):"";this.bufferItems.push({partition:r,json:s}),this.bufferBytes+=Buffer.byteLength(s,"utf8")+1}if(this.bufferItems.length>=this.flushThreshold||this.bufferBytes>=this.maxBufferBytes)return this.flush().then(()=>({code:$i.SUCCESS})).catch((e)=>{return console.error("[NDJSONExporter] Flush failed:",e),{code:$i.FAILED}});return Promise.resolve({code:$i.SUCCESS})}async shutdown(){if(this.isShutdown=!0,this.flushTimer)clearInterval(this.flushTimer),this.flushTimer=null;try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}async forceFlush(){try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}flush(){let e=this.flushQueue.catch(()=>{}).then(()=>this.doFlush());return this.flushQueue=e,e}async doFlush(){if(this.bufferItems.length===0)return;let t=this.bufferItems;this.bufferItems=[],this.bufferBytes=0;let e=new Map;for(let n of t){let c=e.get(n.partition);if(!c)c=[],e.set(n.partition,c);c.push(n.json)}let s=await Promise.allSettled(Array.from(e.entries()).map(([n,c])=>this.writeNDJSON(c,n).then(()=>n))),r=s.find((n)=>n.status==="rejected");if(r){let n=new Set;for(let o of s)if(o.status==="fulfilled")n.add(o.value);let c=t.filter((o)=>!n.has(o.partition));this.bufferItems=c.concat(this.bufferItems),this.bufferBytes=0;for(let o of this.bufferItems)this.bufferBytes+=Buffer.byteLength(o.json,"utf8")+1;throw r.reason}}async writeNDJSON(t,e){let s=new Date,r=[String(s.getUTCFullYear()),String(s.getUTCMonth()+1).padStart(2,"0"),String(s.getUTCDate()).padStart(2,"0"),String(s.getUTCHours()).padStart(2,"0")],n=e?Bi(this.basePath,e,...r):Bi(this.basePath,...r);if(!this.knownDirs.has(n))await Fv(n,{recursive:!0,mode:448}),this.knownDirs.add(n);let c=`${crypto.randomUUID()}.ndjson`,o=Bi(n,`.${c}.tmp`),u=Bi(n,c),i=t.join(`
|
|
82
82
|
`)+`
|
|
83
83
|
`;await fv(o,i,{mode:384}),await jv(o,u)}}var Ci=()=>{};import{ExportResultCode as eDt}from"@opentelemetry/core";var eI=A(()=>{eu();Ci()});import{ExportResultCode as oDt}from"@opentelemetry/core";import{AggregationTemporality as iDt,DataPointType as mDt}from"@opentelemetry/sdk-metrics";var sI=A(()=>{eu();Ci()});import{ExportResultCode as ODt}from"@opentelemetry/core";var rI=A(()=>{eu();Ci()});var PDt;var nI=A(()=>{PDt=Buffer.byteLength("... [TRUNCATED]","utf8")});import{NOOP_LOGGER as RDt}from"@opentelemetry/api-logs";var cI=()=>{};var oI=()=>{};import{SpanStatusCode as UDt}from"@opentelemetry/api";var uI=A(()=>{tu();oI()});import{createContextKey as lv,metrics as _v,propagation as YDt,ROOT_CONTEXT as VDt,SpanStatusCode as lDt,trace as kv}from"@opentelemetry/api";import{logs as bv,SeverityNumber as a3}from"@opentelemetry/api-logs";import{OTLPLogExporter as bDt}from"@opentelemetry/exporter-logs-otlp-proto";import{PrometheusExporter as vv}from"@opentelemetry/exporter-prometheus";import{OTLPTraceExporter as aDt}from"@opentelemetry/exporter-trace-otlp-proto";import{RuntimeNodeInstrumentation as t9t}from"@opentelemetry/instrumentation-runtime-node";import{BatchLogRecordProcessor as m9t,LoggerProvider as w9t}from"@opentelemetry/sdk-logs";import{detectResources as E9t,envDetector as h9t,hostDetector as y9t,osDetector as O9t,processDetector as x9t,resourceFromAttributes as T9t}from"@opentelemetry/resources";import{PeriodicExportingMetricReader as P9t}from"@opentelemetry/sdk-metrics";import{NodeSDK as R9t}from"@opentelemetry/sdk-node";import{BatchSpanProcessor as B9t,SamplingDecision as $c}from"@opentelemetry/sdk-trace-base";class mI{inner;constructor(t){this.inner=t}shouldSample(t,e,s,r,n,c){let o=t.getValue(av);if(!o){if(this.inner)return this.inner.shouldSample(t,e,s,r,n,c);return{decision:$c.RECORD_AND_SAMPLED}}let u=iI(o);if(u)return{decision:$c.RECORD_AND_SAMPLED,attributes:{"trace.debug.id":u}};if(this.inner){let i=this.inner.shouldSample(t,e,s,r,n,c);if(i.decision===$c.RECORD_AND_SAMPLED){let w=crypto.randomUUID();i.attributes={...i.attributes??{},"trace.debug.id":w}}return i}return{decision:$c.NOT_RECORD}}toString(){return"DebugSampler"}}class wI{ratio;constructor(t){this.ratio=t}shouldSample(){if(Math.random()<this.ratio)return{decision:$c.RECORD_AND_SAMPLED};return{decision:$c.NOT_RECORD}}toString(){return`RatioSampler(${this.ratio})`}}var gv="__d",av,pv=1,iI=(t)=>{let s=new URL(t.url).searchParams.get(gv);if(s==="")return crypto.randomUUID();if(!s)s=t.headers.get("x-trace-debug-id");return s},C9t,U9t,tI,su,tg,p3=(t,e,s)=>{let r={},n=s,c=s[s.length-1];if(c!==null&&typeof c==="object"&&!Array.isArray(c)&&!(c instanceof Error)&&Object.getPrototypeOf(c)===Object.prototype)r=c,n=s.slice(0,-1);let o=n.map((u)=>{if(u instanceof Error)return`${u.name}: ${u.message}`;if(typeof u==="object")try{return JSON.stringify(u)}catch{return"[Object]"}return String(u)}).join(" ");tg.emit({severityNumber:t,severityText:e,body:o,attributes:{"log.source":"console",...r}})},tE;var tu=A(()=>{p2();eI();sI();rI();eu();nI();Rc();cI();uI();av=lv("Current request");C9t=new vv({preventServerStart:!0}),U9t=new mI(new wI(pv)),tI=kv.getTracer("studio","1.0.0"),su=_v.getMeter("studio","1.0.0"),tg=bv.getLogger("studio","1.0.0"),tE={error:console.error.bind(console),warn:console.warn.bind(console),debug:console.debug.bind(console)};console.error=(...t)=>{p3(a3.ERROR,"ERROR",t),tE.error(...t)};console.warn=(...t)=>{p3(a3.WARN,"WARN",t),tE.warn(...t)};console.debug=(...t)=>{p3(a3.DEBUG,"DEBUG",t),tE.debug(...t)}});var SI=()=>{};function eg(){if(eE)return;let t=performance.now()+sE;eE=setInterval(()=>{let e=performance.now();EI=Math.max(0,e-t),t=e+sE},sE),eE.unref?.()}function hI(){return eg(),EI}var eE,EI=0,sE=500;var yI=A(()=>{tu();SI()});import{Kysely as sg,PostgresDialect as rg}from"kysely";import{Pool as ng}from"pg";function mg(t){let e=t.connect.bind(t);return t.connect=(s)=>{if(typeof s==="function")return e(s);let r=performance.now(),n=rE(),c=t.idleCount===0&&t.totalCount>=n,o=t.idleCount;return e().then((u)=>{let i=performance.now()-r;if(OI().record(i,{"db.pool.outcome":c?"contended":"available"}),i>og)if(c)console.error("Slow db pool acquire \u2014 pool saturated:",{waitMs:i,total:t.totalCount,idle:t.idleCount,waiting:t.waitingCount,max:n});else console.warn("Slow db pool acquire \u2014 event-loop lag (not pool):",{waitMs:i,idleAtStart:o,total:t.totalCount,max:n});return u},(u)=>{throw OI().record(performance.now()-r,{"db.pool.outcome":"error"}),u})},t}function Sg(){try{return ge().databasePgSsl}catch{return!1}}function rE(){try{return ge().databasePoolMax}catch{return 10}}function Eg(t){let e=mg(new ng({connectionString:t,max:rE(),ssl:Sg(),...wg})),s=new rg({pool:e});return{type:"postgres",db:new sg({dialect:s,log:ig(e)}),pool:e}}function TI(){return ge().databaseUrl}function hg(t){let e=t||TI();return Eg(e)}async function nE(t){if(await t.db.destroy(),!t.pool.ended)await t.pool.end();if(t===ru)ru=null}function AI(){if(!ru)ru=hg(TI());return ru}var cg=()=>su.createHistogram("db.query.duration",{description:"Database query execution duration in milliseconds",unit:"ms"}),OI=()=>su.createHistogram("db.pool.acquire.duration",{description:"Time spent waiting to acquire a connection from the pool",unit:"ms"}),xI=400,og=100,ug=(t)=>({"db.status":t.level==="error"?"error":"success"}),ig=(t)=>(e)=>{let s=ug(e);if(e.queryDurationMillis>xI){let r=hI(),n=r>xI/2;console.error(n?"Slow query measurement \u2014 likely event-loop lag, not slow SQL:":"Slow query detected:",{durationMs:e.queryDurationMillis,eventLoopLagMs:Math.round(r),sql:e.query.sql,pool:{total:t.totalCount,idle:t.idleCount,waiting:t.waitingCount,max:rE()}})}if(cg().record(e.queryDurationMillis,s),e.level==="error")console.error("Query failed:",{durationMs:e.queryDurationMillis,error:e.error,sql:e.query.sql})},wg,ru=null;var PI=A(()=>{Rc();tu();yI();wg={keepAlive:!0,keepAliveInitialDelayMillis:1e4,idleTimeoutMillis:300000,connectionTimeoutMillis:30000,allowExitOnIdle:!0}});var rn=D((Pg)=>{Pg.HttpAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(Pg.HttpAuthLocation||(Pg.HttpAuthLocation={}));Pg.HttpApiKeyAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(Pg.HttpApiKeyAuthLocation||(Pg.HttpApiKeyAuthLocation={}));Pg.EndpointURLScheme=void 0;(function(t){t.HTTP="http",t.HTTPS="https"})(Pg.EndpointURLScheme||(Pg.EndpointURLScheme={}));Pg.AlgorithmId=void 0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(Pg.AlgorithmId||(Pg.AlgorithmId={}));var yg=(t)=>{let e=[];if(t.sha256!==void 0)e.push({algorithmId:()=>Pg.AlgorithmId.SHA256,checksumConstructor:()=>t.sha256});if(t.md5!=null)e.push({algorithmId:()=>Pg.AlgorithmId.MD5,checksumConstructor:()=>t.md5});return{addChecksumAlgorithm(s){e.push(s)},checksumAlgorithms(){return e}}},Og=(t)=>{let e={};return t.checksumAlgorithms().forEach((s)=>{e[s.algorithmId()]=s.checksumConstructor()}),e},xg=(t)=>{return yg(t)},Tg=(t)=>{return Og(t)};Pg.FieldPosition=void 0;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(Pg.FieldPosition||(Pg.FieldPosition={}));var Ag="__smithy_context";Pg.IniSectionType=void 0;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(Pg.IniSectionType||(Pg.IniSectionType={}));Pg.RequestHandlerProtocol=void 0;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(Pg.RequestHandlerProtocol||(Pg.RequestHandlerProtocol={}));Pg.SMITHY_CONTEXT_KEY=Ag;Pg.getDefaultClientConfiguration=xg;Pg.resolveDefaultRuntimeConfig=Tg});var mt=D((Mg)=>{var $g=rn(),Bg=(t)=>{return{setHttpHandler(e){t.httpHandler=e},httpHandler(){return t.httpHandler},updateHttpClientConfig(e,s){t.httpHandler?.updateHttpClientConfig(e,s)},httpHandlerConfigs(){return t.httpHandler.httpHandlerConfigs()}}},Dg=(t)=>{return{httpHandler:t.httpHandler()}};class II{name;kind;values;constructor({name:t,kind:e=$g.FieldPosition.HEADER,values:s=[]}){this.name=t,this.kind=e,this.values=s}add(t){this.values.push(t)}set(t){this.values=t}remove(t){this.values=this.values.filter((e)=>e!==t)}toString(){return this.values.map((t)=>t.includes(",")||t.includes(" ")?`"${t}"`:t).join(", ")}get(){return this.values}}class NI{entries={};encoding;constructor({fields:t=[],encoding:e="utf-8"}){t.forEach(this.setField.bind(this)),this.encoding=e}setField(t){this.entries[t.name.toLowerCase()]=t}getField(t){return this.entries[t.toLowerCase()]}removeField(t){delete this.entries[t.toLowerCase()]}getByType(t){return Object.values(this.entries).filter((e)=>e.kind===t)}}class Ui{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){let e=new Ui({...t,headers:{...t.headers}});if(e.query)e.query=Cg(e.query);return e}static isInstance(t){if(!t)return!1;let e=t;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&typeof e.query==="object"&&typeof e.headers==="object"}clone(){return Ui.clone(this)}}function Cg(t){return Object.keys(t).reduce((e,s)=>{let r=t[s];return{...e,[s]:Array.isArray(r)?[...r]:r}},{})}class RI{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;let e=t;return typeof e.statusCode==="number"&&typeof e.headers==="object"}}function Ug(t){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(t)}Mg.Field=II;Mg.Fields=NI;Mg.HttpRequest=Ui;Mg.HttpResponse=RI;Mg.getHttpHandlerExtensionConfiguration=Bg;Mg.isValidHostname=Ug;Mg.resolveHttpHandlerRuntimeConfig=Dg});function Hg(t){return(e)=>async(s)=>{let{request:r}=s;if(t.expectContinueHeader!==!1&&$I.HttpRequest.isInstance(r)&&r.body&&t.runtime==="node"&&t.requestHandler?.constructor?.name!=="FetchHttpHandler"){let n=!0;if(typeof t.expectContinueHeader==="number")try{n=(Number(r.headers?.["content-length"])??t.bodyLengthChecker?.(r.body)??1/0)>=t.expectContinueHeader}catch(c){}else n=!!t.expectContinueHeader;if(n)r.headers.Expect="100-continue"}return e({...s,request:r})}}var $I,Gg,BI=(t)=>({applyToStack:(e)=>{e.add(Hg(t),Gg)}});var DI=A(()=>{$I=y(mt(),1);Gg={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0}});var Xe,Mi,nn,Li,p,CI,cu;var Ze=A(()=>{Xe={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},Mi=Xe.WHEN_SUPPORTED,nn={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},Li=Xe.WHEN_SUPPORTED;(function(t){t.MD5="MD5",t.CRC32="CRC32",t.CRC32C="CRC32C",t.CRC64NVME="CRC64NVME",t.SHA1="SHA1",t.SHA256="SHA256"})(p||(p={}));(function(t){t.HEADER="header",t.TRAILER="trailer"})(CI||(CI={}));cu=p.CRC32});var Sr,Bc=(t,e,s,r)=>{if(!(e in t))return;let n=t[e].toUpperCase();if(!Object.values(s).includes(n))throw TypeError(`Cannot load ${r} '${e}'. Expected one of ${Object.values(s)}, got '${t[e]}'.`);return n};var SE=A(()=>{(function(t){t.ENV="env",t.CONFIG="shared config entry"})(Sr||(Sr={}))});var Kg="AWS_REQUEST_CHECKSUM_CALCULATION",Xg="request_checksum_calculation",UI;var MI=A(()=>{Ze();SE();UI={environmentVariableSelector:(t)=>Bc(t,Kg,Xe,Sr.ENV),configFileSelector:(t)=>Bc(t,Xg,Xe,Sr.CONFIG),default:Mi}});var Zg="AWS_RESPONSE_CHECKSUM_VALIDATION",Fg="response_checksum_validation",LI;var zI=A(()=>{Ze();SE();LI={environmentVariableSelector:(t)=>Bc(t,Zg,nn,Sr.ENV),configFileSelector:(t)=>Bc(t,Fg,nn,Sr.CONFIG),default:Li}});var hE=D((gg)=>{var jg=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],fg=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Yg=["TimeoutError","RequestTimeout","RequestTimeoutException"],Vg=[500,502,503,504],lg=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],_g=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],WI=(t)=>t?.$retryable!==void 0,kg=(t)=>jg.includes(t.name),qI=(t)=>t.$metadata?.clockSkewCorrected,dI=(t)=>{let e=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(t&&t instanceof TypeError))return!1;return e.has(t.message)},bg=(t)=>t.$metadata?.httpStatusCode===429||fg.includes(t.name)||t.$retryable?.throttling==!0,EE=(t,e=0)=>WI(t)||qI(t)||t.name==="InvalidSignatureException"&&t.message?.includes("Signature expired")||Yg.includes(t.name)||lg.includes(t?.code||"")||_g.includes(t?.code||"")||Vg.includes(t.$metadata?.httpStatusCode||0)||dI(t)||QI(t)||t.cause!==void 0&&e<=10&&EE(t.cause,e+1),vg=(t)=>{if(t.$metadata?.httpStatusCode!==void 0){let e=t.$metadata.httpStatusCode;if(500<=e&&e<=599&&!EE(t))return!0;return!1}return!1};function QI(t){return t.code==="ERR_HTTP2_STREAM_ERROR"&&t.message.includes("NGHTTP2_REFUSED_STREAM")}gg.isBrowserNetworkError=dI;gg.isClockSkewCorrectedError=qI;gg.isClockSkewError=kg;gg.isNodeJsHttp2TransientError=QI;gg.isRetryableByTrait=WI;gg.isServerError=vg;gg.isThrottlingError=bg;gg.isTransientError=EE});var Ms=D((ya)=>{var oa=hE();ya.RETRY_MODES=void 0;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(ya.RETRY_MODES||(ya.RETRY_MODES={}));var Wi=3,ua=ya.RETRY_MODES.STANDARD;class qi{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??0.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??0.5,this.scaleConstant=t?.scaleConstant??0.4,this.smooth=t?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(t){let e;this.updateMeasuredRate();let s=t;if(s?.errorType==="THROTTLING"||oa.isThrottlingError(s?.error??t)){let c=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=c,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),e=this.cubicThrottle(c),this.enableTokenBucket()}else this.calculateTimeWindow(),e=this.cubicSuccess(this.getCurrentTimeInSeconds());let n=Math.min(e,2*this.measuredTxRate);this.updateTokenBucketRate(n)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(t){if(!this.enabled)return;if(this.refillTokenBucket(),t>this.availableTokens){let e=(t-this.availableTokens)/this.fillRate*1000;await new Promise((s)=>qi.setTimeoutFn(s,e))}this.availableTokens=this.availableTokens-t}refillTokenBucket(){let t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}let e=(t-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+e),this.lastTimestamp=t}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let t=this.getCurrentTimeInSeconds(),e=Math.floor(t*2)/2;if(this.requestCount++,e>this.lastTxRateBucket){let s=this.requestCount/(e-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=e}}getPrecise(t){return parseFloat(t.toFixed(8))}}var ia=100,xE=20000,ma=500,yE=500,wa=5,Sa=10,JI=1,Ea="amz-sdk-invocation-id",ha="amz-sdk-request";class Ft{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return Ft.v2026?50:100}static throttlingDelay(){return Ft.v2026?1000:500}static cost(){return Ft.v2026?14:5}static throttlingCost(){return Ft.v2026?5:10}static modifiedCostType(){return Ft.v2026?"THROTTLING":"TRANSIENT"}}class HI{x=Ft.delay();computeNextBackoffDelay(t){let e=Math.random(),s=2,r=e*Math.min(this.x*2**t,xE);return Math.floor(r)}setDelayBase(t){this.x=t}}class OE{delay;count;cost;longPoll;constructor(t,e,s,r){this.delay=t,this.count=e,this.cost=s,this.longPoll=r}getRetryCount(){return this.count}getRetryDelay(){return Math.min(xE,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var zi={incompatible:1,attempts:2,capacity:3};class ou{mode=ya.RETRY_MODES.STANDARD;capacity=yE;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(t){if(typeof t==="number")this.maxAttemptsProvider=async()=>t;else if(typeof t==="function")this.maxAttemptsProvider=t;else if(t&&typeof t==="object")this.maxAttemptsProvider=async()=>t.maxAttempts,this.baseDelay=t.baseDelay,this.retryBackoffStrategy=t.backoff;this.maxAttemptsProvider??=async()=>Wi,this.baseDelay??=Ft.delay(),this.retryBackoffStrategy??=new HI}async acquireInitialRetryToken(t){return new OE(Ft.delay(),0,void 0,Ft.v2026&&t.includes(":longpoll"))}async refreshRetryTokenForRetry(t,e){let s=await this.getMaxAttempts(),r=this.retryCode(t,e,s),n=r===0,c=t.isLongPoll?.();if(n||c){let o=e.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?Ft.throttlingDelay():this.baseDelay);let u=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),i=u;if(e.retryAfterHint instanceof Date)i=Math.max(u,Math.min(e.retryAfterHint.getTime()-Date.now(),u+5000));if(!n)throw Object.assign(Error("No retry token available"),{$backoff:Ft.v2026&&r===zi.capacity&&c?i:0});else{let w=this.getCapacityCost(o);return this.capacity-=w,new OE(i,t.getRetryCount()+1,w,t.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(t){this.capacity=Math.min(yE,this.capacity+(t.getRetryCost()??JI))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(t){return console.warn(`Max attempts provider could not resolve. Using default of ${Wi}`),Wi}}retryCode(t,e,s){let r=t.getRetryCount()+1,n=this.isRetryableError(e.errorType)?0:zi.incompatible,c=r<s?0:zi.attempts,o=this.capacity>=this.getCapacityCost(e.errorType)?0:zi.capacity;return n||c||o}getCapacityCost(t){return t===Ft.modifiedCostType()?Ft.throttlingCost():Ft.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class GI{mode=ya.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,e){let{rateLimiter:s}=e??{};this.rateLimiter=s??new qi,this.standardRetryStrategy=e?new ou({maxAttempts:typeof t==="number"?t:3,...e}):new ou(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,e){return this.rateLimiter.updateClientSendingRate(e),this.standardRetryStrategy.refreshRetryTokenForRetry(t,e)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}class KI extends ou{computeNextBackoffDelay;constructor(t,e=Ft.delay()){super(typeof t==="function"?t:async()=>t);if(typeof e==="number")this.computeNextBackoffDelay=()=>e;else this.computeNextBackoffDelay=e}async refreshRetryTokenForRetry(t,e){let s=await super.refreshRetryTokenForRetry(t,e);return s.getRetryDelay=()=>this.computeNextBackoffDelay(s.getRetryCount()),s}}ya.AdaptiveRetryStrategy=GI;ya.ConfiguredRetryStrategy=KI;ya.DEFAULT_MAX_ATTEMPTS=Wi;ya.DEFAULT_RETRY_DELAY_BASE=ia;ya.DEFAULT_RETRY_MODE=ua;ya.DefaultRateLimiter=qi;ya.INITIAL_RETRY_TOKENS=yE;ya.INVOCATION_ID_HEADER=Ea;ya.MAXIMUM_RETRY_DELAY=xE;ya.NO_RETRY_INCREMENT=JI;ya.REQUEST_HEADER=ha;ya.RETRY_COST=wa;ya.Retry=Ft;ya.StandardRetryStrategy=ou;ya.THROTTLING_RETRY_DELAY_BASE=ma;ya.TIMEOUT_RETRY_COST=Sa});var ht=D((Xa)=>{var Wa=Ms(),TE={warningEmitted:!1},qa=(t)=>{if(t&&!TE.warningEmitted&&parseInt(t.substring(1,t.indexOf(".")))<20)TE.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
84
84
|
no longer support Node.js ${t} in January 2026.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var _=import.meta.require;var E="13";function R(h){return{name:"decocms",systemDatabaseUrl:h.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:h.poolSize,runAdminServer:!1,executorID:h.executorID,applicationVersion:E,...h.listenQueues!==void 0?{listenQueues:h.listenQueues}:{}}}function U(h,w={}){let{signal:f}=w;if(f?.aborted)return Promise.reject(f.reason);return new Promise((J,c)=>{let y=()=>{clearTimeout(+d),c(f?.reason)},d=b(()=>{f?.removeEventListener("abort",y),J()},h);f?.addEventListener("abort",y,{once:!0})})}var j=2147483647;function b(h,w){if(w=Math.trunc(Math.max(w,0)||0),w<=j){let y=Number(setTimeout(h,w));return{valueOf:()=>y}}let f=Date.now(),J,c=()=>{let y=w-(Date.now()-f);J=y>j?Number(setTimeout(c,j)):Number(setTimeout(h,y))};return c(),{valueOf:()=>J}}import M from"pg";var q=8314027461559302n,P=600000,g=500;async function G(h,w){let{databaseUrl:f,lockTimeoutMs:J=P}=h,c=h.log??((N)=>console.log(N)),y=new M.Client({connectionString:f});await y.connect();let m=Date.now(),d=!1;try{while(!d){if(d=(await y.query("SELECT pg_try_advisory_lock($1) AS locked",[q.toString()])).rows[0]?.locked===!0,d)break;if(Date.now()-m>=J)throw Error(`Timed out after ${J}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await U(g)}let N=Date.now()-m;if(N>1000)c(`[dbos] waited ${N}ms for the migration lock; another process migrated first`);return await w()}finally{if(d)try{await y.query("SELECT pg_advisory_unlock($1)",[q.toString()])}catch{}await y.end().catch(()=>{})}}import{homedir as A}from"os";var p=new Set(["all","worker","api"]);function u(h){let w=(h??"").trim();return p.has(w)?w:"all"}var I=new Set(["production","development","test"]);function t(h){let w=(h??"").trim();return I.has(w)?w:"development"}function k(h){return h==="true"||h==="1"}function Y(h,w,f){if(w===void 0||w==="")return;let J=Number(w);if(!Number.isSafeInteger(J)||J<=0)throw Error(`${h} must be a positive integer`);if(f!==void 0&&J>f)throw Error(`${h} must be at most ${f}`);return J}function z(h,w,f,J){return Y(h,w,J)??f}function l(h){let w={};for(let f of(h??"").split(",")){let J=f.trim();if(!J)continue;let c=J.indexOf("="),y=c>0?J.slice(0,c).trim():"",m=c>0?J.slice(c+1).trim():"";if(!y||!m){console.warn(`STRIPE_PLAN_PRICE_IDS: ignoring unparseable entry "${J}" \u2014 expected price_xxx=planId`);continue}w[y]=m}return w}function V(h,w,f,J){if(w===void 0||w==="")return f;let c=Number(w);if(!Number.isSafeInteger(c)||c<0)throw Error(`${h} must be a non-negative integer`);if(J!==void 0&&c>J)throw Error(`${h} must be at most ${J}`);return c}function X(h,w){if(h===void 0||h==="")return w;return h==="true"||h==="1"}function n(h){return h===void 0||h===""||h==="true"||h==="1"}function Z(h,w){return h||w}function O(h){let w=h.DATA_DIR||h.DECOCMS_HOME||`${A()}/deco`,f=t(h.NODE_ENV),J=h.VOICE_CONVERSATION_PROVIDER?.trim()||"elevenlabs",c={nodeEnv:f,port:z("PORT",h.PORT,3000,65535),baseUrl:h.BASE_URL,publicUrl:Z(h.STUDIO_PUBLIC_URL,h.MESH_PUBLIC_URL),dataDir:w,voiceConversationProvider:J==="elevenlabs"||J==="openai"?J:null,openaiLiveApiKey:h.OPENAI_LIVE_API_KEY,openaiLiveModel:h.OPENAI_LIVE_MODEL?.trim()||"gpt-live-1",openaiLiveVoice:h.OPENAI_LIVE_VOICE?.trim()||"marin",elevenlabsApiKey:h.ELEVENLABS_API_KEY,elevenlabsVoiceId:h.ELEVENLABS_VOICE_ID||"JBFqnCBsd6RMkjVDRZzb",elevenlabsVoiceModel:h.ELEVENLABS_VOICE_MODEL||"eleven_v4_turbo",elevenlabsConversationModel:h.ELEVENLABS_CONVERSATION_MODEL?.trim()||"gemini-2.5-flash",databaseUrl:h.DATABASE_URL||"postgresql://postgres:postgres@localhost:5432/postgres",databasePgSsl:k(h.DATABASE_PG_SSL),databasePoolMax:z("DATABASE_POOL_MAX",h.DATABASE_POOL_MAX,5),dbosPoolSize:z("DBOS_POOL_SIZE",h.DBOS_POOL_SIZE,5),betterAuthSecret:h.BETTER_AUTH_SECRET||"",encryptionKey:h.ENCRYPTION_KEY||"",studioJwtSecret:Z(h.STUDIO_JWT_SECRET,h.MESH_JWT_SECRET),localMode:k(h.DECOCMS_LOCAL_MODE),disableRateLimit:k(h.DISABLE_RATE_LIMIT),jiraAllowLocalSiteUrl:k(h.JIRA_ALLOW_LOCAL_SITE_URL),jiraSettleSeconds:z("JIRA_SETTLE_SECONDS",h.JIRA_SETTLE_SECONDS,20,3600),studioProvisionSecretKey:h.STUDIO_PROVISION_SECRET_KEY,deploymentAdminEmails:(h.DEPLOYMENT_ADMIN_EMAILS??"").split(",").map((y)=>y.trim().toLowerCase()).filter(Boolean),taskBoardAdminOrgIds:(h.STUDIO_ADMIN_ORG_IDS??"").split(",").map((y)=>y.trim()).filter(Boolean),deploymentAdminToken:h.DEPLOYMENT_ADMIN_TOKEN||void 0,clickhouseUrl:h.CLICKHOUSE_URL,clickhouseMaxMemoryUsage:Y("CLICKHOUSE_MAX_MEMORY_USAGE",h.CLICKHOUSE_MAX_MEMORY_USAGE),monitoringOtlpEndpoint:h.MONITORING_OTLP_ENDPOINT,otelServiceName:h.OTEL_SERVICE_NAME||"studio",natsUrls:(h.NATS_URL||"nats://localhost:4222").split(",").map((y)=>y.trim()).filter(Boolean),natsCredsPath:h.NATS_CREDS,natsUser:h.NATS_USER||void 0,natsPassword:h.NATS_PASSWORD||void 0,configPath:h.CONFIG_PATH||"./config.json",aiGatewayEnabled:k(h.DECO_AI_GATEWAY_ENABLED),aiGatewayUrl:h.DECO_AI_GATEWAY_URL||"https://ai-site.deco.site",aiGatewayAdminToken:h.DECO_AI_GATEWAY_ADMIN_TOKEN,stripeWebhookSecret:h.STRIPE_WEBHOOK_SECRET,stripeSecretKey:h.STRIPE_SECRET_KEY,stripeOrgPriceId:h.STRIPE_ORG_PRICE_ID,stripePlanPriceIds:l(h.STRIPE_PLAN_PRICE_IDS),stripePortalConfigurationId:h.STRIPE_PORTAL_CONFIGURATION_ID,stripeTopupProductId:h.STRIPE_TOPUP_PRODUCT_ID,topupFeePercent:V("STUDIO_TOPUP_FEE_PERCENT",h.STUDIO_TOPUP_FEE_PERCENT,15,100),taskQuotaEnforced:k(h.STUDIO_TASK_QUOTA_ENFORCED),freeTaskExecutions:z("STUDIO_FREE_TASKS",h.STUDIO_FREE_TASKS,3),monthlyTaskExecutions:z("STUDIO_MONTHLY_TASKS",h.STUDIO_MONTHLY_TASKS,10),maxRunsPerTask:z("STUDIO_MAX_RUNS_PER_TASK",h.STUDIO_MAX_RUNS_PER_TASK,5),enableDecoImport:k(h.ENABLE_DECO_IMPORT),hostingControlPlaneGa:k(h.HOSTING_CONTROL_PLANE_GA),monitorGa:k(h.MONITOR_GA),plansEnabled:k(h.STUDIO_PLANS_ENABLED),mcpCacheEnabled:X(h.MCP_CACHE_ENABLED,f!=="development"),orgFsPublicSetsJson:h.ORGFS_PUBLIC_SETS,orgFsMountsDisabled:k(h.DISABLE_ORGFS_MOUNTS),decopilotMaxConcurrentSubagents:z("DECOPILOT_MAX_CONCURRENT_SUBAGENTS",h.DECOPILOT_MAX_CONCURRENT_SUBAGENTS,4),decopilotMaxConcurrentHostedRuns:z("DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS",h.DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS,3),taskBoardReviewSweeperEnabled:X(h.TASK_BOARD_REVIEW_SWEEPER_ENABLED,!0),boardTransitionSettleSeconds:z("BOARD_TRANSITION_SETTLE_SECONDS",h.BOARD_TRANSITION_SETTLE_SECONDS,20,3600),sandboxMaxConcurrentHostedRuns:z("SANDBOX_MAX_CONCURRENT_HOSTED_RUNS",h.SANDBOX_MAX_CONCURRENT_HOSTED_RUNS,12),s3Endpoint:h.S3_ENDPOINT,s3Bucket:h.S3_BUCKET,s3Region:h.S3_REGION||"auto",s3AccessKeyId:h.S3_ACCESS_KEY_ID,s3SecretAccessKey:h.S3_SECRET_ACCESS_KEY,s3ForcePathStyle:n(h.S3_FORCE_PATH_STYLE),monitoringS3Bucket:h.MONITORING_S3_BUCKET,monitoringS3Endpoint:h.MONITORING_S3_ENDPOINT,monitoringS3Region:h.MONITORING_S3_REGION,monitoringS3AccessKeyId:h.MONITORING_S3_ACCESS_KEY_ID,monitoringS3SecretAccessKey:h.MONITORING_S3_SECRET_ACCESS_KEY,monitoringS3Prefix:h.MONITORING_S3_PREFIX,duckdbExtensionDirectory:h.DUCKDB_EXTENSION_DIRECTORY||"/opt/duckdb/extensions",duckdbMemoryLimit:h.DUCKDB_MEMORY_LIMIT||void 0,duckdbThreads:Y("DUCKDB_THREADS",h.DUCKDB_THREADS),podName:h.POD_NAME||crypto.randomUUID(),dispatchRole:u(Z(h.STUDIO_DISPATCH_ROLE,h.MESH_DISPATCH_ROLE)),agentSandboxEnabled:k(h.STUDIO_AGENT_SANDBOX_ENABLED),sandboxStickyHeadRefEnabled:k(h.SANDBOX_STICKY_HEAD_REF),taskBoardRerunReusesPrBranch:X(h.TASK_BOARD_RERUN_REUSES_PR_BRANCH,!0),sandboxReleaseOnRunEndEnabled:k(h.SANDBOX_RELEASE_ON_RUN_END),sandboxPrewarmOnThreadCreateEnabled:k(h.SANDBOX_PREWARM_ON_THREAD_CREATE),sandboxPersistentHarnessEnabled:k(h.SANDBOX_PERSISTENT_HARNESS),sandboxReleaseGraceMs:z("SANDBOX_RELEASE_GRACE_MS",h.SANDBOX_RELEASE_GRACE_MS,120000),decoSupabaseUrl:h.DECO_SUPABASE_URL,decoSupabaseServiceKey:h.DECO_SUPABASE_SERVICE_KEY,controlplaneRestUrl:h.CONTROLPLANE_REST_URL,controlplaneServiceToken:h.CONTROLPLANE_SERVICE_TOKEN,analyticsDataUrl:h.ANALYTICS_URL,analyticsMasterToken:h.ANALYTICS_MASTER_TOKEN,clickhouseAnalyticsUrl:h.CLICKHOUSE_ANALYTICS_ADDRESS,clickhouseAnalyticsUsername:h.CLICKHOUSE_ANALYTICS_USERNAME||"admin_monitor",clickhouseAnalyticsPassword:h.CLICKHOUSE_ANALYTICS_PASSWORD,customerLakeUrl:h.CUSTOMER_LAKE_URL,customerLakeAdminUsername:h.CUSTOMER_LAKE_ADMIN_USERNAME||"customer_lake_user_admin",customerLakeAdminPassword:h.CUSTOMER_LAKE_ADMIN_PASSWORD,customerLakeTenantSecret:h.CUSTOMER_LAKE_TENANT_SECRET,oneDollarStatsApiKey:h.ONEDOLLAR_BACKEND_API_KEY,reportsInternalApiUrl:Z(h.REPORTS_INTERNAL_API_URL,h.COMMERCE_DISCOVERY_INTERNAL_API_URL),reportsInternalApiKey:Z(h.REPORTS_INTERNAL_API_KEY,h.COMMERCE_DISCOVERY_INTERNAL_API_KEY),s3TenantBucket:h.S3_TENANT_BUCKET||"new-deco-sites-assets",s3TenantRegion:h.S3_TENANT_REGION||"us-west-2",s3TenantEndpoint:h.S3_TENANT_ENDPOINT,s3TenantPublicUrlBase:h.S3_TENANT_PUBLIC_URL_BASE||"https://assets.decocms.com",awsS3TenantRoleArn:h.AWS_S3_TENANT_ROLE_ARN,awsS3TenantProvisionerAccessKeyId:h.AWS_S3_TENANT_PROVISIONER_ACCESS_KEY_ID,awsS3TenantProvisionerSecretAccessKey:h.AWS_S3_TENANT_PROVISIONER_SECRET_ACCESS_KEY,deliveryR2AccountId:h.DELIVERY_R2_ACCOUNT_ID,deliveryR2AccessKeyId:h.DELIVERY_R2_ACCESS_KEY_ID,deliveryR2SecretAccessKey:h.DELIVERY_R2_SECRET_ACCESS_KEY,deliveryR2Bucket:h.DELIVERY_R2_BUCKET,deliveryR2Endpoint:h.DELIVERY_R2_ENDPOINT,deliveryPublicOrigin:h.DELIVERY_PUBLIC_ORIGIN,siteTokenSigningKey:h.DECO_SITE_TOKEN_SIGNING_KEY,cfDeliveryZoneId:h.CF_DELIVERY_ZONE_ID,cfPurgeApiToken:h.CF_PURGE_API_TOKEN};if(Boolean(c.natsUser)!==Boolean(c.natsPassword))throw Error("NATS_USER and NATS_PASSWORD must be set together");if(c.natsCredsPath&&c.natsUser)throw Error("Use either NATS_CREDS or NATS_USER/NATS_PASSWORD");if(c.plansEnabled&&!c.studioJwtSecret)throw Error("STUDIO_PLANS_ENABLED requires an explicit gateway JWT secret. Set STUDIO_JWT_SECRET (or its legacy alias MESH_JWT_SECRET) to the same value as the gateway's MESH_JWT_SECRET. Refusing to fall back to BETTER_AUTH_SECRET: that mismatch 401s every entitlements call, which every feature gate reads as 'no answer' and fails OPEN.");if(c.plansEnabled&&!c.studioProvisionSecretKey)throw Error("STUDIO_PLANS_ENABLED requires STUDIO_PROVISION_SECRET_KEY, set to the same value as the gateway's STUDIO_PROVISION_KEY. Without it the gateway cannot identify this server, falls back to a per-user membership callback that 401s for any user who never completed the gateway OAuth flow, and every feature gate then fails OPEN.");if(c.plansEnabled&&!c.aiGatewayEnabled)throw Error("STUDIO_PLANS_ENABLED requires DECO_AI_GATEWAY_ENABLED=true. Plans are read from the gateway; with it disabled there is no adapter to ask, so every feature gate fails OPEN on both server and client and the paid product is free fleet-wide.");if(c.plansEnabled&&Object.keys(c.stripePlanPriceIds).length>0&&!c.aiGatewayAdminToken)throw Error("STRIPE_PLAN_PRICE_IDS is set but DECO_AI_GATEWAY_ADMIN_TOKEN is not. The Stripe webhook places the paid tier through the gateway's admin API, so without the token a customer is charged and the entitlement "+"is never granted \u2014 and AI_PLAN_SET cannot repair it, it accepts only "+"'free'.");if(c.plansEnabled&&Object.keys(c.stripePlanPriceIds).length>1&&!c.stripePortalConfigurationId)console.warn("STRIPE_PLAN_PRICE_IDS maps more than one plan but STRIPE_PORTAL_CONFIGURATION_ID is unset. An org that already has a subscription cannot change tier: the account's default portal configuration lists only the legacy plans, not the tiers, so Stripe refuses the update flow. First-time checkout is unaffected.");return c}var v=null;function $(){return v??=Object.freeze(O(process.env))}import{Kysely as Pc,PostgresDialect as gc}from"kysely";import{Pool as pc}from"pg";import{createContextKey as wh,metrics as ch,propagation as Aw,ROOT_CONTEXT as pw,SpanStatusCode as uw,trace as fh}from"@opentelemetry/api";import{logs as yh,SeverityNumber as o}from"@opentelemetry/api-logs";import{OTLPLogExporter as lw}from"@opentelemetry/exporter-logs-otlp-proto";import{PrometheusExporter as Jh}from"@opentelemetry/exporter-prometheus";import{OTLPTraceExporter as vw}from"@opentelemetry/exporter-trace-otlp-proto";import{RuntimeNodeInstrumentation as sw}from"@opentelemetry/instrumentation-runtime-node";import{context as Th,propagation as _h,SpanKind as bh,SpanStatusCode as Mh}from"@opentelemetry/api";var gh=globalThis.fetch;import{ExportResultCode as eh}from"@opentelemetry/core";import{ExportResultCode as D}from"@opentelemetry/core";import{mkdir as r,rename as s,writeFile as e}from"fs/promises";import{join as F}from"path";class Q{bufferItems=[];bufferBytes=0;flushTimer=null;flushQueue=Promise.resolve();basePath;flushThreshold;maxBufferBytes;isShutdown=!1;knownDirs=new Set;partitionKey;constructor(h){this.basePath=h.basePath,this.flushThreshold=h.flushThreshold??1000,this.maxBufferBytes=h.maxBufferBytes??10485760,this.partitionKey=h.partitionKey;let w=h.flushIntervalMs??60000;if(w>0&&w<3600000){if(this.flushTimer=setInterval(()=>{this.flush().catch((f)=>{console.error("[NDJSONExporter] Timer flush failed:",f)})},w),this.flushTimer&&typeof this.flushTimer==="object"&&"unref"in this.flushTimer)this.flushTimer.unref()}}exportRows(h){if(this.isShutdown)return Promise.resolve({code:D.FAILED});for(let w of h){let f=JSON.stringify(w),J=this.partitionKey?this.partitionKey(w):"";this.bufferItems.push({partition:J,json:f}),this.bufferBytes+=Buffer.byteLength(f,"utf8")+1}if(this.bufferItems.length>=this.flushThreshold||this.bufferBytes>=this.maxBufferBytes)return this.flush().then(()=>({code:D.SUCCESS})).catch((w)=>{return console.error("[NDJSONExporter] Flush failed:",w),{code:D.FAILED}});return Promise.resolve({code:D.SUCCESS})}async shutdown(){if(this.isShutdown=!0,this.flushTimer)clearInterval(this.flushTimer),this.flushTimer=null;try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}async forceFlush(){try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}flush(){let w=this.flushQueue.catch(()=>{}).then(()=>this.doFlush());return this.flushQueue=w,w}async doFlush(){if(this.bufferItems.length===0)return;let h=this.bufferItems;this.bufferItems=[],this.bufferBytes=0;let w=new Map;for(let c of h){let y=w.get(c.partition);if(!y)y=[],w.set(c.partition,y);y.push(c.json)}let f=await Promise.allSettled(Array.from(w.entries()).map(([c,y])=>this.writeNDJSON(y,c).then(()=>c))),J=f.find((c)=>c.status==="rejected");if(J){let c=new Set;for(let m of f)if(m.status==="fulfilled")c.add(m.value);let y=h.filter((m)=>!c.has(m.partition));this.bufferItems=y.concat(this.bufferItems),this.bufferBytes=0;for(let m of this.bufferItems)this.bufferBytes+=Buffer.byteLength(m.json,"utf8")+1;throw J.reason}}async writeNDJSON(h,w){let f=new Date,J=[String(f.getUTCFullYear()),String(f.getUTCMonth()+1).padStart(2,"0"),String(f.getUTCDate()).padStart(2,"0"),String(f.getUTCHours()).padStart(2,"0")],c=w?F(this.basePath,w,...J):F(this.basePath,...J);if(!this.knownDirs.has(c))await r(c,{recursive:!0,mode:448}),this.knownDirs.add(c);let y=`${crypto.randomUUID()}.ndjson`,m=F(c,`.${y}.tmp`),d=F(c,y),N=h.join(`
|
|
2
|
+
var T=import.meta.require;var E="14";function R(h){return{name:"decocms",systemDatabaseUrl:h.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:h.poolSize,runAdminServer:!1,executorID:h.executorID,applicationVersion:E,...h.listenQueues!==void 0?{listenQueues:h.listenQueues}:{}}}function j(h,w={}){let{signal:f}=w;if(f?.aborted)return Promise.reject(f.reason);return new Promise((J,c)=>{let y=()=>{clearTimeout(+m),c(f?.reason)},m=_(()=>{f?.removeEventListener("abort",y),J()},h);f?.addEventListener("abort",y,{once:!0})})}var Q=2147483647;function _(h,w){if(w=Math.trunc(Math.max(w,0)||0),w<=Q){let y=Number(setTimeout(h,w));return{valueOf:()=>y}}let f=Date.now(),J,c=()=>{let y=w-(Date.now()-f);J=y>Q?Number(setTimeout(c,Q)):Number(setTimeout(h,y))};return c(),{valueOf:()=>J}}import M from"pg";var q=8314027461559302n,P=600000,g=500;async function G(h,w){let{databaseUrl:f,lockTimeoutMs:J=P}=h,c=h.log??((N)=>console.log(N)),y=new M.Client({connectionString:f});await y.connect();let d=Date.now(),m=!1;try{while(!m){if(m=(await y.query("SELECT pg_try_advisory_lock($1) AS locked",[q.toString()])).rows[0]?.locked===!0,m)break;if(Date.now()-d>=J)throw Error(`Timed out after ${J}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await j(g)}let N=Date.now()-d;if(N>1000)c(`[dbos] waited ${N}ms for the migration lock; another process migrated first`);return await w()}finally{if(m)try{await y.query("SELECT pg_advisory_unlock($1)",[q.toString()])}catch{}await y.end().catch(()=>{})}}import{homedir as A}from"os";var p=new Set(["all","worker","api"]);function u(h){let w=(h??"").trim();return p.has(w)?w:"all"}var I=new Set(["production","development","test"]);function t(h){let w=(h??"").trim();return I.has(w)?w:"development"}function k(h){return h==="true"||h==="1"}function X(h,w,f){if(w===void 0||w==="")return;let J=Number(w);if(!Number.isSafeInteger(J)||J<=0)throw Error(`${h} must be a positive integer`);if(f!==void 0&&J>f)throw Error(`${h} must be at most ${f}`);return J}function z(h,w,f,J){return X(h,w,J)??f}function l(h){let w={};for(let f of(h??"").split(",")){let J=f.trim();if(!J)continue;let c=J.indexOf("="),y=c>0?J.slice(0,c).trim():"",d=c>0?J.slice(c+1).trim():"";if(!y||!d){console.warn(`STRIPE_PLAN_PRICE_IDS: ignoring unparseable entry "${J}" \u2014 expected price_xxx=planId`);continue}w[y]=d}return w}function n(h,w,f,J){if(w===void 0||w==="")return f;let c=Number(w);if(!Number.isSafeInteger(c)||c<0)throw Error(`${h} must be a non-negative integer`);if(J!==void 0&&c>J)throw Error(`${h} must be at most ${J}`);return c}function U(h,w){if(h===void 0||h==="")return w;return h==="true"||h==="1"}function V(h){return h===void 0||h===""||h==="true"||h==="1"}function Z(h,w){return h||w}function i(h){let w=h.DATA_DIR||h.DECOCMS_HOME||`${A()}/deco`,f=t(h.NODE_ENV),J=h.VOICE_CONVERSATION_PROVIDER?.trim()||"elevenlabs",c={nodeEnv:f,port:z("PORT",h.PORT,3000,65535),baseUrl:h.BASE_URL,publicUrl:Z(h.STUDIO_PUBLIC_URL,h.MESH_PUBLIC_URL),dataDir:w,voiceConversationProvider:J==="elevenlabs"||J==="openai"?J:null,openaiLiveApiKey:h.OPENAI_LIVE_API_KEY,openaiLiveModel:h.OPENAI_LIVE_MODEL?.trim()||"gpt-live-1",openaiLiveVoice:h.OPENAI_LIVE_VOICE?.trim()||"marin",elevenlabsApiKey:h.ELEVENLABS_API_KEY,elevenlabsVoiceId:h.ELEVENLABS_VOICE_ID||"JBFqnCBsd6RMkjVDRZzb",elevenlabsVoiceModel:h.ELEVENLABS_VOICE_MODEL||"eleven_v4_turbo",elevenlabsConversationModel:h.ELEVENLABS_CONVERSATION_MODEL?.trim()||"gemini-2.5-flash",databaseUrl:h.DATABASE_URL||"postgresql://postgres:postgres@localhost:5432/postgres",databasePgSsl:k(h.DATABASE_PG_SSL),databasePoolMax:z("DATABASE_POOL_MAX",h.DATABASE_POOL_MAX,5),dbosPoolSize:z("DBOS_POOL_SIZE",h.DBOS_POOL_SIZE,5),betterAuthSecret:h.BETTER_AUTH_SECRET||"",encryptionKey:h.ENCRYPTION_KEY||"",studioJwtSecret:Z(h.STUDIO_JWT_SECRET,h.MESH_JWT_SECRET),localMode:k(h.DECOCMS_LOCAL_MODE),disableRateLimit:k(h.DISABLE_RATE_LIMIT),jiraAllowLocalSiteUrl:k(h.JIRA_ALLOW_LOCAL_SITE_URL),jiraSettleSeconds:z("JIRA_SETTLE_SECONDS",h.JIRA_SETTLE_SECONDS,20,3600),studioProvisionSecretKey:h.STUDIO_PROVISION_SECRET_KEY,deploymentAdminEmails:(h.DEPLOYMENT_ADMIN_EMAILS??"").split(",").map((y)=>y.trim().toLowerCase()).filter(Boolean),taskBoardAdminOrgIds:(h.STUDIO_ADMIN_ORG_IDS??"").split(",").map((y)=>y.trim()).filter(Boolean),deploymentAdminToken:h.DEPLOYMENT_ADMIN_TOKEN||void 0,clickhouseUrl:h.CLICKHOUSE_URL,clickhouseMaxMemoryUsage:X("CLICKHOUSE_MAX_MEMORY_USAGE",h.CLICKHOUSE_MAX_MEMORY_USAGE),monitoringOtlpEndpoint:h.MONITORING_OTLP_ENDPOINT,otelServiceName:h.OTEL_SERVICE_NAME||"studio",natsUrls:(h.NATS_URL||"nats://localhost:4222").split(",").map((y)=>y.trim()).filter(Boolean),natsCredsPath:h.NATS_CREDS,natsUser:h.NATS_USER||void 0,natsPassword:h.NATS_PASSWORD||void 0,configPath:h.CONFIG_PATH||"./config.json",aiGatewayEnabled:k(h.DECO_AI_GATEWAY_ENABLED),aiGatewayUrl:h.DECO_AI_GATEWAY_URL||"https://ai-site.deco.site",aiGatewayAdminToken:h.DECO_AI_GATEWAY_ADMIN_TOKEN,stripeWebhookSecret:h.STRIPE_WEBHOOK_SECRET,stripeSecretKey:h.STRIPE_SECRET_KEY,stripeOrgPriceId:h.STRIPE_ORG_PRICE_ID,stripePlanPriceIds:l(h.STRIPE_PLAN_PRICE_IDS),stripePortalConfigurationId:h.STRIPE_PORTAL_CONFIGURATION_ID,stripeTopupProductId:h.STRIPE_TOPUP_PRODUCT_ID,topupFeePercent:n("STUDIO_TOPUP_FEE_PERCENT",h.STUDIO_TOPUP_FEE_PERCENT,15,100),taskQuotaEnforced:k(h.STUDIO_TASK_QUOTA_ENFORCED),freeTaskExecutions:z("STUDIO_FREE_TASKS",h.STUDIO_FREE_TASKS,3),monthlyTaskExecutions:z("STUDIO_MONTHLY_TASKS",h.STUDIO_MONTHLY_TASKS,10),maxRunsPerTask:z("STUDIO_MAX_RUNS_PER_TASK",h.STUDIO_MAX_RUNS_PER_TASK,5),enableDecoImport:k(h.ENABLE_DECO_IMPORT),hostingControlPlaneGa:k(h.HOSTING_CONTROL_PLANE_GA),monitorGa:k(h.MONITOR_GA),plansEnabled:k(h.STUDIO_PLANS_ENABLED),mcpCacheEnabled:U(h.MCP_CACHE_ENABLED,f!=="development"),orgFsPublicSetsJson:h.ORGFS_PUBLIC_SETS,orgFsMountsDisabled:k(h.DISABLE_ORGFS_MOUNTS),decopilotMaxConcurrentSubagents:z("DECOPILOT_MAX_CONCURRENT_SUBAGENTS",h.DECOPILOT_MAX_CONCURRENT_SUBAGENTS,4),decopilotMaxConcurrentHostedRuns:z("DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS",h.DECOPILOT_MAX_CONCURRENT_HOSTED_RUNS,3),taskBoardReviewSweeperEnabled:U(h.TASK_BOARD_REVIEW_SWEEPER_ENABLED,!0),boardTransitionSettleSeconds:z("BOARD_TRANSITION_SETTLE_SECONDS",h.BOARD_TRANSITION_SETTLE_SECONDS,20,3600),sandboxMaxConcurrentHostedRuns:z("SANDBOX_MAX_CONCURRENT_HOSTED_RUNS",h.SANDBOX_MAX_CONCURRENT_HOSTED_RUNS,12),s3Endpoint:h.S3_ENDPOINT,s3Bucket:h.S3_BUCKET,s3Region:h.S3_REGION||"auto",s3AccessKeyId:h.S3_ACCESS_KEY_ID,s3SecretAccessKey:h.S3_SECRET_ACCESS_KEY,s3ForcePathStyle:V(h.S3_FORCE_PATH_STYLE),monitoringS3Bucket:h.MONITORING_S3_BUCKET,monitoringS3Endpoint:h.MONITORING_S3_ENDPOINT,monitoringS3Region:h.MONITORING_S3_REGION,monitoringS3AccessKeyId:h.MONITORING_S3_ACCESS_KEY_ID,monitoringS3SecretAccessKey:h.MONITORING_S3_SECRET_ACCESS_KEY,monitoringS3Prefix:h.MONITORING_S3_PREFIX,duckdbExtensionDirectory:h.DUCKDB_EXTENSION_DIRECTORY||"/opt/duckdb/extensions",duckdbMemoryLimit:h.DUCKDB_MEMORY_LIMIT||void 0,duckdbThreads:X("DUCKDB_THREADS",h.DUCKDB_THREADS),podName:h.POD_NAME||crypto.randomUUID(),dispatchRole:u(Z(h.STUDIO_DISPATCH_ROLE,h.MESH_DISPATCH_ROLE)),agentSandboxEnabled:k(h.STUDIO_AGENT_SANDBOX_ENABLED),sandboxStickyHeadRefEnabled:k(h.SANDBOX_STICKY_HEAD_REF),taskBoardRerunReusesPrBranch:U(h.TASK_BOARD_RERUN_REUSES_PR_BRANCH,!0),sandboxReleaseOnRunEndEnabled:k(h.SANDBOX_RELEASE_ON_RUN_END),sandboxPrewarmOnThreadCreateEnabled:k(h.SANDBOX_PREWARM_ON_THREAD_CREATE),sandboxPersistentHarnessEnabled:k(h.SANDBOX_PERSISTENT_HARNESS),sandboxReleaseGraceMs:z("SANDBOX_RELEASE_GRACE_MS",h.SANDBOX_RELEASE_GRACE_MS,120000),decoSupabaseUrl:h.DECO_SUPABASE_URL,decoSupabaseServiceKey:h.DECO_SUPABASE_SERVICE_KEY,controlplaneRestUrl:h.CONTROLPLANE_REST_URL,controlplaneServiceToken:h.CONTROLPLANE_SERVICE_TOKEN,analyticsDataUrl:h.ANALYTICS_URL,analyticsMasterToken:h.ANALYTICS_MASTER_TOKEN,clickhouseAnalyticsUrl:h.CLICKHOUSE_ANALYTICS_ADDRESS,clickhouseAnalyticsUsername:h.CLICKHOUSE_ANALYTICS_USERNAME||"admin_monitor",clickhouseAnalyticsPassword:h.CLICKHOUSE_ANALYTICS_PASSWORD,customerLakeUrl:h.CUSTOMER_LAKE_URL,customerLakeAdminUsername:h.CUSTOMER_LAKE_ADMIN_USERNAME||"customer_lake_user_admin",customerLakeAdminPassword:h.CUSTOMER_LAKE_ADMIN_PASSWORD,customerLakeTenantSecret:h.CUSTOMER_LAKE_TENANT_SECRET,orderMonitorIngestUrl:h.ORDER_MONITOR_INGEST_URL,oneDollarStatsApiKey:h.ONEDOLLAR_BACKEND_API_KEY,reportsInternalApiUrl:Z(h.REPORTS_INTERNAL_API_URL,h.COMMERCE_DISCOVERY_INTERNAL_API_URL),reportsInternalApiKey:Z(h.REPORTS_INTERNAL_API_KEY,h.COMMERCE_DISCOVERY_INTERNAL_API_KEY),s3TenantBucket:h.S3_TENANT_BUCKET||"new-deco-sites-assets",s3TenantRegion:h.S3_TENANT_REGION||"us-west-2",s3TenantEndpoint:h.S3_TENANT_ENDPOINT,s3TenantPublicUrlBase:h.S3_TENANT_PUBLIC_URL_BASE||"https://assets.decocms.com",awsS3TenantRoleArn:h.AWS_S3_TENANT_ROLE_ARN,awsS3TenantProvisionerAccessKeyId:h.AWS_S3_TENANT_PROVISIONER_ACCESS_KEY_ID,awsS3TenantProvisionerSecretAccessKey:h.AWS_S3_TENANT_PROVISIONER_SECRET_ACCESS_KEY,deliveryR2AccountId:h.DELIVERY_R2_ACCOUNT_ID,deliveryR2AccessKeyId:h.DELIVERY_R2_ACCESS_KEY_ID,deliveryR2SecretAccessKey:h.DELIVERY_R2_SECRET_ACCESS_KEY,deliveryR2Bucket:h.DELIVERY_R2_BUCKET,deliveryR2Endpoint:h.DELIVERY_R2_ENDPOINT,deliveryPublicOrigin:h.DELIVERY_PUBLIC_ORIGIN,siteTokenSigningKey:h.DECO_SITE_TOKEN_SIGNING_KEY,cfDeliveryZoneId:h.CF_DELIVERY_ZONE_ID,cfPurgeApiToken:h.CF_PURGE_API_TOKEN};if(Boolean(c.natsUser)!==Boolean(c.natsPassword))throw Error("NATS_USER and NATS_PASSWORD must be set together");if(c.natsCredsPath&&c.natsUser)throw Error("Use either NATS_CREDS or NATS_USER/NATS_PASSWORD");if(c.plansEnabled&&!c.studioJwtSecret)throw Error("STUDIO_PLANS_ENABLED requires an explicit gateway JWT secret. Set STUDIO_JWT_SECRET (or its legacy alias MESH_JWT_SECRET) to the same value as the gateway's MESH_JWT_SECRET. Refusing to fall back to BETTER_AUTH_SECRET: that mismatch 401s every entitlements call, which every feature gate reads as 'no answer' and fails OPEN.");if(c.plansEnabled&&!c.studioProvisionSecretKey)throw Error("STUDIO_PLANS_ENABLED requires STUDIO_PROVISION_SECRET_KEY, set to the same value as the gateway's STUDIO_PROVISION_KEY. Without it the gateway cannot identify this server, falls back to a per-user membership callback that 401s for any user who never completed the gateway OAuth flow, and every feature gate then fails OPEN.");if(c.plansEnabled&&!c.aiGatewayEnabled)throw Error("STUDIO_PLANS_ENABLED requires DECO_AI_GATEWAY_ENABLED=true. Plans are read from the gateway; with it disabled there is no adapter to ask, so every feature gate fails OPEN on both server and client and the paid product is free fleet-wide.");if(c.plansEnabled&&Object.keys(c.stripePlanPriceIds).length>0&&!c.aiGatewayAdminToken)throw Error("STRIPE_PLAN_PRICE_IDS is set but DECO_AI_GATEWAY_ADMIN_TOKEN is not. The Stripe webhook places the paid tier through the gateway's admin API, so without the token a customer is charged and the entitlement "+"is never granted \u2014 and AI_PLAN_SET cannot repair it, it accepts only "+"'free'.");if(c.plansEnabled&&Object.keys(c.stripePlanPriceIds).length>1&&!c.stripePortalConfigurationId)console.warn("STRIPE_PLAN_PRICE_IDS maps more than one plan but STRIPE_PORTAL_CONFIGURATION_ID is unset. An org that already has a subscription cannot change tier: the account's default portal configuration lists only the legacy plans, not the tiers, so Stripe refuses the update flow. First-time checkout is unaffected.");return c}var v=null;function $(){return v??=Object.freeze(i(process.env))}import{Kysely as Pc,PostgresDialect as gc}from"kysely";import{Pool as pc}from"pg";import{createContextKey as wh,metrics as ch,propagation as Aw,ROOT_CONTEXT as pw,SpanStatusCode as uw,trace as fh}from"@opentelemetry/api";import{logs as yh,SeverityNumber as K}from"@opentelemetry/api-logs";import{OTLPLogExporter as lw}from"@opentelemetry/exporter-logs-otlp-proto";import{PrometheusExporter as Jh}from"@opentelemetry/exporter-prometheus";import{OTLPTraceExporter as vw}from"@opentelemetry/exporter-trace-otlp-proto";import{RuntimeNodeInstrumentation as sw}from"@opentelemetry/instrumentation-runtime-node";import{context as bh,propagation as Th,SpanKind as _h,SpanStatusCode as Mh}from"@opentelemetry/api";var gh=globalThis.fetch;import{ExportResultCode as eh}from"@opentelemetry/core";import{ExportResultCode as o}from"@opentelemetry/core";import{mkdir as r,rename as s,writeFile as e}from"fs/promises";import{join as D}from"path";class F{bufferItems=[];bufferBytes=0;flushTimer=null;flushQueue=Promise.resolve();basePath;flushThreshold;maxBufferBytes;isShutdown=!1;knownDirs=new Set;partitionKey;constructor(h){this.basePath=h.basePath,this.flushThreshold=h.flushThreshold??1000,this.maxBufferBytes=h.maxBufferBytes??10485760,this.partitionKey=h.partitionKey;let w=h.flushIntervalMs??60000;if(w>0&&w<3600000){if(this.flushTimer=setInterval(()=>{this.flush().catch((f)=>{console.error("[NDJSONExporter] Timer flush failed:",f)})},w),this.flushTimer&&typeof this.flushTimer==="object"&&"unref"in this.flushTimer)this.flushTimer.unref()}}exportRows(h){if(this.isShutdown)return Promise.resolve({code:o.FAILED});for(let w of h){let f=JSON.stringify(w),J=this.partitionKey?this.partitionKey(w):"";this.bufferItems.push({partition:J,json:f}),this.bufferBytes+=Buffer.byteLength(f,"utf8")+1}if(this.bufferItems.length>=this.flushThreshold||this.bufferBytes>=this.maxBufferBytes)return this.flush().then(()=>({code:o.SUCCESS})).catch((w)=>{return console.error("[NDJSONExporter] Flush failed:",w),{code:o.FAILED}});return Promise.resolve({code:o.SUCCESS})}async shutdown(){if(this.isShutdown=!0,this.flushTimer)clearInterval(this.flushTimer),this.flushTimer=null;try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}async forceFlush(){try{await this.flushQueue}catch{}if(this.bufferItems.length>0)await this.flush()}flush(){let w=this.flushQueue.catch(()=>{}).then(()=>this.doFlush());return this.flushQueue=w,w}async doFlush(){if(this.bufferItems.length===0)return;let h=this.bufferItems;this.bufferItems=[],this.bufferBytes=0;let w=new Map;for(let c of h){let y=w.get(c.partition);if(!y)y=[],w.set(c.partition,y);y.push(c.json)}let f=await Promise.allSettled(Array.from(w.entries()).map(([c,y])=>this.writeNDJSON(y,c).then(()=>c))),J=f.find((c)=>c.status==="rejected");if(J){let c=new Set;for(let d of f)if(d.status==="fulfilled")c.add(d.value);let y=h.filter((d)=>!c.has(d.partition));this.bufferItems=y.concat(this.bufferItems),this.bufferBytes=0;for(let d of this.bufferItems)this.bufferBytes+=Buffer.byteLength(d.json,"utf8")+1;throw J.reason}}async writeNDJSON(h,w){let f=new Date,J=[String(f.getUTCFullYear()),String(f.getUTCMonth()+1).padStart(2,"0"),String(f.getUTCDate()).padStart(2,"0"),String(f.getUTCHours()).padStart(2,"0")],c=w?D(this.basePath,w,...J):D(this.basePath,...J);if(!this.knownDirs.has(c))await r(c,{recursive:!0,mode:448}),this.knownDirs.add(c);let y=`${crypto.randomUUID()}.ndjson`,d=D(c,`.${y}.tmp`),m=D(c,y),N=h.join(`
|
|
3
3
|
`)+`
|
|
4
|
-
`;await e(
|
|
4
|
+
`;await e(d,N,{mode:384}),await s(d,m)}}import{ExportResultCode as fw}from"@opentelemetry/core";import{AggregationTemporality as Jw,DataPointType as dw}from"@opentelemetry/sdk-metrics";import{ExportResultCode as Zw}from"@opentelemetry/core";var Fw=Buffer.byteLength("... [TRUNCATED]","utf8");import{BatchLogRecordProcessor as dc,LoggerProvider as mc}from"@opentelemetry/sdk-logs";import{detectResources as zc,envDetector as Nc,hostDetector as Wc,osDetector as Zc,processDetector as $c,resourceFromAttributes as oc}from"@opentelemetry/resources";import{PeriodicExportingMetricReader as Fc}from"@opentelemetry/sdk-metrics";import{NOOP_LOGGER as Uw}from"@opentelemetry/api-logs";import{NodeSDK as Uc}from"@opentelemetry/sdk-node";import{BatchSpanProcessor as Yc,SamplingDecision as W}from"@opentelemetry/sdk-trace-base";import{SpanStatusCode as Bw}from"@opentelemetry/api";var dh="__d",mh=wh("Current request"),kh=1;var O=(h)=>{let f=new URL(h.url).searchParams.get(dh);if(f==="")return crypto.randomUUID();if(!f)f=h.headers.get("x-trace-debug-id");return f};class S{inner;constructor(h){this.inner=h}shouldSample(h,w,f,J,c,y){let d=h.getValue(mh);if(!d){if(this.inner)return this.inner.shouldSample(h,w,f,J,c,y);return{decision:W.RECORD_AND_SAMPLED}}let m=O(d);if(m)return{decision:W.RECORD_AND_SAMPLED,attributes:{"trace.debug.id":m}};if(this.inner){let N=this.inner.shouldSample(h,w,f,J,c,y);if(N.decision===W.RECORD_AND_SAMPLED){let C=crypto.randomUUID();N.attributes={...N.attributes??{},"trace.debug.id":C}}return N}return{decision:W.NOT_RECORD}}toString(){return"DebugSampler"}}class b{ratio;constructor(h){this.ratio=h}shouldSample(){if(Math.random()<this.ratio)return{decision:W.RECORD_AND_SAMPLED};return{decision:W.NOT_RECORD}}toString(){return`RatioSampler(${this.ratio})`}}var xc=new Jh({preventServerStart:!0}),Bc=new S(new b(kh));var L=fh.getTracer("studio","1.0.0"),Y=ch.getMeter("studio","1.0.0"),zh=yh.getLogger("studio","1.0.0"),x=(h,w,f)=>{let J={},c=f,y=f[f.length-1];if(y!==null&&typeof y==="object"&&!Array.isArray(y)&&!(y instanceof Error)&&Object.getPrototypeOf(y)===Object.prototype)J=y,c=f.slice(0,-1);let d=c.map((m)=>{if(m instanceof Error)return`${m.name}: ${m.message}`;if(typeof m==="object")try{return JSON.stringify(m)}catch{return"[Object]"}return String(m)}).join(" ");zh.emit({severityNumber:h,severityText:w,body:d,attributes:{"log.source":"console",...J}})},B={error:console.error.bind(console),warn:console.warn.bind(console),debug:console.debug.bind(console)};console.error=(...h)=>{x(K.ERROR,"ERROR",h),B.error(...h)};console.warn=(...h)=>{x(K.WARN,"WARN",h),B.warn(...h)};console.debug=(...h)=>{x(K.DEBUG,"DEBUG",h),B.debug(...h)};function H(h,w){if(!w)return h;let f=new URL(h);if(!f.searchParams.has("sslmode"))f.searchParams.set("sslmode","verify-full");return f.toString()}async function Nh(){let h=$(),{DBOS:w}=await import("@dbos-inc/dbos-sdk");w.setConfig(R({systemDatabaseUrl:H(h.databaseUrl,h.databasePgSsl),poolSize:h.dbosPoolSize,executorID:h.podName,listenQueues:[]})),await G({databaseUrl:H(h.databaseUrl,h.databasePgSsl)},async()=>{await w.launch(),await w.shutdown()})}if(import.meta.main)(async()=>{try{await Nh(),console.log("DBOS system-schema migrations completed."),process.exit(0)}catch(h){console.error("DBOS system-schema migration failed:",h),process.exit(1)}})();export{Nh as migrateDbos};
|