decocms 4.387.3 → 4.387.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Cn5BAuQ8.js → AlertCircle-hgSWDBKD.js} +1 -1
- package/dist/client/assets/{AreaChart-D3bzhKz9.js → AreaChart-DVYORiwb.js} +1 -1
- package/dist/client/assets/{ArrowLeft-C1cb2Dj2.js → ArrowLeft-CzWgQa3d.js} +1 -1
- package/dist/client/assets/{ArrowRight-B2ezCKjo.js → ArrowRight-CIScbBBH.js} +1 -1
- package/dist/client/assets/{ArrowUp-vXPxRqH5.js → ArrowUp-eY5LwDBJ.js} +1 -1
- package/dist/client/assets/{CartesianChart-D3s-SeRT.js → CartesianChart-BsELtg0l.js} +1 -1
- package/dist/client/assets/{Check-DThMruer.js → Check-DzMCAWjr.js} +1 -1
- package/dist/client/assets/{CheckCircle-DYnWzsSa.js → CheckCircle-qWNKZRjX.js} +1 -1
- package/dist/client/assets/{ChevronUp-Ci06-tVi.js → ChevronUp-DgOooPEV.js} +1 -1
- package/dist/client/assets/{Copy01-Dj1rsZ7p.js → Copy01-BCpofYsG.js} +1 -1
- package/dist/client/assets/{CreditCard01-CX4d68BY.js → CreditCard01-Bn7Nh7pY.js} +1 -1
- package/dist/client/assets/{DotsVertical-CZ00QIyA.js → DotsVertical-C2r7pSjy.js} +1 -1
- package/dist/client/assets/{Download01-Bx9EIyyF.js → Download01-ByIMlvpp.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CsqJadNC.js → ErrorBarContext-23zPf3av.js} +1 -1
- package/dist/client/assets/{Eye-bkJA-6md.js → Eye-ByeGuis7.js} +1 -1
- package/dist/client/assets/{Globe04-CHrNXcGc.js → Globe04-DkE5Ga3y.js} +1 -1
- package/dist/client/assets/{Image01-DA0_XwMj.js → Image01-PHuIhGsn.js} +1 -1
- package/dist/client/assets/{Key01-iIe0ym2P.js → Key01-bvziUujD.js} +1 -1
- package/dist/client/assets/{LayoutLeft-S_wLdWXH.js → LayoutLeft-ckCNGRyd.js} +1 -1
- package/dist/client/assets/{Line-B0E8BW5x.js → Line-DkH-1kxq.js} +1 -1
- package/dist/client/assets/{Link01-BmRe1LbW.js → Link01-CouYtnpo.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CZ1KGMqp.js → LinkExternal01-0aXUH17w.js} +1 -1
- package/dist/client/assets/{Monitor01-DwlHZDjH.js → Monitor01-DuCnxHrO.js} +1 -1
- package/dist/client/assets/{Package-CS7Zmqsi.js → Package-CMAEathT.js} +1 -1
- package/dist/client/assets/{Palette-DFGQ_LgU.js → Palette-BBg5KSeZ.js} +1 -1
- package/dist/client/assets/{Plus-q0JJEXEj.js → Plus-cTdqTQJ8.js} +1 -1
- package/dist/client/assets/{SearchLg-teGOx5Lm.js → SearchLg-DcTL96oE.js} +1 -1
- package/dist/client/assets/{SearchMd-CKgYK_Bl.js → SearchMd-CZbvHP8u.js} +1 -1
- package/dist/client/assets/{Sector-CyRj2bq_.js → Sector-Caqc_Xyr.js} +1 -1
- package/dist/client/assets/{Share07-DAILO0KI.js → Share07-D5qAIdw_.js} +1 -1
- package/dist/client/assets/{Stars01-C7sg4bdl.js → Stars01-C5hpEQpu.js} +1 -1
- package/dist/client/assets/{Sun-Dd59quzz.js → Sun-D5Qo0_mB.js} +1 -1
- package/dist/client/assets/{Tool01-B9aH9biT.js → Tool01-BYaM5WOz.js} +1 -1
- package/dist/client/assets/{Trash01-D8KEbJ3X.js → Trash01--pUGUtXR.js} +1 -1
- package/dist/client/assets/{Upload01-93RPdx3u.js → Upload01-CMKb6UeY.js} +1 -1
- package/dist/client/assets/{User01-D7tuP5r3.js → User01-BMbUYR62.js} +1 -1
- package/dist/client/assets/{UserSquare-BF_SmURo.js → UserSquare-aLl4gPvx.js} +1 -1
- package/dist/client/assets/{Users01-G1EXZRGt.js → Users01-asdLCVMY.js} +1 -1
- package/dist/client/assets/{X-B0v0RdVM.js → X-Cw_7koO_.js} +1 -1
- package/dist/client/assets/{XCircle-1GqBoy9j.js → XCircle-CKc7d-mF.js} +1 -1
- package/dist/client/assets/{XClose-BlJju2Q7.js → XClose-CBlP8YJ4.js} +1 -1
- package/dist/client/assets/{Zap-BbRQJwH6.js → Zap-X-YWs08T.js} +1 -1
- package/dist/client/assets/{ZoomOut-42z6KqeQ.js → ZoomOut-dbJRRJek.js} +1 -1
- package/dist/client/assets/{access-gate-DAZyoF2B.js → access-gate-CbKiWCEh.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-Wp9CjVne.js → add-connection-dialog-DFQxs8aQ.js} +1 -1
- package/dist/client/assets/{agent-analytics-CtGFzjZS.js → agent-analytics-DLUP9cW7.js} +1 -1
- package/dist/client/assets/agent-app-BK5xv2pD.js +1 -0
- package/dist/client/assets/{agent-assets-D-VG0sfj.js → agent-assets-CKMissdp.js} +1 -1
- package/dist/client/assets/{agent-automation-BI-xsNzD.js → agent-automation-CkNf87LL.js} +1 -1
- package/dist/client/assets/{agent-automations-CSjIsWJ3.js → agent-automations-BuJ9HnU1.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BnKv9n_g.js → agent-connect-sources-BS54eLud.js} +1 -1
- package/dist/client/assets/agent-deck-CDadtCMn.js +1 -0
- package/dist/client/assets/{agent-e2e-Cw6Yewb5.js → agent-e2e-BvYT8r2A.js} +1 -1
- package/dist/client/assets/{agent-experiments-CmIK1AeZ.js → agent-experiments-DD8Qb89Z.js} +1 -1
- package/dist/client/assets/agent-file-DWSTsIIG.js +1 -0
- package/dist/client/assets/{agent-git-DxCrke6t.js → agent-git-DHj1LXR0.js} +1 -1
- package/dist/client/assets/{agent-hosting-Kq8BYIDy.js → agent-hosting-DY_mWLOF.js} +1 -1
- package/dist/client/assets/{agent-icon-ChShOftK.js → agent-icon-BqOZh8n2.js} +1 -1
- package/dist/client/assets/agent-library-file-D774aryG.js +1 -0
- package/dist/client/assets/{agent-monitor-BgSNkTBZ.js → agent-monitor-BYAXHL39.js} +1 -1
- package/dist/client/assets/{agent-overview-CZv5Zodz.js → agent-overview-CwczZCnS.js} +1 -1
- package/dist/client/assets/agent-settings-BRN4k5Ut.js +1 -0
- package/dist/client/assets/{agent-site-editor-BuYiW7vY.js → agent-site-editor-CcjNJALL.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-f1kTVpaf.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-C5kLEJyk.js → agent-site-editor-content-DX-Lv87x.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-Az3ek__O.js → agent-site-editor-preview-CgJuMcBi.js} +3 -3
- package/dist/client/assets/agent-view-C0AdAXiv.js +1 -0
- package/dist/client/assets/{agent-view-guard-gULWISq_.js → agent-view-guard-DKXWK48x.js} +1 -1
- package/dist/client/assets/{agents-list-Bt10GQwH.js → agents-list-BYb72bFD.js} +1 -1
- package/dist/client/assets/{ai-providers-cUeuBIyk.js → ai-providers-Dj6Kl9IH.js} +1 -1
- package/dist/client/assets/{alert-BJcxnkZj.js → alert-R89k4y7D.js} +1 -1
- package/dist/client/assets/{alert-dialog-Bp1Wh9ug.js → alert-dialog-09b5zi9b.js} +1 -1
- package/dist/client/assets/api-keys-BHlM7m1A.js +1 -0
- package/dist/client/assets/{api-keys-Cclaz3YO.js → api-keys-DzVLrRkO.js} +1 -1
- package/dist/client/assets/app-editor-CzstG09T.js +1 -0
- package/dist/client/assets/{asset-utils-8jzw22Fk.js → asset-utils-C5Hu2JCd.js} +1 -1
- package/dist/client/assets/{auth-C6R_bci9.js → auth-QQKUjaGO.js} +1 -1
- package/dist/client/assets/{auth-catchall-u05USxEd.js → auth-catchall-D1MDVPDw.js} +1 -1
- package/dist/client/assets/{auth-entry-CCBdjm-M.js → auth-entry-CGOv1OCk.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BxYvw9jZ.js → auth-split-layout-CFwpJ-J8.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Ajo42lKz.js → authenticate-and-persist-oauth-DGW42nhH.js} +1 -1
- package/dist/client/assets/{automation-list-row-J21yfJy5.js → automation-list-row-f_Ch9K0J.js} +1 -1
- package/dist/client/assets/{automation-runs-B3iW2JfX.js → automation-runs-DBNJL4Op.js} +1 -1
- package/dist/client/assets/{automations-6wORWmmO.js → automations-DWpA8Qi9.js} +1 -1
- package/dist/client/assets/{autosend-BXGtsYdm.js → autosend-DtYrTN-p.js} +1 -1
- package/dist/client/assets/{avatar-asg_vbnd.js → avatar-D5-ZPRQI.js} +1 -1
- package/dist/client/assets/{badge-xdcxrJKk.js → badge-CuUWv0wf.js} +1 -1
- package/dist/client/assets/{block-document-De1smcS7.js → block-document-BGeIf5uW.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-DOL5kwZe.js → blocks-preview-workspace-context-B60XRWOG.js} +1 -1
- package/dist/client/assets/{breadcrumb-D-aZ536w.js → breadcrumb-BojYvdWK.js} +1 -1
- package/dist/client/assets/{buckets-CKVfgo9B.js → buckets-a3qADnPh.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CJ_btnj2.js → build-improve-prompt-doc-sS3w96Og.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Dtv5K1gv.js → bulk-category-panel-5KvtPYne.js} +1 -1
- package/dist/client/assets/{calendar-DmTWU2Dj.js → calendar-BOE11yNb.js} +1 -1
- package/dist/client/assets/{capability-load-error-BtBiaoOL.js → capability-load-error-DVze9JJO.js} +1 -1
- package/dist/client/assets/{category-editor-CtQ8SFrj.js → category-editor-CZTWyUYO.js} +1 -1
- package/dist/client/assets/{chart-By5JOrgr.js → chart-CE5FeDtf.js} +1 -1
- package/dist/client/assets/{chat-context-B4KQCgP1.js → chat-context-BQ31Bfeq.js} +1 -1
- package/dist/client/assets/{chat-draft-BFkpd5S4.js → chat-draft-CJHKbn8q.js} +1 -1
- package/dist/client/assets/{checkbox-DkMsGFfB.js → checkbox-DI7xt0LT.js} +1 -1
- package/dist/client/assets/{choose-editor-I_GekUn-.js → choose-editor-CfhoOCVG.js} +1 -1
- package/dist/client/assets/{cli-auth-success-cmV7yG1h.js → cli-auth-success-4SdRn6kg.js} +1 -1
- package/dist/client/assets/{client-icons-BecL3PoT.js → client-icons-pmKOvFbb.js} +1 -1
- package/dist/client/assets/{collapsible-CiVUXMvJ.js → collapsible-fq3ywKeY.js} +1 -1
- package/dist/client/assets/{collection-detail-D9i4qKmD.js → collection-detail-m0mc9pdA.js} +1 -1
- package/dist/client/assets/{collection-display-button-XhnDDz5v.js → collection-display-button-CLbtU-hc.js} +1 -1
- package/dist/client/assets/{collection-search-B4N5GV2h.js → collection-search-BdGPVPjv.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DN2Gygzm.js → collection-table-wrapper-BH15Zw5U.js} +1 -1
- package/dist/client/assets/{collection-tabs-B2AyzmKC.js → collection-tabs-CL85PC6j.js} +1 -1
- package/dist/client/assets/{combobox-Cmum4Pv7.js → combobox-CTVJbVdn.js} +1 -1
- package/dist/client/assets/{command-BBAD9vA7.js → command-BIGzDMaF.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-q1gXHeiO.js → companion-mcps-section-BSusJt-e.js} +1 -1
- package/dist/client/assets/{connect-BfRTEvsk.js → connect-CrOzJGoQ.js} +1 -1
- package/dist/client/assets/{connect-layout-BEo2e3W9.js → connect-layout-P18AaSoT.js} +1 -1
- package/dist/client/assets/{connection-DqZD1QkX.js → connection-DWbZ_3yx.js} +1 -1
- package/dist/client/assets/{connection-card-CNk1VF9T.js → connection-card-DlGoZxEj.js} +1 -1
- package/dist/client/assets/{connection-detail-rnttSUaR.js → connection-detail-L2SpKinp.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CYDAD3tu.js → connection-form-helpers-DXYLv7MV.js} +1 -1
- package/dist/client/assets/{connections-DfEEylPK.js → connections-CfYAULl7.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-zJmseNUX.js → create-organization-dialog-CSYovKTP.js} +1 -1
- package/dist/client/assets/{decofile-api-3OB04pBU.js → decofile-api-D_MGfJu9.js} +1 -1
- package/dist/client/assets/{decopilot-DZWOrBAr.js → decopilot-Djom2Zcg.js} +1 -1
- package/dist/client/assets/{dialog-De2EEL_R.js → dialog-5mMpq7OS.js} +1 -1
- package/dist/client/assets/{discover-BS1efjTk.js → discover-BFFjc8-U.js} +1 -1
- package/dist/client/assets/{domain-settings-BHU6H8QF.js → domain-settings-BGKOfp5S.js} +1 -1
- package/dist/client/assets/{download-app-dialog-DwLh9oUS.js → download-app-dialog-DezawA27.js} +1 -1
- package/dist/client/assets/{drawer-BzdH2Qko.js → drawer-Clfr_5DB.js} +1 -1
- package/dist/client/assets/{editor-CEygCPaM.js → editor-CwhSrqRp.js} +1 -1
- package/dist/client/assets/{empty-state-DNdzgv1P.js → empty-state-CD95avq5.js} +1 -1
- package/dist/client/assets/{empty-state-BHb1rpcB.js → empty-state-zdpJBO-5.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BrnzWWb9.js → extract-connection-data-Dh_l3Re9.js} +1 -1
- package/dist/client/assets/{feature-gate-Dvp_OGZA.js → feature-gate-CfWHI6g_.js} +1 -1
- package/dist/client/assets/{feature-paywall-C2c-AjSv.js → feature-paywall-D9JZKI5C.js} +1 -1
- package/dist/client/assets/{file-explorer-CxEGeae7.js → file-explorer-51qkWmNB.js} +1 -1
- package/dist/client/assets/{file-preview-C7fQ2q4M.js → file-preview-C33EciU-.js} +1 -1
- package/dist/client/assets/{file-share-button-CX6_EXa7.js → file-share-button-DeYTdWpB.js} +1 -1
- package/dist/client/assets/{file-type-icon-CDX3kd9G.js → file-type-icon-DW6Dy1DN.js} +1 -1
- package/dist/client/assets/{folder-icon-DJX80o6U.js → folder-icon-CyTcj4wQ.js} +1 -1
- package/dist/client/assets/{form-DCRqQIWX.js → form-TPwFuqR4.js} +1 -1
- package/dist/client/assets/{gateway-client-D4JfXse4.js → gateway-client-CkxdMYfV.js} +1 -1
- package/dist/client/assets/{general-Dmn5Ura5.js → general-B3z4qWxE.js} +1 -1
- package/dist/client/assets/{github-icon-CqSKza4O.js → github-icon-DNTVbGph.js} +1 -1
- package/dist/client/assets/{home-l_thHdAp.js → home-DWc6L2Jp.js} +1 -1
- package/dist/client/assets/{hooks-BRAKbaiE.js → hooks-CVQ1xmlF.js} +1 -1
- package/dist/client/assets/{hooks-DxLB5Hd8.js → hooks-WQDUMFdE.js} +1 -1
- package/dist/client/assets/{icon-button-Za10rcHY.js → icon-button-Bq7aHJwI.js} +1 -1
- package/dist/client/assets/{index-B49gjwBE.js → index-B27TMELH.js} +1 -1
- package/dist/client/assets/{index-C4uIUqoH.js → index-BLTIHwye.js} +1 -1
- package/dist/client/assets/{index-3AkUa4fJ.js → index-BmHFJ8-I.js} +4 -4
- package/dist/client/assets/{index-3R7Odim5.js → index-CfbJAueL.js} +1 -1
- package/dist/client/assets/{index-Byl7Gx5D.js → index-D32fs2Ca.js} +1 -1
- package/dist/client/assets/{index-BGop0XEN.js → index-D6eyVee0.js} +1 -1
- package/dist/client/assets/{index-A0MIFjlk.js → index-DBorommm.js} +1 -1
- package/dist/client/assets/{index-DsxNcE-Q.js → index-DT8Q2ghR.js} +1 -1
- package/dist/client/assets/{index-BxKyNL1s.js → index-DtyRQs7F.js} +1 -1
- package/dist/client/assets/{index-BymQvfX0.js → index-DxDu0P4R.js} +1 -1
- package/dist/client/assets/{index-CtQLpJyL.js → index-KKwPxkKt.js} +1 -1
- package/dist/client/assets/{index-Dt7KlawQ.js → index-XLrU86r7.js} +1 -1
- package/dist/client/assets/{index-yj0yZ8ds.js → index-ZrCMZzYe.js} +1 -1
- package/dist/client/assets/{index-redirect-BJ__JV0A.js → index-redirect-ieY-jS_n.js} +1 -1
- package/dist/client/assets/{index-B1gHPPQS.js → index-yUQov1Eh.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-y1i8bZ9i.js → infiniteQueryObserver-Ctf1361m.js} +1 -1
- package/dist/client/assets/{infra-billing-BtXZ1yQE.js → infra-billing-Cr_iOgVk.js} +1 -1
- package/dist/client/assets/{input-C-98gOPX.js → input-BZxUKOnb.js} +1 -1
- package/dist/client/assets/{input-DXtRHSQP.js → input-Cq71l1Ry.js} +1 -1
- package/dist/client/assets/{input-DAURwDVS.js → input-Ds1I_y35.js} +1 -1
- package/dist/client/assets/{integration-icon-Bw7f5AIM.js → integration-icon-BZtlnWJ7.js} +1 -1
- package/dist/client/assets/{label-CSVg_a7v.js → label-DuGuNzBP.js} +1 -1
- package/dist/client/assets/{last-preview-page-DfTVHHmb.js → last-preview-page-DiAGrdTY.js} +1 -1
- package/dist/client/assets/{layout-C6xwlSdn.js → layout-CqWPDO1U.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CWC0zZau.js → legacy-agents-deep-Bd4Vm8UF.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DRgTRvzH.js → legacy-main-redirect-CE6xBwkY.js} +1 -1
- package/dist/client/assets/{library-97YRcUZr.js → library-B5H7WGMK.js} +1 -1
- package/dist/client/assets/{login-BhU1Ujhe.js → login-Bx8aRDt0.js} +1 -1
- package/dist/client/assets/{markdown-CFbly6Oq.js → markdown-jOLIjTiL.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BykX82F2.js → mcp-app-renderer-B9XYCb9t.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C63jGUnz.js → mcp-oauth-DLMMGdWc.js} +1 -1
- package/dist/client/assets/{members-DeKieaJl.js → members-DTxfZDwV.js} +1 -1
- package/dist/client/assets/{message-templates-BKDF2RYP.js → message-templates-CxD-ZDtY.js} +1 -1
- package/dist/client/assets/{mini-report-page-Chm3cmYy.js → mini-report-page-D4Dk4lD5.js} +1 -1
- package/dist/client/assets/{mock-board-DqZ9ahY1.js → mock-board-BIv2kftV.js} +21 -21
- package/dist/client/assets/{monaco-editor-DOKxCIHt.js → monaco-editor-BNfRsUag.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-1jQu2lrE.js → monitoring-stats-row-c2k1JtE0.js} +1 -1
- package/dist/client/assets/{multi-select-vXxYhU8m.js → multi-select-DishTQDl.js} +1 -1
- package/dist/client/assets/{mustache-DNIi39Ko.js → mustache-BoKbeKU4.js} +1 -1
- package/dist/client/assets/{oauth-callback-3Gi7tqUG.js → oauth-callback-D5GYrF4m.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Cf0t22-C.js → oauth-callback-ai-provider-idl2MhjT.js} +1 -1
- package/dist/client/assets/{onboarding-CGUiX9K2.js → onboarding-D72CsRQM.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-Db2WkK10.js → optimistic-project-sidebar-views-B1zxNGd6.js} +1 -1
- package/dist/client/assets/{org-file-open-context-CnVQlS8r.js → org-file-open-context-BjaYpx82.js} +1 -1
- package/dist/client/assets/{organization-choice--In3qR7U.js → organization-choice-DWLsk65r.js} +1 -1
- package/dist/client/assets/{orgs-BDLSVW_b.js → orgs-CA-2yGha.js} +1 -1
- package/dist/client/assets/{page-seo-form-Bu5aSBFT.js → page-seo-form-BdfQ7jpm.js} +1 -1
- package/dist/client/assets/{pair-GWtw_1HI.js → pair-C4m4P_bM.js} +1 -1
- package/dist/client/assets/{plan-ladder-BU8min_2.js → plan-ladder-DIPLnYTK.js} +1 -1
- package/dist/client/assets/{popover-CLYobNXs.js → popover-D7lBYhvH.js} +1 -1
- package/dist/client/assets/{post-calendar-DQTUlJ0K.js → post-calendar-CEmu24aN.js} +1 -1
- package/dist/client/assets/{post-editor-hanL0E_J.js → post-editor-DhcHNk_x.js} +1 -1
- package/dist/client/assets/{preview-content-D1nRyUS9.js → preview-content-CJ5xSzgM.js} +1 -1
- package/dist/client/assets/{preview-dialog-CAyQLQAc.js → preview-dialog-B43IYD5D.js} +1 -1
- package/dist/client/assets/{primitives-BTxJoGUA.js → primitives-C4_QeNEE.js} +1 -1
- package/dist/client/assets/{profile-DCphnNWV.js → profile-Cbc_yFas.js} +1 -1
- package/dist/client/assets/{project-app-view-DGIagWPe.js → project-app-view-FqlJbDg-.js} +1 -1
- package/dist/client/assets/{project-feed-TkqL7JQ0.js → project-feed-ChaTEA9D.js} +1 -1
- package/dist/client/assets/{project-icon-C743c52u.js → project-icon-DaIs4OX5.js} +1 -1
- package/dist/client/assets/project-reports-9dqN5-6L.js +1 -0
- package/dist/client/assets/project-tasks-JsDsbgNO.js +1 -0
- package/dist/client/assets/{prompts-2YddtnsL.js → prompts-uxgryOMT.js} +1 -1
- package/dist/client/assets/record-editor-DE8927-D.js +1 -0
- package/dist/client/assets/{redirect-editor-C-IAxVlk.js → redirect-editor-D8_etHJh.js} +1 -1
- package/dist/client/assets/{reports-BUSZApNb.js → reports-BJQZrvSm.js} +1 -1
- package/dist/client/assets/reports-C63pGOIK.js +1 -0
- package/dist/client/assets/{reports-onboarding-IfWVIoXf.js → reports-onboarding-Df1Nn8co.js} +1 -1
- package/dist/client/assets/{reports-tab-B7kMJJWU.js → reports-tab-BenCKxOl.js} +2 -2
- package/dist/client/assets/{repositories-D502vIiH.js → repositories-DyuvVGkQ.js} +1 -1
- package/dist/client/assets/{repository-import-picker-BCAmdt78.js → repository-import-picker-DI9X7Sv8.js} +1 -1
- package/dist/client/assets/{repository-picker-HSv-HWJc.js → repository-picker-BDtSGlFC.js} +1 -1
- package/dist/client/assets/{require-capability-BQaV-yr9.js → require-capability-CBL83jiY.js} +1 -1
- package/dist/client/assets/{required-auth-layout-rBHLSvp6.js → required-auth-layout-C1R25Zzy.js} +1 -1
- package/dist/client/assets/{reset-password-BlDszqa3.js → reset-password-BjRkjhqj.js} +1 -1
- package/dist/client/assets/{resizable-e4GYLVXf.js → resizable-Gx90COqD.js} +1 -1
- package/dist/client/assets/{review-settings-ks9_qLg3.js → review-settings-BRCUtMlW.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-_GsdfhRm.js → rich-text-link-control-B_wwOJO6.js} +1 -1
- package/dist/client/assets/{roles-DEqsJ4rW.js → roles-DmwaGQ93.js} +1 -1
- package/dist/client/assets/{route-oRN7uTVj.js → route-2gxnzXXf.js} +1 -1
- package/dist/client/assets/{route-DgxW9W04.js → route-CnJdNRr7.js} +1 -1
- package/dist/client/assets/{route-CCr7oDUX.js → route-IZI1rK9k.js} +1 -1
- package/dist/client/assets/{route-page-header-Dltx9ClI.js → route-page-header-DocAv1wt.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-DrYuFjUS.js → runnable-block-editor-D1TaiLpP.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CHq2sTV_.js → sandbox-lifecycle-context-MZjjHvYn.js} +1 -1
- package/dist/client/assets/{schema-BujVNayF.js → schema-B-uhJjy5.js} +1 -1
- package/dist/client/assets/{scroll-area-lvldU12M.js → scroll-area-2ymKmoTZ.js} +1 -1
- package/dist/client/assets/{search-input-24B8Tyot.js → search-input-CMBvJ10v.js} +1 -1
- package/dist/client/assets/{search-toggle-NqjyKjYI.js → search-toggle-DgisFciF.js} +1 -1
- package/dist/client/assets/{secrets-D3za7wyU.js → secrets-C7dmJLgp.js} +1 -1
- package/dist/client/assets/{sections-editor-CanRyS0_.js → sections-editor-BeWO_pke.js} +1 -1
- package/dist/client/assets/{select-Bg4SYeWD.js → select-1DiMgU9T.js} +1 -1
- package/dist/client/assets/{select-model-BGkutAKe.js → select-model-Du8rEdSR.js} +1 -1
- package/dist/client/assets/{seo-editor-DiGDq3FB.js → seo-editor-DhP3LDEt.js} +1 -1
- package/dist/client/assets/{separator-CywjNUh1.js → separator-CtdnogFH.js} +1 -1
- package/dist/client/assets/{settings-tab-D8VLTGbr.js → settings-tab-DJDnoIui.js} +1 -1
- package/dist/client/assets/{sheet-ftf49HXN.js → sheet-DPS1Kz_C.js} +1 -1
- package/dist/client/assets/{shell-layout-DjW70qiW.js → shell-layout-CKihGZNX.js} +1 -1
- package/dist/client/assets/{sidebar-DTV4AZIF.js → sidebar-DEcau47F.js} +1 -1
- package/dist/client/assets/{skill-preview-ypZHU8Z2.js → skill-preview-BAiilt37.js} +1 -1
- package/dist/client/assets/{skills-DfIn9w2Y.js → skills-BaePIRSM.js} +1 -1
- package/dist/client/assets/{sso-Xj1__3fg.js → sso-CObwTqK6.js} +1 -1
- package/dist/client/assets/{switch-eKei9kDs.js → switch-DN875-Cr.js} +1 -1
- package/dist/client/assets/{synced-repos-DRpiwbTc.js → synced-repos-BRQY-CIB.js} +1 -1
- package/dist/client/assets/{table-B5v_DWhP.js → table-k1Brqzpd.js} +1 -1
- package/dist/client/assets/{tabs-CXXa_jSH.js → tabs-Bp0Ch-Ga.js} +1 -1
- package/dist/client/assets/task-board-2PgUk_FK.js +1 -0
- package/dist/client/assets/{task-route-CoMVgg7O.js → task-route-BL0TXOaJ.js} +1 -1
- package/dist/client/assets/{task-status-BHPdW1Gf.js → task-status-C8YXJLH6.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BOysxhGE.js → taskboard-analytics-CVofvbkS.js} +1 -1
- package/dist/client/assets/tasks-DwMwPVbq.js +1 -0
- package/dist/client/assets/{tasks-DbvkRm0v.js → tasks-ptve1jRC.js} +1 -1
- package/dist/client/assets/{textarea-BPjXGpk9.js → textarea-B5ek6Hvw.js} +1 -1
- package/dist/client/assets/{thread-button-CwE4DtdX.js → thread-button-B_foFoP7.js} +1 -1
- package/dist/client/assets/{thread-intent-CwRpUwxV.js → thread-intent-BC6vFZtL.js} +1 -1
- package/dist/client/assets/{thread-route-C8g2T7dL.js → thread-route-B4Zc4-z8.js} +1 -1
- package/dist/client/assets/{thread-route-D7XDJf4m.js → thread-route-CwRPK4w6.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DBGVzD-E.js → thread-sheet-body-nc6bS6tW.js} +1 -1
- package/dist/client/assets/{toggle-group-CA3zdmBJ.js → toggle-group-B1SPzaTJ.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-ExGjsDgt.js → toolbar-icon-button-BPHXDT9A.js} +1 -1
- package/dist/client/assets/{tooltip-CJqM3lfm.js → tooltip-DZR6NrSl.js} +1 -1
- package/dist/client/assets/{track-BonYxxqQ.js → track-Dt4ss06A.js} +1 -1
- package/dist/client/assets/{types-q9I0nHOA.js → types-BFjFcLd2.js} +1 -1
- package/dist/client/assets/{usage-stats-D9pcQ_sO.js → usage-stats-BYLYR362.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CWjHemFz.js → use-ai-providers-UqHoQ3ST.js} +1 -1
- package/dist/client/assets/{use-automations-D_9BgiTB.js → use-automations-C2WvZsip.js} +1 -1
- package/dist/client/assets/{use-autosave-cRfN0ui4.js → use-autosave-DfpUmvQC.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DReblGUx.js → use-connect-companion-DftPPtUI.js} +1 -1
- package/dist/client/assets/{use-connection-SLYUQbDz.js → use-connection-oC15oclL.js} +1 -1
- package/dist/client/assets/{use-copy-CuqZqltT.js → use-copy-SiO3fRza.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-GNhxSn5M.js → use-create-virtual-mcp-C1_Payfy.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BGBVgoHd.js → use-date-fns-locale-_5ce6Tkl.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-6T3TL8Ql.js → use-debounced-autosave-BCJQFgee.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DW94WVQ_.js → use-debounced-value-BPDNjxF7.js} +1 -1
- package/dist/client/assets/{use-deco-credits-w00rL9rV.js → use-deco-credits-wIj4uY_6.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DPMnjbbG.js → use-decopilot-events-rDva76IU.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CxnXYerT.js → use-delete-connection-Nv78O41P.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-KOfaGpVS.js → use-deployment-admin-WMXJxtL_.js} +1 -1
- package/dist/client/assets/{use-entitlements-DM1qztRK.js → use-entitlements-DyGy57dZ.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-Qr055LlR.js → use-fast-preview-draft-url-B4oSTxVH.js} +1 -1
- package/dist/client/assets/{use-file-configs-CGahvfZy.js → use-file-configs-CuOK6eKs.js} +1 -1
- package/dist/client/assets/{use-in-settings-BARku5xt.js → use-in-settings-DmCo8sK7.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B5230ZMb.js → use-infinite-scroll-C5Ijv_kf.js} +1 -1
- package/dist/client/assets/{use-join-requests-CQOEPhsO.js → use-join-requests-CSvzwOGU.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-ChV_2DZW.js → use-main-panel-tabs-DK6Zt-tk.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BB3CPz80.js → use-mcp-auth-status-CT_a8aVW.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BK0kaBib.js → use-mcp-client-DfbMfRX0.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-D1-kxx63.js → use-mcp-prompts-SPo5nqQt.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-OJ9Zh9W1.js → use-mcp-tools-SgDMtwAo.js} +1 -1
- package/dist/client/assets/{use-members-D_OenEaH.js → use-members-HY_2svm-.js} +1 -1
- package/dist/client/assets/{use-mobile-BqBZOSTT.js → use-mobile-BK6fqDjV.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BYji1ZG2.js → use-navigate-to-agent-CIi6mRK5.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-C1LF2oOG.js → use-open-billing-url-C-f1VKsu.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Da_6fbH8.js → use-org-auth-client-DYhylMRY.js} +1 -1
- package/dist/client/assets/{use-org-fs-CN5CmElX.js → use-org-fs-gR481HRW.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-C8dyKQTx.js → use-org-repo-syncs-DCvqRKO6.js} +1 -1
- package/dist/client/assets/{use-org-sso-DAEFbqa6.js → use-org-sso-DN6Td0La.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Cx6-_uID.js → use-organization-roles-DdjNqa5L.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D9SMKnuj.js → use-organization-settings-BVJz2xHz.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CDz0C6t7.js → use-panel-navigate-D7o7QU5a.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BBkf-Zm4.js → use-project-native-view-presence-D6cW7Bzl.js} +1 -1
- package/dist/client/assets/{use-project-scope-BURtD24h.js → use-project-scope-CK3AlNLq.js} +1 -1
- package/dist/client/assets/{use-releases-Cu6u0bcZ.js → use-releases-Dh5Oc5QA.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CIHeMd6p.js → use-reports-diagnostic-BM-RDSbB.js} +1 -1
- package/dist/client/assets/{use-route-default-main-VAt2uNQm.js → use-route-default-main-D7z11tZk.js} +1 -1
- package/dist/client/assets/{use-secrets-B_4rFztF.js → use-secrets-NnQ4avlz.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-NnAn5ni4.js → use-section-preview-base-DObF0usH.js} +1 -1
- package/dist/client/assets/{use-session-runtime-V4bsn59Z.js → use-session-runtime-xDTntTtH.js} +1 -1
- package/dist/client/assets/{use-tags-Asbg8CFV.js → use-tags-C2GVmqtL.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DkWRDw4Q.js → use-task-board-analytics-BJL1hHKP.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CyEPL5HJ.js → use-task-metadata-B1Jj7tW5.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CAXm9l5o.js → use-thread-outputs-BvyTbKSH.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BawBNtMM.js → use-virtual-mcp-C63LvP7b.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CNlFN6xT.js +1 -0
- package/dist/client/assets/{useQueries-Ckt9uhtS.js → useQueries-AJpXrqKZ.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CZaJStWg.js +1 -0
- package/dist/client/assets/{users-CLQoBAv9.js → users-BCsbqUbp.js} +1 -1
- package/dist/client/assets/{utils-D5usjytT.js → utils-BPd6rJkT.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bgpor-yB.js → variant-calendar-CzdJlwV6.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DL-ba0hY.js → variant-matcher-override-D_56fN6-.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CpPZ1z8X.js → view-mode-toggle-CNFzSODY.js} +1 -1
- package/dist/client/assets/{virtual-mcp-B49Lo7bt.js → virtual-mcp-W021Zw27.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-OIHhFuBP.js +0 -1
- package/dist/client/assets/agent-deck-CmUKfECm.js +0 -1
- package/dist/client/assets/agent-file-DOj89I66.js +0 -1
- package/dist/client/assets/agent-library-file-BfVS49yN.js +0 -1
- package/dist/client/assets/agent-settings-D9FQF5Im.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BcgQkDIF.js +0 -2
- package/dist/client/assets/agent-view-BRfd6K1O.js +0 -1
- package/dist/client/assets/api-keys-C0T4XFF4.js +0 -1
- package/dist/client/assets/app-editor-CP1TxCAY.js +0 -1
- package/dist/client/assets/project-reports-CSn6y1ux.js +0 -1
- package/dist/client/assets/project-tasks-B1ets1nb.js +0 -1
- package/dist/client/assets/record-editor-oByV8dYO.js +0 -1
- package/dist/client/assets/reports-B-ZPj5fj.js +0 -1
- package/dist/client/assets/task-board-B33kcBrm.js +0 -1
- package/dist/client/assets/tasks-CcMLQuPd.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CHvzbp4H.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CpkAfLYP.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{an as t,ao as e,aH as l,bN as a,bL as s,bM as o,cV as c,bO as d,dS as A,cX as I,bP as g}from"./index-3AkUa4fJ.js";const v=t({connection_id:e().describe("Connection ID"),selected_tools:a(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),u=500,w=200,R=200,_=20,E=50,k=100,U=20,P=100,T=50,C=100,N=50,O=8192,y=v.extend({selected_tools:a(e()).max(u).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).max(u).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).max(u).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),V=t({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),D=t({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:t({type:c("ext-app"),appId:e(),args:d(e(),g()).optional()})}),S=o(["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations","experiments"]),re=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(D).max(U).optional()});function ce(n){return F(n?.cms)??"on"}function de(n,i){const r=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...r?{defaultMainView:{type:"site-editor"}}:{}}}const h=t({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:d(e(),g()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:l().int().positive().optional(),maxHeight:l().int().positive().optional()}),H=t({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:a(V).max(k).nullable().optional(),layout:B.nullable().optional(),homeTile:h.nullable().optional(),homeTiles:a(h).max(_).nullable().optional(),homePrompts:a(e()).max(E).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."}),G=I("kind",[t({key:f,kind:c("literal"),value:e().max(O)}),t({key:f,kind:c("secret"),secretId:e().min(1)})]),z=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/,K=t({host:e().min(1).regex(z).describe("Submodule host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:e().min(1).describe("Vault secret id holding the PAT used to fetch this host.")}),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(G).max(C).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config."),submoduleCredentials:a(K).max(N).nullable().optional().describe("Git submodule credentials injected on every SANDBOX_START. Each entry maps a host to a vault secret (PAT) that Studio resolves before posting /_sandbox/config; the daemon uses it to authenticate `git submodule update` for submodules on that host.")}),W=t({url:e().describe("GitHub repository URL"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:l().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),Z=o(["agent-sandbox","local-api"]),Y={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.")},M=t(Y);function pe(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,r={};for(const[p,b]of Object.entries(i))if(!(!b||typeof b!="object")&&!(p!=="agent-sandbox"&&p!=="local-api"))try{r[p]=M.parse(b)}catch{}return r}const $=d(e().describe("userId"),d(e().describe("branch"),A(Z,M))),J=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")}),Q=a(J).max(P).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."),ee=o(["smart","code-review","open"]),te=ee.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."),ae=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."),ne=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."),ie=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."),oe=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")}),se=a(oe).max(T).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),m={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:a(e()).max(R).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:e().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:H.nullable().optional().describe("UI customization settings"),sidebarViews:a(S).max(10).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:c(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),githubRepo:W.nullable().optional().describe("Linked GitHub repository"),runtime:q.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:Q,siteSlug:e().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:te,previewServerUrl:ie,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:ae,releases:se,fastPreviewInPlace:ne},be=t({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:o(["active","inactive"]).describe("Current status"),pinned:s().describe("Whether this space is pinned to the sidebar"),metadata:t(m).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:$.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:a(v).describe("Connections with their selected tools, resources, and prompts")}),x=t({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});t({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:o(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:s().optional().default(!1).describe("Pin to sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:a(x).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});t({title:e().min(1).max(255).optional().describe("New name"),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:o(["active","inactive"]).optional().describe("New status"),pinned:s().optional().describe("Pin/unpin from sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).optional().describe("New connections (replaces existing)"),prompts:a(x).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{re as C,j as E,T as R,z as S,be as V,pe as p,ce as r,de as w};
|
|
1
|
+
import{an as t,ao as e,aH as l,bN as a,bL as s,bM as o,cV as c,bO as d,dS as A,cX as I,bP as g}from"./index-BmHFJ8-I.js";const v=t({connection_id:e().describe("Connection ID"),selected_tools:a(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),u=500,w=200,R=200,_=20,E=50,k=100,U=20,P=100,T=50,C=100,N=50,O=8192,y=v.extend({selected_tools:a(e()).max(u).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).max(u).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).max(u).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),V=t({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),D=t({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:t({type:c("ext-app"),appId:e(),args:d(e(),g()).optional()})}),S=o(["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations","experiments"]),re=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(D).max(U).optional()});function ce(n){return F(n?.cms)??"on"}function de(n,i){const r=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...r?{defaultMainView:{type:"site-editor"}}:{}}}const h=t({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:d(e(),g()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:l().int().positive().optional(),maxHeight:l().int().positive().optional()}),H=t({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:a(V).max(k).nullable().optional(),layout:B.nullable().optional(),homeTile:h.nullable().optional(),homeTiles:a(h).max(_).nullable().optional(),homePrompts:a(e()).max(E).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."}),G=I("kind",[t({key:f,kind:c("literal"),value:e().max(O)}),t({key:f,kind:c("secret"),secretId:e().min(1)})]),z=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/,K=t({host:e().min(1).regex(z).describe("Submodule host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:e().min(1).describe("Vault secret id holding the PAT used to fetch this host.")}),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(G).max(C).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config."),submoduleCredentials:a(K).max(N).nullable().optional().describe("Git submodule credentials injected on every SANDBOX_START. Each entry maps a host to a vault secret (PAT) that Studio resolves before posting /_sandbox/config; the daemon uses it to authenticate `git submodule update` for submodules on that host.")}),W=t({url:e().describe("GitHub repository URL"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:l().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),Z=o(["agent-sandbox","local-api"]),Y={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.")},M=t(Y);function pe(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,r={};for(const[p,b]of Object.entries(i))if(!(!b||typeof b!="object")&&!(p!=="agent-sandbox"&&p!=="local-api"))try{r[p]=M.parse(b)}catch{}return r}const $=d(e().describe("userId"),d(e().describe("branch"),A(Z,M))),J=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")}),Q=a(J).max(P).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."),ee=o(["smart","code-review","open"]),te=ee.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."),ae=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."),ne=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."),ie=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."),oe=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")}),se=a(oe).max(T).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),m={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:a(e()).max(R).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:e().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:H.nullable().optional().describe("UI customization settings"),sidebarViews:a(S).max(10).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:c(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),githubRepo:W.nullable().optional().describe("Linked GitHub repository"),runtime:q.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:Q,siteSlug:e().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:te,previewServerUrl:ie,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:ae,releases:se,fastPreviewInPlace:ne},be=t({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:o(["active","inactive"]).describe("Current status"),pinned:s().describe("Whether this space is pinned to the sidebar"),metadata:t(m).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:$.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:a(v).describe("Connections with their selected tools, resources, and prompts")}),x=t({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});t({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:o(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:s().optional().default(!1).describe("Pin to sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:a(x).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});t({title:e().min(1).max(255).optional().describe("New name"),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:o(["active","inactive"]).optional().describe("New status"),pinned:s().optional().describe("Pin/unpin from sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).optional().describe("New connections (replaces existing)"),prompts:a(x).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{re as C,j as E,T as R,z as S,be as V,pe as p,ce as r,de as w};
|
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-BmHFJ8-I.js"></script>
|
|
54
54
|
<link rel="stylesheet" crossorigin href="/assets/index-xA_kfo6T.css">
|
|
55
55
|
</head>
|
|
56
56
|
<body>
|
package/dist/server/cli.js
CHANGED
|
@@ -2091,7 +2091,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var G8$=L(()=>{Vh()});f
|
|
|
2091
2091
|
`.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${G}/${K}, keeping in old table`);continue}}await Zl`
|
|
2092
2092
|
DELETE FROM kysely_migration WHERE name = ${Q}
|
|
2093
2093
|
`.execute($)}}async function vZ$($){await A34($),await R34($);let Z=new CZ$({db:$,provider:{getMigrations:()=>Promise.resolve(b01)}}),{error:Q,results:X}=await Z.migrateToLatest(),Y=0;if(X?.forEach((J)=>{if(J.status==="Success")Y++;else if(J.status==="Error")console.error(`Failed to execute migration "${J.migrationName}"`)}),Q)throw console.error("Failed to migrate"),console.error(Q),Q;return Y}async function q34($){let{keepOpen:Z=!1,database:Q,skipBetterAuth:X=!1}=$??{},Y="skipped";if(!X&&!Q)Y=await ro0();let J=Q??K8(),G=async()=>{if(!Z&&!Q)await vD(J).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await vZ$(J.db);return await G(),{betterAuth:Y,kysely:K}}catch(K){throw await G(),K}}async function M34(){let $=K8(),Z=new CZ$({db:$.db,provider:{getMigrations:()=>Promise.resolve(b01)}}),{error:Q,results:X}=await Z.migrateDown();if(X?.forEach((Y)=>{if(Y.status==="Success")console.log(`\u2705 Migration "${Y.migrationName}" rolled back successfully`);else if(Y.status==="Error")console.error(`\u274C Failed to rollback migration "${Y.migrationName}"`)}),Q)throw console.error("Failed to rollback migration"),console.error(Q),Q}var fZ$=L(()=>{SZ$();ao0();NX()});async function pG0($){let Z={...process.env},Q=fZ0($,Z);console.log(WI1(Q.settings.encryptionKey));let X=Q.settings.betterAuthSecret||(Q.settings.localMode?g4$(Q.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (nJ0(),pJ0)),{outputs:J,services:G}=await Y({home:Q.settings.dataDir,externalDatabaseUrl:Q.externalDatabaseUrl,externalNatsUrl:Q.externalNatsUrl});if(!Q.skipMigrations){let{migrateBetterAuth:W}=await Promise.resolve().then(() => (ao0(),u4$));await W(J.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (NX(),Q4$)),{migrateToLatest:F}=await Promise.resolve().then(() => (fZ$(),xZ$)),U=H(J.databaseUrl);await F({keepOpen:!0,database:U,skipBetterAuth:!0})}let K={...Q.settings,betterAuthSecret:X,databaseUrl:J.databaseUrl,natsUrls:J.natsUrls,...J.s3?{s3Endpoint:J.s3.endpoint,s3Bucket:J.s3.bucket,s3AccessKeyId:J.s3.accessKeyId,s3SecretAccessKey:J.s3.secretAccessKey,s3ForcePathStyle:J.s3.forcePathStyle}:{}};return K8$(K),{settings:K,services:G.map((W)=>({name:W.name==="PostgreSQL"?"Postgres":W.name,port:W.port})),managedServiceNames:G.filter((W)=>W.owner==="managed").map((W)=>W.name)}}var y01=L(()=>{Vh();h4$();H$()});var hZ$={};W0(hZ$,{updateService:()=>oP,subscribeCliState:()=>u01,setTuiConsoleIntercepted:()=>nG0,setServerUrl:()=>_r,setMigrationsDone:()=>Cr,setDevMode:()=>V34,resetCliStateForTests:()=>I34,isTuiConsoleIntercepted:()=>tG0,getCliState:()=>h01,addLogEntry:()=>hD});function bZ$(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function yZ$(){return{services:bZ$(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function I34(){YJ=yZ$()}function Sr(){for(let $ of g01)$()}function h01(){return YJ}function u01($){return g01.add($),()=>g01.delete($)}function oP($){YJ={...YJ,services:YJ.services.map((Z)=>Z.name===$.name?$:Z)},Sr()}function Cr(){YJ={...YJ,migrationsStatus:"done"},Sr()}function _r($){YJ={...YJ,serverUrl:$},Sr()}function hD($){let Z=[...YJ.logs,$];YJ={...YJ,logs:Z.length>500?Z.slice(-500):Z},Sr()}function V34(){YJ={...YJ,services:[...bZ$(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},Sr()}function nG0($){gZ$=$}function tG0(){return gZ$}var YJ,g01,gZ$=!1;var rP=L(()=>{YJ=yZ$();g01=new Set});import{createServer as uZ$}from"net";function k34($){return new Promise((Z)=>{let Q=uZ$();Q.once("error",()=>Z(!1)),Q.listen($,"0.0.0.0",()=>{Q.close(()=>Z(!0))})})}async function vr($){if(await k34($))return $;let Z=await new Promise((Q,X)=>{let Y=uZ$();Y.once("error",X),Y.listen(0,"0.0.0.0",()=>{let J=Y.address(),G=typeof J==="object"&&J?J.port:0;Y.close(()=>Q(G))})});return console.warn(`Port ${$} is in use, using port ${Z} instead.`),Z}var l01=()=>{};var m01={};W0(m01,{startDevServer:()=>C34,pipeToLogStore:()=>c01});import{join as S34}from"path";function c01($){let Z=$.getReader(),Q=new TextDecoder,X="";function Y(){let J=X.split(`
|
|
2094
|
-
`);X=J.pop()??"";for(let G of J){let K=Bun.stripANSI(G).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;hD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:J,value:G}=await Z.read();if(J)break;X+=Q.decode(G,{stream:!0}),Y()}}catch{}if(X.trim()){let J=Bun.stripANSI(X).replace(/^\[\d+\]\s*/,"").trim();if(J)hD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:J})}})()}async function C34($){let{baseUrl:Z,noTui:Q}=$,X=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=X?process.env.PORT:$.vitePort,J=Z||`http://localhost:${Y}`,G=X?await vr(Number(Y)+1):await vr(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await pG0({port:String(G),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)oP({name:D.name,status:"ready",port:D.port});Cr();let F=S34(import.meta.dir,"..","..","..","..",".."),U=Q===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:J,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)c01(N.stdout),c01(N.stderr);_r(J),oP({name:"Vite",status:"ready",port:Number(Y)}),oP({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(N.kill(D),await N.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (nJ0(),pJ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var d01=L(()=>{y01();rP();l01()});var oG0;var i01=L(()=>{oG0={name:"decocms",version:"4.387.3",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^4.0.58","@ai-sdk/google":"^4.0.76","@ai-sdk/openai":"^4.0.71","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^3.1.0","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^4.0.17","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^7.0.107","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as v34,Text as lZ$}from"ink";import{jsx as x34,jsxs as cZ$}from"react/jsx-runtime";function mZ$({version:$}){return cZ$(v34,{flexDirection:"column",marginTop:1,children:[DG0.map((Z,Q)=>x34(lZ$,{color:wG0[Q],children:Z},Q)),cZ$(lZ$,{dimColor:!0,children:[" v",$]})]})}var dZ$=L(()=>{Or()});import{Box as aP,Text as uD}from"ink";import{Spinner as f34}from"@inkjs/ui";import{jsx as RG,jsxs as Ql}from"react/jsx-runtime";function iZ$({status:$}){if($==="pending")return RG(f34,{label:""});return RG(uD,{color:"green",children:"\u2713"})}function b34($){return`${$.name}: ${$.port||"...."}`}function pZ$({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Ql(aP,{flexDirection:"column",paddingBottom:1,children:[RG(mZ$,{version:oG0.version}),RG(aP,{marginBottom:1,children:RG(uD,{dimColor:!0,children:"\u2500".repeat(80)})}),RG(aP,{children:Ql(uD,{dimColor:!0,children:["Home: ",Q]})}),Ql(aP,{gap:2,children:[$.map((Y)=>Ql(aP,{gap:1,children:[RG(uD,{children:b34(Y)}),RG(iZ$,{status:Y.status})]},Y.name)),Ql(aP,{gap:1,children:[RG(uD,{children:"Migrations"}),RG(iZ$,{status:Z})]})]}),RG(aP,{children:X?Ql(uD,{children:["Open in browser: ",RG(uD,{color:"cyan",children:X})]}):RG(uD,{dimColor:!0,children:"Starting..."})})]})}var nZ$=L(()=>{i01();dZ$()});import{Box as y34,Text as xr}from"ink";import{jsx as p01,jsxs as n01}from"react/jsx-runtime";function g34($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function tZ$({logs:$}){return p01(y34,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return p01(xr,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return n01(xr,{children:[n01(xr,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),p01(xr,{color:g34(Z.status),children:Z.status}),n01(xr,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var oZ$=()=>{};var t01={};W0(t01,{App:()=>l34});import{Box as h34}from"ink";import{useSyncExternalStore as u34}from"react";import{jsx as rZ$,jsxs as c34}from"react/jsx-runtime";function l34({home:$}){let Z=u34(u01,h01);return c34(h34,{flexDirection:"column",children:[rZ$(pZ$,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),rZ$(tZ$,{logs:Z.logs})]})}var o01=L(()=>{nZ$();oZ$();rP()});var $K="thread-gate",RB="decopilot-hosted-harness",qB="decopilot-hosted-harness-sandboxed",ZK="automations",lD="background-tools",sP="task-board-github-reads";var aZ$="13";function sZ$($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:aZ$,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var eZ$=()=>{};import m34 from"pg";async function Z7$($,Z){let{databaseUrl:Q,lockTimeoutMs:X=d34}=$,Y=$.log??((W)=>console.log(W)),J=new m34.Client({connectionString:Q});await J.connect();let G=Date.now(),K=!1;try{while(!K){if(K=(await J.query("SELECT pg_try_advisory_lock($1) AS locked",[$7$.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-G>=X)throw Error(`Timed out after ${X}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await k$(i34)}let W=Date.now()-G;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await J.query("SELECT pg_advisory_unlock($1)",[$7$.toString()])}catch{}await J.end().catch(()=>{})}}var $7$=8314027461559302n,d34=600000,i34=500;var Q7$=L(()=>{w8()});function p34(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function r01($,Z){for(let Q=0;Q<$.length;Q++){let X=$[Q];if(X===void 0)continue;if(X===Z)return $[Q+1];if(X.startsWith(`${Z}=`))return X.slice(Z.length+1)}return}function X7$(){let $=p34();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:r01($,"--cpu-prof-dir")??process.cwd(),name:r01($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(r01($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function Y7$(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=iP();if(!Q)return;let X={};try{let{heapStats:Y}=await import("bun:jsc"),J=Y(),G=Object.entries(J.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);X={objectCount:J.objectCount,heapSize:J.heapSize,top:Object.fromEntries(G)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:Q.rss,heapUsed:Q.heapUsed,heapTotal:Q.heapTotal,external:Q.external,arrayBuffers:Q.arrayBuffers,...X}))};return Z().catch(()=>{}),rG0=setInterval(()=>void Z().catch(()=>{}),$),rG0.unref?.(),process.on("SIGUSR2",()=>{try{let Q=Bun.generateHeapSnapshot("v8"),X=typeof Q==="string"?Q:JSON.stringify(Q),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,X),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(Q){console.error("[heap-watch] snapshot failed:",Q)}}),()=>{if(rG0)clearInterval(rG0)}}var rG0;var J7$=()=>{};import*as n34 from"bun:jsc";function G7$(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{t34()}catch(J){return console.error("[stall-watchdog] failed to start sampling profiler:",J),()=>{}}let Q,X=performance.now()+Z,Y=()=>{let J=performance.now(),G=J-X;X=J+Z;let K=[];try{K=o34()?.traces??[]}catch{}if(G>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(G),samplesInWindow:K.length,top:H}))}Q=setTimeout(Y,Z),Q.unref?.()};return Q=setTimeout(Y,Z),Q.unref?.(),()=>{if(Q)clearTimeout(Q)}}var t34,o34;var K7$=L(()=>{({startSamplingProfiler:t34,samplingProfilerStackTraces:o34}=n34)});function W7$(){X7$();let $=[Y7$(),t8$(),G7$()];return()=>{for(let Z of $)Z()}}var H7$=L(()=>{co0();J7$();K7$()});var eP=b((F7$)=>{Object.defineProperty(F7$,"__esModule",{value:!0});F7$.RepublishHeaders=F7$.DirectMsgHeaders=F7$.JsHeaders=F7$.AdvisoryKind=void 0;F7$.isOrderedPushConsumerOptions=r34;F7$.isPullConsumer=a34;F7$.isPushConsumer=s34;F7$.isBoundPushConsumerOptions=e34;function r34($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function a34($){return $.isPullConsumer()}function s34($){return $.isPushConsumer()}function e34($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}F7$.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};F7$.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};F7$.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};F7$.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var qG=b((N7$)=>{Object.defineProperty(N7$,"__esModule",{value:!0});N7$.TD=N7$.TE=N7$.Empty=void 0;N7$.encode=WK4;N7$.decode=HK4;N7$.Empty=new Uint8Array(0);N7$.TE=new TextEncoder;N7$.TD=new TextDecoder;function KK4(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}function WK4(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(N7$.TE.encode($[Q]));if(Z.length===0)return N7$.Empty;if(Z.length===1)return Z[0];return KK4(...Z)}function HK4($){if(!$||$.length===0)return"";return N7$.TD.decode($)}});var MG=b((O7$)=>{Object.defineProperty(O7$,"__esModule",{value:!0});O7$.errors=O7$.PermissionViolationError=O7$.NoRespondersError=O7$.TimeoutError=O7$.RequestError=O7$.ProtocolError=O7$.ConnectionError=O7$.DrainingConnectionError=O7$.ClosedConnectionError=O7$.AuthorizationError=O7$.UserAuthenticationExpiredError=O7$.InvalidOperationError=O7$.InvalidArgumentError=O7$.InvalidSubjectError=void 0;class s01 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}O7$.InvalidSubjectError=s01;class aG0 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,Q){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((X)=>`'${X}'`),$=$.join(",");else $=`'${$}'`;return new aG0(`${$} ${Z}`,Q)}}O7$.InvalidArgumentError=aG0;class e01 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}O7$.InvalidOperationError=e01;class sG0 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new sG0($);return null}}O7$.UserAuthenticationExpiredError=sG0;class eG0 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],Q=$.toLowerCase();for(let X=0;X<Z.length;X++)if(Q.indexOf(Z[X])!==-1)return new eG0($);return null}}O7$.AuthorizationError=eG0;class $11 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}O7$.ClosedConnectionError=$11;class Z11 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}O7$.DrainingConnectionError=Z11;class Q11 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}O7$.ConnectionError=Q11;class X11 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}O7$.ProtocolError=X11;class Y11 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof $30}}O7$.RequestError=Y11;class J11 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}O7$.TimeoutError=J11;class $30 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}O7$.NoRespondersError=$30;class Z30 extends Error{operation;subject;queue;constructor($,Z,Q,X,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=Q,this.queue=X}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let Q="publish",X="",Y=void 0,J=$.match(/(Publish|Subscription) to "(\S+)"/);if(J){if(Q=J[1].toLowerCase(),X=J[2],Q==="subscription"){let G=$.match(/using queue "(\S+)"/);if(G)Y=G[1]}}return new Z30($,Q,X,Y)}}O7$.PermissionViolationError=Z30;O7$.errors={AuthorizationError:eG0,ClosedConnectionError:$11,ConnectionError:Q11,DrainingConnectionError:Z11,InvalidArgumentError:aG0,InvalidOperationError:e01,InvalidSubjectError:s01,NoRespondersError:$30,PermissionViolationError:Z30,ProtocolError:X11,RequestError:Y11,TimeoutError:J11,UserAuthenticationExpiredError:sG0}});var yW=b((z7$)=>{Object.defineProperty(z7$,"__esModule",{value:!0});z7$.SimpleMutex=z7$.Perf=void 0;z7$.extend=MK4;z7$.render=IK4;z7$.timeout=VK4;z7$.delay=kK4;z7$.deadline=SK4;z7$.deferred=K11;z7$.debugDeferred=CK4;z7$.shuffle=_K4;z7$.collect=vK4;z7$.jitter=E7$;z7$.backoff=xK4;z7$.nanos=fK4;z7$.millis=bK4;z7$.randomToken=hK4;var qK4=qG(),G11=MG();function MK4($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function IK4($){return qK4.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function VK4($,Z=!0){let Q=Z?new G11.TimeoutError:null,X,Y,J=new Promise((G,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new G11.TimeoutError);else K(Q)},$)});return Object.assign(J,X)}function kK4($=0){let Z,Q=new Promise((X)=>{let Y=setTimeout(()=>{X()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),X()}}});return Object.assign(Q,Z)}async function SK4($,Z=1000){let Q=K11(),X=setTimeout(()=>{Q.reject(new G11.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function K11(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function CK4(){let $={},Z=new Promise((Q,X)=>{$={resolve:(Y)=>{console.trace("resolve",Y),Q(Y)},reject:(Y)=>{console.trace("reject"),X(Y)}}});return Object.assign(Z,$)}function _K4($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function vK4($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class w7${timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,Q){let X=this.timers.get(Z);if(X===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(Q);if(Y===void 0)throw Error(`${Q} is not defined`);this.measures.set($,Y-X)}getEntries(){let $=[];return this.measures.forEach((Z,Q)=>{$.push({name:Q,duration:Z})}),$}}z7$.Perf=w7$;class j7${max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=K11();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}z7$.SimpleMutex=j7$;function E7$($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function xK4($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(Q){return E7$(Q>Z?$[Z]:$[Q])}}}function fK4($){return $*1e6}function bK4($){return Math.floor($/1e6)}var yK4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",MB=new Uint8Array(62);for(let $=0;$<62;$++)MB[$]=yK4.charCodeAt($);var gK4=218340105584896;function hK4(){let $=Math.floor(Math.random()*gK4),Z=$%62,Q=MB[Z];$=($-Z)/62,Z=$%62;let X=MB[Z];$=($-Z)/62,Z=$%62;let Y=MB[Z];$=($-Z)/62,Z=$%62;let J=MB[Z];$=($-Z)/62,Z=$%62;let G=MB[Z];$=($-Z)/62,Z=$%62;let K=MB[Z];$=($-Z)/62,Z=$%62;let W=MB[Z];$=($-Z)/62;let H=MB[$];return String.fromCharCode(Q,X,Y,J,G,K,W,H)}});var V7$=b((M7$)=>{Object.defineProperty(M7$,"__esModule",{value:!0});M7$.nuid=M7$.NuidImpl=void 0;var ZW4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",cD=62,X30=12,R7$=10,T7$=33,QW4=333,A7$=X30+R7$,H11=new Uint8Array(cD);for(let $=0;$<cD;$++)H11[$]=ZW4.charCodeAt($);var Q30=4294967296,q7$=BigInt(cD)**BigInt(R7$),fr=Number(q7$/(1n<<32n)),W11=Number(q7$%(1n<<32n));function XW4($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function YW4($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else XW4($)}class F11{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(A7$),this.cbuf=new Uint8Array(X30),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(fr+1)),this.seqLo=Math.floor(Math.random()*Q30);while($++<8&&this.seqHi===fr&&this.seqLo>=W11);if(this.seqHi===fr&&this.seqLo>=W11)this.seqLo=0;this.inc=Math.random()*(QW4-T7$)+T7$|0}setPre(){YW4(this.cbuf);for(let $=0;$<X30;$++)this.buf[$]=H11[this.cbuf[$]%cD]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=A7$-1;Q>=X30;Q--){let X=Math.floor($/cD),J=($-X*cD)*Q30+Z,G=Math.floor(J/cD),K=J-G*cD;this.buf[Q]=H11[K],$=X,Z=G}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=Q30)this.seqLo-=Q30,this.seqHi+=1;if(this.seqHi>fr||this.seqHi===fr&&this.seqLo>=W11)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}M7$.NuidImpl=F11;M7$.nuid=new F11});var _7$=b((S7$)=>{Object.defineProperty(S7$,"__esModule",{value:!0});S7$.nuid=S7$.Nuid=void 0;var k7$=V7$();S7$.Nuid=k7$.NuidImpl;S7$.nuid=k7$.nuid});var J30=b((Y30)=>{Object.defineProperty(Y30,"__esModule",{value:!0});Y30.nuid=Y30.Nuid=void 0;var v7$=_7$();Object.defineProperty(Y30,"Nuid",{enumerable:!0,get:function(){return v7$.Nuid}});Object.defineProperty(Y30,"nuid",{enumerable:!0,get:function(){return v7$.nuid}})});var mD=b((x7$)=>{Object.defineProperty(x7$,"__esModule",{value:!0});x7$.DEFAULT_HOST=x7$.DEFAULT_PORT=x7$.Match=void 0;x7$.syncIterator=FW4;x7$.createInbox=UW4;var WW4=J30(),HW4=MG();x7$.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function FW4($){let Z=$[Symbol.asyncIterator]();return{async next(){let Q=await Z.next();if(Q.done)return Promise.resolve(null);return Promise.resolve(Q.value)}}}function UW4($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw HW4.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${WW4.nuid.next()}`}x7$.DEFAULT_PORT=4222;x7$.DEFAULT_HOST="127.0.0.1"});var br=b((g7$)=>{Object.defineProperty(g7$,"__esModule",{value:!0});g7$.DataBuffer=void 0;var b7$=qG();class y7${buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}static fromAscii($){if(!$)$="";return b7$.TE.encode($)}static toAscii($){return b7$.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let Q=0;Q<this.buffers.length;Q++)$.set(this.buffers[Q],Z),Z+=this.buffers[Q].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let Q=this.byteLength;if($===void 0||$>Q)$=Q;let X=Z.subarray(0,$);if(Q>$)this.buffers.push(Z.subarray($));return this.byteLength=Q-$,X}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let Q=0;Q<Z.length;Q++)if(Z[Q]&&Z[Q].length)this.buffers.push(Z[Q]),this.byteLength+=Z[Q].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}g7$.DataBuffer=y7$});var $T=b((l7$)=>{Object.defineProperty(l7$,"__esModule",{value:!0});l7$.LF=l7$.CR=l7$.CRLF=l7$.CR_LF_LEN=l7$.CR_LF=void 0;l7$.setTransportFactory=EW4;l7$.defaultPort=zW4;l7$.getUrlParseFn=PW4;l7$.newTransport=TW4;l7$.getResolveFn=AW4;l7$.protoLen=u7$;l7$.extractProtocolMessage=RW4;var DW4=qG(),wW4=mD(),jW4=br(),IG;function EW4($){IG=$}function zW4(){return IG!==void 0&&IG.defaultPort!==void 0?IG.defaultPort:wW4.DEFAULT_PORT}function PW4(){return IG!==void 0&&IG.urlParseFn?IG.urlParseFn:void 0}function TW4(){if(!IG||typeof IG.factory!=="function")throw Error("transport fn is not set");return IG.factory()}function AW4(){return IG!==void 0&&IG.dnsResolveFn?IG.dnsResolveFn:void 0}l7$.CR_LF=`\r
|
|
2094
|
+
`);X=J.pop()??"";for(let G of J){let K=Bun.stripANSI(G).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;hD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:J,value:G}=await Z.read();if(J)break;X+=Q.decode(G,{stream:!0}),Y()}}catch{}if(X.trim()){let J=Bun.stripANSI(X).replace(/^\[\d+\]\s*/,"").trim();if(J)hD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:J})}})()}async function C34($){let{baseUrl:Z,noTui:Q}=$,X=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=X?process.env.PORT:$.vitePort,J=Z||`http://localhost:${Y}`,G=X?await vr(Number(Y)+1):await vr(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await pG0({port:String(G),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)oP({name:D.name,status:"ready",port:D.port});Cr();let F=S34(import.meta.dir,"..","..","..","..",".."),U=Q===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:J,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)c01(N.stdout),c01(N.stderr);_r(J),oP({name:"Vite",status:"ready",port:Number(Y)}),oP({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(N.kill(D),await N.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (nJ0(),pJ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var d01=L(()=>{y01();rP();l01()});var oG0;var i01=L(()=>{oG0={name:"decocms",version:"4.387.4",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^4.0.58","@ai-sdk/google":"^4.0.76","@ai-sdk/openai":"^4.0.71","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^3.1.0","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^4.0.17","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^7.0.107","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as v34,Text as lZ$}from"ink";import{jsx as x34,jsxs as cZ$}from"react/jsx-runtime";function mZ$({version:$}){return cZ$(v34,{flexDirection:"column",marginTop:1,children:[DG0.map((Z,Q)=>x34(lZ$,{color:wG0[Q],children:Z},Q)),cZ$(lZ$,{dimColor:!0,children:[" v",$]})]})}var dZ$=L(()=>{Or()});import{Box as aP,Text as uD}from"ink";import{Spinner as f34}from"@inkjs/ui";import{jsx as RG,jsxs as Ql}from"react/jsx-runtime";function iZ$({status:$}){if($==="pending")return RG(f34,{label:""});return RG(uD,{color:"green",children:"\u2713"})}function b34($){return`${$.name}: ${$.port||"...."}`}function pZ$({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Ql(aP,{flexDirection:"column",paddingBottom:1,children:[RG(mZ$,{version:oG0.version}),RG(aP,{marginBottom:1,children:RG(uD,{dimColor:!0,children:"\u2500".repeat(80)})}),RG(aP,{children:Ql(uD,{dimColor:!0,children:["Home: ",Q]})}),Ql(aP,{gap:2,children:[$.map((Y)=>Ql(aP,{gap:1,children:[RG(uD,{children:b34(Y)}),RG(iZ$,{status:Y.status})]},Y.name)),Ql(aP,{gap:1,children:[RG(uD,{children:"Migrations"}),RG(iZ$,{status:Z})]})]}),RG(aP,{children:X?Ql(uD,{children:["Open in browser: ",RG(uD,{color:"cyan",children:X})]}):RG(uD,{dimColor:!0,children:"Starting..."})})]})}var nZ$=L(()=>{i01();dZ$()});import{Box as y34,Text as xr}from"ink";import{jsx as p01,jsxs as n01}from"react/jsx-runtime";function g34($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function tZ$({logs:$}){return p01(y34,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return p01(xr,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return n01(xr,{children:[n01(xr,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),p01(xr,{color:g34(Z.status),children:Z.status}),n01(xr,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var oZ$=()=>{};var t01={};W0(t01,{App:()=>l34});import{Box as h34}from"ink";import{useSyncExternalStore as u34}from"react";import{jsx as rZ$,jsxs as c34}from"react/jsx-runtime";function l34({home:$}){let Z=u34(u01,h01);return c34(h34,{flexDirection:"column",children:[rZ$(pZ$,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),rZ$(tZ$,{logs:Z.logs})]})}var o01=L(()=>{nZ$();oZ$();rP()});var $K="thread-gate",RB="decopilot-hosted-harness",qB="decopilot-hosted-harness-sandboxed",ZK="automations",lD="background-tools",sP="task-board-github-reads";var aZ$="13";function sZ$($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:aZ$,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var eZ$=()=>{};import m34 from"pg";async function Z7$($,Z){let{databaseUrl:Q,lockTimeoutMs:X=d34}=$,Y=$.log??((W)=>console.log(W)),J=new m34.Client({connectionString:Q});await J.connect();let G=Date.now(),K=!1;try{while(!K){if(K=(await J.query("SELECT pg_try_advisory_lock($1) AS locked",[$7$.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-G>=X)throw Error(`Timed out after ${X}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await k$(i34)}let W=Date.now()-G;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await J.query("SELECT pg_advisory_unlock($1)",[$7$.toString()])}catch{}await J.end().catch(()=>{})}}var $7$=8314027461559302n,d34=600000,i34=500;var Q7$=L(()=>{w8()});function p34(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function r01($,Z){for(let Q=0;Q<$.length;Q++){let X=$[Q];if(X===void 0)continue;if(X===Z)return $[Q+1];if(X.startsWith(`${Z}=`))return X.slice(Z.length+1)}return}function X7$(){let $=p34();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:r01($,"--cpu-prof-dir")??process.cwd(),name:r01($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(r01($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function Y7$(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=iP();if(!Q)return;let X={};try{let{heapStats:Y}=await import("bun:jsc"),J=Y(),G=Object.entries(J.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);X={objectCount:J.objectCount,heapSize:J.heapSize,top:Object.fromEntries(G)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:Q.rss,heapUsed:Q.heapUsed,heapTotal:Q.heapTotal,external:Q.external,arrayBuffers:Q.arrayBuffers,...X}))};return Z().catch(()=>{}),rG0=setInterval(()=>void Z().catch(()=>{}),$),rG0.unref?.(),process.on("SIGUSR2",()=>{try{let Q=Bun.generateHeapSnapshot("v8"),X=typeof Q==="string"?Q:JSON.stringify(Q),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,X),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(Q){console.error("[heap-watch] snapshot failed:",Q)}}),()=>{if(rG0)clearInterval(rG0)}}var rG0;var J7$=()=>{};import*as n34 from"bun:jsc";function G7$(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{t34()}catch(J){return console.error("[stall-watchdog] failed to start sampling profiler:",J),()=>{}}let Q,X=performance.now()+Z,Y=()=>{let J=performance.now(),G=J-X;X=J+Z;let K=[];try{K=o34()?.traces??[]}catch{}if(G>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(G),samplesInWindow:K.length,top:H}))}Q=setTimeout(Y,Z),Q.unref?.()};return Q=setTimeout(Y,Z),Q.unref?.(),()=>{if(Q)clearTimeout(Q)}}var t34,o34;var K7$=L(()=>{({startSamplingProfiler:t34,samplingProfilerStackTraces:o34}=n34)});function W7$(){X7$();let $=[Y7$(),t8$(),G7$()];return()=>{for(let Z of $)Z()}}var H7$=L(()=>{co0();J7$();K7$()});var eP=b((F7$)=>{Object.defineProperty(F7$,"__esModule",{value:!0});F7$.RepublishHeaders=F7$.DirectMsgHeaders=F7$.JsHeaders=F7$.AdvisoryKind=void 0;F7$.isOrderedPushConsumerOptions=r34;F7$.isPullConsumer=a34;F7$.isPushConsumer=s34;F7$.isBoundPushConsumerOptions=e34;function r34($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function a34($){return $.isPullConsumer()}function s34($){return $.isPushConsumer()}function e34($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}F7$.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};F7$.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};F7$.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};F7$.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var qG=b((N7$)=>{Object.defineProperty(N7$,"__esModule",{value:!0});N7$.TD=N7$.TE=N7$.Empty=void 0;N7$.encode=WK4;N7$.decode=HK4;N7$.Empty=new Uint8Array(0);N7$.TE=new TextEncoder;N7$.TD=new TextDecoder;function KK4(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}function WK4(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(N7$.TE.encode($[Q]));if(Z.length===0)return N7$.Empty;if(Z.length===1)return Z[0];return KK4(...Z)}function HK4($){if(!$||$.length===0)return"";return N7$.TD.decode($)}});var MG=b((O7$)=>{Object.defineProperty(O7$,"__esModule",{value:!0});O7$.errors=O7$.PermissionViolationError=O7$.NoRespondersError=O7$.TimeoutError=O7$.RequestError=O7$.ProtocolError=O7$.ConnectionError=O7$.DrainingConnectionError=O7$.ClosedConnectionError=O7$.AuthorizationError=O7$.UserAuthenticationExpiredError=O7$.InvalidOperationError=O7$.InvalidArgumentError=O7$.InvalidSubjectError=void 0;class s01 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}O7$.InvalidSubjectError=s01;class aG0 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,Q){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((X)=>`'${X}'`),$=$.join(",");else $=`'${$}'`;return new aG0(`${$} ${Z}`,Q)}}O7$.InvalidArgumentError=aG0;class e01 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}O7$.InvalidOperationError=e01;class sG0 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new sG0($);return null}}O7$.UserAuthenticationExpiredError=sG0;class eG0 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],Q=$.toLowerCase();for(let X=0;X<Z.length;X++)if(Q.indexOf(Z[X])!==-1)return new eG0($);return null}}O7$.AuthorizationError=eG0;class $11 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}O7$.ClosedConnectionError=$11;class Z11 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}O7$.DrainingConnectionError=Z11;class Q11 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}O7$.ConnectionError=Q11;class X11 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}O7$.ProtocolError=X11;class Y11 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof $30}}O7$.RequestError=Y11;class J11 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}O7$.TimeoutError=J11;class $30 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}O7$.NoRespondersError=$30;class Z30 extends Error{operation;subject;queue;constructor($,Z,Q,X,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=Q,this.queue=X}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let Q="publish",X="",Y=void 0,J=$.match(/(Publish|Subscription) to "(\S+)"/);if(J){if(Q=J[1].toLowerCase(),X=J[2],Q==="subscription"){let G=$.match(/using queue "(\S+)"/);if(G)Y=G[1]}}return new Z30($,Q,X,Y)}}O7$.PermissionViolationError=Z30;O7$.errors={AuthorizationError:eG0,ClosedConnectionError:$11,ConnectionError:Q11,DrainingConnectionError:Z11,InvalidArgumentError:aG0,InvalidOperationError:e01,InvalidSubjectError:s01,NoRespondersError:$30,PermissionViolationError:Z30,ProtocolError:X11,RequestError:Y11,TimeoutError:J11,UserAuthenticationExpiredError:sG0}});var yW=b((z7$)=>{Object.defineProperty(z7$,"__esModule",{value:!0});z7$.SimpleMutex=z7$.Perf=void 0;z7$.extend=MK4;z7$.render=IK4;z7$.timeout=VK4;z7$.delay=kK4;z7$.deadline=SK4;z7$.deferred=K11;z7$.debugDeferred=CK4;z7$.shuffle=_K4;z7$.collect=vK4;z7$.jitter=E7$;z7$.backoff=xK4;z7$.nanos=fK4;z7$.millis=bK4;z7$.randomToken=hK4;var qK4=qG(),G11=MG();function MK4($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function IK4($){return qK4.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function VK4($,Z=!0){let Q=Z?new G11.TimeoutError:null,X,Y,J=new Promise((G,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new G11.TimeoutError);else K(Q)},$)});return Object.assign(J,X)}function kK4($=0){let Z,Q=new Promise((X)=>{let Y=setTimeout(()=>{X()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),X()}}});return Object.assign(Q,Z)}async function SK4($,Z=1000){let Q=K11(),X=setTimeout(()=>{Q.reject(new G11.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function K11(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function CK4(){let $={},Z=new Promise((Q,X)=>{$={resolve:(Y)=>{console.trace("resolve",Y),Q(Y)},reject:(Y)=>{console.trace("reject"),X(Y)}}});return Object.assign(Z,$)}function _K4($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function vK4($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class w7${timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,Q){let X=this.timers.get(Z);if(X===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(Q);if(Y===void 0)throw Error(`${Q} is not defined`);this.measures.set($,Y-X)}getEntries(){let $=[];return this.measures.forEach((Z,Q)=>{$.push({name:Q,duration:Z})}),$}}z7$.Perf=w7$;class j7${max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=K11();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}z7$.SimpleMutex=j7$;function E7$($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function xK4($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(Q){return E7$(Q>Z?$[Z]:$[Q])}}}function fK4($){return $*1e6}function bK4($){return Math.floor($/1e6)}var yK4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",MB=new Uint8Array(62);for(let $=0;$<62;$++)MB[$]=yK4.charCodeAt($);var gK4=218340105584896;function hK4(){let $=Math.floor(Math.random()*gK4),Z=$%62,Q=MB[Z];$=($-Z)/62,Z=$%62;let X=MB[Z];$=($-Z)/62,Z=$%62;let Y=MB[Z];$=($-Z)/62,Z=$%62;let J=MB[Z];$=($-Z)/62,Z=$%62;let G=MB[Z];$=($-Z)/62,Z=$%62;let K=MB[Z];$=($-Z)/62,Z=$%62;let W=MB[Z];$=($-Z)/62;let H=MB[$];return String.fromCharCode(Q,X,Y,J,G,K,W,H)}});var V7$=b((M7$)=>{Object.defineProperty(M7$,"__esModule",{value:!0});M7$.nuid=M7$.NuidImpl=void 0;var ZW4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",cD=62,X30=12,R7$=10,T7$=33,QW4=333,A7$=X30+R7$,H11=new Uint8Array(cD);for(let $=0;$<cD;$++)H11[$]=ZW4.charCodeAt($);var Q30=4294967296,q7$=BigInt(cD)**BigInt(R7$),fr=Number(q7$/(1n<<32n)),W11=Number(q7$%(1n<<32n));function XW4($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function YW4($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else XW4($)}class F11{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(A7$),this.cbuf=new Uint8Array(X30),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(fr+1)),this.seqLo=Math.floor(Math.random()*Q30);while($++<8&&this.seqHi===fr&&this.seqLo>=W11);if(this.seqHi===fr&&this.seqLo>=W11)this.seqLo=0;this.inc=Math.random()*(QW4-T7$)+T7$|0}setPre(){YW4(this.cbuf);for(let $=0;$<X30;$++)this.buf[$]=H11[this.cbuf[$]%cD]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=A7$-1;Q>=X30;Q--){let X=Math.floor($/cD),J=($-X*cD)*Q30+Z,G=Math.floor(J/cD),K=J-G*cD;this.buf[Q]=H11[K],$=X,Z=G}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=Q30)this.seqLo-=Q30,this.seqHi+=1;if(this.seqHi>fr||this.seqHi===fr&&this.seqLo>=W11)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}M7$.NuidImpl=F11;M7$.nuid=new F11});var _7$=b((S7$)=>{Object.defineProperty(S7$,"__esModule",{value:!0});S7$.nuid=S7$.Nuid=void 0;var k7$=V7$();S7$.Nuid=k7$.NuidImpl;S7$.nuid=k7$.nuid});var J30=b((Y30)=>{Object.defineProperty(Y30,"__esModule",{value:!0});Y30.nuid=Y30.Nuid=void 0;var v7$=_7$();Object.defineProperty(Y30,"Nuid",{enumerable:!0,get:function(){return v7$.Nuid}});Object.defineProperty(Y30,"nuid",{enumerable:!0,get:function(){return v7$.nuid}})});var mD=b((x7$)=>{Object.defineProperty(x7$,"__esModule",{value:!0});x7$.DEFAULT_HOST=x7$.DEFAULT_PORT=x7$.Match=void 0;x7$.syncIterator=FW4;x7$.createInbox=UW4;var WW4=J30(),HW4=MG();x7$.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function FW4($){let Z=$[Symbol.asyncIterator]();return{async next(){let Q=await Z.next();if(Q.done)return Promise.resolve(null);return Promise.resolve(Q.value)}}}function UW4($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw HW4.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${WW4.nuid.next()}`}x7$.DEFAULT_PORT=4222;x7$.DEFAULT_HOST="127.0.0.1"});var br=b((g7$)=>{Object.defineProperty(g7$,"__esModule",{value:!0});g7$.DataBuffer=void 0;var b7$=qG();class y7${buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}static fromAscii($){if(!$)$="";return b7$.TE.encode($)}static toAscii($){return b7$.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let Q=0;Q<this.buffers.length;Q++)$.set(this.buffers[Q],Z),Z+=this.buffers[Q].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let Q=this.byteLength;if($===void 0||$>Q)$=Q;let X=Z.subarray(0,$);if(Q>$)this.buffers.push(Z.subarray($));return this.byteLength=Q-$,X}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let Q=0;Q<Z.length;Q++)if(Z[Q]&&Z[Q].length)this.buffers.push(Z[Q]),this.byteLength+=Z[Q].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}g7$.DataBuffer=y7$});var $T=b((l7$)=>{Object.defineProperty(l7$,"__esModule",{value:!0});l7$.LF=l7$.CR=l7$.CRLF=l7$.CR_LF_LEN=l7$.CR_LF=void 0;l7$.setTransportFactory=EW4;l7$.defaultPort=zW4;l7$.getUrlParseFn=PW4;l7$.newTransport=TW4;l7$.getResolveFn=AW4;l7$.protoLen=u7$;l7$.extractProtocolMessage=RW4;var DW4=qG(),wW4=mD(),jW4=br(),IG;function EW4($){IG=$}function zW4(){return IG!==void 0&&IG.defaultPort!==void 0?IG.defaultPort:wW4.DEFAULT_PORT}function PW4(){return IG!==void 0&&IG.urlParseFn?IG.urlParseFn:void 0}function TW4(){if(!IG||typeof IG.factory!=="function")throw Error("transport fn is not set");return IG.factory()}function AW4(){return IG!==void 0&&IG.dnsResolveFn?IG.dnsResolveFn:void 0}l7$.CR_LF=`\r
|
|
2095
2095
|
`;l7$.CR_LF_LEN=l7$.CR_LF.length;l7$.CRLF=jW4.DataBuffer.fromAscii(l7$.CR_LF);l7$.CR=new Uint8Array(l7$.CRLF)[0];l7$.LF=new Uint8Array(l7$.CRLF)[1];function u7$($){for(let Z=0;Z<$.length;Z++){let Q=Z+1;if($.byteLength>Q&&$[Z]===l7$.CR&&$[Q]===l7$.LF)return Q+1}return 0}function RW4($){let Z=u7$($);if(Z>0){let X=new Uint8Array($).slice(0,Z);return DW4.TD.decode(X)}return""}});var O11=b((o7$)=>{Object.defineProperty(o7$,"__esModule",{value:!0});o7$.ipV4=p7$;o7$.isIP=fW4;o7$.parseIP=n7$;var yr=4,ZT=16,G30=48,i7$=57,m7$=65,vW4=70,d7$=97,xW4=102,L11=16777215;function p7$($,Z,Q,X){let Y=new Uint8Array(ZT);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((G,K)=>{Y[K]=G}),Y[12]=$,Y[13]=Z,Y[14]=Q,Y[15]=X,Y}function fW4($){return n7$($)!==void 0}function n7$($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return t7$($);case":":return bW4($)}return}function t7$($){let Z=new Uint8Array(yr);for(let Q=0;Q<yr;Q++){if($.length===0)return;if(Q>0){if($[0]!==".")return;$=$.substring(1)}let{n:X,c:Y,ok:J}=yW4($);if(!J||X>255)return;$=$.substring(Y),Z[Q]=X}return p7$(Z[0],Z[1],Z[2],Z[3])}function bW4($){let Z=new Uint8Array(ZT),Q=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(Q=0,$=$.substring(2),$.length===0)return Z}let X=0;while(X<ZT){let{n:Y,c:J,ok:G}=gW4($);if(!G||Y>65535)return;if(J<$.length&&$[J]==="."){if(Q<0&&X!=ZT-yr)return;if(X+yr>ZT)return;let K=t7$($);if(K===void 0)return;Z[X]=K[12],Z[X+1]=K[13],Z[X+2]=K[14],Z[X+3]=K[15],$="",X+=yr;break}if(Z[X]=Y>>8,Z[X+1]=Y,X+=2,$=$.substring(J),$.length===0)break;if($[0]!==":"||$.length==1)return;if($=$.substring(1),$[0]===":"){if(Q>=0)return;if(Q=X,$=$.substring(1),$.length===0)break}}if($.length!==0)return;if(X<ZT){if(Q<0)return;let Y=ZT-X;for(let J=X-1;J>=Q;J--)Z[J+Y]=Z[J];for(let J=Q+Y-1;J>=Q;J--)Z[J]=0}else if(Q>=0)return;return Z}function yW4($){let Z=0,Q=0;for(Z=0;Z<$.length&&G30<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=i7$;Z++)if(Q=Q*10+($.charCodeAt(Z)-G30),Q>=L11)return{n:L11,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:Q,c:Z,ok:!0}}function gW4($){let Z=0,Q=0;for(Q=0;Q<$.length;Q++){if(G30<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=i7$)Z*=16,Z+=$.charCodeAt(Q)-G30;else if(d7$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=xW4)Z*=16,Z+=$.charCodeAt(Q)-d7$+10;else if(m7$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=vW4)Z*=16,Z+=$.charCodeAt(Q)-m7$+10;else break;if(Z>=L11)return{n:0,c:Q,ok:!1}}if(Q===0)return{n:0,c:Q,ok:!1};return{n:Z,c:Q,ok:!0}}});var P11=b((a7$)=>{Object.defineProperty(a7$,"__esModule",{value:!0});a7$.Servers=a7$.ServerImpl=void 0;a7$.isIPV4OrHostname=r7$;a7$.hostPort=z11;var D11=$T(),w11=yW(),j11=O11(),cW4=mD(),mW4=MG();function r7$($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function E11($){return!r7$($)}function dW4($){let Q=$.toUpperCase().indexOf("::FFFF:");if(Q!==-1&&$.indexOf(".")!==-1){let X=$.substring(Q+7);return X=X.replace("[",""),X.replace("]","")}return $}function z11($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=dW4($),E11($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=E11($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),Q=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):cW4.DEFAULT_PORT,Y=new URL(`${Q===80?"https":"http"}://${$}`);Y.port=`${Q}`;let J=Y.hostname;if(J.charAt(0)==="[")J=J.substring(1,J.length-1);return{listen:Y.host,hostname:J,port:Q}}class Xl{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let Q=z11($);this.listen=Q.listen,this.hostname=Q.hostname,this.port=Q.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=Z}toString(){return this.listen}async resolve($){if(!$.fn||$.resolve===!1)return[this];let Z=[];if((0,j11.isIP)(this.hostname))return[this];else{let Q=await $.fn(this.hostname);if($.debug)console.log(`resolve ${this.hostname} = ${Q.join(",")}`);for(let X of Q){let Y=this.port===80?"https":"http",J=new URL(`${Y}://${E11(X)?"["+X+"]":X}`);J.port=`${this.port}`;let G=new Xl(J.host,!1);G.tlsName=this.hostname,Z.push(G)}}if($.randomize)(0,w11.shuffle)(Z);return this.resolves=Z,Z}}a7$.ServerImpl=Xl;class K30{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw mW4.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,D11.getUrlParseFn)(),Q=new Map;for(let Y of this.servers)Q.set(Y.listen,Y);let X=[];for(let Y of $){Y=Z?Z(Y):Y;let{listen:J}=z11(Y),G=Q.get(J);if(G)G.gossiped=!1,X.push(G);else X.push(new Xl(Y))}if(this.randomize)(0,w11.shuffle)(X);if(this.servers=X,this.currentServer===void 0||!X.includes(this.currentServer))this.currentServer=X[0],this.firstSelect=!0}clear(){this.servers.length=0}updateTLSName(){let $=this.getCurrentServer();if(!(0,j11.isIP)($.hostname))this.tlsName=$.hostname,this.servers.forEach((Z)=>{if(Z.gossiped)Z.tlsName=this.tlsName})}getCurrentServer(){return this.currentServer}addServer($,Z=!1){let Q=(0,D11.getUrlParseFn)();$=Q?Q($):$;let X=new Xl($,Z);if((0,j11.isIP)(X.hostname))X.tlsName=this.tlsName;this.servers.push(X)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;let $=this.servers.shift();if($)this.servers.push($),this.currentServer=$;return $}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer($){if($){let Z=this.servers.indexOf($);this.servers.splice(Z,1)}}snapshot(){return K30.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return K30.freezeAll([$,...this.servers.slice(0,Z),...this.servers.slice(Z+1)])}static freezeAll($){return $.map((Z)=>Object.freeze({hostname:Z.hostname,port:Z.port,listen:Z.listen,src:Z.src,tlsName:Z.tlsName,reconnects:Z.reconnects,lastConnect:Z.lastConnect,gossiped:Z.gossiped,didConnect:Z.didConnect}))}find($){return this.servers.find((Z)=>Z.listen===$.listen)}setCurrent($){this.currentServer=$}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update($,Z){let Q=[],X=[],Y=(0,D11.getUrlParseFn)(),J=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new Xl(K,!0);J.set(K,W)});let G=[];if(this.servers.forEach((K,W)=>{let H=K.listen;if(K.gossiped&&this.currentServer.listen!==H&&J.get(H)===void 0)G.push(W);J.delete(H)}),G.reverse(),G.forEach((K)=>{let W=this.servers.splice(K,1);X=X.concat(W[0].listen)}),J.forEach((K,W)=>{this.servers.push(K),Q.push(W)}),this.randomize&&Q.length>0){let K=this.currentServer,W=this.servers.filter((H)=>H!==K);(0,w11.shuffle)(W),this.servers=K?[K,...W]:W}return{added:Q,deleted:X}}}a7$.Servers=K30});var W30=b((ZQ$)=>{Object.defineProperty(ZQ$,"__esModule",{value:!0});ZQ$.QueuedIteratorImpl=void 0;var T11=yW(),e7$=MG();class $Q${inflight;processed;received;noIterator;iterClosed;done;signal;yields;filtered;pendingFiltered;ctx;_data;err;time;profile;yielding;didBreak;constructor(){this.inflight=0,this.filtered=0,this.pendingFiltered=0,this.processed=0,this.received=0,this.noIterator=!1,this.done=!1,this.signal=(0,T11.deferred)(),this.yields=[],this.iterClosed=(0,T11.deferred)(),this.time=0,this.yielding=!1,this.didBreak=!1,this.profile=!1}[Symbol.asyncIterator](){return this.iterate()}push($){if(this.done)return;if(this.didBreak){if(typeof $==="function"){let Z=$;try{Z()}catch(Q){}}return}if(typeof $==="function")this.pendingFiltered++;this.yields.push($),this.signal.resolve()}async*iterate(){if(this.noIterator)throw new e7$.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new e7$.InvalidOperationError("iterator is already yielding");this.yielding=!0;try{while(!0){if(this.yields.length===0)await this.signal;if(this.err)throw this.err;let $=this.yields;this.inflight=$.length,this.yields=[];for(let Z=0;Z<$.length;Z++){if(typeof $[Z]==="function"){this.pendingFiltered--;let X=$[Z];try{X()}catch(Y){throw Y}if(this.err)throw this.err;continue}this.processed++,this.inflight--;let Q=this.profile?Date.now():0;yield $[Z],this.time=this.profile?Date.now()-Q:0}if(this.done)break;else if(this.yields.length===0)$.length=0,this.yields=$,this.signal=(0,T11.deferred)()}}finally{this.didBreak=!0,this.stop()}}stop($){if(this.done)return;this.err=$,this.done=!0,this.signal.resolve(),this.iterClosed.resolve($)}getProcessed(){return this.noIterator?this.received:this.processed}getPending(){return this.yields.length+this.inflight-this.pendingFiltered}getReceived(){return this.received-this.filtered}}ZQ$.QueuedIteratorImpl=$Q$});var A11=b((JQ$)=>{Object.defineProperty(JQ$,"__esModule",{value:!0});JQ$.MuxSubscription=void 0;var tW4=mD(),XQ$=MG();class YQ${baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,tW4.createInbox)($)}.`,this.baseInbox}add($){if(!isNaN($.received))$.received=0;this.reqs.set($.token,$)}get($){return this.reqs.get($)}cancel($){this.reqs.delete($.token)}getToken($){let Z=$.subject||"";if(Z.indexOf(this.baseInbox)===0)return Z.substring(this.baseInbox.length);return null}all(){return Array.from(this.reqs.values())}handleError($,Z){if($)return this.all().forEach((Q)=>{Q.resolver(Z,{})}),!0;if(Z.operation==="publish"){let Q=this.all().find((X)=>{return X.requestSubject===Z.subject});if(Q)return Q.resolver(Z,{}),!0}return!1}dispatcher(){return($,Z)=>{let Q=this.getToken(Z);if(Q){let X=this.get(Q);if(X){if($===null)$=Z?.data?.length===0&&Z.headers?.code===503?new XQ$.NoRespondersError(X.requestSubject):null;X.resolver($,Z)}}}}close(){let $=new XQ$.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}JQ$.MuxSubscription=YQ$});var R11=b((WQ$)=>{Object.defineProperty(WQ$,"__esModule",{value:!0});WQ$.Heartbeat=void 0;var oW4=yW();class KQ${ph;interval;maxOut;timer;pendings;constructor($,Z,Q){this.ph=$,this.interval=Z,this.maxOut=Q,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel($){if(this.timer)clearTimeout(this.timer),this.timer=void 0;if(this._reset(),$)this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:"ping",pendingPings:this.pendings.length+1}),this.pendings.length===this.maxOut){this.cancel(!0);return}let $=(0,oW4.deferred)();this.ph.flush($).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push($),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(($)=>{return $.resolve(),!1})}}WQ$.Heartbeat=KQ$});var I11=b((BQ$)=>{Object.defineProperty(BQ$,"__esModule",{value:!0});BQ$.DenoBuffer=BQ$.MAX_SIZE=BQ$.AssertionError=void 0;BQ$.assert=UQ$;BQ$.concat=NQ$;BQ$.append=aW4;BQ$.readAll=sW4;BQ$.writeAll=eW4;var rW4=qG();class q11 extends Error{constructor($){super($);this.name="AssertionError"}}BQ$.AssertionError=q11;function UQ$($,Z="Assertion failed."){if(!$)throw new q11(Z)}var FQ$=32768;BQ$.MAX_SIZE=4294967294;function H30($,Z,Q=0){let X=Z.byteLength-Q;if($.byteLength>X)$=$.subarray(0,X);return Z.set($,Q),$.byteLength}function NQ$($,Z){if($===void 0&&Z===void 0)return new Uint8Array(0);if($===void 0)return Z;if(Z===void 0)return $;let Q=new Uint8Array($.length+Z.length);return Q.set($,0),Q.set(Z,$.length),Q}function aW4($,Z){return NQ$($,Uint8Array.of(Z))}class M11{_buf;_off;constructor($){if(this._off=0,$==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array($)}bytes($={copy:!0}){if($.copy===!1)return this._buf.subarray(this._off);return this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate($){if($===0){this.reset();return}if($<0||$>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+$)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice($){let Z=this._buf.byteLength;if($<=this.capacity-Z)return this._reslice(Z+$),Z;return-1}_reslice($){UQ$($<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,$)}readByte(){let $=new Uint8Array(1);if(this.read($))return $[0];return null}read($){if(this.empty()){if(this.reset(),$.byteLength===0)return 0;return null}let Z=H30(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(rW4.TE.encode($))}write($){let Z=this._grow($.byteLength);return H30($,this._buf,Z)}_grow($){let Z=this.length;if(Z===0&&this._off!==0)this.reset();let Q=this._tryGrowByReslice($);if(Q>=0)return Q;let X=this.capacity;if($<=Math.floor(X/2)-Z)H30(this._buf.subarray(this._off),this._buf);else if(X+$>BQ$.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*X+$,BQ$.MAX_SIZE));H30(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,BQ$.MAX_SIZE)),Z}grow($){if($<0)throw Error("Buffer._grow: negative count");let Z=this._grow($);this._reslice(Z)}readFrom($){let Z=0,Q=new Uint8Array(FQ$);while(!0){let X=this.capacity-this.length<FQ$,Y=X?Q:new Uint8Array(this._buf.buffer,this.length),J=$.read(Y);if(J===null)return Z;if(X)this.write(Y.subarray(0,J));else this._reslice(this.length+J);Z+=J}}}BQ$.DenoBuffer=M11;function sW4($){let Z=new M11;return Z.readFrom($),Z.bytes()}function eW4($,Z){let Q=0;while(Q<Z.length)Q+=$.write(Z.subarray(Q))}});var S11=b((jQ$)=>{Object.defineProperty(jQ$,"__esModule",{value:!0});jQ$.cc=jQ$.State=jQ$.Parser=jQ$.Kind=void 0;jQ$.describe=GH4;var V11=I11(),k11=qG();jQ$.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function GH4($){let Z,Q="";switch($.kind){case jQ$.Kind.MSG:Z="MSG";break;case jQ$.Kind.OK:Z="OK";break;case jQ$.Kind.ERR:Z="ERR",Q=k11.TD.decode($.data);break;case jQ$.Kind.PING:Z="PING";break;case jQ$.Kind.PONG:Z="PONG";break;case jQ$.Kind.INFO:Z="INFO",Q=k11.TD.decode($.data)}return`${Z}: ${Q}`}function OQ$(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var DQ$=48,KH4=57,Yl=67108864;class wQ${dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=jQ$.State.OP_START,this.as=0,this.drop=0,this.hdr=0}parse($){let Z;for(Z=0;Z<$.length;Z++){let Q=$[Z];switch(this.state){case jQ$.State.OP_START:switch(Q){case jQ$.cc.M:case jQ$.cc.m:this.state=jQ$.State.OP_M,this.hdr=-1,this.ma=OQ$();break;case jQ$.cc.H:case jQ$.cc.h:this.state=jQ$.State.OP_H,this.hdr=0,this.ma=OQ$();break;case jQ$.cc.P:case jQ$.cc.p:this.state=jQ$.State.OP_P;break;case jQ$.cc.PLUS:this.state=jQ$.State.OP_PLUS;break;case jQ$.cc.MINUS:this.state=jQ$.State.OP_MINUS;break;case jQ$.cc.I:case jQ$.cc.i:this.state=jQ$.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_H:switch(Q){case jQ$.cc.M:case jQ$.cc.m:this.state=jQ$.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_M:switch(Q){case jQ$.cc.S:case jQ$.cc.s:this.state=jQ$.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_MS:switch(Q){case jQ$.cc.G:case jQ$.cc.g:this.state=jQ$.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_MSG:switch(Q){case jQ$.cc.SPACE:case jQ$.cc.TAB:this.state=jQ$.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_MSG_SPC:switch(Q){case jQ$.cc.SPACE:case jQ$.cc.TAB:continue;default:this.state=jQ$.State.MSG_ARG,this.as=Z}break;case jQ$.State.MSG_ARG:switch(Q){case jQ$.cc.CR:this.drop=1;break;case jQ$.cc.NL:{let X=this.argBuf?this.argBuf.bytes():$.subarray(this.as,Z-this.drop);this.processMsgArgs(X),this.drop=0,this.as=Z+1,this.state=jQ$.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;case jQ$.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let X=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:jQ$.Kind.MSG,msg:this.ma,data:X}),this.argBuf=void 0,this.msgBuf=void 0,this.state=jQ$.State.MSG_END}else{let X=this.ma.size-this.msgBuf.length,Y=$.length-Z;if(Y<X)X=Y;if(X>0)this.msgBuf.write($.subarray(Z,Z+X)),Z=Z+X-1;else this.msgBuf.writeByte(Q)}else if(Z-this.as>=this.ma.size)this.dispatcher.push({kind:jQ$.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=jQ$.State.MSG_END;break;case jQ$.State.MSG_END:switch(Q){case jQ$.cc.NL:this.drop=0,this.as=Z+1,this.state=jQ$.State.OP_START;break;default:continue}break;case jQ$.State.OP_PLUS:switch(Q){case jQ$.cc.O:case jQ$.cc.o:this.state=jQ$.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_PLUS_O:switch(Q){case jQ$.cc.K:case jQ$.cc.k:this.state=jQ$.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_PLUS_OK:switch(Q){case jQ$.cc.NL:this.dispatcher.push({kind:jQ$.Kind.OK}),this.drop=0,this.state=jQ$.State.OP_START;break}break;case jQ$.State.OP_MINUS:switch(Q){case jQ$.cc.E:case jQ$.cc.e:this.state=jQ$.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_MINUS_E:switch(Q){case jQ$.cc.R:case jQ$.cc.r:this.state=jQ$.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_MINUS_ER:switch(Q){case jQ$.cc.R:case jQ$.cc.r:this.state=jQ$.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_MINUS_ERR:switch(Q){case jQ$.cc.SPACE:case jQ$.cc.TAB:this.state=jQ$.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_MINUS_ERR_SPC:switch(Q){case jQ$.cc.SPACE:case jQ$.cc.TAB:continue;default:this.state=jQ$.State.MINUS_ERR_ARG,this.as=Z}break;case jQ$.State.MINUS_ERR_ARG:switch(Q){case jQ$.cc.CR:this.drop=1;break;case jQ$.cc.NL:{let X;if(this.argBuf)X=this.argBuf.bytes(),this.argBuf=void 0;else X=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:jQ$.Kind.ERR,data:X}),this.drop=0,this.as=Z+1,this.state=jQ$.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(Q))}break;case jQ$.State.OP_P:switch(Q){case jQ$.cc.I:case jQ$.cc.i:this.state=jQ$.State.OP_PI;break;case jQ$.cc.O:case jQ$.cc.o:this.state=jQ$.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_PO:switch(Q){case jQ$.cc.N:case jQ$.cc.n:this.state=jQ$.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_PON:switch(Q){case jQ$.cc.G:case jQ$.cc.g:this.state=jQ$.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_PONG:switch(Q){case jQ$.cc.NL:this.dispatcher.push({kind:jQ$.Kind.PONG}),this.drop=0,this.state=jQ$.State.OP_START;break}break;case jQ$.State.OP_PI:switch(Q){case jQ$.cc.N:case jQ$.cc.n:this.state=jQ$.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_PIN:switch(Q){case jQ$.cc.G:case jQ$.cc.g:this.state=jQ$.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_PING:switch(Q){case jQ$.cc.NL:this.dispatcher.push({kind:jQ$.Kind.PING}),this.drop=0,this.state=jQ$.State.OP_START;break}break;case jQ$.State.OP_I:switch(Q){case jQ$.cc.N:case jQ$.cc.n:this.state=jQ$.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_IN:switch(Q){case jQ$.cc.F:case jQ$.cc.f:this.state=jQ$.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_INF:switch(Q){case jQ$.cc.O:case jQ$.cc.o:this.state=jQ$.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_INFO:switch(Q){case jQ$.cc.SPACE:case jQ$.cc.TAB:this.state=jQ$.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case jQ$.State.OP_INFO_SPC:switch(Q){case jQ$.cc.SPACE:case jQ$.cc.TAB:continue;default:this.state=jQ$.State.INFO_ARG,this.as=Z}break;case jQ$.State.INFO_ARG:switch(Q){case jQ$.cc.CR:this.drop=1;break;case jQ$.cc.NL:{let X;if(this.argBuf)X=this.argBuf.bytes(),this.argBuf=void 0;else X=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:jQ$.Kind.INFO,data:X}),this.drop=0,this.as=Z+1,this.state=jQ$.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;default:throw this.fail($.subarray(Z))}}if((this.state===jQ$.State.MSG_ARG||this.state===jQ$.State.MINUS_ERR_ARG||this.state===jQ$.State.INFO_ARG)&&!this.argBuf)this.argBuf=new V11.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===jQ$.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new V11.DenoBuffer($.subarray(this.as))}}cloneMsgArg(){let $=this.ma.subject.length,Z=this.ma.reply?this.ma.reply.length:0,Q=new Uint8Array($+Z);if(Q.set(this.ma.subject),this.ma.reply)Q.set(this.ma.reply,$);if(this.argBuf=new V11.DenoBuffer(Q),this.ma.subject=Q.subarray(0,$),this.ma.reply)this.ma.reply=Q.subarray($)}processMsgArgs($){if(this.hdr>=0)return this.processHeaderMsgArgs($);let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case jQ$.cc.SPACE:case jQ$.cc.TAB:case jQ$.cc.CR:case jQ$.cc.NL:if(Q>=0)Z.push($.subarray(Q,X)),Q=-1;break;default:if(Q<0)Q=X}if(Q>=0)Z.push($.subarray(Q));switch(Z.length){case 3:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(Z[2],Yl);break;case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.size=this.protoParseInt(Z[3],Yl);break;default:throw this.fail($,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail($,"processMsgArgs Bad or Missing Size Error")}fail($,Z=""){if(!Z)Z=`parse error [${this.state}]`;else Z=`${Z} [${this.state}]`;return Error(`${Z}: ${k11.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case jQ$.cc.SPACE:case jQ$.cc.TAB:case jQ$.cc.CR:case jQ$.cc.NL:if(Q>=0)Z.push($.subarray(Q,X)),Q=-1;break;default:if(Q<0)Q=X}if(Q>=0)Z.push($.subarray(Q));switch(Z.length){case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(Z[2],Yl),this.ma.size=this.protoParseInt(Z[3],Yl);break;case 5:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.hdr=this.protoParseInt(Z[3],Yl),this.ma.size=this.protoParseInt(Z[4],Yl);break;default:throw this.fail($,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail($,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt($,Z){if($.length===0||$.length>15)return-1;let Q=0;for(let X=0;X<$.length;X++){if($[X]<DQ$||$[X]>KH4)return-1;Q=Q*10+($[X]-DQ$)}return Z!==void 0&&Q>Z?-1:Q}}jQ$.Parser=wQ$;jQ$.State={OP_START:0,OP_PLUS:1,OP_PLUS_O:2,OP_PLUS_OK:3,OP_MINUS:4,OP_MINUS_E:5,OP_MINUS_ER:6,OP_MINUS_ERR:7,OP_MINUS_ERR_SPC:8,MINUS_ERR_ARG:9,OP_M:10,OP_MS:11,OP_MSG:12,OP_MSG_SPC:13,MSG_ARG:14,MSG_PAYLOAD:15,MSG_END:16,OP_H:17,OP_P:18,OP_PI:19,OP_PIN:20,OP_PING:21,OP_PO:22,OP_PON:23,OP_PONG:24,OP_I:25,OP_IN:26,OP_INF:27,OP_INFO:28,OP_INFO_SPC:29,INFO_ARG:30};jQ$.cc={CR:13,E:69,e:101,F:70,f:102,G:71,g:103,H:72,h:104,I:73,i:105,K:75,k:107,M:77,m:109,MINUS:45,N:78,n:110,NL:10,O:79,o:111,P:80,p:112,PLUS:43,R:82,r:114,S:83,s:115,SPACE:32,TAB:9}});var N30=b((zQ$)=>{Object.defineProperty(zQ$,"__esModule",{value:!0});zQ$.MsgHdrsImpl=void 0;zQ$.canonicalMIMEHeaderKey=_11;zQ$.headers=FH4;var EQ$=qG(),gW=mD(),U30=MG();function _11($){let F=!0,U=Array($.length);for(let N=0;N<$.length;N++){let B=$.charCodeAt(N);if(B===58||B<33||B>126)throw U30.InvalidArgumentError.format("header",`'${$[N]}' is not a valid character in a header name`);if(F&&97<=B&&B<=122)B-=32;else if(!F&&65<=B&&B<=90)B+=32;U[N]=B,F=B==45}return String.fromCharCode(...U)}function FH4($=0,Z=""){if($===0&&Z!=="")throw U30.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw U30.InvalidArgumentError.format("description","is required");return new Jl($,Z)}var C11="NATS/1.0";class Jl{_code;headers;_description;constructor($=0,Z=""){this._code=$,this._description=Z,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals($){if($&&this.headers.size===$.headers.size&&this._code===$._code){for(let[Z,Q]of this.headers){let X=$.values(Z);if(Q.length!==X.length)return!1;let Y=[...Q].sort(),J=[...X].sort();for(let G=0;G<Y.length;G++)if(Y[G]!==J[G])return!1}return!0}return!1}static decode($){let Z=new Jl,X=EQ$.TD.decode($).split(`\r
|
|
2096
2096
|
`),Y=X[0];if(Y!==C11){let J=Y.replace(C11,"").trim();if(J.length>0){if(Z._code=parseInt(J,10),isNaN(Z._code))Z._code=0;let G=Z._code.toString();J=J.replace(G,""),Z._description=J.trim()}}if(X.length>=1)X.slice(1).map((J)=>{if(J){let G=J.indexOf(":");if(G>-1){let K=J.slice(0,G),W=J.slice(G+1).trim();Z.append(K,W)}}});return Z}toString(){if(this.headers.size===0&&this._code===0)return"";let $=C11;if(this._code>0&&this._description!=="")$+=` ${this._code} ${this._description}`;for(let[Z,Q]of this.headers)for(let X=0;X<Q.length;X++)$=`${$}\r
|
|
2097
2097
|
${Z}: ${Q[X]}`;return`${$}\r
|