@p4code/cli 0.8.3 → 0.8.5
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/{AcpMcpStdioBridge-D_JnxPWS.mjs → AcpMcpStdioBridge-CD9BQr2l.mjs} +1 -1
- package/dist/{AcpMcpStdioBridge-DBONIB-w.mjs → AcpMcpStdioBridge-DHwGLtep.mjs} +61 -4
- package/dist/bin.mjs +2 -2
- package/dist/{binCli-DouSNynJ.mjs → binCli-D9Qk_k5i.mjs} +492 -292
- package/dist/client/.vite/manifest.json +2138 -2115
- package/dist/client/assets/{AnimatedHeight-DoG4b7y8.js → AnimatedHeight-DKdClmyw.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-DbeJoeXz.js → AuthSurfaceShell-UJgufrYU.js} +2 -2
- package/dist/client/assets/{CSPContext-DkFc4cYo.js → CSPContext-CTpTfAqS.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-9B_WUPVm.js +2 -0
- package/dist/client/assets/{ChatMarkdown-CLD9Y6dg.js → ChatMarkdown-B9_nJM54.js} +12 -12
- package/dist/client/assets/CodexSetupSection.logic-YSEDjbLd.js +2 -0
- package/dist/client/assets/{ComboboxClear-ZQvkAjz8.js → ComboboxClear-TEL6MsPn.js} +2 -2
- package/dist/client/assets/{CommandBlock-c98wFxMU.js → CommandBlock-C6bCrWJ5.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-CBuOXkT9.js → ComposerPromptEditor-BpT2majW.js} +11 -11
- package/dist/client/assets/{CompositeRoot-BMUI_bmJ.js → CompositeRoot-CZuZX6hs.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-B69zfKRh.js → ConnectionStatusDot-BX6msmak.js} +2 -2
- package/dist/client/assets/{DevicePanel-1xw7KQ15.js → DevicePanel-DavxmX2w.js} +2 -2
- package/dist/client/assets/{DeviceSetup-DemgUuG-.js → DeviceSetup-CZX8TKF_.js} +2 -2
- package/dist/client/assets/{DialogTitle-BXot7RA0.js → DialogTitle-CLcXbJRs.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-vAZP7JBy.js → DiffCommentAnnotation-B21n3tGU.js} +2 -2
- package/dist/client/assets/{DiffFileTree-BhqF8nD5.js → DiffFileTree--L--vp02.js} +2 -2
- package/dist/client/assets/DiffPanel-T4lIPUlN.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-D4VIo5Vu.js → DiffWorkerPoolProvider-Cxzr_uYq.js} +3 -3
- package/dist/client/assets/{EnvironmentMachineIcon-DPQkDtvr.js → EnvironmentMachineIcon-CGINHXnT.js} +2 -2
- package/dist/client/assets/{ExpandableText-EZ9C25tN.js → ExpandableText-D1ewr-yU.js} +2 -2
- package/dist/client/assets/{FieldControl-C4IsJLMZ.js → FieldControl-BVq7aDv3.js} +2 -2
- package/dist/client/assets/{FileDiff-H9QHqXa0.js → FileDiff-C0ZCBwBc.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-DGm_SU_e.js → FilePreviewPanel-CxOIUI0_.js} +4 -4
- package/dist/client/assets/{FoldedSettingsSection-BSYFyChk.js → FoldedSettingsSection-DmcJrCZO.js} +2 -2
- package/dist/client/assets/{FormContext-DiXpMuU8.js → FormContext-CObkgUvS.js} +2 -2
- package/dist/client/assets/{Icons-DA4msgfR.js → Icons-CSHLGz_M.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-7EBA0xLE.js → KeybindingsSettings.logic-D9eYCeK5.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-YjEc2OIw.js → NoProjectsHero-C0RwYoYq.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-BfRIRM0o.js → PanelLayoutControls-CcE6oZUh.js} +8 -8
- package/dist/client/assets/{PierreEntryIcon-BxxykifK.js → PierreEntryIcon-D0PlfaRc.js} +2 -2
- package/dist/client/assets/PreviewPanel-DgRCZ-80.js +2 -0
- package/dist/client/assets/ProjectDefaultsSettings-DOXJKuJ7.js +2 -0
- package/dist/client/assets/{ProjectFavicon-CiauSitF.js → ProjectFavicon-CFPeQQsG.js} +3 -3
- package/dist/client/assets/ProjectIconPickerDialog-B5iXalFo.js +2 -0
- package/dist/client/assets/{ProjectMonogram-Bqe3OyZR.js → ProjectMonogram-HCgoNxPJ.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-D_OC5vdS.js → ProviderAuthTerminal-rBb4SeQd.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-Bfpy_Rw1.js → ProviderModelPicker-CHfA6QfR.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-BA6yGdRn.js → ProviderSettingsForm-cr5QEWx_.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-BOM7mgfd.js → PullRequestCodeTab-CyJ0_1HE.js} +3 -3
- package/dist/client/assets/{ReadOnlySourcePreview-C3LnvSkA.js → ReadOnlySourcePreview-BvUk75g2.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-C-EIIrrq.js → RenderErrorBoundary-h3g72sj0.js} +2 -2
- package/dist/client/assets/ScheduledTasksSettings-CpUearCU.js +4 -0
- package/dist/client/assets/{ScopedSwitch-DsEcG6rk.js → ScopedSwitch-D1QVfZHR.js} +2 -2
- package/dist/client/assets/{SecretInput-Be5Akw8x.js → SecretInput-SiHUbFCV.js} +2 -2
- package/dist/client/assets/SettingsPanels-B9t76y-c.js +39 -0
- package/dist/client/assets/{SettingsPanels.logic-CLB8Pu-U.js → SettingsPanels.logic-B3IqBMv7.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-CVoWG1oN.js → SettingsScopeNotice-B_awMQPw.js} +2 -2
- package/dist/client/assets/{T3ConnectAccountPages-ClNzwIQw.js → T3ConnectAccountPages-DOpj673A.js} +2 -2
- package/dist/client/assets/{T3ConnectSidebarSignIn-BqM_Vqe1.js → T3ConnectSidebarSignIn-zrB8y6DQ.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-vVmQV_Vv.js → ThemeEditorPanel-Cx7KulxB.js} +2 -2
- package/dist/client/assets/{ThreadTerminalDrawer-aLeVbe6g.js → ThreadTerminalDrawer-ChcqArNC.js} +4 -4
- package/dist/client/assets/{Virtualizer-DTOYU5Jp.js → Virtualizer-DWmIp9HB.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-C9OPPGJE.js → WorkspaceBreadcrumb-Dx7xMwQd.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-DtXJ5ept.js → WorkspacePageContainer-sM_H3DH4.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-5zzLFpEN.js → WorkspacePageHeader-C_J7FxVt.js} +2 -2
- package/dist/client/assets/_chat-Du_FC4wO.js +45 -0
- package/dist/client/assets/{_chat.index-BP1JWABB.js → _chat.index-DUyKTtkh.js} +2 -2
- package/dist/client/assets/{_chat.new-BX5LyFum.js → _chat.new-CMoB99iV.js} +3 -3
- package/dist/client/assets/{_chat.pull-requests-B6-Vck8B.js → _chat.pull-requests-BuTKumeN.js} +2 -2
- package/dist/client/assets/{abnfDiagram-VCTEODGH-BXvAfzAg.js → abnfDiagram-VCTEODGH-D2OflHz4.js} +2 -2
- package/dist/client/assets/{alert-B-or1ble.js → alert-8IFNkYPw.js} +2 -2
- package/dist/client/assets/architecture-7GRP2DOG-BMsijJGx.js +1 -0
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-MEUA3QVe.js → architectureDiagram-5GKGNRK7-Cz7fFw7N.js} +2 -2
- package/dist/client/assets/archive-x-D3w6saMD.js +2 -0
- package/dist/client/assets/arrow-left-DjrJekQJ.js +1 -0
- package/dist/client/assets/arrow-right-DNQ3322O.js +1 -0
- package/dist/client/assets/arrow-up-down-DpVszLOH.js +1 -0
- package/dist/client/assets/assets-DJce0KBy.js +2 -0
- package/dist/client/assets/bell-ehBYv81q.js +1 -0
- package/dist/client/assets/{blockDiagram-I7D4REHJ-BOdLeYJh.js → blockDiagram-I7D4REHJ-BcqcXQ0x.js} +2 -2
- package/dist/client/assets/blocks-CF1Wdm4Y.js +1 -0
- package/dist/client/assets/bot-Dj9hYg2w.js +1 -0
- package/dist/client/assets/{browserHistoryStore-BJD0OPpb.js → browserHistoryStore-CuO1erOb.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-CoogLhhO.js → browserLinkTarget-B5-9Pt65.js} +2 -2
- package/dist/client/assets/{c4Diagram-7LVT6UL2-COZrm1O8.js → c4Diagram-7LVT6UL2-DDiDhcli.js} +2 -2
- package/dist/client/assets/calendar-clock-BaXgPf_7.js +1 -0
- package/dist/client/assets/channel-pJ5lNF0h.js +2 -0
- package/dist/client/assets/chart-no-axes-column-BzuvLLND.js +1 -0
- package/dist/client/assets/{checkbox-CaZu1EKJ.js → checkbox-BUOikrm3.js} +2 -2
- package/dist/client/assets/{chunk-4HAMMTFA-Bs-Fo0v1.js → chunk-4HAMMTFA-_7K6yngz.js} +2 -2
- package/dist/client/assets/{chunk-75Z2AOVW-DpOWzc3R.js → chunk-75Z2AOVW-CUqo_4ua.js} +2 -2
- package/dist/client/assets/{chunk-DU6HZSFF-Bgpi4W6E.js → chunk-DU6HZSFF-C3RStRBi.js} +2 -2
- package/dist/client/assets/{chunk-F27PBJKO-CLxgnzXS.js → chunk-F27PBJKO-BOr5cbtz.js} +2 -2
- package/dist/client/assets/{chunk-GMAD6QVW-D98J5Pan.js → chunk-GMAD6QVW-qBcSdTWV.js} +2 -2
- package/dist/client/assets/{chunk-GVQU2GXP-VuCIOHGI.js → chunk-GVQU2GXP-D8rhGQK_.js} +2 -2
- package/dist/client/assets/{chunk-IMKFNOWR-DXIyBsaE.js → chunk-IMKFNOWR-BjTZFMrm.js} +2 -2
- package/dist/client/assets/{chunk-L3NEJ4N5-CrMlU3ZU.js → chunk-L3NEJ4N5-DnCelWBi.js} +2 -2
- package/dist/client/assets/{chunk-OSK3NFVY-V2__4gNB.js → chunk-OSK3NFVY-BEgD3sGZ.js} +2 -2
- package/dist/client/assets/{chunk-P2QGCYS3-BrPw6V5F.js → chunk-P2QGCYS3-DDmmXS6G.js} +2 -2
- package/dist/client/assets/{chunk-POPQ4Y6H-DBQ9Y51x.js → chunk-POPQ4Y6H-CefHvRtI.js} +2 -2
- package/dist/client/assets/{chunk-PWAF6VOD-BN6AAbfF.js → chunk-PWAF6VOD-BPIKFLCK.js} +2 -2
- package/dist/client/assets/{chunk-SHT3W25Y-Vay44dCU.js → chunk-SHT3W25Y-B_pDi6kv.js} +2 -2
- package/dist/client/assets/{chunk-SVP7TREG-CcGlNErV.js → chunk-SVP7TREG-BD15vJFs.js} +2 -2
- package/dist/client/assets/{chunk-TICWLB2K-Dk1P_xkD.js → chunk-TICWLB2K-B2yA6VhZ.js} +2 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-D4Ed7oKu.js +2 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-D4Ed7oKu.js +2 -0
- package/dist/client/assets/{color-picker-gBclRe5T.js → color-picker-Dqvd0njw.js} +2 -2
- package/dist/client/assets/{combobox-C81z_216.js → combobox-BPRK10Il.js} +2 -2
- package/dist/client/assets/{command-DnJZPOmf.js → command-B-SWHWbd.js} +2 -2
- package/dist/client/assets/{connect-Am2IS-vZ.js → connect-D8LGiBSX.js} +2 -2
- package/dist/client/assets/{connect-agent-Cw1s7hYt.js → connect-agent-B3TvHBIV.js} +2 -2
- package/dist/client/assets/corner-left-up-8yNxlIpO.js +1 -0
- package/dist/client/assets/{cynefin-OW5HDTMX-0s30RxOq.js → cynefin-OW5HDTMX-D-j3kzkd.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-Drd0Msog.js → cynefinDiagram-5FMLGOSQ-CVEhj0G_.js} +2 -2
- package/dist/client/assets/{dagre-GXQ25YYZ-BMfu7T0o.js → dagre-GXQ25YYZ-opF-kR2J.js} +2 -2
- package/dist/client/assets/device-DARKbqyG.js +2 -0
- package/dist/client/assets/{diagram-S7CK7UJ4-8egngY0E.js → diagram-S7CK7UJ4-Y1OUf_Uf.js} +2 -2
- package/dist/client/assets/{diagram-UQ7AKVKN-BALPQoDH.js → diagram-UQ7AKVKN-BMAkQiYU.js} +2 -2
- package/dist/client/assets/{diagram-VSXAHHWV-BjyJZVGC.js → diagram-VSXAHHWV-YWI6689v.js} +2 -2
- package/dist/client/assets/{diagram-VX7I27RA-B9f6eKkq.js → diagram-VX7I27RA-DVxQ1Tyn.js} +2 -2
- package/dist/client/assets/{diagram-Z3DM3KII-CRUj2d3v.js → diagram-Z3DM3KII-DzaunCE7.js} +2 -2
- package/dist/client/assets/{dialog-Bn1u_Xoc.js → dialog-ChNU2rSW.js} +2 -2
- package/dist/client/assets/{diffRendering-C26rfQBu.js → diffRendering-TJ6NEHef.js} +2 -2
- package/dist/client/assets/{discovery-list-Fg_u6w-x.js → discovery-list-2jVj88oX.js} +2 -2
- package/dist/client/assets/{dist-DtKaGeij.js → dist-Dc07DWZJ.js} +3 -3
- package/dist/client/assets/download-KOf4APex.js +1 -0
- package/dist/client/assets/{draft-input-D8eUYug0.js → draft-input-CAOyi5vd.js} +2 -2
- package/dist/client/assets/{duoViewer-CBoAg4hS.js → duoViewer-CkI16mDl.js} +2 -2
- package/dist/client/assets/dynamic-B6ssT_6R.js +3 -0
- package/dist/client/assets/earth-Gh21ySR9.js +1 -0
- package/dist/client/assets/{ebnfDiagram-PWID7BFC-BSbPiqg7.js → ebnfDiagram-PWID7BFC-CLu3StxL.js} +2 -2
- package/dist/client/assets/ellipsis-Dd1lpp1y.js +1 -0
- package/dist/client/assets/{embeddedScripts-Dsi0aZEx.js → embeddedScripts-C0cHj-rX.js} +2 -2
- package/dist/client/assets/{empty-C-gDaZ_z.js → empty-DJMr9MZU.js} +2 -2
- package/dist/client/assets/entities-HApogVCu.js +2 -0
- package/dist/client/assets/{erDiagram-RLTQ6QDP-sL_q0j_k.js → erDiagram-RLTQ6QDP-CMztaIAH.js} +2 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-D1FYr7Uj.js +1 -0
- package/dist/client/assets/eye-CQCt8uGE.js +1 -0
- package/dist/client/assets/file-search-BXNWZ1nV.js +1 -0
- package/dist/client/assets/{fileLinks-DubkPNVt.js → fileLinks-3CrgspkN.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-VtSAPhxL.js → fileTreeExpansion-CYkjiRdT.js} +2 -2
- package/dist/client/assets/flowDiagram-HODETNUW-leGOLc6K.js +1 -0
- package/dist/client/assets/folder-git-2-BIZ4K8z0.js +1 -0
- package/dist/client/assets/folder-open-BI7lMTSr.js +1 -0
- package/dist/client/assets/folder-plus-B91hg6qR.js +1 -0
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY-DCiKb0rQ.js → ganttDiagram-EL5Y4UJY-G_L0ijf2.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-DU5zpXo3.js → getDiffFileInput-Kc1w64Y-.js} +2 -2
- package/dist/client/assets/git-branch-Yqn0BBlE.js +1 -0
- package/dist/client/assets/{gitGraph-4MIJSDKK-DfRe6ZT5.js → gitGraph-4MIJSDKK-BmuEuxsx.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-Bt7diV1n.js → gitGraphDiagram-WWUBYQGX-C6A4msS5.js} +2 -2
- package/dist/client/assets/grip-vertical-DbE6Bv-r.js +1 -0
- package/dist/client/assets/{guideRunStore-CF9bByzk.js → guideRunStore-sdfoC8zb.js} +2 -2
- package/dist/client/assets/hard-drive--FvDwcA1.js +1 -0
- package/dist/client/assets/history-D-6p2svD.js +1 -0
- package/dist/client/assets/house-6Nj_TaKT.js +1 -0
- package/dist/client/assets/{htmlRender-vOqAdlJH.js → htmlRender-BPiW3VQi.js} +2 -2
- package/dist/client/assets/index-EKWtrZNr.js +3 -0
- package/dist/client/assets/{info-A6RAGUB7-0FtL6-Am.js → info-A6RAGUB7-CwFLPSUe.js} +1 -1
- package/dist/client/assets/{infoDiagram-27XIBGKW-BPLvtPCc.js → infoDiagram-27XIBGKW-bjIIr1Q4.js} +2 -2
- package/dist/client/assets/{input-group-CJ7ZOvDN.js → input-group-DM7QvN7X.js} +2 -2
- package/dist/client/assets/{input-Cd_0h7h_.js → input-w_nbMVAd.js} +2 -2
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-DVcx0XTh.js → ishikawaDiagram-5VMMS53U-ymImqXAG.js} +2 -2
- package/dist/client/assets/{journeyDiagram-3NMN7TZE-w46bbjL2.js → journeyDiagram-3NMN7TZE-TJpDU0em.js} +2 -2
- package/dist/client/assets/{kanban-definition-UXKFOSKX-C41yE_yV.js → kanban-definition-UXKFOSKX-Bhm6s1x1.js} +2 -2
- package/dist/client/assets/{kbd-c17EHIx1.js → kbd-CTZhqOH9.js} +2 -2
- package/dist/client/assets/{keybindings-uYm_vnXl.js → keybindings-CJFu-Dyg.js} +2 -2
- package/dist/client/assets/keyboard-Bf3n2zS8.js +1 -0
- package/dist/client/assets/{lazyRouteComponent-CTVuEvaz.js → lazyRouteComponent-WxKijHdU.js} +2 -2
- package/dist/client/assets/{line-tu9XZ0qp.js → line-C24Qe7Rj.js} +2 -2
- package/dist/client/assets/link-BVjRZ3mh.js +1 -0
- package/dist/client/assets/{link-C4sEUNOK.js → link-DnBUR2mx.js} +2 -2
- package/dist/client/assets/{linkedPrompt-VYl90REW.js → linkedPrompt-CNv-bVSs.js} +2 -2
- package/dist/client/assets/list-DrTK4zhP.js +1 -0
- package/dist/client/assets/loader-Bc9xbkPa.js +2 -0
- package/dist/client/assets/main-D1oD2GPo.js +30 -0
- package/dist/client/assets/main-hjb9WdQ8.css +2 -0
- package/dist/client/assets/{mediaReference-BTVvzs2e.js → mediaReference-vtwfoFLK.js} +2 -2
- package/dist/client/assets/{mediaSource-DXHFWHMA.js → mediaSource-BDkqXaxs.js} +2 -2
- package/dist/client/assets/{mermaid-parser.core-DNd412Oc.js → mermaid-parser.core-D2hAGRv3.js} +4 -4
- package/dist/client/assets/{mermaid.core-CyE6QOQY.js → mermaid.core-DWtHy2iz.js} +5 -5
- package/dist/client/assets/message-circle-question-mark-D2JAzS9x.js +1 -0
- package/dist/client/assets/message-square-DNTOkKRN.js +1 -0
- package/dist/client/assets/message-square-dashed-NGYZLQqB.js +1 -0
- package/dist/client/assets/{mindmap-definition-YA3MSWOX-DH1uxdTm.js → mindmap-definition-YA3MSWOX-DCzTD1Gd.js} +2 -2
- package/dist/client/assets/mouse-pointer-2-CgUWLVBh.js +1 -0
- package/dist/client/assets/{number-field-CVtwAsLe.js → number-field-yRjM_PYx.js} +2 -2
- package/dist/client/assets/{observeResize-Csvw3hy4.js → observeResize-wFdsooQ8.js} +2 -2
- package/dist/client/assets/{onboarding-CJPrQc71.js → onboarding-Buk_SNIp.js} +2 -2
- package/dist/client/assets/openFileInPreview-CxrjOX7D.js +2 -0
- package/dist/client/assets/{p4ProjectFile-BWszgcDk.js → p4ProjectFile-DNlgD3LH.js} +2 -2
- package/dist/client/assets/{packet-AYTQ26CC-DflCOkCN.js → packet-AYTQ26CC-CSklBRjj.js} +1 -1
- package/dist/client/assets/{pair-Dd_e1jxq.js → pair-DYnW2Jz0.js} +2 -2
- package/dist/client/assets/palette-DCF6iKZY.js +1 -0
- package/dist/client/assets/panel-left-BObCZ482.js +1 -0
- package/dist/client/assets/panels-top-left-4ditdjHS.js +1 -0
- package/dist/client/assets/{pegDiagram-XKGWAZYB-Cnx9j2xX.js → pegDiagram-XKGWAZYB-Cgo_C_YQ.js} +2 -2
- package/dist/client/assets/{phoneViewer-B9EUVDD2.js → phoneViewer-CVOLU68D.js} +2 -2
- package/dist/client/assets/{pie-WAS4IAKB-CDwew7fN.js → pie-WAS4IAKB-y0cNnmhp.js} +1 -1
- package/dist/client/assets/{pieDiagram-E7YTZNPT-BxejSN6k.js → pieDiagram-E7YTZNPT-CR9uQOKX.js} +2 -2
- package/dist/client/assets/{pierre-icons-C839Otpo.js → pierre-icons-YFKnGmUq.js} +2 -2
- package/dist/client/assets/{popover-CKyetthu.js → popover-D-VzRDzk.js} +2 -2
- package/dist/client/assets/{preview-CjgXQQdj.js → preview-C7hqmFHN.js} +2 -2
- package/dist/client/assets/{preview-CEMnbqVB.js → preview-DT6Qi-Q0.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-B9Lqaaij.js → previewMiniPlayerStore-Dmvk7kfx.js} +2 -2
- package/dist/client/assets/primary-bBvWt8wp.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-DDmxU43H.js +2 -0
- package/dist/client/assets/projectFilesQueryState-C9bparJ7.js +2 -0
- package/dist/client/assets/{projectScriptEditor-BAuP_HeU.js → projectScriptEditor-2klDgdXc.js} +2 -2
- package/dist/client/assets/providerSkills-Bd9FOodA.js +2 -0
- package/dist/client/assets/{pullRequestDetail.logic-DTxWqKoX.js → pullRequestDetail.logic-BHCv2eTg.js} +4 -4
- package/dist/client/assets/{pullRequestReviewStore-C5gaoGaz.js → pullRequestReviewStore-DNDBmRdQ.js} +2 -2
- package/dist/client/assets/pullRequests-NQiU1cvE.js +2 -0
- package/dist/client/assets/puzzle-DC6izfkI.js +1 -0
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-Bj4FEpOg.js → quadrantDiagram-AXDQQJYC-B2RnhUBb.js} +2 -2
- package/dist/client/assets/queries-DrIiv9gC.js +2 -0
- package/dist/client/assets/query-B_BcLKlb.js +2 -0
- package/dist/client/assets/{radar-RG4KPBEZ-DEopr2Gv.js → radar-RG4KPBEZ-Dygcuho2.js} +1 -1
- package/dist/client/assets/{radio-group-fljQQ7Xp.js → radio-group-ESEwcJva.js} +2 -2
- package/dist/client/assets/{railroad-74A4TZTK-BSAOgUn6.js → railroad-74A4TZTK-CK7b6dqk.js} +1 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-Bn3ASlRb.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-DpIqYG5o.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-9vGlAMJk.js +1 -0
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-BSOJGJ6v.js → railroadDiagram-O6MQD6OU-DsiQNHoT.js} +2 -2
- package/dist/client/assets/{renderScheduler-v8LIpnE2.js → renderScheduler-DwOi4uKZ.js} +2 -2
- package/dist/client/assets/{requirementDiagram-BXWQKSXE-Bp5TqEho.js → requirementDiagram-BXWQKSXE-DUEtMGYN.js} +2 -2
- package/dist/client/assets/{rightPanelStore-DqMd0tFH.js → rightPanelStore-BWYBRVeP.js} +2 -2
- package/dist/client/assets/rotate-ccw-BSwk8mHM.js +1 -0
- package/dist/client/assets/rotate-cw-BsgLwrfv.js +1 -0
- package/dist/client/assets/runtime-CBB2It1x.js +6 -0
- package/dist/client/assets/runtime-Dydpcwo9.js +2 -0
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-C7KUHrP7.js → sankeyDiagram-P5KCCOFB-Bnb7-uIo.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-C3Mbc4mh.js → scheduledTasksSettings.logic-CFyLLJ0-.js} +3 -3
- package/dist/client/assets/{scroll-area-LhpLVf8r.js → scroll-area-iMm_YXqJ.js} +2 -2
- package/dist/client/assets/select-cvR_zMkG.js +2 -0
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-Bs9mfTLC.js → sequenceDiagram-WJ2MYXX4-BKHWFnq6.js} +2 -2
- package/dist/client/assets/server-FMafPUns.js +2 -0
- package/dist/client/assets/session-BI6WO3-p.js +2 -0
- package/dist/client/assets/{session-logic-DneZDyPZ.js → session-logic-DVvClfzW.js} +5 -5
- package/dist/client/assets/settings-2-BbyXH0uI.js +1 -0
- package/dist/client/assets/settings-DRKdVCbB.js +1 -0
- package/dist/client/assets/{settings-C8FiUQu0.js → settings-Dzr6EHna.js} +2 -2
- package/dist/client/assets/settings.appearance-Dcbf4cgV.js +2 -0
- package/dist/client/assets/settings.archived-BI9u9Y07.js +2 -0
- package/dist/client/assets/{settings.computer-use-B3Ujc2AS.js → settings.computer-use-CE8rpPYM.js} +2 -2
- package/dist/client/assets/settings.connections-BWLCI5Zi.js +2 -0
- package/dist/client/assets/settings.data-controls-CmJZj_HT.js +2 -0
- package/dist/client/assets/{settings.decisions-C5UE4drK.js → settings.decisions-Bm-M9k3t.js} +2 -2
- package/dist/client/assets/settings.diagnostics-ao6ZzXXw.js +2 -0
- package/dist/client/assets/settings.general-BoU897Dm.js +2 -0
- package/dist/client/assets/{settings.integrations-BCtpk2dY.js → settings.integrations-ChLDKsIY.js} +2 -2
- package/dist/client/assets/{settings.keybindings-DfFrYXxY.js → settings.keybindings-BSg3FHQZ.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-CqRM1gRd.js → settings.open-source-licenses-B4sC68Ud.js} +2 -2
- package/dist/client/assets/settings.plugins-CGUFRhFY.js +5 -0
- package/dist/client/assets/{settings.projects-CT-l0EfX.js → settings.projects-V3nNBIzc.js} +4 -4
- package/dist/client/assets/settings.providers-D1BgocCC.js +3 -0
- package/dist/client/assets/settings.scheduled-tasks-C-I22teI.js +2 -0
- package/dist/client/assets/{settings.snap-shot-BMxV-ClC.js → settings.snap-shot-aum1tmsR.js} +2 -2
- package/dist/client/assets/settings.source-control-8YMYuva4.js +2 -0
- package/dist/client/assets/{settings.storage-DKm6BZ2r.js → settings.storage-e3yKBYeM.js} +2 -2
- package/dist/client/assets/settingsLayout-BUbXPq57.js +3 -0
- package/dist/client/assets/shield-check-CG2tOYd1.js +1 -0
- package/dist/client/assets/shield-question-mark-Mk3rAYhm.js +1 -0
- package/dist/client/assets/{sidebar-DI1ZJMkM.js → sidebar-CjtIIYSY.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-DXRKqrOP.js → sidebarProjectGrouping-BmTLes3y.js} +2 -2
- package/dist/client/assets/{skeleton-BlMPaSbD.js → skeleton-DzaiJbx8.js} +2 -2
- package/dist/client/assets/{sortable.esm-CnSn9HhJ.js → sortable.esm-Df_JB8i3.js} +2 -2
- package/dist/client/assets/{sourceControl-ogZI3Qhj.js → sourceControl-BfGzu06x.js} +2 -2
- package/dist/client/assets/{spinner-I_NrXl2i.js → spinner-RAU9Cg6j.js} +2 -2
- package/dist/client/assets/square-pen-BuwM-DT0.js +1 -0
- package/dist/client/assets/{standalone-page-C0mvdk0N.js → standalone-page-Bsaqnigq.js} +2 -2
- package/dist/client/assets/{stateDiagram-D77RDMKH-lcvbm4gc.js → stateDiagram-D77RDMKH-BhdX_IDZ.js} +2 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Ba0Qofsh.js +2 -0
- package/dist/client/assets/{swimlanes-42K2YHIH-BftXRbCQ.js → swimlanes-42K2YHIH-T7QLMavY.js} +2 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-C9WqWw-N.js +9 -0
- package/dist/client/assets/{terminal-links-BWEpET__.js → terminal-links-B9s8s-tz.js} +2 -2
- package/dist/client/assets/{terminalSessions-CQOPPXfy.js → terminalSessions-BmqpP0Ss.js} +2 -2
- package/dist/client/assets/text-search-DyMq-QgY.js +1 -0
- package/dist/client/assets/{textarea-Bu723jDd.js → textarea-C9YeXMVc.js} +2 -2
- package/dist/client/assets/{themePalette-CAxv2FDZ.js → themePalette-C1oD3Oeg.js} +3 -3
- package/dist/client/assets/{threadSort-BoaTqeGH.js → threadSort-C4CtIL5v.js} +2 -2
- package/dist/client/assets/{timeline-definition-24CTP7MA-_aV_EuqE.js → timeline-definition-24CTP7MA-Dnja29q2.js} +2 -2
- package/dist/client/assets/toast-DEgXlTR7.js +2 -0
- package/dist/client/assets/{toggle-B5fidRv0.js → toggle-CNbzG8Ec.js} +2 -2
- package/dist/client/assets/{toggle-group-DCQTLIPb.js → toggle-group-DIqmqqKQ.js} +2 -2
- package/dist/client/assets/{tooltip-taOyJZax.js → tooltip-DyiHlEs0.js} +2 -2
- package/dist/client/assets/{treeView-Q6P3EWNA-ALGd5g_W.js → treeView-Q6P3EWNA-KHtw7wMC.js} +1 -1
- package/dist/client/assets/{treemap-WGGIJYW6-CGQrkzMs.js → treemap-WGGIJYW6-BZN3U17E.js} +1 -1
- package/dist/client/assets/{usage-DmGxFUdr.js → usage--nsoWaqi.js} +2 -2
- package/dist/client/assets/{usageAccess-CY-JtQnU.js → usageAccess-Dwz13Eun.js} +2 -2
- package/dist/client/assets/{usageFormat-Cs-UHzLq.js → usageFormat-Z0lz-RCF.js} +2 -2
- package/dist/client/assets/{usageShortcuts-CP952NDO.js → usageShortcuts-cwv5i-oF.js} +2 -2
- package/dist/client/assets/{use-atom-command-CQHjSXPR.js → use-atom-command-BVrZ0hTO.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-4I5xhNlP.js → useAriaLabelledBy-z3tVAFR_.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-Bzaf_PDE.js → useHandleNewThread-lAV5NpwQ.js} +2 -2
- package/dist/client/assets/{useLocation-QINZoaPz.js → useLocation-CxFbcar1.js} +2 -2
- package/dist/client/assets/useNavigate-CLQYZa7I.js +2 -0
- package/dist/client/assets/{useNavigateBack-CbbWf0z6.js → useNavigateBack-91jfuRCn.js} +2 -2
- package/dist/client/assets/{useParams-BTKEXLBT.js → useParams-nxAoxVO6.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-Zbsv_90x.js → usePermissionStatus-CVCguZPP.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-DGTJ6ne6.js → usePullRequestActions-Cp-f2-rS.js} +3 -3
- package/dist/client/assets/{useRegisterFieldControl-Cr87Snzk.js → useRegisterFieldControl-hMeYQdpT.js} +2 -2
- package/dist/client/assets/useScopedModelAvailability-1rkaoEPh.js +2 -0
- package/dist/client/assets/useSettings-BCUX_14n.js +3 -0
- package/dist/client/assets/{useT3ConnectAuthPrompt-BYqrzQIx.js → useT3ConnectAuthPrompt-B1AHMyDF.js} +2 -2
- package/dist/client/assets/{utils-DmfMX1v5.js → utils-Cbsb1ks0.js} +18 -18
- package/dist/client/assets/vcsRefInvalidation-DMlloB2h.js +2 -0
- package/dist/client/assets/{vennDiagram-4TSXK5OY-9Jx7JrgE.js → vennDiagram-4TSXK5OY-B4KHYxz_.js} +2 -2
- package/dist/client/assets/{wardley-WFR3VGLG-qG58RzFw.js → wardley-WFR3VGLG-EUhzOM0w.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-8Ml3tzfR.js → wardleyDiagram-VM6X3IG4-25okiPRC.js} +2 -2
- package/dist/client/assets/{welcome-CPcQsM9H.js → welcome-pBX3QtZq.js} +2 -2
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-C-u_0wo0.js → xychartDiagram-S5SC5T6Z-Dyo2i7yf.js} +2 -2
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ChatGptUsageButton-D93cMeTp.js +0 -2
- package/dist/client/assets/CodexSetupSection.logic-DJw6xB7P.js +0 -2
- package/dist/client/assets/DiffPanel-Dqh76p3E.js +0 -2
- package/dist/client/assets/PreviewPanel-QkMfuC1J.js +0 -2
- package/dist/client/assets/ProjectDefaultsSettings-C6wxaRmJ.js +0 -2
- package/dist/client/assets/ProjectIconPickerDialog-GDqk2LEH.js +0 -2
- package/dist/client/assets/ScheduledTasksSettings-DFtwNfb8.js +0 -4
- package/dist/client/assets/SettingsPanels-CI-FknGh.js +0 -39
- package/dist/client/assets/_chat-BKcYL38S.js +0 -45
- package/dist/client/assets/architecture-7GRP2DOG-DqzmsB35.js +0 -1
- package/dist/client/assets/archive-x-BN7DYXYC.js +0 -2
- package/dist/client/assets/arrow-left-DI1Oo3nI.js +0 -1
- package/dist/client/assets/arrow-right-DRgAj8le.js +0 -1
- package/dist/client/assets/arrow-up-down-C6OEPUz7.js +0 -1
- package/dist/client/assets/assets-_CWIS9vb.js +0 -2
- package/dist/client/assets/bell-DW1iPWzH.js +0 -1
- package/dist/client/assets/blocks-DKOyf4K4.js +0 -1
- package/dist/client/assets/bot-DYcBiSui.js +0 -1
- package/dist/client/assets/calendar-clock-BqL7OneL.js +0 -1
- package/dist/client/assets/channel-DbsUczqI.js +0 -2
- package/dist/client/assets/chart-no-axes-column-CtQ7A5KE.js +0 -1
- package/dist/client/assets/classDiagram-ZZMXUADV-DotTjRcO.js +0 -2
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-DotTjRcO.js +0 -2
- package/dist/client/assets/corner-left-up-BT-2gfvH.js +0 -1
- package/dist/client/assets/device-C_oIGJqy.js +0 -2
- package/dist/client/assets/download-DNjijPHR.js +0 -1
- package/dist/client/assets/dynamic-p5s8CQGu.js +0 -3
- package/dist/client/assets/earth-DGA4iwBJ.js +0 -1
- package/dist/client/assets/ellipsis-Cbd-Ac19.js +0 -1
- package/dist/client/assets/entities-82m-Smm-.js +0 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-OEIkdS25.js +0 -1
- package/dist/client/assets/eye-BUplLfz9.js +0 -1
- package/dist/client/assets/file-search-CcnLiCku.js +0 -1
- package/dist/client/assets/fileContextMenu-Dcs50sFI.js +0 -2
- package/dist/client/assets/flowDiagram-HODETNUW-BDZPeVYD.js +0 -1
- package/dist/client/assets/folder-git-2-5RczFn6m.js +0 -1
- package/dist/client/assets/folder-open-PwiT4lvQ.js +0 -1
- package/dist/client/assets/folder-plus--IokSBmG.js +0 -1
- package/dist/client/assets/git-branch-jf-x2c63.js +0 -1
- package/dist/client/assets/grip-vertical-OASdudbE.js +0 -1
- package/dist/client/assets/hard-drive-BxN5msOb.js +0 -1
- package/dist/client/assets/history-DdVU5lcf.js +0 -1
- package/dist/client/assets/house-mbks5FAa.js +0 -1
- package/dist/client/assets/index-1HGbj0-7.js +0 -3
- package/dist/client/assets/keyboard-DckDn_SM.js +0 -1
- package/dist/client/assets/link-Dw3ue0Rm.js +0 -1
- package/dist/client/assets/list-1rglB5Lq.js +0 -1
- package/dist/client/assets/loader-CRsWQXUs.js +0 -2
- package/dist/client/assets/main-BB3F4O6Y.js +0 -30
- package/dist/client/assets/main-CnVegMVf.css +0 -2
- package/dist/client/assets/message-circle-question-mark-CLPs5tYP.js +0 -1
- package/dist/client/assets/message-square-BInn4EwR.js +0 -1
- package/dist/client/assets/message-square-dashed-Dea7_sXv.js +0 -1
- package/dist/client/assets/mouse-pointer-2-BPl1Yb5N.js +0 -1
- package/dist/client/assets/openFileInPreview-C3O_ayUT.js +0 -2
- package/dist/client/assets/palette-DC6st-Ld.js +0 -1
- package/dist/client/assets/panel-left-BxNE-mqR.js +0 -1
- package/dist/client/assets/panels-top-left-CpwWAaSX.js +0 -1
- package/dist/client/assets/primary-uszZTzpR.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-CWT2YTBZ.js +0 -2
- package/dist/client/assets/projectFilesQueryState-ELgLflk5.js +0 -2
- package/dist/client/assets/pullRequests-DjbQ49mZ.js +0 -2
- package/dist/client/assets/puzzle-foT3lPUZ.js +0 -1
- package/dist/client/assets/queries-Cq5C9N-K.js +0 -2
- package/dist/client/assets/query-DpwJQzeq.js +0 -2
- package/dist/client/assets/railroad-abnf-HS5TGJTU-C_4g8TOP.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-CHZB5YoP.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-B-PbMjlp.js +0 -1
- package/dist/client/assets/rotate-ccw-rssHZoOL.js +0 -1
- package/dist/client/assets/rotate-cw-D726GGah.js +0 -1
- package/dist/client/assets/runtime-BQJQC-Ny.js +0 -6
- package/dist/client/assets/runtime-C6FwphD-.js +0 -2
- package/dist/client/assets/select-B4VvMEs2.js +0 -2
- package/dist/client/assets/server-BD_Y5Gsn.js +0 -2
- package/dist/client/assets/session-DsbInyNV.js +0 -2
- package/dist/client/assets/settings-2-Qrnq-5XQ.js +0 -1
- package/dist/client/assets/settings-MUAsYy_j.js +0 -1
- package/dist/client/assets/settings.appearance-B5-X4oyX.js +0 -2
- package/dist/client/assets/settings.archived-DVUmF0nS.js +0 -2
- package/dist/client/assets/settings.connections-EQYBOa7e.js +0 -2
- package/dist/client/assets/settings.diagnostics-CBcOEqPM.js +0 -2
- package/dist/client/assets/settings.general-BOmr4mSV.js +0 -2
- package/dist/client/assets/settings.plugins-DC4js6dE.js +0 -5
- package/dist/client/assets/settings.providers-CJuBTAiR.js +0 -3
- package/dist/client/assets/settings.scheduled-tasks-CvLNaadX.js +0 -2
- package/dist/client/assets/settings.source-control-DJWucVsM.js +0 -2
- package/dist/client/assets/settingsLayout-jP1a50ek.js +0 -3
- package/dist/client/assets/shield-check-k2SY7zjx.js +0 -2
- package/dist/client/assets/shield-question-mark-kKJBH4Uj.js +0 -1
- package/dist/client/assets/square-pen-DilH8raK.js +0 -1
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-DuLLhUia.js +0 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-BrHQKVnf.js +0 -9
- package/dist/client/assets/text-search-DpDcKspl.js +0 -1
- package/dist/client/assets/toast-CjelgyqV.js +0 -2
- package/dist/client/assets/useNavigate-4thj06GJ.js +0 -2
- package/dist/client/assets/useScopedModelAvailability-BEfh0WXx.js +0 -2
- package/dist/client/assets/useSettings-CLtJrOYI.js +0 -3
- package/dist/client/assets/vcsRefInvalidation-nP-qgsHs.js +0 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { $ as Uint8Array$2, $n as resolveAt, $r as isLessThan$1, $t as makeFilter, A as Null, An as omit, Ar as toString$3, At as encodeUnknownExit, B as SchemaError, Bn as make$249, Br as parseHeader, Bt as isLessThan, C as Literal, Ci as a7t, Cn as isInetAddress, Cr as Pointer, Ct as decodeUnknownResult, D as Never, Dn as assign, Dr as fromInput$2, Dt as encodeSync, En as isSchemaError, Er as empty$10, Et as encodeEffect, F as Option$3, Fn as getReferenceKey, Fr as empty$11, Ft as isBetween, G as TaggedError$1, Gn as getLastEncoding, Gr as encode$4, Gt as isNonEmpty, H as StringFromUriComponent, Hn as applyToSelfOrLastLinkEncoding, Hr as toSetCookieHeaders, Ht as isMaxLength, I as OptionFromNullOr, In as toMultiDocumentOpenApi3_1, Ir as expireCookie, It as isFinite$1, J as Trim, Jn as isNull, Jr as add$4, Jt as isSchemaError$1, K as TaggedStruct, Kn as isDeclaration, Kr as Equivalence$1, Kt as isPattern, L as Record$2, Ln as _is, Lr as fromSetCookie, Lt as isGreaterThan, M as Number$3, Mn as toJsonSchemaMultiDocument, Mr as make$246, Mt as fromJsonString, N as NumberFromString, Nn as toCodecJsonAST, Nr as value$3, Nt as instanceOf, O as NonEmptyArray, On as lambda, Or as setAll$1, Ot as encodeTo, P as Opaque, Pn as VALID_OPEN_API_COMPONENTS_SCHEMAS_KEY_REGEXP, Pr as stringOrRedacted, Pt as is$2, Q as URLFromString, Qn as isVoid, Qr as isGreaterThanOrEqualTo$2, Qt as make$247, R as RecordFromUrlParams, Rn as decodeUnknownEffect, Rr as isEmpty$3, Rt as isGreaterThanOrEqualTo$1, S as JsonObject$2, Si as map$7, Sn as inetAddressFromIpString, Sr as InvalidValue$1, St as decodeUnknownOption, T as MutableJson, Ti as y7t, Tn as unixPathAddress, Tr as appendAll$1, Tt as encode$5, U as Struct, Un as decodeTo, Ur as decode$6, Ut as isMaxProperties, V as String$7, Vn as Union$1, Vr as set$8, Vt as isLessThanOrEqualTo, W as StructWithRest, Wn as getAST, Wr as decodeString$3, Wt as isMinLength, X as Tuple, Xn as isSuspend, Xr as formatIso, Xt as isTrimmed, Y as TrueLiterals, Yn as isObjects, Yr as addDuration, Yt as isStartingWith, Z as URL$3, Zn as isUnion, Zr as isGreaterThan$1, Zt as isUUID, _ as FalseLiterals, _i as Error$6, _n as withDecodingDefault, _r as transform$4, _t as decodeOption, a as BooleanFromBit, ai as nowInCurrentZone, an as resolveAnnotationsKey, ar as composeTransformation, at as UnknownFromJsonString$2, b as Int$6, bi as taggedEnum, bn as formatUrlHostString, br as withDefault$3, bt as decodeUnknownEffect$1, c as Class$1, ci as subtract, cn as toCodecArrayFromSingle, cr as transform$3, ct as annotateKey, d as Defect, di as toEpochMillis, dn as toEncoded$1, dr as trim, dt as catchEncoding, ei as isLessThanOrEqualTo$1, en as mutable, er as resolveDescription, et as Uint8ArrayFromBase64, f as Duration, fi as toParts, fn as toEquivalence, fr as compose, ft as check, g as Exit, gi as Class$2, gn as withConstructorDefault, gr as stringifyJson, gt as decodeExit, h as Error$7, hi as EncodingError, hn as toType, hr as passthrough, ht as decodeEffect, i as Boolean$5, ii as now, in as resolveAnnotations, ir as Transformation, it as Unknown, j as NullOr, jn as toRepresentations, jr as isRedacted, jt as fieldsAssign, k as NonEmptyString$2, kn as map$8, kr as toRecord, kt as encodeUnknownEffect$1, l as DateTimeUtc, li as subtractDuration, ln as toCodecJson, lr as transformEffect$1, lt as brand, m as DurationFromString$1, mi as withCurrentZoneLocal, mn as toTaggedUnion, mr as parseJson$1, mt as decode$7, n as Any, ni as makeUnsafe$8, nn as optional$9, nr as toEncoded, nt as UndefinedOr, o as BooleanLiterals, oi as nowUnsafe, on as suspend, or as splitKeyValue, ot as Void, p as DurationFromMillis, pi as toUtc, pn as toJsonSchemaDocument, pr as forbidden, pt as declare$1, q as TemplateLiteral, qn as isLiteral, qr as Order$1, qt as isSchema, r as ArraySchema, ri as min, rn as optionalKey, rr as unknown$1, rt as Union, s as Cause, si as setParts, sn as tag$3, sr as toLowerCase, st as annotate$2, t as runClaudeHistoryWorker, ti as make$248, tn as mutableKey, tr as resolveIdentifier, tt as Undefined, u as DateTimeUtcFromString, ui as toDate, un as toCodecStringTree, ur as transformOptional, ut as catchDecoding, v as Finite, vi as TaggedClass, vn as withDecodingDefaultKey, vr as transformEffect, vt as decodeSync, w as Literals$2, wi as h7t, wn as isUnspecified, wr as defaultFormatter$1, wt as decodeUnknownSync, x as Json, xi as makeEquivalence$1, xn as formatUrlUnsafe, xr as Forbidden$1, xt as decodeUnknownExit, y as FiniteFromString, yi as TaggedError, yn as formatIp, yr as transformOptional$1, yt as decodeTo$1, z as Redacted$1, zn as encodeUnknownEffect, zr as merge$2, zt as isInt } from "./claudeHistoryWorker-v_0uyLGp.mjs";
|
|
4
4
|
import { $ as forEach, $i as hasDies, $n as set$9, $r as makeUnsafe$10, $s as isFailure$1, $t as runPromise, A as currentSpan, Aa as contextWith, Ac as toArray$1, Ai as interrupt$3, Al as array, An as updateContext, Ao as has$6, Ar as effect, As as isArrayNonEmpty, At as matchEffect, B as filter$2, Ba as fiberEnterInterruptibleUnsafe, Bc as make$256, Bi as NoSuchElementError, Bl as hasProperty, Bn as withTracerEnabled, Bo as isNegative, Br as succeedContext, Bs as reduce, Bt as promise, C as catchTag, Ca as CurrentLoggers$1, Cc as liftThrowable, Ci as succeed$6, Cn as tryPromise, Co as externalSpan, Cr as currentTimeMillis, Cs as findFirst, D as context, Da as asSome$1, Dc as none$2, Di as failCause$1, Dn as undefined_, Do as random$1, Dr as build, Ds as fromIterable, Dt as match$2, E as clockWith, Ec as match, Ei as fail$2, El as equals, En as txRetry, Eo as encode$6, Er as CurrentMemoMap, Es as flatMapNullishOr, Et as mapErrorEager, F as exit$3, Fa as exitIsSuccess, Fc as flip, Fi as succeed$3, Fl as string$2, Fn as withErrorReporting, Fo as fromInputUnsafe$1, Fr as merge$4, Fs as makeBy, Ft as onInterrupt, G as findFirst$1, Gc as PipeInspectableProto, Gi as die$1, Gn as Class$4, Go as minutes$1, Gr as Scope, Gs as filterMap, Gt as race, H as filterMapOrFail, Ha as fiberInterrupt, Hi as UnknownError$3, Hn as zip, Ho as max, Hr as sync$2, Hs as sort, Ht as provideContext, I as fail$1, Ii as void_$2, Il as structure, In as withFiber, Io as hours, Ir as mergeAll, It as option$1, J as flatMapEager, Ja as forkUnsafe, Ji as filterInterruptors, Jl as isNotUndefined, Jn as empty$12, Jo as seconds, Jr as close, Js as fail, Jt as request, K as firstSuccessOf, Ki as done, Kl as isNotNull, Kn as RequestPrototype, Ko as nanos, Kr as addFinalizer, Ks as headUnsafe, Kt as raceFirst, L as failCause$2, Lc as isGreaterThanOrEqualTo$3, Li as Done, Ln as withLogSpan, Lo as infinity, Lr as provide$1, Ls as map$9, Lt as orDie, M as die, Ma as endSpan, Mi as isFailure, Ml as hash$2, Mn as void_$1, Mo as days, Mr as effectDiscard, Ms as isReadonlyArrayNonEmpty, Mt as onError, N as effectify, Na as exitHasInterrupts, Nc as Number$4, Ni as isSuccess$1, No as format$1, Nr as empty$16, Nt as onExit, O as contextWith$1, Oc as orElse$2, Oi as findErrorOption$1, On as uninterruptible, Oo as Scheduler$1, Or as buildWithMemoMap, Ot as matchCauseEffect, P as ensuring, Pi as match$3, Pl as optimize, Pn as whileLoop, Po as fromInput$3, Pr as launch$1, Pt as onExitPrimitive, Qa as loggerMake, Qi as fromReasons, Qn as remove$5, Qo as toMinutes, Qr as make$253, Qs as getOrUndefined$2, Qt as runForkWith, Ri as ExceededCapacityError, Rl as symbol$4, Rn as withParentSpan, Rr as provideMerge, Rs as match$1, Rt as orElseSucceed, S as catchReason, Sa as ConsoleRef, Sc as isSome, Si as poll, Sn as timeoutOrElse, So as Tracer, Sr as Clock, Ss as filterMap$1, St as map$11, Su as pipeArguments, T as catch_, Tc as map$12, Ti as die$2, Tl as strictEqual, Tn as tx, To as nativeTracer, Tr as monotonicTimeNanos, Ts as findLast, Tt as mapError, U as filterOrElse, Ui as annotate$3, Un as zipWith, Uo as millis, Ur as tap$2, Us as take$1, Ut as provideService, Va as fiberEnterUninterruptibleUnsafe, Vc as mapInput$1, Vi as StackTrace, Vn as yieldNow, Vo as isZero, Vr as suspend$2, Vs as reverse, Vt as provide$2, W as filterOrFail, Wa as fiberJoin, Wi as combine$2, Wn as equalBatchKeys, Wo as min$1, Wr as unwrap, Ws as empty$15, X as fn, Xc as contE, Xi as findErrorOption, Xl as isNumber$1, Xn as has$5, Xo as times, Xr as fork, Xt as retry$1, Y as flatten$1, Yc as contA, Yl as isNullish, Yn as get$15, Yo as sum, Yr as closeUnsafe, Ys as failVoid, Yt as result$1, Z as fnUntraced, Zi as findFail, Zl as isObject$3, Zn as make$252, Zo as toMillis$1, Zr as forkUnsafe$1, Zs as getOrThrow, Zt as runFork, _ as catchCauseIf, _a as pretty, _c as getOrNull, _i as isDeferred, _l as symbolRedactable, _n as tapDefect, _o as CurrentErrorReporters$1, _s as append$2, _t as logFatal, _u as memoize, a as all$5, aa as isCause, ac as succeed$2, ai as MinimumLogLevel, al as getStackTraceLimit, an as scoped, ao as reportCauseUnsafe, ar as fromStep, as as get$14, at as fromOption, au as or$1, b as catchFilter, ba as squash, bc as isNone, bi as make$255, bl as normalize$3, bn as timeout, bo as NativeSpan, br as Random$1, bs as ensure, bt as logWithLevel, c as annotateLogs, ca as isFailReason, cc as exists, ci as UnhandledLogLevel, cl as Class$3, cn as serviceOption, co as succeedNone$1, cr as jittered, cs as getOrUndefined$1, ct as ignore$2, cu as compose$1, d as asSome, dc as flatMap$2, di as done$1, dl as format, dn as succeedNone, do as sync, dr as spaced, ds as make$251, dt as interruptible, du as constUndefined, ec as isResult, ei as provide, el as exitSucceed, en as runPromiseWith, er as size$5, es as zero$1, et as forever, eu as isReadonlyObject, f as asVoid, fa as isTimeoutError, fc as flatten, fi as doneUnsafe, fn as succeedSome, fo as tracerLogger$1, fr as toStep, fs as makeUnsafe$11, ft as isEffect, fu as constVoid, g as catchCause, gc as getOrElse, gi as into, gl as redact$1, gn as tapCause, gs as allocate, gt as logError, gu as identity, h as callback, hc as fromUndefinedOr, hn as tap$1, ho as void_$3, hr as catchDone, hs as Prototype, ht as logDebug, hu as flow$2, i as addFinalizer$1, ia as interruptors, ii as CurrentStackFrame, il as withFiber$1, in as scope, io as onExitUnsafe, ir as forever$1, is as empty$14, it as forkScoped, j as delay, ja as effectIsExit, ji as isExit, jl as combine$1, jn as useSpan, jo as toPredicate, jr as effectContext, js as isCanonicalArrayIndex, jt as never, k as currentParentSpan, ka as consolePretty$1, kc as some, ki as hasInterrupts, kl as symbol$3, kn as uninterruptibleMask, ko as compose$2, kr as catch_$1, kt as matchCauseEffectEager, l as annotateLogsScoped, la as isInterruptReason, lc as filter$1, li as _await, ll as NodeInspectSymbol, ln as sleep, lo as succeedSome$1, lr as modifyDelay, ls as getOrUndefinedUnsafe, lt as ignoreCause, lu as constFalse, m as cachedInvalidateWithTTL, ma as makeFailReason, mc as fromNullishOr, mi as failCause$3, mn as sync$1, mo as updateContext$1, mr as upTo, ms as omit$1, mt as log$1, mu as dual, n as acquireRelease, na as hasInterruptsOnly, nc as map$10, ni as CurrentLogLevel, nn as runSyncExit, nr as addDelay, ns as Service$3, nt as forkDetach, nu as isTagged, o as andThen, oa as isDieReason, oc as try_$1, oi as TracerEnabled, ol as setStackTraceLimit, on as scopedWith, or as identity_, os as getOption$2, ot as fromResult, ou as backEdges, p as cached, pa as makeDieReason, pi as fail$4, pn as suspend$1, ps as merge$3, pt as isSuccess$3, pu as constant, q as flatMap$1, qa as fnUntraced$1, qi as fail$3, qn as clear$1, qr as addFinalizerExit, qs as all$6, qt as repeat, r as acquireUseRelease, ra as interrupt$2, ri as CurrentLogSpans, rn as runSyncWith, rr as exponential, rs as add$5, rt as forkIn, ru as isUndefined, s as annotateCurrentSpan, sc as contains, si as TracerTimingEnabled, sl as BaseProto, sn as service, so as succeed$5, sr as isSchedule, ss as getOrElse$1, st as gen$1, su as cast, t as Transaction, ta as hasInterrupts$1, tc as isSuccess$2, ti as CurrentLogAnnotations, tl as isEffect$1, tn as runSync, to as makeSpanUnsafe, ts as Reference, tt as forkChild, tu as isString, u as as, ua as isNoSuchElementError, uc as firstSomeOf, ui as die$3, ul as toJson, un as succeed$1, ur as passthrough$1, us as getUnsafe$2, ut as interrupt$1, uu as constTrue, v as catchDefect, va as prettyErrors, vc as getOrThrow$1, vi as isDone, vl as assignProperties, vn as tapError$1, vo as DisablePropagation, vr as isDoneCause, vt as logInfo, w as catchTags, wa as LogLevelOrder, wc as makeOrder, wi as asVoidAll, wl as make$250, wn as try_, wo as make$254, wr as currentTimeNanos, ws as findFirstIndex, wt as mapEager, x as catchIf, xa as ClockRef, xc as isOption, xi as makeUnsafe$9, xl as normalizeNonEmpty, xn as timeoutOption, xo as ParentSpan, xr as nextBetween, xs as filter, xt as makeSpanScoped, y as catchEager, ya as reasonAnnotations, yc as getOrUndefined, yi as isDoneUnsafe, yl as assignProperty, yn as tapErrorTag, yo as MinimumTraceLevel, ys as empty$13, yt as logWarning$1, yu as pipe, z as fiber, zi as IllegalArgumentError, zl as compose$3, zn as withSpan, zo as isFinite$2, zr as succeed$4, zs as of$1, zt as partition } from "./Effect-BahT0mOQ.mjs";
|
|
5
|
-
import { $ as mergeAll$1, $t as mapEffect$2, A as fromArray, An as sliding$1, At as timeoutOrElse$1, B as fromReadableStream, Bn as interrupt$4, Bt as zipLatestWith, C as filter$3, Cn as take$2, Ct as suspend$3, D as flatMap$3, Dn as publishAll, Dt as takeWhile, E as filterMapEffect, En as publish, Et as takeUntilEffect, F as fromIterable$1, Fn as set$10, G as isStream, Gn as round, Gt as last, H as groupedWithin, Hn as join$1, Ht as forEach$1, I as fromIteratorSucceed, In as makeUnsafe$12, It as transduce, J as mapAccum, Jt as decodeText$2, K as make$260, Kt as mapInput$2, L as fromPubSub, Ln as awaitAll, Lt as transformPull, M as fromChannel$1, Mn as take$3, Mt as toAsyncIterableWith, N as fromEffect, Nn as unbounded$1, Nt as toPull, O as flattenIterable, On as publishUnsafe, Ot as tap$3, P as fromEffectRepeat, Pn as make$257, Pt as toReadableStreamEffect, Q as merge$5, Qt as mapDone, R as fromPull, Rn as await_, Rt as unfold, S as failCause$5, Sn as sliding, St as succeed$7, T as filterMap$2, Tn as unbounded$2, Tt as takeUntil, U as ignore$3, Un as runIn, Ut as fromChannel, V as fromSubscription, Vn as interruptAll, Vt as drain, W as interruptWhen, Wn as parse$6, Wt as isSink, X as mapEffect$3, Y as mapArrayEffect, Yt as filterArray, Z as mapError$1, Zt as fromTransform, _ as drop$2, _n as offerAll, _t as runForEachArray, a as responsePayloads, an as makeUnsafe$13, at as pipeThroughChannel, b as ensuring$1, bn as shutdown$1, bt as scoped$1, c as catchTag$1, cn as collect$1, ct as provideService$1, d as changesWith, dn as endUnsafe, dt as run$5, et as mkString, f as concat$2, fn as fail$6, ft as runCollect, g as drain$1, gn as offer$1, gt as runForEach, h as die$4, hn as make$258, ht as runFoldEffect, in as make$259, it as paginate$1, j as fromAsyncIterable, jn as subscribe, jt as toAsyncIterable, k as forever$2, kn as shutdown$2, kt as tick, l as catch_$2, ln as dropping, lt as rechunk, m as decodeText$1, mn as failCauseUnsafe, mt as runFold, nn as pipeTo, nt as onEnd, o as callback$1, on as bounded, ot as pipeThroughChannelOrFail, p as debounce, pn as failCause$4, pt as runDrain, q as map$13, qt as unwrap$2, r as runAcpMcpCliFastPath, rn as splitLines$2, rt as orDie$1, s as catchCause$1, sn as clear$2, st as provideContext$1, tt as mkUint8Array, u as changes$1, un as end, ut as repeat$1, v as empty$17, vn as offerUnsafe, vt as runHead, w as filterEffect, wn as takeAll, wt as switchMap, x as fail$5, xn as shutdownUnsafe, xt as splitLines$1, y as encodeText$1, yn as poll$1, yt as runLast, z as fromQueue, zn as getCurrent, zt as unwrap$1 } from "./AcpMcpStdioBridge-
|
|
5
|
+
import { $ as mergeAll$1, $t as mapEffect$2, A as fromArray, An as sliding$1, At as timeoutOrElse$1, B as fromReadableStream, Bn as interrupt$4, Bt as zipLatestWith, C as filter$3, Cn as take$2, Ct as suspend$3, D as flatMap$3, Dn as publishAll, Dt as takeWhile, E as filterMapEffect, En as publish, Et as takeUntilEffect, F as fromIterable$1, Fn as set$10, G as isStream, Gn as round, Gt as last, H as groupedWithin, Hn as join$1, Ht as forEach$1, I as fromIteratorSucceed, In as makeUnsafe$12, It as transduce, J as mapAccum, Jt as decodeText$2, K as make$260, Kt as mapInput$2, L as fromPubSub, Ln as awaitAll, Lt as transformPull, M as fromChannel$1, Mn as take$3, Mt as toAsyncIterableWith, N as fromEffect, Nn as unbounded$1, Nt as toPull, O as flattenIterable, On as publishUnsafe, Ot as tap$3, P as fromEffectRepeat, Pn as make$257, Pt as toReadableStreamEffect, Q as merge$5, Qt as mapDone, R as fromPull, Rn as await_, Rt as unfold, S as failCause$5, Sn as sliding, St as succeed$7, T as filterMap$2, Tn as unbounded$2, Tt as takeUntil, U as ignore$3, Un as runIn, Ut as fromChannel, V as fromSubscription, Vn as interruptAll, Vt as drain, W as interruptWhen, Wn as parse$6, Wt as isSink, X as mapEffect$3, Y as mapArrayEffect, Yt as filterArray, Z as mapError$1, Zt as fromTransform, _ as drop$2, _n as offerAll, _t as runForEachArray, a as responsePayloads, an as makeUnsafe$13, at as pipeThroughChannel, b as ensuring$1, bn as shutdown$1, bt as scoped$1, c as catchTag$1, cn as collect$1, ct as provideService$1, d as changesWith, dn as endUnsafe, dt as run$5, et as mkString, f as concat$2, fn as fail$6, ft as runCollect, g as drain$1, gn as offer$1, gt as runForEach, h as die$4, hn as make$258, ht as runFoldEffect, in as make$259, it as paginate$1, j as fromAsyncIterable, jn as subscribe, jt as toAsyncIterable, k as forever$2, kn as shutdown$2, kt as tick, l as catch_$2, ln as dropping, lt as rechunk, m as decodeText$1, mn as failCauseUnsafe, mt as runFold, nn as pipeTo, nt as onEnd, o as callback$1, on as bounded, ot as pipeThroughChannelOrFail, p as debounce, pn as failCause$4, pt as runDrain, q as map$13, qt as unwrap$2, r as runAcpMcpCliFastPath, rn as splitLines$2, rt as orDie$1, s as catchCause$1, sn as clear$2, st as provideContext$1, tt as mkUint8Array, u as changes$1, un as end, ut as repeat$1, v as empty$17, vn as offerUnsafe, vt as runHead, w as filterEffect, wn as takeAll, wt as switchMap, x as fail$5, xn as shutdownUnsafe, xt as splitLines$1, y as encodeText$1, yn as poll$1, yt as runLast, z as fromQueue, zn as getCurrent, zt as unwrap$1 } from "./AcpMcpStdioBridge-DHwGLtep.mjs";
|
|
6
6
|
import * as NodeModule from "node:module";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import * as NFS from "node:fs";
|
|
@@ -14902,7 +14902,7 @@ const make$228 = () => {
|
|
|
14902
14902
|
const layer$242 = sync$2(NetService, make$228);
|
|
14903
14903
|
//#endregion
|
|
14904
14904
|
//#region package.json
|
|
14905
|
-
var version$2 = "0.8.
|
|
14905
|
+
var version$2 = "0.8.5";
|
|
14906
14906
|
//#endregion
|
|
14907
14907
|
//#region src/cli/acpMcpBridge.ts
|
|
14908
14908
|
/**
|
|
@@ -40660,24 +40660,10 @@ const McpServerConfig = Struct({
|
|
|
40660
40660
|
});
|
|
40661
40661
|
/**
|
|
40662
40662
|
* Whether a driver can receive a server over the transport. Codex, Claude and
|
|
40663
|
-
* Cursor take both transports.
|
|
40664
|
-
*
|
|
40665
|
-
* stdio servers without a working directory.
|
|
40663
|
+
* Cursor take both transports. ACP uses P4's stdio bridge for HTTP servers;
|
|
40664
|
+
* OpenCode receives the registry in its isolated local server.
|
|
40666
40665
|
*/
|
|
40667
|
-
const mcpProviderSupport = (
|
|
40668
|
-
if (driver === "codex" || driver === "claudeAgent" || driver === "cursor") return { supported: true };
|
|
40669
|
-
if (driver === "opencode") return {
|
|
40670
|
-
supported: false,
|
|
40671
|
-
reason: "provider"
|
|
40672
|
-
};
|
|
40673
|
-
if (transport.type === "http") return {
|
|
40674
|
-
supported: false,
|
|
40675
|
-
reason: "remote"
|
|
40676
|
-
};
|
|
40677
|
-
if (transport.cwd !== void 0) return {
|
|
40678
|
-
supported: false,
|
|
40679
|
-
reason: "working-directory"
|
|
40680
|
-
};
|
|
40666
|
+
const mcpProviderSupport = (_driver, _transport) => {
|
|
40681
40667
|
return { supported: true };
|
|
40682
40668
|
};
|
|
40683
40669
|
/** A Claude Code plugin folder on the server host (`.claude-plugin/plugin.json`). */
|
|
@@ -40742,7 +40728,9 @@ const McpServerTarget = Struct({ serverId: McpServerId });
|
|
|
40742
40728
|
const McpServerOAuthStartInput = Struct({
|
|
40743
40729
|
serverId: McpServerId,
|
|
40744
40730
|
/** The origin the client reaches this server on; the OAuth redirect returns there. */
|
|
40745
|
-
origin: TrimmedNonEmptyString
|
|
40731
|
+
origin: TrimmedNonEmptyString,
|
|
40732
|
+
/** Sign in through the browser again even when the stored grant still works. */
|
|
40733
|
+
reauthenticate: optionalKey(Boolean$5)
|
|
40746
40734
|
});
|
|
40747
40735
|
const McpServerOAuthStartResult = Struct({ authorizationUrl: NullOr(String$7) });
|
|
40748
40736
|
/**
|
|
@@ -40752,11 +40740,13 @@ const McpServerOAuthStartResult = Struct({ authorizationUrl: NullOr(String$7) })
|
|
|
40752
40740
|
*/
|
|
40753
40741
|
const DiscoveredMcpServer = Struct({
|
|
40754
40742
|
provider: McpImportSource,
|
|
40743
|
+
/** All providers with an equivalent configuration; optional for older servers. */
|
|
40744
|
+
providers: optionalKey(ArraySchema(McpImportSource)),
|
|
40755
40745
|
path: String$7,
|
|
40756
40746
|
name: String$7,
|
|
40757
40747
|
type: Literals$2(["stdio", "http"]),
|
|
40758
40748
|
summary: String$7,
|
|
40759
|
-
/**
|
|
40749
|
+
/** An equivalent configuration is already in the registry. */
|
|
40760
40750
|
alreadyAdded: Boolean$5
|
|
40761
40751
|
});
|
|
40762
40752
|
const McpDiscoverInput = Struct({ projectId: optionalKey(ProjectId) });
|
|
@@ -40779,9 +40769,11 @@ var McpRegistryRpcError = class extends TaggedError$1()("McpRegistryRpcError", {
|
|
|
40779
40769
|
"discover",
|
|
40780
40770
|
"import"
|
|
40781
40771
|
]),
|
|
40772
|
+
/** `rejected`: the server's authorization server refused to register P4 Code as a client. */
|
|
40782
40773
|
reason: Literals$2([
|
|
40783
40774
|
"not-found",
|
|
40784
40775
|
"invalid",
|
|
40776
|
+
"rejected",
|
|
40785
40777
|
"failed"
|
|
40786
40778
|
]),
|
|
40787
40779
|
cause: optional$9(Defect())
|
|
@@ -41912,6 +41904,8 @@ const ProjectSettingsOverrides = Struct({
|
|
|
41912
41904
|
mcpServers: optionalKey(Record$2(McpServerId, ProjectRegistryEntryOverride)),
|
|
41913
41905
|
/** Per-entry `enabled` overrides of `plugins`, merged like `providerInstances`. */
|
|
41914
41906
|
plugins: optionalKey(Record$2(PluginId, ProjectRegistryEntryOverride)),
|
|
41907
|
+
/** Native skill enablement by name, for providers with session controls. */
|
|
41908
|
+
skillOverrides: optionalKey(Record$2(TrimmedNonEmptyString, Boolean$5)),
|
|
41915
41909
|
worktreeCleanup: optionalKey(WorktreeCleanup),
|
|
41916
41910
|
defaultModelSelection: optionalKey(NullOr(ModelSelection)),
|
|
41917
41911
|
defaultRuntimeMode: optionalKey(RuntimeMode$1),
|
|
@@ -42139,6 +42133,8 @@ const ServerSettings = Struct({
|
|
|
42139
42133
|
* environment starts. Environment and header values live in the secret store.
|
|
42140
42134
|
*/
|
|
42141
42135
|
mcpServers: Record$2(McpServerId, McpServerConfig).pipe(withDecodingDefault(succeed$1({}))),
|
|
42136
|
+
/** Native skill enablement. External provider configuration files are never changed. */
|
|
42137
|
+
skillOverrides: Record$2(TrimmedNonEmptyString, Boolean$5).pipe(withDecodingDefault(succeed$1({}))),
|
|
42142
42138
|
/** Claude Code plugin folders on this host, given to Claude sessions. */
|
|
42143
42139
|
plugins: Record$2(PluginId, PluginConfig).pipe(withDecodingDefault(succeed$1({}))),
|
|
42144
42140
|
/** Allows this server to read the Cursor CLI's macOS Keychain login for account usage. */
|
|
@@ -42367,6 +42363,7 @@ const ServerSettingsPatch = Struct({
|
|
|
42367
42363
|
usageLimitSources: optionalKey(Record$2(UsageLimitSourceId, NullOr(UsageLimitSourceConfig))),
|
|
42368
42364
|
mcpServers: optionalKey(Record$2(McpServerId, NullOr(McpServerConfig))),
|
|
42369
42365
|
plugins: optionalKey(Record$2(PluginId, NullOr(PluginConfig))),
|
|
42366
|
+
skillOverrides: optionalKey(Record$2(TrimmedNonEmptyString, NullOr(Boolean$5))),
|
|
42370
42367
|
cursorKeychainUsageEnabled: optionalKey(Boolean$5),
|
|
42371
42368
|
/** Each entry replaces one model's rates; `null` restores automatic pricing. */
|
|
42372
42369
|
usagePriceOverrides: optionalKey(Record$2(TrimmedNonEmptyString, NullOr(UsageModelPriceOverride))),
|
|
@@ -56740,7 +56737,8 @@ function mergeProjectSettingsOverridesPatch(current, patch) {
|
|
|
56740
56737
|
...entry,
|
|
56741
56738
|
...keepOmittedOverride(entry, stored, "providerInstances"),
|
|
56742
56739
|
...keepOmittedOverride(entry, stored, "mcpServers"),
|
|
56743
|
-
...keepOmittedOverride(entry, stored, "plugins")
|
|
56740
|
+
...keepOmittedOverride(entry, stored, "plugins"),
|
|
56741
|
+
...keepOmittedOverride(entry, stored, "skillOverrides")
|
|
56744
56742
|
});
|
|
56745
56743
|
}
|
|
56746
56744
|
return Object.fromEntries(next);
|
|
@@ -56798,7 +56796,7 @@ function translateLegacyProjectOverridePatch(current, patch) {
|
|
|
56798
56796
|
function applyServerSettingsPatch(current, rawPatch) {
|
|
56799
56797
|
const patch = translateLegacyProjectOverridePatch(current, rawPatch);
|
|
56800
56798
|
const selectionPatch = patch.textGenerationModelSelection;
|
|
56801
|
-
const { migrateModelPreferences, setModelFavorites, setModelsHidden, setProviderModelOrder, providerModelPreferences, automaticGitFetchInterval, providerHealthRefreshInterval, backgroundActivityProfile, backgroundActivity, worktreeCleanup: worktreeCleanupPatch, usageLimitSources: usageLimitSourcesPatch, mcpServers: mcpServersPatch, plugins: pluginsPatch, sourceControlHosts: sourceControlHostsPatch, usagePriceOverrides: usagePriceOverridesPatch, usageModelAliases: usageModelAliasesPatch, projectSettingsOverrides: projectSettingsOverridesPatch, projectAgentBrowserAccessOverrides: _legacyBrowserAccess, projectAutoPullOverrides: _legacyAutoPull, projectScriptOverrides: _legacyScripts, ...patchForMerge } = patch;
|
|
56799
|
+
const { migrateModelPreferences, setModelFavorites, setModelsHidden, setProviderModelOrder, providerModelPreferences, automaticGitFetchInterval, providerHealthRefreshInterval, backgroundActivityProfile, backgroundActivity, worktreeCleanup: worktreeCleanupPatch, usageLimitSources: usageLimitSourcesPatch, mcpServers: mcpServersPatch, plugins: pluginsPatch, skillOverrides: skillOverridesPatch, sourceControlHosts: sourceControlHostsPatch, usagePriceOverrides: usagePriceOverridesPatch, usageModelAliases: usageModelAliasesPatch, projectSettingsOverrides: projectSettingsOverridesPatch, projectAgentBrowserAccessOverrides: _legacyBrowserAccess, projectAutoPullOverrides: _legacyAutoPull, projectScriptOverrides: _legacyScripts, ...patchForMerge } = patch;
|
|
56802
56800
|
const currentBackgroundActivity = normalizeServerBackgroundActivitySettings(current);
|
|
56803
56801
|
const backgroundActivityPatch = backgroundActivityProfile !== void 0 ? {
|
|
56804
56802
|
schemaVersion: 1,
|
|
@@ -56891,6 +56889,7 @@ function applyServerSettingsPatch(current, rawPatch) {
|
|
|
56891
56889
|
...patch.defaultProjectScripts !== void 0 ? { defaultProjectScripts: patch.defaultProjectScripts } : {},
|
|
56892
56890
|
...usageLimitSourcesPatch !== void 0 ? { usageLimitSources: mergeSettingsEntries(current.usageLimitSources, usageLimitSourcesPatch) } : {},
|
|
56893
56891
|
...mcpServersPatch !== void 0 ? { mcpServers: mergeSettingsEntries(current.mcpServers, mcpServersPatch) } : {},
|
|
56892
|
+
...skillOverridesPatch !== void 0 ? { skillOverrides: mergeSettingsEntries(current.skillOverrides, skillOverridesPatch) } : {},
|
|
56894
56893
|
...pluginsPatch !== void 0 ? { plugins: mergeSettingsEntries(current.plugins, pluginsPatch) } : {},
|
|
56895
56894
|
...usagePriceOverridesPatch !== void 0 ? { usagePriceOverrides: mergeSettingsEntries(current.usagePriceOverrides, usagePriceOverridesPatch) } : {},
|
|
56896
56895
|
...usageModelAliasesPatch !== void 0 ? { usageModelAliases: mergeSettingsEntries(current.usageModelAliases, usageModelAliasesPatch) } : {},
|
|
@@ -168430,6 +168429,24 @@ function mcpToolPresentation$1(input) {
|
|
|
168430
168429
|
*
|
|
168431
168430
|
* @module provider-core/server/UserMcpServers
|
|
168432
168431
|
*/
|
|
168432
|
+
/** Preserve cwd for provider SDKs whose stdio configuration has no cwd field. */
|
|
168433
|
+
const withStdioWorkingDirectory = (transport, self) => {
|
|
168434
|
+
if (transport.cwd === void 0) return transport;
|
|
168435
|
+
return {
|
|
168436
|
+
type: "stdio",
|
|
168437
|
+
command: self.command,
|
|
168438
|
+
args: selfInvocationArgs(self, ["acp-mcp-bridge"]),
|
|
168439
|
+
env: {
|
|
168440
|
+
...transport.env,
|
|
168441
|
+
ELECTRON_RUN_AS_NODE: "1",
|
|
168442
|
+
T3_ACP_MCP_STDIO: JSON.stringify({
|
|
168443
|
+
command: transport.command,
|
|
168444
|
+
args: transport.args,
|
|
168445
|
+
cwd: transport.cwd
|
|
168446
|
+
})
|
|
168447
|
+
}
|
|
168448
|
+
};
|
|
168449
|
+
};
|
|
168433
168450
|
const EMPTY_USER_MCP_REGISTRY = {
|
|
168434
168451
|
servers: [],
|
|
168435
168452
|
plugins: []
|
|
@@ -169412,20 +169429,41 @@ function negotiatedCapabilities(base, started) {
|
|
|
169412
169429
|
};
|
|
169413
169430
|
}
|
|
169414
169431
|
/**
|
|
169415
|
-
*
|
|
169416
|
-
*
|
|
169417
|
-
* servers (see below), and ACP's stdio entry has no working directory.
|
|
169432
|
+
* ACP's baseline is stdio. Bridge remote entries using P4's resolved headers,
|
|
169433
|
+
* so agents never need their own OAuth grant.
|
|
169418
169434
|
*/
|
|
169419
|
-
function acpUserMcpServers(servers) {
|
|
169420
|
-
return servers.
|
|
169421
|
-
|
|
169422
|
-
|
|
169423
|
-
|
|
169424
|
-
|
|
169425
|
-
|
|
169426
|
-
|
|
169427
|
-
|
|
169428
|
-
|
|
169435
|
+
function acpUserMcpServers(servers, self) {
|
|
169436
|
+
return servers.map((server) => {
|
|
169437
|
+
if (server.transport.type === "http") return {
|
|
169438
|
+
name: server.name,
|
|
169439
|
+
command: self.command,
|
|
169440
|
+
args: [...selfInvocationArgs(self, ["acp-mcp-bridge"])],
|
|
169441
|
+
env: [
|
|
169442
|
+
{
|
|
169443
|
+
name: "ELECTRON_RUN_AS_NODE",
|
|
169444
|
+
value: "1"
|
|
169445
|
+
},
|
|
169446
|
+
{
|
|
169447
|
+
name: "T3_ACP_MCP_ENDPOINT",
|
|
169448
|
+
value: server.transport.url
|
|
169449
|
+
},
|
|
169450
|
+
{
|
|
169451
|
+
name: "T3_ACP_MCP_HEADERS",
|
|
169452
|
+
value: JSON.stringify(server.transport.headers)
|
|
169453
|
+
}
|
|
169454
|
+
]
|
|
169455
|
+
};
|
|
169456
|
+
const transport = withStdioWorkingDirectory(server.transport, self);
|
|
169457
|
+
return {
|
|
169458
|
+
name: server.name,
|
|
169459
|
+
command: transport.command,
|
|
169460
|
+
args: [...transport.args],
|
|
169461
|
+
env: Object.entries(transport.env).map(([name, value]) => ({
|
|
169462
|
+
name,
|
|
169463
|
+
value
|
|
169464
|
+
}))
|
|
169465
|
+
};
|
|
169466
|
+
});
|
|
169429
169467
|
}
|
|
169430
169468
|
function acpMcpContext(session, self, userServers = []) {
|
|
169431
169469
|
if (session === void 0) return {
|
|
@@ -169866,7 +169904,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
169866
169904
|
const { flavor, selfInvocation: self } = options;
|
|
169867
169905
|
const readUserMcpRegistry = yield* makeReader;
|
|
169868
169906
|
const driver = flavor.driver;
|
|
169869
|
-
const readMcpContext = (threadId) => threadId === null ? succeed$1(acpMcpContext(void 0, self)) : all$5([mcpSessions.read(threadId), readUserMcpRegistry(threadId)]).pipe(map$11(([session, registry]) => acpMcpContext(session, self, acpUserMcpServers(serversForDriver(registry, driver)))));
|
|
169907
|
+
const readMcpContext = (threadId) => threadId === null ? succeed$1(acpMcpContext(void 0, self)) : all$5([mcpSessions.read(threadId), readUserMcpRegistry(threadId)]).pipe(map$11(([session, registry]) => acpMcpContext(session, self, acpUserMcpServers(serversForDriver(registry, driver), self))));
|
|
169870
169908
|
const continuationRequests = options.continuationRequests;
|
|
169871
169909
|
const postSettleContinuationEnabled = flavor.enablePostSettleContinuation === true && continuationRequests !== void 0;
|
|
169872
169910
|
return ProviderAdapterV2.of({
|
|
@@ -170343,7 +170381,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170343
170381
|
markdown,
|
|
170344
170382
|
planId
|
|
170345
170383
|
});
|
|
170346
|
-
const now$
|
|
170384
|
+
const now$134 = yield* now;
|
|
170347
170385
|
const nodeId = idAllocator.derive.nodeFromProviderItem({
|
|
170348
170386
|
driver,
|
|
170349
170387
|
nativeItemId
|
|
@@ -170376,7 +170414,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170376
170414
|
runtimeRequestId: null,
|
|
170377
170415
|
checkpointScopeId: null,
|
|
170378
170416
|
startedAt: context.startedAt,
|
|
170379
|
-
completedAt: now$
|
|
170417
|
+
completedAt: now$134
|
|
170380
170418
|
}
|
|
170381
170419
|
});
|
|
170382
170420
|
yield* emitProviderEvent({
|
|
@@ -170408,8 +170446,8 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170408
170446
|
status: "completed",
|
|
170409
170447
|
title: null,
|
|
170410
170448
|
startedAt: context.startedAt,
|
|
170411
|
-
completedAt: now$
|
|
170412
|
-
updatedAt: now$
|
|
170449
|
+
completedAt: now$134,
|
|
170450
|
+
updatedAt: now$134,
|
|
170413
170451
|
type: "proposed_plan",
|
|
170414
170452
|
planId,
|
|
170415
170453
|
markdown,
|
|
@@ -170437,7 +170475,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170437
170475
|
const emitTextSegment = fnUntraced(function* (context, kind, completed) {
|
|
170438
170476
|
const segment = textStreamFor(context, kind).current;
|
|
170439
170477
|
if (segment === null) return;
|
|
170440
|
-
const now$
|
|
170478
|
+
const now$122 = yield* now;
|
|
170441
170479
|
const ordinal = yield* resolveItemOrdinal(context, segment.nativeItemId);
|
|
170442
170480
|
const nodeId = providerNodeId(segment.nativeItemId);
|
|
170443
170481
|
const turnItemId = providerTurnItemId(segment.nativeItemId);
|
|
@@ -170464,7 +170502,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170464
170502
|
runtimeRequestId: null,
|
|
170465
170503
|
checkpointScopeId: null,
|
|
170466
170504
|
startedAt: segment.startedAt,
|
|
170467
|
-
completedAt: completed ? now$
|
|
170505
|
+
completedAt: completed ? now$122 : null
|
|
170468
170506
|
}
|
|
170469
170507
|
});
|
|
170470
170508
|
if (kind !== "reasoning") {
|
|
@@ -170482,7 +170520,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170482
170520
|
attachments: [],
|
|
170483
170521
|
streaming: !completed,
|
|
170484
170522
|
createdAt: segment.startedAt,
|
|
170485
|
-
updatedAt: now$
|
|
170523
|
+
updatedAt: now$122
|
|
170486
170524
|
};
|
|
170487
170525
|
yield* emitProviderEvent({
|
|
170488
170526
|
type: "message.updated",
|
|
@@ -170507,8 +170545,8 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170507
170545
|
status: completed ? "completed" : "running",
|
|
170508
170546
|
title: null,
|
|
170509
170547
|
startedAt: segment.startedAt,
|
|
170510
|
-
completedAt: completed ? now$
|
|
170511
|
-
updatedAt: now$
|
|
170548
|
+
completedAt: completed ? now$122 : null,
|
|
170549
|
+
updatedAt: now$122,
|
|
170512
170550
|
type: "user_message",
|
|
170513
170551
|
messageId,
|
|
170514
170552
|
inputIntent: "turn_start",
|
|
@@ -170531,8 +170569,8 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170531
170569
|
status: completed ? "completed" : "running",
|
|
170532
170570
|
title: null,
|
|
170533
170571
|
startedAt: segment.startedAt,
|
|
170534
|
-
completedAt: completed ? now$
|
|
170535
|
-
updatedAt: now$
|
|
170572
|
+
completedAt: completed ? now$122 : null,
|
|
170573
|
+
updatedAt: now$122,
|
|
170536
170574
|
type: "assistant_message",
|
|
170537
170575
|
messageId,
|
|
170538
170576
|
text: segment.text,
|
|
@@ -170558,8 +170596,8 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170558
170596
|
status: completed ? "completed" : "running",
|
|
170559
170597
|
title: null,
|
|
170560
170598
|
startedAt: segment.startedAt,
|
|
170561
|
-
completedAt: completed ? now$
|
|
170562
|
-
updatedAt: now$
|
|
170599
|
+
completedAt: completed ? now$122 : null,
|
|
170600
|
+
updatedAt: now$122,
|
|
170563
170601
|
type: "reasoning",
|
|
170564
170602
|
text: segment.text,
|
|
170565
170603
|
streaming: !completed
|
|
@@ -170588,10 +170626,10 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170588
170626
|
const sourceMessageId = messageId?.trim() || null;
|
|
170589
170627
|
if (stream.current !== null && sourceMessageId !== null && stream.current.sourceMessageId !== null && stream.current.sourceMessageId !== sourceMessageId) yield* closeTextStream(context, kind);
|
|
170590
170628
|
if (stream.current === null) {
|
|
170591
|
-
const now$
|
|
170629
|
+
const now$126 = yield* now;
|
|
170592
170630
|
stream.current = {
|
|
170593
170631
|
nativeItemId: sourceMessageId === null ? `${context.nativeTurnId}:${kind}:${stream.nextSegment}` : `${context.nativeTurnId}:${kind}:message:${sourceMessageId}`,
|
|
170594
|
-
startedAt: now$
|
|
170632
|
+
startedAt: now$126,
|
|
170595
170633
|
sourceMessageId,
|
|
170596
170634
|
text: ""
|
|
170597
170635
|
};
|
|
@@ -170609,10 +170647,10 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170609
170647
|
const stream = textStreamFor(context, kind);
|
|
170610
170648
|
if (stream.current?.sourceMessageId !== messageId) {
|
|
170611
170649
|
yield* closeTextStream(context, kind);
|
|
170612
|
-
const now$
|
|
170650
|
+
const now$124 = yield* now;
|
|
170613
170651
|
stream.current = {
|
|
170614
170652
|
nativeItemId: `${context.nativeTurnId}:${kind}:message:${messageId}`,
|
|
170615
|
-
startedAt: now$
|
|
170653
|
+
startedAt: now$124,
|
|
170616
170654
|
sourceMessageId: messageId,
|
|
170617
170655
|
text
|
|
170618
170656
|
};
|
|
@@ -170627,7 +170665,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170627
170665
|
const messageText = mode === "replace" ? text : `${previous}${text}`;
|
|
170628
170666
|
subagent.assistantMessages.set(nativeItemId, messageText);
|
|
170629
170667
|
subagent.assistantText = messageText;
|
|
170630
|
-
const now$
|
|
170668
|
+
const now$123 = yield* now;
|
|
170631
170669
|
const ordinal = resolveSubagentChildOrdinal(subagent, nativeItemId);
|
|
170632
170670
|
const artifacts = makeSubagentConversationArtifacts({
|
|
170633
170671
|
messageId: providerMessageId(nativeItemId),
|
|
@@ -170644,7 +170682,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170644
170682
|
role: "assistant",
|
|
170645
170683
|
text: subagent.assistantText,
|
|
170646
170684
|
ordinal,
|
|
170647
|
-
now: now$
|
|
170685
|
+
now: now$123
|
|
170648
170686
|
});
|
|
170649
170687
|
yield* emitProviderEvent({
|
|
170650
170688
|
type: "message.updated",
|
|
@@ -170679,7 +170717,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170679
170717
|
if (existing === void 0) {
|
|
170680
170718
|
if (update.prompt === "" && update.title === null || update.suppressNormalTool === false) return;
|
|
170681
170719
|
}
|
|
170682
|
-
const now$
|
|
170720
|
+
const now$127 = yield* now;
|
|
170683
170721
|
const nativeTaskId = existing?.task.nativeTaskRef?.nativeId ?? update.nativeTaskId;
|
|
170684
170722
|
const nativeItemRef = {
|
|
170685
170723
|
driver,
|
|
@@ -170712,13 +170750,13 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170712
170750
|
prompt: update.prompt,
|
|
170713
170751
|
title: update.title,
|
|
170714
170752
|
result: null,
|
|
170715
|
-
startedAt: now$
|
|
170753
|
+
startedAt: now$127
|
|
170716
170754
|
},
|
|
170717
170755
|
model: update.model?.trim() || existing?.task.model || null,
|
|
170718
170756
|
status: taskStatus,
|
|
170719
170757
|
result: update.result ?? existing?.task.result ?? null,
|
|
170720
|
-
completedAt: acpSubagentStatusIsTerminal(taskStatus) ? now$
|
|
170721
|
-
updatedAt: now$
|
|
170758
|
+
completedAt: acpSubagentStatusIsTerminal(taskStatus) ? now$127 : null,
|
|
170759
|
+
updatedAt: now$127
|
|
170722
170760
|
};
|
|
170723
170761
|
const subagent = existing ?? {
|
|
170724
170762
|
task,
|
|
@@ -170757,7 +170795,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170757
170795
|
prompt: update.prompt,
|
|
170758
170796
|
ordinal: context.subagents.size
|
|
170759
170797
|
}),
|
|
170760
|
-
now: now$
|
|
170798
|
+
now: now$127,
|
|
170761
170799
|
createdBy: "agent",
|
|
170762
170800
|
creationSource: "provider"
|
|
170763
170801
|
})
|
|
@@ -170779,7 +170817,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170779
170817
|
role: "user",
|
|
170780
170818
|
text: update.prompt,
|
|
170781
170819
|
ordinal: 100,
|
|
170782
|
-
now: now$
|
|
170820
|
+
now: now$127
|
|
170783
170821
|
});
|
|
170784
170822
|
yield* emitProviderEvent({
|
|
170785
170823
|
type: "message.updated",
|
|
@@ -170808,7 +170846,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170808
170846
|
providerThreadId: context.input.providerThread.id,
|
|
170809
170847
|
providerTurnId: context.providerTurnId
|
|
170810
170848
|
},
|
|
170811
|
-
now: now$
|
|
170849
|
+
now: now$127
|
|
170812
170850
|
});
|
|
170813
170851
|
subagent.task = {
|
|
170814
170852
|
...subagent.task,
|
|
@@ -170836,8 +170874,8 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170836
170874
|
...subagent.task,
|
|
170837
170875
|
status: taskStatus,
|
|
170838
170876
|
result,
|
|
170839
|
-
completedAt: acpSubagentStatusIsTerminal(taskStatus) ? now$
|
|
170840
|
-
updatedAt: now$
|
|
170877
|
+
completedAt: acpSubagentStatusIsTerminal(taskStatus) ? now$127 : null,
|
|
170878
|
+
updatedAt: now$127
|
|
170841
170879
|
};
|
|
170842
170880
|
const providerThreadId = subagent.task.providerThreadId;
|
|
170843
170881
|
yield* emitProviderEvent({
|
|
@@ -170904,7 +170942,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
170904
170942
|
title: subagent.task.title,
|
|
170905
170943
|
startedAt: subagent.task.startedAt,
|
|
170906
170944
|
completedAt: subagent.task.completedAt,
|
|
170907
|
-
updatedAt: now$
|
|
170945
|
+
updatedAt: now$127,
|
|
170908
170946
|
type: "subagent",
|
|
170909
170947
|
subagentId: subagent.task.id,
|
|
170910
170948
|
origin: "provider_native",
|
|
@@ -171065,7 +171103,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171065
171103
|
return;
|
|
171066
171104
|
}
|
|
171067
171105
|
const status = projectedStatus ?? toolStatus$1(toolCall.status);
|
|
171068
|
-
const now$
|
|
171106
|
+
const now$133 = yield* now;
|
|
171069
171107
|
const nativeItemId = `${context.nativeThreadId}:tool:${toolCall.toolCallId}`;
|
|
171070
171108
|
const ordinal = yield* resolveItemOrdinal(context, nativeItemId);
|
|
171071
171109
|
const nodeId = providerNodeId(nativeItemId);
|
|
@@ -171075,9 +171113,9 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171075
171113
|
nativeId: toolCall.toolCallId,
|
|
171076
171114
|
strength: "strong"
|
|
171077
171115
|
};
|
|
171078
|
-
const startedAt = context.toolStartedAt.get(toolCall.toolCallId) ?? now$
|
|
171116
|
+
const startedAt = context.toolStartedAt.get(toolCall.toolCallId) ?? now$133;
|
|
171079
171117
|
context.toolStartedAt.set(toolCall.toolCallId, startedAt);
|
|
171080
|
-
const completedAt = completedAtForStatus(status, now$
|
|
171118
|
+
const completedAt = completedAtForStatus(status, now$133);
|
|
171081
171119
|
const title = toolCall.title ?? null;
|
|
171082
171120
|
yield* emitProviderEvent({
|
|
171083
171121
|
type: "node.updated",
|
|
@@ -171114,7 +171152,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171114
171152
|
title,
|
|
171115
171153
|
startedAt,
|
|
171116
171154
|
completedAt,
|
|
171117
|
-
updatedAt: now$
|
|
171155
|
+
updatedAt: now$133
|
|
171118
171156
|
};
|
|
171119
171157
|
const rawInput = toolCall.data.rawInput;
|
|
171120
171158
|
const rawOutput = toolCall.data.rawOutput ?? toolCall.data.content;
|
|
@@ -171286,7 +171324,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171286
171324
|
if (update.kind === "removed" && existing === void 0) return;
|
|
171287
171325
|
const nativeItemId = `${context.nativeTurnId}:plan:${encodeURIComponent(update.nativePlanId)}`;
|
|
171288
171326
|
const ordinal = yield* resolveItemOrdinal(context, nativeItemId);
|
|
171289
|
-
const now$
|
|
171327
|
+
const now$132 = yield* now;
|
|
171290
171328
|
const nodeId = providerNodeId(nativeItemId);
|
|
171291
171329
|
const turnItemId = providerTurnItemId(nativeItemId);
|
|
171292
171330
|
const planState = existing ?? {
|
|
@@ -171295,7 +171333,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171295
171333
|
runId: context.input.runId,
|
|
171296
171334
|
driver
|
|
171297
171335
|
}),
|
|
171298
|
-
startedAt: now$
|
|
171336
|
+
startedAt: now$132,
|
|
171299
171337
|
latest: null
|
|
171300
171338
|
};
|
|
171301
171339
|
const planId = planState.id;
|
|
@@ -171362,7 +171400,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171362
171400
|
runtimeRequestId: null,
|
|
171363
171401
|
checkpointScopeId: null,
|
|
171364
171402
|
startedAt: planState.startedAt,
|
|
171365
|
-
completedAt: completed ? now$
|
|
171403
|
+
completedAt: completed ? now$132 : null
|
|
171366
171404
|
}
|
|
171367
171405
|
});
|
|
171368
171406
|
yield* emitProviderEvent({
|
|
@@ -171386,8 +171424,8 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171386
171424
|
status: completed ? "completed" : "running",
|
|
171387
171425
|
title: null,
|
|
171388
171426
|
startedAt: planState.startedAt,
|
|
171389
|
-
completedAt: completed ? now$
|
|
171390
|
-
updatedAt: now$
|
|
171427
|
+
completedAt: completed ? now$132 : null,
|
|
171428
|
+
updatedAt: now$132,
|
|
171391
171429
|
...plan.kind === "todo_list" ? {
|
|
171392
171430
|
type: "todo_list",
|
|
171393
171431
|
planId,
|
|
@@ -171404,7 +171442,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171404
171442
|
});
|
|
171405
171443
|
const appendLoadedHistory = (notification, role, text, replace = false) => gen$1(function* () {
|
|
171406
171444
|
if (text.length === 0 && !replace) return;
|
|
171407
|
-
const now$
|
|
171445
|
+
const now$129 = yield* now;
|
|
171408
171446
|
yield* update$4(snapshot, (current) => {
|
|
171409
171447
|
const update = notification.update;
|
|
171410
171448
|
const sourceMessageId = (update.sessionUpdate === "user_message_chunk" || update.sessionUpdate === "agent_message_chunk" || update.sessionUpdate === "agent_thought_chunk" || update.sessionUpdate === "user_message" || update.sessionUpdate === "agent_message" || update.sessionUpdate === "agent_thought") && update.messageId ? update.messageId : null;
|
|
@@ -171426,8 +171464,8 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171426
171464
|
text: replace ? text : `${previous?.text ?? ""}${text}`,
|
|
171427
171465
|
attachments: [],
|
|
171428
171466
|
streaming: false,
|
|
171429
|
-
createdAt: previous?.createdAt ?? now$
|
|
171430
|
-
updatedAt: now$
|
|
171467
|
+
createdAt: previous?.createdAt ?? now$129,
|
|
171468
|
+
updatedAt: now$129
|
|
171431
171469
|
});
|
|
171432
171470
|
return {
|
|
171433
171471
|
order: current.order.includes(key) ? current.order : [...current.order, key],
|
|
@@ -171653,12 +171691,12 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171653
171691
|
}
|
|
171654
171692
|
const knownProviderThread = (yield* get$7(providerThreadByNativeSessionId)).get(notification.sessionId);
|
|
171655
171693
|
if (knownProviderThread !== void 0) {
|
|
171656
|
-
const now$
|
|
171694
|
+
const now$125 = yield* now;
|
|
171657
171695
|
const providerThread = {
|
|
171658
171696
|
...knownProviderThread,
|
|
171659
171697
|
contextUsage: (yield* get$7(contextUsageBySessionId)).get(notification.sessionId) ?? knownProviderThread.contextUsage ?? null,
|
|
171660
171698
|
nativeMetadata: (yield* get$7(nativeMetadataBySessionId)).get(notification.sessionId) ?? knownProviderThread.nativeMetadata ?? null,
|
|
171661
|
-
updatedAt: now$
|
|
171699
|
+
updatedAt: now$125
|
|
171662
171700
|
};
|
|
171663
171701
|
yield* update$4(providerThreadByNativeSessionId, (current) => new Map(current).set(notification.sessionId, providerThread));
|
|
171664
171702
|
yield* emitProviderEvent({
|
|
@@ -171756,9 +171794,9 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171756
171794
|
context.tools.set(key, merged);
|
|
171757
171795
|
if (!shouldPersistToolUpdate(context, key, previous, merged, merged.status)) continue;
|
|
171758
171796
|
const mcpIdentity = extractMcpToolCallIdentity(merged, { embeddedTerminalCommands: [...embeddedTerminalCommands(notification.sessionId, toolCall.toolCallId), ...rootSessionId === null ? [] : embeddedTerminalCommands(rootSessionId, toolCall.toolCallId)] });
|
|
171759
|
-
const now$
|
|
171797
|
+
const now$135 = yield* now;
|
|
171760
171798
|
const status = toolStatus$1(merged.status);
|
|
171761
|
-
const startedAt = context.toolStartedAt.get(key) ?? now$
|
|
171799
|
+
const startedAt = context.toolStartedAt.get(key) ?? now$135;
|
|
171762
171800
|
context.toolStartedAt.set(key, startedAt);
|
|
171763
171801
|
const ordinal = resolveSubagentChildOrdinal(subagent, key);
|
|
171764
171802
|
yield* emitProviderEvent({
|
|
@@ -171781,8 +171819,8 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171781
171819
|
status,
|
|
171782
171820
|
title: merged.title ?? merged.kind ?? "Tool",
|
|
171783
171821
|
startedAt,
|
|
171784
|
-
completedAt: completedAtForStatus(status, now$
|
|
171785
|
-
updatedAt: now$
|
|
171822
|
+
completedAt: completedAtForStatus(status, now$135),
|
|
171823
|
+
updatedAt: now$135,
|
|
171786
171824
|
type: "dynamic_tool",
|
|
171787
171825
|
...mcpIdentity === void 0 ? {} : mcpToolPresentation$1({
|
|
171788
171826
|
serverName: mcpIdentity.server,
|
|
@@ -171973,7 +172011,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171973
172011
|
const decision = yield* make$255();
|
|
171974
172012
|
const nativeResponseAcknowledgement = yield* make$255();
|
|
171975
172013
|
yield* registerNativeResponseAcknowledgement(generation, transportRequestId, nativeResponseAcknowledgement);
|
|
171976
|
-
const now$
|
|
172014
|
+
const now$121 = yield* now;
|
|
171977
172015
|
const nodeId = idAllocator.derive.approvalNode({ requestId });
|
|
171978
172016
|
const requestKind = providerRequestKind(parsed.kind);
|
|
171979
172017
|
const nativeItemRef = {
|
|
@@ -171993,7 +172031,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
171993
172031
|
type: "live",
|
|
171994
172032
|
providerSessionId: input.providerSessionId
|
|
171995
172033
|
},
|
|
171996
|
-
createdAt: now$
|
|
172034
|
+
createdAt: now$121,
|
|
171997
172035
|
resolvedAt: null
|
|
171998
172036
|
};
|
|
171999
172037
|
const node = {
|
|
@@ -172010,7 +172048,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172010
172048
|
nativeItemRef,
|
|
172011
172049
|
runtimeRequestId: requestId,
|
|
172012
172050
|
checkpointScopeId: null,
|
|
172013
|
-
startedAt: now$
|
|
172051
|
+
startedAt: now$121,
|
|
172014
172052
|
completedAt: null
|
|
172015
172053
|
};
|
|
172016
172054
|
const turnItem = {
|
|
@@ -172025,9 +172063,9 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172025
172063
|
ordinal,
|
|
172026
172064
|
status: "waiting",
|
|
172027
172065
|
title: null,
|
|
172028
|
-
startedAt: now$
|
|
172066
|
+
startedAt: now$121,
|
|
172029
172067
|
completedAt: null,
|
|
172030
|
-
updatedAt: now$
|
|
172068
|
+
updatedAt: now$121,
|
|
172031
172069
|
type: "approval_request",
|
|
172032
172070
|
requestId,
|
|
172033
172071
|
requestKind,
|
|
@@ -172084,7 +172122,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172084
172122
|
const answers = yield* make$255();
|
|
172085
172123
|
const nativeResponseAcknowledgement = yield* make$255();
|
|
172086
172124
|
yield* registerNativeResponseAcknowledgement(generation, transportRequestId, nativeResponseAcknowledgement);
|
|
172087
|
-
const now$
|
|
172125
|
+
const now$117 = yield* now;
|
|
172088
172126
|
const nodeId = providerNodeId(request.nativeItemId);
|
|
172089
172127
|
const turnItemId = providerTurnItemId(request.nativeItemId);
|
|
172090
172128
|
const nativeItemRef = {
|
|
@@ -172108,7 +172146,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172108
172146
|
type: "live",
|
|
172109
172147
|
providerSessionId: input.providerSessionId
|
|
172110
172148
|
},
|
|
172111
|
-
createdAt: now$
|
|
172149
|
+
createdAt: now$117,
|
|
172112
172150
|
resolvedAt: null
|
|
172113
172151
|
};
|
|
172114
172152
|
const node = {
|
|
@@ -172125,7 +172163,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172125
172163
|
nativeItemRef,
|
|
172126
172164
|
runtimeRequestId: requestId,
|
|
172127
172165
|
checkpointScopeId: null,
|
|
172128
|
-
startedAt: now$
|
|
172166
|
+
startedAt: now$117,
|
|
172129
172167
|
completedAt: null
|
|
172130
172168
|
};
|
|
172131
172169
|
const turnItem = {
|
|
@@ -172140,9 +172178,9 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172140
172178
|
ordinal,
|
|
172141
172179
|
status: "waiting",
|
|
172142
172180
|
title: null,
|
|
172143
|
-
startedAt: now$
|
|
172181
|
+
startedAt: now$117,
|
|
172144
172182
|
completedAt: null,
|
|
172145
|
-
updatedAt: now$
|
|
172183
|
+
updatedAt: now$117,
|
|
172146
172184
|
type: "user_input_request",
|
|
172147
172185
|
requestId,
|
|
172148
172186
|
questions: [...request.questions]
|
|
@@ -172206,7 +172244,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172206
172244
|
const cancelPendingRuntimeRequests = fnUntraced(function* () {
|
|
172207
172245
|
const requests = yield* modify$3(pendingRuntimeRequests, (current) => [[...current.values()], /* @__PURE__ */ new Map()]);
|
|
172208
172246
|
if (requests.length === 0) return;
|
|
172209
|
-
const now$
|
|
172247
|
+
const now$128 = yield* now;
|
|
172210
172248
|
yield* forEach(requests, (request) => gen$1(function* () {
|
|
172211
172249
|
if (!(yield* request.type === "approval" ? succeed$6(request.decision, "cancel") : succeed$6(request.answers, null))) return;
|
|
172212
172250
|
yield* emitProviderEvent({
|
|
@@ -172216,7 +172254,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172216
172254
|
runtimeRequest: {
|
|
172217
172255
|
...request.runtimeRequest,
|
|
172218
172256
|
status: "cancelled",
|
|
172219
|
-
resolvedAt: now$
|
|
172257
|
+
resolvedAt: now$128
|
|
172220
172258
|
}
|
|
172221
172259
|
});
|
|
172222
172260
|
yield* emitProviderEvent({
|
|
@@ -172225,7 +172263,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172225
172263
|
node: {
|
|
172226
172264
|
...request.node,
|
|
172227
172265
|
status: "cancelled",
|
|
172228
|
-
completedAt: now$
|
|
172266
|
+
completedAt: now$128
|
|
172229
172267
|
}
|
|
172230
172268
|
});
|
|
172231
172269
|
yield* emitProviderEvent({
|
|
@@ -172234,8 +172272,8 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172234
172272
|
turnItem: {
|
|
172235
172273
|
...request.turnItem,
|
|
172236
172274
|
status: "cancelled",
|
|
172237
|
-
completedAt: now$
|
|
172238
|
-
updatedAt: now$
|
|
172275
|
+
completedAt: now$128,
|
|
172276
|
+
updatedAt: now$128
|
|
172239
172277
|
}
|
|
172240
172278
|
});
|
|
172241
172279
|
}), {
|
|
@@ -172249,15 +172287,15 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
172249
172287
|
* longer guaranteed to ingest the terminal event.
|
|
172250
172288
|
*/
|
|
172251
172289
|
const mutateCarryoverSubagentStatus = fnUntraced(function* (subagent, status, resultOverride) {
|
|
172252
|
-
const now$
|
|
172290
|
+
const now$131 = yield* now;
|
|
172253
172291
|
const result = resultOverride !== void 0 && resultOverride !== null && resultOverride.length > 0 ? resultOverride : subagent.task.result ?? (subagent.assistantText || null);
|
|
172254
|
-
const completedAt = acpSubagentStatusIsTerminal(status) ? now$
|
|
172292
|
+
const completedAt = acpSubagentStatusIsTerminal(status) ? now$131 : null;
|
|
172255
172293
|
subagent.task = {
|
|
172256
172294
|
...subagent.task,
|
|
172257
172295
|
status,
|
|
172258
172296
|
result,
|
|
172259
172297
|
completedAt,
|
|
172260
|
-
updatedAt: now$
|
|
172298
|
+
updatedAt: now$131
|
|
172261
172299
|
};
|
|
172262
172300
|
});
|
|
172263
172301
|
/**
|
|
@@ -173037,7 +173075,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173037
173075
|
else if (settledStatus === "interrupted") yield* terminalizeOpenRunOwnedItems(context, { terminalizeSubagents: directStopQuarantine });
|
|
173038
173076
|
yield* closeTextStreams(context);
|
|
173039
173077
|
if (settledStatus !== "failed") yield* emitProviderRetry(context, settledStatus);
|
|
173040
|
-
const now$
|
|
173078
|
+
const now$118 = yield* now;
|
|
173041
173079
|
if (flavor.supportsCompaction === true && context.input.message.text.trim() === "/compact" && context.input.message.attachments.length === 0 && settledStatus === "completed") {
|
|
173042
173080
|
const nativeItemId = `${context.nativeTurnId}:compaction`;
|
|
173043
173081
|
yield* emitProviderEvent({
|
|
@@ -173065,12 +173103,12 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173065
173103
|
status: "completed",
|
|
173066
173104
|
title: "Context compacted",
|
|
173067
173105
|
startedAt: context.startedAt,
|
|
173068
|
-
completedAt: now$
|
|
173069
|
-
updatedAt: now$
|
|
173106
|
+
completedAt: now$118,
|
|
173107
|
+
updatedAt: now$118
|
|
173070
173108
|
}
|
|
173071
173109
|
});
|
|
173072
173110
|
}
|
|
173073
|
-
const turn = providerTurnPayload(context, settledStatus, now$
|
|
173111
|
+
const turn = providerTurnPayload(context, settledStatus, now$118);
|
|
173074
173112
|
yield* update$4(providerTurns, (current) => {
|
|
173075
173113
|
const updated = new Map(current);
|
|
173076
173114
|
updated.set(String(turn.id), turn);
|
|
@@ -173090,7 +173128,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173090
173128
|
firstRunOrdinal: context.input.providerThread.firstRunOrdinal ?? context.input.runOrdinal,
|
|
173091
173129
|
contextUsage: context.contextUsage,
|
|
173092
173130
|
nativeMetadata: context.nativeMetadata,
|
|
173093
|
-
updatedAt: now$
|
|
173131
|
+
updatedAt: now$118
|
|
173094
173132
|
};
|
|
173095
173133
|
yield* update$4(providerThreadByNativeSessionId, (current) => new Map(current).set(context.nativeThreadId, updatedProviderThread));
|
|
173096
173134
|
yield* emitProviderEvent({
|
|
@@ -173503,7 +173541,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173503
173541
|
return false;
|
|
173504
173542
|
}) } : {},
|
|
173505
173543
|
ensureThread: fn("AcpAdapterV2.ensureThread")(function* (threadInput) {
|
|
173506
|
-
const now$
|
|
173544
|
+
const now$119 = yield* now;
|
|
173507
173545
|
const sessionId = yield* get$7(activeSessionId);
|
|
173508
173546
|
if (sessionId === null) return yield* new ProviderAdapterProtocolError({
|
|
173509
173547
|
driver,
|
|
@@ -173517,7 +173555,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173517
173555
|
providerSessionId: input.providerSessionId,
|
|
173518
173556
|
nativeThreadId: sessionId,
|
|
173519
173557
|
...itemIdentityVersion === void 0 ? {} : { itemIdentityVersion },
|
|
173520
|
-
now: now$
|
|
173558
|
+
now: now$119
|
|
173521
173559
|
});
|
|
173522
173560
|
yield* update$4(providerThreadByNativeSessionId, (current) => new Map(current).set(sessionId, providerThread));
|
|
173523
173561
|
return providerThread;
|
|
@@ -173553,12 +173591,12 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173553
173591
|
yield* set$5(activeSelection, nextSelection);
|
|
173554
173592
|
yield* set$5(activeInteractionMode, nextRuntimePolicy.interactionMode);
|
|
173555
173593
|
}
|
|
173556
|
-
const now$
|
|
173594
|
+
const now$136 = yield* now;
|
|
173557
173595
|
return {
|
|
173558
173596
|
...threadInput.providerThread,
|
|
173559
173597
|
providerSessionId: input.providerSessionId,
|
|
173560
173598
|
status: "idle",
|
|
173561
|
-
updatedAt: now$
|
|
173599
|
+
updatedAt: now$136
|
|
173562
173600
|
};
|
|
173563
173601
|
}));
|
|
173564
173602
|
}, (effect, threadInput) => effect.pipe(mapError((cause) => new ProviderAdapterResumeThreadError({
|
|
@@ -173791,13 +173829,13 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173791
173829
|
yield* set$5(activeInteractionMode, null);
|
|
173792
173830
|
}
|
|
173793
173831
|
const state = yield* get$7(snapshot);
|
|
173794
|
-
const now$
|
|
173832
|
+
const now$130 = yield* now;
|
|
173795
173833
|
return {
|
|
173796
173834
|
providerThread: {
|
|
173797
173835
|
...snapshotInput.providerThread,
|
|
173798
173836
|
providerSessionId: input.providerSessionId,
|
|
173799
173837
|
status: "idle",
|
|
173800
|
-
updatedAt: now$
|
|
173838
|
+
updatedAt: now$130
|
|
173801
173839
|
},
|
|
173802
173840
|
providerTurns: [...(yield* get$7(providerTurns)).values()],
|
|
173803
173841
|
messages: state.order.flatMap((key) => {
|
|
@@ -173856,7 +173894,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173856
173894
|
yield* set$5(lastTurnRoute, null);
|
|
173857
173895
|
}));
|
|
173858
173896
|
})).pipe(retry$1({ times: 1 }));
|
|
173859
|
-
const now$
|
|
173897
|
+
const now$137 = yield* now;
|
|
173860
173898
|
return {
|
|
173861
173899
|
providerThread: {
|
|
173862
173900
|
...rollbackInput.providerThread,
|
|
@@ -173871,7 +173909,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173871
173909
|
itemIdentityVersion: 2
|
|
173872
173910
|
},
|
|
173873
173911
|
status: "idle",
|
|
173874
|
-
updatedAt: now$
|
|
173912
|
+
updatedAt: now$137
|
|
173875
173913
|
},
|
|
173876
173914
|
providerTurns: [],
|
|
173877
173915
|
messages: [],
|
|
@@ -173906,7 +173944,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173906
173944
|
yield* set$5(activeSelection, null);
|
|
173907
173945
|
yield* set$5(activeInteractionMode, null);
|
|
173908
173946
|
itemIdentityVersion = 2;
|
|
173909
|
-
const now$
|
|
173947
|
+
const now$120 = yield* now;
|
|
173910
173948
|
const providerThread = makeProviderThread$3({
|
|
173911
173949
|
driver,
|
|
173912
173950
|
providerInstanceId: options.instanceId,
|
|
@@ -173920,7 +173958,7 @@ const makeAcpAdapterV2 = fn("makeAcpAdapterV2")(function* (options) {
|
|
|
173920
173958
|
providerThreadId: forkInput.sourceProviderThread.id,
|
|
173921
173959
|
...forkInput.providerTurnId === void 0 ? {} : { providerTurnId: forkInput.providerTurnId }
|
|
173922
173960
|
},
|
|
173923
|
-
now: now$
|
|
173961
|
+
now: now$120
|
|
173924
173962
|
});
|
|
173925
173963
|
yield* update$4(providerThreadByNativeSessionId, (current) => new Map(current).set(forked.sessionId, providerThread));
|
|
173926
173964
|
return providerThread;
|
|
@@ -191547,6 +191585,7 @@ function claudeUserMcpServers(servers) {
|
|
|
191547
191585
|
}
|
|
191548
191586
|
function claudeMcpQueryOverrides(input) {
|
|
191549
191587
|
const session = input.mcpSession;
|
|
191588
|
+
const skillSettings = input.userRegistry?.skillOverrides === void 0 ? {} : { sdkSettings: { skillOverrides: Object.fromEntries(Object.entries(input.userRegistry.skillOverrides).map(([name, enabled]) => [name, enabled ? "on" : "off"])) } };
|
|
191550
191589
|
const userServers = claudeUserMcpServers(input.userRegistry === void 0 ? [] : serversForDriver(input.userRegistry, CLAUDE_PROVIDER));
|
|
191551
191590
|
const plugins = input.userRegistry === void 0 || input.userRegistry.plugins.length === 0 ? {} : { plugins: input.userRegistry.plugins.map((plugin) => ({
|
|
191552
191591
|
type: "local",
|
|
@@ -191555,7 +191594,8 @@ function claudeMcpQueryOverrides(input) {
|
|
|
191555
191594
|
if (session === void 0) return {
|
|
191556
191595
|
...input.allowedTools === void 0 ? {} : { allowedTools: input.allowedTools },
|
|
191557
191596
|
...Object.keys(userServers).length === 0 ? {} : { mcpServers: userServers },
|
|
191558
|
-
...plugins
|
|
191597
|
+
...plugins,
|
|
191598
|
+
...skillSettings
|
|
191559
191599
|
};
|
|
191560
191600
|
const mcpAllowedTools = input.readOnlySandbox ? CLAUDE_READ_ONLY_T3_MCP_ALLOWED_TOOLS : [CLAUDE_T3_MCP_TOOL_WILDCARD];
|
|
191561
191601
|
return {
|
|
@@ -191569,7 +191609,8 @@ function claudeMcpQueryOverrides(input) {
|
|
|
191569
191609
|
timeout: CLAUDE_T3_MCP_TOOL_TIMEOUT_MS
|
|
191570
191610
|
}
|
|
191571
191611
|
},
|
|
191572
|
-
...plugins
|
|
191612
|
+
...plugins,
|
|
191613
|
+
...skillSettings
|
|
191573
191614
|
};
|
|
191574
191615
|
}
|
|
191575
191616
|
function providerSession$2(input) {
|
|
@@ -191926,6 +191967,7 @@ function claudeRuntimeQueryPolicyKey(policy) {
|
|
|
191926
191967
|
function claudeEffectiveQueryPolicyKey(queryPolicy, mcpOverrides) {
|
|
191927
191968
|
return JSON.stringify({
|
|
191928
191969
|
plugins: mcpOverrides.plugins,
|
|
191970
|
+
skillSettings: mcpOverrides.sdkSettings,
|
|
191929
191971
|
runtimePolicy: claudeRuntimeQueryPolicyKey({
|
|
191930
191972
|
...queryPolicy,
|
|
191931
191973
|
...mcpOverrides.allowedTools === void 0 ? {} : { allowedTools: mcpOverrides.allowedTools }
|
|
@@ -192801,7 +192843,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
192801
192843
|
const { attachmentsDir, fileSystem, path, crypto, idAllocator, queryRunner } = adapterOptions;
|
|
192802
192844
|
const subagentModelCatalog = scopeClaudeModelCatalog(BUNDLED_CLAUDE_MODEL_CATALOG, adapterOptions.settings.customModels);
|
|
192803
192845
|
const continuationRequests = adapterOptions.continuationRequests ?? { offer: () => void_$1 };
|
|
192804
|
-
const userInvocableSkillNames = (cwd) => discoverClaudeSkills(adapterOptions.settings, cwd ?? void 0, adapterOptions.environment).pipe(map$11((
|
|
192846
|
+
const userInvocableSkillNames = (cwd, threadId) => discoverClaudeSkills(adapterOptions.settings, cwd ?? void 0, adapterOptions.environment).pipe(flatMap$1((skills) => readUserMcpRegistry(threadId).pipe(map$11((registry) => new Set(skills.filter((skill) => (registry.skillOverrides?.[skill.name] ?? skill.enabled) && skill.userInvocable !== false).map((skill) => skill.name))))), provideService(FileSystem, fileSystem), provideService(Path$2, path));
|
|
192805
192847
|
return ProviderAdapterV2.of({
|
|
192806
192848
|
instanceId: adapterOptions.instanceId,
|
|
192807
192849
|
driver: CLAUDE_PROVIDER,
|
|
@@ -193050,14 +193092,14 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193050
193092
|
const clearOpaqueBackgroundTaskReplayTombstone = (nativeThreadId, taskId) => clearTaskIdFromNativeThreadSet(opaqueBackgroundTaskReplayTombstonesByNativeThread, nativeThreadId, taskId);
|
|
193051
193093
|
const emitProviderThreadRoster = fnUntraced(function* (input) {
|
|
193052
193094
|
const roster = rosterForNativeThread(yield* get$7(pendingBackgroundTasksByNativeThread), input.nativeThreadId);
|
|
193053
|
-
const now$
|
|
193095
|
+
const now$104 = yield* now;
|
|
193054
193096
|
const providerThread = {
|
|
193055
193097
|
...input.providerThread,
|
|
193056
193098
|
providerSessionId: session.id,
|
|
193057
193099
|
...input.status === void 0 ? {} : { status: input.status },
|
|
193058
193100
|
pendingBackgroundTasks: claudePendingBackgroundTasksFromRoster(roster),
|
|
193059
193101
|
...goalsByNativeThread.has(input.nativeThreadId) ? { goal: goalsByNativeThread.get(input.nativeThreadId) ?? null } : {},
|
|
193060
|
-
updatedAt: now$
|
|
193102
|
+
updatedAt: now$104
|
|
193061
193103
|
};
|
|
193062
193104
|
yield* rememberProviderThread(providerThread);
|
|
193063
193105
|
yield* emitProviderEvent({
|
|
@@ -193335,7 +193377,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193335
193377
|
}).pipe(catch_(() => logWarning$1("orchestration-v2.claude-subagent-launch-lookup-failed", { taskId: resume.taskId }).pipe(as(null))));
|
|
193336
193378
|
if (launchToolUseId === null || launchToolUseId === resume.toolUseId) return;
|
|
193337
193379
|
const ids = claudeSubagentIds(resume.context, resume.taskId);
|
|
193338
|
-
const now$
|
|
193380
|
+
const now$108 = yield* now;
|
|
193339
193381
|
const subagent = {
|
|
193340
193382
|
confirmedOutcome: void 0,
|
|
193341
193383
|
childThread: null,
|
|
@@ -193360,9 +193402,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193360
193402
|
model: null,
|
|
193361
193403
|
result: null,
|
|
193362
193404
|
status: "completed",
|
|
193363
|
-
startedAt: now$
|
|
193364
|
-
completedAt: now$
|
|
193365
|
-
updatedAt: now$
|
|
193405
|
+
startedAt: now$108,
|
|
193406
|
+
completedAt: now$108,
|
|
193407
|
+
updatedAt: now$108
|
|
193366
193408
|
},
|
|
193367
193409
|
rootNodeId: resume.context.input.rootNodeId,
|
|
193368
193410
|
childThreadId: ids.childThreadId,
|
|
@@ -193447,7 +193489,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193447
193489
|
const parentThread = input.coordinator.childThread;
|
|
193448
193490
|
const taskId = input.coordinator.task.nativeTaskRef?.nativeId;
|
|
193449
193491
|
if (parentThread === null || taskId === void 0 || taskId === null) return;
|
|
193450
|
-
const now$
|
|
193492
|
+
const now$102 = yield* now;
|
|
193451
193493
|
const seen = yield* get$7(workflowMemberStates);
|
|
193452
193494
|
const transcriptDir = input.workflow.runHandles?.transcriptDir;
|
|
193453
193495
|
for (const member of input.workflow.agents) {
|
|
@@ -193460,9 +193502,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193460
193502
|
const model = member.model ?? parentThread.modelSelection.model;
|
|
193461
193503
|
const attempt = member.attempt ?? previous?.attempt ?? 1;
|
|
193462
193504
|
const restarted = previous !== void 0 && attempt > previous.attempt;
|
|
193463
|
-
const createdAt = previous?.createdAt ?? now$
|
|
193464
|
-
const startedAt = status === "pending" ? null : member.startedAt !== void 0 ? makeUnsafe$8(member.startedAt) : (restarted ? null : previous?.startedAt) ?? (status === "running" ? now$
|
|
193465
|
-
const completedAt = settled ? (restarted ? null : previous?.completedAt) ?? now$
|
|
193505
|
+
const createdAt = previous?.createdAt ?? now$102;
|
|
193506
|
+
const startedAt = status === "pending" ? null : member.startedAt !== void 0 ? makeUnsafe$8(member.startedAt) : (restarted ? null : previous?.startedAt) ?? (status === "running" ? now$102 : null);
|
|
193507
|
+
const completedAt = settled ? (restarted ? null : previous?.completedAt) ?? now$102 : null;
|
|
193466
193508
|
const changed = restarted || previous?.status !== status || !equals(previous?.startedAt, startedAt) || previous?.result !== member.result || previous?.label !== member.label || previous?.prompt !== prompt || previous?.model !== model;
|
|
193467
193509
|
const agentId = member.agentId;
|
|
193468
193510
|
const readTranscript = settled && transcriptDir !== void 0 && agentId !== void 0 && (input.coordinator.task.status === "running" ? (restarted ? 0 : previous?.transcriptReadAttempts ?? 0) < 3 : restarted || previous?.finalTranscriptRead !== true);
|
|
@@ -193503,7 +193545,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193503
193545
|
role: "user",
|
|
193504
193546
|
text: prompt,
|
|
193505
193547
|
ordinal: 100,
|
|
193506
|
-
now: now$
|
|
193548
|
+
now: now$102
|
|
193507
193549
|
});
|
|
193508
193550
|
if (restarted && !settled) yield* emitSubagentConversationMessage({
|
|
193509
193551
|
nativeItemId: `${memberKey}:answer:200`,
|
|
@@ -193512,7 +193554,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193512
193554
|
role: "assistant",
|
|
193513
193555
|
text: "Retry in progress.",
|
|
193514
193556
|
ordinal: 200,
|
|
193515
|
-
now: now$
|
|
193557
|
+
now: now$102
|
|
193516
193558
|
});
|
|
193517
193559
|
const task = {
|
|
193518
193560
|
id: nodeId,
|
|
@@ -193537,7 +193579,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193537
193579
|
result: member.result ?? null,
|
|
193538
193580
|
startedAt,
|
|
193539
193581
|
completedAt,
|
|
193540
|
-
updatedAt: now$
|
|
193582
|
+
updatedAt: now$102
|
|
193541
193583
|
};
|
|
193542
193584
|
const nodeBase = {
|
|
193543
193585
|
runId: null,
|
|
@@ -193598,7 +193640,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193598
193640
|
role: "assistant",
|
|
193599
193641
|
text: answer,
|
|
193600
193642
|
ordinal: 200,
|
|
193601
|
-
now: now$
|
|
193643
|
+
now: now$102
|
|
193602
193644
|
});
|
|
193603
193645
|
}
|
|
193604
193646
|
yield* update$4(workflowMemberStates, (current) => new Map(current).set(memberKey, {
|
|
@@ -193644,7 +193686,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193644
193686
|
if (existingSubagent !== void 0 && existingSubagent.task.status !== "running" && input.status === "running" && !isReopen) return;
|
|
193645
193687
|
const resumeToolUseId = input.reopen === true && existingSubagent !== void 0 && input.toolUseId !== void 0 && input.toolUseId !== existingSubagent.runToolUseId && input.prompt !== void 0 ? input.toolUseId : null;
|
|
193646
193688
|
const lifecycleChanged = existingSubagent === void 0 || existingSubagent.task.status !== input.status || input.reopen === true && input.status === "running";
|
|
193647
|
-
const now$
|
|
193689
|
+
const now$103 = yield* now;
|
|
193648
193690
|
const nativeItemId = `task:${input.taskId}`;
|
|
193649
193691
|
const derivedIds = claudeSubagentIds(input.context, input.taskId);
|
|
193650
193692
|
const nodeId = existingSubagent?.task.id ?? derivedIds.nodeId;
|
|
@@ -193686,7 +193728,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193686
193728
|
title: input.title ?? null,
|
|
193687
193729
|
model: input.model ?? null,
|
|
193688
193730
|
result: null,
|
|
193689
|
-
startedAt: now$
|
|
193731
|
+
startedAt: now$103
|
|
193690
193732
|
},
|
|
193691
193733
|
status: input.status,
|
|
193692
193734
|
...input.reopen === true && input.status === "running" && existingSubagent !== void 0 ? { runId: input.context.input.runId } : {},
|
|
@@ -193697,9 +193739,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193697
193739
|
...input.progress === void 0 ? {} : { progress: input.progress },
|
|
193698
193740
|
...workflowWithThreads === void 0 ? {} : { workflow: workflowWithThreads },
|
|
193699
193741
|
...input.result === void 0 ? {} : { result: input.result },
|
|
193700
|
-
...isReopen ? { startedAt: now$
|
|
193701
|
-
completedAt: input.status === "running" ? null : priorTask?.completedAt ?? now$
|
|
193702
|
-
updatedAt: now$
|
|
193742
|
+
...isReopen ? { startedAt: now$103 } : {},
|
|
193743
|
+
completedAt: input.status === "running" ? null : priorTask?.completedAt ?? now$103,
|
|
193744
|
+
updatedAt: now$103
|
|
193703
193745
|
};
|
|
193704
193746
|
const subagent = {
|
|
193705
193747
|
task,
|
|
@@ -193753,7 +193795,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193753
193795
|
title: workflowWithThreads === void 0 ? task.title : `Workflow · ${workflowWithThreads.name ?? task.title ?? "Untitled"}`,
|
|
193754
193796
|
ordinal: input.context.subagentsByTaskId.size
|
|
193755
193797
|
}),
|
|
193756
|
-
now: now$
|
|
193798
|
+
now: now$103,
|
|
193757
193799
|
createdBy: "agent",
|
|
193758
193800
|
creationSource: "provider"
|
|
193759
193801
|
});
|
|
@@ -193821,7 +193863,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193821
193863
|
role: "user",
|
|
193822
193864
|
text: task.prompt,
|
|
193823
193865
|
ordinal: existingSubagent === void 0 ? 100 : ++subagent.nextChildItemOrdinal,
|
|
193824
|
-
now: now$
|
|
193866
|
+
now: now$103
|
|
193825
193867
|
});
|
|
193826
193868
|
yield* emitProviderEvent({
|
|
193827
193869
|
type: "subagent.updated",
|
|
@@ -193880,7 +193922,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
193880
193922
|
role: "assistant",
|
|
193881
193923
|
text: input.result,
|
|
193882
193924
|
ordinal: resultItemOrdinal,
|
|
193883
|
-
now: now$
|
|
193925
|
+
now: now$103
|
|
193884
193926
|
});
|
|
193885
193927
|
}
|
|
193886
193928
|
});
|
|
@@ -194186,7 +194228,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194186
194228
|
const block = context.reasoning.blocks.get(update.itemId);
|
|
194187
194229
|
if (block === void 0 || update.text.length === 0) return;
|
|
194188
194230
|
block.text = update.text;
|
|
194189
|
-
const now$
|
|
194231
|
+
const now$109 = yield* now;
|
|
194190
194232
|
yield* emitProviderEvent({
|
|
194191
194233
|
type: "turn_item.updated",
|
|
194192
194234
|
driver: CLAUDE_PROVIDER,
|
|
@@ -194213,8 +194255,8 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194213
194255
|
streaming: !update.completed,
|
|
194214
194256
|
status: update.completed ? "completed" : "running",
|
|
194215
194257
|
startedAt: block.startedAt,
|
|
194216
|
-
completedAt: update.completed ? now$
|
|
194217
|
-
updatedAt: now$
|
|
194258
|
+
completedAt: update.completed ? now$109 : null,
|
|
194259
|
+
updatedAt: now$109
|
|
194218
194260
|
}
|
|
194219
194261
|
});
|
|
194220
194262
|
})
|
|
@@ -194419,7 +194461,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194419
194461
|
const emitAssistantTextArtifacts = fnUntraced(function* (input) {
|
|
194420
194462
|
if (input.context.assistant.emittedNativeItemIds.has(input.nativeItemId)) return;
|
|
194421
194463
|
input.context.assistant.emittedNativeItemIds.add(input.nativeItemId);
|
|
194422
|
-
const now$
|
|
194464
|
+
const now$107 = yield* now;
|
|
194423
194465
|
const ordinal = yield* resolveItemOrdinal(input.context, input.nativeItemId);
|
|
194424
194466
|
const artifacts = buildAssistantArtifacts({
|
|
194425
194467
|
idAllocator,
|
|
@@ -194428,8 +194470,8 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194428
194470
|
nativeItemId: input.nativeItemId,
|
|
194429
194471
|
text: input.text,
|
|
194430
194472
|
ordinal,
|
|
194431
|
-
startedAt: now$
|
|
194432
|
-
completedAt: now$
|
|
194473
|
+
startedAt: now$107,
|
|
194474
|
+
completedAt: now$107
|
|
194433
194475
|
});
|
|
194434
194476
|
yield* all$5([
|
|
194435
194477
|
emitProviderEvent({
|
|
@@ -194514,14 +194556,14 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194514
194556
|
message
|
|
194515
194557
|
});
|
|
194516
194558
|
if (workflow === void 0) return;
|
|
194517
|
-
const now$
|
|
194559
|
+
const now$112 = yield* now;
|
|
194518
194560
|
const progress = text$3(message.description);
|
|
194519
194561
|
const workflowWithThreads = withWorkflowMemberThreadIds(workflow, registered.childThreadId);
|
|
194520
194562
|
const task = {
|
|
194521
194563
|
...registered.task,
|
|
194522
194564
|
...progress === void 0 ? {} : { progress },
|
|
194523
194565
|
workflow: workflowWithThreads,
|
|
194524
|
-
updatedAt: now$
|
|
194566
|
+
updatedAt: now$112
|
|
194525
194567
|
};
|
|
194526
194568
|
const coordinator = {
|
|
194527
194569
|
...registered,
|
|
@@ -194552,7 +194594,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194552
194594
|
const isNewSubagentTaskStarted = message.type === "system" && message.subtype === "task_started" && !isClaudeNonSubagentTask(message);
|
|
194553
194595
|
const isKnownSubagentTaskStarted = message.type === "system" && message.subtype === "task_started" && (yield* get$7(sessionSubagentsByTaskId)).has(message.task_id);
|
|
194554
194596
|
if (isKnownSubagentTaskStarted && message.type === "system" && message.subtype === "task_started") {
|
|
194555
|
-
const now$
|
|
194597
|
+
const now$113 = yield* now;
|
|
194556
194598
|
yield* update$4(sessionSubagentsByTaskId, (current) => {
|
|
194557
194599
|
const registered = current.get(message.task_id);
|
|
194558
194600
|
if (registered === void 0 || registered.task.status === "running") return current;
|
|
@@ -194564,9 +194606,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194564
194606
|
...priorTask,
|
|
194565
194607
|
status: "running",
|
|
194566
194608
|
result: null,
|
|
194567
|
-
startedAt: now$
|
|
194609
|
+
startedAt: now$113,
|
|
194568
194610
|
completedAt: null,
|
|
194569
|
-
updatedAt: now$
|
|
194611
|
+
updatedAt: now$113
|
|
194570
194612
|
}
|
|
194571
194613
|
});
|
|
194572
194614
|
});
|
|
@@ -194699,10 +194741,10 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194699
194741
|
if (!rateLimitInfo) return;
|
|
194700
194742
|
const names = adapterOptions.scopedLimitNames ? yield* get$7(adapterOptions.scopedLimitNames) : { overageIncluded: void 0 };
|
|
194701
194743
|
const update = claudeRateLimitEventToUpdate(rateLimitInfo, names);
|
|
194702
|
-
const now$
|
|
194744
|
+
const now$111 = yield* now;
|
|
194703
194745
|
if (update && adapterOptions.onUsageLimits) yield* adapterOptions.onUsageLimits({
|
|
194704
194746
|
...update,
|
|
194705
|
-
checkedAt: formatIso(now$
|
|
194747
|
+
checkedAt: formatIso(now$111)
|
|
194706
194748
|
});
|
|
194707
194749
|
const context = yield* get$7(activeTurn);
|
|
194708
194750
|
if (context === null) {
|
|
@@ -194728,7 +194770,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194728
194770
|
if (!context.announcedUsageLimits.has(limitKey)) {
|
|
194729
194771
|
context.announcedUsageLimits.add(limitKey);
|
|
194730
194772
|
const nativeItemId = `usage-limit:${context.providerTurnId}:${limitKey}`;
|
|
194731
|
-
const notice = describeClaudeUsageLimit(rateLimitInfo, toEpochMillis(now$
|
|
194773
|
+
const notice = describeClaudeUsageLimit(rateLimitInfo, toEpochMillis(now$111), names);
|
|
194732
194774
|
yield* emitProviderEvent({
|
|
194733
194775
|
type: "turn_item.updated",
|
|
194734
194776
|
driver: CLAUDE_PROVIDER,
|
|
@@ -194753,9 +194795,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194753
194795
|
status: "completed",
|
|
194754
194796
|
title: notice,
|
|
194755
194797
|
message: notice,
|
|
194756
|
-
startedAt: now$
|
|
194757
|
-
completedAt: now$
|
|
194758
|
-
updatedAt: now$
|
|
194798
|
+
startedAt: now$111,
|
|
194799
|
+
completedAt: now$111,
|
|
194800
|
+
updatedAt: now$111
|
|
194759
194801
|
}
|
|
194760
194802
|
});
|
|
194761
194803
|
}
|
|
@@ -194891,7 +194933,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194891
194933
|
}
|
|
194892
194934
|
}
|
|
194893
194935
|
if (message.type === "system" && message.subtype === "compact_boundary") {
|
|
194894
|
-
const now$
|
|
194936
|
+
const now$101 = yield* now;
|
|
194895
194937
|
const nativeItemId = message.uuid;
|
|
194896
194938
|
const postTokens = message.compact_metadata.post_tokens;
|
|
194897
194939
|
const afterTokenCount = typeof postTokens === "number" && Number.isFinite(postTokens) && postTokens > 0 ? Math.round(postTokens) : void 0;
|
|
@@ -194916,7 +194958,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194916
194958
|
tokenUsage: {
|
|
194917
194959
|
usedTokens: afterTokenCount,
|
|
194918
194960
|
maxTokens: claudeContextWindow(context.input.modelSelection),
|
|
194919
|
-
updatedAt: formatIso(now$
|
|
194961
|
+
updatedAt: formatIso(now$101)
|
|
194920
194962
|
}
|
|
194921
194963
|
}
|
|
194922
194964
|
});
|
|
@@ -194944,9 +194986,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194944
194986
|
driver: CLAUDE_PROVIDER,
|
|
194945
194987
|
status: "completed",
|
|
194946
194988
|
title: "Context compacted",
|
|
194947
|
-
startedAt: now$
|
|
194948
|
-
completedAt: now$
|
|
194949
|
-
updatedAt: now$
|
|
194989
|
+
startedAt: now$101,
|
|
194990
|
+
completedAt: now$101,
|
|
194991
|
+
updatedAt: now$101,
|
|
194950
194992
|
...message.compact_metadata.pre_tokens === void 0 ? {} : { beforeTokenCount: message.compact_metadata.pre_tokens },
|
|
194951
194993
|
...afterTokenCount === void 0 ? {} : { afterTokenCount }
|
|
194952
194994
|
}
|
|
@@ -194954,7 +194996,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194954
194996
|
return;
|
|
194955
194997
|
}
|
|
194956
194998
|
if (message.type === "system" && message.subtype === "model_refusal_fallback") {
|
|
194957
|
-
const now$
|
|
194999
|
+
const now$110 = yield* now;
|
|
194958
195000
|
const nativeItemId = message.uuid;
|
|
194959
195001
|
yield* emitProviderEvent({
|
|
194960
195002
|
type: "turn_item.updated",
|
|
@@ -194980,9 +195022,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
194980
195022
|
status: "completed",
|
|
194981
195023
|
title: message.content,
|
|
194982
195024
|
message: message.content,
|
|
194983
|
-
startedAt: now$
|
|
194984
|
-
completedAt: now$
|
|
194985
|
-
updatedAt: now$
|
|
195025
|
+
startedAt: now$110,
|
|
195026
|
+
completedAt: now$110,
|
|
195027
|
+
updatedAt: now$110
|
|
194986
195028
|
}
|
|
194987
195029
|
});
|
|
194988
195030
|
return;
|
|
@@ -195029,8 +195071,8 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
195029
195071
|
return;
|
|
195030
195072
|
}
|
|
195031
195073
|
if (message.type === "assistant" && input.replayed !== true) {
|
|
195032
|
-
const now$
|
|
195033
|
-
yield* completeProviderRetry(context, now$
|
|
195074
|
+
const now$114 = yield* now;
|
|
195075
|
+
yield* completeProviderRetry(context, now$114);
|
|
195034
195076
|
if (message.parent_tool_use_id === null && message.message.usage !== void 0 && message.message.model !== "<synthetic>") yield* emitProviderEvent({
|
|
195035
195077
|
type: "provider_turn.updated",
|
|
195036
195078
|
driver: CLAUDE_PROVIDER,
|
|
@@ -195049,7 +195091,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
195049
195091
|
status: "running",
|
|
195050
195092
|
startedAt: context.startedAt,
|
|
195051
195093
|
completedAt: null,
|
|
195052
|
-
tokenUsage: claudeProviderTurnTokenUsage(message.message.usage, context.input.modelSelection, formatIso(now$
|
|
195094
|
+
tokenUsage: claudeProviderTurnTokenUsage(message.message.usage, context.input.modelSelection, formatIso(now$114))
|
|
195053
195095
|
}
|
|
195054
195096
|
});
|
|
195055
195097
|
const parentToolUseId = message.parent_tool_use_id;
|
|
@@ -195299,7 +195341,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
195299
195341
|
const thinking = message.message.content.flatMap((block) => block.type === "thinking" && block.thinking.trim().length > 0 ? [block.thinking] : []);
|
|
195300
195342
|
const subagent = thinking.length === 0 ? void 0 : yield* resolveSubagentByToolUseId(context, assistantParentToolUseId);
|
|
195301
195343
|
if (subagent !== void 0) {
|
|
195302
|
-
const now$
|
|
195344
|
+
const now$105 = yield* now;
|
|
195303
195345
|
for (const [index, text] of thinking.entries()) {
|
|
195304
195346
|
const nativeItemId = `${message.uuid}:thinking:${index}`;
|
|
195305
195347
|
yield* emitProviderEvent({
|
|
@@ -195327,9 +195369,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
195327
195369
|
text,
|
|
195328
195370
|
streaming: false,
|
|
195329
195371
|
status: "completed",
|
|
195330
|
-
startedAt: now$
|
|
195331
|
-
completedAt: now$
|
|
195332
|
-
updatedAt: now$
|
|
195372
|
+
startedAt: now$105,
|
|
195373
|
+
completedAt: now$105,
|
|
195374
|
+
updatedAt: now$105
|
|
195333
195375
|
}
|
|
195334
195376
|
});
|
|
195335
195377
|
}
|
|
@@ -195339,7 +195381,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
195339
195381
|
if (assistantText !== null && assistantText.text.length > 0 && assistantParentToolUseId !== null) {
|
|
195340
195382
|
const subagent = yield* resolveSubagentByToolUseId(context, assistantParentToolUseId);
|
|
195341
195383
|
if (subagent === void 0) return;
|
|
195342
|
-
const now$
|
|
195384
|
+
const now$115 = yield* now;
|
|
195343
195385
|
const nativeMessageId = message.type === "assistant" && typeof message.message.id === "string" ? message.message.id : null;
|
|
195344
195386
|
subagent.lastAssistantText = nativeMessageId !== null && nativeMessageId === subagent.lastAssistantMessageId ? `${subagent.lastAssistantText ?? ""}\n${assistantText.text}` : assistantText.text;
|
|
195345
195387
|
subagent.lastAssistantMessageId = nativeMessageId;
|
|
@@ -195350,7 +195392,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
195350
195392
|
role: "assistant",
|
|
195351
195393
|
text: assistantText.text,
|
|
195352
195394
|
ordinal: ++subagent.nextChildItemOrdinal,
|
|
195353
|
-
now: now$
|
|
195395
|
+
now: now$115
|
|
195354
195396
|
});
|
|
195355
195397
|
return;
|
|
195356
195398
|
}
|
|
@@ -195802,6 +195844,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
195802
195844
|
...mcpOverrides.allowedTools === void 0 ? {} : { allowedTools: mcpOverrides.allowedTools },
|
|
195803
195845
|
...mcpOverrides.mcpServers === void 0 ? {} : { mcpServers: mcpOverrides.mcpServers },
|
|
195804
195846
|
...mcpOverrides.plugins === void 0 ? {} : { plugins: mcpOverrides.plugins },
|
|
195847
|
+
...mcpOverrides.sdkSettings === void 0 ? {} : { sdkSettings: mcpOverrides.sdkSettings },
|
|
195805
195848
|
permissionMode: queryPolicy.permissionMode,
|
|
195806
195849
|
...queryPolicy.allowDangerouslySkipPermissions === void 0 ? {} : { allowDangerouslySkipPermissions: queryPolicy.allowDangerouslySkipPermissions },
|
|
195807
195850
|
canUseTool,
|
|
@@ -195928,7 +195971,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
195928
195971
|
attachments: turnInput.message.attachments,
|
|
195929
195972
|
attachmentsDir,
|
|
195930
195973
|
fileSystem,
|
|
195931
|
-
skillNames: yield* userInvocableSkillNames(turnInput.runtimePolicy.cwd),
|
|
195974
|
+
skillNames: yield* userInvocableSkillNames(turnInput.runtimePolicy.cwd, turnInput.threadId),
|
|
195932
195975
|
uuid: promptUuid
|
|
195933
195976
|
});
|
|
195934
195977
|
const querySession = yield* openQuery(turnInput, nativeThreadId);
|
|
@@ -196096,7 +196139,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
196096
196139
|
priority: "now",
|
|
196097
196140
|
attachmentsDir,
|
|
196098
196141
|
fileSystem,
|
|
196099
|
-
skillNames: yield* userInvocableSkillNames(currentTurn.input.runtimePolicy.cwd)
|
|
196142
|
+
skillNames: yield* userInvocableSkillNames(currentTurn.input.runtimePolicy.cwd, currentTurn.input.threadId)
|
|
196100
196143
|
});
|
|
196101
196144
|
yield* update$4(steeredTurns, (current) => {
|
|
196102
196145
|
const next = new Set(current);
|
|
@@ -196282,7 +196325,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
196282
196325
|
});
|
|
196283
196326
|
const nativeThreadId = yield* getNativeThreadId$1(rollbackInput.providerThread);
|
|
196284
196327
|
yield* closeLiveQueryForNativeThread(nativeThreadId);
|
|
196285
|
-
const now$
|
|
196328
|
+
const now$100 = yield* now;
|
|
196286
196329
|
if (rollbackInput.target.type === "thread_start") {
|
|
196287
196330
|
const resetNativeThreadId = yield* queryRunner.allocateSessionId;
|
|
196288
196331
|
return {
|
|
@@ -196295,7 +196338,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
196295
196338
|
providerSessionId: input.providerSessionId,
|
|
196296
196339
|
nativeThreadId: resetNativeThreadId,
|
|
196297
196340
|
...rollbackInput.providerThread.forkedFrom === null ? {} : { forkedFrom: rollbackInput.providerThread.forkedFrom },
|
|
196298
|
-
now: now$
|
|
196341
|
+
now: now$100
|
|
196299
196342
|
}),
|
|
196300
196343
|
handoffIds: rollbackInput.providerThread.handoffIds
|
|
196301
196344
|
},
|
|
@@ -196316,7 +196359,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
196316
196359
|
},
|
|
196317
196360
|
status: "idle",
|
|
196318
196361
|
lastRunOrdinal: rollbackInput.target.appRunOrdinal,
|
|
196319
|
-
updatedAt: now$
|
|
196362
|
+
updatedAt: now$100
|
|
196320
196363
|
},
|
|
196321
196364
|
providerTurns: [],
|
|
196322
196365
|
messages: [],
|
|
@@ -196351,7 +196394,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
196351
196394
|
updated.add(forked.sessionId);
|
|
196352
196395
|
return updated;
|
|
196353
196396
|
});
|
|
196354
|
-
const now$
|
|
196397
|
+
const now$106 = yield* now;
|
|
196355
196398
|
return makeProviderThread$2({
|
|
196356
196399
|
idAllocator,
|
|
196357
196400
|
providerInstanceId: adapterOptions.instanceId,
|
|
@@ -196363,7 +196406,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
|
|
|
196363
196406
|
providerThreadId: forkInput.sourceProviderThread.id,
|
|
196364
196407
|
...forkInput.providerTurnId === void 0 ? {} : { providerTurnId: forkInput.providerTurnId }
|
|
196365
196408
|
},
|
|
196366
|
-
now: now$
|
|
196409
|
+
now: now$106
|
|
196367
196410
|
});
|
|
196368
196411
|
}, (effect, forkInput) => effect.pipe(mapError((cause) => new ProviderAdapterForkThreadError({
|
|
196369
196412
|
driver: CLAUDE_PROVIDER,
|
|
@@ -251453,7 +251496,12 @@ const OPENCODE_RESTRICTED_PERMISSIONS = [
|
|
|
251453
251496
|
* while shell/network/external access remains gated unless policy explicitly
|
|
251454
251497
|
* allows it.
|
|
251455
251498
|
*/
|
|
251456
|
-
function openCodePermissionRules(runtimePolicy) {
|
|
251499
|
+
function openCodePermissionRules(runtimePolicy, skillOverrides = {}) {
|
|
251500
|
+
const skillRules = Object.entries(skillOverrides).map(([name, enabled]) => ({
|
|
251501
|
+
permission: "skill",
|
|
251502
|
+
pattern: name,
|
|
251503
|
+
action: enabled ? "allow" : "deny"
|
|
251504
|
+
}));
|
|
251457
251505
|
const sandboxPolicy = recordValue(runtimePolicy, "sandboxPolicy");
|
|
251458
251506
|
const sandboxType = recordString$1(sandboxPolicy, "type");
|
|
251459
251507
|
const rawApprovalPolicy = runtimePolicy.approvalPolicy;
|
|
@@ -251466,7 +251514,7 @@ function openCodePermissionRules(runtimePolicy) {
|
|
|
251466
251514
|
permission: "*",
|
|
251467
251515
|
pattern: "*",
|
|
251468
251516
|
action: "allow"
|
|
251469
|
-
}];
|
|
251517
|
+
}, ...skillRules];
|
|
251470
251518
|
const rules = [{
|
|
251471
251519
|
permission: "*",
|
|
251472
251520
|
pattern: "*",
|
|
@@ -251537,7 +251585,7 @@ function openCodePermissionRules(runtimePolicy) {
|
|
|
251537
251585
|
});
|
|
251538
251586
|
}
|
|
251539
251587
|
}
|
|
251540
|
-
return rules;
|
|
251588
|
+
return [...rules, ...skillRules];
|
|
251541
251589
|
}
|
|
251542
251590
|
function permissionRuleEquals(left, right) {
|
|
251543
251591
|
return left.permission === right.permission && left.pattern === right.pattern && left.action === right.action;
|
|
@@ -251548,11 +251596,15 @@ function permissionRuleEquals(left, right) {
|
|
|
251548
251596
|
* tasks. Install the complete parent policy while retaining only rules that
|
|
251549
251597
|
* were added specifically for the selected child agent.
|
|
251550
251598
|
*/
|
|
251551
|
-
function openCodeChildPermissionRules(runtimePolicy, nativeChildRules) {
|
|
251552
|
-
const parentRules = openCodePermissionRules(runtimePolicy);
|
|
251599
|
+
function openCodeChildPermissionRules(runtimePolicy, nativeChildRules, skillOverrides = {}) {
|
|
251600
|
+
const parentRules = openCodePermissionRules(runtimePolicy, skillOverrides);
|
|
251553
251601
|
const inheritedRules = parentRules.filter((rule) => rule.permission === "external_directory" || rule.action === "deny");
|
|
251554
251602
|
const childSpecificRules = nativeChildRules.filter((childRule) => !inheritedRules.some((inheritedRule) => permissionRuleEquals(childRule, inheritedRule)));
|
|
251555
|
-
return [
|
|
251603
|
+
return [
|
|
251604
|
+
...parentRules,
|
|
251605
|
+
...childSpecificRules,
|
|
251606
|
+
...parentRules.filter((rule) => rule.permission === "skill" && Object.hasOwn(skillOverrides, rule.pattern))
|
|
251607
|
+
];
|
|
251556
251608
|
}
|
|
251557
251609
|
/**
|
|
251558
251610
|
* OpenCode's fork/revert boundary is exclusive. To retain the selected app
|
|
@@ -251693,6 +251745,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
251693
251745
|
const idAllocator = yield* IdAllocatorV2;
|
|
251694
251746
|
const host = yield* ProviderHost;
|
|
251695
251747
|
const mcpSessions = yield* McpProviderSessions;
|
|
251748
|
+
const readUserMcpRegistry = yield* makeReader;
|
|
251696
251749
|
const messageIdClock = yield* make$215({
|
|
251697
251750
|
epochMillis: -1,
|
|
251698
251751
|
counter: 0
|
|
@@ -251717,6 +251770,31 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
251717
251770
|
...connection.external && options.settings.serverPassword ? { serverPassword: options.settings.serverPassword } : {}
|
|
251718
251771
|
});
|
|
251719
251772
|
const mcpSession = yield* mcpSessions.read(input.threadId);
|
|
251773
|
+
const userRegistry = yield* readUserMcpRegistry(input.threadId);
|
|
251774
|
+
const userServers = serversForDriver(userRegistry, OPENCODE_PROVIDER);
|
|
251775
|
+
if (connection.external && userServers.length > 0) return yield* new OpenCodeRuntimeError({
|
|
251776
|
+
operation: "mcp.add",
|
|
251777
|
+
detail: "P4-managed MCP servers require a local OpenCode session. Clear the OpenCode server URL to let P4 start an isolated server."
|
|
251778
|
+
});
|
|
251779
|
+
for (const server of userServers) {
|
|
251780
|
+
const transport = server.transport;
|
|
251781
|
+
yield* runOpenCodeSdk("mcp.add", (signal) => client.mcp.add({
|
|
251782
|
+
name: server.name,
|
|
251783
|
+
config: transport.type === "http" ? {
|
|
251784
|
+
type: "remote",
|
|
251785
|
+
url: transport.url,
|
|
251786
|
+
headers: { ...transport.headers },
|
|
251787
|
+
oauth: false
|
|
251788
|
+
} : {
|
|
251789
|
+
type: "local",
|
|
251790
|
+
command: [transport.command, ...transport.args],
|
|
251791
|
+
environment: { ...transport.env }
|
|
251792
|
+
}
|
|
251793
|
+
}, {
|
|
251794
|
+
signal,
|
|
251795
|
+
throwOnError: true
|
|
251796
|
+
}));
|
|
251797
|
+
}
|
|
251720
251798
|
const hasT3Mcp = mcpSession !== void 0 && !connection.external;
|
|
251721
251799
|
const orchestrationSystemPrompt = t3OrchestrationSystemPrompt(hasT3Mcp);
|
|
251722
251800
|
if (hasT3Mcp) yield* runOpenCodeSdk("mcp.add", () => client.mcp.add({
|
|
@@ -251728,7 +251806,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
251728
251806
|
oauth: false
|
|
251729
251807
|
}
|
|
251730
251808
|
}));
|
|
251731
|
-
const now$
|
|
251809
|
+
const now$74 = yield* now;
|
|
251732
251810
|
let sessionEntity = {
|
|
251733
251811
|
id: input.providerSessionId,
|
|
251734
251812
|
driver: OPENCODE_PROVIDER,
|
|
@@ -251737,8 +251815,8 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
251737
251815
|
cwd,
|
|
251738
251816
|
model: input.modelSelection.model,
|
|
251739
251817
|
capabilities: OpenCodeProviderCapabilitiesV2,
|
|
251740
|
-
createdAt: now$
|
|
251741
|
-
updatedAt: now$
|
|
251818
|
+
createdAt: now$74,
|
|
251819
|
+
updatedAt: now$74,
|
|
251742
251820
|
lastError: null
|
|
251743
251821
|
};
|
|
251744
251822
|
const events = yield* unbounded$2();
|
|
@@ -251976,7 +252054,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
251976
252054
|
});
|
|
251977
252055
|
});
|
|
251978
252056
|
const emitSubagent = fnUntraced(function* (state, turn, part) {
|
|
251979
|
-
const now$
|
|
252057
|
+
const now$81 = yield* now;
|
|
251980
252058
|
const nativeItemRef = providerRef$1(part.id);
|
|
251981
252059
|
const nodeId = idAllocator.derive.nodeFromProviderItem({
|
|
251982
252060
|
driver: OPENCODE_PROVIDER,
|
|
@@ -251999,7 +252077,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
251999
252077
|
parentTurn: turn,
|
|
252000
252078
|
prompt,
|
|
252001
252079
|
title,
|
|
252002
|
-
startedAt: toolStartedAt(part, now$
|
|
252080
|
+
startedAt: toolStartedAt(part, now$81),
|
|
252003
252081
|
childSessionId: null,
|
|
252004
252082
|
childThreadId: null,
|
|
252005
252083
|
childProviderThreadId: null,
|
|
@@ -252039,7 +252117,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252039
252117
|
prompt,
|
|
252040
252118
|
ordinal: itemOrdinal(turn, part.id)
|
|
252041
252119
|
}),
|
|
252042
|
-
now: now$
|
|
252120
|
+
now: now$81,
|
|
252043
252121
|
createdBy: "agent",
|
|
252044
252122
|
creationSource: "provider"
|
|
252045
252123
|
});
|
|
@@ -252057,11 +252135,11 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252057
252135
|
lastRunOrdinal: null,
|
|
252058
252136
|
handoffIds: [],
|
|
252059
252137
|
forkedFrom: null,
|
|
252060
|
-
createdAt: now$
|
|
252061
|
-
updatedAt: now$
|
|
252138
|
+
createdAt: now$81,
|
|
252139
|
+
updatedAt: now$81
|
|
252062
252140
|
};
|
|
252063
252141
|
const nativeChildSession = unwrapData("session.get", yield* sdkCall("session.get", { sessionID: childSessionId }, () => client.session.get({ sessionID: childSessionId })));
|
|
252064
|
-
const childPermission = openCodeChildPermissionRules(turn.runtimePolicy, nativeChildSession.permission ?? []);
|
|
252142
|
+
const childPermission = openCodeChildPermissionRules(turn.runtimePolicy, nativeChildSession.permission ?? [], userRegistry.skillOverrides);
|
|
252065
252143
|
yield* sdkCall("session.update", {
|
|
252066
252144
|
sessionID: childSessionId,
|
|
252067
252145
|
permission: childPermission
|
|
@@ -252096,7 +252174,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252096
252174
|
const output = toolOutput(part);
|
|
252097
252175
|
if (part.state.status === "completed" && output !== void 0) context.result = output;
|
|
252098
252176
|
const status = toolStatus(part);
|
|
252099
|
-
const completedAt = toolCompletedAt(part, now$
|
|
252177
|
+
const completedAt = toolCompletedAt(part, now$81);
|
|
252100
252178
|
const subagentStatus = status.item === "failed" ? "failed" : status.item === "completed" ? "completed" : status.item === "pending" ? "pending" : "running";
|
|
252101
252179
|
const subagent = {
|
|
252102
252180
|
id: nodeId,
|
|
@@ -252117,7 +252195,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252117
252195
|
result: context.result,
|
|
252118
252196
|
startedAt: context.startedAt,
|
|
252119
252197
|
completedAt,
|
|
252120
|
-
updatedAt: now$
|
|
252198
|
+
updatedAt: now$81
|
|
252121
252199
|
};
|
|
252122
252200
|
yield* emitProviderEvent({
|
|
252123
252201
|
type: "node.updated",
|
|
@@ -252162,7 +252240,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252162
252240
|
title,
|
|
252163
252241
|
startedAt: context.startedAt,
|
|
252164
252242
|
completedAt,
|
|
252165
|
-
updatedAt: now$
|
|
252243
|
+
updatedAt: now$81,
|
|
252166
252244
|
type: "subagent",
|
|
252167
252245
|
subagentId: nodeId,
|
|
252168
252246
|
origin: "provider_native",
|
|
@@ -252181,10 +252259,10 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252181
252259
|
return;
|
|
252182
252260
|
}
|
|
252183
252261
|
if (normalizedTool === "question") return;
|
|
252184
|
-
const now$
|
|
252262
|
+
const now$73 = yield* now;
|
|
252185
252263
|
const status = toolStatus(part);
|
|
252186
|
-
const startedAt = toolStartedAt(part, now$
|
|
252187
|
-
const completedAt = toolCompletedAt(part, now$
|
|
252264
|
+
const startedAt = toolStartedAt(part, now$73);
|
|
252265
|
+
const completedAt = toolCompletedAt(part, now$73);
|
|
252188
252266
|
const nativeItemRef = providerRef$1(part.id);
|
|
252189
252267
|
const nodeId = idAllocator.derive.nodeFromProviderItem({
|
|
252190
252268
|
driver: OPENCODE_PROVIDER,
|
|
@@ -252207,7 +252285,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252207
252285
|
title: toolTitle$1(part),
|
|
252208
252286
|
startedAt,
|
|
252209
252287
|
completedAt,
|
|
252210
|
-
updatedAt: now$
|
|
252288
|
+
updatedAt: now$73
|
|
252211
252289
|
};
|
|
252212
252290
|
const input = toolInput(part);
|
|
252213
252291
|
const output = toolOutput(part);
|
|
@@ -252267,7 +252345,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252267
252345
|
});
|
|
252268
252346
|
});
|
|
252269
252347
|
const emitTodo = fnUntraced(function* (state, turn, todos) {
|
|
252270
|
-
const now$
|
|
252348
|
+
const now$79 = yield* now;
|
|
252271
252349
|
if (turn.planId === null) turn.planId = yield* idAllocator.allocate.plan({
|
|
252272
252350
|
threadId: turn.threadId,
|
|
252273
252351
|
...turn.runId === null ? {} : { runId: turn.runId },
|
|
@@ -252307,7 +252385,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252307
252385
|
runtimeRequestId: null,
|
|
252308
252386
|
checkpointScopeId: null,
|
|
252309
252387
|
startedAt: turn.startedAt,
|
|
252310
|
-
completedAt: completed ? now$
|
|
252388
|
+
completedAt: completed ? now$79 : null
|
|
252311
252389
|
}
|
|
252312
252390
|
});
|
|
252313
252391
|
yield* emitProviderEvent({
|
|
@@ -252339,8 +252417,8 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252339
252417
|
status: completed ? "completed" : "running",
|
|
252340
252418
|
title: "Todo list",
|
|
252341
252419
|
startedAt: turn.startedAt,
|
|
252342
|
-
completedAt: completed ? now$
|
|
252343
|
-
updatedAt: now$
|
|
252420
|
+
completedAt: completed ? now$79 : null,
|
|
252421
|
+
updatedAt: now$79,
|
|
252344
252422
|
type: "todo_list",
|
|
252345
252423
|
planId,
|
|
252346
252424
|
steps
|
|
@@ -252393,7 +252471,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252393
252471
|
const emitRuntimeRequest = fnUntraced(function* (owner, nativeRequestId, request) {
|
|
252394
252472
|
if (pendingRequestsByNativeId.has(nativeRequestId)) return;
|
|
252395
252473
|
const { state, turn, subagent } = owner;
|
|
252396
|
-
const now$
|
|
252474
|
+
const now$76 = yield* now;
|
|
252397
252475
|
const requestId = yield* idAllocator.allocate.runtimeRequest({
|
|
252398
252476
|
driver: OPENCODE_PROVIDER,
|
|
252399
252477
|
providerTurnId: turn.providerTurnId,
|
|
@@ -252413,7 +252491,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252413
252491
|
parentNodeId: subagent?.nodeId ?? turn.rootNodeId,
|
|
252414
252492
|
turnItemId,
|
|
252415
252493
|
requestKind,
|
|
252416
|
-
createdAt: now$
|
|
252494
|
+
createdAt: now$76,
|
|
252417
252495
|
...request.type === "permission" ? { permission: request.value } : { question: request.value }
|
|
252418
252496
|
};
|
|
252419
252497
|
pendingRequests.set(String(requestId), pending);
|
|
@@ -252429,7 +252507,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252429
252507
|
type: "live",
|
|
252430
252508
|
providerSessionId: inputProviderSessionId
|
|
252431
252509
|
},
|
|
252432
|
-
createdAt: now$
|
|
252510
|
+
createdAt: now$76,
|
|
252433
252511
|
resolvedAt: null
|
|
252434
252512
|
};
|
|
252435
252513
|
state.runtimeRequests.set(String(requestId), runtimeRequest);
|
|
@@ -252450,7 +252528,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252450
252528
|
nativeItemRef: providerRef$1(nativeRequestId),
|
|
252451
252529
|
runtimeRequestId: requestId,
|
|
252452
252530
|
checkpointScopeId: null,
|
|
252453
|
-
startedAt: now$
|
|
252531
|
+
startedAt: now$76,
|
|
252454
252532
|
completedAt: null
|
|
252455
252533
|
}
|
|
252456
252534
|
});
|
|
@@ -252463,20 +252541,20 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252463
252541
|
yield* emitProviderEvent({
|
|
252464
252542
|
type: "turn_item.updated",
|
|
252465
252543
|
driver: OPENCODE_PROVIDER,
|
|
252466
|
-
turnItem: runtimeRequestTurnItem(pending, "waiting", null, now$
|
|
252544
|
+
turnItem: runtimeRequestTurnItem(pending, "waiting", null, now$76)
|
|
252467
252545
|
});
|
|
252468
252546
|
yield* updateProviderSession("waiting", null);
|
|
252469
252547
|
});
|
|
252470
252548
|
const resolveRuntimeRequest = fnUntraced(function* (nativeRequestId, status) {
|
|
252471
252549
|
const pending = pendingRequestsByNativeId.get(nativeRequestId);
|
|
252472
252550
|
if (pending === void 0) return;
|
|
252473
|
-
const now$
|
|
252551
|
+
const now$77 = yield* now;
|
|
252474
252552
|
const current = pending.state.runtimeRequests.get(String(pending.requestId));
|
|
252475
252553
|
if (current !== void 0) {
|
|
252476
252554
|
const resolved = {
|
|
252477
252555
|
...current,
|
|
252478
252556
|
status,
|
|
252479
|
-
resolvedAt: now$
|
|
252557
|
+
resolvedAt: now$77
|
|
252480
252558
|
};
|
|
252481
252559
|
pending.state.runtimeRequests.set(String(pending.requestId), resolved);
|
|
252482
252560
|
yield* emitProviderEvent({
|
|
@@ -252504,13 +252582,13 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252504
252582
|
runtimeRequestId: pending.requestId,
|
|
252505
252583
|
checkpointScopeId: null,
|
|
252506
252584
|
startedAt: pending.createdAt,
|
|
252507
|
-
completedAt: now$
|
|
252585
|
+
completedAt: now$77
|
|
252508
252586
|
}
|
|
252509
252587
|
});
|
|
252510
252588
|
yield* emitProviderEvent({
|
|
252511
252589
|
type: "turn_item.updated",
|
|
252512
252590
|
driver: OPENCODE_PROVIDER,
|
|
252513
|
-
turnItem: runtimeRequestTurnItem(pending, status === "resolved" ? "completed" : "cancelled", now$
|
|
252591
|
+
turnItem: runtimeRequestTurnItem(pending, status === "resolved" ? "completed" : "cancelled", now$77, now$77)
|
|
252514
252592
|
});
|
|
252515
252593
|
pendingRequests.delete(String(pending.requestId));
|
|
252516
252594
|
pendingRequestsByNativeId.delete(nativeRequestId);
|
|
@@ -252667,8 +252745,8 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252667
252745
|
});
|
|
252668
252746
|
const createChildTurn = fnUntraced(function* (state, message) {
|
|
252669
252747
|
if (state.appThread === null || state.parentSubagent === null) return null;
|
|
252670
|
-
const now$
|
|
252671
|
-
const startedAt = dateTimeFromEpoch(message.time.created, now$
|
|
252748
|
+
const now$78 = yield* now;
|
|
252749
|
+
const startedAt = dateTimeFromEpoch(message.time.created, now$78);
|
|
252672
252750
|
const rootNodeId = idAllocator.derive.nodeFromProviderItem({
|
|
252673
252751
|
driver: OPENCODE_PROVIDER,
|
|
252674
252752
|
nativeItemId: `${state.nativeSessionId}:root:${message.id}`
|
|
@@ -252750,7 +252828,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252750
252828
|
return turn;
|
|
252751
252829
|
});
|
|
252752
252830
|
const projectChildUserPart = fnUntraced(function* (state, turn, part) {
|
|
252753
|
-
const now$
|
|
252831
|
+
const now$80 = yield* now;
|
|
252754
252832
|
const messageId = idAllocator.derive.messageFromProviderItem({
|
|
252755
252833
|
driver: OPENCODE_PROVIDER,
|
|
252756
252834
|
nativeItemId: part.messageID
|
|
@@ -252771,7 +252849,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252771
252849
|
attachments: [],
|
|
252772
252850
|
streaming: false,
|
|
252773
252851
|
createdAt: turn.startedAt,
|
|
252774
|
-
updatedAt: now$
|
|
252852
|
+
updatedAt: now$80
|
|
252775
252853
|
};
|
|
252776
252854
|
yield* emitProviderEvent({
|
|
252777
252855
|
type: "message.updated",
|
|
@@ -252796,8 +252874,8 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252796
252874
|
status: "completed",
|
|
252797
252875
|
title: null,
|
|
252798
252876
|
startedAt: projected.createdAt,
|
|
252799
|
-
completedAt: now$
|
|
252800
|
-
updatedAt: now$
|
|
252877
|
+
completedAt: now$80,
|
|
252878
|
+
updatedAt: now$80,
|
|
252801
252879
|
type: "user_message",
|
|
252802
252880
|
messageId,
|
|
252803
252881
|
inputIntent: "turn_start",
|
|
@@ -252809,7 +252887,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252809
252887
|
const emitCompactionItem = fn("OpenCodeAdapterV2.emitCompactionItem")(function* (state, turn) {
|
|
252810
252888
|
const nativeItemId = `${turn.providerTurnId}:compaction`;
|
|
252811
252889
|
if (turn.itemOrdinals.has(nativeItemId)) return;
|
|
252812
|
-
const now$
|
|
252890
|
+
const now$75 = yield* now;
|
|
252813
252891
|
yield* emitProviderEvent({
|
|
252814
252892
|
type: "turn_item.updated",
|
|
252815
252893
|
driver: OPENCODE_PROVIDER,
|
|
@@ -252831,8 +252909,8 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
252831
252909
|
status: "completed",
|
|
252832
252910
|
title: "Context compacted",
|
|
252833
252911
|
startedAt: turn.startedAt,
|
|
252834
|
-
completedAt: now$
|
|
252835
|
-
updatedAt: now$
|
|
252912
|
+
completedAt: now$75,
|
|
252913
|
+
updatedAt: now$75
|
|
252836
252914
|
}
|
|
252837
252915
|
});
|
|
252838
252916
|
});
|
|
@@ -253236,7 +253314,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
253236
253314
|
hasPendingBackgroundWork: sync$1(() => busySessionIds.size > 0),
|
|
253237
253315
|
ensureThread: (threadInput) => gen$1(function* () {
|
|
253238
253316
|
if (threadInput.existingProviderThread?.nativeThreadRef != null) return yield* runtimeSession.resumeThread({ providerThread: threadInput.existingProviderThread });
|
|
253239
|
-
const nativeSession = unwrapData("session.create", yield* sdkCall("session.create", { permission: openCodePermissionRules(threadInput.runtimePolicy) }, () => client.session.create({ permission: openCodePermissionRules(threadInput.runtimePolicy) })));
|
|
253317
|
+
const nativeSession = unwrapData("session.create", yield* sdkCall("session.create", { permission: openCodePermissionRules(threadInput.runtimePolicy, userRegistry.skillOverrides) }, () => client.session.create({ permission: openCodePermissionRules(threadInput.runtimePolicy, userRegistry.skillOverrides) })));
|
|
253240
253318
|
const createdAt = yield* now;
|
|
253241
253319
|
const created = makeProviderThread({
|
|
253242
253320
|
idAllocator,
|
|
@@ -253264,6 +253342,10 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
253264
253342
|
}))),
|
|
253265
253343
|
resumeThread: (threadInput) => gen$1(function* () {
|
|
253266
253344
|
const sessionId = nativeThreadId(threadInput.providerThread);
|
|
253345
|
+
yield* sdkCall("session.update", { sessionID: sessionId }, () => client.session.update({
|
|
253346
|
+
sessionID: sessionId,
|
|
253347
|
+
permission: openCodePermissionRules(input.runtimePolicy, userRegistry.skillOverrides)
|
|
253348
|
+
}));
|
|
253267
253349
|
const nativeSession = unwrapData("session.get", yield* sdkCall("session.get", { sessionID: sessionId }, () => client.session.get({ sessionID: sessionId })));
|
|
253268
253350
|
const resumedAt = yield* now;
|
|
253269
253351
|
const providerThread = {
|
|
@@ -253542,7 +253624,7 @@ const makeOpenCodeAdapterV2 = fn("makeOpenCodeAdapterV2")(function* (options) {
|
|
|
253542
253624
|
if (unwrapData("session.messages", yield* sdkCall("session.messages", { sessionID: fork.id }, () => client.session.messages({ sessionID: fork.id }))).length !== boundaryIndex) return yield* protocolError("OpenCode did not preserve the requested rewind boundary.");
|
|
253543
253625
|
yield* sdkCall("session.update", { sessionID: fork.id }, () => client.session.update({
|
|
253544
253626
|
sessionID: fork.id,
|
|
253545
|
-
permission: openCodePermissionRules(input.runtimePolicy)
|
|
253627
|
+
permission: openCodePermissionRules(input.runtimePolicy, userRegistry.skillOverrides)
|
|
253546
253628
|
}));
|
|
253547
253629
|
retainedThread = {
|
|
253548
253630
|
...rollbackInput.providerThread,
|
|
@@ -259933,6 +260015,7 @@ const makeMuseAdapterV2 = fn("makeMuseAdapterV2")(function* (options) {
|
|
|
259933
260015
|
const providerHost = yield* ProviderHost;
|
|
259934
260016
|
const fileSystem = yield* FileSystem;
|
|
259935
260017
|
const mcpSessions = yield* McpProviderSessions;
|
|
260018
|
+
const readUserMcpRegistry = yield* makeReader;
|
|
259936
260019
|
const agentScope = yield* AgentScope;
|
|
259937
260020
|
const protocolError = (detail, payload) => new ProviderAdapterProtocolError({
|
|
259938
260021
|
driver: MUSE_PROVIDER,
|
|
@@ -261148,13 +261231,29 @@ const makeMuseAdapterV2 = fn("makeMuseAdapterV2")(function* (options) {
|
|
|
261148
261231
|
return yield* gen$1(function* () {
|
|
261149
261232
|
nativeSessionId = requestedId ?? host.connection.mintCommandId();
|
|
261150
261233
|
const mcpSession = yield* mcpSessions.read(args.threadId);
|
|
261151
|
-
|
|
261152
|
-
|
|
261234
|
+
const userServers = serversForDriver(yield* readUserMcpRegistry(args.threadId), MUSE_PROVIDER);
|
|
261235
|
+
if ((mcpSession || userServers.length > 0) && !host.initializeResult.grantedCapabilities.includes("sessionMcp")) return yield* protocolError("Update Muse Code to a version that supports session MCP servers");
|
|
261236
|
+
const mcpServers = Object.fromEntries(userServers.map(({ name, transport }) => [name, transport.type === "http" ? {
|
|
261153
261237
|
transport: "streamableHttp",
|
|
261154
261238
|
mode: "optional",
|
|
261155
|
-
url:
|
|
261156
|
-
headers: {
|
|
261157
|
-
}
|
|
261239
|
+
url: transport.url,
|
|
261240
|
+
headers: { ...transport.headers }
|
|
261241
|
+
} : {
|
|
261242
|
+
transport: "stdio",
|
|
261243
|
+
mode: "optional",
|
|
261244
|
+
command: transport.command,
|
|
261245
|
+
args: [...transport.args],
|
|
261246
|
+
env: { ...transport.env }
|
|
261247
|
+
}]));
|
|
261248
|
+
const config = mcpSession || userServers.length > 0 ? { mcpServers: {
|
|
261249
|
+
...mcpServers,
|
|
261250
|
+
...mcpSession ? { "t3-code": {
|
|
261251
|
+
transport: "streamableHttp",
|
|
261252
|
+
mode: "optional",
|
|
261253
|
+
url: mcpSession.endpoint,
|
|
261254
|
+
headers: { Authorization: mcpSession.authorizationHeader }
|
|
261255
|
+
} } : {}
|
|
261256
|
+
} } : void 0;
|
|
261158
261257
|
const startModel = yield* resolveModel(args.modelSelection);
|
|
261159
261258
|
const permissionProfile = musePermissionProfile(args.runtimePolicy.runtimeMode);
|
|
261160
261259
|
const result = yield* request(requestedId ? "session/resume" : "session/start", requestedId ? {
|
|
@@ -262222,6 +262321,7 @@ const makePiRpcConnection = fnUntraced(function* (options) {
|
|
|
262222
262321
|
* `@earendil-works/pi-coding-agent` and `typebox` from the user's pi install.
|
|
262223
262322
|
*/
|
|
262224
262323
|
const PI_T3_MCP_EXTENSION_FILENAME = "pi-t3-mcp-extension.ts";
|
|
262324
|
+
const T3_PI_USER_MCP_ENV = "T3_PI_USER_MCP_SERVERS";
|
|
262225
262325
|
const T3_MCP_URL_ENV = "T3_MCP_URL";
|
|
262226
262326
|
const T3_MCP_BEARER_ENV = "T3_MCP_BEARER_TOKEN";
|
|
262227
262327
|
const T3_PI_RUNTIME_MODE_ENV = "T3_PI_RUNTIME_MODE";
|
|
@@ -262237,6 +262337,7 @@ import * as NodeFSP from "node:fs/promises";
|
|
|
262237
262337
|
import * as NodePath from "node:path";
|
|
262238
262338
|
import { Type } from "typebox";
|
|
262239
262339
|
|
|
262340
|
+
const USER_MCP_ENV = ${JSON.stringify(T3_PI_USER_MCP_ENV)};
|
|
262240
262341
|
const URL_ENV = ${JSON.stringify(T3_MCP_URL_ENV)};
|
|
262241
262342
|
const TOKEN_ENV = ${JSON.stringify(T3_MCP_BEARER_ENV)};
|
|
262242
262343
|
const RUNTIME_MODE_ENV = ${JSON.stringify(T3_PI_RUNTIME_MODE_ENV)};
|
|
@@ -262547,6 +262648,12 @@ export default async function t3McpExtension(pi: ExtensionAPI) {
|
|
|
262547
262648
|
}
|
|
262548
262649
|
});
|
|
262549
262650
|
|
|
262651
|
+
const userServers = JSON.parse(env(USER_MCP_ENV) ?? "{}") as Record<string, Parameters<ExtensionAPI["registerMcpServer"]>[1]>;
|
|
262652
|
+
if (Object.keys(userServers).length > 0) {
|
|
262653
|
+
if (typeof pi.registerMcpServer !== "function") throw new Error("Update Pi to 0.99 or later to use P4 MCP servers.");
|
|
262654
|
+
for (const [name, config] of Object.entries(userServers)) pi.registerMcpServer(name, config);
|
|
262655
|
+
}
|
|
262656
|
+
|
|
262550
262657
|
const endpoint = env(URL_ENV);
|
|
262551
262658
|
const token = env(TOKEN_ENV);
|
|
262552
262659
|
if (endpoint === undefined || token === undefined) {
|
|
@@ -262871,6 +262978,17 @@ function buildPiRpcLaunch(input) {
|
|
|
262871
262978
|
];
|
|
262872
262979
|
if (hasT3Extension && input.extensionPath !== void 0 && !hasExplicitExtension(args, input.extensionPath)) args.push("--extension", input.extensionPath);
|
|
262873
262980
|
const environment = { ...input.environment };
|
|
262981
|
+
delete environment[T3_PI_USER_MCP_ENV];
|
|
262982
|
+
if (hasT3Extension && input.userMcpServers?.length && input.userMcpNamespace) environment[T3_PI_USER_MCP_ENV] = JSON.stringify(Object.fromEntries(input.userMcpServers.map(({ name, transport }) => [`p4_${input.userMcpNamespace}_${name}`, transport.type === "http" ? {
|
|
262983
|
+
url: transport.url,
|
|
262984
|
+
headers: transport.headers,
|
|
262985
|
+
oauth: false
|
|
262986
|
+
} : {
|
|
262987
|
+
command: transport.command,
|
|
262988
|
+
args: transport.args,
|
|
262989
|
+
env: transport.env,
|
|
262990
|
+
...transport.cwd === void 0 ? {} : { cwd: transport.cwd }
|
|
262991
|
+
}])));
|
|
262874
262992
|
delete environment[T3_MCP_URL_ENV];
|
|
262875
262993
|
delete environment[T3_MCP_BEARER_ENV];
|
|
262876
262994
|
delete environment[T3_PI_MCP_EXTENSION_PATH_ENV];
|
|
@@ -263286,6 +263404,7 @@ const makePiAdapterV2 = fn("makePiAdapterV2")(function* (options) {
|
|
|
263286
263404
|
const idAllocator = yield* IdAllocatorV2;
|
|
263287
263405
|
const host = yield* ProviderHost;
|
|
263288
263406
|
const mcpSessions = yield* McpProviderSessions;
|
|
263407
|
+
const readUserMcpRegistry = yield* makeReader;
|
|
263289
263408
|
const { continuationRequests } = options;
|
|
263290
263409
|
const protocolError = (detail, payload) => new ProviderAdapterProtocolError({
|
|
263291
263410
|
driver: PI_PROVIDER,
|
|
@@ -263313,6 +263432,8 @@ const makePiAdapterV2 = fn("makePiAdapterV2")(function* (options) {
|
|
|
263313
263432
|
launchArgs: resolvedLaunchArgs.args,
|
|
263314
263433
|
environment: options.environment,
|
|
263315
263434
|
mcpSession,
|
|
263435
|
+
userMcpServers: serversForDriver(yield* readUserMcpRegistry(input.threadId), PI_PROVIDER),
|
|
263436
|
+
userMcpNamespace: input.providerSessionId.replace(/[^a-zA-Z0-9_]/g, "_"),
|
|
263316
263437
|
extensionPath,
|
|
263317
263438
|
runtimeMode: input.runtimePolicy.runtimeMode
|
|
263318
263439
|
});
|
|
@@ -285775,15 +285896,18 @@ const MCP_CLIENT_OAUTH_CALLBACK_PATH = "/oauth/mcp-client/callback";
|
|
|
285775
285896
|
const PENDING_TTL_MS = 6e5;
|
|
285776
285897
|
/** Refresh a token this close to its expiry before handing it to a provider. */
|
|
285777
285898
|
const REFRESH_MARGIN_MS = 3e5;
|
|
285899
|
+
const BACKGROUND_REFRESH_REDIRECT_URL = "http://localhost/p4code-background-refresh";
|
|
285778
285900
|
var McpClientOAuthError = class extends TaggedError$1()("McpClientOAuthError", {
|
|
285779
285901
|
operation: Literals$2([
|
|
285780
285902
|
"start",
|
|
285781
285903
|
"complete",
|
|
285782
285904
|
"sign-out"
|
|
285783
285905
|
]),
|
|
285906
|
+
/** `client-rejected`: dynamic client registration was refused, as allowlisting servers such as Figma do. */
|
|
285784
285907
|
reason: Literals$2([
|
|
285785
285908
|
"invalid-origin",
|
|
285786
285909
|
"unknown-state",
|
|
285910
|
+
"client-rejected",
|
|
285787
285911
|
"authorization",
|
|
285788
285912
|
"storage"
|
|
285789
285913
|
]),
|
|
@@ -285822,16 +285946,23 @@ const make$77 = gen$1(function* () {
|
|
|
285822
285946
|
const makeProvider = (input) => {
|
|
285823
285947
|
let grant = input.grant;
|
|
285824
285948
|
let tokensSaved = false;
|
|
285949
|
+
let changed = false;
|
|
285825
285950
|
let authorizationUrl;
|
|
285951
|
+
let registrationRejected = false;
|
|
285952
|
+
const fetchFn = async (url, init) => {
|
|
285953
|
+
const response = await fetch(url, init);
|
|
285954
|
+
if (init?.method === "POST" && typeof init.body === "string" && init.body.includes("\"redirect_uris\"") && (response.status === 401 || response.status === 403)) registrationRejected = true;
|
|
285955
|
+
return response;
|
|
285956
|
+
};
|
|
285826
285957
|
return {
|
|
285827
285958
|
provider: {
|
|
285828
285959
|
get redirectUrl() {
|
|
285829
|
-
return input.redirectUrl;
|
|
285960
|
+
return input.redirectUrl ?? BACKGROUND_REFRESH_REDIRECT_URL;
|
|
285830
285961
|
},
|
|
285831
285962
|
get clientMetadata() {
|
|
285832
285963
|
return {
|
|
285833
285964
|
client_name: "P4 Code",
|
|
285834
|
-
redirect_uris: input.redirectUrl ===
|
|
285965
|
+
redirect_uris: input.redirectUrl === null ? [] : [input.redirectUrl],
|
|
285835
285966
|
grant_types: ["authorization_code", "refresh_token"],
|
|
285836
285967
|
response_types: ["code"],
|
|
285837
285968
|
token_endpoint_auth_method: "none"
|
|
@@ -285839,19 +285970,32 @@ const make$77 = gen$1(function* () {
|
|
|
285839
285970
|
},
|
|
285840
285971
|
...input.state === void 0 ? {} : { state: () => input.state },
|
|
285841
285972
|
clientInformation: () => grant.clientInformation,
|
|
285842
|
-
saveClientInformation: (clientInformation) => {
|
|
285973
|
+
...input.redirectUrl === null ? {} : { saveClientInformation: (clientInformation) => {
|
|
285843
285974
|
grant = {
|
|
285844
285975
|
...grant,
|
|
285845
285976
|
clientInformation
|
|
285846
285977
|
};
|
|
285847
|
-
|
|
285848
|
-
|
|
285978
|
+
changed = true;
|
|
285979
|
+
} },
|
|
285980
|
+
tokens: () => input.ignoreTokens ? void 0 : grant.tokens,
|
|
285849
285981
|
saveTokens: (tokens) => {
|
|
285850
285982
|
grant = {
|
|
285851
285983
|
...grant,
|
|
285852
285984
|
tokens
|
|
285853
285985
|
};
|
|
285854
285986
|
tokensSaved = true;
|
|
285987
|
+
changed = true;
|
|
285988
|
+
},
|
|
285989
|
+
invalidateCredentials: (scope) => {
|
|
285990
|
+
if (scope === "all" || scope === "client") {
|
|
285991
|
+
const { clientInformation: _, ...rest } = grant;
|
|
285992
|
+
grant = rest;
|
|
285993
|
+
}
|
|
285994
|
+
if (scope === "all" || scope === "tokens") {
|
|
285995
|
+
const { tokens: _, savedAt: __, ...rest } = grant;
|
|
285996
|
+
grant = rest;
|
|
285997
|
+
}
|
|
285998
|
+
changed = true;
|
|
285855
285999
|
},
|
|
285856
286000
|
redirectToAuthorization: (url) => {
|
|
285857
286001
|
authorizationUrl = url.toString();
|
|
@@ -285864,14 +286008,23 @@ const make$77 = gen$1(function* () {
|
|
|
285864
286008
|
return input.pendingEntry.codeVerifier;
|
|
285865
286009
|
}
|
|
285866
286010
|
},
|
|
286011
|
+
fetchFn,
|
|
285867
286012
|
/** The grant to persist, stamped with `now` when the SDK saved new tokens. */
|
|
285868
286013
|
current: (now) => tokensSaved ? {
|
|
285869
286014
|
...grant,
|
|
285870
286015
|
savedAt: now
|
|
285871
286016
|
} : grant,
|
|
285872
|
-
authorizationUrl: () => authorizationUrl
|
|
286017
|
+
authorizationUrl: () => authorizationUrl,
|
|
286018
|
+
registrationRejected: () => registrationRejected,
|
|
286019
|
+
/** Whether the SDK saved or dropped anything, so an unchanged grant is not written back. */
|
|
286020
|
+
changed: () => changed
|
|
285873
286021
|
};
|
|
285874
286022
|
};
|
|
286023
|
+
const authorizationError = (operation, session, cause) => new McpClientOAuthError({
|
|
286024
|
+
operation,
|
|
286025
|
+
reason: session.registrationRejected() ? "client-rejected" : "authorization",
|
|
286026
|
+
cause
|
|
286027
|
+
});
|
|
285875
286028
|
const prunePending = (now) => {
|
|
285876
286029
|
for (const [state, entry] of pending) if (entry.expiresAt <= now) pending.delete(state);
|
|
285877
286030
|
};
|
|
@@ -285897,15 +286050,15 @@ const make$77 = gen$1(function* () {
|
|
|
285897
286050
|
grant,
|
|
285898
286051
|
redirectUrl,
|
|
285899
286052
|
pendingEntry: entry,
|
|
285900
|
-
state
|
|
286053
|
+
state,
|
|
286054
|
+
ignoreTokens: input.reauthenticate === true
|
|
285901
286055
|
});
|
|
285902
286056
|
const result = yield* tryPromise({
|
|
285903
|
-
try: () => auth(session.provider, {
|
|
285904
|
-
|
|
285905
|
-
|
|
285906
|
-
|
|
285907
|
-
|
|
285908
|
-
})
|
|
286057
|
+
try: () => auth(session.provider, {
|
|
286058
|
+
serverUrl: input.serverUrl,
|
|
286059
|
+
fetchFn: session.fetchFn
|
|
286060
|
+
}),
|
|
286061
|
+
catch: (cause) => authorizationError("start", session, cause)
|
|
285909
286062
|
});
|
|
285910
286063
|
yield* writeGrant(input.serverId, session.current(yield* currentTimeMillis)).pipe(mapError((cause) => new McpClientOAuthError({
|
|
285911
286064
|
operation: "start",
|
|
@@ -285938,13 +286091,10 @@ const make$77 = gen$1(function* () {
|
|
|
285938
286091
|
yield* tryPromise({
|
|
285939
286092
|
try: () => auth(session.provider, {
|
|
285940
286093
|
serverUrl: entry.serverUrl,
|
|
285941
|
-
authorizationCode: input.code
|
|
286094
|
+
authorizationCode: input.code,
|
|
286095
|
+
fetchFn: session.fetchFn
|
|
285942
286096
|
}),
|
|
285943
|
-
catch: (cause) =>
|
|
285944
|
-
operation: "complete",
|
|
285945
|
-
reason: "authorization",
|
|
285946
|
-
cause
|
|
285947
|
-
})
|
|
286097
|
+
catch: (cause) => authorizationError("complete", session, cause)
|
|
285948
286098
|
});
|
|
285949
286099
|
yield* writeGrant(entry.serverId, session.current(yield* currentTimeMillis)).pipe(mapError((cause) => new McpClientOAuthError({
|
|
285950
286100
|
operation: "complete",
|
|
@@ -285958,7 +286108,12 @@ const make$77 = gen$1(function* () {
|
|
|
285958
286108
|
reason: "storage",
|
|
285959
286109
|
cause
|
|
285960
286110
|
})));
|
|
285961
|
-
const authState = (serverId) =>
|
|
286111
|
+
const authState = (serverId) => gen$1(function* () {
|
|
286112
|
+
const grant = getOrUndefined(yield* readGrant(serverId));
|
|
286113
|
+
const tokens = grant?.tokens;
|
|
286114
|
+
if (!tokens?.access_token) return "signed-out";
|
|
286115
|
+
return tokens.expires_in !== void 0 && grant?.savedAt !== void 0 && grant.savedAt + tokens.expires_in * 1e3 <= (yield* currentTimeMillis) && !tokens.refresh_token ? "signed-out" : "signed-in";
|
|
286116
|
+
});
|
|
285962
286117
|
const accessToken = (input) => gen$1(function* () {
|
|
285963
286118
|
const stored = yield* readGrant(input.serverId);
|
|
285964
286119
|
if (isNone(stored) || stored.value.serverUrl !== input.serverUrl) return none$2();
|
|
@@ -285971,19 +286126,15 @@ const make$77 = gen$1(function* () {
|
|
|
285971
286126
|
if (!tokens.refresh_token) return none$2();
|
|
285972
286127
|
const session = makeProvider({
|
|
285973
286128
|
grant,
|
|
285974
|
-
redirectUrl:
|
|
286129
|
+
redirectUrl: null
|
|
285975
286130
|
});
|
|
285976
286131
|
const refreshed = yield* tryPromise({
|
|
285977
286132
|
try: () => auth(session.provider, { serverUrl: input.serverUrl }),
|
|
285978
|
-
catch: (cause) =>
|
|
285979
|
-
operation: "start",
|
|
285980
|
-
reason: "authorization",
|
|
285981
|
-
cause
|
|
285982
|
-
})
|
|
286133
|
+
catch: (cause) => authorizationError("start", session, cause)
|
|
285983
286134
|
}).pipe(option$1);
|
|
285984
|
-
if (isNone(refreshed) || refreshed.value !== "AUTHORIZED") return none$2();
|
|
285985
286135
|
const updated = session.current(yield* currentTimeMillis);
|
|
285986
|
-
yield* writeGrant(input.serverId, updated).pipe(ignore$2);
|
|
286136
|
+
if (session.changed()) yield* writeGrant(input.serverId, updated).pipe(ignore$2);
|
|
286137
|
+
if (isNone(refreshed) || refreshed.value !== "AUTHORIZED") return none$2();
|
|
285987
286138
|
return fromNullishOr(updated.tokens?.access_token);
|
|
285988
286139
|
});
|
|
285989
286140
|
return McpClientOAuth.of({
|
|
@@ -286037,6 +286188,12 @@ var McpRegistrySettingsError = class extends TaggedError$1()("McpRegistrySetting
|
|
|
286037
286188
|
}
|
|
286038
286189
|
};
|
|
286039
286190
|
/**
|
|
286191
|
+
* Whether signing in can fix a 401: an OAuth server, or a remote server with
|
|
286192
|
+
* no headers of its own. Provider configs usually omit that a remote server
|
|
286193
|
+
* uses OAuth, so an imported one arrives as `auth: "none"`.
|
|
286194
|
+
*/
|
|
286195
|
+
const canSignIn = (transport) => transport.type === "http" && (transport.auth === "oauth" || Object.keys(transport.headers).length === 0);
|
|
286196
|
+
/**
|
|
286040
286197
|
* The registry entries a project's sessions receive, with secrets filled in.
|
|
286041
286198
|
* OAuth servers need a token from `accessTokens`; one without a token is
|
|
286042
286199
|
* withheld, since every call would fail until the user signs in.
|
|
@@ -286061,14 +286218,12 @@ const resolveUserMcpRegistry = (settings, projectId, accessTokens) => {
|
|
|
286061
286218
|
continue;
|
|
286062
286219
|
}
|
|
286063
286220
|
let headers = { ...transport.headers };
|
|
286064
|
-
|
|
286065
|
-
|
|
286066
|
-
|
|
286067
|
-
headers
|
|
286068
|
-
|
|
286069
|
-
|
|
286070
|
-
};
|
|
286071
|
-
}
|
|
286221
|
+
const token = accessTokens.get(id);
|
|
286222
|
+
if (transport.auth === "oauth" && token === void 0) continue;
|
|
286223
|
+
if (token !== void 0) headers = {
|
|
286224
|
+
...headers,
|
|
286225
|
+
Authorization: `Bearer ${token}`
|
|
286226
|
+
};
|
|
286072
286227
|
servers.push({
|
|
286073
286228
|
name: server.name,
|
|
286074
286229
|
disabledProviders: server.disabledProviders,
|
|
@@ -286079,12 +286234,18 @@ const resolveUserMcpRegistry = (settings, projectId, accessTokens) => {
|
|
|
286079
286234
|
}
|
|
286080
286235
|
});
|
|
286081
286236
|
}
|
|
286237
|
+
const plugins = Object.entries(settings.plugins).filter(([id]) => resolveRegistryEntryEnabled(settings, "plugins", projectId, id)).map(([, plugin]) => ({
|
|
286238
|
+
name: plugin.name,
|
|
286239
|
+
path: plugin.path
|
|
286240
|
+
}));
|
|
286241
|
+
const skillOverrides = {
|
|
286242
|
+
...settings.skillOverrides,
|
|
286243
|
+
...projectId === null ? {} : settings.projectSettingsOverrides[projectId]?.skillOverrides
|
|
286244
|
+
};
|
|
286082
286245
|
return {
|
|
286083
286246
|
servers,
|
|
286084
|
-
plugins
|
|
286085
|
-
|
|
286086
|
-
path: plugin.path
|
|
286087
|
-
}))
|
|
286247
|
+
plugins,
|
|
286248
|
+
...Object.keys(skillOverrides).length ? { skillOverrides } : {}
|
|
286088
286249
|
};
|
|
286089
286250
|
};
|
|
286090
286251
|
/** First line of a failure, bounded, for the settings page. Never a header or env value. */
|
|
@@ -286114,7 +286275,7 @@ const makeClientTransport = (transport, token, signal) => transport.type === "st
|
|
|
286114
286275
|
}
|
|
286115
286276
|
} });
|
|
286116
286277
|
const classifyProbeFailure = (transport, cause, secrets, checkedAt, stderr) => {
|
|
286117
|
-
if (cause instanceof UnauthorizedError || cause instanceof StreamableHTTPError && (cause.code === 401 || cause.code === 403)) return transport
|
|
286278
|
+
if (cause instanceof UnauthorizedError || cause instanceof StreamableHTTPError && (cause.code === 401 || cause.code === 403)) return canSignIn(transport) ? {
|
|
286118
286279
|
status: "needs-auth",
|
|
286119
286280
|
checkedAt
|
|
286120
286281
|
} : {
|
|
@@ -286144,9 +286305,10 @@ var McpRegistry = class extends Service$3()("@p4code/cli/mcp/McpRegistry") {};
|
|
|
286144
286305
|
const make$76 = gen$1(function* () {
|
|
286145
286306
|
const settingsService = yield* ServerSettingsService;
|
|
286146
286307
|
const oauth = yield* McpClientOAuth;
|
|
286308
|
+
const self = yield* resolveSelfInvocation();
|
|
286147
286309
|
const health = /* @__PURE__ */ new Map();
|
|
286148
286310
|
const getSettings = settingsService.getSettings.pipe(mapError((cause) => new McpRegistrySettingsError({ cause })));
|
|
286149
|
-
const accessTokenFor = (id, server) => server.transport.type === "http" && server.transport
|
|
286311
|
+
const accessTokenFor = (id, server) => server.transport.type === "http" && canSignIn(server.transport) ? oauth.accessToken({
|
|
286150
286312
|
serverId: McpServerId.make(id),
|
|
286151
286313
|
serverUrl: server.transport.url
|
|
286152
286314
|
}) : succeed$1(none$2());
|
|
@@ -286158,13 +286320,22 @@ const make$76 = gen$1(function* () {
|
|
|
286158
286320
|
const token = yield* accessTokenFor(id, server).pipe(timeoutOption(TOKEN_REFRESH_TIMEOUT), map$11(flatten));
|
|
286159
286321
|
if (isSome(token)) tokens.set(id, token.value);
|
|
286160
286322
|
}
|
|
286161
|
-
|
|
286323
|
+
const registry = resolveUserMcpRegistry(settings, projectId, tokens);
|
|
286324
|
+
return {
|
|
286325
|
+
...registry,
|
|
286326
|
+
servers: registry.servers.map((server) => ({
|
|
286327
|
+
...server,
|
|
286328
|
+
transport: server.transport.type === "stdio" ? withStdioWorkingDirectory(server.transport, self) : server.transport
|
|
286329
|
+
}))
|
|
286330
|
+
};
|
|
286162
286331
|
}).pipe(catch_((error) => logWarning$1("failed to resolve the MCP registry", { cause: error }).pipe(as({
|
|
286163
286332
|
servers: [],
|
|
286164
286333
|
plugins: []
|
|
286165
286334
|
}))));
|
|
286166
286335
|
const runtimeState = (id, server) => gen$1(function* () {
|
|
286167
|
-
const
|
|
286336
|
+
const transport = server.transport;
|
|
286337
|
+
const signIn = canSignIn(transport) ? yield* oauth.authState(McpServerId.make(id)) : "not-required";
|
|
286338
|
+
const authState = transport.type === "http" && transport.auth === "oauth" ? signIn : signIn === "signed-in" ? signIn : "not-required";
|
|
286168
286339
|
const cached = health.get(id);
|
|
286169
286340
|
return {
|
|
286170
286341
|
health: cached !== void 0 && cached.config === transportFingerprint(server.transport) ? cached.health : { status: "unchecked" },
|
|
@@ -286230,12 +286401,13 @@ const make$76 = gen$1(function* () {
|
|
|
286230
286401
|
return yield* runtimeState(serverId, server);
|
|
286231
286402
|
});
|
|
286232
286403
|
const startSignIn = (input) => gen$1(function* () {
|
|
286233
|
-
const
|
|
286234
|
-
if (
|
|
286404
|
+
const transport = (yield* findServer(input.serverId)).transport;
|
|
286405
|
+
if (transport.type !== "http" || !canSignIn(transport)) return yield* new McpServerNotFoundError({ serverId: input.serverId });
|
|
286235
286406
|
return yield* oauth.start({
|
|
286236
286407
|
serverId: input.serverId,
|
|
286237
|
-
serverUrl:
|
|
286238
|
-
origin: input.origin
|
|
286408
|
+
serverUrl: transport.url,
|
|
286409
|
+
origin: input.origin,
|
|
286410
|
+
...input.reauthenticate === void 0 ? {} : { reauthenticate: input.reauthenticate }
|
|
286239
286411
|
});
|
|
286240
286412
|
});
|
|
286241
286413
|
const signOut = (serverId) => gen$1(function* () {
|
|
@@ -325291,7 +325463,6 @@ const summarize = (transport) => {
|
|
|
325291
325463
|
const command = transport.command.split(/[\\/]/).at(-1) ?? transport.command;
|
|
325292
325464
|
return transport.args[0] && !transport.args[0].startsWith("-") ? `${command} ${transport.args[0]}`.slice(0, 120) : command;
|
|
325293
325465
|
};
|
|
325294
|
-
const sameTarget = (a, b) => a.type === "http" && b.type === "http" ? a.url === b.url : a.type === "stdio" && b.type === "stdio" && a.command === b.command && a.args.join("\0") === b.args.join("\0");
|
|
325295
325466
|
var McpConfigDiscovery = class extends Service$3()("@p4code/cli/mcp/McpConfigDiscovery") {};
|
|
325296
325467
|
const make$21 = gen$1(function* () {
|
|
325297
325468
|
const fileSystem = yield* FileSystem;
|
|
@@ -325301,6 +325472,7 @@ const make$21 = gen$1(function* () {
|
|
|
325301
325472
|
const settingsService = yield* ServerSettingsService;
|
|
325302
325473
|
const projects = yield* serviceOption(ProjectService);
|
|
325303
325474
|
const home = OS.homedir();
|
|
325475
|
+
const importLock = yield* make$259(1);
|
|
325304
325476
|
const readJson = (file) => fileSystem.readFileString(file).pipe(option$1, map$11(flatMap$2(decodeJson)));
|
|
325305
325477
|
const fromJsonServers = (provider, file, servers) => isRecord(servers) ? Object.entries(servers).flatMap(([name, entry]) => {
|
|
325306
325478
|
const transport = transportFromJsonEntry(entry);
|
|
@@ -325362,7 +325534,17 @@ const make$21 = gen$1(function* () {
|
|
|
325362
325534
|
if (isSome(json) && isRecord(json.value)) results.push(...fromJsonServers(provider, file, json.value.mcpServers));
|
|
325363
325535
|
}
|
|
325364
325536
|
results.push(...yield* codexServers(root ?? home));
|
|
325365
|
-
return results
|
|
325537
|
+
return results.map((server) => {
|
|
325538
|
+
const transport = server.transport;
|
|
325539
|
+
if (server.provider === "codex" || transport.type !== "http" || transport.auth !== "none" || Object.keys(transport.headers).length > 0) return server;
|
|
325540
|
+
return results.some((other) => other.provider === "codex" && other.transport.type === "http" && other.transport.url === transport.url && other.transport.auth === "oauth" && Object.keys(other.transport.headers).length === 0) ? {
|
|
325541
|
+
...server,
|
|
325542
|
+
transport: {
|
|
325543
|
+
...transport,
|
|
325544
|
+
auth: "oauth"
|
|
325545
|
+
}
|
|
325546
|
+
} : server;
|
|
325547
|
+
});
|
|
325366
325548
|
});
|
|
325367
325549
|
const discover = (projectId) => gen$1(function* () {
|
|
325368
325550
|
const settings = yield* settingsService.getSettings.pipe(option$1);
|
|
@@ -325370,13 +325552,24 @@ const make$21 = gen$1(function* () {
|
|
|
325370
325552
|
onNone: () => [],
|
|
325371
325553
|
onSome: (value) => Object.values(value.mcpServers)
|
|
325372
325554
|
});
|
|
325373
|
-
|
|
325555
|
+
const groups = [];
|
|
325556
|
+
for (const server of yield* found(projectId)) {
|
|
325557
|
+
const group = groups.find((entry) => NodeUtil.isDeepStrictEqual(entry.server.transport, server.transport));
|
|
325558
|
+
if (group) {
|
|
325559
|
+
if (!group.providers.includes(server.provider)) group.providers.push(server.provider);
|
|
325560
|
+
} else groups.push({
|
|
325561
|
+
server,
|
|
325562
|
+
providers: [server.provider]
|
|
325563
|
+
});
|
|
325564
|
+
}
|
|
325565
|
+
return groups.map(({ server, providers }) => ({
|
|
325374
325566
|
provider: server.provider,
|
|
325567
|
+
providers,
|
|
325375
325568
|
path: server.path,
|
|
325376
325569
|
name: server.name,
|
|
325377
325570
|
type: server.transport.type,
|
|
325378
325571
|
summary: summarize(server.transport),
|
|
325379
|
-
alreadyAdded: registry.some((entry) =>
|
|
325572
|
+
alreadyAdded: registry.some((entry) => NodeUtil.isDeepStrictEqual(entry.transport, server.transport))
|
|
325380
325573
|
}));
|
|
325381
325574
|
});
|
|
325382
325575
|
const importServers = (input) => gen$1(function* () {
|
|
@@ -325387,12 +325580,19 @@ const make$21 = gen$1(function* () {
|
|
|
325387
325580
|
})));
|
|
325388
325581
|
const taken = new Set(Object.values(settings.mcpServers).map((server) => server.name));
|
|
325389
325582
|
const patch = {};
|
|
325583
|
+
const imported = /* @__PURE__ */ new Set();
|
|
325390
325584
|
for (const wanted of input.servers) {
|
|
325391
325585
|
const source = available.find((server) => server.provider === wanted.provider && server.path === wanted.path && server.name === wanted.name);
|
|
325392
325586
|
if (source === void 0) return yield* new McpImportError({ reason: "not-found" });
|
|
325587
|
+
const existing = [...Object.entries(settings.mcpServers), ...Object.entries(patch)].find(([, server]) => NodeUtil.isDeepStrictEqual(server.transport, source.transport));
|
|
325588
|
+
if (existing) {
|
|
325589
|
+
imported.add(McpServerId.make(existing[0]));
|
|
325590
|
+
continue;
|
|
325591
|
+
}
|
|
325393
325592
|
const name = registryNameFor(source.name, taken);
|
|
325394
325593
|
taken.add(name);
|
|
325395
325594
|
const id = McpServerId.make(yield* crypto.randomUUIDv4().pipe(orDie));
|
|
325595
|
+
imported.add(id);
|
|
325396
325596
|
patch[id] = {
|
|
325397
325597
|
name,
|
|
325398
325598
|
enabled: true,
|
|
@@ -325404,12 +325604,12 @@ const make$21 = gen$1(function* () {
|
|
|
325404
325604
|
}
|
|
325405
325605
|
};
|
|
325406
325606
|
}
|
|
325407
|
-
yield* settingsService.updateSettings({ mcpServers: patch }).pipe(mapError((cause) => new McpImportError({
|
|
325607
|
+
if (Object.keys(patch).length > 0) yield* settingsService.updateSettings({ mcpServers: patch }).pipe(mapError((cause) => new McpImportError({
|
|
325408
325608
|
reason: "settings",
|
|
325409
325609
|
cause
|
|
325410
325610
|
})));
|
|
325411
|
-
return
|
|
325412
|
-
});
|
|
325611
|
+
return [...imported];
|
|
325612
|
+
}).pipe(importLock.withPermits(1));
|
|
325413
325613
|
return McpConfigDiscovery.of({
|
|
325414
325614
|
discover,
|
|
325415
325615
|
import: importServers
|
|
@@ -326545,7 +326745,7 @@ const layerWsRpc = (currentSession, clientOrigin, clientAnalyticsProps, previewA
|
|
|
326545
326745
|
})),
|
|
326546
326746
|
McpClientOAuthError: (cause) => fail$1(new McpRegistryRpcError({
|
|
326547
326747
|
operation: "oauth-start",
|
|
326548
|
-
reason: cause.reason === "invalid-origin" ? "invalid" : "failed",
|
|
326748
|
+
reason: cause.reason === "invalid-origin" ? "invalid" : cause.reason === "client-rejected" ? "rejected" : "failed",
|
|
326549
326749
|
cause
|
|
326550
326750
|
}))
|
|
326551
326751
|
})),
|
|
@@ -345971,4 +346171,4 @@ function runCli() {
|
|
|
345971
346171
|
//#endregion
|
|
345972
346172
|
export { runCli };
|
|
345973
346173
|
|
|
345974
|
-
//# sourceMappingURL=binCli-
|
|
346174
|
+
//# sourceMappingURL=binCli-D9Qk_k5i.mjs.map
|