@ensocode/server 0.3.5 → 0.3.6
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/out/phone/assets/{abnfDiagram-VCTEODGH-k76opPl1.js → abnfDiagram-VCTEODGH-CcwMwkZ2.js} +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-K5Dyn6vg.js +1 -0
- package/out/phone/assets/{architectureDiagram-5GKGNRK7-yxQH9IuZ.js → architectureDiagram-5GKGNRK7-C4vXoVVW.js} +1 -1
- package/out/phone/assets/{blockDiagram-I7D4REHJ-DoHteZpO.js → blockDiagram-I7D4REHJ-btZonF7x.js} +1 -1
- package/out/phone/assets/{c4Diagram-7LVT6UL2-DQVO6L4q.js → c4Diagram-7LVT6UL2-wbgQC5h_.js} +1 -1
- package/out/phone/assets/channel-C0dO6zWg.js +1 -0
- package/out/phone/assets/{chunk-4HAMMTFA-N9Rw4SGW.js → chunk-4HAMMTFA-ClL6ufY7.js} +1 -1
- package/out/phone/assets/{chunk-75Z2AOVW-DKJ8pOxp.js → chunk-75Z2AOVW-CsGKueom.js} +1 -1
- package/out/phone/assets/{chunk-DU6HZSFF-BqGW8Nbd.js → chunk-DU6HZSFF-BOrl8wD9.js} +1 -1
- package/out/phone/assets/{chunk-F27PBJKO-PkFmkghF.js → chunk-F27PBJKO-CQYtYMPT.js} +1 -1
- package/out/phone/assets/{chunk-GMAD6QVW-C9VeD3Jk.js → chunk-GMAD6QVW-D2uUUIys.js} +1 -1
- package/out/phone/assets/{chunk-GVQU2GXP-COhntOeE.js → chunk-GVQU2GXP-k4NEAgCW.js} +1 -1
- package/out/phone/assets/{chunk-IMKFNOWR-B87ghLVD.js → chunk-IMKFNOWR-DGBKnQoB.js} +1 -1
- package/out/phone/assets/{chunk-L3NEJ4N5-C3N2izjg.js → chunk-L3NEJ4N5-BrOC_Q4h.js} +1 -1
- package/out/phone/assets/{chunk-OSK3NFVY-DaAlvVhz.js → chunk-OSK3NFVY-Cpg-5-0Y.js} +1 -1
- package/out/phone/assets/{chunk-P2QGCYS3-BQpKr8IZ.js → chunk-P2QGCYS3-Cwbos3wS.js} +1 -1
- package/out/phone/assets/{chunk-POPQ4Y6H-B2TZMY6U.js → chunk-POPQ4Y6H-CtPqYixr.js} +1 -1
- package/out/phone/assets/{chunk-PWAF6VOD-CgRhpUJy.js → chunk-PWAF6VOD-HDvh5SEv.js} +1 -1
- package/out/phone/assets/{chunk-SHT3W25Y-BySMFA99.js → chunk-SHT3W25Y-DKgmKLLr.js} +1 -1
- package/out/phone/assets/{chunk-SVP7TREG-EDGanDUX.js → chunk-SVP7TREG-DLVIWYD0.js} +1 -1
- package/out/phone/assets/{chunk-TICWLB2K-BtCZ8R2k.js → chunk-TICWLB2K-DzvrdWmw.js} +1 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CWPX0UEe.js +1 -0
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CWPX0UEe.js +1 -0
- package/out/phone/assets/{cynefin-OW5HDTMX-CdZmp44V.js → cynefin-OW5HDTMX-Cx32WN9e.js} +1 -1
- package/out/phone/assets/{cynefinDiagram-5FMLGOSQ-BCz9KwUb.js → cynefinDiagram-5FMLGOSQ-k3jOnfBl.js} +1 -1
- package/out/phone/assets/{dagre-GXQ25YYZ-CgFeNgh6.js → dagre-GXQ25YYZ-CTEzzJig.js} +1 -1
- package/out/phone/assets/{desk-C_b7mE6l.js → desk-9dPB4fYu.js} +1 -1
- package/out/phone/assets/{diagram-S7CK7UJ4-CwvaZIBf.js → diagram-S7CK7UJ4-BpfiB5rc.js} +1 -1
- package/out/phone/assets/{diagram-UQ7AKVKN-DqnD4XoZ.js → diagram-UQ7AKVKN-BpJj6V2i.js} +1 -1
- package/out/phone/assets/{diagram-VSXAHHWV-Kqc9GudQ.js → diagram-VSXAHHWV-BXTUks5P.js} +1 -1
- package/out/phone/assets/{diagram-VX7I27RA-B_0DLDQ0.js → diagram-VX7I27RA-BGaGiVKW.js} +1 -1
- package/out/phone/assets/{diagram-Z3DM3KII-CppKBEPW.js → diagram-Z3DM3KII-DhtDyIq2.js} +1 -1
- package/out/phone/assets/{ebnfDiagram-PWID7BFC-DeYPNCu9.js → ebnfDiagram-PWID7BFC-TUM8eXrc.js} +1 -1
- package/out/phone/assets/{erDiagram-RLTQ6QDP-MsfxDUmk.js → erDiagram-RLTQ6QDP-DqLrmkHj.js} +1 -1
- package/out/phone/assets/eventmodeling-NTZA5JFV-_H7VbKRu.js +1 -0
- package/out/phone/assets/flowDiagram-HODETNUW-HeI2O8Jm.js +1 -0
- package/out/phone/assets/{ganttDiagram-EL5Y4UJY-DaScS1os.js → ganttDiagram-EL5Y4UJY-Bfx_3wSL.js} +1 -1
- package/out/phone/assets/{gitGraph-4MIJSDKK-C-FzqpZm.js → gitGraph-4MIJSDKK-BByrtu13.js} +1 -1
- package/out/phone/assets/{gitGraphDiagram-WWUBYQGX-4Yv-hAwf.js → gitGraphDiagram-WWUBYQGX-DX-_HrkV.js} +1 -1
- package/out/phone/assets/{info-A6RAGUB7-CGLEP4t7.js → info-A6RAGUB7-B9AtEuqS.js} +1 -1
- package/out/phone/assets/{infoDiagram-27XIBGKW-DapEgYQa.js → infoDiagram-27XIBGKW-BlTJ4y54.js} +1 -1
- package/out/phone/assets/{ishikawaDiagram-5VMMS53U-D1B2lZSG.js → ishikawaDiagram-5VMMS53U-W8zt5UiH.js} +1 -1
- package/out/phone/assets/{journeyDiagram-3NMN7TZE-BSAtMVJw.js → journeyDiagram-3NMN7TZE-ClJSjx26.js} +1 -1
- package/out/phone/assets/{kanban-definition-UXKFOSKX-CfZ4oI7A.js → kanban-definition-UXKFOSKX-BPyXsdoL.js} +1 -1
- package/out/phone/assets/{line-DAXmUM4p.js → line-DMsvqHhd.js} +1 -1
- package/out/phone/assets/{main-B0yD1pMI.js → main-QdYtohlX.js} +4 -4
- package/out/phone/assets/{mermaid-parser.core-IObm7oM0.js → mermaid-parser.core-BteiwAAk.js} +3 -3
- package/out/phone/assets/{mermaid.core-C1wA-mhD.js → mermaid.core-BLIwkLpP.js} +4 -4
- package/out/phone/assets/{mindmap-definition-YA3MSWOX-3ph0EaB9.js → mindmap-definition-YA3MSWOX-CtvOuG70.js} +1 -1
- package/out/phone/assets/{packet-AYTQ26CC-BbDAe9Au.js → packet-AYTQ26CC-D9BlJkYf.js} +1 -1
- package/out/phone/assets/{pegDiagram-XKGWAZYB-EsuDcX_3.js → pegDiagram-XKGWAZYB-BCIWH2f6.js} +1 -1
- package/out/phone/assets/{pie-WAS4IAKB-BQfIj1fu.js → pie-WAS4IAKB-no-EBGVU.js} +1 -1
- package/out/phone/assets/{pieDiagram-E7YTZNPT-Cw19z5Ip.js → pieDiagram-E7YTZNPT-CSjCYWAz.js} +1 -1
- package/out/phone/assets/{quadrantDiagram-AXDQQJYC-Bqwz_sa8.js → quadrantDiagram-AXDQQJYC-Bh1Jh1q-.js} +1 -1
- package/out/phone/assets/{radar-RG4KPBEZ-Dmp-89iD.js → radar-RG4KPBEZ-BVweBCte.js} +1 -1
- package/out/phone/assets/{railroad-74A4TZTK-dq2H8w8Y.js → railroad-74A4TZTK-kUK_6AdA.js} +1 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-Df9jtRyX.js +1 -0
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-vjjsvYjl.js +1 -0
- package/out/phone/assets/railroad-peg-WCYAUIDC-DrKQG8aR.js +1 -0
- package/out/phone/assets/{railroadDiagram-O6MQD6OU-D2Sbc7Wn.js → railroadDiagram-O6MQD6OU-DDKZuEH9.js} +1 -1
- package/out/phone/assets/{requirementDiagram-BXWQKSXE-CLNUqxbl.js → requirementDiagram-BXWQKSXE-BAdrpp8Z.js} +1 -1
- package/out/phone/assets/{sankeyDiagram-P5KCCOFB-Dme5iwcw.js → sankeyDiagram-P5KCCOFB-Dm0dmnQJ.js} +1 -1
- package/out/phone/assets/{sequenceDiagram-WJ2MYXX4-C5dYSwPE.js → sequenceDiagram-WJ2MYXX4-DtN1lgR9.js} +1 -1
- package/out/phone/assets/{stateDiagram-D77RDMKH-BuxkPvJ6.js → stateDiagram-D77RDMKH-m5U6QGoM.js} +1 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-g06bNGjI.js +1 -0
- package/out/phone/assets/{swimlanes-42K2YHIH-DHyXnytv.js → swimlanes-42K2YHIH-jWtOgaZK.js} +1 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-CwlfCnnJ.js +8 -0
- package/out/phone/assets/{timeline-definition-24CTP7MA-Bm8Z0u2Z.js → timeline-definition-24CTP7MA-CncsPQSQ.js} +1 -1
- package/out/phone/assets/{treeView-Q6P3EWNA-DFUxvDDO.js → treeView-Q6P3EWNA-BNIDY5fM.js} +1 -1
- package/out/phone/assets/{treemap-WGGIJYW6-CMC-hwzt.js → treemap-WGGIJYW6-FkDWRKqS.js} +1 -1
- package/out/phone/assets/{vennDiagram-4TSXK5OY-CNL4gZsd.js → vennDiagram-4TSXK5OY-CeyTscuj.js} +1 -1
- package/out/phone/assets/{wardley-WFR3VGLG-CHQoq9KJ.js → wardley-WFR3VGLG-CEuN_S8l.js} +1 -1
- package/out/phone/assets/{wardleyDiagram-VM6X3IG4-DAuBfK1O.js → wardleyDiagram-VM6X3IG4-DE3tgI7J.js} +1 -1
- package/out/phone/assets/{xychartDiagram-S5SC5T6Z-B2T9ECKd.js → xychartDiagram-S5SC5T6Z-Di64LYy0.js} +1 -1
- package/out/phone/desk.html +1 -1
- package/out/phone/index.html +1 -1
- package/out/renderer/assets/{abnfDiagram-VCTEODGH-gdhrQbX6.js → abnfDiagram-VCTEODGH-B7uu_Gw1.js} +1 -1
- package/out/renderer/assets/{arc-D6-Q4l2d.js → arc-CkW2-Pr7.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-5GKGNRK7-C4y0SbLT.js → architectureDiagram-5GKGNRK7-2E0AYPn5.js} +1 -1
- package/out/renderer/assets/{blockDiagram-I7D4REHJ-DrsoSFRK.js → blockDiagram-I7D4REHJ-BsSmBeco.js} +1 -1
- package/out/renderer/assets/{c4Diagram-7LVT6UL2-1DD8BlM8.js → c4Diagram-7LVT6UL2-gzVW5Xek.js} +1 -1
- package/out/renderer/assets/channel-AuDXnH14.js +1 -0
- package/out/renderer/assets/{chunk-2Q5K7J3B-DRyc0B7g.js → chunk-2Q5K7J3B-K_IlhZEX.js} +1 -1
- package/out/renderer/assets/{chunk-5VM5RSS4-BJe8SghE.js → chunk-5VM5RSS4-r65AjBn5.js} +1 -1
- package/out/renderer/assets/{chunk-F27PBJKO-BIipq4SK.js → chunk-F27PBJKO-CZszqKBI.js} +1 -1
- package/out/renderer/assets/{chunk-IMKFNOWR-D5Ak3Xd9.js → chunk-IMKFNOWR-7mYCkNCZ.js} +1 -1
- package/out/renderer/assets/{chunk-JWPE2WC7-BcaWCpW-.js → chunk-JWPE2WC7-B-cBpNJA.js} +1 -1
- package/out/renderer/assets/{chunk-POPQ4Y6H-C1TwLrrN.js → chunk-POPQ4Y6H-CjWY4_mJ.js} +1 -1
- package/out/renderer/assets/{chunk-SVP7TREG-DDOXG_t3.js → chunk-SVP7TREG-g5p-RdlH.js} +1 -1
- package/out/renderer/assets/{chunk-TICWLB2K-BqT15hZi.js → chunk-TICWLB2K-BMr5sD7G.js} +1 -1
- package/out/renderer/assets/{chunk-XXDRQBXY-D01ts6SC.js → chunk-XXDRQBXY-CNfQgYe3.js} +1 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-D8JIsdAI.js +1 -0
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-D8JIsdAI.js +1 -0
- package/out/renderer/assets/{cose-bilkent-JH36ORCC-C7NVrT2_.js → cose-bilkent-JH36ORCC-ByPl0yeB.js} +1 -1
- package/out/renderer/assets/{cynefin-OW5HDTMX-2LxdFmSk.js → cynefin-OW5HDTMX-CMTgEepT.js} +1 -1
- package/out/renderer/assets/{cynefinDiagram-5FMLGOSQ-_AN_Mulc.js → cynefinDiagram-5FMLGOSQ-DYx_JMNT.js} +1 -1
- package/out/renderer/assets/{cytoscape-fcose-COZkZZmX.js → cytoscape-fcose-BcbfusAa.js} +1 -1
- package/out/renderer/assets/{dagre-GXQ25YYZ-BUTwlM6j.js → dagre-GXQ25YYZ-p-Meu2Lo.js} +1 -1
- package/out/renderer/assets/{diagram-S7CK7UJ4-CseZZ-y2.js → diagram-S7CK7UJ4-1m9BA3xi.js} +1 -1
- package/out/renderer/assets/{diagram-UQ7AKVKN-Cb7llS-8.js → diagram-UQ7AKVKN-Cg3zgAxc.js} +1 -1
- package/out/renderer/assets/{diagram-VSXAHHWV-CtuGqQvp.js → diagram-VSXAHHWV-B58Hl37z.js} +1 -1
- package/out/renderer/assets/{diagram-VX7I27RA-BA8eov-1.js → diagram-VX7I27RA-C7dhzeqr.js} +1 -1
- package/out/renderer/assets/{diagram-Z3DM3KII-VZOjj6Hg.js → diagram-Z3DM3KII-C-Bn7OHR.js} +1 -1
- package/out/renderer/assets/{ebnfDiagram-PWID7BFC-YBIrle6d.js → ebnfDiagram-PWID7BFC-BcrVBxSI.js} +1 -1
- package/out/renderer/assets/{erDiagram-RLTQ6QDP-BiKyPEqW.js → erDiagram-RLTQ6QDP-CZHJHTxr.js} +1 -1
- package/out/renderer/assets/{flowDiagram-HODETNUW-7wmZyLHw.js → flowDiagram-HODETNUW-oCdJ784z.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-EL5Y4UJY-D4j4GJaT.js → ganttDiagram-EL5Y4UJY-C9TlTohh.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-WWUBYQGX-BqveM1NI.js → gitGraphDiagram-WWUBYQGX-RVFZsGPP.js} +1 -1
- package/out/renderer/assets/{globals-C9M_MZZV.js → globals-BJ2xID1e.js} +136 -136
- package/out/renderer/assets/{index-BzSTiwH2.js → index-CHNrHypo.js} +1 -1
- package/out/renderer/assets/{infoDiagram-27XIBGKW-DLPLnIFP.js → infoDiagram-27XIBGKW-CxE810pn.js} +1 -1
- package/out/renderer/assets/{ishikawaDiagram-5VMMS53U-48drIAMR.js → ishikawaDiagram-5VMMS53U-Osr2JJcF.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-3NMN7TZE-vjigqUq_.js → journeyDiagram-3NMN7TZE-Bigxb8hB.js} +1 -1
- package/out/renderer/assets/{kanban-definition-UXKFOSKX-CpsYVONZ.js → kanban-definition-UXKFOSKX-DVP3FCG8.js} +1 -1
- package/out/renderer/assets/{layout-DqfoORoO.js → layout-Dn80hFs0.js} +1 -1
- package/out/renderer/assets/{linear-CJzBBHcp.js → linear-B4dfTk2J.js} +1 -1
- package/out/renderer/assets/{mermaid.core-DdrGP-Hn.js → mermaid.core-uI5XQTV1.js} +5 -5
- package/out/renderer/assets/{mindmap-definition-YA3MSWOX-D68tLNxp.js → mindmap-definition-YA3MSWOX-BD7FdpQU.js} +1 -1
- package/out/renderer/assets/{pegDiagram-XKGWAZYB-DkgLTcrv.js → pegDiagram-XKGWAZYB-DU5iHhXs.js} +1 -1
- package/out/renderer/assets/{pieDiagram-E7YTZNPT-bz5NuX1w.js → pieDiagram-E7YTZNPT-DpEVmuWZ.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-AXDQQJYC-o_VKLyJA.js → quadrantDiagram-AXDQQJYC-CcEfCONf.js} +1 -1
- package/out/renderer/assets/{railroadDiagram-O6MQD6OU-Dkf03e07.js → railroadDiagram-O6MQD6OU-BWnKKcat.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-BXWQKSXE-CBUz_3YU.js → requirementDiagram-BXWQKSXE-B7sPFe0g.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-P5KCCOFB-B0pjUr9g.js → sankeyDiagram-P5KCCOFB-ClwzZmCX.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-WJ2MYXX4-ClugIL0e.js → sequenceDiagram-WJ2MYXX4-Dn8StCfr.js} +1 -1
- package/out/renderer/assets/{settings-DvhrDn2q.js → settings-CUBQyINw.js} +18 -18
- package/out/renderer/assets/{sizeCapture-INFHLROL-D6y0rctc.js → sizeCapture-INFHLROL-Csrj-WKZ.js} +1 -1
- package/out/renderer/assets/{stateDiagram-D77RDMKH-DiftQepS.js → stateDiagram-D77RDMKH-CuJq0aAV.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-CXFPvfab.js +1 -0
- package/out/renderer/assets/{swimlanes-42K2YHIH-DhuTjCNj.js → swimlanes-42K2YHIH-CjyTBmUr.js} +1 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-D83-vEQi.js +8 -0
- package/out/renderer/assets/{timeline-definition-24CTP7MA-CrXqgptd.js → timeline-definition-24CTP7MA-BSTk1WRZ.js} +1 -1
- package/out/renderer/assets/{vennDiagram-4TSXK5OY-CDm8SO8U.js → vennDiagram-4TSXK5OY-oO2Udqo9.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-VM6X3IG4-CxyunHwQ.js → wardleyDiagram-VM6X3IG4-C27UPHbe.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-S5SC5T6Z-CvC5YMSy.js → xychartDiagram-S5SC5T6Z-_SQkHfU0.js} +1 -1
- package/out/renderer/index.html +2 -2
- package/out/renderer/settings.html +3 -3
- package/out/renderer/web-preload.js +1 -1
- package/out/server/agent.js +5 -4
- package/out/server/chunks/{agent-_G_O-Cpa.js → agent-BlAuVqNp.js} +4 -2
- package/out/server/chunks/{gpuBackendInstall-Cb6TFh_8.js → gpuBackendInstall-C-ypqydV.js} +4 -4
- package/out/server/chunks/{loadProvider-Be9Lu1Oi.js → loadProvider-CQUR_oho.js} +2 -2
- package/out/server/chunks/{manifest-CB63GQ-i.js → manifest-CojWIAHB.js} +2 -2
- package/out/server/chunks/{workflowPresets-Djlp5LPV.js → workflowPresets-DQ3QX6Ju.js} +25 -12
- package/out/server/index.js +283 -39
- package/out/server/plugin-host.js +33 -3
- package/package.json +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-DFA8x3QF.js +0 -1
- package/out/phone/assets/channel-BBjWfdZr.js +0 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CXXjdIIU.js +0 -1
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CXXjdIIU.js +0 -1
- package/out/phone/assets/eventmodeling-NTZA5JFV-D4a6gbOs.js +0 -1
- package/out/phone/assets/flowDiagram-HODETNUW-BBTtB5oX.js +0 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-DddVaVQM.js +0 -1
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-BjvyqMjh.js +0 -1
- package/out/phone/assets/railroad-peg-WCYAUIDC-lBl4CV1_.js +0 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-Exd8xDBD.js +0 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-B62_42fO.js +0 -8
- package/out/renderer/assets/channel-Sck-tAAK.js +0 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-DnB4QNNe.js +0 -1
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-DnB4QNNe.js +0 -1
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-DxB2-9tl.js +0 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-CYDUqExO.js +0 -8
package/out/server/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import fs, { readFileSync, mkdirSync, chmodSync, existsSync, writeFileSync, appendFileSync, realpathSync, statSync, renameSync, rmSync, copyFileSync, readdirSync, unlinkSync, mkdtempSync, createReadStream, openSync, readSync, closeSync, watch, lstatSync, fstatSync, writeSync,
|
|
2
|
+
import fs, { readFileSync, mkdirSync, chmodSync, existsSync, writeFileSync, appendFileSync, realpathSync, statSync, renameSync, rmSync, copyFileSync, readdirSync, unlinkSync, mkdtempSync, createReadStream, openSync, readSync, closeSync, watch, lstatSync, fstatSync, writeSync, accessSync, constants as constants$2, rmdirSync } from "node:fs";
|
|
3
3
|
import { createServer, isIP, createConnection } from "node:net";
|
|
4
4
|
import path, { join, resolve, dirname, basename as basename$1, relative, isAbsolute, sep, extname } from "node:path";
|
|
5
5
|
import { fork, execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
6
6
|
import { createDecipheriv, randomBytes, createCipheriv, randomUUID, createHash, timingSafeEqual as timingSafeEqual$1, verify, createPublicKey } from "node:crypto";
|
|
7
7
|
import { EventEmitter } from "node:events";
|
|
8
8
|
import os, { homedir, tmpdir, userInfo } from "node:os";
|
|
9
|
-
import { R as parseWebSearchChain, T as APPROVAL_MODES$1, U as THINKING_LEVELS, t as isSameChildSessionIdentity, V as parseChildConversationMetadata, H as isClassifierOnlyProvider, I as isOauthAccountPool, W as eligibleOauthPoolAccountKeys, j as isCodexAccountKey, X as normalizeSshTimeoutSeconds, Y as CLAUDE_HOOK_EVENTS, Z as isReservedAgentTypeName, _ as BUILTIN_AGENT_TYPES, $ as isPluginEntry, a0 as PLUGIN_HOST_APIS, Q as pluginToolName, a1 as PLUGIN_INJECT_MAX_CHARS, a2 as parsePluginInjectImages, a3 as isHostPluginEvent, a4 as parsePluginToolName, a5 as initialInterceptState, m as isChildInterceptEvent, a6 as CHILD_INTERCEPT_TOTAL_TIMEOUT_MS, a7 as INTERCEPT_TOTAL_TIMEOUT_MS, a8 as CHILD_INTERCEPT_TIMEOUT_MS, a9 as INTERCEPT_TIMEOUT_MS, aa as applyInterceptResult, ab as failClosedResult, ac as OBSERVE_TIMEOUT_MS, ad as BEFORE_COMPACT_TIMEOUT_MS, ae as PLUGIN_PROGRESS_MAX_CHARS, af as MCP_TRANSPORTS, N as PRIVACY_MASK_ENTRY, ag as parsePrivacyMaskRecord, ah as hasProviderCredentials, g as MODEL_REASONING_OVERRIDES, h as MODEL_THINKING_LEVEL_OVERRIDES, ai as parseAgentWorkerEvent, aj as parseWindowsLocalShell, J as resolveEditMode, u as resolveCompactStrategy, ak as parseSmartCompactMode, al as resolveImageGenerationConfig, am as normalizeMaxActiveCoworkers, an as normalizeAutoRetryLimit, ao as parsePrivacyMaskSettings, ap as parseDisabledWorkflowPresets, b as parseApprovalAllowThreshold, aq as DEFAULT_APPROVAL_ALLOW_THRESHOLD, ar as visibleMemberAgentTypes, O as parseAgentCommand, as as buildAgentTypeRegistrySnapshot, at as resolveShellLimits, e as parseProviderHeaders, au as DEFAULT_PRESET_ID, av as AGENT_WAIT_DEFAULT_MS, aw as AGENT_WAIT_MAX_MS, l as isUuid, ax as isDeliveryId, F as splitPlanPrefix, p as parseChildSessionIdentity, ay as LOCAL_IMAGE_SCHEME, az as REMOTE_FETCH_HOST, aA as BOT_AVATAR_HOST, aB as PLUGIN_ASSET_HOST, aC as mediaExtension, aD as localImageUrlToPath, aE as isMediaPath, aF as isVideoPath, aG as IMAGE_EXTENSIONS$1, aH as parseCreateConversationAuthorityRequest, aI as parseConversationAuthorityRequest, aJ as parseUpdateConversationSelectionRequest, aK as parseTitleSummaryInput, aL as parseParentSourceBindingRequest, aM as parseParentModelSelectionRequest, aN as parseAgentDispatchRequest, aO as isApprovalDecision, aP as cleanToolBatchLabel, aQ as toolBatchLabelPrompt, aR as TOOL_BATCH_LABEL_SYSTEM_PROMPT, aS as SHELL_LIMITS, K as EMPTY_PLAN_STATE, aT as TITLE_SUMMARY_MAX_CANDIDATES, aU as parseCreateProjectAuthorityRequest, aV as parseSelectProjectAuthorityRequest, aW as parseRemoveProjectAuthorityRequest, aX as withVersionSegment, aY as DEFAULT_BASE_URLS, M as MODEL_API_KINDS } from "./chunks/agent-
|
|
10
|
-
import { bF as isMediaId, bG as isVirtualRef, bH as findVirtualModel, a0 as takeSnapshotTail, bI as syncAccountProviders, bJ as expandOauthCatalog, bK as supportsMultipleAccounts, bL as parseCodexAuthJson, bM as CODEX_PROVIDER_ID, bN as nextAccountKey, bO as sanitizeUpstreamBody, bq as installCodexLinkedRefresh, bP as defaultCodexAuthPath, bj as ANTIGRAVITY_PROVIDER_ID, bk as antigravityProviderConfig, bl as DEVIN_PROVIDER_ID, bm as devinProviderConfig, bn as QODER_PROVIDER_ID, bo as qoderProviderConfig, bp as QODER_CN_PROVIDER_ID, as as providerIdOfAccountKey, bQ as ordinalOfAccountKey, $ as ensureAccountProvider, bR as sanitizeOauthLabel, bS as parseAntigravityApiKey, bT as fetchAntigravityUsage, bU as fetchDevinUsage, bV as DEFAULT_PERSONA_PROMPT, A as AGENT_WORKER_CRASH_FILE, bW as parseAgentWorkerCrash, aY as appendCappedLog, bX as AGENT_WORKER_EXIT_LOG, b5 as WORKSPACE_WRITE_TOOL_ID, aa as ELEVATE_TIMEOUT_MS, s as shellQuote, ab as ELEVATE_UNAVAILABLE_MARKER, a9 as ELEVATE_TIMED_OUT_MARKER, a8 as ELEVATE_DECLINED_MARKER, bY as elevatedCommandOf, br as isHeadlessRun, bZ as startOauthCallbackServer, U as mcpOAuthFingerprint, T as MCP_OAUTH_REFRESH_SKEW_MS, F as readModelsDevCache, b_ as MODELS_DEV_URL, b$ as writeModelsDevCache, c0 as parseModelsDevPayload, c1 as MODELS_DEV_CACHE_NAME, c2 as modelsDevIsFresh, H as parseModelDirectorySnapshot, c3 as withModelsDevOauthModels, a6 as ELEVATE_ASKPASS_ENV, c4 as describeAgentWorkerExit, a4 as childProfileShell, c5 as directMemberRef, c6 as materializeProviders, p as providerKeyFor, c7 as parseVirtualModels, V as VIRTUAL_PROVIDER_ID, c8 as classifierProviderFor, c9 as classifierBaseUrlFor, ca as childProfileToolIds, cb as pickModelCapabilityOverrides, cc as canBeVirtualMember, cd as mcpTimeoutsForSpawn, aV as parseJsonFromAssistant, aW as validateAgainstSchema, ay as HUMAN_REQUEST_TIMEOUT_MS, ce as withPrivacyMask, cf as withUserEntryIds, _ as projectMessage, cg as UNIT_TYPES, ch as DEDUP_MIN_CHARS, ci as DEFAULT_IMPORTANCE, cj as DEFAULT_UNIT_TYPE, ck as isEvolvesRelation, cl as DEDUP_MAX, cm as DEDUP_VECTOR, cn as CRYSTAL_MIN_SOURCES, co as DISTILL_MAX_OUTPUT_TOKENS, cp as DISTILL_MIN_IMPORTANCE, cq as DISTILL_MAX_CHUNK_CHARS, cr as DISTILL_SINGLE_EXTRACT_MAX_TOKENS, cs as DISTILL_EXTRACT_MAX_TOKENS, ct as DISTILL_CONSOLIDATE_MAX_TOKENS, cu as isUnitType, cv as DISTILL_MAX_ATTEMPTS, cw as KG_MAX_LABEL_CHARS, cx as KG_MAX_ENTITY_NAME_CHARS, cy as KG_MAX_DESCRIPTION_CHARS, cz as KG_MAX_ENTITIES, cA as KG_MAX_RELATIONS, cB as KG_EXTRACT_MAX_TOKENS, cC as KG_DEFAULT_RELATION_TYPE, cD as KG_DEFAULT_ENTITY_TYPE, cE as KG_MAX_ATTEMPTS, cF as MIN_FLOOR, cG as IMP_MULT, cH as RECENCY_W, cI as FREQUENCY_W, cJ as FREQUENCY_MAX_COUNT, cK as HALF_LIFE_DAYS, cL as RRF_K, cM as DECAY_WEIGHT, cN as TEMPORAL_YEAR_BOOST, cO as CRYSTAL_BOOST, cP as MMR_LAMBDA, cQ as parseMemorySearchRequest, cR as parseMemoryCaptureRequest, cS as parseMemoryCrystallizeRequest, cT as parseMemoryDeleteRequest, cU as SNAPSHOT_TAIL_MESSAGES, bd as splitUnattendedPrefix, cV as userTextWithoutSkills, cW as resolveSshTarget, cX as checkPassed, cY as checkFailureText, ai as SEND_IMAGE_CAPTION_MAX, cZ as parseVirtualClassifier, c_ as VIRTUAL_CLASSIFIER_DEFAULT_TIMEOUT_MS, b0 as buildInitialTitleUserText, b2 as TITLE_SYSTEM_PROMPT, aU as buildTurnDigest, b1 as ROLLING_TITLE_SYSTEM_PROMPT, a$ as buildRollingTitleUserText, bc as titleSummaryTimeoutMs, b3 as extractTitle, b4 as titleRejectReason, ak as sendImageItems, c$ as isSecretFilePath, d0 as isUnderSecretDirectory, aH as createComputerTool, aO as ComputerInvoker, d1 as codemodeToolSnapshot, aK as createTaskTools, aF as createMemoryTools, aM as MemoryInvoker, b8 as createWebTools, aD as createBrowserTools, aB as createUnifiedSubagentTool, aL as BrowserInvoker, aQ as createAskTool, aP as AskManager, bb as createSubmitPlanTool, b9 as createTodoTool, g as estimateSkillTokens, h as estimateInstructionTokens, d2 as estimateToolsTotal, bi as createProjectSettingsManager, be as resolveHarnessSkillRoots, S as assignMcpToolNames, aJ as listWorkflowPresets, aC as workflowPresetRoots, d3 as listCustomWorkflowPresets, d4 as listBuiltinWorkflowPresets, d5 as readCustomWorkflowPreset, d6 as parseWorkflowPresetDraft, d7 as saveCustomWorkflowPreset, d8 as deleteCustomWorkflowPreset, au as createSshExecutor, d9 as isHumanRequestTimeout, da as buildSshExecArgs, db as buildRemoteCommand, bD as sshPasswordEnv, dc as listProjectCodeSources, dd as positiveFiniteNumber, Y as isXaiChatModelId, de as mergeFetchedOauthModels, K as mergeCatalogEntry, I as findCatalogModelById, J as findModelsDevModel, df as supportedProjectThinkingLevels, dg as buildSshPtyArgs, bC as resolveSshControlPath, G as version$1, dh as ENSO_HEADLESS_RUN_ENV } from "./chunks/workflowPresets-
|
|
9
|
+
import { R as parseWebSearchChain, T as APPROVAL_MODES$1, U as THINKING_LEVELS, t as isSameChildSessionIdentity, V as parseChildConversationMetadata, H as isClassifierOnlyProvider, I as isOauthAccountPool, W as eligibleOauthPoolAccountKeys, j as isCodexAccountKey, X as normalizeSshTimeoutSeconds, Y as CLAUDE_HOOK_EVENTS, Z as isReservedAgentTypeName, _ as BUILTIN_AGENT_TYPES, $ as isPluginEntry, a0 as PLUGIN_HOST_APIS, Q as pluginToolName, a1 as PLUGIN_INJECT_MAX_CHARS, a2 as parsePluginInjectImages, a3 as isHostPluginEvent, a4 as parsePluginToolName, a5 as initialInterceptState, m as isChildInterceptEvent, a6 as CHILD_INTERCEPT_TOTAL_TIMEOUT_MS, a7 as INTERCEPT_TOTAL_TIMEOUT_MS, a8 as CHILD_INTERCEPT_TIMEOUT_MS, a9 as INTERCEPT_TIMEOUT_MS, aa as applyInterceptResult, ab as failClosedResult, ac as OBSERVE_TIMEOUT_MS, ad as BEFORE_COMPACT_TIMEOUT_MS, ae as PLUGIN_PROGRESS_MAX_CHARS, af as MCP_TRANSPORTS, N as PRIVACY_MASK_ENTRY, ag as parsePrivacyMaskRecord, ah as hasProviderCredentials, g as MODEL_REASONING_OVERRIDES, h as MODEL_THINKING_LEVEL_OVERRIDES, ai as parseAgentWorkerEvent, aj as parseWindowsLocalShell, J as resolveEditMode, u as resolveCompactStrategy, ak as parseSmartCompactMode, al as resolveImageGenerationConfig, am as normalizeMaxActiveCoworkers, an as normalizeAutoRetryLimit, ao as parsePrivacyMaskSettings, ap as parseDisabledWorkflowPresets, b as parseApprovalAllowThreshold, aq as DEFAULT_APPROVAL_ALLOW_THRESHOLD, ar as visibleMemberAgentTypes, O as parseAgentCommand, as as buildAgentTypeRegistrySnapshot, at as resolveShellLimits, e as parseProviderHeaders, au as DEFAULT_PRESET_ID, av as AGENT_WAIT_DEFAULT_MS, aw as AGENT_WAIT_MAX_MS, l as isUuid, ax as isDeliveryId, F as splitPlanPrefix, p as parseChildSessionIdentity, ay as LOCAL_IMAGE_SCHEME, az as REMOTE_FETCH_HOST, aA as BOT_AVATAR_HOST, aB as PLUGIN_ASSET_HOST, aC as mediaExtension, aD as localImageUrlToPath, aE as isMediaPath, aF as isVideoPath, aG as IMAGE_EXTENSIONS$1, aH as parseCreateConversationAuthorityRequest, aI as parseConversationAuthorityRequest, aJ as parseUpdateConversationSelectionRequest, aK as parseTitleSummaryInput, aL as parseParentSourceBindingRequest, aM as parseParentModelSelectionRequest, aN as parseAgentDispatchRequest, aO as isApprovalDecision, S as STALE_SESSION_ERROR, aP as cleanToolBatchLabel, aQ as toolBatchLabelPrompt, aR as TOOL_BATCH_LABEL_SYSTEM_PROMPT, aS as SHELL_LIMITS, K as EMPTY_PLAN_STATE, aT as TITLE_SUMMARY_MAX_CANDIDATES, aU as parseCreateProjectAuthorityRequest, aV as parseSelectProjectAuthorityRequest, aW as parseRemoveProjectAuthorityRequest, aX as withVersionSegment, aY as DEFAULT_BASE_URLS, M as MODEL_API_KINDS } from "./chunks/agent-BlAuVqNp.js";
|
|
10
|
+
import { bF as isMediaId, bG as isVirtualRef, bH as findVirtualModel, a0 as takeSnapshotTail, bI as syncAccountProviders, bJ as expandOauthCatalog, bK as supportsMultipleAccounts, bL as parseCodexAuthJson, bM as CODEX_PROVIDER_ID, bN as nextAccountKey, bO as sanitizeUpstreamBody, bq as installCodexLinkedRefresh, bP as defaultCodexAuthPath, bj as ANTIGRAVITY_PROVIDER_ID, bk as antigravityProviderConfig, bl as DEVIN_PROVIDER_ID, bm as devinProviderConfig, bn as QODER_PROVIDER_ID, bo as qoderProviderConfig, bp as QODER_CN_PROVIDER_ID, as as providerIdOfAccountKey, bQ as ordinalOfAccountKey, $ as ensureAccountProvider, bR as sanitizeOauthLabel, bS as parseAntigravityApiKey, bT as fetchAntigravityUsage, bU as fetchDevinUsage, bV as DEFAULT_PERSONA_PROMPT, A as AGENT_WORKER_CRASH_FILE, bW as parseAgentWorkerCrash, aY as appendCappedLog, bX as AGENT_WORKER_EXIT_LOG, b5 as WORKSPACE_WRITE_TOOL_ID, aa as ELEVATE_TIMEOUT_MS, s as shellQuote, ab as ELEVATE_UNAVAILABLE_MARKER, a9 as ELEVATE_TIMED_OUT_MARKER, a8 as ELEVATE_DECLINED_MARKER, bY as elevatedCommandOf, br as isHeadlessRun, bZ as startOauthCallbackServer, U as mcpOAuthFingerprint, T as MCP_OAUTH_REFRESH_SKEW_MS, F as readModelsDevCache, b_ as MODELS_DEV_URL, b$ as writeModelsDevCache, c0 as parseModelsDevPayload, c1 as MODELS_DEV_CACHE_NAME, c2 as modelsDevIsFresh, H as parseModelDirectorySnapshot, c3 as withModelsDevOauthModels, a6 as ELEVATE_ASKPASS_ENV, c4 as describeAgentWorkerExit, a4 as childProfileShell, c5 as directMemberRef, c6 as materializeProviders, p as providerKeyFor, c7 as parseVirtualModels, V as VIRTUAL_PROVIDER_ID, c8 as classifierProviderFor, c9 as classifierBaseUrlFor, ca as childProfileToolIds, cb as pickModelCapabilityOverrides, cc as canBeVirtualMember, cd as mcpTimeoutsForSpawn, aV as parseJsonFromAssistant, aW as validateAgainstSchema, ay as HUMAN_REQUEST_TIMEOUT_MS, ce as withPrivacyMask, cf as withUserEntryIds, _ as projectMessage, cg as UNIT_TYPES, ch as DEDUP_MIN_CHARS, ci as DEFAULT_IMPORTANCE, cj as DEFAULT_UNIT_TYPE, ck as isEvolvesRelation, cl as DEDUP_MAX, cm as DEDUP_VECTOR, cn as CRYSTAL_MIN_SOURCES, co as DISTILL_MAX_OUTPUT_TOKENS, cp as DISTILL_MIN_IMPORTANCE, cq as DISTILL_MAX_CHUNK_CHARS, cr as DISTILL_SINGLE_EXTRACT_MAX_TOKENS, cs as DISTILL_EXTRACT_MAX_TOKENS, ct as DISTILL_CONSOLIDATE_MAX_TOKENS, cu as isUnitType, cv as DISTILL_MAX_ATTEMPTS, cw as KG_MAX_LABEL_CHARS, cx as KG_MAX_ENTITY_NAME_CHARS, cy as KG_MAX_DESCRIPTION_CHARS, cz as KG_MAX_ENTITIES, cA as KG_MAX_RELATIONS, cB as KG_EXTRACT_MAX_TOKENS, cC as KG_DEFAULT_RELATION_TYPE, cD as KG_DEFAULT_ENTITY_TYPE, cE as KG_MAX_ATTEMPTS, cF as MIN_FLOOR, cG as IMP_MULT, cH as RECENCY_W, cI as FREQUENCY_W, cJ as FREQUENCY_MAX_COUNT, cK as HALF_LIFE_DAYS, cL as RRF_K, cM as DECAY_WEIGHT, cN as TEMPORAL_YEAR_BOOST, cO as CRYSTAL_BOOST, cP as MMR_LAMBDA, cQ as parseMemorySearchRequest, cR as parseMemoryCaptureRequest, cS as parseMemoryCrystallizeRequest, cT as parseMemoryDeleteRequest, cU as SNAPSHOT_TAIL_MESSAGES, bd as splitUnattendedPrefix, cV as userTextWithoutSkills, cW as resolveSshTarget, cX as checkPassed, cY as checkFailureText, ai as SEND_IMAGE_CAPTION_MAX, cZ as parseVirtualClassifier, c_ as VIRTUAL_CLASSIFIER_DEFAULT_TIMEOUT_MS, b0 as buildInitialTitleUserText, b2 as TITLE_SYSTEM_PROMPT, aU as buildTurnDigest, b1 as ROLLING_TITLE_SYSTEM_PROMPT, a$ as buildRollingTitleUserText, bc as titleSummaryTimeoutMs, b3 as extractTitle, b4 as titleRejectReason, ak as sendImageItems, c$ as isSecretFilePath, d0 as isUnderSecretDirectory, aH as createComputerTool, aO as ComputerInvoker, d1 as codemodeToolSnapshot, aK as createTaskTools, aF as createMemoryTools, aM as MemoryInvoker, b8 as createWebTools, aD as createBrowserTools, aB as createUnifiedSubagentTool, aL as BrowserInvoker, aQ as createAskTool, aP as AskManager, bb as createSubmitPlanTool, b9 as createTodoTool, g as estimateSkillTokens, h as estimateInstructionTokens, d2 as estimateToolsTotal, bi as createProjectSettingsManager, be as resolveHarnessSkillRoots, S as assignMcpToolNames, aJ as listWorkflowPresets, aC as workflowPresetRoots, d3 as listCustomWorkflowPresets, d4 as listBuiltinWorkflowPresets, d5 as readCustomWorkflowPreset, d6 as parseWorkflowPresetDraft, d7 as saveCustomWorkflowPreset, d8 as deleteCustomWorkflowPreset, au as createSshExecutor, d9 as isHumanRequestTimeout, da as buildSshExecArgs, db as buildRemoteCommand, bD as sshPasswordEnv, dc as listProjectCodeSources, dd as positiveFiniteNumber, Y as isXaiChatModelId, de as mergeFetchedOauthModels, K as mergeCatalogEntry, I as findCatalogModelById, J as findModelsDevModel, df as supportedProjectThinkingLevels, dg as buildSshPtyArgs, bC as resolveSshControlPath, G as version$1, dh as ENSO_HEADLESS_RUN_ENV } from "./chunks/workflowPresets-DQ3QX6Ju.js";
|
|
11
11
|
import { readFile, rm, open, writeFile, stat, realpath, lstat, mkdir, symlink, readdir, copyFile, readlink, appendFile, rename, chmod, mkdtemp, rmdir, statfs } from "node:fs/promises";
|
|
12
12
|
import nacl from "tweetnacl";
|
|
13
13
|
import { promisify, TextDecoder as TextDecoder$1 } from "node:util";
|
|
14
14
|
import { parse as parse$2 } from "yaml";
|
|
15
|
-
import { i as isPluginId, a as isNewerPluginVersion, b as isPluginRelativePath, e as enginesAllow, M as MAX_TOOL_TIMEOUT_MS, p as parseStatusPatch, c as parseExtensionPluginManifest, m as mergeStatusItems } from "./chunks/manifest-
|
|
15
|
+
import { i as isPluginId, a as isNewerPluginVersion, b as isPluginRelativePath, e as enginesAllow, M as MAX_TOOL_TIMEOUT_MS, p as parseStatusPatch, c as parseExtensionPluginManifest, m as mergeStatusItems } from "./chunks/manifest-CojWIAHB.js";
|
|
16
16
|
import { inflateRawSync, gunzipSync, deflateRawSync, crc32, gzipSync } from "node:zlib";
|
|
17
17
|
import { stepUpScope, authorizeMcp, discoverOAuthServerInfo, refreshAuthorization, selectResource, OAuthError } from "@earendil-works/pi-mcp/oauth";
|
|
18
18
|
import { sessionEntryToContextMessages, loadSkills, DefaultPackageManager, SessionManager } from "@earendil-works/pi-coding-agent";
|
|
@@ -495,6 +495,9 @@ const IPC_CHANNELS = {
|
|
|
495
495
|
UPDATER_TAKE_INTERRUPTED_SESSIONS: "updater:takeInterruptedSessions",
|
|
496
496
|
// 网络代理
|
|
497
497
|
PROXY_APPLY: "proxy:apply",
|
|
498
|
+
// 自定义 CA 证书(NODE_EXTRA_CA_CERTS)
|
|
499
|
+
CA_CERT_STATUS: "ca-cert:status",
|
|
500
|
+
CA_CERT_APPLY: "ca-cert:apply",
|
|
498
501
|
// userData/user.css:读取、首次写模板并用系统程序打开、文件变化广播
|
|
499
502
|
APPEARANCE_USER_CSS_GET: "appearance:user-css:get",
|
|
500
503
|
APPEARANCE_USER_CSS_OPEN: "appearance:user-css:open",
|
|
@@ -2709,6 +2712,8 @@ class AgentDispatchService {
|
|
|
2709
2712
|
...typeof persisted.approvalMode === "string" ? { approvalMode: persisted.approvalMode } : {},
|
|
2710
2713
|
...persisted.autoRejectApprovals === true ? { autoRejectApprovals: true } : {}
|
|
2711
2714
|
};
|
|
2715
|
+
if (this.options.sessionIndex.isCurrent(parent))
|
|
2716
|
+
this.options.sessionIndex.prepareParent(parent);
|
|
2712
2717
|
const spawned = this.options.host.spawnParent(parent, request2, credentialKeys);
|
|
2713
2718
|
if (!spawned.ok) throw new Error(spawned.error ?? "Failed to spawn parent container.");
|
|
2714
2719
|
const ready = await this.waitForParent(parent);
|
|
@@ -3383,6 +3388,18 @@ const zhTranslations = {
|
|
|
3383
3388
|
"Custom proxy": "自定义代理",
|
|
3384
3389
|
"Proxy URL": "代理地址",
|
|
3385
3390
|
"Enter an http(s) proxy URL": "请输入 http(s) 代理地址",
|
|
3391
|
+
"Custom CA certificate": "自定义 CA 证书",
|
|
3392
|
+
"Trust an extra CA (PEM file) for model endpoints signed by a private CA. TLS verification stays on.": "为私有 CA 签发的模型接口额外信任一个 CA(PEM 文件),TLS 校验保持开启。",
|
|
3393
|
+
"Choose certificate file": "选择证书文件",
|
|
3394
|
+
"Set: {{path}}": "已设置:{{path}}",
|
|
3395
|
+
"Using NODE_EXTRA_CA_CERTS from the launch environment: {{path}}": "已使用启动环境中的 NODE_EXTRA_CA_CERTS(优先于此设置):{{path}}",
|
|
3396
|
+
"Not set; using NODE_EXTRA_CA_CERTS from the login shell: {{path}}": "未设置,使用登录 shell 中的 NODE_EXTRA_CA_CERTS:{{path}}",
|
|
3397
|
+
"Certificate file unavailable ({{reason}}): {{path}}": "证书文件不可用({{reason}}):{{path}}",
|
|
3398
|
+
"Path must be absolute": "须为绝对路径",
|
|
3399
|
+
"File not found": "文件不存在",
|
|
3400
|
+
"Not a file": "不是文件",
|
|
3401
|
+
"File is not readable": "文件不可读",
|
|
3402
|
+
"Changes restart the agent process right away (running turns are interrupted). Requests made by the app main process take effect after restarting the app.": "修改后会立即重启 Agent 进程(进行中的回合会中断);主进程侧需重启应用生效。",
|
|
3386
3403
|
Shortcuts: "快捷键",
|
|
3387
3404
|
"Click a shortcut to rebind it. Backspace removes it; Esc cancels.": "点击键位改绑。Backspace 删除;Esc 取消。",
|
|
3388
3405
|
"Remove shortcut": "删除快捷键",
|
|
@@ -8421,7 +8438,7 @@ function getRuntime() {
|
|
|
8421
8438
|
runtime.registerProvider(DEVIN_PROVIDER_ID, devinProviderConfig());
|
|
8422
8439
|
runtime.registerProvider(QODER_PROVIDER_ID, qoderProviderConfig("global"));
|
|
8423
8440
|
runtime.registerProvider(QODER_CN_PROVIDER_ID, qoderProviderConfig("cn"));
|
|
8424
|
-
const { CURSOR_PROVIDER_ID, loadCursorProvider } = await import("./chunks/loadProvider-
|
|
8441
|
+
const { CURSOR_PROVIDER_ID, loadCursorProvider } = await import("./chunks/loadProvider-CQUR_oho.js").then((n) => n.d);
|
|
8425
8442
|
onlineCatalogProviderIds.add(CURSOR_PROVIDER_ID);
|
|
8426
8443
|
await loadCursorProvider(runtime);
|
|
8427
8444
|
installCodexLinkedRefresh(runtime);
|
|
@@ -9548,6 +9565,7 @@ const SETTINGS_STATE_FIELDS = [
|
|
|
9548
9565
|
"pluginAutoUpdate",
|
|
9549
9566
|
"proxyMode",
|
|
9550
9567
|
"customProxyUrl",
|
|
9568
|
+
"customCaCertPath",
|
|
9551
9569
|
"openChangesOnFileEdit",
|
|
9552
9570
|
"fileOpenRules",
|
|
9553
9571
|
"contextMenuOpen",
|
|
@@ -9670,6 +9688,7 @@ const CONFIG_SYNC_EXCLUDED_STATE_FIELDS = /* @__PURE__ */ new Set([
|
|
|
9670
9688
|
"pluginAutoUpdate",
|
|
9671
9689
|
"proxyMode",
|
|
9672
9690
|
"customProxyUrl",
|
|
9691
|
+
"customCaCertPath",
|
|
9673
9692
|
"sshTimeoutSeconds",
|
|
9674
9693
|
"backgroundImageEnabled",
|
|
9675
9694
|
"backgroundSourceType",
|
|
@@ -11066,6 +11085,10 @@ class PluginProcess {
|
|
|
11066
11085
|
this.closed = true;
|
|
11067
11086
|
this.beginStop();
|
|
11068
11087
|
}
|
|
11088
|
+
/** 只推给活着的进程;不拉起、不影响空闲计时 */
|
|
11089
|
+
notifyTurnEnd(sessionId) {
|
|
11090
|
+
if (this.child && !this.stopping) this.post({ t: "session-turn-end", sessionId });
|
|
11091
|
+
}
|
|
11069
11092
|
/** 先发 shutdown,最多等 3 秒再 kill;再过 5 秒仍无 exit 则 SIGKILL 并结束等待 */
|
|
11070
11093
|
beginStop() {
|
|
11071
11094
|
this.clearIdle();
|
|
@@ -12133,6 +12156,36 @@ class PluginHostGate {
|
|
|
12133
12156
|
invocations;
|
|
12134
12157
|
injects = /* @__PURE__ */ new Map();
|
|
12135
12158
|
viewEvents = /* @__PURE__ */ new Map();
|
|
12159
|
+
/** 插件被调用或注入过的主会话(新的在后);常驻进程没有发起会话,回合结束按它们判定同项目 */
|
|
12160
|
+
anchors = /* @__PURE__ */ new Map();
|
|
12161
|
+
noteSession(pluginId, sessionId) {
|
|
12162
|
+
const root = sessionId.split("::")[0];
|
|
12163
|
+
const list2 = (this.anchors.get(pluginId) ?? []).filter((id) => id !== root);
|
|
12164
|
+
list2.push(root);
|
|
12165
|
+
this.anchors.set(pluginId, list2.slice(-32));
|
|
12166
|
+
}
|
|
12167
|
+
forgetSession(sessionId) {
|
|
12168
|
+
for (const [pluginId, list2] of this.anchors) {
|
|
12169
|
+
const next = list2.filter((id) => id !== sessionId);
|
|
12170
|
+
if (next.length > 0) this.anchors.set(pluginId, next);
|
|
12171
|
+
else this.anchors.delete(pluginId);
|
|
12172
|
+
}
|
|
12173
|
+
}
|
|
12174
|
+
forgetPlugin(pluginId) {
|
|
12175
|
+
this.anchors.delete(pluginId);
|
|
12176
|
+
}
|
|
12177
|
+
/** 回合结束推送的可见性:readAll 看所有项目;session.read 只看与插件用过的会话同项目的 */
|
|
12178
|
+
canSeeSession(pluginId, sessionId) {
|
|
12179
|
+
const manifest = this.deps.manifest(pluginId);
|
|
12180
|
+
const sessions2 = this.deps.sessions;
|
|
12181
|
+
if (!manifest || !sessions2) return false;
|
|
12182
|
+
if (manifest.permissions.includes("session.readAll") && (sessions2.listAll?.() ?? []).some((s) => s.id === sessionId))
|
|
12183
|
+
return true;
|
|
12184
|
+
if (!manifest.permissions.includes("session.read")) return false;
|
|
12185
|
+
return (this.anchors.get(pluginId) ?? []).some(
|
|
12186
|
+
(anchor) => anchor === sessionId || sessions2.list(anchor).some((s) => s.id === sessionId)
|
|
12187
|
+
);
|
|
12188
|
+
}
|
|
12136
12189
|
/** 每个插件 10 秒内最多注入 5 条,防止失控的常驻插件撑爆会话上下文 */
|
|
12137
12190
|
admitInject(pluginId) {
|
|
12138
12191
|
const now = this.deps.now();
|
|
@@ -12380,6 +12433,7 @@ class PluginHostGate {
|
|
|
12380
12433
|
}
|
|
12381
12434
|
}
|
|
12382
12435
|
if (!result.ok) throw pluginError("INJECT_FAILED", result.error);
|
|
12436
|
+
this.noteSession(pluginId, sessionId);
|
|
12383
12437
|
return null;
|
|
12384
12438
|
}
|
|
12385
12439
|
case "session.abort": {
|
|
@@ -12485,6 +12539,10 @@ class PluginHostGate {
|
|
|
12485
12539
|
if (!visible) throw pluginError("NOT_FOUND", "没有这个会话");
|
|
12486
12540
|
return sessions2.status(target);
|
|
12487
12541
|
}
|
|
12542
|
+
case "session.watchTurnEnd":
|
|
12543
|
+
permitRead();
|
|
12544
|
+
if (typeof a.on !== "boolean") throw pluginError("INVALID_ARGS", "on 必须是布尔值");
|
|
12545
|
+
return a.on;
|
|
12488
12546
|
case "session.focus": {
|
|
12489
12547
|
permit("session.focus");
|
|
12490
12548
|
const inv = gestured("切换会话");
|
|
@@ -13600,6 +13658,8 @@ class ExtensionPluginService {
|
|
|
13600
13658
|
idTails = /* @__PURE__ */ new Map();
|
|
13601
13659
|
observeLanes = /* @__PURE__ */ new Map();
|
|
13602
13660
|
processes = /* @__PURE__ */ new Map();
|
|
13661
|
+
/** 调过 session.watchTurnEnd 的进程;按进程实例记,换了进程就不再投递 */
|
|
13662
|
+
turnEndWatchers = /* @__PURE__ */ new Map();
|
|
13603
13663
|
staged = /* @__PURE__ */ new Map();
|
|
13604
13664
|
crashes = /* @__PURE__ */ new Map();
|
|
13605
13665
|
/** 进程内最近一条错误日志;崩溃停用时写进登记 */
|
|
@@ -13929,8 +13989,10 @@ class ExtensionPluginService {
|
|
|
13929
13989
|
}
|
|
13930
13990
|
async setEnabled(id, enabled2) {
|
|
13931
13991
|
return this.withIdLock(id, async () => {
|
|
13932
|
-
if (!enabled2)
|
|
13933
|
-
|
|
13992
|
+
if (!enabled2) {
|
|
13993
|
+
this.stopProcess(id);
|
|
13994
|
+
this.gate.forgetPlugin(id);
|
|
13995
|
+
} else {
|
|
13934
13996
|
this.recentErrors.delete(id);
|
|
13935
13997
|
this.prepareFailed.delete(id);
|
|
13936
13998
|
}
|
|
@@ -14045,6 +14107,7 @@ class ExtensionPluginService {
|
|
|
14045
14107
|
this.records = this.records.filter((r) => r.id !== id);
|
|
14046
14108
|
this.persist();
|
|
14047
14109
|
this.stopProcess(id);
|
|
14110
|
+
this.gate.forgetPlugin(id);
|
|
14048
14111
|
this.removeLocalFiles(id);
|
|
14049
14112
|
await this.logger.discard(id);
|
|
14050
14113
|
rmSync(this.logPath(id), { force: true });
|
|
@@ -14540,6 +14603,17 @@ class ExtensionPluginService {
|
|
|
14540
14603
|
targets.filter((entry) => this.canDeliverObserve(entry.id)).map((entry) => send2(entry.id))
|
|
14541
14604
|
);
|
|
14542
14605
|
}
|
|
14606
|
+
/** 主会话一轮结束;只推给订阅了且看得见这个会话的进程 */
|
|
14607
|
+
notifyTurnEnd(sessionId) {
|
|
14608
|
+
for (const [id, proc] of this.turnEndWatchers) {
|
|
14609
|
+
if (this.processes.get(id) !== proc || !this.gate.canSeeSession(id, sessionId)) continue;
|
|
14610
|
+
proc.notifyTurnEnd(sessionId);
|
|
14611
|
+
}
|
|
14612
|
+
}
|
|
14613
|
+
/** 会话删除:插件不再据它判定可见范围 */
|
|
14614
|
+
forgetSession(sessionId) {
|
|
14615
|
+
this.gate.forgetSession(sessionId);
|
|
14616
|
+
}
|
|
14543
14617
|
async intercept(input) {
|
|
14544
14618
|
const initial = initialInterceptState(input.event, input.payload);
|
|
14545
14619
|
const child = input.agent !== void 0;
|
|
@@ -14903,6 +14977,7 @@ class ExtensionPluginService {
|
|
|
14903
14977
|
if (signal?.aborted) throw pluginError("ABORTED", "调用已取消");
|
|
14904
14978
|
const proc = this.processFor(pluginId);
|
|
14905
14979
|
const spawn2 = proc.ready();
|
|
14980
|
+
if (ctx.sessionId) this.gate.noteSession(pluginId, ctx.sessionId);
|
|
14906
14981
|
const invocationId = this.gate.invocations.create({
|
|
14907
14982
|
pluginId,
|
|
14908
14983
|
sessionId: ctx.sessionId,
|
|
@@ -14972,9 +15047,18 @@ class ExtensionPluginService {
|
|
|
14972
15047
|
main: manifest.main ?? "",
|
|
14973
15048
|
dataDir: dataDir2
|
|
14974
15049
|
},
|
|
14975
|
-
handleHostCall: (api, args, invocationId) =>
|
|
15050
|
+
handleHostCall: async (api, args, invocationId) => {
|
|
15051
|
+
const value = await this.gate.handle(manifest.id, api, args, invocationId);
|
|
15052
|
+
if (api !== "session.watchTurnEnd") return value;
|
|
15053
|
+
if (value === true) this.turnEndWatchers.set(manifest.id, proc);
|
|
15054
|
+
else if (this.turnEndWatchers.get(manifest.id) === proc)
|
|
15055
|
+
this.turnEndWatchers.delete(manifest.id);
|
|
15056
|
+
return null;
|
|
15057
|
+
},
|
|
14976
15058
|
onExit: ({ unexpected }) => {
|
|
14977
15059
|
if (unexpected) this.appendLog(manifest.id, "warn", "插件进程意外退出");
|
|
15060
|
+
if (this.turnEndWatchers.get(manifest.id) === proc)
|
|
15061
|
+
this.turnEndWatchers.delete(manifest.id);
|
|
14978
15062
|
if (this.processes.get(manifest.id) === proc && this.dynamic.clear(manifest.id))
|
|
14979
15063
|
this.touch();
|
|
14980
15064
|
onExit(unexpected);
|
|
@@ -15024,6 +15108,7 @@ class ExtensionPluginService {
|
|
|
15024
15108
|
this.gate.invocations.cancelPlugin(id);
|
|
15025
15109
|
this.processes.get(id)?.stop();
|
|
15026
15110
|
this.processes.delete(id);
|
|
15111
|
+
this.turnEndWatchers.delete(id);
|
|
15027
15112
|
if (this.dynamic.clear(id)) this.touch();
|
|
15028
15113
|
}
|
|
15029
15114
|
/** 从表里拿掉后一直等到进程退出。stop 只是开始优雅退出,最长约 3 秒。 */
|
|
@@ -15577,7 +15662,8 @@ const ENV_ALLOWLIST = [
|
|
|
15577
15662
|
"http_proxy",
|
|
15578
15663
|
"https_proxy",
|
|
15579
15664
|
"all_proxy",
|
|
15580
|
-
"no_proxy"
|
|
15665
|
+
"no_proxy",
|
|
15666
|
+
"NODE_EXTRA_CA_CERTS"
|
|
15581
15667
|
];
|
|
15582
15668
|
function pluginHostEnv(source) {
|
|
15583
15669
|
const env = {};
|
|
@@ -15595,6 +15681,9 @@ function setPluginMcpBridge(bridge) {
|
|
|
15595
15681
|
mcpBridge = bridge;
|
|
15596
15682
|
}
|
|
15597
15683
|
const noMcp = () => Promise.reject(pluginError("UNSUPPORTED", "当前环境无法调用 MCP"));
|
|
15684
|
+
function peekExtensionPlugins() {
|
|
15685
|
+
return service$2;
|
|
15686
|
+
}
|
|
15598
15687
|
function getExtensionPlugins() {
|
|
15599
15688
|
if (service$2) return service$2;
|
|
15600
15689
|
const capabilities = pluginHostCapabilities({
|
|
@@ -17282,6 +17371,14 @@ function stopAgentWorker() {
|
|
|
17282
17371
|
function agentWorkerAlive() {
|
|
17283
17372
|
return worker !== null;
|
|
17284
17373
|
}
|
|
17374
|
+
async function restartAgentWorker(timeoutMs = 5e3) {
|
|
17375
|
+
const child = worker;
|
|
17376
|
+
if (!child) return false;
|
|
17377
|
+
await killAndWaitExit(child, timeoutMs);
|
|
17378
|
+
if (worker === child) stopAgentWorker();
|
|
17379
|
+
if (!worker) startAgentWorker();
|
|
17380
|
+
return true;
|
|
17381
|
+
}
|
|
17285
17382
|
function stopAgentWorkerForQuit(timeoutMs) {
|
|
17286
17383
|
const child = worker;
|
|
17287
17384
|
if (!child) return Promise.resolve();
|
|
@@ -18821,6 +18918,7 @@ const agentHost = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
18821
18918
|
resolveWebSearchConfig,
|
|
18822
18919
|
respondApproval,
|
|
18823
18920
|
respondAsk,
|
|
18921
|
+
restartAgentWorker,
|
|
18824
18922
|
resumeCoworkerSession,
|
|
18825
18923
|
retrySession,
|
|
18826
18924
|
rewindSession,
|
|
@@ -20663,7 +20761,7 @@ async function loadLlama() {
|
|
|
20663
20761
|
llamaPromise ??= (async () => {
|
|
20664
20762
|
let backendError;
|
|
20665
20763
|
try {
|
|
20666
|
-
const { ensureGpuBackend } = await import("./chunks/gpuBackendInstall-
|
|
20764
|
+
const { ensureGpuBackend } = await import("./chunks/gpuBackendInstall-C-ypqydV.js");
|
|
20667
20765
|
await ensureGpuBackend().catch((err) => {
|
|
20668
20766
|
backendError = err;
|
|
20669
20767
|
console.warn("[llama] GPU backend unavailable, using CPU:", err);
|
|
@@ -21194,6 +21292,10 @@ const rootOf$1 = (sessionId) => {
|
|
|
21194
21292
|
const sep2 = sessionId.indexOf("::");
|
|
21195
21293
|
return sep2 === -1 ? sessionId : sessionId.slice(0, sep2);
|
|
21196
21294
|
};
|
|
21295
|
+
function turnEndSessionId(event) {
|
|
21296
|
+
if (event.type !== "turn-completed" && event.type !== "turn-failed") return null;
|
|
21297
|
+
return "parent" in event.identity ? null : event.identity.sessionId;
|
|
21298
|
+
}
|
|
21197
21299
|
class SessionStateTracker {
|
|
21198
21300
|
nodes = /* @__PURE__ */ new Map();
|
|
21199
21301
|
reported = /* @__PURE__ */ new Map();
|
|
@@ -25685,7 +25787,7 @@ async function readSessionTranscript(sessionFile) {
|
|
|
25685
25787
|
const resolved = path.resolve(sessionFile);
|
|
25686
25788
|
if (!resolved.startsWith(`${root}${path.sep}`)) return [];
|
|
25687
25789
|
const [{ SessionManager: SessionManager2, sessionEntryToContextMessages: sessionEntryToContextMessages2 }, { projectMessage: projectMessage2 }] = await Promise.all(
|
|
25688
|
-
[import("@earendil-works/pi-coding-agent"), import("./chunks/workflowPresets-
|
|
25790
|
+
[import("@earendil-works/pi-coding-agent"), import("./chunks/workflowPresets-DQ3QX6Ju.js").then((n) => n.di)]
|
|
25689
25791
|
);
|
|
25690
25792
|
const branch = SessionManager2.open(resolved, sessionDir2).getBranch();
|
|
25691
25793
|
const out = [];
|
|
@@ -46016,7 +46118,10 @@ class AgentSessionIndex {
|
|
|
46016
46118
|
}
|
|
46017
46119
|
prepareParent(identity) {
|
|
46018
46120
|
const current2 = this.sessions.get(identity.sessionId);
|
|
46019
|
-
if (current2 && isSameGeneration(current2.identity, identity))
|
|
46121
|
+
if (current2 && isSameGeneration(current2.identity, identity)) {
|
|
46122
|
+
current2.detached = false;
|
|
46123
|
+
return;
|
|
46124
|
+
}
|
|
46020
46125
|
this.releaseParentReservations(identity.sessionId);
|
|
46021
46126
|
this.sessions.set(identity.sessionId, {
|
|
46022
46127
|
identity,
|
|
@@ -46079,6 +46184,11 @@ class AgentSessionIndex {
|
|
|
46079
46184
|
const current2 = this.sessions.get(identity.sessionId);
|
|
46080
46185
|
return Boolean(current2?.ready && current2.alive && isSameGeneration(current2.identity, identity));
|
|
46081
46186
|
}
|
|
46187
|
+
/** 同代会话已从 worker 释放且尚未重新 spawn:prompt/steer 发过去只会被当作过期代次拒绝 */
|
|
46188
|
+
isDetached(identity) {
|
|
46189
|
+
const current2 = this.sessions.get(identity.sessionId);
|
|
46190
|
+
return Boolean(current2?.detached && isSameGeneration(current2.identity, identity));
|
|
46191
|
+
}
|
|
46082
46192
|
childProof(identity) {
|
|
46083
46193
|
const current2 = this.sessions.get(identity.sessionId);
|
|
46084
46194
|
return current2 && isSameGeneration(current2.identity, identity) ? current2.proof : void 0;
|
|
@@ -46208,6 +46318,7 @@ class AgentSessionIndex {
|
|
|
46208
46318
|
for (const session2 of this.sessions.values()) {
|
|
46209
46319
|
session2.alive = false;
|
|
46210
46320
|
session2.ready = false;
|
|
46321
|
+
session2.detached = true;
|
|
46211
46322
|
session2.lastSeq = -1;
|
|
46212
46323
|
}
|
|
46213
46324
|
this.reservations.clear();
|
|
@@ -46251,6 +46362,7 @@ class AgentSessionIndex {
|
|
|
46251
46362
|
parent.started = true;
|
|
46252
46363
|
parent.ready = true;
|
|
46253
46364
|
parent.alive = true;
|
|
46365
|
+
parent.detached = false;
|
|
46254
46366
|
parent.sessionFile = event.sessionFile;
|
|
46255
46367
|
parent.model = event.model;
|
|
46256
46368
|
return true;
|
|
@@ -46265,6 +46377,7 @@ class AgentSessionIndex {
|
|
|
46265
46377
|
if (!current2) return false;
|
|
46266
46378
|
current2.ready = false;
|
|
46267
46379
|
current2.alive = false;
|
|
46380
|
+
current2.detached = true;
|
|
46268
46381
|
current2.status = "failed";
|
|
46269
46382
|
current2.lastSeq = -1;
|
|
46270
46383
|
this.releaseParentReservations(identity.sessionId);
|
|
@@ -49506,6 +49619,13 @@ function broadcastAgentEvent(event) {
|
|
|
49506
49619
|
forwardAgentEvent(event);
|
|
49507
49620
|
handlePairHeadlessAgentEvent(event);
|
|
49508
49621
|
publishPluginSessionStatus(event);
|
|
49622
|
+
publishPluginTurnEnd(event);
|
|
49623
|
+
}
|
|
49624
|
+
function publishPluginTurnEnd(event) {
|
|
49625
|
+
const sessionId = turnEndSessionId(event);
|
|
49626
|
+
if (!sessionId) return;
|
|
49627
|
+
if (sourceAuthority?.conversation(sessionId)?.bot) return;
|
|
49628
|
+
peekExtensionPlugins()?.notifyTurnEnd(sessionId);
|
|
49509
49629
|
}
|
|
49510
49630
|
function publishPluginSessionStatus(event) {
|
|
49511
49631
|
for (const change of pluginSessionStates.observe(event)) {
|
|
@@ -49538,6 +49658,7 @@ const subagentProgressPush = new SubagentProgressPush((sessionId, runs) => {
|
|
|
49538
49658
|
function exactIdentity(sessionId) {
|
|
49539
49659
|
return isNonEmptyString$4(sessionId) ? agentSessionIndex.currentIdentity(sessionId) : void 0;
|
|
49540
49660
|
}
|
|
49661
|
+
const DETACHED_SESSION_ERROR = "会话已从后台释放(闲置回收或重启),请重新发送以恢复会话";
|
|
49541
49662
|
function rootIdentity(sessionId) {
|
|
49542
49663
|
const identity = exactIdentity(sessionId);
|
|
49543
49664
|
return identity && !("parent" in identity) ? identity : void 0;
|
|
@@ -49575,6 +49696,7 @@ function preparePluginsForSpawn() {
|
|
|
49575
49696
|
}
|
|
49576
49697
|
function removeConversationFiles(conversation) {
|
|
49577
49698
|
const project = sourceAuthority?.project(conversation.projectId);
|
|
49699
|
+
peekExtensionPlugins()?.forgetSession(conversation.conversationId);
|
|
49578
49700
|
removeConversationSessionFiles({
|
|
49579
49701
|
sessionDir: path.join(app.getPath("userData"), "agent", "sessions"),
|
|
49580
49702
|
conversationId: conversation.conversationId,
|
|
@@ -50452,6 +50574,16 @@ function registerAgentHandlers() {
|
|
|
50452
50574
|
);
|
|
50453
50575
|
sourceBindings?.invalidateBindingsForConversation(workerEvent.identity.sessionId);
|
|
50454
50576
|
}
|
|
50577
|
+
if (workerEvent.type === "parent-rejected" && !workerEvent.reason.startsWith(STALE_SESSION_ERROR)) {
|
|
50578
|
+
const selection = sourceAuthority?.conversation(workerEvent.identity.sessionId)?.selection;
|
|
50579
|
+
console.warn("[agent] spawn rejected", {
|
|
50580
|
+
sessionId: workerEvent.identity.sessionId,
|
|
50581
|
+
generation: workerEvent.identity.generation,
|
|
50582
|
+
providerId: selection?.providerId,
|
|
50583
|
+
modelId: selection?.modelId,
|
|
50584
|
+
reason: workerEvent.reason
|
|
50585
|
+
});
|
|
50586
|
+
}
|
|
50455
50587
|
if (workerEvent.type === "fork-done") {
|
|
50456
50588
|
const pending2 = pendingWorktreeForks.get(workerEvent.targetConversationId);
|
|
50457
50589
|
if (!pending2 || pending2.identity.sessionId !== workerEvent.identity.sessionId || pending2.identity.generation !== workerEvent.identity.generation)
|
|
@@ -51006,6 +51138,8 @@ function registerAgentHandlers() {
|
|
|
51006
51138
|
if (!identity || !isValidMessageInput(sessionId, text2, images) || deliveryId !== void 0 && !isDeliveryId(deliveryId)) {
|
|
51007
51139
|
return { ok: false, error: "invalid prompt or stale session generation" };
|
|
51008
51140
|
}
|
|
51141
|
+
if (agentSessionIndex.isDetached(identity))
|
|
51142
|
+
return { ok: false, error: DETACHED_SESSION_ERROR };
|
|
51009
51143
|
return promptSession(
|
|
51010
51144
|
identity,
|
|
51011
51145
|
text2,
|
|
@@ -51023,6 +51157,8 @@ function registerAgentHandlers() {
|
|
|
51023
51157
|
if (!identity || !isValidMessageInput(sessionId, text2, images) || deliveryId !== void 0 && !isDeliveryId(deliveryId)) {
|
|
51024
51158
|
return { ok: false, error: "invalid steer or stale session generation" };
|
|
51025
51159
|
}
|
|
51160
|
+
if (agentSessionIndex.isDetached(identity))
|
|
51161
|
+
return { ok: false, error: DETACHED_SESSION_ERROR };
|
|
51026
51162
|
return steerSession(
|
|
51027
51163
|
identity,
|
|
51028
51164
|
text2,
|
|
@@ -52900,6 +53036,102 @@ function registerBtwHandlers() {
|
|
|
52900
53036
|
return { ok: true };
|
|
52901
53037
|
});
|
|
52902
53038
|
}
|
|
53039
|
+
const CA_CERT_ENV = "NODE_EXTRA_CA_CERTS";
|
|
53040
|
+
function checkCaCertFile(path2) {
|
|
53041
|
+
if (!isAbsolute(path2)) return "not-absolute";
|
|
53042
|
+
try {
|
|
53043
|
+
if (!statSync(path2).isFile()) return "not-file";
|
|
53044
|
+
} catch {
|
|
53045
|
+
return "not-found";
|
|
53046
|
+
}
|
|
53047
|
+
try {
|
|
53048
|
+
accessSync(path2, constants$2.R_OK);
|
|
53049
|
+
return null;
|
|
53050
|
+
} catch {
|
|
53051
|
+
return "not-readable";
|
|
53052
|
+
}
|
|
53053
|
+
}
|
|
53054
|
+
function resolveExtraCaCert(input) {
|
|
53055
|
+
const check = input.check ?? checkCaCertFile;
|
|
53056
|
+
const settingPath = input.setting.trim();
|
|
53057
|
+
const inherited = input.inherited?.trim();
|
|
53058
|
+
if (inherited) return { source: "env", path: inherited, settingPath };
|
|
53059
|
+
if (settingPath) {
|
|
53060
|
+
const error = check(settingPath);
|
|
53061
|
+
return error ? { source: "none", path: "", settingPath, error } : { source: "setting", path: settingPath, settingPath };
|
|
53062
|
+
}
|
|
53063
|
+
const shell2 = input.shell?.trim();
|
|
53064
|
+
if (shell2 && !check(shell2)) return { source: "shell", path: shell2, settingPath };
|
|
53065
|
+
return { source: "none", path: "", settingPath };
|
|
53066
|
+
}
|
|
53067
|
+
class CaCertConfig {
|
|
53068
|
+
constructor(env, restartWorker, check = checkCaCertFile) {
|
|
53069
|
+
this.env = env;
|
|
53070
|
+
this.restartWorker = restartWorker;
|
|
53071
|
+
this.check = check;
|
|
53072
|
+
this.inherited = env[CA_CERT_ENV];
|
|
53073
|
+
this.current = this.resolve();
|
|
53074
|
+
}
|
|
53075
|
+
env;
|
|
53076
|
+
restartWorker;
|
|
53077
|
+
check;
|
|
53078
|
+
setting = "";
|
|
53079
|
+
shell;
|
|
53080
|
+
current;
|
|
53081
|
+
inherited;
|
|
53082
|
+
status() {
|
|
53083
|
+
return this.current;
|
|
53084
|
+
}
|
|
53085
|
+
/** 启动早期、fork worker 之前调用 */
|
|
53086
|
+
initFromConfig(setting) {
|
|
53087
|
+
this.setting = typeof setting === "string" ? setting.trim() : "";
|
|
53088
|
+
this.commit();
|
|
53089
|
+
return this.current;
|
|
53090
|
+
}
|
|
53091
|
+
applyShellValue(value) {
|
|
53092
|
+
this.shell = value;
|
|
53093
|
+
this.commit();
|
|
53094
|
+
return this.current;
|
|
53095
|
+
}
|
|
53096
|
+
/** 设置热更新:生效值变化才重启 worker(worker env 是 fork 时的快照) */
|
|
53097
|
+
async setCustomPath(path2) {
|
|
53098
|
+
this.setting = path2.trim();
|
|
53099
|
+
if (this.commit()) await this.restartWorker();
|
|
53100
|
+
return this.current;
|
|
53101
|
+
}
|
|
53102
|
+
resolve() {
|
|
53103
|
+
return resolveExtraCaCert({
|
|
53104
|
+
inherited: this.inherited,
|
|
53105
|
+
setting: this.setting,
|
|
53106
|
+
shell: this.shell,
|
|
53107
|
+
check: this.check
|
|
53108
|
+
});
|
|
53109
|
+
}
|
|
53110
|
+
commit() {
|
|
53111
|
+
const before = this.env[CA_CERT_ENV];
|
|
53112
|
+
this.current = this.resolve();
|
|
53113
|
+
if (this.current.source === "env") return false;
|
|
53114
|
+
if (this.current.path) this.env[CA_CERT_ENV] = this.current.path;
|
|
53115
|
+
else delete this.env[CA_CERT_ENV];
|
|
53116
|
+
return this.env[CA_CERT_ENV] !== before;
|
|
53117
|
+
}
|
|
53118
|
+
}
|
|
53119
|
+
let instance$1 = null;
|
|
53120
|
+
function getCaCertConfig() {
|
|
53121
|
+
instance$1 ??= new CaCertConfig(process.env, restartAgentWorker);
|
|
53122
|
+
return instance$1;
|
|
53123
|
+
}
|
|
53124
|
+
function registerCaCertHandlers() {
|
|
53125
|
+
ipcMain.handle(IPC_CHANNELS.CA_CERT_STATUS, () => getCaCertConfig().status());
|
|
53126
|
+
ipcMain.handle(
|
|
53127
|
+
IPC_CHANNELS.CA_CERT_APPLY,
|
|
53128
|
+
async (_event, raw) => {
|
|
53129
|
+
const config2 = getCaCertConfig();
|
|
53130
|
+
if (typeof raw !== "string") return { ...config2.status(), error: "not-found" };
|
|
53131
|
+
return config2.setCustomPath(raw);
|
|
53132
|
+
}
|
|
53133
|
+
);
|
|
53134
|
+
}
|
|
52903
53135
|
const file = (dir, id) => path.join(dir, `${id}.json`);
|
|
52904
53136
|
function readSnapshots(dir, conversationId) {
|
|
52905
53137
|
if (!isValidId(conversationId)) return {};
|
|
@@ -60300,22 +60532,23 @@ const proxyConfig = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
60300
60532
|
ProxyConfig,
|
|
60301
60533
|
getProxyConfig
|
|
60302
60534
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
60303
|
-
function
|
|
60304
|
-
|
|
60305
|
-
|
|
60306
|
-
|
|
60307
|
-
|
|
60308
|
-
|
|
60309
|
-
|
|
60310
|
-
|
|
60311
|
-
if (
|
|
60312
|
-
|
|
60313
|
-
return { ok: false, error: "invalid proxy url" };
|
|
60314
|
-
}
|
|
60315
|
-
config2.setCustomProxyUrl(input.customUrl);
|
|
60535
|
+
async function applyProxySettings(raw) {
|
|
60536
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
60537
|
+
return { ok: false, error: "invalid proxy settings" };
|
|
60538
|
+
}
|
|
60539
|
+
const input = raw;
|
|
60540
|
+
const config2 = getProxyConfig();
|
|
60541
|
+
config2.setProxyMode(normalizeProxyMode(input.mode));
|
|
60542
|
+
if (typeof input.customUrl === "string") {
|
|
60543
|
+
if (input.customUrl.trim() !== "" && !isValidProxyUrl(input.customUrl)) {
|
|
60544
|
+
return { ok: false, error: "invalid proxy url" };
|
|
60316
60545
|
}
|
|
60317
|
-
|
|
60318
|
-
}
|
|
60546
|
+
config2.setCustomProxyUrl(input.customUrl);
|
|
60547
|
+
}
|
|
60548
|
+
return { ok: await config2.resolveProxy() };
|
|
60549
|
+
}
|
|
60550
|
+
function registerProxyHandlers() {
|
|
60551
|
+
ipcMain.handle(IPC_CHANNELS.PROXY_APPLY, (_event, raw) => applyProxySettings(raw));
|
|
60319
60552
|
}
|
|
60320
60553
|
function projectNameFromPath(path2) {
|
|
60321
60554
|
return path2.split(/[\\/]/).filter(Boolean).pop() ?? path2;
|
|
@@ -61326,6 +61559,7 @@ function registerIpcHandlers() {
|
|
|
61326
61559
|
registerExtensionPluginHandlers();
|
|
61327
61560
|
registerAgentHandlers();
|
|
61328
61561
|
registerProxyHandlers();
|
|
61562
|
+
registerCaCertHandlers();
|
|
61329
61563
|
registerCompactionHandlers();
|
|
61330
61564
|
registerProjectHandlers();
|
|
61331
61565
|
registerSshConnectionHandlers();
|
|
@@ -66205,6 +66439,7 @@ export async function mountMain(activate, options = {}) {
|
|
|
66205
66439
|
const methods = new Map();
|
|
66206
66440
|
const exportsMap = new Map();
|
|
66207
66441
|
const triggers = new Map();
|
|
66442
|
+
const turnEndListeners = new Set();
|
|
66208
66443
|
|
|
66209
66444
|
const call = (api, args) => {
|
|
66210
66445
|
calls.push({ api, args });
|
|
@@ -66255,6 +66490,11 @@ export async function mountMain(activate, options = {}) {
|
|
|
66255
66490
|
status: (...args) => call('session.status', args),
|
|
66256
66491
|
focus: (...args) => call('session.focus', args),
|
|
66257
66492
|
create: (...args) => call('session.create', args),
|
|
66493
|
+
onTurnEnd: (listener) => {
|
|
66494
|
+
const entry = (event) => listener(event);
|
|
66495
|
+
turnEndListeners.add(entry);
|
|
66496
|
+
return () => turnEndListeners.delete(entry);
|
|
66497
|
+
},
|
|
66258
66498
|
},
|
|
66259
66499
|
composer: {
|
|
66260
66500
|
readDraft: (...args) => call('composer.readDraft', args),
|
|
@@ -66286,6 +66526,9 @@ export async function mountMain(activate, options = {}) {
|
|
|
66286
66526
|
fire: (event, data, ctx) => invoke(events, 'event', event, [data, ctxOr(ctx)]),
|
|
66287
66527
|
schedule: (id) => invoke(schedules, 'schedule', id, [ctxOr()]),
|
|
66288
66528
|
method: (name, args, ctx) => invoke(methods, 'method', name, [args, ctxOr(ctx)]),
|
|
66529
|
+
turnEnd: async (sessionId) => {
|
|
66530
|
+
for (const listener of [...turnEndListeners]) await listener({ sessionId });
|
|
66531
|
+
},
|
|
66289
66532
|
};
|
|
66290
66533
|
}
|
|
66291
66534
|
`;
|
|
@@ -67441,6 +67684,18 @@ async function runCommand(argv, ctx) {
|
|
|
67441
67684
|
return false;
|
|
67442
67685
|
}
|
|
67443
67686
|
}
|
|
67687
|
+
function serveControlConnection(socket, handle2) {
|
|
67688
|
+
socket.on("error", () => socket.destroy());
|
|
67689
|
+
const lines = createInterface({ input: socket });
|
|
67690
|
+
lines.on("error", () => {
|
|
67691
|
+
});
|
|
67692
|
+
lines.on("line", (line2) => {
|
|
67693
|
+
void handle2(line2).catch((error) => ({ ok: false, error: String(error) })).then((reply) => {
|
|
67694
|
+
if (socket.writable) socket.end(`${JSON.stringify(reply)}
|
|
67695
|
+
`);
|
|
67696
|
+
});
|
|
67697
|
+
});
|
|
67698
|
+
}
|
|
67444
67699
|
const PLUGIN_ID_ACTIONS = [
|
|
67445
67700
|
"enable",
|
|
67446
67701
|
"disable",
|
|
@@ -67514,18 +67769,6 @@ function parseControlCommand(line2) {
|
|
|
67514
67769
|
if (cmd === "plugin") return parsePluginCommand(parsed);
|
|
67515
67770
|
return { error: "unknown command" };
|
|
67516
67771
|
}
|
|
67517
|
-
function serveControlConnection(socket, handle2) {
|
|
67518
|
-
socket.on("error", () => socket.destroy());
|
|
67519
|
-
const lines = createInterface({ input: socket });
|
|
67520
|
-
lines.on("error", () => {
|
|
67521
|
-
});
|
|
67522
|
-
lines.on("line", (line2) => {
|
|
67523
|
-
void handle2(line2).catch((error) => ({ ok: false, error: String(error) })).then((reply) => {
|
|
67524
|
-
if (socket.writable) socket.end(`${JSON.stringify(reply)}
|
|
67525
|
-
`);
|
|
67526
|
-
});
|
|
67527
|
-
});
|
|
67528
|
-
}
|
|
67529
67772
|
const OUTPUT_FORMATS = ["text", "json", "stream-json"];
|
|
67530
67773
|
const RUN_NETWORK_TOOLS = ["web", "browser", "image_generation"];
|
|
67531
67774
|
const TOOL_ALIASES = {
|
|
@@ -73261,6 +73504,7 @@ async function serve(web) {
|
|
|
73261
73504
|
const persisted = readSettings()?.["enso-settings"];
|
|
73262
73505
|
const state = persisted?.state ?? {};
|
|
73263
73506
|
getProxyConfig().initFromConfig(state.proxyMode, state.customProxyUrl);
|
|
73507
|
+
getCaCertConfig().initFromConfig(state.customCaCertPath);
|
|
73264
73508
|
syncMemoryEmbeddingFromSettings(state);
|
|
73265
73509
|
syncMemoryDistillFromSettings(state);
|
|
73266
73510
|
syncMemoryKgFromSettings(state);
|