decocms 4.260.7 → 4.260.9
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-DPxLor_N.js → AlertCircle-CGBRCuJ4.js} +1 -1
- package/dist/client/assets/{AreaChart-CQ8AQeCQ.js → AreaChart-6Up5rngL.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CebARimI.js → ArrowLeft-CHMMFLc3.js} +1 -1
- package/dist/client/assets/{ArrowUp-BqoaaU8K.js → ArrowUp-DAhKY0Tk.js} +1 -1
- package/dist/client/assets/{Check-goUIXyKh.js → Check-B0Eaatea.js} +1 -1
- package/dist/client/assets/{CheckCircle-CfYLlYpa.js → CheckCircle-V6HS5Lbs.js} +1 -1
- package/dist/client/assets/{ChevronDown-CshG0CLE.js → ChevronDown-CNPQ8d6w.js} +1 -1
- package/dist/client/assets/{ChevronRight-DHPEiysZ.js → ChevronRight-D5D26UIh.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BSN6L-kf.js → ChevronSelectorVertical-DBLiwzdp.js} +1 -1
- package/dist/client/assets/{ChevronUp-yLSqRFP2.js → ChevronUp-KiJiOJu1.js} +1 -1
- package/dist/client/assets/{Copy01-D06Nj471.js → Copy01-dmGRRZdS.js} +1 -1
- package/dist/client/assets/{CreditCard01-B1UTUF3S.js → CreditCard01-Z_QGkWXE.js} +1 -1
- package/dist/client/assets/{DotsVertical-DQmsQK31.js → DotsVertical-DbvaQatv.js} +1 -1
- package/dist/client/assets/{Download01-gvaU1x7n.js → Download01-CXOlgMWi.js} +1 -1
- package/dist/client/assets/{Eye-EuKR0cdc.js → Eye-Cz1TSN4V.js} +1 -1
- package/dist/client/assets/{FilterLines-DONN5_Cr.js → FilterLines-CbRpZkLa.js} +1 -1
- package/dist/client/assets/{Globe01-DasUaQ7o.js → Globe01-3tt225et.js} +1 -1
- package/dist/client/assets/{Globe04-D5pYASny.js → Globe04-CBctyWxN.js} +1 -1
- package/dist/client/assets/{HardDrive-DLmaCR34.js → HardDrive-FbCCSi_J.js} +1 -1
- package/dist/client/assets/{Key01-D0Ze8cKU.js → Key01-DsKkgVP-.js} +1 -1
- package/dist/client/assets/{LinkExternal01-NXbWBz8j.js → LinkExternal01-BjVmlNh-.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-DyiTD5kX.js → LockUnlocked01-CqJEyrVP.js} +1 -1
- package/dist/client/assets/{LogOut01-CoX2zuKq.js → LogOut01-DwXKkLSv.js} +1 -1
- package/dist/client/assets/{Monitor01-Br-Vply-.js → Monitor01-naTRFrFq.js} +1 -1
- package/dist/client/assets/{Palette-Cr4vdMo1.js → Palette-B1GC9ovw.js} +1 -1
- package/dist/client/assets/{Play-ah8BQMUd.js → Play-C1A0Cb2k.js} +1 -1
- package/dist/client/assets/{Plus-BuARW-kj.js → Plus-CknbZtX-.js} +1 -1
- package/dist/client/assets/{SearchLg-CM-HDueP.js → SearchLg-BsO3v8X5.js} +1 -1
- package/dist/client/assets/{SearchMd-v0i-9mb6.js → SearchMd-DtXZcqJ9.js} +1 -1
- package/dist/client/assets/{Settings02-CZkcys2z.js → Settings02-DrBxcYIq.js} +1 -1
- package/dist/client/assets/{Share07-2DaeVrns.js → Share07-LJcR_tLj.js} +1 -1
- package/dist/client/assets/{Shield01-DyOH3F5t.js → Shield01-DrxRnzmr.js} +1 -1
- package/dist/client/assets/{Stars01-D7SANbwY.js → Stars01-g1Y0fn3E.js} +1 -1
- package/dist/client/assets/{Stars02-vKykI9rT.js → Stars02-Do3QLXad.js} +1 -1
- package/dist/client/assets/{Sun-6sARTz6p.js → Sun-D8mbEBSo.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DjswD-Lu.js → SwitchHorizontal01-CiMv53Cu.js} +1 -1
- package/dist/client/assets/{Tool01-Dt9O1gYs.js → Tool01-CWOjgqGP.js} +1 -1
- package/dist/client/assets/{Tool02-BChNfLOv.js → Tool02-WR_8nZ3W.js} +1 -1
- package/dist/client/assets/{Trash01-Bf9HLbXj.js → Trash01-D3l7Rz6x.js} +1 -1
- package/dist/client/assets/{TrendUp01-D2PIsDRw.js → TrendUp01-B7ds31sJ.js} +1 -1
- package/dist/client/assets/{Upload01-DBzRhz4G.js → Upload01-B60xhcvw.js} +1 -1
- package/dist/client/assets/{User01-DDOq4f2P.js → User01-D7PPmpDd.js} +1 -1
- package/dist/client/assets/{UserSquare-Tef66cIA.js → UserSquare-BpUMHhJZ.js} +1 -1
- package/dist/client/assets/{Users01-C-AEVUNQ.js → Users01-CE5LutvC.js} +1 -1
- package/dist/client/assets/{Users03-3rdNv0Aq.js → Users03-CjMzxu8y.js} +1 -1
- package/dist/client/assets/{XCircle-PTEWxL9B.js → XCircle-CXme4ECZ.js} +1 -1
- package/dist/client/assets/{XClose-BevPXZGh.js → XClose-Cdj249zg.js} +1 -1
- package/dist/client/assets/{YAxis-BNr0lYG_.js → YAxis-C5SZgJ9p.js} +1 -1
- package/dist/client/assets/{Zap-DYsvHlt6.js → Zap-BfLwFJVN.js} +1 -1
- package/dist/client/assets/{ZapSquare-tNtUTBa2.js → ZapSquare-BhVyhpMn.js} +1 -1
- package/dist/client/assets/{access-gate-CIMwdiYc.js → access-gate-DU-f_LvN.js} +1 -1
- package/dist/client/assets/{agent-icon-DNQa0L3Y.js → agent-icon-dQKPHALF.js} +1 -1
- package/dist/client/assets/{agents-list-BZ4alovn.js → agents-list-B4Ds4tk2.js} +1 -1
- package/dist/client/assets/{ai-providers-cxOBQS8S.js → ai-providers-BHdRIYSn.js} +1 -1
- package/dist/client/assets/{alert-CRQ4uFWW.js → alert-Cx-nEky-.js} +1 -1
- package/dist/client/assets/{alert-dialog-CKAksQyg.js → alert-dialog-DO2U_dql.js} +1 -1
- package/dist/client/assets/{api-keys-CrlNakil.js → api-keys-DkVHXNZh.js} +1 -1
- package/dist/client/assets/{app-editor-hiHTVELa.js → app-editor-BnYnXTY3.js} +1 -1
- package/dist/client/assets/{auth-DdsveUCf.js → auth-CR2-FgGr.js} +1 -1
- package/dist/client/assets/{auth-catchall-nEgO5299.js → auth-catchall-CjEe-3tW.js} +1 -1
- package/dist/client/assets/{auth-entry-fEXpHRWt.js → auth-entry-DRnURq4H.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CaZEC7Zm.js → auth-split-layout-BAp2i_nt.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Du7ghXvx.js → authenticate-and-persist-oauth-C9Qre2kn.js} +1 -1
- package/dist/client/assets/{automation-list-row-Bp7xqqWe.js → automation-list-row-B7UdU0TX.js} +1 -1
- package/dist/client/assets/{automation-runs-BgF6DO74.js → automation-runs-C-DepSSp.js} +1 -1
- package/dist/client/assets/{automations-CxE0eLXe.js → automations-B7o5vFQN.js} +1 -1
- package/dist/client/assets/{avatar-Csdlmxjv.js → avatar-BVKrntch.js} +1 -1
- package/dist/client/assets/{badge-CSLr-YWj.js → badge-DqBwIIdM.js} +1 -1
- package/dist/client/assets/{block-document-B_FdRaFh.js → block-document-Bdik65cO.js} +1 -1
- package/dist/client/assets/{buckets-CcVeiYaZ.js → buckets-C2lfHzyG.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Nx64uZrX.js → bulk-category-panel-BOG81tKI.js} +1 -1
- package/dist/client/assets/{capability-load-error-C55c4GE8.js → capability-load-error-CeBHxaRA.js} +1 -1
- package/dist/client/assets/{cards-Bp-0ATfZ.js → cards-BKOLgyjE.js} +1 -1
- package/dist/client/assets/{category-editor-HPW9FCZF.js → category-editor-NWRuNYfx.js} +1 -1
- package/dist/client/assets/{chart-CGkKX3le.js → chart-DPMCIDbA.js} +1 -1
- package/dist/client/assets/{chat-context-B_j3IM_l.js → chat-context-Z4NWja6_.js} +1 -1
- package/dist/client/assets/{checkbox-DE00eebZ.js → checkbox-ZAjb10S1.js} +1 -1
- package/dist/client/assets/{choose-editor-BUIws1__.js → choose-editor-Cfx3-Ye_.js} +1 -1
- package/dist/client/assets/{cli-auth-success-yrCz_Z9a.js → cli-auth-success-XoAQgPz9.js} +1 -1
- package/dist/client/assets/{collection-detail-DyAJgn5p.js → collection-detail-DgCBT6bS.js} +1 -1
- package/dist/client/assets/{collection-display-button-0ci5cZSY.js → collection-display-button-BMqvXqm7.js} +1 -1
- package/dist/client/assets/{collection-search-DFBsUG61.js → collection-search-BFIZDZEY.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D7D9JRRE.js → collection-table-wrapper-CsSF2qs8.js} +1 -1
- package/dist/client/assets/{collection-tabs-CerdExZs.js → collection-tabs-Bt_daj4C.js} +1 -1
- package/dist/client/assets/{command-HSQBlsqS.js → command-CMK0Bma5.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DRMB4AUW.js → commerce-onboarding-B9o_gDqf.js} +1 -1
- package/dist/client/assets/{connect-Dd3xNj6G.js → connect-Dzts9pt0.js} +1 -1
- package/dist/client/assets/{connection-Cygc8dVo.js → connection-Dx20M07Y.js} +1 -1
- package/dist/client/assets/{connection-card-CI8lW38q.js → connection-card-BM13UE3w.js} +1 -1
- package/dist/client/assets/{connection-detail-D7IHwHcH.js → connection-detail-BHSkhb5E.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-D0ZdJOaq.js → connection-form-helpers-5TRGhHuo.js} +1 -1
- package/dist/client/assets/{connections-D2CTLrzk.js → connections-BzGeOfrA.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-D3aQYIxz.js → decopilot-sse-pool-ZGXC9p0G.js} +1 -1
- package/dist/client/assets/{dialog-DTSI1xNI.js → dialog-Bpj8rTQq.js} +1 -1
- package/dist/client/assets/{domain-settings-DN8rk2gT.js → domain-settings-BbgRV9VZ.js} +1 -1
- package/dist/client/assets/{drawer-BtUlgqvD.js → drawer-DWyvYM4Q.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BHP7A1I2.js → dropdown-menu-B_-CA978.js} +1 -1
- package/dist/client/assets/{empty-state-BxsbYIp7.js → empty-state-B2KlyM7T.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D4V_ONCC.js → extract-connection-data-0ou1nEjr.js} +1 -1
- package/dist/client/assets/{file-explorer-WS9yPd_H.js → file-explorer-CKABcNPV.js} +1 -1
- package/dist/client/assets/{file-type-icon-RB13T8PF.js → file-type-icon-DYIxG5wo.js} +1 -1
- package/dist/client/assets/{form-CRZ4MuCs.js → form-_ZcCSaBq.js} +1 -1
- package/dist/client/assets/{general-CMWO9gS8.js → general-BN6a0GAZ.js} +1 -1
- package/dist/client/assets/{github-repo-picker-B9Mr6gvy.js → github-repo-picker-CPzejwym.js} +1 -1
- package/dist/client/assets/{hooks-BBoNrQa_.js → hooks-CxRe7oEt.js} +1 -1
- package/dist/client/assets/{index-DuzYwBH0.js → index-2-MU4H4U.js} +1 -1
- package/dist/client/assets/{index-BuJjPhKH.js → index-20HsVgpZ.js} +1 -1
- package/dist/client/assets/{index-XpBhIBWK.js → index-BIadAAgr.js} +49 -49
- package/dist/client/assets/{index-DcKlgJWf.js → index-BZMNuboo.js} +1 -1
- package/dist/client/assets/{index-CpSoUcDB.js → index-Bdbk1F-q.js} +1 -1
- package/dist/client/assets/{index-1uLbu33H.js → index-CvlpgjBS.js} +1 -1
- package/dist/client/assets/{index-B_SZfBN6.js → index-DWr1mB_c.js} +1 -1
- package/dist/client/assets/{index-cgIkmy0Q.js → index-MirEP13B.js} +1 -1
- package/dist/client/assets/{index-i-ED7xp7.js → index-P9_FWrIy.js} +1 -1
- package/dist/client/assets/{index-DVv1zNSe.js → index-Q0ih3vY9.js} +3 -3
- package/dist/client/assets/{index-redirect-DNqxKBc_.js → index-redirect-Di9Juvey.js} +1 -1
- package/dist/client/assets/{infra-billing-BGOiJH70.js → infra-billing-BQFKdzkv.js} +1 -1
- package/dist/client/assets/{input-DqFAdini.js → input-CZ-Y3ACQ.js} +1 -1
- package/dist/client/assets/{integration-icon-BFak0SI8.js → integration-icon-CYhSrx3-.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BJVf4Lit.js → invite-member-dialog-CapoS53l.js} +1 -1
- package/dist/client/assets/{label-Dkt4oKx0.js → label-TzWpfEj8.js} +1 -1
- package/dist/client/assets/{layout-DsahlsQM.js → layout-C_xFtRfJ.js} +1 -1
- package/dist/client/assets/{login-B1o2PzAS.js → login-BdeAPrTT.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BblG8wHV.js → mcp-oauth-DtQG7ruw.js} +1 -1
- package/dist/client/assets/{members-B4IZhHPb.js → members-wN735JPG.js} +1 -1
- package/dist/client/assets/{monaco-editor-CUyLtPdQ.js → monaco-editor-DTAjn8x7.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Cti1EIds.js → monitoring-stats-row-5VeEiuek.js} +1 -1
- package/dist/client/assets/{multi-select-CIHJ_e7S.js → multi-select-DaAo9wTU.js} +1 -1
- package/dist/client/assets/{oauth-callback-BJr-QM_r.js → oauth-callback-DfYRJS86.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CXzrC9Wy.js → oauth-callback-ai-provider-CmCujRkq.js} +1 -1
- package/dist/client/assets/{onboarding-DwhkE1tE.js → onboarding-DHNhl0CA.js} +1 -1
- package/dist/client/assets/{org-layout-DjF43U9C.js → org-layout-DZBSpS88.js} +1 -1
- package/dist/client/assets/{organization-choice-Dc1Mwxy5.js → organization-choice-Dps3Qt8x.js} +1 -1
- package/dist/client/assets/{orgs-Bi5i6Jga.js → orgs-C3Z1E5W_.js} +1 -1
- package/dist/client/assets/{page-seo-form-C8FrECqq.js → page-seo-form-B79vohnr.js} +1 -1
- package/dist/client/assets/{popover-CqmhhGtl.js → popover-Bm4-MFeK.js} +1 -1
- package/dist/client/assets/{post-calendar-xz3jPWdb.js → post-calendar-Ykv3zjUq.js} +1 -1
- package/dist/client/assets/{post-editor-CwVbahu1.js → post-editor-CTjwUezL.js} +1 -1
- package/dist/client/assets/{primitives-B3TtquI6.js → primitives-BAMRfAlX.js} +1 -1
- package/dist/client/assets/{profile-kKBQHJie.js → profile-D95WidHR.js} +1 -1
- package/dist/client/assets/{project-app-view-DUH9rYTH.js → project-app-view-DcMoOgg-.js} +1 -1
- package/dist/client/assets/record-editor-BkJ3Rbuc.js +1 -0
- package/dist/client/assets/{redirect-editor-Cks5QpBb.js → redirect-editor-ES9VIP95.js} +1 -1
- package/dist/client/assets/registry-CbinDA33.js +2 -0
- package/dist/client/assets/{registry-layout-CGA5Xt6y.js → registry-layout-DDzxoVax.js} +1 -1
- package/dist/client/assets/{reports-Dbo7_Fhb.js → reports-CkBYV_fO.js} +1 -1
- package/dist/client/assets/{require-capability-D6zOzpbR.js → require-capability-Ctf73w4X.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DXCBTHmS.js → required-auth-layout-D7rrMC7W.js} +1 -1
- package/dist/client/assets/{reset-password-BnBCanZe.js → reset-password-CbXHyn1_.js} +1 -1
- package/dist/client/assets/{roles-BFq4gAI3.js → roles-Xj7P0rlQ.js} +1 -1
- package/dist/client/assets/{search-input-BYf7i3hi.js → search-input-BCNm66Hg.js} +1 -1
- package/dist/client/assets/{secrets-DjOW_LsN.js → secrets-DIR3vaz4.js} +1 -1
- package/dist/client/assets/{sections-editor-BMMNLW5_.js → sections-editor-Df6OuG3c.js} +1 -1
- package/dist/client/assets/{select-B-GGh2_V.js → select-CZEkT_Ub.js} +1 -1
- package/dist/client/assets/{select-model-BeXvLKYl.js → select-model-bjMldFcS.js} +1 -1
- package/dist/client/assets/{self-tool-result-DvDs9N-4.js → self-tool-result-FZ59GN69.js} +1 -1
- package/dist/client/assets/{seo-editor-BpumBeQh.js → seo-editor-DK6rbLpO.js} +1 -1
- package/dist/client/assets/{settings-layout-DVFU0DFs.js → settings-layout-DyEmsddk.js} +1 -1
- package/dist/client/assets/{shell-controls-CGXyrKBX.js → shell-controls-DjXzq4g8.js} +1 -1
- package/dist/client/assets/{shell-layout-BxZc0X-W.js → shell-layout-XpEu_VzL.js} +1 -1
- package/dist/client/assets/{spinner-CVJx70XX.js → spinner-Bguo4Bwh.js} +1 -1
- package/dist/client/assets/{sprints-DGN2_Ylt.js → sprints-Ct3ojR8q.js} +1 -1
- package/dist/client/assets/{sso-DU7cP_hQ.js → sso-BDAS0cZW.js} +1 -1
- package/dist/client/assets/store-registry-BIFDhNoD.js +2 -0
- package/dist/client/assets/{store-DWyak2J1.js → store-w-4xxZWR.js} +1 -1
- package/dist/client/assets/{switch-CmfyUEXs.js → switch-rojtROD8.js} +1 -1
- package/dist/client/assets/{synced-repos-D0OhuqKp.js → synced-repos-5OhluYOw.js} +1 -1
- package/dist/client/assets/{tab-id-CrGXPqCz.js → tab-id-1TU63X6h.js} +1 -1
- package/dist/client/assets/{table-C3fNfG3L.js → table-jzg7__3e.js} +1 -1
- package/dist/client/assets/{tabs-CAOzWXcF.js → tabs-D2wpZaY5.js} +1 -1
- package/dist/client/assets/{task-key-CPpkyy9h.js → task-key-CC9G7v1w.js} +1 -1
- package/dist/client/assets/{tasks-wLGCwKEH.js → tasks-Dfm9Eovu.js} +1 -1
- package/dist/client/assets/{textarea-Bnsbbz0C.js → textarea-CqmWtFRK.js} +1 -1
- package/dist/client/assets/{toggle-group-CFiKQ2ci.js → toggle-group-BETWC09O.js} +1 -1
- package/dist/client/assets/{toolbar-DyKJS-nc.js → toolbar-C3_Q7dqs.js} +1 -1
- package/dist/client/assets/{track-mMdBmn4Q.js → track-CggBoHPk.js} +1 -1
- package/dist/client/assets/{types-CMe4kheB.js → types-BeEwV8Aj.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DdpG9tV0.js → use-ai-providers-BmO8uWpe.js} +1 -1
- package/dist/client/assets/{use-api-keys-DVPztQ5p.js → use-api-keys-C6Fe_Ocl.js} +1 -1
- package/dist/client/assets/{use-automations-BRSTjiIh.js → use-automations-D5Wy-nq2.js} +1 -1
- package/dist/client/assets/{use-autosave-w1T6MwcX.js → use-autosave-Mno_nIVk.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BDwoTF5M.js → use-clock-tick-BzjX2yGK.js} +1 -1
- package/dist/client/assets/{use-commerce-diagnostic-3uST7evt.js → use-commerce-diagnostic-B5MkRse1.js} +1 -1
- package/dist/client/assets/{use-connection-B0HWsSWf.js → use-connection-B-RPcbkx.js} +1 -1
- package/dist/client/assets/{use-copy-D6lko-Ct.js → use-copy-C9245jp_.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B6x22JQj.js → use-create-virtual-mcp-BjkMD_cf.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BWqJCbp3.js → use-debounced-autosave-hH4y3yC4.js} +1 -1
- package/dist/client/assets/{use-debounced-value-zlJQkNCj.js → use-debounced-value-CblxErYr.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CHZQZmLm.js → use-decopilot-events-DaUFoRlf.js} +1 -1
- package/dist/client/assets/{use-delete-connection-JiuVog3X.js → use-delete-connection-CnoUD1RQ.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DfNR9jPj.js → use-deployment-admin-mhXI-uWl.js} +1 -1
- package/dist/client/assets/{use-file-configs-Ceye1Qoj.js → use-file-configs-BqEHB_ME.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BhqIdVF5.js → use-infinite-scroll-DNn86ctr.js} +1 -1
- package/dist/client/assets/{use-join-requests-Bln02fyA.js → use-join-requests-Ba-NTJuO.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Hon16yO6.js → use-mcp-client-DKsNCh5J.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C1LZQoaw.js → use-mcp-tools-CERg3nfB.js} +1 -1
- package/dist/client/assets/{use-members-Cw0HKujz.js → use-members-DBAL2e-f.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-hdxxzq-j.js → use-navigate-to-agent-CO1RgrXb.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C8YjjNNv.js → use-org-auth-client-CDBud9jK.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-C_dTdh9t.js → use-org-repo-syncs-BCBbpBEq.js} +1 -1
- package/dist/client/assets/{use-org-sso-BfwnLC5V.js → use-org-sso-C1yD58R7.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DMWAgMno.js → use-organization-roles-CNA8V3VC.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C3EICgtS.js → use-organization-settings-CMAF2n7M.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DfEduXQX.js → use-registry-connections-P1mhPeRu.js} +1 -1
- package/dist/client/assets/{use-secrets-CUyP2P-8.js → use-secrets-DGuTI6bX.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BbcdED6p.js → use-section-preview-base-CKACya5x.js} +1 -1
- package/dist/client/assets/{use-status-sounds-PMPfLxgu.js → use-status-sounds-CEwV8E83.js} +1 -1
- package/dist/client/assets/{use-tags-ClcBaO1e.js → use-tags-BHabWIzK.js} +1 -1
- package/dist/client/assets/{use-view-mode-97pegvdd.js → use-view-mode-DaOp4_yN.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DTFqoUsv.js → use-virtual-mcp-CCdcXlj5.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CxJmgKHW.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Cx6cMUVV.js +1 -0
- package/dist/client/assets/{users-czV_D1-k.js → users-C3JNsjoY.js} +1 -1
- package/dist/client/assets/{variant-calendar-BkTP4xqh.js → variant-calendar-BWTv2XEj.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CRxR1eLS.js → view-mode-toggle-DcWsW2w0.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/record-editor-Dolt8NW_.js +0 -1
- package/dist/client/assets/registry-CCqqB3Vu.js +0 -2
- package/dist/client/assets/store-registry-BKU6i61A.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BrXoWint.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DxKFJSz9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,r as C,n as f,j as i,ab as k,a8 as I,a9 as P}from"./index-
|
|
1
|
+
import{c as $,r as C,n as f,j as i,ab as k,a8 as I,a9 as P}from"./index-Q0ih3vY9.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function A(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:L,fullWidth:R,className:z}=E,_=L===void 0?"sm":L,m=R===void 0?!1:R;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const T=C.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=C.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=T.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),C.useEffect(g,p);const n=M[_];let l;t[6]!==z?(l=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=l):l=t[7];let a;t[8]!==n||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{T.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(n.buttonWithLabel,"px-3"):n.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",n.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=n,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":n.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==l||t[25]!==a?(v=i.jsxs("div",{className:l,children:[a,u]}),t[23]=u,t[24]=l,t[25]=a,t[26]=v):v=t[26],v}export{A as V};
|
package/dist/client/index.html
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<meta name="twitter:description" content="Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in." />
|
|
51
51
|
<meta name="twitter:image" content="/og-image.png" />
|
|
52
52
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
53
|
-
<script type="module" crossorigin src="/assets/index-
|
|
53
|
+
<script type="module" crossorigin src="/assets/index-Q0ih3vY9.js"></script>
|
|
54
54
|
<link rel="stylesheet" crossorigin href="/assets/index-DfOjcoHJ.css">
|
|
55
55
|
</head>
|
|
56
56
|
<body>
|
package/dist/server/cli.js
CHANGED
|
@@ -1396,7 +1396,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var En1=L(()=>{_f()});f
|
|
|
1396
1396
|
`.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await Jy`
|
|
1397
1397
|
DELETE FROM kysely_migration WHERE name = ${X}
|
|
1398
1398
|
`.execute($)}}async function ur1($){await io6($),await no6($);let Z=new gr1({db:$,provider:{getMigrations:()=>Promise.resolve(wn0)}}),{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 po6($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await xl0();let G=X??W6(),J=async()=>{if(!Z&&!X)await mB(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await ur1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function to6(){let $=W6(),Z=new gr1({db:$.db,provider:{getMigrations:()=>Promise.resolve(wn0)}}),{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 lr1=L(()=>{yr1();fl0();JX()});async function G70($){let Z={...process.env},X=r80($,Z);console.log(sw1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?tp1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (BZ0(),NZ0)),{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(() => (fl0(),rp1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (JX(),Bp1)),{migrateToLatest:F}=await Promise.resolve().then(() => (lr1(),cr1)),U=H(G.databaseUrl);await F({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 jn1(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 Dn0=L(()=>{_f();op1();_8()});var ir1={};U0(ir1,{updateService:()=>VE,subscribeCliState:()=>zn0,setTuiConsoleIntercepted:()=>J70,setServerUrl:()=>Xn,setMigrationsDone:()=>Zn,setDevMode:()=>ao6,resetCliStateForTests:()=>oo6,isTuiConsoleIntercepted:()=>K70,getCliState:()=>jn0,addLogEntry:()=>oB});function dr1(){return{services:[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}],migrationsStatus:"pending",serverUrl:null,logs:[]}}function oo6(){nQ=dr1()}function ro6(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function $n(){for(let $ of En0)$()}function jn0(){return nQ}function zn0($){return En0.add($),()=>En0.delete($)}function VE($){nQ={...nQ,services:nQ.services.map((Z)=>Z.name===$.name?$:Z)},$n()}function Zn(){nQ={...nQ,migrationsStatus:"done"},$n()}function Xn($){nQ={...nQ,serverUrl:$},$n()}function oB($){let Z=[...nQ.logs,$];nQ={...nQ,logs:Z.length>500?Z.slice(-500):Z},$n()}function ao6(){nQ={...nQ,services:[...ro6(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},$n()}function J70($){mr1=$}function K70(){return mr1}var nQ,En0,mr1=!1;var kE=L(()=>{nQ=dr1();En0=new Set});import{createServer as nr1}from"net";function so6($){return new Promise((Z)=>{let X=nr1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function Qn($){if(await so6($))return $;let Z=await new Promise((X,Q)=>{let Y=nr1();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 Pn0=()=>{};function Yn($){return $.replace(/\x1b\[[0-9;]*m/g,"")}var An0={};U0(An0,{startDevServer:()=>$r6});import{join as eo6}from"path";function pr1($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
|
|
1399
|
-
`);Q=G.pop()??"";for(let J of G){let K=Yn(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;oB({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=Yn(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)oB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function $r6($){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 Qn(Number(Y)+1):await Qn(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await G70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let w of W)VE({name:w.name,status:"ready",port:w.port});Zn();let F=eo6(import.meta.dir,"..","..","..","..",".."),U=X===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL: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)pr1(N.stdout),pr1(N.stderr);Xn(G),VE({name:"Vite",status:"ready",port:Number(Y)}),VE({name:"API",status:"ready",port:Number(K.port)});let O=async(w)=>{if(N.kill(w),await N.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (BZ0(),NZ0));await D(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var Tn0=L(()=>{Dn0();kE();Pn0()});var W70;var Rn0=L(()=>{W70={name:"decocms",version:"4.260.7",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^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 Xr6,Text as tr1}from"ink";import{jsx as Qr6,jsxs as or1}from"react/jsx-runtime";function rr1({version:$}){return or1(Xr6,{flexDirection:"column",marginTop:1,children:[bZ0.map((Z,X)=>Qr6(tr1,{color:yZ0[X],children:Z},X)),or1(tr1,{dimColor:!0,children:[" v",$]})]})}var ar1=L(()=>{di()});import{Box as SE,Text as rB}from"ink";import{Spinner as Yr6}from"@inkjs/ui";import{jsx as XG,jsxs as Ky}from"react/jsx-runtime";function sr1({status:$}){if($==="pending")return XG(Yr6,{label:""});return XG(rB,{color:"green",children:"\u2713"})}function Gr6($){return`${$.name}: ${$.port||"...."}`}function er1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return Ky(SE,{flexDirection:"column",paddingBottom:1,children:[XG(rr1,{version:W70.version}),XG(SE,{marginBottom:1,children:XG(rB,{dimColor:!0,children:"\u2500".repeat(80)})}),XG(SE,{children:Ky(rB,{dimColor:!0,children:["Home: ",X]})}),Ky(SE,{gap:2,children:[$.map((Y)=>Ky(SE,{gap:1,children:[XG(rB,{children:Gr6(Y)}),XG(sr1,{status:Y.status})]},Y.name)),Ky(SE,{gap:1,children:[XG(rB,{children:"Migrations"}),XG(sr1,{status:Z})]})]}),XG(SE,{children:Q?Ky(rB,{children:["Open in browser: ",XG(rB,{color:"cyan",children:Q})]}):XG(rB,{dimColor:!0,children:"Starting..."})})]})}var $a1=L(()=>{Rn0();ar1()});import{Box as Jr6,Text as Gn}from"ink";import{jsx as In0,jsxs as qn0}from"react/jsx-runtime";function Kr6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Za1({logs:$}){return In0(Jr6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return In0(Gn,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return qn0(Gn,{children:[qn0(Gn,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),In0(Gn,{color:Kr6(Z.status),children:Z.status}),qn0(Gn,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var Xa1=()=>{};var Mn0={};U0(Mn0,{App:()=>Fr6});import{Box as Wr6}from"ink";import{useSyncExternalStore as Hr6}from"react";import{jsx as Qa1,jsxs as Ur6}from"react/jsx-runtime";function Fr6({home:$}){let Z=Hr6(zn0,jn0);return Ur6(Wr6,{flexDirection:"column",children:[Qa1(er1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Qa1(Za1,{logs:Z.logs})]})}var Vn0=L(()=>{$a1();Xa1();kE()});var lJ="thread-gate",YU="decopilot-hosted-harness",GU="decopilot-hosted-harness-sandboxed",B3="automations",aB="background-tools",CE="task-board-github-reads",_E="jira-push";var Ya1="8";function Ga1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Ya1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Ja1=()=>{};import Nr6 from"pg";async function Wa1($,Z){let{databaseUrl:X,lockTimeoutMs:Q=Br6}=$,Y=$.log??((W)=>console.log(W)),G=new Nr6.Client({connectionString:X});await G.connect();let J=Date.now(),K=!1;try{while(!K){if(K=(await G.query("SELECT pg_try_advisory_lock($1) AS locked",[Ka1.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-J>=Q)throw Error(`Timed out after ${Q}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await N8(Or6)}let W=Date.now()-J;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await G.query("SELECT pg_advisory_unlock($1)",[Ka1.toString()])}catch{}await G.end().catch(()=>{})}}var Ka1=8314027461559302n,Br6=600000,Or6=500;var Ha1=L(()=>{N4()});function Lr6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function kn0($,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 Fa1(){let $=Lr6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:kn0($,"--cpu-prof-dir")??process.cwd(),name:kn0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(kn0($,"--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 Ua1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=RE();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(()=>{}),H70=setInterval(()=>void Z().catch(()=>{}),$),H70.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(H70)clearInterval(H70)}}var H70;var Na1=()=>{};import*as wr6 from"bun:jsc";function Ba1(){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{Dr6()}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=Er6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var Dr6,Er6;var Oa1=L(()=>{({startSamplingProfiler:Dr6,samplingProfilerStackTraces:Er6}=wr6)});function La1(){Fa1();let $=[Ua1(),Gp1(),Ba1()];return()=>{for(let Z of $)Z()}}var wa1=L(()=>{Rl0();Na1();Oa1()});var vE=v((Da1)=>{Object.defineProperty(Da1,"__esModule",{value:!0});Da1.RepublishHeaders=Da1.DirectMsgHeaders=Da1.JsHeaders=Da1.AdvisoryKind=void 0;Da1.isOrderedPushConsumerOptions=jr6;Da1.isPullConsumer=zr6;Da1.isPushConsumer=Pr6;Da1.isBoundPushConsumerOptions=Ar6;function jr6($){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 zr6($){return $.isPullConsumer()}function Pr6($){return $.isPushConsumer()}function Ar6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Da1.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"};Da1.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"};Da1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Da1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var QG=v((ja1)=>{Object.defineProperty(ja1,"__esModule",{value:!0});ja1.TD=ja1.TE=ja1.Empty=void 0;ja1.encode=Cr6;ja1.decode=_r6;ja1.Empty=new Uint8Array(0);ja1.TE=new TextEncoder;ja1.TD=new TextDecoder;function Sr6(...$){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 Cr6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(ja1.TE.encode($[X]));if(Z.length===0)return ja1.Empty;if(Z.length===1)return Z[0];return Sr6(...Z)}function _r6($){if(!$||$.length===0)return"";return ja1.TD.decode($)}});var YG=v((Aa1)=>{Object.defineProperty(Aa1,"__esModule",{value:!0});Aa1.errors=Aa1.PermissionViolationError=Aa1.NoRespondersError=Aa1.TimeoutError=Aa1.RequestError=Aa1.ProtocolError=Aa1.ConnectionError=Aa1.DrainingConnectionError=Aa1.ClosedConnectionError=Aa1.AuthorizationError=Aa1.UserAuthenticationExpiredError=Aa1.InvalidOperationError=Aa1.InvalidArgumentError=Aa1.InvalidSubjectError=void 0;class Cn0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}Aa1.InvalidSubjectError=Cn0;class F70 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 F70(`${$} ${Z}`,X)}}Aa1.InvalidArgumentError=F70;class _n0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}Aa1.InvalidOperationError=_n0;class U70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new U70($);return null}}Aa1.UserAuthenticationExpiredError=U70;class N70 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 N70($);return null}}Aa1.AuthorizationError=N70;class vn0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}Aa1.ClosedConnectionError=vn0;class xn0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}Aa1.DrainingConnectionError=xn0;class fn0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}Aa1.ConnectionError=fn0;class bn0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}Aa1.ProtocolError=bn0;class yn0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof B70}}Aa1.RequestError=yn0;class gn0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}Aa1.TimeoutError=gn0;class B70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}Aa1.NoRespondersError=B70;class O70 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 O70($,X,Q,Y)}}Aa1.PermissionViolationError=O70;Aa1.errors={AuthorizationError:N70,ClosedConnectionError:vn0,ConnectionError:fn0,DrainingConnectionError:xn0,InvalidArgumentError:F70,InvalidOperationError:_n0,InvalidSubjectError:Cn0,NoRespondersError:B70,PermissionViolationError:O70,ProtocolError:bn0,RequestError:yn0,TimeoutError:gn0,UserAuthenticationExpiredError:U70}});var dJ=v((Ma1)=>{Object.defineProperty(Ma1,"__esModule",{value:!0});Ma1.SimpleMutex=Ma1.Perf=void 0;Ma1.extend=or6;Ma1.render=rr6;Ma1.timeout=ar6;Ma1.delay=sr6;Ma1.deadline=er6;Ma1.deferred=un0;Ma1.debugDeferred=$a6;Ma1.shuffle=Za6;Ma1.collect=Xa6;Ma1.jitter=qa1;Ma1.backoff=Qa6;Ma1.nanos=Ya6;Ma1.millis=Ga6;Ma1.randomToken=Wa6;var tr6=QG(),hn0=YG();function or6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function rr6($){return tr6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function ar6($,Z=!0){let X=Z?new hn0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new hn0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function sr6($=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 er6($,Z=1000){let X=un0(),Q=setTimeout(()=>{X.reject(new hn0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function un0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function $a6(){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 Za6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Xa6($){let Z=[];for await(let X of $)Z.push(X);return Z}class Ra1{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})}),$}}Ma1.Perf=Ra1;class Ia1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=un0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Ma1.SimpleMutex=Ia1;function qa1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function Qa6($=[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 qa1(X>Z?$[Z]:$[X])}}}function Ya6($){return $*1e6}function Ga6($){return Math.floor($/1e6)}var Ja6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",JU=new Uint8Array(62);for(let $=0;$<62;$++)JU[$]=Ja6.charCodeAt($);var Ka6=218340105584896;function Wa6(){let $=Math.floor(Math.random()*Ka6),Z=$%62,X=JU[Z];$=($-Z)/62,Z=$%62;let Q=JU[Z];$=($-Z)/62,Z=$%62;let Y=JU[Z];$=($-Z)/62,Z=$%62;let G=JU[Z];$=($-Z)/62,Z=$%62;let J=JU[Z];$=($-Z)/62,Z=$%62;let K=JU[Z];$=($-Z)/62,Z=$%62;let W=JU[Z];$=($-Z)/62;let H=JU[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var fa1=v((va1)=>{Object.defineProperty(va1,"__esModule",{value:!0});va1.nuid=va1.NuidImpl=void 0;var Ra6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",sB=62,w70=12,Ca1=10,ka1=33,Ia6=333,Sa1=w70+Ca1,ln0=new Uint8Array(sB);for(let $=0;$<sB;$++)ln0[$]=Ra6.charCodeAt($);var L70=4294967296,_a1=BigInt(sB)**BigInt(Ca1),Jn=Number(_a1/(1n<<32n)),cn0=Number(_a1%(1n<<32n));function qa6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function Ma6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else qa6($)}class dn0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Sa1),this.cbuf=new Uint8Array(w70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Jn+1)),this.seqLo=Math.floor(Math.random()*L70);while($++<8&&this.seqHi===Jn&&this.seqLo>=cn0);if(this.seqHi===Jn&&this.seqLo>=cn0)this.seqLo=0;this.inc=Math.random()*(Ia6-ka1)+ka1|0}setPre(){Ma6(this.cbuf);for(let $=0;$<w70;$++)this.buf[$]=ln0[this.cbuf[$]%sB]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Sa1-1;X>=w70;X--){let Q=Math.floor($/sB),G=($-Q*sB)*L70+Z,J=Math.floor(G/sB),K=G-J*sB;this.buf[X]=ln0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=L70)this.seqLo-=L70,this.seqHi+=1;if(this.seqHi>Jn||this.seqHi===Jn&&this.seqLo>=cn0)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()}}va1.NuidImpl=dn0;va1.nuid=new dn0});var ha1=v((ya1)=>{Object.defineProperty(ya1,"__esModule",{value:!0});ya1.nuid=ya1.Nuid=void 0;var ba1=fa1();ya1.Nuid=ba1.NuidImpl;ya1.nuid=ba1.nuid});var E70=v((D70)=>{Object.defineProperty(D70,"__esModule",{value:!0});D70.nuid=D70.Nuid=void 0;var ua1=ha1();Object.defineProperty(D70,"Nuid",{enumerable:!0,get:function(){return ua1.Nuid}});Object.defineProperty(D70,"nuid",{enumerable:!0,get:function(){return ua1.nuid}})});var eB=v((ca1)=>{Object.defineProperty(ca1,"__esModule",{value:!0});ca1.DEFAULT_HOST=ca1.DEFAULT_PORT=ca1.Match=void 0;ca1.syncIterator=va6;ca1.createInbox=xa6;var Ca6=E70(),_a6=YG();ca1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function va6($){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 xa6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw _a6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${Ca6.nuid.next()}`}ca1.DEFAULT_PORT=4222;ca1.DEFAULT_HOST="127.0.0.1"});var Kn=v((ia1)=>{Object.defineProperty(ia1,"__esModule",{value:!0});ia1.DataBuffer=void 0;var da1=QG();class ma1{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 da1.TE.encode($)}static toAscii($){return da1.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}}ia1.DataBuffer=ma1});var xE=v((ta1)=>{Object.defineProperty(ta1,"__esModule",{value:!0});ta1.LF=ta1.CR=ta1.CRLF=ta1.CR_LF_LEN=ta1.CR_LF=void 0;ta1.setTransportFactory=la6;ta1.defaultPort=da6;ta1.getUrlParseFn=ma6;ta1.newTransport=ia6;ta1.getResolveFn=na6;ta1.protoLen=pa1;ta1.extractProtocolMessage=pa6;var ha6=QG(),ua6=eB(),ca6=Kn(),GG;function la6($){GG=$}function da6(){return GG!==void 0&&GG.defaultPort!==void 0?GG.defaultPort:ua6.DEFAULT_PORT}function ma6(){return GG!==void 0&&GG.urlParseFn?GG.urlParseFn:void 0}function ia6(){if(!GG||typeof GG.factory!=="function")throw Error("transport fn is not set");return GG.factory()}function na6(){return GG!==void 0&&GG.dnsResolveFn?GG.dnsResolveFn:void 0}ta1.CR_LF=`\r
|
|
1399
|
+
`);Q=G.pop()??"";for(let J of G){let K=Yn(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;oB({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=Yn(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)oB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function $r6($){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 Qn(Number(Y)+1):await Qn(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await G70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let w of W)VE({name:w.name,status:"ready",port:w.port});Zn();let F=eo6(import.meta.dir,"..","..","..","..",".."),U=X===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL: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)pr1(N.stdout),pr1(N.stderr);Xn(G),VE({name:"Vite",status:"ready",port:Number(Y)}),VE({name:"API",status:"ready",port:Number(K.port)});let O=async(w)=>{if(N.kill(w),await N.exited,H.length>0){let{stopServices:D}=await Promise.resolve().then(() => (BZ0(),NZ0));await D(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var Tn0=L(()=>{Dn0();kE();Pn0()});var W70;var Rn0=L(()=>{W70={name:"decocms",version:"4.260.9",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^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 Xr6,Text as tr1}from"ink";import{jsx as Qr6,jsxs as or1}from"react/jsx-runtime";function rr1({version:$}){return or1(Xr6,{flexDirection:"column",marginTop:1,children:[bZ0.map((Z,X)=>Qr6(tr1,{color:yZ0[X],children:Z},X)),or1(tr1,{dimColor:!0,children:[" v",$]})]})}var ar1=L(()=>{di()});import{Box as SE,Text as rB}from"ink";import{Spinner as Yr6}from"@inkjs/ui";import{jsx as XG,jsxs as Ky}from"react/jsx-runtime";function sr1({status:$}){if($==="pending")return XG(Yr6,{label:""});return XG(rB,{color:"green",children:"\u2713"})}function Gr6($){return`${$.name}: ${$.port||"...."}`}function er1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return Ky(SE,{flexDirection:"column",paddingBottom:1,children:[XG(rr1,{version:W70.version}),XG(SE,{marginBottom:1,children:XG(rB,{dimColor:!0,children:"\u2500".repeat(80)})}),XG(SE,{children:Ky(rB,{dimColor:!0,children:["Home: ",X]})}),Ky(SE,{gap:2,children:[$.map((Y)=>Ky(SE,{gap:1,children:[XG(rB,{children:Gr6(Y)}),XG(sr1,{status:Y.status})]},Y.name)),Ky(SE,{gap:1,children:[XG(rB,{children:"Migrations"}),XG(sr1,{status:Z})]})]}),XG(SE,{children:Q?Ky(rB,{children:["Open in browser: ",XG(rB,{color:"cyan",children:Q})]}):XG(rB,{dimColor:!0,children:"Starting..."})})]})}var $a1=L(()=>{Rn0();ar1()});import{Box as Jr6,Text as Gn}from"ink";import{jsx as In0,jsxs as qn0}from"react/jsx-runtime";function Kr6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Za1({logs:$}){return In0(Jr6,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return In0(Gn,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return qn0(Gn,{children:[qn0(Gn,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),In0(Gn,{color:Kr6(Z.status),children:Z.status}),qn0(Gn,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var Xa1=()=>{};var Mn0={};U0(Mn0,{App:()=>Fr6});import{Box as Wr6}from"ink";import{useSyncExternalStore as Hr6}from"react";import{jsx as Qa1,jsxs as Ur6}from"react/jsx-runtime";function Fr6({home:$}){let Z=Hr6(zn0,jn0);return Ur6(Wr6,{flexDirection:"column",children:[Qa1(er1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Qa1(Za1,{logs:Z.logs})]})}var Vn0=L(()=>{$a1();Xa1();kE()});var lJ="thread-gate",YU="decopilot-hosted-harness",GU="decopilot-hosted-harness-sandboxed",B3="automations",aB="background-tools",CE="task-board-github-reads",_E="jira-push";var Ya1="8";function Ga1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Ya1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var Ja1=()=>{};import Nr6 from"pg";async function Wa1($,Z){let{databaseUrl:X,lockTimeoutMs:Q=Br6}=$,Y=$.log??((W)=>console.log(W)),G=new Nr6.Client({connectionString:X});await G.connect();let J=Date.now(),K=!1;try{while(!K){if(K=(await G.query("SELECT pg_try_advisory_lock($1) AS locked",[Ka1.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-J>=Q)throw Error(`Timed out after ${Q}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await N8(Or6)}let W=Date.now()-J;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await G.query("SELECT pg_advisory_unlock($1)",[Ka1.toString()])}catch{}await G.end().catch(()=>{})}}var Ka1=8314027461559302n,Br6=600000,Or6=500;var Ha1=L(()=>{N4()});function Lr6(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function kn0($,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 Fa1(){let $=Lr6();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:kn0($,"--cpu-prof-dir")??process.cwd(),name:kn0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(kn0($,"--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 Ua1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=RE();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(()=>{}),H70=setInterval(()=>void Z().catch(()=>{}),$),H70.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(H70)clearInterval(H70)}}var H70;var Na1=()=>{};import*as wr6 from"bun:jsc";function Ba1(){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{Dr6()}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=Er6()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var Dr6,Er6;var Oa1=L(()=>{({startSamplingProfiler:Dr6,samplingProfilerStackTraces:Er6}=wr6)});function La1(){Fa1();let $=[Ua1(),Gp1(),Ba1()];return()=>{for(let Z of $)Z()}}var wa1=L(()=>{Rl0();Na1();Oa1()});var vE=v((Da1)=>{Object.defineProperty(Da1,"__esModule",{value:!0});Da1.RepublishHeaders=Da1.DirectMsgHeaders=Da1.JsHeaders=Da1.AdvisoryKind=void 0;Da1.isOrderedPushConsumerOptions=jr6;Da1.isPullConsumer=zr6;Da1.isPushConsumer=Pr6;Da1.isBoundPushConsumerOptions=Ar6;function jr6($){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 zr6($){return $.isPullConsumer()}function Pr6($){return $.isPushConsumer()}function Ar6($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Da1.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"};Da1.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"};Da1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Da1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var QG=v((ja1)=>{Object.defineProperty(ja1,"__esModule",{value:!0});ja1.TD=ja1.TE=ja1.Empty=void 0;ja1.encode=Cr6;ja1.decode=_r6;ja1.Empty=new Uint8Array(0);ja1.TE=new TextEncoder;ja1.TD=new TextDecoder;function Sr6(...$){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 Cr6(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(ja1.TE.encode($[X]));if(Z.length===0)return ja1.Empty;if(Z.length===1)return Z[0];return Sr6(...Z)}function _r6($){if(!$||$.length===0)return"";return ja1.TD.decode($)}});var YG=v((Aa1)=>{Object.defineProperty(Aa1,"__esModule",{value:!0});Aa1.errors=Aa1.PermissionViolationError=Aa1.NoRespondersError=Aa1.TimeoutError=Aa1.RequestError=Aa1.ProtocolError=Aa1.ConnectionError=Aa1.DrainingConnectionError=Aa1.ClosedConnectionError=Aa1.AuthorizationError=Aa1.UserAuthenticationExpiredError=Aa1.InvalidOperationError=Aa1.InvalidArgumentError=Aa1.InvalidSubjectError=void 0;class Cn0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}Aa1.InvalidSubjectError=Cn0;class F70 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 F70(`${$} ${Z}`,X)}}Aa1.InvalidArgumentError=F70;class _n0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}Aa1.InvalidOperationError=_n0;class U70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new U70($);return null}}Aa1.UserAuthenticationExpiredError=U70;class N70 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 N70($);return null}}Aa1.AuthorizationError=N70;class vn0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}Aa1.ClosedConnectionError=vn0;class xn0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}Aa1.DrainingConnectionError=xn0;class fn0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}Aa1.ConnectionError=fn0;class bn0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}Aa1.ProtocolError=bn0;class yn0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof B70}}Aa1.RequestError=yn0;class gn0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}Aa1.TimeoutError=gn0;class B70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}Aa1.NoRespondersError=B70;class O70 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 O70($,X,Q,Y)}}Aa1.PermissionViolationError=O70;Aa1.errors={AuthorizationError:N70,ClosedConnectionError:vn0,ConnectionError:fn0,DrainingConnectionError:xn0,InvalidArgumentError:F70,InvalidOperationError:_n0,InvalidSubjectError:Cn0,NoRespondersError:B70,PermissionViolationError:O70,ProtocolError:bn0,RequestError:yn0,TimeoutError:gn0,UserAuthenticationExpiredError:U70}});var dJ=v((Ma1)=>{Object.defineProperty(Ma1,"__esModule",{value:!0});Ma1.SimpleMutex=Ma1.Perf=void 0;Ma1.extend=or6;Ma1.render=rr6;Ma1.timeout=ar6;Ma1.delay=sr6;Ma1.deadline=er6;Ma1.deferred=un0;Ma1.debugDeferred=$a6;Ma1.shuffle=Za6;Ma1.collect=Xa6;Ma1.jitter=qa1;Ma1.backoff=Qa6;Ma1.nanos=Ya6;Ma1.millis=Ga6;Ma1.randomToken=Wa6;var tr6=QG(),hn0=YG();function or6($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function rr6($){return tr6.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function ar6($,Z=!0){let X=Z?new hn0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new hn0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function sr6($=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 er6($,Z=1000){let X=un0(),Q=setTimeout(()=>{X.reject(new hn0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function un0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function $a6(){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 Za6($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Xa6($){let Z=[];for await(let X of $)Z.push(X);return Z}class Ra1{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})}),$}}Ma1.Perf=Ra1;class Ia1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=un0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Ma1.SimpleMutex=Ia1;function qa1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function Qa6($=[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 qa1(X>Z?$[Z]:$[X])}}}function Ya6($){return $*1e6}function Ga6($){return Math.floor($/1e6)}var Ja6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",JU=new Uint8Array(62);for(let $=0;$<62;$++)JU[$]=Ja6.charCodeAt($);var Ka6=218340105584896;function Wa6(){let $=Math.floor(Math.random()*Ka6),Z=$%62,X=JU[Z];$=($-Z)/62,Z=$%62;let Q=JU[Z];$=($-Z)/62,Z=$%62;let Y=JU[Z];$=($-Z)/62,Z=$%62;let G=JU[Z];$=($-Z)/62,Z=$%62;let J=JU[Z];$=($-Z)/62,Z=$%62;let K=JU[Z];$=($-Z)/62,Z=$%62;let W=JU[Z];$=($-Z)/62;let H=JU[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var fa1=v((va1)=>{Object.defineProperty(va1,"__esModule",{value:!0});va1.nuid=va1.NuidImpl=void 0;var Ra6="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",sB=62,w70=12,Ca1=10,ka1=33,Ia6=333,Sa1=w70+Ca1,ln0=new Uint8Array(sB);for(let $=0;$<sB;$++)ln0[$]=Ra6.charCodeAt($);var L70=4294967296,_a1=BigInt(sB)**BigInt(Ca1),Jn=Number(_a1/(1n<<32n)),cn0=Number(_a1%(1n<<32n));function qa6($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function Ma6($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else qa6($)}class dn0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Sa1),this.cbuf=new Uint8Array(w70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Jn+1)),this.seqLo=Math.floor(Math.random()*L70);while($++<8&&this.seqHi===Jn&&this.seqLo>=cn0);if(this.seqHi===Jn&&this.seqLo>=cn0)this.seqLo=0;this.inc=Math.random()*(Ia6-ka1)+ka1|0}setPre(){Ma6(this.cbuf);for(let $=0;$<w70;$++)this.buf[$]=ln0[this.cbuf[$]%sB]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Sa1-1;X>=w70;X--){let Q=Math.floor($/sB),G=($-Q*sB)*L70+Z,J=Math.floor(G/sB),K=G-J*sB;this.buf[X]=ln0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=L70)this.seqLo-=L70,this.seqHi+=1;if(this.seqHi>Jn||this.seqHi===Jn&&this.seqLo>=cn0)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()}}va1.NuidImpl=dn0;va1.nuid=new dn0});var ha1=v((ya1)=>{Object.defineProperty(ya1,"__esModule",{value:!0});ya1.nuid=ya1.Nuid=void 0;var ba1=fa1();ya1.Nuid=ba1.NuidImpl;ya1.nuid=ba1.nuid});var E70=v((D70)=>{Object.defineProperty(D70,"__esModule",{value:!0});D70.nuid=D70.Nuid=void 0;var ua1=ha1();Object.defineProperty(D70,"Nuid",{enumerable:!0,get:function(){return ua1.Nuid}});Object.defineProperty(D70,"nuid",{enumerable:!0,get:function(){return ua1.nuid}})});var eB=v((ca1)=>{Object.defineProperty(ca1,"__esModule",{value:!0});ca1.DEFAULT_HOST=ca1.DEFAULT_PORT=ca1.Match=void 0;ca1.syncIterator=va6;ca1.createInbox=xa6;var Ca6=E70(),_a6=YG();ca1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function va6($){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 xa6($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw _a6.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${Ca6.nuid.next()}`}ca1.DEFAULT_PORT=4222;ca1.DEFAULT_HOST="127.0.0.1"});var Kn=v((ia1)=>{Object.defineProperty(ia1,"__esModule",{value:!0});ia1.DataBuffer=void 0;var da1=QG();class ma1{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 da1.TE.encode($)}static toAscii($){return da1.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}}ia1.DataBuffer=ma1});var xE=v((ta1)=>{Object.defineProperty(ta1,"__esModule",{value:!0});ta1.LF=ta1.CR=ta1.CRLF=ta1.CR_LF_LEN=ta1.CR_LF=void 0;ta1.setTransportFactory=la6;ta1.defaultPort=da6;ta1.getUrlParseFn=ma6;ta1.newTransport=ia6;ta1.getResolveFn=na6;ta1.protoLen=pa1;ta1.extractProtocolMessage=pa6;var ha6=QG(),ua6=eB(),ca6=Kn(),GG;function la6($){GG=$}function da6(){return GG!==void 0&&GG.defaultPort!==void 0?GG.defaultPort:ua6.DEFAULT_PORT}function ma6(){return GG!==void 0&&GG.urlParseFn?GG.urlParseFn:void 0}function ia6(){if(!GG||typeof GG.factory!=="function")throw Error("transport fn is not set");return GG.factory()}function na6(){return GG!==void 0&&GG.dnsResolveFn?GG.dnsResolveFn:void 0}ta1.CR_LF=`\r
|
|
1400
1400
|
`;ta1.CR_LF_LEN=ta1.CR_LF.length;ta1.CRLF=ca6.DataBuffer.fromAscii(ta1.CR_LF);ta1.CR=new Uint8Array(ta1.CRLF)[0];ta1.LF=new Uint8Array(ta1.CRLF)[1];function pa1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===ta1.CR&&$[X]===ta1.LF)return X+1}return 0}function pa6($){let Z=pa1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return ha6.TD.decode(Q)}return""}});var tn0=v((Xs1)=>{Object.defineProperty(Xs1,"__esModule",{value:!0});Xs1.ipV4=ea1;Xs1.isIP=Ys6;Xs1.parseIP=$s1;var Wn=4,fE=16,j70=48,sa1=57,ra1=65,Xs6=70,aa1=97,Qs6=102,pn0=16777215;function ea1($,Z,X,Q){let Y=new Uint8Array(fE);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 Ys6($){return $s1($)!==void 0}function $s1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return Zs1($);case":":return Gs6($)}return}function Zs1($){let Z=new Uint8Array(Wn);for(let X=0;X<Wn;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=Js6($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return ea1(Z[0],Z[1],Z[2],Z[3])}function Gs6($){let Z=new Uint8Array(fE),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<fE){let{n:Y,c:G,ok:J}=Ks6($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=fE-Wn)return;if(Q+Wn>fE)return;let K=Zs1($);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+=Wn;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<fE){if(X<0)return;let Y=fE-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 Js6($){let Z=0,X=0;for(Z=0;Z<$.length&&j70<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=sa1;Z++)if(X=X*10+($.charCodeAt(Z)-j70),X>=pn0)return{n:pn0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function Ks6($){let Z=0,X=0;for(X=0;X<$.length;X++){if(j70<=$.charCodeAt(X)&&$.charCodeAt(X)<=sa1)Z*=16,Z+=$.charCodeAt(X)-j70;else if(aa1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Qs6)Z*=16,Z+=$.charCodeAt(X)-aa1+10;else if(ra1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Xs6)Z*=16,Z+=$.charCodeAt(X)-ra1+10;else break;if(Z>=pn0)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 $p0=v((Ys1)=>{Object.defineProperty(Ys1,"__esModule",{value:!0});Ys1.Servers=Ys1.ServerImpl=void 0;Ys1.isIPV4OrHostname=Qs1;Ys1.hostPort=en0;var on0=xE(),rn0=dJ(),an0=tn0(),Us6=eB(),Ns6=YG();function Qs1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function sn0($){return!Qs1($)}function Bs6($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function en0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=Bs6($),sn0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=sn0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):Us6.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 Wy{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=en0($);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,an0.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}://${sn0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new Wy(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,rn0.shuffle)(Z);return this.resolves=Z,Z}}Ys1.ServerImpl=Wy;class z70{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw Ns6.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,on0.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}=en0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new Wy(Y))}if(this.randomize)(0,rn0.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,an0.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,on0.getUrlParseFn)();$=X?X($):$;let Q=new Wy($,Z);if((0,an0.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 z70.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return z70.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,on0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new Wy(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,rn0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}Ys1.Servers=z70});var P70=v((Ws1)=>{Object.defineProperty(Ws1,"__esModule",{value:!0});Ws1.QueuedIteratorImpl=void 0;var Zp0=dJ(),Js1=YG();class Ks1{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,Zp0.deferred)(),this.yields=[],this.iterClosed=(0,Zp0.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 Js1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new Js1.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,Zp0.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}}Ws1.QueuedIteratorImpl=Ks1});var Xp0=v((Ns1)=>{Object.defineProperty(Ns1,"__esModule",{value:!0});Ns1.MuxSubscription=void 0;var Ds6=eB(),Fs1=YG();class Us1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,Ds6.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 Fs1.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new Fs1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}Ns1.MuxSubscription=Us1});var Qp0=v((Ls1)=>{Object.defineProperty(Ls1,"__esModule",{value:!0});Ls1.Heartbeat=void 0;var Es6=dJ();class Os1{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,Es6.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})}}Ls1.Heartbeat=Os1});var Jp0=v((zs1)=>{Object.defineProperty(zs1,"__esModule",{value:!0});zs1.DenoBuffer=zs1.MAX_SIZE=zs1.AssertionError=void 0;zs1.assert=Es1;zs1.concat=js1;zs1.append=zs6;zs1.readAll=Ps6;zs1.writeAll=As6;var js6=QG();class Yp0 extends Error{constructor($){super($);this.name="AssertionError"}}zs1.AssertionError=Yp0;function Es1($,Z="Assertion failed."){if(!$)throw new Yp0(Z)}var Ds1=32768;zs1.MAX_SIZE=4294967294;function A70($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function js1($,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 zs6($,Z){return js1($,Uint8Array.of(Z))}class Gp0{_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($){Es1($<=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=A70(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(js6.TE.encode($))}write($){let Z=this._grow($.byteLength);return A70($,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)A70(this._buf.subarray(this._off),this._buf);else if(Q+$>zs1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,zs1.MAX_SIZE));A70(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,zs1.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(Ds1);while(!0){let Q=this.capacity-this.length<Ds1,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}}}zs1.DenoBuffer=Gp0;function Ps6($){let Z=new Gp0;return Z.readFrom($),Z.bytes()}function As6($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var Hp0=v((Is1)=>{Object.defineProperty(Is1,"__esModule",{value:!0});Is1.cc=Is1.State=Is1.Parser=Is1.Kind=void 0;Is1.describe=ks6;var Kp0=Jp0(),Wp0=QG();Is1.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function ks6($){let Z,X="";switch($.kind){case Is1.Kind.MSG:Z="MSG";break;case Is1.Kind.OK:Z="OK";break;case Is1.Kind.ERR:Z="ERR",X=Wp0.TD.decode($.data);break;case Is1.Kind.PING:Z="PING";break;case Is1.Kind.PONG:Z="PONG";break;case Is1.Kind.INFO:Z="INFO",X=Wp0.TD.decode($.data)}return`${Z}: ${X}`}function As1(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var Ts1=48,Ss6=57,Hy=67108864;class Rs1{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=Is1.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 Is1.State.OP_START:switch(X){case Is1.cc.M:case Is1.cc.m:this.state=Is1.State.OP_M,this.hdr=-1,this.ma=As1();break;case Is1.cc.H:case Is1.cc.h:this.state=Is1.State.OP_H,this.hdr=0,this.ma=As1();break;case Is1.cc.P:case Is1.cc.p:this.state=Is1.State.OP_P;break;case Is1.cc.PLUS:this.state=Is1.State.OP_PLUS;break;case Is1.cc.MINUS:this.state=Is1.State.OP_MINUS;break;case Is1.cc.I:case Is1.cc.i:this.state=Is1.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_H:switch(X){case Is1.cc.M:case Is1.cc.m:this.state=Is1.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_M:switch(X){case Is1.cc.S:case Is1.cc.s:this.state=Is1.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_MS:switch(X){case Is1.cc.G:case Is1.cc.g:this.state=Is1.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_MSG:switch(X){case Is1.cc.SPACE:case Is1.cc.TAB:this.state=Is1.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_MSG_SPC:switch(X){case Is1.cc.SPACE:case Is1.cc.TAB:continue;default:this.state=Is1.State.MSG_ARG,this.as=Z}break;case Is1.State.MSG_ARG:switch(X){case Is1.cc.CR:this.drop=1;break;case Is1.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=Is1.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case Is1.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:Is1.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Is1.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:Is1.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Is1.State.MSG_END;break;case Is1.State.MSG_END:switch(X){case Is1.cc.NL:this.drop=0,this.as=Z+1,this.state=Is1.State.OP_START;break;default:continue}break;case Is1.State.OP_PLUS:switch(X){case Is1.cc.O:case Is1.cc.o:this.state=Is1.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_PLUS_O:switch(X){case Is1.cc.K:case Is1.cc.k:this.state=Is1.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_PLUS_OK:switch(X){case Is1.cc.NL:this.dispatcher.push({kind:Is1.Kind.OK}),this.drop=0,this.state=Is1.State.OP_START;break}break;case Is1.State.OP_MINUS:switch(X){case Is1.cc.E:case Is1.cc.e:this.state=Is1.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_MINUS_E:switch(X){case Is1.cc.R:case Is1.cc.r:this.state=Is1.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_MINUS_ER:switch(X){case Is1.cc.R:case Is1.cc.r:this.state=Is1.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_MINUS_ERR:switch(X){case Is1.cc.SPACE:case Is1.cc.TAB:this.state=Is1.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_MINUS_ERR_SPC:switch(X){case Is1.cc.SPACE:case Is1.cc.TAB:continue;default:this.state=Is1.State.MINUS_ERR_ARG,this.as=Z}break;case Is1.State.MINUS_ERR_ARG:switch(X){case Is1.cc.CR:this.drop=1;break;case Is1.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:Is1.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=Is1.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case Is1.State.OP_P:switch(X){case Is1.cc.I:case Is1.cc.i:this.state=Is1.State.OP_PI;break;case Is1.cc.O:case Is1.cc.o:this.state=Is1.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_PO:switch(X){case Is1.cc.N:case Is1.cc.n:this.state=Is1.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_PON:switch(X){case Is1.cc.G:case Is1.cc.g:this.state=Is1.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_PONG:switch(X){case Is1.cc.NL:this.dispatcher.push({kind:Is1.Kind.PONG}),this.drop=0,this.state=Is1.State.OP_START;break}break;case Is1.State.OP_PI:switch(X){case Is1.cc.N:case Is1.cc.n:this.state=Is1.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_PIN:switch(X){case Is1.cc.G:case Is1.cc.g:this.state=Is1.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_PING:switch(X){case Is1.cc.NL:this.dispatcher.push({kind:Is1.Kind.PING}),this.drop=0,this.state=Is1.State.OP_START;break}break;case Is1.State.OP_I:switch(X){case Is1.cc.N:case Is1.cc.n:this.state=Is1.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_IN:switch(X){case Is1.cc.F:case Is1.cc.f:this.state=Is1.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_INF:switch(X){case Is1.cc.O:case Is1.cc.o:this.state=Is1.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_INFO:switch(X){case Is1.cc.SPACE:case Is1.cc.TAB:this.state=Is1.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case Is1.State.OP_INFO_SPC:switch(X){case Is1.cc.SPACE:case Is1.cc.TAB:continue;default:this.state=Is1.State.INFO_ARG,this.as=Z}break;case Is1.State.INFO_ARG:switch(X){case Is1.cc.CR:this.drop=1;break;case Is1.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:Is1.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=Is1.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===Is1.State.MSG_ARG||this.state===Is1.State.MINUS_ERR_ARG||this.state===Is1.State.INFO_ARG)&&!this.argBuf)this.argBuf=new Kp0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===Is1.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new Kp0.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 Kp0.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 Is1.cc.SPACE:case Is1.cc.TAB:case Is1.cc.CR:case Is1.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],Hy);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],Hy);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}: ${Wp0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case Is1.cc.SPACE:case Is1.cc.TAB:case Is1.cc.CR:case Is1.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],Hy),this.ma.size=this.protoParseInt(Z[3],Hy);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],Hy),this.ma.size=this.protoParseInt(Z[4],Hy);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]<Ts1||$[Q]>Ss6)return-1;X=X*10+($[Q]-Ts1)}return Z!==void 0&&X>Z?-1:X}}Is1.Parser=Rs1;Is1.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};Is1.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 I70=v((Ms1)=>{Object.defineProperty(Ms1,"__esModule",{value:!0});Ms1.MsgHdrsImpl=void 0;Ms1.canonicalMIMEHeaderKey=Up0;Ms1.headers=vs6;var qs1=QG(),mJ=eB(),R70=YG();function Up0($){let F=!0,U=Array($.length);for(let N=0;N<$.length;N++){let B=$.charCodeAt(N);if(B===58||B<33||B>126)throw R70.InvalidArgumentError.format("header",`'${$[N]}' is not a valid character in a header name`);if(F&&97<=B&&B<=122)B-=32;else if(!F&&65<=B&&B<=90)B+=32;U[N]=B,F=B==45}return String.fromCharCode(...U)}function vs6($=0,Z=""){if($===0&&Z!=="")throw R70.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw R70.InvalidArgumentError.format("description","is required");return new Fy($,Z)}var Fp0="NATS/1.0";class Fy{_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 Fy,Q=qs1.TD.decode($).split(`\r
|
|
1401
1401
|
`),Y=Q[0];if(Y!==Fp0){let G=Y.replace(Fp0,"").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 $=Fp0;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
|
|
1402
1402
|
${Z}: ${X[Q]}`;return`${$}\r
|
|
@@ -2777,7 +2777,7 @@ ${Z}`:Z))}}async listAttachments($){return(await this.request(`/rest/api/3/issue
|
|
|
2777
2777
|
${G}`.trim().slice(0,Zv8)}function bo4($){let Z=$.fields.priority?.name?.toLowerCase();return Z&&_o4[Z]||"medium"}async function e_8($,Z,X){if(!Z.autoDelegate)return X;if(X.status!=="todo"||X.assigneeId)return X;let Q=Z.organizationId,Y=await $.storage.taskBoard.claimUnassignedForSuperAgent(X.id,Q,Z.createdBy,UN);if(!Y)return X;await $.storage.taskBoard.recordActivity({taskBoardItemId:X.id,action:"assignee_changed",actorId:null,data:{from:null,to:C6}});try{await jw($,Y)}catch(G){return console.warn(`[jira] auto-delegate of ${X.id} rejected, un-delegating:`,G instanceof Error?G.message:G),await $.storage.taskBoard.update(X.id,Q,{assigneeId:null,assignedBy:null},UN)}return Y}async function $v8($,Z,X,Q,Y,G,J){let K=Z.organizationId,W=Q.fields.comment;if(W&&W.total===0)return;let H=W&&W.comments.length>=W.total?W.comments:await X.listComments(Q.id),F=await $.storage.jiraIntegrations.knownJiraCommentIds(K,H.map((B)=>B.id)),U=H.filter((B)=>!F.has(B.id)&&B.author?.accountId!==G);if(U.length===0)return;let N=await J.resolve(U.flatMap((B)=>ta(B.body)));for(let B of U){let O=oA0(B.body,N).slice(0,Zv8),w=await $.storage.taskBoard.createComment({taskBoardItemId:Y,organizationId:K,authorId:UN,body:`**${B.author?.displayName??"Jira"} \xB7 via Jira:**
|
|
2778
2778
|
|
|
2779
2779
|
${O}`});if(!w)continue;try{await $.storage.jiraIntegrations.createCommentLink({commentId:w.id,organizationId:K,jiraCommentId:B.id})}catch(D){if(D.code==="23505"){await $.storage.taskBoard.deleteComment(w.id,K,UN);continue}throw D}}}async function yo4($,Z){let{organizationId:X,boardId:Q}=Z;if(!Q)throw Error("No Jira board selected");let Y=Z.statusMapping;if(Object.keys(Y).length===0)throw Error("No status mapping configured");let G=Z.lastSyncedAt===null,J=new $J(Z.siteUrl,Z.email,Z.apiToken),{accountId:K}=await J.myself(),W=new W71(J),H=await J.listBacklogIssueIds(Q),F=vo4(Z),U={created:0,updated:0,unchanged:0,skipped:0},N,B=0,O=0,w=new Date;while(O<s_8){let D=await J.listBoardIssues({boardId:Q,jql:F,startAt:B});if(D.issues.length===0)break;B+=D.issues.length;let E=await $.storage.jiraIntegrations.getLinksByIssueIds(X,D.issues.map((j)=>j.id));await W.resolve(D.issues.flatMap((j)=>[...ta(j.fields.description),...(j.fields.comment?.comments??[]).flatMap((z)=>ta(z.body))]));for(let j of D.issues){if(O>=s_8)break;O++;let z=new Date(j.fields.updated);if(Number.isNaN(z.getTime()))throw Error(`Unparseable updated on ${j.key}`);let A=Y[j.fields.status.name];if(!A||!xo4(j)||H.has(j.id)){U.skipped++,N=z;continue}let P=E.get(j.id);if(P&&new Date(P.jiraUpdatedAt)>=z){U.unchanged++,N=z;continue}let I=j.fields.status.name,q={title:j.fields.summary,description:await fo4(Z.siteUrl,j,W),priority:bo4(j)};if(P){let M=P.jiraStatus!==I,S=await $.storage.taskBoard.getById(P.itemId,X),d=await $.storage.taskBoard.update(P.itemId,X,{...q,...M?{status:A}:{}},UN);if(await $.storage.jiraIntegrations.touchLink(P.itemId,{jiraStatus:I}),S&&M&&S.status!==A)await $.storage.taskBoard.recordActivity({taskBoardItemId:P.itemId,action:"status_changed",actorId:null,data:{from:S.status,to:A}});if(M&&!G)d=await e_8($,Z,d);await $v8($,Z,J,j,P.itemId,K,W),await $.storage.jiraIntegrations.touchLink(P.itemId,{jiraUpdatedAt:z}),p8(X,d),U.updated++}else{let M=await $.storage.taskBoard.create({organizationId:X,...q,status:A,by:UN});try{await $.storage.jiraIntegrations.createLink({itemId:M.id,organizationId:X,jiraIssueId:j.id,jiraIssueKey:j.key,jiraUpdatedAt:new Date(0),jiraStatus:I})}catch(S){if(S.code==="23505"){await $.storage.taskBoard.delete(M.id,X,UN),U.unchanged++,N=z;continue}throw S}if(!G)M=await e_8($,Z,M);await $v8($,Z,J,j,M.id,K,W),await $.storage.jiraIntegrations.touchLink(M.id,{jiraUpdatedAt:z}),p8(X,M),U.created++}N=z}if(B>=D.total)break}if(N===void 0&&O===0)return{counts:U,watermark:w};return{counts:U,watermark:N}}var UN="jira",s_8=500,Co4=5,Zv8=1e4,_o4;var aA0=L(()=>{z9();cH();_5();rA0();_o4={highest:"urgent",high:"high",medium:"medium",low:"low",lowest:"low"}});var Xv8={};U0(Xv8,{setJiraSyncRuntime:()=>N71,registerJiraSyncWorkflow:()=>O71,maybeEnqueueJiraStatusPush:()=>eo4,enqueueJiraCommentPush:()=>B71});import{DBOS as MQ,SchedulerMode as go4}from"@dbos-inc/dbos-sdk";function N71($){sA0=$}function oa(){if(!sA0)throw Error("[jira] sync runtime not initialized \u2014 setJiraSyncRuntime() must run before the workflow fires");return sA0}function NN(){let{db:$,encryptionKey:Z}=oa();return new qv($,new WG(Z))}function uo4(){return new qQ(oa().db)}async function co4($){try{let{db:Z}=oa(),X=await NN().getById($);if(!X)return{id:$,error:"integration no longer exists"};if(!X.enabled)return{id:$};let Q=await iK(Z,X.organizationId);if(!Q)return{id:$,error:"organization no longer exists"};let Y=await hu(Q,X);return"error"in Y?{id:$,error:Y.error}:{id:$}}catch(Z){return{id:$,error:Z instanceof Error?Z.message:String(Z)}}}async function lo4($,Z){let X=await MQ.runStep(()=>NN().listEnabledIds(),{name:"loadJiraIntegrations"});for(let Q of X){let Y=await MQ.runStep(()=>co4(Q),{name:`syncJira:${Q}`});if(Y.error)console.warn(`[jira] sync ${Y.id} failed: ${Y.error}`)}}async function mo4($){let Z=NN();if(!(await Z.getByOrg($.organizationId))?.enabled)return null;let Q=await Z.getLinkByItemId($.taskBoardItemId,$.organizationId);if(!Q)return null;if(await Z.hasCommentLink($.commentId))return null;return{jiraIssueId:Q.jiraIssueId}}async function io4($){return(await oa().db.selectFrom("organization").select("slug").where("id","=",$).executeTakeFirst())?.slug??null}async function no4($,Z,X){let Q=await NN().getByOrg($);if(!Q?.enabled)return null;let G=(await iK(oa().db,$))?.orgFs;if(!G)return null;let J=new $J(Q.siteUrl,Q.email,Q.apiToken);return r_8(X,{read:(K)=>G.read(K.volume,K.path).catch((W)=>{if(W instanceof O3)return null;throw W}),listAttachments:()=>J.listAttachments(Z),upload:(K)=>J.addAttachment(Z,K),mediaIdFor:(K)=>J.resolveMediaId(K)})}async function po4($,Z,X){let Q=NN(),Y=await Q.getByOrg($.organizationId);if(!Y?.enabled)return null;let G=await Q.getLinkByItemId($.taskBoardItemId,$.organizationId);if(!G)return null;if(await Q.hasCommentLink($.commentId))return null;return(await new $J(Y.siteUrl,Y.email,Y.apiToken).addComment(G.jiraIssueId,Z,{header:`${$.authorLabel} \xB7 via Studio:`,media:new Map(X)})).id}async function to4($,Z){try{await NN().createCommentLink({commentId:$.commentId,organizationId:$.organizationId,jiraCommentId:Z})}catch(X){if(X.code!=="23505")throw X}}async function oo4($){let Z=$.body.slice(0,do4),X=await MQ.runStep(()=>mo4($),{name:"resolveCommentTarget",retriesAllowed:!0,maxAttempts:3});if(!X)return;let Q=[],Y=I_8(Z);if(Y.length>0){let J=await MQ.runStep(()=>io4($.organizationId),{name:"readOrgSlug",retriesAllowed:!0,maxAttempts:3});for(let K of o_8(Y,J??""))try{let W=await MQ.runStep(()=>no4($.organizationId,X.jiraIssueId,K),{name:`attachCommentImage:${K.name}`,retriesAllowed:!0,maxAttempts:3});if(W)Q.push([K.target,W])}catch(W){if(!O_8(W))throw W;console.warn(`[jira] could not attach ${K.ref.path}:`,W)}}let G=await MQ.runStep(()=>po4($,Z,Q),{name:"postCommentToJira",retriesAllowed:!1});if(!G)return;await MQ.runStep(()=>to4($,G),{name:"recordCommentLink",retriesAllowed:!0,maxAttempts:4})}async function ro4($){let Z=NN(),X=await Z.getByOrg($.organizationId);if(!X?.enabled)return null;let Q=await Z.getLinkByItemId($.itemId,$.organizationId);if(!Q)return null;let Y=await uo4().getById($.itemId,$.organizationId);if(!Y)return null;let G=Object.entries(X.statusMapping).filter(([,W])=>W===Y.status).map(([W])=>W);if(G.length===0)return null;if(Q.jiraStatus&&G.includes(Q.jiraStatus))return null;let K=await new $J(X.siteUrl,X.email,X.apiToken).listTransitions(Q.jiraIssueId);for(let W of G){let H=K.find((F)=>F.to.name===W);if(H)return{jiraIssueId:Q.jiraIssueId,transitionId:H.id,targetName:W}}return console.warn(`[jira] no transition to ${G.join("/")} available for ${Q.jiraIssueKey}`),null}async function ao4($,Z){let X=NN(),Q=await X.getByOrg($.organizationId);if(!Q?.enabled)return;let Y=await X.getLinkByItemId($.itemId,$.organizationId);if(!Y||Y.jiraStatus===Z.targetName)return;let G=new $J(Q.siteUrl,Q.email,Q.apiToken);if(await G.getStatusName(Z.jiraIssueId)===Z.targetName){await X.touchLink($.itemId,{jiraStatus:Z.targetName});return}await G.transitionIssue(Z.jiraIssueId,Z.transitionId),await X.touchLink($.itemId,{jiraStatus:Z.targetName})}async function so4($){let Z=await MQ.runStep(()=>ro4($),{name:"resolveStatusTransition",retriesAllowed:!0,maxAttempts:3});if(!Z)return;await MQ.runStep(()=>ao4($,Z),{name:"executeStatusTransition",retriesAllowed:!0,maxAttempts:3})}function eo4($,Z){if(Z.updatedBy===UN)return;if(!U71||!sA0)return;let X=U71;(async()=>{if(!await NN().getLinkByItemId(Z.id,$))return;await MQ.startWorkflow(X,{queueName:_E,workflowID:`jira-status:${Z.id}:${Z.status}:${Date.parse(Z.updatedAt)}`,enqueueOptions:{queuePartitionKey:$}})({organizationId:$,itemId:Z.id})})().catch((Q)=>{console.warn(`[jira] status push enqueue failed for ${Z.id}:`,Q instanceof Error?Q.message:Q)})}async function B71($,Z){try{if(!F71)return;if(!await $.storage.jiraIntegrations.getLinkByItemId(Z.taskBoardItemId,Z.organizationId))return;await MQ.startWorkflow(F71,{queueName:_E,workflowID:`jira-cmt-push:${Z.commentId}`,enqueueOptions:{queuePartitionKey:Z.organizationId}})(Z)}catch(X){console.warn(`[jira] comment push enqueue failed for ${Z.commentId}:`,X instanceof Error?X.message:X)}}function O71(){if(H71)return;H71=MQ.registerWorkflow(lo4,{name:"jiraSyncWorkflow"}),MQ.registerScheduled(H71,{name:"jiraSyncWorkflow",crontab:ho4,mode:go4.ExactlyOncePerIntervalWhenActive}),F71=MQ.registerWorkflow(oo4,{name:"jiraCommentPushWorkflow"}),U71=MQ.registerWorkflow(so4,{name:"jiraStatusPushWorkflow"})}var ho4="2-59/10 * * * *",sA0=null,do4=30000,H71=null,F71=null,U71=null;var eA0=L(()=>{L_8();JO();gu();uH();pE();rA0();a_8();X71();aA0()});function L71($,Z,X,Q){OG({event:$,organizationId:Z,properties:{task_id:X.id,reports_task:UY(X),...Q}})}function p8($,Z){q9.emit($,{id:crypto.randomUUID(),type:IO8,source:"task-board",subject:Z.id,data:Z,time:new Date().toISOString()}),Promise.resolve().then(() => (eA0(),Xv8)).then((X)=>X.maybeEnqueueJiraStatusPush($,Z)).catch((X)=>{console.warn("[jira] status push hook unavailable:",X)})}function Qv8($,Z){q9.emit($,{id:crypto.randomUUID(),type:qO8,source:"task-board",subject:Z,data:{id:Z},time:new Date().toISOString()})}function $r4($,Z){return $?[$]:Z}async function uu($,Z,X){let Q=$.metadata?.runMetadata?.taskBoardItemId,Y=!Q&&X?await $.storage.taskBoard.linkedTaskIds(X,Z):[];return $r4(Q,Y)}async function cu($,Z,X){let Q=$.organization?.id;if(!Q)return;try{for(let Y of await uu($,Q,X)){let G=await $.storage.taskBoard.getById(Y,Q);if(!G||$T0[Z]<=$T0[G.status])continue;let J=await $.storage.taskBoard.update(Y,Q,{status:Z},$.auth?.user?.id??G.updatedBy);if(await $.storage.taskBoard.recordActivity({taskBoardItemId:Y,action:"status_changed",actorId:null,data:{from:G.status,to:Z}}).catch((K)=>console.error("[task-board] activity log write failed",K)),p8(Q,J),Z==="in_progress"||Z==="in_review")L71(Z==="in_progress"?"task_run_started":"task_run_completed",Q,J,{from:G.status,via:"pr_open"})}}catch(Y){console.error("[task-board] run transition failed",Y)}}async function ZT0($,Z,X,Q){let Y=$.organization?.id;if(!Y)return;try{let G=uA0(Z);if(!G)return;let J=await uu($,Y,Q);for(let K of J)await $.storage.taskBoard.linkPr({taskBoardItemId:K,organizationId:Y,url:G.url,prNumber:G.number,repoOwner:G.owner,repoName:G.repo,connectionId:X??null})}catch(G){console.error("[task-board] PR capture failed",G)}}async function lu($,Z,X,Q){try{let Y=await $.advanceLinkedTasksToReviewOnThreadFinish(Z,X);for(let G of Y)p8(X,G),L71("task_run_completed",X,G,{from:"in_progress",via:"thread_finish"});for(let G of Y)await $.clearRunRetry(G.id,X).catch(()=>{})}catch(Y){console.error("[task-board] thread-finish transition failed",Y)}await w71($,Z,X),await D71($,Q,Z,X)}async function w71($,Z,X){try{let Q=await $.failedRunInfo(Z,X);if(!Q)return;let Y=W_8(Q);for(let G of await $.linkedTaskIds(Z,X)){let J=await $.getById(G,X);if(!J)continue;if(J.status==="in_review"||J.status==="done")await $.relabelDeliveredFailure(Z,X,Qr4).catch(()=>{});if(J.status!=="in_progress")continue;if(J.threads.some((H)=>H.hasMessages&&H.status==="in_progress"))continue;let K=J.retryAttempts;if(K<Y){let H=O7(Xr4,Zr4,K,2,0.5);if(!await $.scheduleRunRetry(G,X,K+1,new Date(Date.now()+H)))continue;await $.recordActivity({taskBoardItemId:G,action:"status_changed",actorId:null,data:{from:"in_progress",to:"in_progress",retry:K+1,of:Y,reason:Q.errorText??Q.kind}}).catch(()=>{});continue}let W=await $.returnToTodoAfterFailure(G,X,J.updatedBy);if(!W)continue;await $.recordActivity({taskBoardItemId:G,action:"status_changed",actorId:null,data:{from:"in_progress",to:"todo",reason:Q.errorText??Q.kind,retriesSpent:K}}).catch(()=>{}),p8(X,W),L71("task_run_failed",X,J,{reason:Q.kind??"error",retries_spent:K})}}catch(Q){console.error("[task-board] failed-run reaction failed",Q)}}async function D71($,Z,X,Q){try{for(let Y of await $.linkedTaskIds(X,Q)){let G=await $.getById(Y,Q);if(!G)continue;if($T0[G.status]>=$T0.in_review)continue;if(G.threads.some((K)=>K.hasMessages&&(K.status===null||!ma.has(K.status))))continue;if((await $.listPrs(Y,Q)).length>0)continue;await SO8(Z,Q,Y)}}catch(Y){console.error("[task-board] quota refund pass failed",Y)}}async function lH($,Z,X){let Q=Z.organizationId;if(Z.assigneeId!==C6)return!1;try{let Y=await $.storage.taskBoard.unassignSuperAgent(Z.id,Q,Z.updatedBy);if(!Y)return!1;return await A$($,{taskBoardItemId:Z.id,action:"assignee_changed",actorId:null,data:{from:Z.assigneeId,to:null,reason:X}}),console.warn(`[task-board] ${Z.id} handed to a human: ${X}`),p8(Q,Y),!0}catch(Y){return console.error(`[task-board] handing ${Z.id} to a human failed`,Y),!1}}async function XT0($,Z,X){if(!(X instanceof jX))return!1;if(X.reason!=="runs_exhausted")return!1;return await lH($,Z,"per-task run limit reached \u2014 the Super Agent can no longer re-dispatch "+"itself on this task. Re-run it manually to continue."),!0}async function Yv8($,Z){let X=$.organization?.id;if(!X)return;try{let Q=await $.storage.taskBoard.reopenLinkedTasksOnThreadRun(Z,X);for(let Y of Q)p8(X,Y)}catch(Q){console.error("[task-board] thread-run reopen failed",Q)}}function Gv8($){return $.includes("create_pull_request")||$.includes("createPullRequest")}function Jv8($){if(Yr4.test($))return!0;return Gr4.test($)&&Jr4.test($)}var $T0,Zr4=30000,Xr4=120000,Qr4="Run ended after it had already delivered \u2014 the task moved on without it",Yr4,Gr4,Jr4;var _5=L(()=>{g3();l4();uH();yu();H_8();N4();cA0();z9();CX();$T0={triage:0,todo:1,in_progress:2,in_review:3,done:4,archived:5};Yr4=/\bgh\s+pr\s+create\b/,Gr4=/api\.github\.com\/repos\/[^\s"']+\/pulls\b/,Jr4=/(?:-X|--request)\s+POST/});function Kr4($){if($.status==="completed")return"advance";if($.status==="failed"&&$.messageStorageVersion===2&&Q_8($))return"nudge";return"none"}function Wr4($){return["This task is still In Progress on the board and your last run ended without finishing it.","","Look at what you already did (`git log`, `git status`, and the messages above), then either:","- finish the remaining work (and open the PR, if it needed code changes),","- or, if it's actually done, say so in one line \u2014 the board moves the card for you,",$==="decopilot"?"- or, if you're blocked on something only a human knows, call the `user_ask` tool.":"- or, if you're blocked on something only a human knows, say what you need and stop.","","Don't start over and don't redo work you already committed or pushed. You are on the same branch as before \u2014 push to it and update your existing pull request rather than opening a second one."].join(`
|
|
2780
|
-
`)}async function Hr4($,Z,X){let Q=Z.organizationId,Y=await J7($,"smart"),G=X.virtual_mcp_id??Wj(Q),J={id:`stall-nudge-${Z.id}-${X.id}`,role:"user",parts:[{type:"text",text:Wr4(X.harness_id)}]};await new SX({storage:$.storage.threads.messageParts(),orgId:Q,threadId:X.id,runId:X.id}).emitRequestMessage(J),await BN({threadId:X.id,source:"background-tool",request:{messages:[J],models:{credentialId:Y.credentialId,thinking:{id:Y.modelId,title:Y.modelMeta.title}},agent:{id:G},temperature:0.5,toolApprovalLevel:"auto",mode:"default",organizationId:Q,userId:Z.assignedBy??Z.createdBy,harnessId:X.harness_id==="claude-code"?"claude-code":"decopilot",sandboxProviderKind:"agent-sandbox",...X.branch?{branch:X.branch}:{},taskId:X.id,runMetadata:aP0(Z)}},{workflowID:`stall-nudge:${Z.id}:${X.id}`})}async function Fr4($,Z){let X=await $.storage.threads.get(Z);if(!X)return{action:"none",thread:null};return{action:Kr4({status:X.status,messageStorageVersion:X.message_storage_version,harnessId:X.harness_id,sandboxProviderKind:X.sandbox_provider_kind}),thread:X}}function Ur4($,Z=Date.now()){if($.status!=="in_progress")return!1;if($.run_started_at)return!1;return la($,Z)}async function Nr4($,Z){let X=[];for(let Q of Z.threads){if(Q.status!=="in_progress")continue;let Y=await $.storage.threads.get(Q.threadId);if(!Y||!Ur4(Y))continue;if(await $.storage.threads.markRunFailed(Q.threadId,E71,"abandoned"))X.push(Q.threadId),console.warn(`[task-board] failed never-started thread ${Q.threadId} on ${Z.id}`)}return X}async function Kv8($,Z){let X=$.organization?.id;if(!X)return;for(let Q of Z){if(Q.status==="in_progress")try{if((await Nr4($,Q)).length>0)continue}catch(J){console.error(`[task-board] reaping threads for ${Q.id} failed`,J)}let Y;try{Y=Q.repo!=null&&(await $.storage.taskBoard.listPrs(Q.id,X)).length>0}catch(J){console.error(`[task-board] listPrs for ${Q.id} failed`,J);continue}if(!nZ1(Q,Y))continue;let G=Q.threads.find((J)=>J.hasMessages);if(!G)continue;try{let{action:J,thread:K}=await Fr4($,G.threadId);if(J==="none"||!K)continue;if(J==="advance")await lu($.storage.taskBoard,G.threadId,X,$.storage.organizationBilling);else await Hr4($,Q,K)}catch(J){console.error(`[task-board] stall recovery failed for ${Q.id}`,J)}}}var E71="Run never started \u2014 no pod picked it up before the idle window elapsed";var j71=L(()=>{Pa();Lw();YN();ON();uH();c6();_5()});import{z as ra}from"zod";var kv;var z71=L(()=>{m0();KY();gK();j71();kv=m({name:"TASK_BOARD_ITEM_LIST",description:"List all task board items for the organization, plus the `owner/name` repos this organization has imported (the valid values for a task's `repo` field).",annotations:{title:"List Task Board Items",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:ra.object({}),outputSchema:ra.object({items:ra.array(qu),repos:ra.array(ra.string())}),handler:async($,Z)=>{G0(Z),await Z.access.check();let X=Z.organization?.id;if(!X)throw Error("Organization ID required (no active organization in context)");let Q=await Z.storage.taskBoard.list(X),{items:Y}=await Z.storage.connections.list(X,{slug:"mcp-github"}),G=kB8(Y);return Kv8(Z,Q),{items:Q,repos:G}}})});import{z as VY}from"zod";function Or4($,Z){let X=[];for(let{field:G,action:J}of Br4){if(Z[G]===$[G])continue;X.push({action:J,data:{from:$[G],to:Z[G]}})}if(Z.description!==$.description)X.push({action:"description_changed"});let Q=new Set($.tags.map((G)=>G.id));if(Z.tags.length!==$.tags.length||Z.tags.some((G)=>!Q.has(G.id)))X.push({action:"tags_changed",data:{from:$.tags,to:Z.tags}});return X}function Lr4($,Z){if($!==C6)return!1;if(!Z)return!1;return Z.assigneeId!==C6?!0:Z.status==="todo"}function Dr4($,Z,X){let Q=$!==void 0&&wr4.has($);return X&&Q&&Z==="in_review"}var Br4,wr4,Sv;var P71=L(()=>{m0();D91();gK();E91();cH();CX();Iu();_5();yu();g3();Br4=[{field:"status",action:"status_changed"},{field:"assigneeId",action:"assignee_changed"},{field:"priority",action:"priority_changed"},{field:"dueDate",action:"due_date_changed"},{field:"title",action:"title_changed"}];wr4=new Set(["done","archived"]);Sv=m({name:"TASK_BOARD_ITEM_UPDATE",description:"Update a task board item's fields (title, description, status, priority, assignee), and/or link a chat thread to it.",annotations:{title:"Update Task Board Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:VY.object({id:VY.string(),title:VY.string().min(1).optional(),description:VY.string().nullable().optional(),status:yK.optional(),priority:Kv.optional(),assigneeId:VY.string().nullable().optional(),repo:VY.string().nullable().optional(),dueDate:VY.string().datetime().nullable().optional(),sprint:VY.number().int().min(1).max(oP0).nullable().optional(),sortOrder:VY.number().optional(),tagIds:VY.array(VY.string()).optional(),linkThreadId:VY.string().optional(),prUrl:VY.string().nullable().optional().describe('GitHub pull request URL to link to this task, e.g. https://github.com/owner/repo/pull/123. Pass this with `status: "in_review"` after opening a PR for an existing card.')}),outputSchema:VY.object({item:qu}),handler:async($,Z)=>{G0(Z),await Z.access.check();let X=Z.organization?.id;if(!X)throw Error("Organization ID required (no active organization in context)");let Q=$.prUrl?Dw($.prUrl):null;if($.prUrl&&!Q)throw Error(`Not a GitHub pull request URL: ${$.prUrl} (expected https://github.com/<owner>/<repo>/pull/<number>)`);if($.assigneeId)await rP0(Z,X,$.assigneeId);if($.linkThreadId){if(!await Z.storage.taskBoard.getById($.id,X))throw Error(`Task board item not found: ${$.id}`);if(!await Z.storage.threads.get($.linkThreadId))throw Error(`Thread not found: ${$.linkThreadId}`);await Z.storage.taskBoard.linkThread($.id,$.linkThreadId,X)}let Y=$.title!==void 0||$.description!==void 0||$.status!==void 0||$.priority!==void 0||$.assigneeId!==void 0||$.repo!==void 0||$.dueDate!==void 0||$.sprint!==void 0||$.sortOrder!==void 0||$.tagIds!==void 0,G=Y?await Z.storage.taskBoard.getById($.id,X):null;if(Y&&!G)throw Error(`Task board item not found: ${$.id}`);let J=Jv.getStore()!==void 0;if(Dr4($.status,G?.status,J))throw Error("This task is In Review \u2014 a run can't move it to Done or Archived. "+"Leave it in in_review for the reviewer; only a person, or TASK_BOARD_REVIEW_DECISION on a reviewer's own run, closes out a task under review.");let K=$.assigneeId!==void 0&&$.assigneeId!==(G?.assigneeId??null),W=Lr4($.assigneeId,G);if(G&&UY(G)){if($.title!==void 0||$.description!==void 0||$.priority!==void 0)throw Error("This task was generated from your report and can't be edited \u2014 create your own task instead.");if(W)await ch(Z,G,SL())}if($.tagIds!==void 0){let F=await Z.storage.tags.listOrgTags(X),U=new Set(F.map((N)=>N.id));for(let N of $.tagIds)if(!U.has(N))throw Error(`Tag not found: ${N}`);await Z.storage.taskBoard.setItemTags($.id,$.tagIds,w1(Z))}let H;if(Y)H=await Z.storage.taskBoard.update($.id,X,{title:$.title,description:$.description,status:W?"todo":$.status,priority:$.priority,assigneeId:$.assigneeId,assignedBy:K?$.assigneeId?w1(Z):null:void 0,repo:$.repo,dueDate:$.dueDate,sprint:$.sprint,sortOrder:$.sortOrder},w1(Z));else{let F=await Z.storage.taskBoard.getById($.id,X);if(!F)throw Error(`Task board item not found: ${$.id}`);H=F}if(Q)await Z.storage.taskBoard.linkPr({taskBoardItemId:H.id,organizationId:X,url:Q.url,prNumber:Q.number,repoOwner:Q.owner,repoName:Q.repo,connectionId:null});if(G){let F=w1(Z),U=Or4(G,H);if(U.length>0)await B_8(Z,U.map((N)=>({taskBoardItemId:H.id,actorId:F,...N})))}if(Y||$.linkThreadId||Q)p8(X,H);if(W)await jw(Z,H,{userInitiated:!0});return{item:H}}})});import{z as QT0}from"zod";var Cv;var A71=L(()=>{m0();_5();Cv=m({name:"TASK_BOARD_ITEM_DELETE",description:"Delete a task board item. A reports-pushed task also dismisses its finding, so the next diagnostic import won't re-create the card.",annotations:{title:"Delete Task Board Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:QT0.object({id:QT0.string()}),outputSchema:QT0.object({success:QT0.boolean()}),handler:async($,Z)=>{G0(Z),await Z.access.check();let X=Z.organization?.id;if(!X)throw Error("Organization ID required (no active organization in context)");if(!await Z.storage.taskBoard.delete($.id,X,w1(Z)??"system"))throw Error(`Task board item not found: ${$.id}`);return Qv8(X,$.id),{success:!0}}})});function Er4($){let Z=new Map($.map((G)=>[G.id,G])),X=new Map;for(let G of Ru($)){let J=Wv8(G.owner,G.repo);X.set(J,[...X.get(J)??[],G])}if(X.size!==1)return null;let Q=[...X.values()][0],Y=Q.find((G)=>{let J=Z.get(G.connectionId);return J?Gz(J):!1})??Q[0];return{connectionId:Y.connectionId,owner:Y.owner,name:Y.repo,installationId:Y.installationId,url:`https://github.com/${Y.owner}/${Y.repo}`}}async function YT0($,Z){try{let{items:X}=await $.storage.connections.list(Z,{slug:"mcp-github"}),Q=Er4(X);if(Q)return{repo:Q};let Y=new Map;for(let J of Ru(X)){let K=Wv8(J.owner,J.repo);if(!Y.has(K))Y.set(K,{connectionId:J.connectionId,repo:`${J.owner}/${J.repo}`})}let G=Y;if(G.size===0)return console.warn(`[task-board] claude-code skipped for org ${Z}: `+"no importable repos \u2014 running Decopilot"),null;return console.warn(`[task-board] claude-code for org ${Z}: ${G.size} importable repos \u2014 the run picks one with TASK_ADD_REPO`),{choices:[...G.values()]}}catch(X){return console.warn("[task-board] repo lookup for claude-code failed",X),null}}function Hv8($,Z,X){let Q=["You've been assigned this task. Complete it and finish with a pull request if it makes sense (like a coding task) or is explicitly requested.","","You are running AUTONOMOUSLY \u2014 no human is watching, so drive this to "+"completion yourself. Make reasonable decisions and move on; do not stop to ask for confirmation.","",`Title: ${$.title}`];if($.description)Q.push("","Description:",$.description);if(Q.push("",Z?`The repository ${Z.owner}/${Z.name} is already cloned at your working directory, on its own branch. \`git\` and \`gh\` are authenticated. ${Ur}`:["Your working directory is EMPTY: this organization has several repositories, so nothing has been cloned yet. FIRST call `mcp__studio__TASK_ADD_REPO` with the connectionId of the repository this task is about. It clones that repository into your working directory and waits for the checkout, so once it returns the repository is there on its own branch and `git` and `gh` are authenticated. Do not read files, run `git`, or run `gh` before it returns; there is nothing there yet.","","Repositories in this organization:",...(X?.repoChoices??[]).map((Y)=>`- ${Y.repo} (connectionId: ${Y.connectionId})`),X?.repoChoices?.length?"Pick the one the task is about. If the task doesn't say and the names don't settle it, take the first.":"Call `mcp__studio__TASK_ADD_REPO` with no arguments to list them."].join(`
|
|
2780
|
+
`)}async function Hr4($,Z,X){let Q=Z.organizationId,Y=await J7($,"smart"),G=X.virtual_mcp_id??Wj(Q),J={id:`stall-nudge-${Z.id}-${X.id}`,role:"user",parts:[{type:"text",text:Wr4(X.harness_id)}]};await new SX({storage:$.storage.threads.messageParts(),orgId:Q,threadId:X.id,runId:X.id}).emitRequestMessage(J),await BN({threadId:X.id,source:"background-tool",request:{messages:[J],models:{credentialId:Y.credentialId,thinking:{id:Y.modelId,title:Y.modelMeta.title}},agent:{id:G},temperature:0.5,toolApprovalLevel:"auto",mode:"default",organizationId:Q,userId:Z.assignedBy??Z.createdBy,harnessId:X.harness_id==="claude-code"?"claude-code":"decopilot",sandboxProviderKind:"agent-sandbox",...X.branch?{branch:X.branch}:{},taskId:X.id,runMetadata:aP0(Z)}},{workflowID:`stall-nudge:${Z.id}:${X.id}`})}async function Fr4($,Z){let X=await $.storage.threads.get(Z);if(!X)return{action:"none",thread:null};return{action:Kr4({status:X.status,messageStorageVersion:X.message_storage_version,harnessId:X.harness_id,sandboxProviderKind:X.sandbox_provider_kind}),thread:X}}function Ur4($,Z=Date.now()){if($.status!=="in_progress")return!1;if($.run_started_at)return!1;return la($,Z)}async function Nr4($,Z){let X=[];for(let Q of Z.threads){if(Q.status!=="in_progress")continue;let Y=await $.storage.threads.get(Q.threadId);if(!Y||!Ur4(Y))continue;if(await $.storage.threads.markRunFailed(Q.threadId,E71,"abandoned"))X.push(Q.threadId),console.warn(`[task-board] failed never-started thread ${Q.threadId} on ${Z.id}`)}return X}async function Kv8($,Z){let X=$.organization?.id;if(!X)return;for(let Q of Z){if(Q.status==="in_progress")try{if((await Nr4($,Q)).length>0)continue}catch(J){console.error(`[task-board] reaping threads for ${Q.id} failed`,J)}let Y;try{Y=Q.repo!=null&&(await $.storage.taskBoard.listPrs(Q.id,X)).length>0}catch(J){console.error(`[task-board] listPrs for ${Q.id} failed`,J);continue}if(!nZ1(Q,Y))continue;let G=Q.threads.find((J)=>J.hasMessages);if(!G)continue;try{let{action:J,thread:K}=await Fr4($,G.threadId);if(J==="none"||!K)continue;if(J==="advance")await lu($.storage.taskBoard,G.threadId,X,$.storage.organizationBilling);else await Hr4($,Q,K)}catch(J){console.error(`[task-board] stall recovery failed for ${Q.id}`,J)}}}var E71="Run never started \u2014 no pod picked it up before the idle window elapsed";var j71=L(()=>{Pa();Lw();YN();ON();uH();c6();_5()});import{z as ra}from"zod";var kv;var z71=L(()=>{m0();KY();gK();j71();kv=m({name:"TASK_BOARD_ITEM_LIST",description:"List all task board items for the organization, plus the `owner/name` repos this organization has imported (the valid values for a task's `repo` field).",annotations:{title:"List Task Board Items",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:ra.object({}),outputSchema:ra.object({items:ra.array(qu),repos:ra.array(ra.string())}),handler:async($,Z)=>{G0(Z),await Z.access.check();let X=Z.organization?.id;if(!X)throw Error("Organization ID required (no active organization in context)");let[Q,{items:Y}]=await Promise.all([Z.storage.taskBoard.list(X),Z.storage.connections.list(X,{slug:"mcp-github"})]),G=kB8(Y);return Kv8(Z,Q),{items:Q,repos:G}}})});import{z as VY}from"zod";function Or4($,Z){let X=[];for(let{field:G,action:J}of Br4){if(Z[G]===$[G])continue;X.push({action:J,data:{from:$[G],to:Z[G]}})}if(Z.description!==$.description)X.push({action:"description_changed"});let Q=new Set($.tags.map((G)=>G.id));if(Z.tags.length!==$.tags.length||Z.tags.some((G)=>!Q.has(G.id)))X.push({action:"tags_changed",data:{from:$.tags,to:Z.tags}});return X}function Lr4($,Z){if($!==C6)return!1;if(!Z)return!1;return Z.assigneeId!==C6?!0:Z.status==="todo"}function Dr4($,Z,X){let Q=$!==void 0&&wr4.has($);return X&&Q&&Z==="in_review"}var Br4,wr4,Sv;var P71=L(()=>{m0();D91();gK();E91();cH();CX();Iu();_5();yu();g3();Br4=[{field:"status",action:"status_changed"},{field:"assigneeId",action:"assignee_changed"},{field:"priority",action:"priority_changed"},{field:"dueDate",action:"due_date_changed"},{field:"title",action:"title_changed"}];wr4=new Set(["done","archived"]);Sv=m({name:"TASK_BOARD_ITEM_UPDATE",description:"Update a task board item's fields (title, description, status, priority, assignee), and/or link a chat thread to it.",annotations:{title:"Update Task Board Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:VY.object({id:VY.string(),title:VY.string().min(1).optional(),description:VY.string().nullable().optional(),status:yK.optional(),priority:Kv.optional(),assigneeId:VY.string().nullable().optional(),repo:VY.string().nullable().optional(),dueDate:VY.string().datetime().nullable().optional(),sprint:VY.number().int().min(1).max(oP0).nullable().optional(),sortOrder:VY.number().optional(),tagIds:VY.array(VY.string()).optional(),linkThreadId:VY.string().optional(),prUrl:VY.string().nullable().optional().describe('GitHub pull request URL to link to this task, e.g. https://github.com/owner/repo/pull/123. Pass this with `status: "in_review"` after opening a PR for an existing card.')}),outputSchema:VY.object({item:qu}),handler:async($,Z)=>{G0(Z),await Z.access.check();let X=Z.organization?.id;if(!X)throw Error("Organization ID required (no active organization in context)");let Q=$.prUrl?Dw($.prUrl):null;if($.prUrl&&!Q)throw Error(`Not a GitHub pull request URL: ${$.prUrl} (expected https://github.com/<owner>/<repo>/pull/<number>)`);if($.assigneeId)await rP0(Z,X,$.assigneeId);if($.linkThreadId){if(!await Z.storage.taskBoard.getById($.id,X))throw Error(`Task board item not found: ${$.id}`);if(!await Z.storage.threads.get($.linkThreadId))throw Error(`Thread not found: ${$.linkThreadId}`);await Z.storage.taskBoard.linkThread($.id,$.linkThreadId,X)}let Y=$.title!==void 0||$.description!==void 0||$.status!==void 0||$.priority!==void 0||$.assigneeId!==void 0||$.repo!==void 0||$.dueDate!==void 0||$.sprint!==void 0||$.sortOrder!==void 0||$.tagIds!==void 0,G=Y?await Z.storage.taskBoard.getById($.id,X):null;if(Y&&!G)throw Error(`Task board item not found: ${$.id}`);let J=Jv.getStore()!==void 0;if(Dr4($.status,G?.status,J))throw Error("This task is In Review \u2014 a run can't move it to Done or Archived. "+"Leave it in in_review for the reviewer; only a person, or TASK_BOARD_REVIEW_DECISION on a reviewer's own run, closes out a task under review.");let K=$.assigneeId!==void 0&&$.assigneeId!==(G?.assigneeId??null),W=Lr4($.assigneeId,G);if(G&&UY(G)){if($.title!==void 0||$.description!==void 0||$.priority!==void 0)throw Error("This task was generated from your report and can't be edited \u2014 create your own task instead.");if(W)await ch(Z,G,SL())}if($.tagIds!==void 0){let F=await Z.storage.tags.listOrgTags(X),U=new Set(F.map((N)=>N.id));for(let N of $.tagIds)if(!U.has(N))throw Error(`Tag not found: ${N}`);await Z.storage.taskBoard.setItemTags($.id,$.tagIds,w1(Z))}let H;if(Y)H=await Z.storage.taskBoard.update($.id,X,{title:$.title,description:$.description,status:W?"todo":$.status,priority:$.priority,assigneeId:$.assigneeId,assignedBy:K?$.assigneeId?w1(Z):null:void 0,repo:$.repo,dueDate:$.dueDate,sprint:$.sprint,sortOrder:$.sortOrder},w1(Z));else{let F=await Z.storage.taskBoard.getById($.id,X);if(!F)throw Error(`Task board item not found: ${$.id}`);H=F}if(Q)await Z.storage.taskBoard.linkPr({taskBoardItemId:H.id,organizationId:X,url:Q.url,prNumber:Q.number,repoOwner:Q.owner,repoName:Q.repo,connectionId:null});if(G){let F=w1(Z),U=Or4(G,H);if(U.length>0)await B_8(Z,U.map((N)=>({taskBoardItemId:H.id,actorId:F,...N})))}if(Y||$.linkThreadId||Q)p8(X,H);if(W)await jw(Z,H,{userInitiated:!0});return{item:H}}})});import{z as QT0}from"zod";var Cv;var A71=L(()=>{m0();_5();Cv=m({name:"TASK_BOARD_ITEM_DELETE",description:"Delete a task board item. A reports-pushed task also dismisses its finding, so the next diagnostic import won't re-create the card.",annotations:{title:"Delete Task Board Item",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:QT0.object({id:QT0.string()}),outputSchema:QT0.object({success:QT0.boolean()}),handler:async($,Z)=>{G0(Z),await Z.access.check();let X=Z.organization?.id;if(!X)throw Error("Organization ID required (no active organization in context)");if(!await Z.storage.taskBoard.delete($.id,X,w1(Z)??"system"))throw Error(`Task board item not found: ${$.id}`);return Qv8(X,$.id),{success:!0}}})});function Er4($){let Z=new Map($.map((G)=>[G.id,G])),X=new Map;for(let G of Ru($)){let J=Wv8(G.owner,G.repo);X.set(J,[...X.get(J)??[],G])}if(X.size!==1)return null;let Q=[...X.values()][0],Y=Q.find((G)=>{let J=Z.get(G.connectionId);return J?Gz(J):!1})??Q[0];return{connectionId:Y.connectionId,owner:Y.owner,name:Y.repo,installationId:Y.installationId,url:`https://github.com/${Y.owner}/${Y.repo}`}}async function YT0($,Z){try{let{items:X}=await $.storage.connections.list(Z,{slug:"mcp-github"}),Q=Er4(X);if(Q)return{repo:Q};let Y=new Map;for(let J of Ru(X)){let K=Wv8(J.owner,J.repo);if(!Y.has(K))Y.set(K,{connectionId:J.connectionId,repo:`${J.owner}/${J.repo}`})}let G=Y;if(G.size===0)return console.warn(`[task-board] claude-code skipped for org ${Z}: `+"no importable repos \u2014 running Decopilot"),null;return console.warn(`[task-board] claude-code for org ${Z}: ${G.size} importable repos \u2014 the run picks one with TASK_ADD_REPO`),{choices:[...G.values()]}}catch(X){return console.warn("[task-board] repo lookup for claude-code failed",X),null}}function Hv8($,Z,X){let Q=["You've been assigned this task. Complete it and finish with a pull request if it makes sense (like a coding task) or is explicitly requested.","","You are running AUTONOMOUSLY \u2014 no human is watching, so drive this to "+"completion yourself. Make reasonable decisions and move on; do not stop to ask for confirmation.","",`Title: ${$.title}`];if($.description)Q.push("","Description:",$.description);if(Q.push("",Z?`The repository ${Z.owner}/${Z.name} is already cloned at your working directory, on its own branch. \`git\` and \`gh\` are authenticated. ${Ur}`:["Your working directory is EMPTY: this organization has several repositories, so nothing has been cloned yet. FIRST call `mcp__studio__TASK_ADD_REPO` with the connectionId of the repository this task is about. It clones that repository into your working directory and waits for the checkout, so once it returns the repository is there on its own branch and `git` and `gh` are authenticated. Do not read files, run `git`, or run `gh` before it returns; there is nothing there yet.","","Repositories in this organization:",...(X?.repoChoices??[]).map((Y)=>`- ${Y.repo} (connectionId: ${Y.connectionId})`),X?.repoChoices?.length?"Pick the one the task is about. If the task doesn't say and the names don't settle it, take the first.":"Call `mcp__studio__TASK_ADD_REPO` with no arguments to list them."].join(`
|
|
2781
2781
|
`),""),X?.resolveConflict&&X.pr)Q.push(`Pull request #${X.pr.number} (${X.pr.url}) is approved but has a MERGE CONFLICT with its base branch.`,`Check that branch out (\`gh pr checkout ${X.pr.number}\`), merge or rebase the base branch into it, resolve the conflicts, and push to update the SAME pull request \u2014 do NOT open a new one. Resolve by preserving BOTH sides' intent; never blindly discard either side, and change only what the conflict requires.`,"");else if(X?.feedback)Q.push(X.pr?`A reviewer requested changes on pull request #${X.pr.number} (${X.pr.url}):`:"A reviewer requested changes on your previous work:",X.feedback,X.pr?`Check that branch out (\`gh pr checkout ${X.pr.number}\`) before editing, address the feedback, then push to update the SAME pull request \u2014 do NOT open a new one.`:"Address this feedback.","The reviewer judged the DEPLOYED PREVIEW, not your diff. Reproduce their check there before you push again \u2014 a fix that only looks right in the code comes straight back.","");else if(X?.pr)Q.push(`This task already has an open pull request #${X.pr.number} (${X.pr.url}), and you are already on its branch.`,"Continue that work: commit and push to update the SAME pull request \u2014 do NOT open a new one. If it already does everything the task asks, say so and stop rather than changing it.","");return Q.push("How to finish:","- Make the change, commit it, push the branch, and open a pull request"+(X?.pr?" \u2014 or push to the existing one, per the instruction above.":"."),"- Change only what the task needs. Don't refactor around it.","- The change must be REACHABLE from the surface the task names: edit the component that route actually renders, not one that merely looks like the right place. A change nothing imports is dead code, and it is the most common reason a task comes back rejected.","- Before handing over, VERIFY the task's outcome the way the reviewer will: get the PR's `previewUrl` from `mcp__studio__TASK_BOARD_ITEM_PRS_GET` (give the deploy a minute), open the affected route there, and confirm the behaviour actually happens. A green test suite is not the bar \u2014 the reviewer approves what it can see on the preview.","- As soon as `gh pr create` prints the URL, call `mcp__studio__TASK_BOARD_ITEM_PR_LINK` with that url. Do this even if you also mention the PR in a comment \u2014 the reviewers are dispatched from the linked PR, not from your message.",`- Then move this task to review on the board: call \`mcp__studio__TASK_BOARD_ITEM_UPDATE\` with id "${$.id}" and status "in_review". Pass ONLY the fields you are changing.`,'- If the task turns out to need no code change, do NOT open a PR: explain why in a comment on the task (`mcp__studio__TASK_BOARD_COMMENT_CREATE`) and move it to "done" instead of "in_review". There is nothing for a reviewer to review, so In Review would strand it.',`- Anything a reviewer should know (a decision you made, something you found and deliberately left alone, a question) goes on the task as a comment: \`mcp__studio__TASK_BOARD_COMMENT_CREATE\` with taskBoardItemId "${$.id}". Read what's already there first with \`mcp__studio__TASK_BOARD_COMMENT_LIST\` \u2014 a comment may be addressed to you.`,"",`(task id: ${$.id})`),Q.join(`
|
|
2782
2782
|
`)}var Wv8=($,Z)=>`${$}/${Z}`.toLowerCase();var T71=L(()=>{pP0();KY();z9()});import{createHmac as jr4,randomBytes as zr4,timingSafeEqual as Pr4}from"crypto";function Ar4(){if(GT0)return GT0;let $;try{let Z=o0();$=Z.studioJwtSecret??Z.betterAuthSecret}catch{$=void 0}return GT0=$?Buffer.from($):zr4(32),GT0}function R71($,Z,X){return`rtok_${jr4("sha256",Ar4()).update(`${$}:${Z}:${X.toISOString()}`).digest("base64url")}`}function Fv8($,Z,X,Q){let Y=Buffer.from($),G=Buffer.from(R71(Z,X,Q));return Y.length===G.length&&Pr4(Y,G)}var GT0=null;var I71=L(()=>{_8()});import{createHash as Tr4}from"crypto";function q71($,Z){if($.status===null||Uv8.has($.status))return!1;return!la({updated_at:$.lastActiveAt,last_progress_at:null},Z)}function Mr4($,Z){return Z-$>=qr4}async function JT0($,Z,X){let Q=await $.storage.organizationSettings.get(Z.organizationId),Y=uU(Q?.flags);if(Y.length===0)return;let G=X30(Q?.flags,"cheap_reviewer_model")?"reviewer":"default",J=await vr4($,Z),K=new Date(J);await Promise.all(Y.map(async(W)=>{if(Cr4(Z,W,J)){await lH($,Z,`${hh[W]} failed ${M71} times on `+"this review \u2014 it will not be retried");return}if(W==="qa"&&X?.previewMatchesHead===!1){if(Mr4(J,Date.now()))await lH($,Z,"the pull request's deploy preview is not showing its latest commit (its checks never went green), so QA cannot verify this change against what the PR actually does");return}if(_r4(Z,W,J))return;let H=Vr4(Z,W,J);await br4($,Z,W,K,H,G).catch((F)=>console.error(`[task-board] ${W} reviewer enqueue failed`,F))}))}function Vr4($,Z,X,Q=Date.now()){return $.threads.filter((Y)=>uh(Y.title,Z)&&V71(Y,Q)&&new Date(Y.createdAt).getTime()>=X).length}function kr4($,Z){if(!$||!Z||!("choices"in Z))return null;return Z.choices.find((X)=>X.repo===$)?.connectionId??null}function Sr4($,Z,X){let Q=$.threads.filter((Y)=>uh(Y.title,Z)&&Y.status==="completed"&&new Date(Y.createdAt).getTime()<X).map((Y)=>new Date(Y.lastActiveAt).getTime()).filter((Y)=>Number.isFinite(Y));return Q.length===0?0:Math.max(...Q)}function V71($,Z){if($.status==="failed")return!0;return $.status!==null&&!Uv8.has($.status)&&!q71($,Z)}function Nv8($,Z,X,Q=Date.now()){return $.threads.filter((Y)=>{if(!uh(Y.title,Z))return!1;return q71(Y,Q)||new Date(Y.createdAt).getTime()>=X})}function Cr4($,Z,X,Q=Date.now()){let Y=Nv8($,Z,X,Q);return Y.length>0&&Y.every((G)=>V71(G,Q))&&Y.length>=M71}function _r4($,Z,X,Q=Date.now()){let Y=Nv8($,Z,X,Q);if(Y.length===0)return!1;if(Y.some((J)=>q71(J,Q)))return!0;let G=Y.filter((J)=>V71(J,Q));if(G.length>=M71)return!0;return G.length!==Y.length}async function vr4($,Z){let X=await $.storage.taskBoard.listActivity(Z.id,Z.organizationId);return cU(X)}function xr4($,Z,X,Q){return`review:${$}:${Z}:${X.toISOString()}:${Q}`}function fr4($){return`thrd_${Tr4("sha256").update($).digest("hex").slice(0,32)}`}async function br4($,Z,X,Q,Y,G){let J=Z.organizationId,K=R71(Z.id,X,Q),W=await YT0($,J),H=W&&"repo"in W?W.repo:null,F=W!==null,U=Sr4(Z,X,Q.getTime()),N=kr4(Z.repo,W),B=F?"mcp__studio__TASK_BOARD_ITEM_PRS_GET":"TASK_BOARD_ITEM_PRS_GET",O=F?"mcp__studio__TASK_BOARD_REVIEW_DECISION":"TASK_BOARD_REVIEW_DECISION",w=F?"mcp__studio__TASK_BOARD_COMMENT_CREATE":"TASK_BOARD_COMMENT_CREATE",D=F?"mcp__studio__TASK_BOARD_COMMENT_LIST":"TASK_BOARD_COMMENT_LIST",E=[Ir4[X],"","You are running AUTONOMOUSLY \u2014 no human is watching this run. Making the "+'approve / request-changes call IS your job; you are the decision-maker, not an assistant asking a human to decide. NEVER use `user_ask` to ask whether to approve, or to confirm an obvious call ("Approve the PR?"). Reserve `user_ask` for a genuine, unresolvable blocker only a human can clear (e.g. a missing credential, or a requirement so ambiguous you '+"truly cannot judge the outcome) \u2014 that should be rare. When in doubt "+"between asking and deciding, DECIDE.","","Do NOT push commits, merge, or change the code to fix what you find. You "+"are reviewing, not implementing \u2014 the tools that would let you rewrite "+"the checkout are removed from this run on purpose. Report what you find in your decision instead."].join(`
|
|
2783
2783
|
`),j=[...F?[]:[E,""],`Task title: ${Z.title}`,Z.description?`
|