decocms 4.188.5 → 4.189.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DTKO0fxY.js → AlertCircle-BJkAcjZk.js} +1 -1
- package/dist/client/assets/{AreaChart-wbKoQUw_.js → AreaChart-C5KMDUzq.js} +1 -1
- package/dist/client/assets/{ArrowUp-Boka4Tzi.js → ArrowUp-TAy6Pw6B.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-z-FcGgjQ.js → ArrowUpRight-CVUs8Jzp.js} +1 -1
- package/dist/client/assets/{Check-D34OWTI3.js → Check-BMP2TXTP.js} +1 -1
- package/dist/client/assets/{CheckCircle-DCZdSl2c.js → CheckCircle-J6d3UGd8.js} +1 -1
- package/dist/client/assets/{ChevronDown-vcYIF9B5.js → ChevronDown-BP72yxvq.js} +1 -1
- package/dist/client/assets/{ChevronRight-Cfn1NaKS.js → ChevronRight-Cl-zR7xl.js} +1 -1
- package/dist/client/assets/{ChevronUp-CynhgywE.js → ChevronUp-B-hunEZM.js} +1 -1
- package/dist/client/assets/{Copy01-DmlgnwiN.js → Copy01-BGNmyuOb.js} +1 -1
- package/dist/client/assets/{CpuChip01-BQH0wP7b.js → CpuChip01-t47WT380.js} +1 -1
- package/dist/client/assets/{CreditCard01-ChvsJfU7.js → CreditCard01-CwzzuXay.js} +1 -1
- package/dist/client/assets/{DotsVertical-DkMbXumW.js → DotsVertical-CsnIoItd.js} +1 -1
- package/dist/client/assets/{Eye-Dr8yIpQp.js → Eye-zy0e0zUy.js} +1 -1
- package/dist/client/assets/{FilterLines-DZuRitf-.js → FilterLines-BX7Qd2-l.js} +1 -1
- package/dist/client/assets/{HardDrive-BOShuiPO.js → HardDrive-3f8ktQqU.js} +1 -1
- package/dist/client/assets/{Key01-MKHE2VdA.js → Key01-Q-zXV7jS.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BBWnWN7s.js → LayoutLeft-CCJXua8Z.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DfI4YwcV.js → LinkExternal01-CTjPCIpm.js} +1 -1
- package/dist/client/assets/{LogOut01-DuL79DhJ.js → LogOut01-6aBdI4bl.js} +1 -1
- package/dist/client/assets/{Monitor01-KBp53vdx.js → Monitor01-CrSACrxT.js} +1 -1
- package/dist/client/assets/{Palette-CKxmPyCw.js → Palette-C0_JNMCQ.js} +1 -1
- package/dist/client/assets/{Play-DtRAtZT2.js → Play-DXnVw_pM.js} +1 -1
- package/dist/client/assets/{Plus-CcVqBqAF.js → Plus-w0KHdVJE.js} +1 -1
- package/dist/client/assets/{SearchLg-d0EqbCZI.js → SearchLg-CSwPGjWb.js} +1 -1
- package/dist/client/assets/{SearchMd-BZjrDifE.js → SearchMd-CxuWZqBR.js} +1 -1
- package/dist/client/assets/{Settings02-h_w2rIG6.js → Settings02-DtP9w10r.js} +1 -1
- package/dist/client/assets/{Shield01-DbjwP8bA.js → Shield01-CJchwz0c.js} +1 -1
- package/dist/client/assets/{Star01-cNZ3qjTz.js → Star01-Qoshehkn.js} +1 -1
- package/dist/client/assets/{Stars01-BMj_Faar.js → Stars01-D5FFhB79.js} +1 -1
- package/dist/client/assets/{Stars02-Wkr8WBnF.js → Stars02-DgPenwX_.js} +1 -1
- package/dist/client/assets/{Sun-NZJxWMRG.js → Sun-B_tIuOLw.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B9rY5Vb1.js → SwitchHorizontal01-BLhnXSrb.js} +1 -1
- package/dist/client/assets/{Tool01-ILCvklNZ.js → Tool01-COxyHpA4.js} +1 -1
- package/dist/client/assets/{Tool02-DYGpjhrH.js → Tool02-CTupgdOX.js} +1 -1
- package/dist/client/assets/{Trash01-BtjHULQT.js → Trash01-DX2_uDtl.js} +1 -1
- package/dist/client/assets/{TrendUp01-_edxNv9C.js → TrendUp01-C0N055tr.js} +1 -1
- package/dist/client/assets/{Upload01-bDCsrb7w.js → Upload01-Ci-2NL8D.js} +1 -1
- package/dist/client/assets/{User01-CkRqLUa2.js → User01-D4wgq0xk.js} +1 -1
- package/dist/client/assets/{Users01-DzlT4aqs.js → Users01-BYasvUd6.js} +1 -1
- package/dist/client/assets/{Users03-Dje1C1A4.js → Users03-C7E0y9nR.js} +1 -1
- package/dist/client/assets/{X-DmxBcD8m.js → X-DRVQLN-3.js} +1 -1
- package/dist/client/assets/{XCircle-hi5x2AWU.js → XCircle-DmD_hptm.js} +1 -1
- package/dist/client/assets/{XClose-IKesSxi0.js → XClose-C3b3Hz-3.js} +1 -1
- package/dist/client/assets/{Zap-B_KhmoVt.js → Zap-DNkuyJY7.js} +1 -1
- package/dist/client/assets/{ZapSquare-C3J2z8QA.js → ZapSquare-sJVRkOKE.js} +1 -1
- package/dist/client/assets/{access-gate-BBnr3IA0.js → access-gate-CNlmwp0e.js} +1 -1
- package/dist/client/assets/{add-section-modal-5Dt1tLoX.js → add-section-modal-CbMmA2B8.js} +1 -1
- package/dist/client/assets/{agent-icon-Bk0cCGQW.js → agent-icon-S21wqPVg.js} +1 -1
- package/dist/client/assets/{agents-list-JRpohWxx.js → agents-list-BjqbJgb9.js} +1 -1
- package/dist/client/assets/{ai-providers-RRmFJGif.js → ai-providers-BK4q2uvt.js} +1 -1
- package/dist/client/assets/{alert-DPKdLkHt.js → alert-849zBCGG.js} +1 -1
- package/dist/client/assets/{alert-dialog-bFLz33rf.js → alert-dialog-CFbaEm4j.js} +1 -1
- package/dist/client/assets/{app-editor-BCrcKKpA.js → app-editor-CGR_BAv7.js} +1 -1
- package/dist/client/assets/{auth-Bg1RC8W4.js → auth-D5FtFruv.js} +1 -1
- package/dist/client/assets/{auth-catchall-9jhTDFPY.js → auth-catchall-BlXVwLQn.js} +1 -1
- package/dist/client/assets/{auth-entry-CkixlzPP.js → auth-entry-CRW4UlEC.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CpZzeOnS.js → auth-split-layout-C0iPsxSc.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BueXwKlu.js → authenticate-and-persist-oauth-CKlgp-3K.js} +1 -1
- package/dist/client/assets/{automation-list-row-VBr7bhAz.js → automation-list-row-D2ErFej8.js} +1 -1
- package/dist/client/assets/{automation-runs-C8R_zk6K.js → automation-runs-DmWuG7Fl.js} +1 -1
- package/dist/client/assets/{automations-DCMOXN14.js → automations-DbbMz-FY.js} +1 -1
- package/dist/client/assets/{avatar-BfWCVaRF.js → avatar-CNgJoq37.js} +1 -1
- package/dist/client/assets/{badge-GzyVSlLG.js → badge-D867kkzT.js} +1 -1
- package/dist/client/assets/{billing-m4XUHXnX.js → billing-BarQWrNI.js} +1 -1
- package/dist/client/assets/{block-document-frsN0sNV.js → block-document-Ny3t9PwL.js} +1 -1
- package/dist/client/assets/{brand-context-BR9j3pD3.js → brand-context-RZBK7H5X.js} +1 -1
- package/dist/client/assets/{buckets-DONeQVu9.js → buckets-Q6ph5yFH.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DtHwpLKT.js → bulk-category-panel-BycffrMD.js} +1 -1
- package/dist/client/assets/{capability-load-error-CNpAuoK-.js → capability-load-error-dMskrpnJ.js} +1 -1
- package/dist/client/assets/{card-u4IrhOY5.js → card-BWoRWXYA.js} +1 -1
- package/dist/client/assets/{category-editor-Bk1fUD_7.js → category-editor-DkPObkw2.js} +1 -1
- package/dist/client/assets/{chat-context-CZaJUgI6.js → chat-context-xRFBYBsj.js} +1 -1
- package/dist/client/assets/{checkbox-CWxA4jGT.js → checkbox-CFrbhKj7.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CvtvPIDZ.js → cli-auth-success-BXsdf6yU.js} +1 -1
- package/dist/client/assets/{collection-detail-CO7LLRbv.js → collection-detail-DL3JcHB5.js} +1 -1
- package/dist/client/assets/{collection-display-button-Ch26B17d.js → collection-display-button-sDvqZ-L0.js} +1 -1
- package/dist/client/assets/{collection-search-wrvLm9fY.js → collection-search-RCfjoWxK.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B98aRM1R.js → collection-table-wrapper-BqOHzKul.js} +1 -1
- package/dist/client/assets/{collection-tabs-BQ3TrjIW.js → collection-tabs-CIkICMRY.js} +1 -1
- package/dist/client/assets/{command-CfYPyiXr.js → command-BzOoUKaY.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DjH-ei0T.js → commerce-onboarding-DYERNzFG.js} +1 -1
- package/dist/client/assets/{connect-yLiDBloI.js → connect-BRgxHLV6.js} +1 -1
- package/dist/client/assets/{connection-CxtwXexx.js → connection--SQGpm-f.js} +1 -1
- package/dist/client/assets/{connection-card-99vtJLRT.js → connection-card-BAN12tjG.js} +1 -1
- package/dist/client/assets/{connection-detail-E-6EN1rD.js → connection-detail-LjIYRQ4K.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DH69ZptO.js → connection-form-helpers-B5pmbgOd.js} +1 -1
- package/dist/client/assets/{connections-9p28uCbp.js → connections-BILzaEe-.js} +1 -1
- package/dist/client/assets/decopilot-sse-pool-Cy4OaySe.js +1 -0
- package/dist/client/assets/{dialog-DKnDzSML.js → dialog-CPXAH9qT.js} +1 -1
- package/dist/client/assets/{domain-settings-BisWYoiN.js → domain-settings-CyBhTYpd.js} +1 -1
- package/dist/client/assets/{drawer-0c1aGBpG.js → drawer-DO09OqCx.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Ctx0gkkp.js → dropdown-menu-gjMFA3Ca.js} +1 -1
- package/dist/client/assets/{empty-state-BkDULvhL.js → empty-state-CXXW7e48.js} +1 -1
- package/dist/client/assets/{extract-connection-data-stnug2K7.js → extract-connection-data-C0bZSkh3.js} +1 -1
- package/dist/client/assets/{file-explorer-Ds2MFBHc.js → file-explorer-BTCVQepz.js} +1 -1
- package/dist/client/assets/{form-ewcClDLb.js → form-ByUzybR4.js} +1 -1
- package/dist/client/assets/{general-BgMtoe1o.js → general-gu7I_OBT.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BmcylTbJ.js → github-repo-picker-7vkBu5G3.js} +1 -1
- package/dist/client/assets/{hooks-CqoiEmOG.js → hooks-CrDdCejm.js} +1 -1
- package/dist/client/assets/index-BZ6FY5YW.css +1 -0
- package/dist/client/assets/{index-Ds0RoHlz.js → index-BbaTV-qv.js} +3 -3
- package/dist/client/assets/{index-DCv4R3F8.js → index-C14-rwxn.js} +1 -1
- package/dist/client/assets/{index-D4-EMkZk.js → index-CZGHQAiJ.js} +1 -1
- package/dist/client/assets/{index-BiCWPTND.js → index-CbBvRTNM.js} +1 -1
- package/dist/client/assets/{index-BYiTYhL3.js → index-CpJgq79V.js} +1 -1
- package/dist/client/assets/{index-oDooZ98r.js → index-CqmsaDYB.js} +1 -1
- package/dist/client/assets/{index-CnX10vFs.js → index-D8N6H2DW.js} +1 -1
- package/dist/client/assets/{index-Cg7e0lYW.js → index-DAsgwI7y.js} +1 -1
- package/dist/client/assets/{index-BlHqBe47.js → index-DBM_Hc7p.js} +1 -1
- package/dist/client/assets/{index-DpBqVMq_.js → index-DoSXdycu.js} +51 -51
- package/dist/client/assets/{index-D64Vha13.js → index-JOwNTK-7.js} +1 -1
- package/dist/client/assets/{index-redirect-0TpJZrNY.js → index-redirect-B8d08y7L.js} +1 -1
- package/dist/client/assets/{input-YOrymPd1.js → input-UKpuvJ_H.js} +1 -1
- package/dist/client/assets/{integration-icon-C8o1CXxB.js → integration-icon-PdglKRxp.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-D3jpApJD.js → invite-member-dialog-evOxzWkt.js} +1 -1
- package/dist/client/assets/{label-CMHGDbk3.js → label-BHaIqjfL.js} +1 -1
- package/dist/client/assets/{layout-W9Bv20cW.js → layout-D2u0mvmX.js} +1 -1
- package/dist/client/assets/{login-Dvd1PAsu.js → login-CzVJPVRs.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BUcs5tTA.js → mcp-oauth-DRzZndfl.js} +1 -1
- package/dist/client/assets/{members-3xYus1Hq.js → members-DYSX0tSd.js} +1 -1
- package/dist/client/assets/{monaco-editor-MG2CkLBk.js → monaco-editor-DutyPG1-.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DCjO1DDT.js → monitoring-stats-row-BR6mTRjS.js} +1 -1
- package/dist/client/assets/{multi-select-CyRxVRHH.js → multi-select-anBHw7L7.js} +1 -1
- package/dist/client/assets/{oauth-callback-CNwQ7bws.js → oauth-callback-DH-YQQzI.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-4BxpN2x3.js → oauth-callback-ai-provider-BmLMlveU.js} +1 -1
- package/dist/client/assets/{onboarding-xo1Z1unV.js → onboarding-CFTOL5Ji.js} +1 -1
- package/dist/client/assets/{org-layout-CxnFvn2j.js → org-layout-4Q2quO4t.js} +1 -1
- package/dist/client/assets/{organization-choice-BtcEBUMV.js → organization-choice-Du9s5fmQ.js} +1 -1
- package/dist/client/assets/{orgs-CX4AHVEv.js → orgs-CsQTUnWf.js} +1 -1
- package/dist/client/assets/{page-seo-form-C_hIQDFy.js → page-seo-form-BBxNuXct.js} +1 -1
- package/dist/client/assets/{popover-BuEqChEc.js → popover-DZFLSLyw.js} +1 -1
- package/dist/client/assets/{post-editor-DpJg76Q-.js → post-editor-KFzNqVUd.js} +1 -1
- package/dist/client/assets/{primitives-8ZOQsA3C.js → primitives-C-d8Xxpj.js} +1 -1
- package/dist/client/assets/{profile-BfAV_zXm.js → profile-ZQQXCQT_.js} +1 -1
- package/dist/client/assets/project-app-view-Dm_Arkz3.js +1 -0
- package/dist/client/assets/record-editor-ahINE2MZ.js +1 -0
- package/dist/client/assets/{redirect-editor-DcS68Rj2.js → redirect-editor-BYbbYDOq.js} +1 -1
- package/dist/client/assets/registry-ByTPmK9F.js +2 -0
- package/dist/client/assets/{registry-layout-BdId5wEQ.js → registry-layout-CQJLzR3p.js} +1 -1
- package/dist/client/assets/{reports-BSd_2m49.js → reports-kGfx86Wk.js} +1 -1
- package/dist/client/assets/{require-capability-QTYDeUmS.js → require-capability-CnHYYk1T.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CxamaN47.js → required-auth-layout-BTku3fbo.js} +1 -1
- package/dist/client/assets/{reset-password-CegmK6EX.js → reset-password-CnAu4kFr.js} +1 -1
- package/dist/client/assets/{roles-C3W4E8F_.js → roles-QoFwPVBs.js} +1 -1
- package/dist/client/assets/{search-input-y-wZmvQK.js → search-input-0_beG35F.js} +1 -1
- package/dist/client/assets/{secrets-BeTjv_Ao.js → secrets-_a8xOgi8.js} +1 -1
- package/dist/client/assets/{sections-editor-D3DxhcyF.js → sections-editor-DW0ZtoIS.js} +1 -1
- package/dist/client/assets/{select-C26ajfTn.js → select-Cn0YxfqI.js} +1 -1
- package/dist/client/assets/{select-model-DKHpXrG3.js → select-model-DNqri_v-.js} +1 -1
- package/dist/client/assets/{self-tool-result-DVquaXC6.js → self-tool-result-CuXx8hxX.js} +1 -1
- package/dist/client/assets/{seo-editor-Crk4x6Wk.js → seo-editor-CzD6ChND.js} +1 -1
- package/dist/client/assets/{settings-layout-BjOZ8FDg.js → settings-layout-BEKPVEf0.js} +1 -1
- package/dist/client/assets/{settings-section-D87wrt2h.js → settings-section-DJ0W4jOl.js} +1 -1
- package/dist/client/assets/{shell-controls-yAbxXaJb.js → shell-controls-BoYts3g4.js} +1 -1
- package/dist/client/assets/{shell-layout-LWeEXgSO.js → shell-layout-CRtx_BvE.js} +1 -1
- package/dist/client/assets/{sidebar-tSEuYhtc.js → sidebar-Dv4aGVq7.js} +1 -1
- package/dist/client/assets/{skeleton--xXTSSns.js → skeleton-ZmIVdghJ.js} +1 -1
- package/dist/client/assets/{spinner-DhX7uH7e.js → spinner-0MngAf86.js} +1 -1
- package/dist/client/assets/{sso-S3jsdG5V.js → sso-Cd5L5MyY.js} +1 -1
- package/dist/client/assets/{store-CwfMWg8A.js → store-BQlUDptr.js} +1 -1
- package/dist/client/assets/store-registry-mbEaZm6_.js +2 -0
- package/dist/client/assets/{studio-tools-mBhHVB7y.js → studio-tools-DWz2Qd3W.js} +1 -1
- package/dist/client/assets/{switch-Dlmb4oxz.js → switch-3Yw7NDRz.js} +1 -1
- package/dist/client/assets/{tab-id-Dmqzs-PO.js → tab-id-toQA5voA.js} +1 -1
- package/dist/client/assets/{table-C5e5DydF.js → table-Chvolxhr.js} +1 -1
- package/dist/client/assets/{tabs-C6ZE2PYO.js → tabs-BQacoHUZ.js} +1 -1
- package/dist/client/assets/{textarea-BxGY5rX7.js → textarea-uRlPkNzV.js} +1 -1
- package/dist/client/assets/{toggle-group-B84Y8KeL.js → toggle-group-Y1T_nLoF.js} +1 -1
- package/dist/client/assets/{toolbar-C9-ib0nO.js → toolbar-Croag9Z8.js} +1 -1
- package/dist/client/assets/{tooltip-B7XZSOt-.js → tooltip-Dhr2BlP1.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Cb-D9cX8.js → use-ai-providers-DBEa6alU.js} +1 -1
- package/dist/client/assets/{use-automations-fVlbSyzj.js → use-automations-ChHt6zQf.js} +1 -1
- package/dist/client/assets/{use-autosave-CcK0XCHk.js → use-autosave-B48NF3C4.js} +1 -1
- package/dist/client/assets/{use-capability-YeSGnynv.js → use-capability-CycBbgK6.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DLaQBW-5.js → use-clock-tick-DDKU_iB2.js} +1 -1
- package/dist/client/assets/{use-connection-BRNbvDgd.js → use-connection-Do3xyfsv.js} +1 -1
- package/dist/client/assets/{use-copy-Dct22xPR.js → use-copy-UeIChmoN.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-ChRd9thE.js → use-create-virtual-mcp-ctHKeBkc.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Bhsg2k2U.js → use-debounced-autosave-CZZ3bmF1.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BbrtkrNB.js → use-debounced-value-CZGI618j.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CVavsQQt.js → use-deco-credits-VcwS8P-8.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CtseQ4rn.js → use-decopilot-events-CgyhgR8o.js} +1 -1
- package/dist/client/assets/{use-delete-connection-ZaW6PQa2.js → use-delete-connection-jcbcdSyK.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-B0Fh23b5.js → use-deployment-admin-DZhSkMLb.js} +1 -1
- package/dist/client/assets/{use-file-configs-LMHtZ0D7.js → use-file-configs-DrE7Gk_R.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CAHr8zXC.js → use-infinite-scroll-dlsqIL2f.js} +1 -1
- package/dist/client/assets/{use-join-requests-BUALYwV9.js → use-join-requests-BZ-UaoOH.js} +1 -1
- package/dist/client/assets/use-mcp-client-T9DqHhMZ.js +10 -0
- package/dist/client/assets/{use-mcp-tools-CxZ1eD7C.js → use-mcp-tools-C3Wy4OQc.js} +1 -1
- package/dist/client/assets/{use-members-YMKljqPH.js → use-members-vgzpw7wB.js} +1 -1
- package/dist/client/assets/{use-mobile-BPxybI7H.js → use-mobile-BxTsTtRQ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-YLyP1lbs.js → use-navigate-to-agent-CePF-2m1.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-BNCOGFYv.js → use-open-billing-url-BHmFbSbM.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CN3ttpoo.js → use-org-auth-client-B6innZQK.js} +1 -1
- package/dist/client/assets/{use-org-sso-CPm1aVq8.js → use-org-sso-CjTRAq0M.js} +1 -1
- package/dist/client/assets/{use-organization-roles-mtXJcbHw.js → use-organization-roles-x-sHKCT6.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CPcmYeZE.js → use-organization-settings-BrjnwnuN.js} +1 -1
- package/dist/client/assets/{use-registry-connections-E03Uv0Lk.js → use-registry-connections-dhLar_rq.js} +1 -1
- package/dist/client/assets/{use-secrets-BOhkjRCu.js → use-secrets-DU5qyK_S.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DBJsA1z4.js → use-status-sounds-8m5Wm1Dc.js} +1 -1
- package/dist/client/assets/{use-tags-Dx74Ik9g.js → use-tags-WrfKiNw5.js} +1 -1
- package/dist/client/assets/{use-view-mode-Bf9f4qS-.js → use-view-mode-82FUpI1m.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C2hH4DwB.js → use-virtual-mcp-Dn7w6cR4.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DtaGoE4r.js +1 -0
- package/dist/client/assets/{useRouterState-CWjoUP92.js → useRouterState-BQ7WX4fz.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CmKXGl32.js +1 -0
- package/dist/client/assets/{users-Bwj2cY48.js → users-B-mBDIjm.js} +1 -1
- package/dist/client/assets/{variant-calendar-Dl5ZmyiF.js → variant-calendar-Bi6ARYy_.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-u5UYskBi.js → view-mode-toggle-DjStxcei.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +3 -6
- package/dist/server/server.js +3 -6
- package/package.json +1 -1
- package/dist/client/assets/decopilot-sse-pool-qyhyktlG.js +0 -1
- package/dist/client/assets/index-zjbRUOaH.css +0 -1
- package/dist/client/assets/project-app-view-DG0z28rB.js +0 -1
- package/dist/client/assets/record-editor-BkEc3RuD.js +0 -1
- package/dist/client/assets/registry-B4wpmrqk.js +0 -2
- package/dist/client/assets/store-registry-6jp7pNHB.js +0 -2
- package/dist/client/assets/use-mcp-client-BDUM9NbE.js +0 -10
- package/dist/client/assets/useInfiniteQuery-C26wUiJ-.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CzjjNvg1.js +0 -1
package/dist/server/cli.js
CHANGED
|
@@ -1292,7 +1292,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var yu1=O(()=>{zx()});f
|
|
|
1292
1292
|
`.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await pf`
|
|
1293
1293
|
DELETE FROM kysely_migration WHERE name = ${X}
|
|
1294
1294
|
`.execute($)}}async function om1($){await Ih6($),await qh6($);let Z=new pm1({db:$,provider:{getMigrations:()=>Promise.resolve(wl0)}}),{error:X,results:Q}=await Z.migrateToLatest(),Y=0;if(Q?.forEach((G)=>{if(G.status==="Success")Y++;else if(G.status==="Error")console.error(`Failed to execute migration "${G.migrationName}"`)}),X)throw console.error("Failed to migrate"),console.error(X),X;return Y}async function Mh6($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await mg0();let G=X??H6(),J=async()=>{if(!Z&&!X)await Jw(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await om1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function kh6(){let $=H6(),Z=new pm1({db:$.db,provider:{getMigrations:()=>Promise.resolve(wl0)}}),{error:X,results:Q}=await Z.migrateDown();if(Q?.forEach((Y)=>{if(Y.status==="Success")console.log(`\u2705 Migration "${Y.migrationName}" rolled back successfully`);else if(Y.status==="Error")console.error(`\u274C Failed to rollback migration "${Y.migrationName}"`)}),X)throw console.error("Failed to rollback migration"),console.error(X),X}var am1=O(()=>{nm1();ig0();m7()});async function x50($){let Z={...process.env},X=V00($,Z);console.log(DU1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?Bl1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (n$0(),i$0)),{outputs:G,services:J}=await Y({home:X.settings.dataDir,externalDatabaseUrl:X.externalDatabaseUrl,externalNatsUrl:X.externalNatsUrl});if(!X.skipMigrations){let{migrateBetterAuth:W}=await Promise.resolve().then(() => (ig0(),Ll1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (m7(),_c1)),{migrateToLatest:N}=await Promise.resolve().then(() => (am1(),rm1)),U=H(G.databaseUrl);await N({keepOpen:!0,database:U,skipBetterAuth:!0})}let K={...X.settings,betterAuthSecret:Q,databaseUrl:G.databaseUrl,natsUrls:G.natsUrls,...G.s3?{s3Endpoint:G.s3.endpoint,s3Bucket:G.s3.bucket,s3AccessKeyId:G.s3.accessKeyId,s3SecretAccessKey:G.s3.secretAccessKey,s3ForcePathStyle:G.s3.forcePathStyle}:{},...G.natsTunnel?{natsPublicUrl:G.natsTunnel.publicUrl,natsAccountJwt:G.natsTunnel.accountJwt,natsAccountSigningKey:G.natsTunnel.accountSigningKey,natsOperatorJwt:G.natsTunnel.operatorJwt,natsTunnelPublicEnabled:!0,natsCredsPath:G.natsTunnel.credsPath}:{}};return gu1(K),{settings:K,services:J.map((W)=>({name:W.name==="PostgreSQL"?"Postgres":W.name,port:W.port})),managedServiceNames:J.filter((W)=>W.owner==="managed").map((W)=>W.name)}}var Bl0=O(()=>{zx();Ol1();y8()});var $i1={};w0($i1,{updateService:()=>gD,subscribeCliState:()=>Dl0,setTuiConsoleIntercepted:()=>f50,setServerUrl:()=>Em,setMigrationsDone:()=>Dm,setDevMode:()=>Ch6,resetCliStateForTests:()=>Vh6,isTuiConsoleIntercepted:()=>b50,getCliState:()=>Ll0,addLogEntry:()=>Uw});function sm1(){return{services:[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}],migrationsStatus:"pending",serverUrl:null,logs:[]}}function Vh6(){kQ=sm1()}function Sh6(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function Lm(){for(let $ of Ol0)$()}function Ll0(){return kQ}function Dl0($){return Ol0.add($),()=>Ol0.delete($)}function gD($){kQ={...kQ,services:kQ.services.map((Z)=>Z.name===$.name?$:Z)},Lm()}function Dm(){kQ={...kQ,migrationsStatus:"done"},Lm()}function Em($){kQ={...kQ,serverUrl:$},Lm()}function Uw($){let Z=[...kQ.logs,$];kQ={...kQ,logs:Z.length>500?Z.slice(-500):Z},Lm()}function Ch6(){kQ={...kQ,services:[...Sh6(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},Lm()}function f50($){em1=$}function b50(){return em1}var kQ,Ol0,em1=!1;var hD=O(()=>{kQ=sm1();Ol0=new Set});import{createServer as Zi1}from"net";function _h6($){return new Promise((Z)=>{let X=Zi1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function zm($){if(await _h6($))return $;let Z=await new Promise((X,Q)=>{let Y=Zi1();Y.once("error",Q),Y.listen(0,"0.0.0.0",()=>{let G=Y.address(),J=typeof G==="object"&&G?G.port:0;Y.close(()=>X(J))})});return console.warn(`Port ${$} is in use, using port ${Z} instead.`),Z}var El0=()=>{};function jm($){return $.replace(/\x1b\[[0-9;]*m/g,"")}var zl0={};w0(zl0,{startDevServer:()=>xh6});import{join as vh6}from"path";function Xi1($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
|
|
1295
|
-
`);Q=G.pop()??"";for(let J of G){let K=jm(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;Uw({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}if(Q.trim()){let G=jm(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)Uw({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function xh6($){let{baseUrl:Z,noTui:X}=$,Q=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=Q?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=Q?await zm(Number(Y)+1):await zm(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await x50({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)gD({name:L.name,status:"ready",port:L.port});Dm();let N=vh6(import.meta.dir,"..","..","..","..",".."),U=X===!0,F=Bun.spawn(["bun","run","dev:servers"],{cwd:N,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:G,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsPublicUrl&&K.natsAccountJwt&&K.natsAccountSigningKey?{NATS_PUBLIC_URL:K.natsPublicUrl,NATS_ACCOUNT_JWT:K.natsAccountJwt,NATS_ACCOUNT_SIGNING_KEY:K.natsAccountSigningKey,NATS_OPERATOR_JWT:K.natsOperatorJwt??"",NATS_TUNNEL_PUBLIC_ENABLED:"true",...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)Xi1(F.stdout),Xi1(F.stderr);Em(G),gD({name:"Vite",status:"ready",port:Number(Y)}),gD({name:"API",status:"ready",port:Number(K.port)});let B=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (n$0(),i$0));await D(K.dataDir)}};return process.on("SIGINT",()=>B("SIGINT")),process.on("SIGTERM",()=>B("SIGTERM")),{port:Number(Y),process:F}}var jl0=O(()=>{Bl0();hD();El0()});var y50;var Pl0=O(()=>{y50={name:"decocms",version:"4.188.5",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@nats-io/jwt":"0.0.10-5","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as bh6,Text as Qi1}from"ink";import{jsx as yh6,jsxs as Yi1}from"react/jsx-runtime";function Gi1({version:$}){return Yi1(bh6,{flexDirection:"column",marginTop:1,children:[w50.map((Z,X)=>yh6(Qi1,{color:B50[X],children:Z},X)),Yi1(Qi1,{dimColor:!0,children:[" v",$]})]})}var Ji1=O(()=>{Gm()});import{Box as uD,Text as Fw}from"ink";import{Spinner as gh6}from"@inkjs/ui";import{jsx as fY,jsxs as tf}from"react/jsx-runtime";function Ki1({status:$}){if($==="pending")return fY(gh6,{label:""});return fY(Fw,{color:"green",children:"\u2713"})}function hh6($){return`${$.name}: ${$.port||"...."}`}function Wi1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return tf(uD,{flexDirection:"column",paddingBottom:1,children:[fY(Gi1,{version:y50.version}),fY(uD,{marginBottom:1,children:fY(Fw,{dimColor:!0,children:"\u2500".repeat(80)})}),fY(uD,{children:tf(Fw,{dimColor:!0,children:["Home: ",X]})}),tf(uD,{gap:2,children:[$.map((Y)=>tf(uD,{gap:1,children:[fY(Fw,{children:hh6(Y)}),fY(Ki1,{status:Y.status})]},Y.name)),tf(uD,{gap:1,children:[fY(Fw,{children:"Migrations"}),fY(Ki1,{status:Z})]})]}),fY(uD,{children:Q?tf(Fw,{children:["Open in browser: ",fY(Fw,{color:"cyan",children:Q})]}):fY(Fw,{dimColor:!0,children:"Starting..."})})]})}var Hi1=O(()=>{Pl0();Ji1()});import{Box as uh6,Text as Pm}from"ink";import{jsx as Al0,jsxs as Tl0}from"react/jsx-runtime";function ch6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Ni1({logs:$}){return Al0(uh6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Al0(Pm,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Tl0(Pm,{children:[Tl0(Pm,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Al0(Pm,{color:ch6(Z.status),children:Z.status}),Tl0(Pm,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var Ui1=()=>{};var Rl0={};w0(Rl0,{App:()=>mh6});import{Box as lh6}from"ink";import{useSyncExternalStore as dh6}from"react";import{jsx as Fi1,jsxs as ih6}from"react/jsx-runtime";function mh6({home:$}){let Z=dh6(Dl0,Ll0);return ih6(lh6,{flexDirection:"column",children:[Fi1(Wi1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Fi1(Ni1,{logs:Z.logs})]})}var Il0=O(()=>{Hi1();Ui1();hD()});var JJ="thread-gate",qN="decopilot-hosted-harness",lG="automations",ww="background-tools";var wi1="7";function Bi1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:wi1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Oi1=()=>{};function nh6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function ql0($,Z){for(let X=0;X<$.length;X++){let Q=$[X];if(Q===void 0)continue;if(Q===Z)return $[X+1];if(Q.startsWith(`${Z}=`))return Q.slice(Z.length+1)}return}function Li1(){let $=nh6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:ql0($,"--cpu-prof-dir")??process.cwd(),name:ql0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(ql0($,"--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 Di1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=xD();if(!X)return;let Q={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);Q={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:X.rss,heapUsed:X.heapUsed,heapTotal:X.heapTotal,external:X.external,arrayBuffers:X.arrayBuffers,...Q}))};return Z().catch(()=>{}),g50=setInterval(()=>void Z().catch(()=>{}),$),g50.unref?.(),process.on("SIGUSR2",()=>{try{let X=Bun.generateHeapSnapshot("v8"),Q=typeof X==="string"?X:JSON.stringify(X),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,Q),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(X){console.error("[heap-watch] snapshot failed:",X)}}),()=>{if(g50)clearInterval(g50)}}var g50;var Ei1=()=>{};import*as ph6 from"bun:jsc";function zi1(){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{th6()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let X,Q=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-Q;Q=G+Z;let K=[];try{K=oh6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let N of K){let U=N.frames.find((B)=>B.sourceURL&&!/Unknown Executable/.test(B.category??""))??N.frames[0];if(!U)continue;let F=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),w=`${U.name??"?"} @ ${F}:${U.line??"?"}`;W.set(w,(W.get(w)??0)+1)}let H=[...W.entries()].sort((N,U)=>U[1]-N[1]).slice(0,8).map(([N,U])=>({frame:N,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var th6,oh6;var ji1=O(()=>{({startSamplingProfiler:th6,samplingProfilerStackTraces:oh6}=ph6)});function Pi1(){Li1();let $=[Di1(),Rc1(),zi1()];return()=>{for(let Z of $)Z()}}var Ai1=O(()=>{xg0();Ei1();ji1()});var cD=_((Ti1)=>{Object.defineProperty(Ti1,"__esModule",{value:!0});Ti1.RepublishHeaders=Ti1.DirectMsgHeaders=Ti1.JsHeaders=Ti1.AdvisoryKind=void 0;Ti1.isOrderedPushConsumerOptions=rh6;Ti1.isPullConsumer=ah6;Ti1.isPushConsumer=sh6;Ti1.isBoundPushConsumerOptions=eh6;function rh6($){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 ah6($){return $.isPullConsumer()}function sh6($){return $.isPushConsumer()}function eh6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Ti1.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"};Ti1.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"};Ti1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Ti1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var bY=_((Ii1)=>{Object.defineProperty(Ii1,"__esModule",{value:!0});Ii1.TD=Ii1.TE=Ii1.Empty=void 0;Ii1.encode=Wu6;Ii1.decode=Hu6;Ii1.Empty=new Uint8Array(0);Ii1.TE=new TextEncoder;Ii1.TD=new TextDecoder;function Ku6(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}function Wu6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(Ii1.TE.encode($[X]));if(Z.length===0)return Ii1.Empty;if(Z.length===1)return Z[0];return Ku6(...Z)}function Hu6($){if(!$||$.length===0)return"";return Ii1.TD.decode($)}});var yY=_((ki1)=>{Object.defineProperty(ki1,"__esModule",{value:!0});ki1.errors=ki1.PermissionViolationError=ki1.NoRespondersError=ki1.TimeoutError=ki1.RequestError=ki1.ProtocolError=ki1.ConnectionError=ki1.DrainingConnectionError=ki1.ClosedConnectionError=ki1.AuthorizationError=ki1.UserAuthenticationExpiredError=ki1.InvalidOperationError=ki1.InvalidArgumentError=ki1.InvalidSubjectError=void 0;class kl0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}ki1.InvalidSubjectError=kl0;class h50 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,X){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((Q)=>`'${Q}'`),$=$.join(",");else $=`'${$}'`;return new h50(`${$} ${Z}`,X)}}ki1.InvalidArgumentError=h50;class Vl0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}ki1.InvalidOperationError=Vl0;class u50 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new u50($);return null}}ki1.UserAuthenticationExpiredError=u50;class c50 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],X=$.toLowerCase();for(let Q=0;Q<Z.length;Q++)if(X.indexOf(Z[Q])!==-1)return new c50($);return null}}ki1.AuthorizationError=c50;class Sl0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}ki1.ClosedConnectionError=Sl0;class Cl0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}ki1.DrainingConnectionError=Cl0;class _l0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}ki1.ConnectionError=_l0;class vl0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}ki1.ProtocolError=vl0;class xl0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof l50}}ki1.RequestError=xl0;class fl0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}ki1.TimeoutError=fl0;class l50 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}ki1.NoRespondersError=l50;class d50 extends Error{operation;subject;queue;constructor($,Z,X,Q,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=X,this.queue=Q}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let X="publish",Q="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(X=G[1].toLowerCase(),Q=G[2],X==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new d50($,X,Q,Y)}}ki1.PermissionViolationError=d50;ki1.errors={AuthorizationError:c50,ClosedConnectionError:Sl0,ConnectionError:_l0,DrainingConnectionError:Cl0,InvalidArgumentError:h50,InvalidOperationError:Vl0,InvalidSubjectError:kl0,NoRespondersError:l50,PermissionViolationError:d50,ProtocolError:vl0,RequestError:xl0,TimeoutError:fl0,UserAuthenticationExpiredError:u50}});var KJ=_((vi1)=>{Object.defineProperty(vi1,"__esModule",{value:!0});vi1.SimpleMutex=vi1.Perf=void 0;vi1.extend=qu6;vi1.render=Mu6;vi1.timeout=ku6;vi1.delay=Vu6;vi1.deadline=Su6;vi1.deferred=yl0;vi1.debugDeferred=Cu6;vi1.shuffle=_u6;vi1.collect=vu6;vi1.jitter=_i1;vi1.backoff=xu6;vi1.nanos=fu6;vi1.millis=bu6;vi1.randomToken=hu6;var Iu6=bY(),bl0=yY();function qu6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Mu6($){return Iu6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function ku6($,Z=!0){let X=Z?new bl0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new bl0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function Vu6($=0){let Z,X=new Promise((Q)=>{let Y=setTimeout(()=>{Q()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),Q()}}});return Object.assign(X,Z)}async function Su6($,Z=1000){let X=yl0(),Q=setTimeout(()=>{X.reject(new bl0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function yl0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Cu6(){let $={},Z=new Promise((X,Q)=>{$={resolve:(Y)=>{console.trace("resolve",Y),X(Y)},reject:(Y)=>{console.trace("reject"),Q(Y)}}});return Object.assign(Z,$)}function _u6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function vu6($){let Z=[];for await(let X of $)Z.push(X);return Z}class Si1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,X){let Q=this.timers.get(Z);if(Q===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(X);if(Y===void 0)throw Error(`${X} is not defined`);this.measures.set($,Y-Q)}getEntries(){let $=[];return this.measures.forEach((Z,X)=>{$.push({name:X,duration:Z})}),$}}vi1.Perf=Si1;class Ci1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=yl0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}vi1.SimpleMutex=Ci1;function _i1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function xu6($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(X){return _i1(X>Z?$[Z]:$[X])}}}function fu6($){return $*1e6}function bu6($){return Math.floor($/1e6)}var yu6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",MN=new Uint8Array(62);for(let $=0;$<62;$++)MN[$]=yu6.charCodeAt($);var gu6=218340105584896;function hu6(){let $=Math.floor(Math.random()*gu6),Z=$%62,X=MN[Z];$=($-Z)/62,Z=$%62;let Q=MN[Z];$=($-Z)/62,Z=$%62;let Y=MN[Z];$=($-Z)/62,Z=$%62;let G=MN[Z];$=($-Z)/62,Z=$%62;let J=MN[Z];$=($-Z)/62,Z=$%62;let K=MN[Z];$=($-Z)/62,Z=$%62;let W=MN[Z];$=($-Z)/62;let H=MN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var ci1=_((hi1)=>{Object.defineProperty(hi1,"__esModule",{value:!0});hi1.nuid=hi1.NuidImpl=void 0;var Zc6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Bw=62,i50=12,yi1=10,fi1=33,Xc6=333,bi1=i50+yi1,hl0=new Uint8Array(Bw);for(let $=0;$<Bw;$++)hl0[$]=Zc6.charCodeAt($);var m50=4294967296,gi1=BigInt(Bw)**BigInt(yi1),Am=Number(gi1/(1n<<32n)),gl0=Number(gi1%(1n<<32n));function Qc6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function Yc6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else Qc6($)}class ul0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(bi1),this.cbuf=new Uint8Array(i50),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Am+1)),this.seqLo=Math.floor(Math.random()*m50);while($++<8&&this.seqHi===Am&&this.seqLo>=gl0);if(this.seqHi===Am&&this.seqLo>=gl0)this.seqLo=0;this.inc=Math.random()*(Xc6-fi1)+fi1|0}setPre(){Yc6(this.cbuf);for(let $=0;$<i50;$++)this.buf[$]=hl0[this.cbuf[$]%Bw]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=bi1-1;X>=i50;X--){let Q=Math.floor($/Bw),G=($-Q*Bw)*m50+Z,J=Math.floor(G/Bw),K=G-J*Bw;this.buf[X]=hl0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=m50)this.seqLo-=m50,this.seqHi+=1;if(this.seqHi>Am||this.seqHi===Am&&this.seqLo>=gl0)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()}}hi1.NuidImpl=ul0;hi1.nuid=new ul0});var ii1=_((di1)=>{Object.defineProperty(di1,"__esModule",{value:!0});di1.nuid=di1.Nuid=void 0;var li1=ci1();di1.Nuid=li1.NuidImpl;di1.nuid=li1.nuid});var p50=_((n50)=>{Object.defineProperty(n50,"__esModule",{value:!0});n50.nuid=n50.Nuid=void 0;var ni1=ii1();Object.defineProperty(n50,"Nuid",{enumerable:!0,get:function(){return ni1.Nuid}});Object.defineProperty(n50,"nuid",{enumerable:!0,get:function(){return ni1.nuid}})});var Ow=_((pi1)=>{Object.defineProperty(pi1,"__esModule",{value:!0});pi1.DEFAULT_HOST=pi1.DEFAULT_PORT=pi1.Match=void 0;pi1.syncIterator=Nc6;pi1.createInbox=Uc6;var Wc6=p50(),Hc6=yY();pi1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Nc6($){let Z=$[Symbol.asyncIterator]();return{async next(){let X=await Z.next();if(X.done)return Promise.resolve(null);return Promise.resolve(X.value)}}}function Uc6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw Hc6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${Wc6.nuid.next()}`}pi1.DEFAULT_PORT=4222;pi1.DEFAULT_HOST="127.0.0.1"});var Tm=_((ai1)=>{Object.defineProperty(ai1,"__esModule",{value:!0});ai1.DataBuffer=void 0;var oi1=bY();class ri1{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}static fromAscii($){if(!$)$="";return oi1.TE.encode($)}static toAscii($){return oi1.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let X=0;X<this.buffers.length;X++)$.set(this.buffers[X],Z),Z+=this.buffers[X].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let X=this.byteLength;if($===void 0||$>X)$=X;let Q=Z.subarray(0,$);if(X>$)this.buffers.push(Z.subarray($));return this.byteLength=X-$,Q}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let X=0;X<Z.length;X++)if(Z[X]&&Z[X].length)this.buffers.push(Z[X]),this.byteLength+=Z[X].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}ai1.DataBuffer=ri1});var lD=_(($n1)=>{Object.defineProperty($n1,"__esModule",{value:!0});$n1.LF=$n1.CR=$n1.CRLF=$n1.CR_LF_LEN=$n1.CR_LF=void 0;$n1.setTransportFactory=zc6;$n1.defaultPort=jc6;$n1.getUrlParseFn=Pc6;$n1.newTransport=Ac6;$n1.getResolveFn=Tc6;$n1.protoLen=ei1;$n1.extractProtocolMessage=Rc6;var Lc6=bY(),Dc6=Ow(),Ec6=Tm(),gY;function zc6($){gY=$}function jc6(){return gY!==void 0&&gY.defaultPort!==void 0?gY.defaultPort:Dc6.DEFAULT_PORT}function Pc6(){return gY!==void 0&&gY.urlParseFn?gY.urlParseFn:void 0}function Ac6(){if(!gY||typeof gY.factory!=="function")throw Error("transport fn is not set");return gY.factory()}function Tc6(){return gY!==void 0&&gY.dnsResolveFn?gY.dnsResolveFn:void 0}$n1.CR_LF=`\r
|
|
1295
|
+
`);Q=G.pop()??"";for(let J of G){let K=jm(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;Uw({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}if(Q.trim()){let G=jm(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)Uw({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function xh6($){let{baseUrl:Z,noTui:X}=$,Q=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=Q?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=Q?await zm(Number(Y)+1):await zm(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await x50({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)gD({name:L.name,status:"ready",port:L.port});Dm();let N=vh6(import.meta.dir,"..","..","..","..",".."),U=X===!0,F=Bun.spawn(["bun","run","dev:servers"],{cwd:N,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:G,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsPublicUrl&&K.natsAccountJwt&&K.natsAccountSigningKey?{NATS_PUBLIC_URL:K.natsPublicUrl,NATS_ACCOUNT_JWT:K.natsAccountJwt,NATS_ACCOUNT_SIGNING_KEY:K.natsAccountSigningKey,NATS_OPERATOR_JWT:K.natsOperatorJwt??"",NATS_TUNNEL_PUBLIC_ENABLED:"true",...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)Xi1(F.stdout),Xi1(F.stderr);Em(G),gD({name:"Vite",status:"ready",port:Number(Y)}),gD({name:"API",status:"ready",port:Number(K.port)});let B=async(L)=>{if(F.kill(L),await F.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (n$0(),i$0));await D(K.dataDir)}};return process.on("SIGINT",()=>B("SIGINT")),process.on("SIGTERM",()=>B("SIGTERM")),{port:Number(Y),process:F}}var jl0=O(()=>{Bl0();hD();El0()});var y50;var Pl0=O(()=>{y50={name:"decocms",version:"4.189.0",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@nats-io/jwt":"0.0.10-5","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as bh6,Text as Qi1}from"ink";import{jsx as yh6,jsxs as Yi1}from"react/jsx-runtime";function Gi1({version:$}){return Yi1(bh6,{flexDirection:"column",marginTop:1,children:[w50.map((Z,X)=>yh6(Qi1,{color:B50[X],children:Z},X)),Yi1(Qi1,{dimColor:!0,children:[" v",$]})]})}var Ji1=O(()=>{Gm()});import{Box as uD,Text as Fw}from"ink";import{Spinner as gh6}from"@inkjs/ui";import{jsx as fY,jsxs as tf}from"react/jsx-runtime";function Ki1({status:$}){if($==="pending")return fY(gh6,{label:""});return fY(Fw,{color:"green",children:"\u2713"})}function hh6($){return`${$.name}: ${$.port||"...."}`}function Wi1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return tf(uD,{flexDirection:"column",paddingBottom:1,children:[fY(Gi1,{version:y50.version}),fY(uD,{marginBottom:1,children:fY(Fw,{dimColor:!0,children:"\u2500".repeat(80)})}),fY(uD,{children:tf(Fw,{dimColor:!0,children:["Home: ",X]})}),tf(uD,{gap:2,children:[$.map((Y)=>tf(uD,{gap:1,children:[fY(Fw,{children:hh6(Y)}),fY(Ki1,{status:Y.status})]},Y.name)),tf(uD,{gap:1,children:[fY(Fw,{children:"Migrations"}),fY(Ki1,{status:Z})]})]}),fY(uD,{children:Q?tf(Fw,{children:["Open in browser: ",fY(Fw,{color:"cyan",children:Q})]}):fY(Fw,{dimColor:!0,children:"Starting..."})})]})}var Hi1=O(()=>{Pl0();Ji1()});import{Box as uh6,Text as Pm}from"ink";import{jsx as Al0,jsxs as Tl0}from"react/jsx-runtime";function ch6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Ni1({logs:$}){return Al0(uh6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Al0(Pm,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Tl0(Pm,{children:[Tl0(Pm,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Al0(Pm,{color:ch6(Z.status),children:Z.status}),Tl0(Pm,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var Ui1=()=>{};var Rl0={};w0(Rl0,{App:()=>mh6});import{Box as lh6}from"ink";import{useSyncExternalStore as dh6}from"react";import{jsx as Fi1,jsxs as ih6}from"react/jsx-runtime";function mh6({home:$}){let Z=dh6(Dl0,Ll0);return ih6(lh6,{flexDirection:"column",children:[Fi1(Wi1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Fi1(Ni1,{logs:Z.logs})]})}var Il0=O(()=>{Hi1();Ui1();hD()});var JJ="thread-gate",qN="decopilot-hosted-harness",lG="automations",ww="background-tools";var wi1="7";function Bi1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:wi1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Oi1=()=>{};function nh6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function ql0($,Z){for(let X=0;X<$.length;X++){let Q=$[X];if(Q===void 0)continue;if(Q===Z)return $[X+1];if(Q.startsWith(`${Z}=`))return Q.slice(Z.length+1)}return}function Li1(){let $=nh6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:ql0($,"--cpu-prof-dir")??process.cwd(),name:ql0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(ql0($,"--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 Di1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=xD();if(!X)return;let Q={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);Q={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:X.rss,heapUsed:X.heapUsed,heapTotal:X.heapTotal,external:X.external,arrayBuffers:X.arrayBuffers,...Q}))};return Z().catch(()=>{}),g50=setInterval(()=>void Z().catch(()=>{}),$),g50.unref?.(),process.on("SIGUSR2",()=>{try{let X=Bun.generateHeapSnapshot("v8"),Q=typeof X==="string"?X:JSON.stringify(X),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,Q),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(X){console.error("[heap-watch] snapshot failed:",X)}}),()=>{if(g50)clearInterval(g50)}}var g50;var Ei1=()=>{};import*as ph6 from"bun:jsc";function zi1(){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{th6()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let X,Q=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-Q;Q=G+Z;let K=[];try{K=oh6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let N of K){let U=N.frames.find((B)=>B.sourceURL&&!/Unknown Executable/.test(B.category??""))??N.frames[0];if(!U)continue;let F=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),w=`${U.name??"?"} @ ${F}:${U.line??"?"}`;W.set(w,(W.get(w)??0)+1)}let H=[...W.entries()].sort((N,U)=>U[1]-N[1]).slice(0,8).map(([N,U])=>({frame:N,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var th6,oh6;var ji1=O(()=>{({startSamplingProfiler:th6,samplingProfilerStackTraces:oh6}=ph6)});function Pi1(){Li1();let $=[Di1(),Rc1(),zi1()];return()=>{for(let Z of $)Z()}}var Ai1=O(()=>{xg0();Ei1();ji1()});var cD=_((Ti1)=>{Object.defineProperty(Ti1,"__esModule",{value:!0});Ti1.RepublishHeaders=Ti1.DirectMsgHeaders=Ti1.JsHeaders=Ti1.AdvisoryKind=void 0;Ti1.isOrderedPushConsumerOptions=rh6;Ti1.isPullConsumer=ah6;Ti1.isPushConsumer=sh6;Ti1.isBoundPushConsumerOptions=eh6;function rh6($){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 ah6($){return $.isPullConsumer()}function sh6($){return $.isPushConsumer()}function eh6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Ti1.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"};Ti1.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"};Ti1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Ti1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var bY=_((Ii1)=>{Object.defineProperty(Ii1,"__esModule",{value:!0});Ii1.TD=Ii1.TE=Ii1.Empty=void 0;Ii1.encode=Wu6;Ii1.decode=Hu6;Ii1.Empty=new Uint8Array(0);Ii1.TE=new TextEncoder;Ii1.TD=new TextDecoder;function Ku6(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}function Wu6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(Ii1.TE.encode($[X]));if(Z.length===0)return Ii1.Empty;if(Z.length===1)return Z[0];return Ku6(...Z)}function Hu6($){if(!$||$.length===0)return"";return Ii1.TD.decode($)}});var yY=_((ki1)=>{Object.defineProperty(ki1,"__esModule",{value:!0});ki1.errors=ki1.PermissionViolationError=ki1.NoRespondersError=ki1.TimeoutError=ki1.RequestError=ki1.ProtocolError=ki1.ConnectionError=ki1.DrainingConnectionError=ki1.ClosedConnectionError=ki1.AuthorizationError=ki1.UserAuthenticationExpiredError=ki1.InvalidOperationError=ki1.InvalidArgumentError=ki1.InvalidSubjectError=void 0;class kl0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}ki1.InvalidSubjectError=kl0;class h50 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,X){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((Q)=>`'${Q}'`),$=$.join(",");else $=`'${$}'`;return new h50(`${$} ${Z}`,X)}}ki1.InvalidArgumentError=h50;class Vl0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}ki1.InvalidOperationError=Vl0;class u50 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new u50($);return null}}ki1.UserAuthenticationExpiredError=u50;class c50 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],X=$.toLowerCase();for(let Q=0;Q<Z.length;Q++)if(X.indexOf(Z[Q])!==-1)return new c50($);return null}}ki1.AuthorizationError=c50;class Sl0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}ki1.ClosedConnectionError=Sl0;class Cl0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}ki1.DrainingConnectionError=Cl0;class _l0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}ki1.ConnectionError=_l0;class vl0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}ki1.ProtocolError=vl0;class xl0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof l50}}ki1.RequestError=xl0;class fl0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}ki1.TimeoutError=fl0;class l50 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}ki1.NoRespondersError=l50;class d50 extends Error{operation;subject;queue;constructor($,Z,X,Q,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=X,this.queue=Q}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let X="publish",Q="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(X=G[1].toLowerCase(),Q=G[2],X==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new d50($,X,Q,Y)}}ki1.PermissionViolationError=d50;ki1.errors={AuthorizationError:c50,ClosedConnectionError:Sl0,ConnectionError:_l0,DrainingConnectionError:Cl0,InvalidArgumentError:h50,InvalidOperationError:Vl0,InvalidSubjectError:kl0,NoRespondersError:l50,PermissionViolationError:d50,ProtocolError:vl0,RequestError:xl0,TimeoutError:fl0,UserAuthenticationExpiredError:u50}});var KJ=_((vi1)=>{Object.defineProperty(vi1,"__esModule",{value:!0});vi1.SimpleMutex=vi1.Perf=void 0;vi1.extend=qu6;vi1.render=Mu6;vi1.timeout=ku6;vi1.delay=Vu6;vi1.deadline=Su6;vi1.deferred=yl0;vi1.debugDeferred=Cu6;vi1.shuffle=_u6;vi1.collect=vu6;vi1.jitter=_i1;vi1.backoff=xu6;vi1.nanos=fu6;vi1.millis=bu6;vi1.randomToken=hu6;var Iu6=bY(),bl0=yY();function qu6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Mu6($){return Iu6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function ku6($,Z=!0){let X=Z?new bl0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new bl0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function Vu6($=0){let Z,X=new Promise((Q)=>{let Y=setTimeout(()=>{Q()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),Q()}}});return Object.assign(X,Z)}async function Su6($,Z=1000){let X=yl0(),Q=setTimeout(()=>{X.reject(new bl0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function yl0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Cu6(){let $={},Z=new Promise((X,Q)=>{$={resolve:(Y)=>{console.trace("resolve",Y),X(Y)},reject:(Y)=>{console.trace("reject"),Q(Y)}}});return Object.assign(Z,$)}function _u6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function vu6($){let Z=[];for await(let X of $)Z.push(X);return Z}class Si1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,X){let Q=this.timers.get(Z);if(Q===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(X);if(Y===void 0)throw Error(`${X} is not defined`);this.measures.set($,Y-Q)}getEntries(){let $=[];return this.measures.forEach((Z,X)=>{$.push({name:X,duration:Z})}),$}}vi1.Perf=Si1;class Ci1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=yl0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}vi1.SimpleMutex=Ci1;function _i1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function xu6($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(X){return _i1(X>Z?$[Z]:$[X])}}}function fu6($){return $*1e6}function bu6($){return Math.floor($/1e6)}var yu6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",MN=new Uint8Array(62);for(let $=0;$<62;$++)MN[$]=yu6.charCodeAt($);var gu6=218340105584896;function hu6(){let $=Math.floor(Math.random()*gu6),Z=$%62,X=MN[Z];$=($-Z)/62,Z=$%62;let Q=MN[Z];$=($-Z)/62,Z=$%62;let Y=MN[Z];$=($-Z)/62,Z=$%62;let G=MN[Z];$=($-Z)/62,Z=$%62;let J=MN[Z];$=($-Z)/62,Z=$%62;let K=MN[Z];$=($-Z)/62,Z=$%62;let W=MN[Z];$=($-Z)/62;let H=MN[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var ci1=_((hi1)=>{Object.defineProperty(hi1,"__esModule",{value:!0});hi1.nuid=hi1.NuidImpl=void 0;var Zc6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Bw=62,i50=12,yi1=10,fi1=33,Xc6=333,bi1=i50+yi1,hl0=new Uint8Array(Bw);for(let $=0;$<Bw;$++)hl0[$]=Zc6.charCodeAt($);var m50=4294967296,gi1=BigInt(Bw)**BigInt(yi1),Am=Number(gi1/(1n<<32n)),gl0=Number(gi1%(1n<<32n));function Qc6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function Yc6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else Qc6($)}class ul0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(bi1),this.cbuf=new Uint8Array(i50),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Am+1)),this.seqLo=Math.floor(Math.random()*m50);while($++<8&&this.seqHi===Am&&this.seqLo>=gl0);if(this.seqHi===Am&&this.seqLo>=gl0)this.seqLo=0;this.inc=Math.random()*(Xc6-fi1)+fi1|0}setPre(){Yc6(this.cbuf);for(let $=0;$<i50;$++)this.buf[$]=hl0[this.cbuf[$]%Bw]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=bi1-1;X>=i50;X--){let Q=Math.floor($/Bw),G=($-Q*Bw)*m50+Z,J=Math.floor(G/Bw),K=G-J*Bw;this.buf[X]=hl0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=m50)this.seqLo-=m50,this.seqHi+=1;if(this.seqHi>Am||this.seqHi===Am&&this.seqLo>=gl0)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()}}hi1.NuidImpl=ul0;hi1.nuid=new ul0});var ii1=_((di1)=>{Object.defineProperty(di1,"__esModule",{value:!0});di1.nuid=di1.Nuid=void 0;var li1=ci1();di1.Nuid=li1.NuidImpl;di1.nuid=li1.nuid});var p50=_((n50)=>{Object.defineProperty(n50,"__esModule",{value:!0});n50.nuid=n50.Nuid=void 0;var ni1=ii1();Object.defineProperty(n50,"Nuid",{enumerable:!0,get:function(){return ni1.Nuid}});Object.defineProperty(n50,"nuid",{enumerable:!0,get:function(){return ni1.nuid}})});var Ow=_((pi1)=>{Object.defineProperty(pi1,"__esModule",{value:!0});pi1.DEFAULT_HOST=pi1.DEFAULT_PORT=pi1.Match=void 0;pi1.syncIterator=Nc6;pi1.createInbox=Uc6;var Wc6=p50(),Hc6=yY();pi1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Nc6($){let Z=$[Symbol.asyncIterator]();return{async next(){let X=await Z.next();if(X.done)return Promise.resolve(null);return Promise.resolve(X.value)}}}function Uc6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw Hc6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${Wc6.nuid.next()}`}pi1.DEFAULT_PORT=4222;pi1.DEFAULT_HOST="127.0.0.1"});var Tm=_((ai1)=>{Object.defineProperty(ai1,"__esModule",{value:!0});ai1.DataBuffer=void 0;var oi1=bY();class ri1{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}static fromAscii($){if(!$)$="";return oi1.TE.encode($)}static toAscii($){return oi1.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let X=0;X<this.buffers.length;X++)$.set(this.buffers[X],Z),Z+=this.buffers[X].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let X=this.byteLength;if($===void 0||$>X)$=X;let Q=Z.subarray(0,$);if(X>$)this.buffers.push(Z.subarray($));return this.byteLength=X-$,Q}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let X=0;X<Z.length;X++)if(Z[X]&&Z[X].length)this.buffers.push(Z[X]),this.byteLength+=Z[X].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}ai1.DataBuffer=ri1});var lD=_(($n1)=>{Object.defineProperty($n1,"__esModule",{value:!0});$n1.LF=$n1.CR=$n1.CRLF=$n1.CR_LF_LEN=$n1.CR_LF=void 0;$n1.setTransportFactory=zc6;$n1.defaultPort=jc6;$n1.getUrlParseFn=Pc6;$n1.newTransport=Ac6;$n1.getResolveFn=Tc6;$n1.protoLen=ei1;$n1.extractProtocolMessage=Rc6;var Lc6=bY(),Dc6=Ow(),Ec6=Tm(),gY;function zc6($){gY=$}function jc6(){return gY!==void 0&&gY.defaultPort!==void 0?gY.defaultPort:Dc6.DEFAULT_PORT}function Pc6(){return gY!==void 0&&gY.urlParseFn?gY.urlParseFn:void 0}function Ac6(){if(!gY||typeof gY.factory!=="function")throw Error("transport fn is not set");return gY.factory()}function Tc6(){return gY!==void 0&&gY.dnsResolveFn?gY.dnsResolveFn:void 0}$n1.CR_LF=`\r
|
|
1296
1296
|
`;$n1.CR_LF_LEN=$n1.CR_LF.length;$n1.CRLF=Ec6.DataBuffer.fromAscii($n1.CR_LF);$n1.CR=new Uint8Array($n1.CRLF)[0];$n1.LF=new Uint8Array($n1.CRLF)[1];function ei1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===$n1.CR&&$[X]===$n1.LF)return X+1}return 0}function Rc6($){let Z=ei1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return Lc6.TD.decode(Q)}return""}});var il0=_((Wn1)=>{Object.defineProperty(Wn1,"__esModule",{value:!0});Wn1.ipV4=Gn1;Wn1.isIP=fc6;Wn1.parseIP=Jn1;var Rm=4,dD=16,t50=48,Yn1=57,Xn1=65,vc6=70,Qn1=97,xc6=102,ml0=16777215;function Gn1($,Z,X,Q){let Y=new Uint8Array(dD);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((J,K)=>{Y[K]=J}),Y[12]=$,Y[13]=Z,Y[14]=X,Y[15]=Q,Y}function fc6($){return Jn1($)!==void 0}function Jn1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return Kn1($);case":":return bc6($)}return}function Kn1($){let Z=new Uint8Array(Rm);for(let X=0;X<Rm;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=yc6($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return Gn1(Z[0],Z[1],Z[2],Z[3])}function bc6($){let Z=new Uint8Array(dD),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<dD){let{n:Y,c:G,ok:J}=gc6($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=dD-Rm)return;if(Q+Rm>dD)return;let K=Kn1($);if(K===void 0)return;Z[Q]=K[12],Z[Q+1]=K[13],Z[Q+2]=K[14],Z[Q+3]=K[15],$="",Q+=Rm;break}if(Z[Q]=Y>>8,Z[Q+1]=Y,Q+=2,$=$.substring(G),$.length===0)break;if($[0]!==":"||$.length==1)return;if($=$.substring(1),$[0]===":"){if(X>=0)return;if(X=Q,$=$.substring(1),$.length===0)break}}if($.length!==0)return;if(Q<dD){if(X<0)return;let Y=dD-Q;for(let G=Q-1;G>=X;G--)Z[G+Y]=Z[G];for(let G=X+Y-1;G>=X;G--)Z[G]=0}else if(X>=0)return;return Z}function yc6($){let Z=0,X=0;for(Z=0;Z<$.length&&t50<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=Yn1;Z++)if(X=X*10+($.charCodeAt(Z)-t50),X>=ml0)return{n:ml0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function gc6($){let Z=0,X=0;for(X=0;X<$.length;X++){if(t50<=$.charCodeAt(X)&&$.charCodeAt(X)<=Yn1)Z*=16,Z+=$.charCodeAt(X)-t50;else if(Qn1<=$.charCodeAt(X)&&$.charCodeAt(X)<=xc6)Z*=16,Z+=$.charCodeAt(X)-Qn1+10;else if(Xn1<=$.charCodeAt(X)&&$.charCodeAt(X)<=vc6)Z*=16,Z+=$.charCodeAt(X)-Xn1+10;else break;if(Z>=ml0)return{n:0,c:X,ok:!1}}if(X===0)return{n:0,c:X,ok:!1};return{n:Z,c:X,ok:!0}}});var al0=_((Nn1)=>{Object.defineProperty(Nn1,"__esModule",{value:!0});Nn1.Servers=Nn1.ServerImpl=void 0;Nn1.isIPV4OrHostname=Hn1;Nn1.hostPort=rl0;var nl0=lD(),pl0=KJ(),tl0=il0(),lc6=Ow(),dc6=yY();function Hn1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function ol0($){return!Hn1($)}function mc6($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function rl0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=mc6($),ol0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=ol0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):lc6.DEFAULT_PORT,Y=new URL(`${X===80?"https":"http"}://${$}`);Y.port=`${X}`;let G=Y.hostname;if(G.charAt(0)==="[")G=G.substring(1,G.length-1);return{listen:Y.host,hostname:G,port:X}}class of{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=rl0($);this.listen=X.listen,this.hostname=X.hostname,this.port=X.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=Z}toString(){return this.listen}async resolve($){if(!$.fn||$.resolve===!1)return[this];let Z=[];if((0,tl0.isIP)(this.hostname))return[this];else{let X=await $.fn(this.hostname);if($.debug)console.log(`resolve ${this.hostname} = ${X.join(",")}`);for(let Q of X){let Y=this.port===80?"https":"http",G=new URL(`${Y}://${ol0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new of(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,pl0.shuffle)(Z);return this.resolves=Z,Z}}Nn1.ServerImpl=of;class o50{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw dc6.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,nl0.getUrlParseFn)(),X=new Map;for(let Y of this.servers)X.set(Y.listen,Y);let Q=[];for(let Y of $){Y=Z?Z(Y):Y;let{listen:G}=rl0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new of(Y))}if(this.randomize)(0,pl0.shuffle)(Q);if(this.servers=Q,this.currentServer===void 0||!Q.includes(this.currentServer))this.currentServer=Q[0],this.firstSelect=!0}clear(){this.servers.length=0}updateTLSName(){let $=this.getCurrentServer();if(!(0,tl0.isIP)($.hostname))this.tlsName=$.hostname,this.servers.forEach((Z)=>{if(Z.gossiped)Z.tlsName=this.tlsName})}getCurrentServer(){return this.currentServer}addServer($,Z=!1){let X=(0,nl0.getUrlParseFn)();$=X?X($):$;let Q=new of($,Z);if((0,tl0.isIP)(Q.hostname))Q.tlsName=this.tlsName;this.servers.push(Q)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;let $=this.servers.shift();if($)this.servers.push($),this.currentServer=$;return $}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer($){if($){let Z=this.servers.indexOf($);this.servers.splice(Z,1)}}snapshot(){return o50.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return o50.freezeAll([$,...this.servers.slice(0,Z),...this.servers.slice(Z+1)])}static freezeAll($){return $.map((Z)=>Object.freeze({hostname:Z.hostname,port:Z.port,listen:Z.listen,src:Z.src,tlsName:Z.tlsName,reconnects:Z.reconnects,lastConnect:Z.lastConnect,gossiped:Z.gossiped,didConnect:Z.didConnect}))}find($){return this.servers.find((Z)=>Z.listen===$.listen)}setCurrent($){this.currentServer=$}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update($,Z){let X=[],Q=[],Y=(0,nl0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new of(K,!0);G.set(K,W)});let J=[];if(this.servers.forEach((K,W)=>{let H=K.listen;if(K.gossiped&&this.currentServer.listen!==H&&G.get(H)===void 0)J.push(W);G.delete(H)}),J.reverse(),J.forEach((K)=>{let W=this.servers.splice(K,1);Q=Q.concat(W[0].listen)}),G.forEach((K,W)=>{this.servers.push(K),X.push(W)}),this.randomize&&X.length>0){let K=this.currentServer,W=this.servers.filter((H)=>H!==K);(0,pl0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}Nn1.Servers=o50});var r50=_((Bn1)=>{Object.defineProperty(Bn1,"__esModule",{value:!0});Bn1.QueuedIteratorImpl=void 0;var sl0=KJ(),Fn1=yY();class wn1{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,sl0.deferred)(),this.yields=[],this.iterClosed=(0,sl0.deferred)(),this.time=0,this.yielding=!1,this.didBreak=!1,this.profile=!1}[Symbol.asyncIterator](){return this.iterate()}push($){if(this.done)return;if(this.didBreak){if(typeof $==="function"){let Z=$;try{Z()}catch(X){}}return}if(typeof $==="function")this.pendingFiltered++;this.yields.push($),this.signal.resolve()}async*iterate(){if(this.noIterator)throw new Fn1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new Fn1.InvalidOperationError("iterator is already yielding");this.yielding=!0;try{while(!0){if(this.yields.length===0)await this.signal;if(this.err)throw this.err;let $=this.yields;this.inflight=$.length,this.yields=[];for(let Z=0;Z<$.length;Z++){if(typeof $[Z]==="function"){this.pendingFiltered--;let Q=$[Z];try{Q()}catch(Y){throw Y}if(this.err)throw this.err;continue}this.processed++,this.inflight--;let X=this.profile?Date.now():0;yield $[Z],this.time=this.profile?Date.now()-X:0}if(this.done)break;else if(this.yields.length===0)$.length=0,this.yields=$,this.signal=(0,sl0.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}}Bn1.QueuedIteratorImpl=wn1});var el0=_((En1)=>{Object.defineProperty(En1,"__esModule",{value:!0});En1.MuxSubscription=void 0;var tc6=Ow(),Ln1=yY();class Dn1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,tc6.createInbox)($)}.`,this.baseInbox}add($){if(!isNaN($.received))$.received=0;this.reqs.set($.token,$)}get($){return this.reqs.get($)}cancel($){this.reqs.delete($.token)}getToken($){let Z=$.subject||"";if(Z.indexOf(this.baseInbox)===0)return Z.substring(this.baseInbox.length);return null}all(){return Array.from(this.reqs.values())}handleError($,Z){if($)return this.all().forEach((X)=>{X.resolver(Z,{})}),!0;if(Z.operation==="publish"){let X=this.all().find((Q)=>{return Q.requestSubject===Z.subject});if(X)return X.resolver(Z,{}),!0}return!1}dispatcher(){return($,Z)=>{let X=this.getToken(Z);if(X){let Q=this.get(X);if(Q){if($===null)$=Z?.data?.length===0&&Z.headers?.code===503?new Ln1.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new Ln1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}En1.MuxSubscription=Dn1});var $d0=_((Pn1)=>{Object.defineProperty(Pn1,"__esModule",{value:!0});Pn1.Heartbeat=void 0;var oc6=KJ();class jn1{ph;interval;maxOut;timer;pendings;constructor($,Z,X){this.ph=$,this.interval=Z,this.maxOut=X,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel($){if(this.timer)clearTimeout(this.timer),this.timer=void 0;if(this._reset(),$)this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:"ping",pendingPings:this.pendings.length+1}),this.pendings.length===this.maxOut){this.cancel(!0);return}let $=(0,oc6.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})}}Pn1.Heartbeat=jn1});var Qd0=_((qn1)=>{Object.defineProperty(qn1,"__esModule",{value:!0});qn1.DenoBuffer=qn1.MAX_SIZE=qn1.AssertionError=void 0;qn1.assert=Rn1;qn1.concat=In1;qn1.append=ac6;qn1.readAll=sc6;qn1.writeAll=ec6;var rc6=bY();class Zd0 extends Error{constructor($){super($);this.name="AssertionError"}}qn1.AssertionError=Zd0;function Rn1($,Z="Assertion failed."){if(!$)throw new Zd0(Z)}var Tn1=32768;qn1.MAX_SIZE=4294967294;function a50($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function In1($,Z){if($===void 0&&Z===void 0)return new Uint8Array(0);if($===void 0)return Z;if(Z===void 0)return $;let X=new Uint8Array($.length+Z.length);return X.set($,0),X.set(Z,$.length),X}function ac6($,Z){return In1($,Uint8Array.of(Z))}class Xd0{_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($){Rn1($<=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=a50(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(rc6.TE.encode($))}write($){let Z=this._grow($.byteLength);return a50($,this._buf,Z)}_grow($){let Z=this.length;if(Z===0&&this._off!==0)this.reset();let X=this._tryGrowByReslice($);if(X>=0)return X;let Q=this.capacity;if($<=Math.floor(Q/2)-Z)a50(this._buf.subarray(this._off),this._buf);else if(Q+$>qn1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,qn1.MAX_SIZE));a50(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,qn1.MAX_SIZE)),Z}grow($){if($<0)throw Error("Buffer._grow: negative count");let Z=this._grow($);this._reslice(Z)}readFrom($){let Z=0,X=new Uint8Array(Tn1);while(!0){let Q=this.capacity-this.length<Tn1,Y=Q?X:new Uint8Array(this._buf.buffer,this.length),G=$.read(Y);if(G===null)return Z;if(Q)this.write(Y.subarray(0,G));else this._reslice(this.length+G);Z+=G}}}qn1.DenoBuffer=Xd0;function sc6($){let Z=new Xd0;return Z.readFrom($),Z.bytes()}function ec6($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var Jd0=_((Cn1)=>{Object.defineProperty(Cn1,"__esModule",{value:!0});Cn1.cc=Cn1.State=Cn1.Parser=Cn1.Kind=void 0;Cn1.describe=Jl6;var Yd0=Qd0(),Gd0=bY();Cn1.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function Jl6($){let Z,X="";switch($.kind){case Cn1.Kind.MSG:Z="MSG";break;case Cn1.Kind.OK:Z="OK";break;case Cn1.Kind.ERR:Z="ERR",X=Gd0.TD.decode($.data);break;case Cn1.Kind.PING:Z="PING";break;case Cn1.Kind.PONG:Z="PONG";break;case Cn1.Kind.INFO:Z="INFO",X=Gd0.TD.decode($.data)}return`${Z}: ${X}`}function kn1(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var Vn1=48,Kl6=57,rf=67108864;class Sn1{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=Cn1.State.OP_START,this.as=0,this.drop=0,this.hdr=0}parse($){let Z;for(Z=0;Z<$.length;Z++){let X=$[Z];switch(this.state){case Cn1.State.OP_START:switch(X){case Cn1.cc.M:case Cn1.cc.m:this.state=Cn1.State.OP_M,this.hdr=-1,this.ma=kn1();break;case Cn1.cc.H:case Cn1.cc.h:this.state=Cn1.State.OP_H,this.hdr=0,this.ma=kn1();break;case Cn1.cc.P:case Cn1.cc.p:this.state=Cn1.State.OP_P;break;case Cn1.cc.PLUS:this.state=Cn1.State.OP_PLUS;break;case Cn1.cc.MINUS:this.state=Cn1.State.OP_MINUS;break;case Cn1.cc.I:case Cn1.cc.i:this.state=Cn1.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_H:switch(X){case Cn1.cc.M:case Cn1.cc.m:this.state=Cn1.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_M:switch(X){case Cn1.cc.S:case Cn1.cc.s:this.state=Cn1.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_MS:switch(X){case Cn1.cc.G:case Cn1.cc.g:this.state=Cn1.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_MSG:switch(X){case Cn1.cc.SPACE:case Cn1.cc.TAB:this.state=Cn1.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_MSG_SPC:switch(X){case Cn1.cc.SPACE:case Cn1.cc.TAB:continue;default:this.state=Cn1.State.MSG_ARG,this.as=Z}break;case Cn1.State.MSG_ARG:switch(X){case Cn1.cc.CR:this.drop=1;break;case Cn1.cc.NL:{let Q=this.argBuf?this.argBuf.bytes():$.subarray(this.as,Z-this.drop);this.processMsgArgs(Q),this.drop=0,this.as=Z+1,this.state=Cn1.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case Cn1.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:Cn1.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Cn1.State.MSG_END}else{let Q=this.ma.size-this.msgBuf.length,Y=$.length-Z;if(Y<Q)Q=Y;if(Q>0)this.msgBuf.write($.subarray(Z,Z+Q)),Z=Z+Q-1;else this.msgBuf.writeByte(X)}else if(Z-this.as>=this.ma.size)this.dispatcher.push({kind:Cn1.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Cn1.State.MSG_END;break;case Cn1.State.MSG_END:switch(X){case Cn1.cc.NL:this.drop=0,this.as=Z+1,this.state=Cn1.State.OP_START;break;default:continue}break;case Cn1.State.OP_PLUS:switch(X){case Cn1.cc.O:case Cn1.cc.o:this.state=Cn1.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_PLUS_O:switch(X){case Cn1.cc.K:case Cn1.cc.k:this.state=Cn1.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_PLUS_OK:switch(X){case Cn1.cc.NL:this.dispatcher.push({kind:Cn1.Kind.OK}),this.drop=0,this.state=Cn1.State.OP_START;break}break;case Cn1.State.OP_MINUS:switch(X){case Cn1.cc.E:case Cn1.cc.e:this.state=Cn1.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_MINUS_E:switch(X){case Cn1.cc.R:case Cn1.cc.r:this.state=Cn1.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_MINUS_ER:switch(X){case Cn1.cc.R:case Cn1.cc.r:this.state=Cn1.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_MINUS_ERR:switch(X){case Cn1.cc.SPACE:case Cn1.cc.TAB:this.state=Cn1.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_MINUS_ERR_SPC:switch(X){case Cn1.cc.SPACE:case Cn1.cc.TAB:continue;default:this.state=Cn1.State.MINUS_ERR_ARG,this.as=Z}break;case Cn1.State.MINUS_ERR_ARG:switch(X){case Cn1.cc.CR:this.drop=1;break;case Cn1.cc.NL:{let Q;if(this.argBuf)Q=this.argBuf.bytes(),this.argBuf=void 0;else Q=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:Cn1.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=Cn1.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case Cn1.State.OP_P:switch(X){case Cn1.cc.I:case Cn1.cc.i:this.state=Cn1.State.OP_PI;break;case Cn1.cc.O:case Cn1.cc.o:this.state=Cn1.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_PO:switch(X){case Cn1.cc.N:case Cn1.cc.n:this.state=Cn1.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_PON:switch(X){case Cn1.cc.G:case Cn1.cc.g:this.state=Cn1.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_PONG:switch(X){case Cn1.cc.NL:this.dispatcher.push({kind:Cn1.Kind.PONG}),this.drop=0,this.state=Cn1.State.OP_START;break}break;case Cn1.State.OP_PI:switch(X){case Cn1.cc.N:case Cn1.cc.n:this.state=Cn1.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_PIN:switch(X){case Cn1.cc.G:case Cn1.cc.g:this.state=Cn1.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_PING:switch(X){case Cn1.cc.NL:this.dispatcher.push({kind:Cn1.Kind.PING}),this.drop=0,this.state=Cn1.State.OP_START;break}break;case Cn1.State.OP_I:switch(X){case Cn1.cc.N:case Cn1.cc.n:this.state=Cn1.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_IN:switch(X){case Cn1.cc.F:case Cn1.cc.f:this.state=Cn1.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_INF:switch(X){case Cn1.cc.O:case Cn1.cc.o:this.state=Cn1.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_INFO:switch(X){case Cn1.cc.SPACE:case Cn1.cc.TAB:this.state=Cn1.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case Cn1.State.OP_INFO_SPC:switch(X){case Cn1.cc.SPACE:case Cn1.cc.TAB:continue;default:this.state=Cn1.State.INFO_ARG,this.as=Z}break;case Cn1.State.INFO_ARG:switch(X){case Cn1.cc.CR:this.drop=1;break;case Cn1.cc.NL:{let Q;if(this.argBuf)Q=this.argBuf.bytes(),this.argBuf=void 0;else Q=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:Cn1.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=Cn1.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===Cn1.State.MSG_ARG||this.state===Cn1.State.MINUS_ERR_ARG||this.state===Cn1.State.INFO_ARG)&&!this.argBuf)this.argBuf=new Yd0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===Cn1.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new Yd0.DenoBuffer($.subarray(this.as))}}cloneMsgArg(){let $=this.ma.subject.length,Z=this.ma.reply?this.ma.reply.length:0,X=new Uint8Array($+Z);if(X.set(this.ma.subject),this.ma.reply)X.set(this.ma.reply,$);if(this.argBuf=new Yd0.DenoBuffer(X),this.ma.subject=X.subarray(0,$),this.ma.reply)this.ma.reply=X.subarray($)}processMsgArgs($){if(this.hdr>=0)return this.processHeaderMsgArgs($);let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case Cn1.cc.SPACE:case Cn1.cc.TAB:case Cn1.cc.CR:case Cn1.cc.NL:if(X>=0)Z.push($.subarray(X,Q)),X=-1;break;default:if(X<0)X=Q}if(X>=0)Z.push($.subarray(X));switch(Z.length){case 3:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(Z[2],rf);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],rf);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}: ${Gd0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case Cn1.cc.SPACE:case Cn1.cc.TAB:case Cn1.cc.CR:case Cn1.cc.NL:if(X>=0)Z.push($.subarray(X,Q)),X=-1;break;default:if(X<0)X=Q}if(X>=0)Z.push($.subarray(X));switch(Z.length){case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(Z[2],rf),this.ma.size=this.protoParseInt(Z[3],rf);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],rf),this.ma.size=this.protoParseInt(Z[4],rf);break;default:throw this.fail($,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail($,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt($,Z){if($.length===0||$.length>15)return-1;let X=0;for(let Q=0;Q<$.length;Q++){if($[Q]<Vn1||$[Q]>Kl6)return-1;X=X*10+($[Q]-Vn1)}return Z!==void 0&&X>Z?-1:X}}Cn1.Parser=Sn1;Cn1.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};Cn1.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 $90=_((vn1)=>{Object.defineProperty(vn1,"__esModule",{value:!0});vn1.MsgHdrsImpl=void 0;vn1.canonicalMIMEHeaderKey=Wd0;vn1.headers=Nl6;var _n1=bY(),WJ=Ow(),e50=yY();function Wd0($){let N=!0,U=Array($.length);for(let F=0;F<$.length;F++){let w=$.charCodeAt(F);if(w===58||w<33||w>126)throw e50.InvalidArgumentError.format("header",`'${$[F]}' is not a valid character in a header name`);if(N&&97<=w&&w<=122)w-=32;else if(!N&&65<=w&&w<=90)w+=32;U[F]=w,N=w==45}return String.fromCharCode(...U)}function Nl6($=0,Z=""){if($===0&&Z!=="")throw e50.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw e50.InvalidArgumentError.format("description","is required");return new af($,Z)}var Kd0="NATS/1.0";class af{_code;headers;_description;constructor($=0,Z=""){this._code=$,this._description=Z,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals($){if($&&this.headers.size===$.headers.size&&this._code===$._code){for(let[Z,X]of this.headers){let Q=$.values(Z);if(X.length!==Q.length)return!1;let Y=[...X].sort(),G=[...Q].sort();for(let J=0;J<Y.length;J++)if(Y[J]!==G[J])return!1}return!0}return!1}static decode($){let Z=new af,Q=_n1.TD.decode($).split(`\r
|
|
1297
1297
|
`),Y=Q[0];if(Y!==Kd0){let G=Y.replace(Kd0,"").trim();if(G.length>0){if(Z._code=parseInt(G,10),isNaN(Z._code))Z._code=0;let J=Z._code.toString();G=G.replace(J,""),Z._description=G.trim()}}if(Q.length>=1)Q.slice(1).map((G)=>{if(G){let J=G.indexOf(":");if(J>-1){let K=G.slice(0,J),W=G.slice(J+1).trim();Z.append(K,W)}}});return Z}toString(){if(this.headers.size===0&&this._code===0)return"";let $=Kd0;if(this._code>0&&this._description!=="")$+=` ${this._code} ${this._description}`;for(let[Z,X]of this.headers)for(let Q=0;Q<X.length;Q++)$=`${$}\r
|
|
1298
1298
|
${Z}: ${X[Q]}`;return`${$}\r
|
|
@@ -2686,15 +2686,12 @@ This report is all the parent agent sees.`,yk8=16000;var uk8=O(()=>{Wz();fB();Mj
|
|
|
2686
2686
|
Preview:
|
|
2687
2687
|
${q}`}}}if(z.isError)return{type:"error-text",value:z.content.map((I)=>I.type==="text"?I.text:null).filter(Boolean).join(`
|
|
2688
2688
|
`)||"Unknown error"};if("structuredContent"in z)return{type:"json",value:z.structuredContent};return{type:"text",value:z.content.map((P)=>{if(P.type==="text")return P.text;return JSON.stringify(P)}).join(`
|
|
2689
|
-
`)}}})]});return{tools:Object.fromEntries(H),nameMap:W,rawTools:J.tools}}var Sh4=120000;var Ua=O(()=>{Y9();u4();hU()});function ah($,Z){let X;try{X=typeof $==="string"?$:JSON.stringify($,null,2)}catch{X=String($)}let Q=zX(X);if(Q>hO){let Y=`vm_${Date.now()}`;Z.set(Y,X);let G=UQ(X);return{truncated:!0,message:`Output too large (${Q} tokens). Use read_tool_output with tool_call_id "${Y}" to extract specific data.`,preview:G}}return $}var dk8=O(()=>{hU()});import{z as b$}from"zod";var mk8,ik8,nk8,pk8,tk8,ok8,rk8,ak8,sk8,ek8="Load a skill's full instructions (its SKILL.md) by id, for the skills listed in <available-skills>. Read-only. Call this BEFORE applying a skill, then follow its SKILL.md (run its scripts via bash). Do NOT call it for a skill whose SKILL.md is already in the conversation.",$V8="Perform exact string replacement in a file in the VM. old_string must be unique in the file unless replace_all is true.",ZV8="Search file contents in the VM using ripgrep. Supports regex patterns, file type filtering via glob, and context lines.",XV8="Find files by name pattern in the VM's project directory. Uses ripgrep for gitignore-aware matching. Returns relative file paths.",QV8,uO;var YV8=O(()=>{mk8=b$.object({path:b$.string().describe("File path.
|
|
2689
|
+
`)}}})]});return{tools:Object.fromEntries(H),nameMap:W,rawTools:J.tools}}var Sh4=120000;var Ua=O(()=>{Y9();u4();hU()});function ah($,Z){let X;try{X=typeof $==="string"?$:JSON.stringify($,null,2)}catch{X=String($)}let Q=zX(X);if(Q>hO){let Y=`vm_${Date.now()}`;Z.set(Y,X);let G=UQ(X);return{truncated:!0,message:`Output too large (${Q} tokens). Use read_tool_output with tool_call_id "${Y}" to extract specific data.`,preview:G}}return $}var dk8=O(()=>{hU()});import{z as b$}from"zod";var mk8,ik8,nk8,pk8,tk8,ok8,rk8,ak8,sk8,ek8="Load a skill's full instructions (its SKILL.md) by id, for the skills listed in <available-skills>. Read-only. Call this BEFORE applying a skill, then follow its SKILL.md (run its scripts via bash). Do NOT call it for a skill whose SKILL.md is already in the conversation.",$V8="Perform exact string replacement in a file in the VM. old_string must be unique in the file unless replace_all is true.",ZV8="Search file contents in the VM using ripgrep. Supports regex patterns, file type filtering via glob, and context lines.",XV8="Find files by name pattern in the VM's project directory. Uses ripgrep for gitignore-aware matching. Returns relative file paths.",QV8,uO;var YV8=O(()=>{mk8=b$.object({path:b$.string().describe("File path. Prefer relative paths \u2014 they resolve against the project "+"root (e.g. 'src/index.ts'). Absolute paths are accepted but only for files you already know exist outside the project; do not guess one."),offset:b$.number().optional().describe("Starting line number for text files (1-based, default 1)"),limit:b$.number().optional().describe("Max lines to return for text files (default 2000)")}),ik8=b$.object({path:b$.string().describe("File path relative to project root"),content:b$.string().describe("The full file content to write")}),nk8=b$.object({path:b$.string().describe("File path relative to project root"),old_string:b$.string().describe("The exact text to find and replace"),new_string:b$.string().describe("The replacement text (must differ from old_string)"),replace_all:b$.boolean().optional().describe("Replace all occurrences (default false)")}),pk8=b$.object({pattern:b$.string().describe("Regex pattern to search for"),path:b$.string().optional().describe("Directory or file to search in (default: project root)"),glob:b$.string().optional().describe("Glob pattern to filter files (e.g. '*.ts', '*.{js,jsx}')"),context:b$.number().optional().describe("Lines of context around matches"),ignore_case:b$.boolean().optional().describe("Case-insensitive search"),output_mode:b$.enum(["content","files","count"]).optional().describe("Output mode (default: 'files')"),limit:b$.number().optional().describe("Max result lines (default 250)")}),tk8=b$.object({pattern:b$.string().describe("Glob pattern to match files (e.g. '**/*.ts', 'src/**/*.test.tsx')"),path:b$.string().optional().describe("Directory to search in (default: project root)")}),ok8=b$.object({command:b$.string().describe("The bash command to execute"),timeout:b$.number().optional().describe("Timeout in milliseconds (default 30000, max 120000)")}),rk8=b$.object({id:b$.string().describe("Skill id from the <available-skills> catalog (e.g. 'core/slides' or 'home/<name>').")}),ak8="Read a file. For text files, returns content with line numbers (use offset and limit for large files). For images (jpeg, png, gif, webp), the image "+"is injected into the next turn as a vision input \u2014 do NOT describe what "+"you 'expect' to see, just call read and look at the next message. Other binary formats are not supported; use a format-specific skill (e.g. pptx-extract for .pptx).",sk8=`Write content to a file in the VM's project directory. Creates parent directories if needed. Overwrites existing files entirely.
|
|
2690
2690
|
|
|
2691
2691
|
Viewable HTML artifacts get a LIVE PREVIEW in the chat side panel and persist in the org's shared folder when written under \`org/home/\` (lowercase-kebab names):
|
|
2692
2692
|
`+"- Presentation decks / slides \u2192 `org/home/decks/<name>.html` "+"\u2014 load the slides skill (`skill({ id: 'core/slides' })`) FIRST "+`and create the deck with its CLI.
|
|
2693
2693
|
`+"- Standalone pages (landing pages, brand kits, one-pagers) \u2192 "+"`org/home/pages/<name>.html` \u2014 single self-contained "+`HTML file.
|
|
2694
|
-
HTML written anywhere else will not render a preview.`,QV8
|
|
2695
|
-
|
|
2696
|
-
The organization filesystem is mounted at \`org/\`:
|
|
2697
|
-
`+"- `org/home/` \u2014 the org's shared home folder (editable, "+`shared across runs). Organize it freely; check it before non-trivial work and record durable facts, decisions, and learnings as small markdown files.
|
|
2694
|
+
HTML written anywhere else will not render a preview.`,QV8="Execute a shell command in the VM's project directory. "+"Working directory is already the project root \u2014 the git checkout, when "+"the agent has a repo. Never `cd` to an absolute path you guessed (there is no `/home/sandbox` project dir); run git and build commands as-is from the default cwd. Timeout default 30s, max 2min.\n\nThe organization filesystem is mounted at `org/`:\n"+"- `org/home/` \u2014 the org's shared home folder (editable, "+`shared across runs). Organize it freely; check it before non-trivial work and record durable facts, decisions, and learnings as small markdown files.
|
|
2698
2695
|
`+"- `org/public/<set>/` \u2014 curated read-only skill sets, mounted here. Your "+"skills are listed in the <available-skills> catalog; load one with the `skill` tool before applying it (don't `ls org/public/` to discover them).\n"+"- `org/upload/` \u2014 files the user attached to this conversation are "+`already here; read them directly.
|
|
2699
2696
|
`+"- `org/output/` \u2014 write deliverables here; they are shared back to the "+"organization under this run's folder.\n\nTo make a presentation/slides/deck, ALWAYS use the `slides` skill "+"(HTML decks with a live editable preview) \u2014 load it with "+"`skill({ id: 'core/slides' })` first. `pptx` is NOT for this: it only reads/inspects existing `.pptx` files, and is the right tool only when the user explicitly needs a PowerPoint `.pptx` file as input or output.",uO={read:!1,write:!0,edit:!0,grep:!1,glob:!1,bash:!0,skill:!1}});function GV8($){let Z=$.split("/");if(Z.length<2)return null;if(!Z.every((G)=>xh4.test(G)))return null;let[X,...Q]=Z,Y=Q.join("/");if(X==="home")return`org/home/${Y}/SKILL.md`;return`org/public/${X}/${Y}/SKILL.md`}var xh4;var JV8=O(()=>{xh4=/^[A-Za-z0-9][A-Za-z0-9._-]*$/});function KV8($){let{fs:Z,htmlArtifactBuffer:X,toolOutputMap:Q,needsApproval:Y,pendingImages:G}=$,J=(L)=>L?Y:!1,K=(L,D,E,z="POST")=>Z.onProxy(L,D,z,E),W=l8({needsApproval:J(uO.read),description:ak8,inputSchema:K0(mk8),execute:async(L,D)=>{let E=await K("/_sandbox/read",L,D.abortSignal);if(E.kind==="image")return G.push({url:`data:${E.mediaType};base64,${E.base64}`,mediaType:E.mediaType,label:`[Image at ${L.path}]`}),{kind:"image",path:L.path,mediaType:E.mediaType,size:E.size,message:"Image attached below."};return ah(E,Q)}}),H=l8({needsApproval:J(uO.write),description:sk8,inputSchema:K0(ik8),execute:async(L,D)=>{let E=await K("/_sandbox/write",L,D.abortSignal);return X?.enqueue(L.path,L.content),E}}),N=l8({needsApproval:J(uO.edit),description:$V8,inputSchema:K0(nk8),execute:async(L,D)=>{let E=await K("/_sandbox/edit",L,D.abortSignal),z=E.content,{content:j,...A}=E;if(typeof z!=="string")return A;return X?.enqueue(L.path,z),A}}),U=l8({needsApproval:J(uO.grep),description:ZV8,inputSchema:K0(pk8),execute:async(L,D)=>{let E=await K("/_sandbox/grep",L,D.abortSignal);return ah(E,Q)}}),F=l8({needsApproval:J(uO.glob),description:XV8,inputSchema:K0(tk8),execute:async(L,D)=>{let E=await K("/_sandbox/glob",L,D.abortSignal);return ah(E,Q)}}),w=l8({needsApproval:J(uO.bash),description:QV8,inputSchema:K0(ok8),execute:async(L,D)=>{let E=await K("/_sandbox/bash",L,D.abortSignal);return ah(E,Q)}}),B=l8({needsApproval:J(uO.skill),description:ek8,inputSchema:K0(rk8),execute:async({id:L},D)=>{let E=GV8(L);if(!E)return{error:`Invalid skill id "${L}". Use an id from <available-skills>.`};try{let z=await K("/_sandbox/read",{path:E},D.abortSignal);return ah(z,Q)}catch{return{error:`Skill "${L}" not found. Use an id from <available-skills>.`}}}});return{read:W,write:H,edit:N,grep:U,glob:F,bash:w,skill:B}}var WV8=O(()=>{u4();dk8();YV8();JV8()});function HV8($){let Z=$;return{fs:{onRead:(Q)=>Z.onRead(Q),onWrite:(Q,Y)=>Z.onWrite(Q,Y),onEdit:(Q,Y)=>Z.onEdit(Q,Y),onBash:(Q,Y)=>Z.onBash(Q,Y),onGlob:(Q)=>Z.onGlob(Q),onGrep:(Q,Y)=>Z.onGrep(Q,Y),onProxy:(Q,Y,G,J)=>Z.onProxy(Q,Y,G,J)},swap(Q){Z=Q}}}import{z as cO}from"zod";var fh4,bh4,yh4,dj0;var p51=O(()=>{u4();fh4=cO.object({prompt:cO.string().min(1).describe("One short question (1 sentence max, \u226415 words). The conversation already provides context, do not repeat it here."),type:cO.enum(["text","choice","confirm"]).describe("'text': free-form, 'choice': pick from options (UI adds 'Other' automatically), 'confirm': yes/no"),options:cO.array(cO.string()).optional().describe("Required for 'choice'. Each option must be a short label (3\u20136 words, no leading numbers like '1)' \u2014 the UI adds them)."),default:cO.string().optional()}).refine(($)=>{if($.type==="choice")return $.options&&$.options.length>=2;return!0},{message:"Options array with at least 2 items required for 'choice' type",path:["options"]}),bh4=cO.object({response:cO.string().describe("User's response")}),yh4=`Ask the user instead of guessing when requirements are ambiguous, multiple valid approaches exist, or before actions with significant consequences. Prefer this tool over asking in plain text.
|
|
2700
2697
|
|