@ensocode/server 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/phone/assets/{abnfDiagram-VCTEODGH-2-rZfXru.js → abnfDiagram-VCTEODGH-CBVQuFGg.js} +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-DOA5Bycz.js +1 -0
- package/out/phone/assets/{architectureDiagram-5GKGNRK7-vlXme2Q3.js → architectureDiagram-5GKGNRK7-Uwi4Yp3N.js} +1 -1
- package/out/phone/assets/{blockDiagram-I7D4REHJ-BD1NeeU7.js → blockDiagram-I7D4REHJ-Dee88kBX.js} +1 -1
- package/out/phone/assets/{c4Diagram-7LVT6UL2-BLQd5mqT.js → c4Diagram-7LVT6UL2-CPVctMym.js} +1 -1
- package/out/phone/assets/channel-DKcROQS8.js +1 -0
- package/out/phone/assets/{chunk-4HAMMTFA-CxF_O9R8.js → chunk-4HAMMTFA-DdHZ8tzu.js} +1 -1
- package/out/phone/assets/{chunk-75Z2AOVW-DmshWRC4.js → chunk-75Z2AOVW-CXd1zaQL.js} +1 -1
- package/out/phone/assets/{chunk-DU6HZSFF-CZrdwMNN.js → chunk-DU6HZSFF-K72dP1XP.js} +1 -1
- package/out/phone/assets/{chunk-F27PBJKO-ColBn-9C.js → chunk-F27PBJKO-JZyoOZLJ.js} +1 -1
- package/out/phone/assets/{chunk-GMAD6QVW-CJN3ap1i.js → chunk-GMAD6QVW-O3x_QcGA.js} +1 -1
- package/out/phone/assets/{chunk-GVQU2GXP-h3qKgG9R.js → chunk-GVQU2GXP-g5OZYD2B.js} +1 -1
- package/out/phone/assets/{chunk-IMKFNOWR-CZRKz_sn.js → chunk-IMKFNOWR-r0ScpN_y.js} +1 -1
- package/out/phone/assets/{chunk-L3NEJ4N5-CMO7DEvv.js → chunk-L3NEJ4N5-O-r4RmZJ.js} +1 -1
- package/out/phone/assets/{chunk-OSK3NFVY-C5uece6k.js → chunk-OSK3NFVY-ramCCXI9.js} +1 -1
- package/out/phone/assets/{chunk-P2QGCYS3-WgQBUDEk.js → chunk-P2QGCYS3-DD3uRJ3h.js} +1 -1
- package/out/phone/assets/{chunk-POPQ4Y6H-VHLT_ckM.js → chunk-POPQ4Y6H-RiL5jwG6.js} +1 -1
- package/out/phone/assets/{chunk-PWAF6VOD-AIbXljX0.js → chunk-PWAF6VOD-YKF2LrOr.js} +1 -1
- package/out/phone/assets/{chunk-SHT3W25Y-Bxg4nJYZ.js → chunk-SHT3W25Y-NK2MDUJG.js} +1 -1
- package/out/phone/assets/{chunk-SVP7TREG-C4_nxyeQ.js → chunk-SVP7TREG-7bCZBtZP.js} +1 -1
- package/out/phone/assets/{chunk-TICWLB2K-B5wDGVGC.js → chunk-TICWLB2K-DkVtQtfm.js} +1 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CrpQDbmR.js +1 -0
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CrpQDbmR.js +1 -0
- package/out/phone/assets/{cynefin-OW5HDTMX-IUYlkNoA.js → cynefin-OW5HDTMX-C3bBDDKw.js} +1 -1
- package/out/phone/assets/{cynefinDiagram-5FMLGOSQ-ciimhepC.js → cynefinDiagram-5FMLGOSQ-B1KRMzP2.js} +1 -1
- package/out/phone/assets/{dagre-GXQ25YYZ-Dk3tslas.js → dagre-GXQ25YYZ-NLxwj9wy.js} +1 -1
- package/out/phone/assets/desk-DfeUjqmj.js +2 -0
- package/out/phone/assets/{diagram-S7CK7UJ4-BhDokNwG.js → diagram-S7CK7UJ4-DfcfBkAs.js} +1 -1
- package/out/phone/assets/{diagram-UQ7AKVKN-CciyntsZ.js → diagram-UQ7AKVKN-DCvI1s7K.js} +1 -1
- package/out/phone/assets/{diagram-VSXAHHWV-BG3YhyOX.js → diagram-VSXAHHWV-Bm1zOS5P.js} +1 -1
- package/out/phone/assets/{diagram-VX7I27RA-Wx7x7olQ.js → diagram-VX7I27RA-BQuZufNO.js} +1 -1
- package/out/phone/assets/{diagram-Z3DM3KII-CcI8MVzR.js → diagram-Z3DM3KII-DBIMQQh6.js} +1 -1
- package/out/phone/assets/{ebnfDiagram-PWID7BFC-Cug1-9Ha.js → ebnfDiagram-PWID7BFC-tVvJnbJ2.js} +1 -1
- package/out/phone/assets/{erDiagram-RLTQ6QDP-kjxgMXRS.js → erDiagram-RLTQ6QDP-BSiTfV80.js} +1 -1
- package/out/phone/assets/eventmodeling-NTZA5JFV-DiyOQMrF.js +1 -0
- package/out/phone/assets/flowDiagram-HODETNUW-_UpaA-So.js +1 -0
- package/out/phone/assets/{ganttDiagram-EL5Y4UJY-Ci67p8ni.js → ganttDiagram-EL5Y4UJY-DTQdTWJN.js} +1 -1
- package/out/phone/assets/{gitGraph-4MIJSDKK-Bq5w_SFd.js → gitGraph-4MIJSDKK-DP-rU0q-.js} +1 -1
- package/out/phone/assets/{gitGraphDiagram-WWUBYQGX-6MPAWIQP.js → gitGraphDiagram-WWUBYQGX-v56Bt0O6.js} +1 -1
- package/out/phone/assets/{info-A6RAGUB7-D05oiQx3.js → info-A6RAGUB7-CAQE0Hfy.js} +1 -1
- package/out/phone/assets/{infoDiagram-27XIBGKW-DEMR262W.js → infoDiagram-27XIBGKW-CSXtf5Fo.js} +1 -1
- package/out/phone/assets/{ishikawaDiagram-5VMMS53U-D54EdxMb.js → ishikawaDiagram-5VMMS53U-CclPV6gG.js} +1 -1
- package/out/phone/assets/{journeyDiagram-3NMN7TZE-BIEdfqGB.js → journeyDiagram-3NMN7TZE-BIkpYm1f.js} +1 -1
- package/out/phone/assets/{kanban-definition-UXKFOSKX-Ps-NZDsh.js → kanban-definition-UXKFOSKX-yepY9S2l.js} +1 -1
- package/out/phone/assets/{line-DGUUioP5.js → line-BeTXpSNc.js} +1 -1
- package/out/phone/assets/main-CGpGZfti.css +1 -0
- package/out/phone/assets/main-DW3B3ovc.js +1658 -0
- package/out/phone/assets/{mermaid-parser.core-BkNZLgza.js → mermaid-parser.core-nw37szCl.js} +3 -3
- package/out/phone/assets/{mermaid.core-nEcMItTa.js → mermaid.core-DdSdNZO_.js} +4 -4
- package/out/phone/assets/{mindmap-definition-YA3MSWOX-DZvLJVDS.js → mindmap-definition-YA3MSWOX-CiQWyjG5.js} +1 -1
- package/out/phone/assets/{packet-AYTQ26CC-BORABWaG.js → packet-AYTQ26CC-MFESxWKw.js} +1 -1
- package/out/phone/assets/{pegDiagram-XKGWAZYB-CGyyPNG0.js → pegDiagram-XKGWAZYB-BM9Ofbc8.js} +1 -1
- package/out/phone/assets/{pie-WAS4IAKB-DXKTNLO7.js → pie-WAS4IAKB-BX8j-oF_.js} +1 -1
- package/out/phone/assets/{pieDiagram-E7YTZNPT-BHlAnBZb.js → pieDiagram-E7YTZNPT-1KLqp5sl.js} +1 -1
- package/out/phone/assets/{quadrantDiagram-AXDQQJYC-CYx8zP0Z.js → quadrantDiagram-AXDQQJYC-wqwWQyRe.js} +1 -1
- package/out/phone/assets/{radar-RG4KPBEZ-mYzEXGPZ.js → radar-RG4KPBEZ-jaQ0-Att.js} +1 -1
- package/out/phone/assets/{railroad-74A4TZTK-BpSoFKZI.js → railroad-74A4TZTK-BBOWTcMX.js} +1 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-DfD2cpkN.js +1 -0
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-BAwl_fDM.js +1 -0
- package/out/phone/assets/railroad-peg-WCYAUIDC-MbpAQZum.js +1 -0
- package/out/phone/assets/{railroadDiagram-O6MQD6OU-BAlwhvnj.js → railroadDiagram-O6MQD6OU-DJQ-7iWl.js} +1 -1
- package/out/phone/assets/{requirementDiagram-BXWQKSXE-C2R7ulaS.js → requirementDiagram-BXWQKSXE-D4dveBtm.js} +1 -1
- package/out/phone/assets/{sankeyDiagram-P5KCCOFB-c0sv5hNV.js → sankeyDiagram-P5KCCOFB-Xi3vzQcH.js} +1 -1
- package/out/phone/assets/{sequenceDiagram-WJ2MYXX4-Cz6Zq57N.js → sequenceDiagram-WJ2MYXX4-DJu7wXTv.js} +1 -1
- package/out/phone/assets/{stateDiagram-D77RDMKH-DZhgDUa6.js → stateDiagram-D77RDMKH-BY7kdvUZ.js} +1 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-DDqCllzv.js +1 -0
- package/out/phone/assets/storage-dUWOZ2xo.js +36 -0
- package/out/phone/assets/{swimlanes-42K2YHIH-ByNqwNMl.js → swimlanes-42K2YHIH-CIxzAE5G.js} +1 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-Cu8_tU2m.js +8 -0
- package/out/phone/assets/{timeline-definition-24CTP7MA-CSFOYvnV.js → timeline-definition-24CTP7MA-e-O3IHwG.js} +1 -1
- package/out/phone/assets/{treeView-Q6P3EWNA-CDqEDufz.js → treeView-Q6P3EWNA-Bhtyuzk0.js} +1 -1
- package/out/phone/assets/{treemap-WGGIJYW6-DfjCLTFL.js → treemap-WGGIJYW6-B_tM9CqS.js} +1 -1
- package/out/phone/assets/{vennDiagram-4TSXK5OY-CjV_vvWy.js → vennDiagram-4TSXK5OY-9npu53KS.js} +1 -1
- package/out/phone/assets/{wardley-WFR3VGLG-Df2M8YsO.js → wardley-WFR3VGLG-Dtb3_st-.js} +1 -1
- package/out/phone/assets/{wardleyDiagram-VM6X3IG4-B2bcg9of.js → wardleyDiagram-VM6X3IG4-DCBObiQg.js} +1 -1
- package/out/phone/assets/{xychartDiagram-S5SC5T6Z-Fq1wBYKM.js → xychartDiagram-S5SC5T6Z-BAHqVoN1.js} +1 -1
- package/out/phone/desk.html +2 -2
- package/out/phone/index.html +3 -3
- package/out/renderer/assets/{abnfDiagram-VCTEODGH-DMPmG_xF.js → abnfDiagram-VCTEODGH-ClaZATP-.js} +1 -1
- package/out/renderer/assets/{arc-DjMiWCQZ.js → arc-B0Ue52gX.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-5GKGNRK7-Dy1W4IYD.js → architectureDiagram-5GKGNRK7-CbmNLvfJ.js} +1 -1
- package/out/renderer/assets/{blockDiagram-I7D4REHJ-B8zx5UuN.js → blockDiagram-I7D4REHJ-crBSO4mg.js} +1 -1
- package/out/renderer/assets/{c4Diagram-7LVT6UL2-D7MZ3XeI.js → c4Diagram-7LVT6UL2-BhASES00.js} +1 -1
- package/out/renderer/assets/channel-DAEAroq1.js +1 -0
- package/out/renderer/assets/{chunk-2Q5K7J3B-BEMGeNvl.js → chunk-2Q5K7J3B-CCY1-54C.js} +1 -1
- package/out/renderer/assets/{chunk-5VM5RSS4-CTB_kPAW.js → chunk-5VM5RSS4-MmFztUTQ.js} +1 -1
- package/out/renderer/assets/{chunk-F27PBJKO-CDc0IpL4.js → chunk-F27PBJKO-CemaMYDJ.js} +1 -1
- package/out/renderer/assets/{chunk-IMKFNOWR-5NElfs8W.js → chunk-IMKFNOWR-DctUdkub.js} +1 -1
- package/out/renderer/assets/{chunk-JWPE2WC7-DfZ55eH3.js → chunk-JWPE2WC7-DCjmZlft.js} +1 -1
- package/out/renderer/assets/{chunk-POPQ4Y6H-BK1Mb8zQ.js → chunk-POPQ4Y6H-D-KxWwr4.js} +1 -1
- package/out/renderer/assets/{chunk-SVP7TREG-BTCzRhBg.js → chunk-SVP7TREG-CGc3VMbe.js} +1 -1
- package/out/renderer/assets/{chunk-TICWLB2K-BIdRdQio.js → chunk-TICWLB2K-BwI6l28m.js} +1 -1
- package/out/renderer/assets/{chunk-XXDRQBXY-xdEJ7eED.js → chunk-XXDRQBXY-C3lgg1-4.js} +1 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-BHNNTKj0.js +1 -0
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-BHNNTKj0.js +1 -0
- package/out/renderer/assets/{cose-bilkent-JH36ORCC-Dbeuy5zT.js → cose-bilkent-JH36ORCC-DqGFhKtY.js} +1 -1
- package/out/renderer/assets/{cynefin-OW5HDTMX-DYk68iql.js → cynefin-OW5HDTMX-BpknO3Y_.js} +1 -1
- package/out/renderer/assets/{cynefinDiagram-5FMLGOSQ-CW9N3zhw.js → cynefinDiagram-5FMLGOSQ-DS1vS0h7.js} +1 -1
- package/out/renderer/assets/{cytoscape-fcose-BtmodGyv.js → cytoscape-fcose-DeHY1J1u.js} +1 -1
- package/out/renderer/assets/{dagre-GXQ25YYZ-xTaBduGi.js → dagre-GXQ25YYZ-DxScp9AG.js} +1 -1
- package/out/renderer/assets/{diagram-S7CK7UJ4-Okomm8Ap.js → diagram-S7CK7UJ4-Djlu9ceY.js} +1 -1
- package/out/renderer/assets/{diagram-UQ7AKVKN-CvzlGwuY.js → diagram-UQ7AKVKN-BK3mHHvd.js} +1 -1
- package/out/renderer/assets/{diagram-VSXAHHWV-BJtbgGmH.js → diagram-VSXAHHWV-Bg9tDRjc.js} +1 -1
- package/out/renderer/assets/{diagram-VX7I27RA-vefJMKYp.js → diagram-VX7I27RA-DrWUeEXG.js} +1 -1
- package/out/renderer/assets/{diagram-Z3DM3KII-ChsgoF9h.js → diagram-Z3DM3KII-BxPy8fU9.js} +1 -1
- package/out/renderer/assets/{ebnfDiagram-PWID7BFC-D9X9DUcr.js → ebnfDiagram-PWID7BFC-BWqMH4I8.js} +1 -1
- package/out/renderer/assets/{erDiagram-RLTQ6QDP-C024iQV7.js → erDiagram-RLTQ6QDP-DTdklRgf.js} +1 -1
- package/out/renderer/assets/{flowDiagram-HODETNUW-CPVYCBuI.js → flowDiagram-HODETNUW-BKIZ7ju6.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-EL5Y4UJY-C65Z220Q.js → ganttDiagram-EL5Y4UJY-BxvJsq6b.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-WWUBYQGX-B2ZCfyVT.js → gitGraphDiagram-WWUBYQGX-CKYXaYvq.js} +1 -1
- package/out/renderer/assets/globals-DoK2OLv9.css +1 -0
- package/out/renderer/assets/globals-kfeSrZZh.js +2603 -0
- package/out/renderer/assets/{index-B49rZgqC.css → index-F_0FxVZ_.css} +1 -1
- package/out/renderer/assets/index-oWFcXlIg.js +133 -0
- package/out/renderer/assets/{infoDiagram-27XIBGKW-D7RgOT5Z.js → infoDiagram-27XIBGKW-B79kbTEz.js} +1 -1
- package/out/renderer/assets/{ishikawaDiagram-5VMMS53U-CEyzfHnV.js → ishikawaDiagram-5VMMS53U-7A2txHe5.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-3NMN7TZE-C1GjLzvL.js → journeyDiagram-3NMN7TZE-JNKKQMwS.js} +1 -1
- package/out/renderer/assets/{kanban-definition-UXKFOSKX-umALrvd6.js → kanban-definition-UXKFOSKX-dK6zSfqM.js} +1 -1
- package/out/renderer/assets/{layout-CPiirD-6.js → layout-MfkXYuHA.js} +1 -1
- package/out/renderer/assets/{linear-DeKsEgmD.js → linear-DUiegqFS.js} +1 -1
- package/out/renderer/assets/{mermaid.core-upLR8Tou.js → mermaid.core-Dn6T9UVK.js} +5 -5
- package/out/renderer/assets/{mindmap-definition-YA3MSWOX-CDpc91To.js → mindmap-definition-YA3MSWOX-Du0yA8rg.js} +1 -1
- package/out/renderer/assets/{pegDiagram-XKGWAZYB-ZWCzr3Tm.js → pegDiagram-XKGWAZYB-DaRtM-Te.js} +1 -1
- package/out/renderer/assets/{pieDiagram-E7YTZNPT-Cli5NL_V.js → pieDiagram-E7YTZNPT-Bsf9CqyI.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-AXDQQJYC-DyHSkgko.js → quadrantDiagram-AXDQQJYC-Diojakd2.js} +1 -1
- package/out/renderer/assets/{railroadDiagram-O6MQD6OU-BifUAJjm.js → railroadDiagram-O6MQD6OU-BMREAMLm.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-BXWQKSXE-4vjbe8oI.js → requirementDiagram-BXWQKSXE-KYN9y0mn.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-P5KCCOFB-BDHiusDD.js → sankeyDiagram-P5KCCOFB-BOarV1lP.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-WJ2MYXX4-CfTMNjuO.js → sequenceDiagram-WJ2MYXX4-CLvIIq-e.js} +1 -1
- package/out/renderer/assets/settings-C1ake4C5.js +27 -0
- package/out/renderer/assets/{sizeCapture-INFHLROL-BInsctow.js → sizeCapture-INFHLROL-BZp_C1e1.js} +1 -1
- package/out/renderer/assets/{stateDiagram-D77RDMKH-3R4s4xE6.js → stateDiagram-D77RDMKH-CZYezuvN.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-BZR_zNTR.js +1 -0
- package/out/renderer/assets/{swimlanes-42K2YHIH-CHnfm1qW.js → swimlanes-42K2YHIH-BzLF-RZ8.js} +1 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-CguqA7f1.js +8 -0
- package/out/renderer/assets/{timeline-definition-24CTP7MA-BSOSQ438.js → timeline-definition-24CTP7MA-uG42f1oC.js} +1 -1
- package/out/renderer/assets/{vennDiagram-4TSXK5OY-Bw_mOynV.js → vennDiagram-4TSXK5OY-DTog5Yh9.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-VM6X3IG4-DZF4RS4h.js → wardleyDiagram-VM6X3IG4-BgQ7fmC4.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-S5SC5T6Z-DwVUcf5G.js → xychartDiagram-S5SC5T6Z-BerG1RDT.js} +1 -1
- package/out/renderer/index.html +4 -4
- package/out/renderer/settings.html +4 -4
- package/out/renderer/web-preload.js +51 -1
- package/out/server/agent.js +1831 -355
- package/out/server/chunks/{agent-BlAuVqNp.js → agent-BbLTL3oo.js} +760 -191
- package/out/server/chunks/conversationsMove-CJZfkj55.js +57 -0
- package/out/server/chunks/{gpuBackendInstall-C0fP_8jk.js → gpuBackendInstall-DUOvnlWd.js} +5 -5
- package/out/server/chunks/{loadProvider-1NxA7GHt.js → loadProvider-79AJEjnd.js} +2 -2
- package/out/server/chunks/{manifest-CojWIAHB.js → manifest-DjsZzZuh.js} +63 -6
- package/out/server/chunks/{workflowPresets-COTLnY4e.js → workflowPresets-Di8u79iQ.js} +761 -298
- package/out/server/index.js +56416 -39536
- package/out/server/plugin-host.js +110 -3
- package/package.json +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-yfAdIxfu.js +0 -1
- package/out/phone/assets/channel-D8BkMJGk.js +0 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CIHzXafb.js +0 -1
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CIHzXafb.js +0 -1
- package/out/phone/assets/desk-9dPB4fYu.js +0 -2
- package/out/phone/assets/eventmodeling-NTZA5JFV-CTu3xjKC.js +0 -1
- package/out/phone/assets/flowDiagram-HODETNUW-EMW1nWtZ.js +0 -1
- package/out/phone/assets/main-DYdpq0Gx.css +0 -1
- package/out/phone/assets/main-Do_3fZm7.js +0 -1643
- package/out/phone/assets/railroad-abnf-HS5TGJTU-C8SKwwnT.js +0 -1
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-RhLt9QbJ.js +0 -1
- package/out/phone/assets/railroad-peg-WCYAUIDC-_H7Uu52_.js +0 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-nNiD0itH.js +0 -1
- package/out/phone/assets/storage-p-WxHA1h.js +0 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-Dz8lzRW1.js +0 -8
- package/out/renderer/assets/channel-BCPz1zGb.js +0 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-D5itFA4H.js +0 -1
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-D5itFA4H.js +0 -1
- package/out/renderer/assets/globals-B4auqknW.js +0 -2539
- package/out/renderer/assets/globals-biae1A0_.css +0 -1
- package/out/renderer/assets/index-XLAcGpdw.js +0 -117
- package/out/renderer/assets/settings-B1-ZqHbd.js +0 -34
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-DqJbnbM3.js +0 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-Gz8US82e.js +0 -8
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parse, stringify } from "yaml";
|
|
1
2
|
const APPROVAL_ALLOW_THRESHOLDS = [0.85, 0.9, 0.95];
|
|
2
3
|
const DEFAULT_APPROVAL_ALLOW_THRESHOLD = 0.9;
|
|
3
4
|
function isApprovalAllowThreshold(value) {
|
|
@@ -960,6 +961,47 @@ function parsePluginInjectImages(value) {
|
|
|
960
961
|
return images;
|
|
961
962
|
}
|
|
962
963
|
const PLUGIN_MESSAGE_TYPE = "enso-plugin-message";
|
|
964
|
+
const PLUGIN_AGENT_PROMPT_MAX_CHARS = 64 * 1024;
|
|
965
|
+
const PLUGIN_AGENT_SYSTEM_MAX_CHARS = 32 * 1024;
|
|
966
|
+
const PLUGIN_AGENT_DEFAULT_TIMEOUT_MS = 10 * 6e4;
|
|
967
|
+
const PLUGIN_AGENT_MAX_TIMEOUT_MS = 20 * 6e4;
|
|
968
|
+
const PLUGIN_AGENT_TEXT_MAX_CHARS = 64 * 1024;
|
|
969
|
+
const PLUGIN_AGENT_ARGS_MAX_CHARS = 4096;
|
|
970
|
+
const PLUGIN_AGENT_OUTPUT_MAX_CHARS = 4096;
|
|
971
|
+
const PLUGIN_AGENT_RUN_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
972
|
+
function parsePluginAgentRunEvent(raw) {
|
|
973
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
974
|
+
const v = raw;
|
|
975
|
+
const keys = Object.keys(v);
|
|
976
|
+
const only = (...allowed) => keys.every((key) => allowed.includes(key));
|
|
977
|
+
const short2 = (s, max) => typeof s === "string" && s.length <= max;
|
|
978
|
+
const id = (s) => typeof s === "string" && s.length > 0 && s.length <= 256;
|
|
979
|
+
switch (v.type) {
|
|
980
|
+
case "tool-start":
|
|
981
|
+
return only("type", "id", "name", "args", "parentId") && id(v.id) && id(v.name) && short2(v.args, PLUGIN_AGENT_ARGS_MAX_CHARS) && (v.parentId === void 0 || id(v.parentId)) ? {
|
|
982
|
+
type: "tool-start",
|
|
983
|
+
id: v.id,
|
|
984
|
+
name: v.name,
|
|
985
|
+
args: v.args,
|
|
986
|
+
...v.parentId ? { parentId: v.parentId } : {}
|
|
987
|
+
} : null;
|
|
988
|
+
case "tool-end":
|
|
989
|
+
return only("type", "id", "isError", "output") && id(v.id) && typeof v.isError === "boolean" && (v.output === void 0 || short2(v.output, PLUGIN_AGENT_OUTPUT_MAX_CHARS)) ? {
|
|
990
|
+
type: "tool-end",
|
|
991
|
+
id: v.id,
|
|
992
|
+
isError: v.isError,
|
|
993
|
+
...v.output !== void 0 ? { output: v.output } : {}
|
|
994
|
+
} : null;
|
|
995
|
+
case "text":
|
|
996
|
+
return only("type", "text") && short2(v.text, PLUGIN_AGENT_TEXT_MAX_CHARS) ? { type: "text", text: v.text } : null;
|
|
997
|
+
case "end":
|
|
998
|
+
if (v.ok === true)
|
|
999
|
+
return only("type", "ok", "text", "model") && short2(v.text, PLUGIN_AGENT_TEXT_MAX_CHARS) && (v.model === void 0 || id(v.model)) ? { type: "end", ok: true, text: v.text, ...v.model ? { model: v.model } : {} } : null;
|
|
1000
|
+
return v.ok === false && only("type", "ok", "error", "aborted") && typeof v.error === "string" && v.error.length > 0 && v.error.length <= 4096 && (v.aborted === void 0 || v.aborted === true) ? { type: "end", ok: false, error: v.error, ...v.aborted ? { aborted: true } : {} } : null;
|
|
1001
|
+
default:
|
|
1002
|
+
return null;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
963
1005
|
const PLUGIN_ID = /^[a-z][a-z0-9]*(\.[a-z0-9]+)+$/;
|
|
964
1006
|
function parsePluginMessageSource(raw) {
|
|
965
1007
|
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
@@ -992,6 +1034,7 @@ const PLUGIN_HOST_APIS = [
|
|
|
992
1034
|
"ui.viewEvent",
|
|
993
1035
|
/** 打开右侧栏并创建或定位到本插件的侧栏页面;args { viewId? } */
|
|
994
1036
|
"ui.viewOpen",
|
|
1037
|
+
"ui.viewClose",
|
|
995
1038
|
/** 改清单声明过的输入框底栏状态项;args { id, text?, tooltip?, tone?, visible? } */
|
|
996
1039
|
"ui.statusUpdate",
|
|
997
1040
|
"composer.readDraft",
|
|
@@ -1017,6 +1060,12 @@ const PLUGIN_HOST_APIS = [
|
|
|
1017
1060
|
"contrib.unregister",
|
|
1018
1061
|
/** 宿主能力探测 */
|
|
1019
1062
|
"host.capabilities",
|
|
1063
|
+
/** 秘书联系方式:注册渠道实现;args { channelId, caps } */
|
|
1064
|
+
"contact.register",
|
|
1065
|
+
/** 渠道收到一句话;args { channelId, peerId, text, senderId?, chatType?, chatTitle?, name?, at? } */
|
|
1066
|
+
"contact.inbound",
|
|
1067
|
+
/** 渠道状态;args { channelId, status, detail?, peers? } */
|
|
1068
|
+
"contact.setStatus",
|
|
1020
1069
|
/** 列出会话及其状态;args { scope? }:缺省同项目,'all' 为所有项目(需 session.readAll);返回 { current, sessions } */
|
|
1021
1070
|
"session.list",
|
|
1022
1071
|
/** 会话汇总状态;args { sessionId? } 缺省发起会话,返回 { sessionId, state, pendingAsks, pendingApprovals } */
|
|
@@ -1030,7 +1079,11 @@ const PLUGIN_HOST_APIS = [
|
|
|
1030
1079
|
/** 在发起会话的项目里新建会话并切过去;args { text?, presetId? },presetId 只能填本插件的预设 */
|
|
1031
1080
|
"session.create",
|
|
1032
1081
|
/** 开关本进程的回合结束订阅;args { on },权限同 session.status */
|
|
1033
|
-
"session.watchTurnEnd"
|
|
1082
|
+
"session.watchTurnEnd",
|
|
1083
|
+
/** 用发起会话的模型跑一个只读代理;args { runId, prompt, systemPrompt?, context?, timeoutMs? },进度与结果经 agent-run 推送 */
|
|
1084
|
+
"agent.run",
|
|
1085
|
+
/** 取消本插件发起的代理;args { runId } */
|
|
1086
|
+
"agent.cancel"
|
|
1034
1087
|
];
|
|
1035
1088
|
const PREFIX = "plugin_";
|
|
1036
1089
|
const SEPARATOR = "__";
|
|
@@ -1069,7 +1122,7 @@ function resolvePiProviderBaseUrl(api, baseUrl) {
|
|
|
1069
1122
|
const base = baseUrl.trim().replace(/\/+$/, "") || DEFAULT_BASE_URLS[api];
|
|
1070
1123
|
return api === "google-generative-ai" ? withVersionSegment(base, "v1beta") : base;
|
|
1071
1124
|
}
|
|
1072
|
-
function record(value) {
|
|
1125
|
+
function record$1(value) {
|
|
1073
1126
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
1074
1127
|
}
|
|
1075
1128
|
function validUrl(value) {
|
|
@@ -1081,7 +1134,7 @@ function validUrl(value) {
|
|
|
1081
1134
|
}
|
|
1082
1135
|
}
|
|
1083
1136
|
function parseImageGenerationConfig(value) {
|
|
1084
|
-
const raw = record(value);
|
|
1137
|
+
const raw = record$1(value);
|
|
1085
1138
|
if (!raw) return null;
|
|
1086
1139
|
if (Object.keys(raw).some(
|
|
1087
1140
|
(key) => !["providerId", "modelId", "protocol", "baseUrl", "apiKey"].includes(key)
|
|
@@ -1129,7 +1182,7 @@ function imageModels(provider) {
|
|
|
1129
1182
|
}
|
|
1130
1183
|
function resolveImageGenerationConfig(ref, providers) {
|
|
1131
1184
|
if (ref === null || ref === void 0) return { config: null };
|
|
1132
|
-
const raw = record(ref);
|
|
1185
|
+
const raw = record$1(ref);
|
|
1133
1186
|
if (!raw || typeof raw.providerId !== "string" || typeof raw.modelId !== "string")
|
|
1134
1187
|
return { config: null, error: "Invalid image generation model selection" };
|
|
1135
1188
|
const provider = providers.find((p) => p?.id === raw.providerId);
|
|
@@ -1141,6 +1194,7 @@ const LOCAL_IMAGE_SCHEME = "local-image";
|
|
|
1141
1194
|
const POSIX_HOST = "posix";
|
|
1142
1195
|
const REMOTE_FETCH_HOST = "remote-fetch";
|
|
1143
1196
|
const BOT_AVATAR_HOST = "bot-avatar";
|
|
1197
|
+
const SECRETARY_AVATAR_HOST = "secretary-avatar";
|
|
1144
1198
|
const PLUGIN_ASSET_HOST = "plugin-asset";
|
|
1145
1199
|
const IMAGE_EXTENSIONS = [
|
|
1146
1200
|
"png",
|
|
@@ -1169,7 +1223,7 @@ function isVideoPath(pathOrUrl) {
|
|
|
1169
1223
|
}
|
|
1170
1224
|
function localImageUrlToPath(url) {
|
|
1171
1225
|
const host = url.hostname;
|
|
1172
|
-
if (!host || host === REMOTE_FETCH_HOST || host === BOT_AVATAR_HOST || host === PLUGIN_ASSET_HOST)
|
|
1226
|
+
if (!host || host === REMOTE_FETCH_HOST || host === BOT_AVATAR_HOST || host === SECRETARY_AVATAR_HOST || host === PLUGIN_ASSET_HOST)
|
|
1173
1227
|
return null;
|
|
1174
1228
|
const segments = url.pathname.split("/").filter(Boolean).map(decodeURIComponent);
|
|
1175
1229
|
if (host === POSIX_HOST) {
|
|
@@ -1590,6 +1644,493 @@ function parseRtkToolStats(value) {
|
|
|
1590
1644
|
}
|
|
1591
1645
|
return result;
|
|
1592
1646
|
}
|
|
1647
|
+
const NAME_RE = /^[a-z0-9]+(-[a-z0-9]+)*$/u;
|
|
1648
|
+
const SKILL_NAME_MAX = 48;
|
|
1649
|
+
const SKILL_DESCRIPTION_MAX = 1024;
|
|
1650
|
+
const SKILL_BODY_MAX = 2e4;
|
|
1651
|
+
function isSecretarySlug(value) {
|
|
1652
|
+
return typeof value === "string" && value.length <= SKILL_NAME_MAX && NAME_RE.test(value);
|
|
1653
|
+
}
|
|
1654
|
+
const isSecretarySkillName = isSecretarySlug;
|
|
1655
|
+
function parseSecretarySkillDraft(value) {
|
|
1656
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
1657
|
+
return { ok: false, error: "invalid skill" };
|
|
1658
|
+
}
|
|
1659
|
+
const record2 = value;
|
|
1660
|
+
const name = typeof record2.name === "string" ? record2.name.trim() : "";
|
|
1661
|
+
if (!isSecretarySkillName(name)) return { ok: false, error: "invalid skill name" };
|
|
1662
|
+
const description = typeof record2.description === "string" ? record2.description.trim() : "";
|
|
1663
|
+
if (!description || description.length > SKILL_DESCRIPTION_MAX || /[\r\n]/u.test(description)) {
|
|
1664
|
+
return { ok: false, error: "invalid skill description" };
|
|
1665
|
+
}
|
|
1666
|
+
const body = typeof record2.body === "string" ? record2.body.trim() : "";
|
|
1667
|
+
if (!body || body.length > SKILL_BODY_MAX) return { ok: false, error: "invalid skill body" };
|
|
1668
|
+
return { ok: true, draft: { name, description, body } };
|
|
1669
|
+
}
|
|
1670
|
+
function renderSecretarySkillFile(draft) {
|
|
1671
|
+
const frontmatter = stringify({ name: draft.name, description: draft.description });
|
|
1672
|
+
return `---
|
|
1673
|
+
${frontmatter}---
|
|
1674
|
+
|
|
1675
|
+
${draft.body}
|
|
1676
|
+
`;
|
|
1677
|
+
}
|
|
1678
|
+
function parseSecretarySkillFile(raw) {
|
|
1679
|
+
const text = raw.replace(/^\uFEFF/u, "");
|
|
1680
|
+
if (!text.startsWith("---")) return null;
|
|
1681
|
+
const end = text.indexOf("\n---", 3);
|
|
1682
|
+
if (end < 0) return null;
|
|
1683
|
+
let fields;
|
|
1684
|
+
try {
|
|
1685
|
+
fields = parse(text.slice(3, end));
|
|
1686
|
+
} catch {
|
|
1687
|
+
return null;
|
|
1688
|
+
}
|
|
1689
|
+
if (!fields || typeof fields !== "object") return null;
|
|
1690
|
+
const { name, description } = fields;
|
|
1691
|
+
const parsed = parseSecretarySkillDraft({
|
|
1692
|
+
name,
|
|
1693
|
+
description,
|
|
1694
|
+
body: text.slice(end + 4)
|
|
1695
|
+
});
|
|
1696
|
+
return parsed.ok ? parsed.draft : null;
|
|
1697
|
+
}
|
|
1698
|
+
const TOOL_DESCRIPTION_MAX = 1024;
|
|
1699
|
+
const TOOL_PARAMETERS_MAX = 8 * 1024;
|
|
1700
|
+
const TOOL_CODE_MAX = 5e4;
|
|
1701
|
+
const TOOL_TIMEOUT_DEFAULT = 60;
|
|
1702
|
+
const TOOL_TIMEOUT_MAX = 300;
|
|
1703
|
+
const TOOL_DESCRIPTOR_MAX = 50;
|
|
1704
|
+
const TOOL_OUTPUT_MAX = 2e4;
|
|
1705
|
+
const TOOL_RUN_TIMEOUT_MS = (TOOL_TIMEOUT_MAX + 5) * 1e3;
|
|
1706
|
+
const TOOL_ID_RE = /^my_[a-z0-9]+(_[a-z0-9]+)*$/u;
|
|
1707
|
+
const TOOL_ID_MAX = 60;
|
|
1708
|
+
const DESCRIPTOR_KEYS = ["name", "description", "parameters", "readOnly"];
|
|
1709
|
+
function secretaryToolScriptFile(runtime) {
|
|
1710
|
+
return runtime === "python" ? "main.py" : "main.mjs";
|
|
1711
|
+
}
|
|
1712
|
+
function secretaryToolId(name) {
|
|
1713
|
+
return `my_${name.replace(/-/gu, "_")}`;
|
|
1714
|
+
}
|
|
1715
|
+
function record(value) {
|
|
1716
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
1717
|
+
}
|
|
1718
|
+
function validToolParameters(parameters) {
|
|
1719
|
+
const fields = parameters.properties === void 0 ? {} : record(parameters.properties);
|
|
1720
|
+
if (!fields) return false;
|
|
1721
|
+
if (!Object.values(fields).every((value) => record(value) !== null)) return false;
|
|
1722
|
+
const required = parameters.required;
|
|
1723
|
+
if (required === void 0) return true;
|
|
1724
|
+
return Array.isArray(required) && required.every((name) => typeof name === "string" && Object.hasOwn(fields, name));
|
|
1725
|
+
}
|
|
1726
|
+
function parseSecretaryToolDraft(value) {
|
|
1727
|
+
const fields = record(value);
|
|
1728
|
+
if (!fields) return { ok: false, error: "invalid tool" };
|
|
1729
|
+
const name = typeof fields.name === "string" ? fields.name.trim() : "";
|
|
1730
|
+
if (!isSecretarySlug(name)) return { ok: false, error: "invalid tool name" };
|
|
1731
|
+
const description = typeof fields.description === "string" ? fields.description.trim() : "";
|
|
1732
|
+
if (!description || description.length > TOOL_DESCRIPTION_MAX || /[\r\n]/u.test(description)) {
|
|
1733
|
+
return { ok: false, error: "invalid tool description" };
|
|
1734
|
+
}
|
|
1735
|
+
const runtime = fields.runtime;
|
|
1736
|
+
if (runtime !== "python" && runtime !== "node") {
|
|
1737
|
+
return { ok: false, error: "invalid tool runtime" };
|
|
1738
|
+
}
|
|
1739
|
+
const parameters = record(fields.parameters);
|
|
1740
|
+
if (parameters?.type !== "object" || !validToolParameters(parameters)) {
|
|
1741
|
+
return { ok: false, error: "invalid tool parameters" };
|
|
1742
|
+
}
|
|
1743
|
+
let serialized;
|
|
1744
|
+
try {
|
|
1745
|
+
serialized = JSON.stringify(parameters);
|
|
1746
|
+
} catch {
|
|
1747
|
+
return { ok: false, error: "invalid tool parameters" };
|
|
1748
|
+
}
|
|
1749
|
+
if (serialized.length > TOOL_PARAMETERS_MAX) {
|
|
1750
|
+
return { ok: false, error: "invalid tool parameters" };
|
|
1751
|
+
}
|
|
1752
|
+
const readOnly = fields.readOnly === void 0 ? false : fields.readOnly;
|
|
1753
|
+
if (typeof readOnly !== "boolean") return { ok: false, error: "invalid tool readOnly" };
|
|
1754
|
+
const timeout = fields.timeoutSec;
|
|
1755
|
+
if (timeout !== void 0 && timeout !== null && (typeof timeout !== "number" || !Number.isInteger(timeout) || timeout < 1 || timeout > TOOL_TIMEOUT_MAX)) {
|
|
1756
|
+
return { ok: false, error: "invalid tool timeout" };
|
|
1757
|
+
}
|
|
1758
|
+
const code = typeof fields.code === "string" ? fields.code.trim() : "";
|
|
1759
|
+
if (!code || code.length > TOOL_CODE_MAX) return { ok: false, error: "invalid tool code" };
|
|
1760
|
+
return {
|
|
1761
|
+
ok: true,
|
|
1762
|
+
draft: {
|
|
1763
|
+
name,
|
|
1764
|
+
description,
|
|
1765
|
+
runtime,
|
|
1766
|
+
parameters,
|
|
1767
|
+
readOnly,
|
|
1768
|
+
...typeof timeout === "number" ? { timeoutSec: timeout } : {},
|
|
1769
|
+
code
|
|
1770
|
+
}
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1773
|
+
function renderSecretaryToolFile(draft) {
|
|
1774
|
+
const { code: _code, ...meta } = draft;
|
|
1775
|
+
return `${JSON.stringify(meta, null, 2)}
|
|
1776
|
+
`;
|
|
1777
|
+
}
|
|
1778
|
+
function parseSecretaryToolFile(raw, code) {
|
|
1779
|
+
let fields;
|
|
1780
|
+
try {
|
|
1781
|
+
fields = JSON.parse(raw.replace(/^\uFEFF/u, ""));
|
|
1782
|
+
} catch {
|
|
1783
|
+
return null;
|
|
1784
|
+
}
|
|
1785
|
+
const parsed = parseSecretaryToolDraft({ ...record(fields) ?? {}, code });
|
|
1786
|
+
return parsed.ok ? parsed.draft : null;
|
|
1787
|
+
}
|
|
1788
|
+
function secretaryToolDescriptor(draft) {
|
|
1789
|
+
return {
|
|
1790
|
+
name: secretaryToolId(draft.name),
|
|
1791
|
+
description: draft.description,
|
|
1792
|
+
parameters: draft.parameters,
|
|
1793
|
+
readOnly: draft.readOnly
|
|
1794
|
+
};
|
|
1795
|
+
}
|
|
1796
|
+
function parseSecretaryToolDescriptors(value) {
|
|
1797
|
+
if (!Array.isArray(value) || value.length > TOOL_DESCRIPTOR_MAX) return null;
|
|
1798
|
+
const out = [];
|
|
1799
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1800
|
+
for (const entry of value) {
|
|
1801
|
+
const fields = record(entry);
|
|
1802
|
+
if (!fields || Object.keys(fields).length !== DESCRIPTOR_KEYS.length) return null;
|
|
1803
|
+
if (!DESCRIPTOR_KEYS.every((key) => key in fields)) return null;
|
|
1804
|
+
const name = fields.name;
|
|
1805
|
+
const description = fields.description;
|
|
1806
|
+
const parameters = record(fields.parameters);
|
|
1807
|
+
const readOnly = fields.readOnly;
|
|
1808
|
+
if (typeof name !== "string" || name.length > TOOL_ID_MAX || !TOOL_ID_RE.test(name) || seen.has(name) || typeof description !== "string" || !description || description.length > TOOL_DESCRIPTION_MAX || !parameters || parameters.type !== "object" || typeof readOnly !== "boolean") {
|
|
1809
|
+
return null;
|
|
1810
|
+
}
|
|
1811
|
+
seen.add(name);
|
|
1812
|
+
out.push({ name, description, parameters, readOnly });
|
|
1813
|
+
}
|
|
1814
|
+
return out;
|
|
1815
|
+
}
|
|
1816
|
+
const WINDOWS_LOCAL_SHELLS = ["auto", "powershell", "bash"];
|
|
1817
|
+
function parseWindowsLocalShell(value) {
|
|
1818
|
+
return typeof value === "string" && WINDOWS_LOCAL_SHELLS.includes(value) ? value : "auto";
|
|
1819
|
+
}
|
|
1820
|
+
const WORKSPACE_WRITE_TOOL_ID = "workspace_write";
|
|
1821
|
+
function childProfileToolIds(tools, options = {}) {
|
|
1822
|
+
const editMode = options.editMode ?? "apply_patch";
|
|
1823
|
+
const shell = options.shell ?? "bash";
|
|
1824
|
+
const ids = ["read", "grep", "find", "ls"];
|
|
1825
|
+
if (tools === "all" && options.workspaceWrite !== false) {
|
|
1826
|
+
ids.push(shell);
|
|
1827
|
+
if (editMode === "apply_patch") ids.push("apply_patch");
|
|
1828
|
+
else ids.push("edit", "write");
|
|
1829
|
+
}
|
|
1830
|
+
ids.push("message_main_agent", "message_coworker");
|
|
1831
|
+
if (options.exploreFold) ids.push("explore_mark", "explore_fold");
|
|
1832
|
+
if (options.isolatedSandbox !== false) ids.push("codemode");
|
|
1833
|
+
return ids;
|
|
1834
|
+
}
|
|
1835
|
+
function childProfileShell(input) {
|
|
1836
|
+
if (input.remote) return "bash";
|
|
1837
|
+
if (input.platform !== "win32") return "bash";
|
|
1838
|
+
return parseWindowsLocalShell(input.preference) === "bash" ? "bash" : "powershell";
|
|
1839
|
+
}
|
|
1840
|
+
const WEB_SEARCH_CHAIN_MAX = 8;
|
|
1841
|
+
function isXaiResponsesHost(baseUrl) {
|
|
1842
|
+
try {
|
|
1843
|
+
return new URL(baseUrl).hostname === "api.x.ai";
|
|
1844
|
+
} catch {
|
|
1845
|
+
return false;
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
function nativeSearchKindFor(api, baseUrl) {
|
|
1849
|
+
switch (api) {
|
|
1850
|
+
case "anthropic-messages":
|
|
1851
|
+
return "anthropic";
|
|
1852
|
+
case "openai-responses":
|
|
1853
|
+
return "responses";
|
|
1854
|
+
case "openai-codex-responses":
|
|
1855
|
+
return "codex";
|
|
1856
|
+
case "google-generative-ai":
|
|
1857
|
+
return "gemini";
|
|
1858
|
+
case "google-antigravity":
|
|
1859
|
+
// antigravity.ts 的 ANTIGRAVITY_API_ID:provider 注册进 pi runtime 后,
|
|
1860
|
+
// composeModelProvider 会用 config.api 给每个模型盖戳,registry 里 Antigravity
|
|
1861
|
+
// 模型实际携带的是带 -cca 后缀的 id。漏认会被「no native web search support」
|
|
1862
|
+
// 静默跳过——请求都发不出去。
|
|
1863
|
+
case "google-antigravity-cca":
|
|
1864
|
+
return "antigravity";
|
|
1865
|
+
case "openai-completions":
|
|
1866
|
+
return isXaiResponsesHost(baseUrl) ? "responses" : void 0;
|
|
1867
|
+
default:
|
|
1868
|
+
return void 0;
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
function isWebSearchChainEntry(value) {
|
|
1872
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
1873
|
+
const entry = value;
|
|
1874
|
+
return typeof entry.providerId === "string" && entry.providerId.trim() !== "" && typeof entry.modelId === "string" && entry.modelId.trim() !== "";
|
|
1875
|
+
}
|
|
1876
|
+
function parseWebSearchChain(value) {
|
|
1877
|
+
if (!Array.isArray(value)) return [];
|
|
1878
|
+
const out = [];
|
|
1879
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1880
|
+
for (const item of value) {
|
|
1881
|
+
if (!isWebSearchChainEntry(item)) continue;
|
|
1882
|
+
const providerId = item.providerId.trim();
|
|
1883
|
+
const modelId = item.modelId.trim();
|
|
1884
|
+
const key = `${providerId}
|
|
1885
|
+
${modelId}`;
|
|
1886
|
+
if (seen.has(key)) continue;
|
|
1887
|
+
seen.add(key);
|
|
1888
|
+
out.push({ providerId, modelId });
|
|
1889
|
+
if (out.length >= WEB_SEARCH_CHAIN_MAX) break;
|
|
1890
|
+
}
|
|
1891
|
+
return out;
|
|
1892
|
+
}
|
|
1893
|
+
const BUILTIN_TOOLS = [
|
|
1894
|
+
{
|
|
1895
|
+
id: "image_generation",
|
|
1896
|
+
name: "ImageGen",
|
|
1897
|
+
description: "Generate images with the configured image model and save them to the session scratch directory"
|
|
1898
|
+
},
|
|
1899
|
+
{
|
|
1900
|
+
id: "subagent",
|
|
1901
|
+
name: "Subagent",
|
|
1902
|
+
description: "Unified agents: delegate one-shot tasks or keep persistent coworkers under Main control"
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
id: "workflow",
|
|
1906
|
+
name: "Workflow",
|
|
1907
|
+
description: "Run a JavaScript workflow that fans work out across subagents. Live status appears in the side panel."
|
|
1908
|
+
},
|
|
1909
|
+
{ id: "todo", name: "Todo", description: "Task list: track progress on multi-step work" },
|
|
1910
|
+
{
|
|
1911
|
+
id: "plan",
|
|
1912
|
+
name: "Plan mode",
|
|
1913
|
+
description: "Plan mode: research read-only, submit a plan for approval, then carry it out after approval"
|
|
1914
|
+
},
|
|
1915
|
+
{
|
|
1916
|
+
id: "ask_user",
|
|
1917
|
+
name: "Ask user",
|
|
1918
|
+
description: "Ask the user a question and wait for an answer (options / timeout)"
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
id: "browser",
|
|
1922
|
+
name: "Browser",
|
|
1923
|
+
description: "Built-in browser: open pages in Enso's own Chromium, read snapshots, click and type by ref"
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
id: "web",
|
|
1927
|
+
name: "Web search",
|
|
1928
|
+
description: "Web search and fetch: search with the session model's built-in search (falls back to a keyless service) and read public pages as markdown"
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
id: "background_tasks",
|
|
1932
|
+
name: "Background tasks",
|
|
1933
|
+
description: "Background shell task: run long commands in the background and notify on completion"
|
|
1934
|
+
},
|
|
1935
|
+
{
|
|
1936
|
+
id: "memory",
|
|
1937
|
+
name: "Memory",
|
|
1938
|
+
description: "Long-term memory: the agent can search, capture and consolidate durable decisions, preferences and lessons across sessions"
|
|
1939
|
+
},
|
|
1940
|
+
{
|
|
1941
|
+
id: "turn_discard",
|
|
1942
|
+
name: "Turn discard",
|
|
1943
|
+
description: "Let the agent drop an irrelevant automatic delivery or throwaway exchange from its context; the timeline keeps it and turn_recall can read it back"
|
|
1944
|
+
},
|
|
1945
|
+
{
|
|
1946
|
+
id: "isolated_sandbox",
|
|
1947
|
+
name: "Isolated sandbox",
|
|
1948
|
+
description: "Run JavaScript in an isolated sandbox that can call session tools. Intermediate reads and edits stay out of the chat; only the returned value is added to the conversation."
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
id: "computer",
|
|
1952
|
+
name: "Computer",
|
|
1953
|
+
description: "Host desktop: list windows, screenshot, accessibility tree, and input. Default off. Not the built-in browser."
|
|
1954
|
+
}
|
|
1955
|
+
];
|
|
1956
|
+
const DEFAULT_DISABLED_BUILTIN_TOOLS = ["memory", "computer"];
|
|
1957
|
+
const COMPUTER_DEFAULT_OFF_SETTINGS_VERSION = 14;
|
|
1958
|
+
function withComputerDisabled(entry) {
|
|
1959
|
+
if (!Array.isArray(entry.disabledBuiltinTools)) return entry;
|
|
1960
|
+
const list = entry.disabledBuiltinTools.filter((id) => typeof id === "string");
|
|
1961
|
+
return list.includes("computer") ? entry : { ...entry, disabledBuiltinTools: [...list, "computer"] };
|
|
1962
|
+
}
|
|
1963
|
+
function addComputerDefaultOff(state) {
|
|
1964
|
+
const migrated = withComputerDisabled(state);
|
|
1965
|
+
if (!Array.isArray(migrated.projects)) return migrated;
|
|
1966
|
+
return {
|
|
1967
|
+
...migrated,
|
|
1968
|
+
projects: migrated.projects.map(
|
|
1969
|
+
(project) => project && typeof project === "object" && !Array.isArray(project) ? withComputerDisabled(project) : project
|
|
1970
|
+
)
|
|
1971
|
+
};
|
|
1972
|
+
}
|
|
1973
|
+
function persistedSettingsState(persisted) {
|
|
1974
|
+
if (!persisted || typeof persisted !== "object" || Array.isArray(persisted)) return void 0;
|
|
1975
|
+
const { state, version } = persisted;
|
|
1976
|
+
if (!state || typeof state !== "object" || Array.isArray(state)) return void 0;
|
|
1977
|
+
const current = typeof version === "number" ? version : 0;
|
|
1978
|
+
const record2 = state;
|
|
1979
|
+
const base = current < COMPUTER_DEFAULT_OFF_SETTINGS_VERSION ? addComputerDefaultOff(record2) : record2;
|
|
1980
|
+
if (base.webSearchChain === void 0) return base;
|
|
1981
|
+
return { ...base, webSearchChain: parseWebSearchChain(base.webSearchChain) };
|
|
1982
|
+
}
|
|
1983
|
+
function effectiveSubagentAllowedModes(configured, disabledBuiltinTools) {
|
|
1984
|
+
if (Array.isArray(configured)) {
|
|
1985
|
+
const selected = new Set(
|
|
1986
|
+
configured.filter(
|
|
1987
|
+
(mode) => mode === "task" || mode === "coworker"
|
|
1988
|
+
)
|
|
1989
|
+
);
|
|
1990
|
+
return ["task", "coworker"].filter((mode) => selected.has(mode));
|
|
1991
|
+
}
|
|
1992
|
+
const disabled = new Set(
|
|
1993
|
+
Array.isArray(disabledBuiltinTools) ? disabledBuiltinTools.filter((id) => typeof id === "string") : []
|
|
1994
|
+
);
|
|
1995
|
+
return ["task", "coworker"].filter(
|
|
1996
|
+
(mode) => !disabled.has(mode === "task" ? "subagent" : "coworker")
|
|
1997
|
+
);
|
|
1998
|
+
}
|
|
1999
|
+
function effectiveDisabledBuiltinTools(disabled) {
|
|
2000
|
+
return Array.isArray(disabled) ? disabled.filter((id) => typeof id === "string") : [...DEFAULT_DISABLED_BUILTIN_TOOLS];
|
|
2001
|
+
}
|
|
2002
|
+
function resolveDisabledBuiltinTools(globalDisabled, project) {
|
|
2003
|
+
return Array.isArray(project?.disabledBuiltinTools) ? effectiveDisabledBuiltinTools(project.disabledBuiltinTools) : effectiveDisabledBuiltinTools(globalDisabled);
|
|
2004
|
+
}
|
|
2005
|
+
function projectDisabledBuiltinTools(projects, projectId) {
|
|
2006
|
+
if (!projectId || !Array.isArray(projects)) return void 0;
|
|
2007
|
+
for (const entry of projects) {
|
|
2008
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) continue;
|
|
2009
|
+
const record2 = entry;
|
|
2010
|
+
if (record2.id === projectId) return record2.disabledBuiltinTools;
|
|
2011
|
+
}
|
|
2012
|
+
return void 0;
|
|
2013
|
+
}
|
|
2014
|
+
const SILENT_MARKER = "<secretary-silent/>";
|
|
2015
|
+
const SILENCE_TURN_TOOL = "silence_turn";
|
|
2016
|
+
function messageText(message) {
|
|
2017
|
+
const content = message.content;
|
|
2018
|
+
if (typeof content === "string") return content;
|
|
2019
|
+
if (!Array.isArray(content)) return "";
|
|
2020
|
+
return content.map((part) => {
|
|
2021
|
+
if (!part || typeof part !== "object") return "";
|
|
2022
|
+
const text = part.text;
|
|
2023
|
+
return part.type === "text" && typeof text === "string" ? text : "";
|
|
2024
|
+
}).join("");
|
|
2025
|
+
}
|
|
2026
|
+
function isPureSessionUpdate(text) {
|
|
2027
|
+
if (!/<session-updates>|<secretary-schedule>/.test(text)) return false;
|
|
2028
|
+
const stripped = text.replace(/<session-updates>[\s\S]*?<\/session-updates>/g, "").replace(/<secretary-schedule>[\s\S]*?<\/secretary-schedule>/g, "").trim();
|
|
2029
|
+
return stripped.length === 0;
|
|
2030
|
+
}
|
|
2031
|
+
function isSilentMarker(text) {
|
|
2032
|
+
return text.trim() === SILENT_MARKER;
|
|
2033
|
+
}
|
|
2034
|
+
function calledSilenceTurn(message) {
|
|
2035
|
+
if (message.toolName === SILENCE_TURN_TOOL) return true;
|
|
2036
|
+
if (message.role !== "assistant" || !Array.isArray(message.content)) return false;
|
|
2037
|
+
return message.content.some((part) => {
|
|
2038
|
+
if (!part || typeof part !== "object") return false;
|
|
2039
|
+
const record2 = part;
|
|
2040
|
+
return record2.type === "toolCall" && record2.name === SILENCE_TURN_TOOL;
|
|
2041
|
+
});
|
|
2042
|
+
}
|
|
2043
|
+
function turnCalledSilenceTurn(messages, fromIndex = 0) {
|
|
2044
|
+
return messages.slice(Math.max(0, fromIndex)).some((message) => calledSilenceTurn(message));
|
|
2045
|
+
}
|
|
2046
|
+
function shouldSilenceTurn(userText, assistantText, calledSilence = false) {
|
|
2047
|
+
return isPureSessionUpdate(userText) && (calledSilence || isSilentMarker(assistantText));
|
|
2048
|
+
}
|
|
2049
|
+
function turnRequestedSilence(messages, fromIndex = 0) {
|
|
2050
|
+
const turn = messages.slice(Math.max(0, fromIndex));
|
|
2051
|
+
let userText = "";
|
|
2052
|
+
let assistantText = "";
|
|
2053
|
+
let called = false;
|
|
2054
|
+
for (const message of turn) {
|
|
2055
|
+
if (calledSilenceTurn(message)) called = true;
|
|
2056
|
+
if (message.role === "user") {
|
|
2057
|
+
const text = messageText(message);
|
|
2058
|
+
if (text) userText = userText ? `${userText}
|
|
2059
|
+
${text}` : text;
|
|
2060
|
+
} else if (message.role === "assistant") {
|
|
2061
|
+
const text = messageText(message).trim();
|
|
2062
|
+
if (text) assistantText = text;
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
return shouldSilenceTurn(userText, assistantText, called);
|
|
2066
|
+
}
|
|
2067
|
+
function sessionIdsInUpdates(text) {
|
|
2068
|
+
return [...text.matchAll(/session:([0-9a-z-]+)/gi)].map((match) => match[1]);
|
|
2069
|
+
}
|
|
2070
|
+
const SECRETARY_OPS = [
|
|
2071
|
+
"project_list",
|
|
2072
|
+
"project_info",
|
|
2073
|
+
"repo_status",
|
|
2074
|
+
"session_list",
|
|
2075
|
+
"session_read",
|
|
2076
|
+
"session_tasks",
|
|
2077
|
+
"session_activity",
|
|
2078
|
+
"session_create",
|
|
2079
|
+
"session_send",
|
|
2080
|
+
"session_queue_list",
|
|
2081
|
+
"session_queue_cancel",
|
|
2082
|
+
"session_stop",
|
|
2083
|
+
"session_task_stop",
|
|
2084
|
+
"session_archive",
|
|
2085
|
+
"result_mark_done",
|
|
2086
|
+
"result_mark_undo",
|
|
2087
|
+
"session_answer",
|
|
2088
|
+
"session_takeover_propose",
|
|
2089
|
+
"image_view",
|
|
2090
|
+
"contact_send_file",
|
|
2091
|
+
"cleanup_list",
|
|
2092
|
+
"cleanup_apply",
|
|
2093
|
+
"todo_list",
|
|
2094
|
+
"todo_item_add",
|
|
2095
|
+
"todo_item_update",
|
|
2096
|
+
"todo_item_dispatch",
|
|
2097
|
+
"schedule_add",
|
|
2098
|
+
"schedule_list",
|
|
2099
|
+
"schedule_remove",
|
|
2100
|
+
"secretary_profile_propose",
|
|
2101
|
+
"skill_propose",
|
|
2102
|
+
"tool_propose"
|
|
2103
|
+
];
|
|
2104
|
+
const SECRETARY_SEND_MODES = ["queue", "steer"];
|
|
2105
|
+
const SECRETARY_INTERNAL_OPS = ["tool_run"];
|
|
2106
|
+
const SECRETARY_ID_MAX = 200;
|
|
2107
|
+
const SECRETARY_SESSION_MESSAGE_MAX = 8e3;
|
|
2108
|
+
const SECRETARY_ATTACHMENT_MAX = 5;
|
|
2109
|
+
const SECRETARY_ATTACHMENT_PATH_MAX = 1024;
|
|
2110
|
+
const SECRETARY_CONTACT_CAPTION_MAX = 2e3;
|
|
2111
|
+
const SECRETARY_TOOL_ALLOWLIST = /* @__PURE__ */ new Set([
|
|
2112
|
+
...SECRETARY_OPS,
|
|
2113
|
+
// worker 本地只读工具:按 spawn 时实际加载的 skill 表读 SKILL.md,不碰任意路径
|
|
2114
|
+
"skill_read",
|
|
2115
|
+
"ask_user",
|
|
2116
|
+
SILENCE_TURN_TOOL,
|
|
2117
|
+
"web_search",
|
|
2118
|
+
"web_fetch",
|
|
2119
|
+
"memory_search",
|
|
2120
|
+
"memory_capture",
|
|
2121
|
+
"memory_crystallize",
|
|
2122
|
+
"memory_delete"
|
|
2123
|
+
]);
|
|
2124
|
+
function isSecretaryToolAllowed(name, extraToolNames) {
|
|
2125
|
+
return SECRETARY_TOOL_ALLOWLIST.has(name) || extraToolNames?.has(name) === true;
|
|
2126
|
+
}
|
|
2127
|
+
const ALLOWED_BUILTIN_GROUPS = /* @__PURE__ */ new Set(["ask_user", "web", "memory"]);
|
|
2128
|
+
const SECRETARY_FORCED_DISABLED_TOOLS = [
|
|
2129
|
+
...BUILTIN_TOOLS.map((tool) => tool.id).filter((id) => !ALLOWED_BUILTIN_GROUPS.has(id)),
|
|
2130
|
+
WORKSPACE_WRITE_TOOL_ID,
|
|
2131
|
+
"goal"
|
|
2132
|
+
];
|
|
2133
|
+
const SECRETARY_ALWAYS_ENABLED_TOOLS = ["memory"];
|
|
1593
2134
|
const SHELL_QUIET_MS = 15e3;
|
|
1594
2135
|
const SHELL_LIMITS = Object.freeze({
|
|
1595
2136
|
yieldDefaultMs: 45e3,
|
|
@@ -1733,63 +2274,6 @@ function cleanToolBatchLabel(text) {
|
|
|
1733
2274
|
if (!label || /^(error\b|i cannot\b|i can't\b|sorry\b)/i.test(label)) return void 0;
|
|
1734
2275
|
return clip(label, LABEL_CHARS);
|
|
1735
2276
|
}
|
|
1736
|
-
const WEB_SEARCH_CHAIN_MAX = 8;
|
|
1737
|
-
function isXaiResponsesHost(baseUrl) {
|
|
1738
|
-
try {
|
|
1739
|
-
return new URL(baseUrl).hostname === "api.x.ai";
|
|
1740
|
-
} catch {
|
|
1741
|
-
return false;
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
function nativeSearchKindFor(api, baseUrl) {
|
|
1745
|
-
switch (api) {
|
|
1746
|
-
case "anthropic-messages":
|
|
1747
|
-
return "anthropic";
|
|
1748
|
-
case "openai-responses":
|
|
1749
|
-
return "responses";
|
|
1750
|
-
case "openai-codex-responses":
|
|
1751
|
-
return "codex";
|
|
1752
|
-
case "google-generative-ai":
|
|
1753
|
-
return "gemini";
|
|
1754
|
-
case "google-antigravity":
|
|
1755
|
-
// antigravity.ts 的 ANTIGRAVITY_API_ID:provider 注册进 pi runtime 后,
|
|
1756
|
-
// composeModelProvider 会用 config.api 给每个模型盖戳,registry 里 Antigravity
|
|
1757
|
-
// 模型实际携带的是带 -cca 后缀的 id。漏认会被「no native web search support」
|
|
1758
|
-
// 静默跳过——请求都发不出去。
|
|
1759
|
-
case "google-antigravity-cca":
|
|
1760
|
-
return "antigravity";
|
|
1761
|
-
case "openai-completions":
|
|
1762
|
-
return isXaiResponsesHost(baseUrl) ? "responses" : void 0;
|
|
1763
|
-
default:
|
|
1764
|
-
return void 0;
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
|
-
function isWebSearchChainEntry(value) {
|
|
1768
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
1769
|
-
const entry = value;
|
|
1770
|
-
return typeof entry.providerId === "string" && entry.providerId.trim() !== "" && typeof entry.modelId === "string" && entry.modelId.trim() !== "";
|
|
1771
|
-
}
|
|
1772
|
-
function parseWebSearchChain(value) {
|
|
1773
|
-
if (!Array.isArray(value)) return [];
|
|
1774
|
-
const out = [];
|
|
1775
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1776
|
-
for (const item of value) {
|
|
1777
|
-
if (!isWebSearchChainEntry(item)) continue;
|
|
1778
|
-
const providerId = item.providerId.trim();
|
|
1779
|
-
const modelId = item.modelId.trim();
|
|
1780
|
-
const key = `${providerId}
|
|
1781
|
-
${modelId}`;
|
|
1782
|
-
if (seen.has(key)) continue;
|
|
1783
|
-
seen.add(key);
|
|
1784
|
-
out.push({ providerId, modelId });
|
|
1785
|
-
if (out.length >= WEB_SEARCH_CHAIN_MAX) break;
|
|
1786
|
-
}
|
|
1787
|
-
return out;
|
|
1788
|
-
}
|
|
1789
|
-
const WINDOWS_LOCAL_SHELLS = ["auto", "powershell", "bash"];
|
|
1790
|
-
function parseWindowsLocalShell(value) {
|
|
1791
|
-
return typeof value === "string" && WINDOWS_LOCAL_SHELLS.includes(value) ? value : "auto";
|
|
1792
|
-
}
|
|
1793
2277
|
const EDIT_MODES = ["replace", "apply_patch"];
|
|
1794
2278
|
function isEditMode(value) {
|
|
1795
2279
|
return typeof value === "string" && EDIT_MODES.includes(value);
|
|
@@ -2023,6 +2507,7 @@ const BROWSER_OPS = [
|
|
|
2023
2507
|
];
|
|
2024
2508
|
const MEMORY_OPS = ["search", "capture", "crystallize", "delete"];
|
|
2025
2509
|
const COMPUTER_OPS = ["run"];
|
|
2510
|
+
const ASK_ANSWER_BY = ["user", "relay", "timeout"];
|
|
2026
2511
|
const APPROVAL_DECISIONS = ["allow", "allowSession", "deny", "revise", "review"];
|
|
2027
2512
|
function isApprovalDecision(value) {
|
|
2028
2513
|
return APPROVAL_DECISIONS.includes(value);
|
|
@@ -2757,12 +3242,14 @@ function parseAgentCommand(value) {
|
|
|
2757
3242
|
"mcpServers",
|
|
2758
3243
|
"pluginCommands",
|
|
2759
3244
|
"pluginTools",
|
|
3245
|
+
"secretaryTools",
|
|
2760
3246
|
"workflowPresetFiles",
|
|
2761
3247
|
"pluginEvents",
|
|
2762
3248
|
"pluginHooks",
|
|
2763
3249
|
"instruction",
|
|
2764
3250
|
"approvalMode",
|
|
2765
3251
|
"autoRejectApprovals",
|
|
3252
|
+
"askRelay",
|
|
2766
3253
|
"approvalReviewer",
|
|
2767
3254
|
"approvalReviewerClassifier",
|
|
2768
3255
|
"approvalReviewerManaged",
|
|
@@ -2783,6 +3270,7 @@ function parseAgentCommand(value) {
|
|
|
2783
3270
|
"botGroupTasks",
|
|
2784
3271
|
"botDiscussMode",
|
|
2785
3272
|
"botRoutines",
|
|
3273
|
+
"secretaryMode",
|
|
2786
3274
|
"botDelegationTask",
|
|
2787
3275
|
"botWriteLock",
|
|
2788
3276
|
"protectedActions",
|
|
@@ -2790,11 +3278,11 @@ function parseAgentCommand(value) {
|
|
|
2790
3278
|
"instanceId"
|
|
2791
3279
|
]) || !parseSessionIdentity(value.identity) || typeof value.cwd !== "string" || !parseSessionModelConfig(value.model) || value.resumeFile !== void 0 && !isNonEmptyString(value.resumeFile) || value.loadHarnessAssets !== void 0 && typeof value.loadHarnessAssets !== "boolean" || value.trustedProjectCode !== void 0 && !(Array.isArray(value.trustedProjectCode) && value.trustedProjectCode.length <= 500 && value.trustedProjectCode.every(
|
|
2792
3280
|
(entry) => typeof entry === "string" && entry.length > 0 && entry.length <= 1024
|
|
2793
|
-
)) || value.pluginCommands !== void 0 && parsePluginCommands(value.pluginCommands) === null || value.pluginTools !== void 0 && !isPluginToolList(value.pluginTools) || value.workflowPresetFiles !== void 0 && !(Array.isArray(value.workflowPresetFiles) && value.workflowPresetFiles.length <= 500 && value.workflowPresetFiles.every(
|
|
3281
|
+
)) || value.pluginCommands !== void 0 && parsePluginCommands(value.pluginCommands) === null || value.pluginTools !== void 0 && !isPluginToolList(value.pluginTools) || value.secretaryTools !== void 0 && parseSecretaryToolDescriptors(value.secretaryTools) === null || value.workflowPresetFiles !== void 0 && !(Array.isArray(value.workflowPresetFiles) && value.workflowPresetFiles.length <= 500 && value.workflowPresetFiles.every(
|
|
2794
3282
|
(entry) => typeof entry === "string" && entry.length > 0 && entry.length <= 1024
|
|
2795
3283
|
)) || value.pluginEvents !== void 0 && !isPluginEventPlan(value.pluginEvents) || value.pluginHooks !== void 0 && parsePluginHooks(value.pluginHooks) === null || value.rtkEnabled !== void 0 && typeof value.rtkEnabled !== "boolean" || value.dcgPath !== void 0 && !isNonEmptyString(value.dcgPath) || value.planMode !== void 0 && typeof value.planMode !== "boolean" || value.windowsLocalShell !== void 0 && !WINDOWS_LOCAL_SHELLS.includes(
|
|
2796
3284
|
value.windowsLocalShell
|
|
2797
|
-
) || value.exploreFoldEnabled !== void 0 && typeof value.exploreFoldEnabled !== "boolean" || value.editMode !== void 0 && !isEditMode(value.editMode) || value.hashlineEditEnabled !== void 0 && typeof value.hashlineEditEnabled !== "boolean" || value.compactStrategy !== void 0 && parseCompactStrategy(value.compactStrategy) === null || value.smartCompactEnabled !== void 0 && typeof value.smartCompactEnabled !== "boolean" || value.smartCompactSummaryModel !== void 0 && parseSpawnModelConfig(value.smartCompactSummaryModel) === null || value.smartCompactMode !== void 0 && parseSmartCompactMode(value.smartCompactMode) === null || value.memoryLanguage !== void 0 && typeof value.memoryLanguage !== "string" || value.remote !== void 0 && parseAgentRemoteConfig(value.remote) === null || value.subagentModels !== void 0 && (!Array.isArray(value.subagentModels) || value.subagentModels.some((entry) => parseSubagentModelOption(entry) === null)) || value.approvalReviewer !== void 0 && parseSpawnModelConfig(value.approvalReviewer) === null || value.approvalReviewerAllowThreshold !== void 0 && (!isApprovalAllowThreshold(value.approvalReviewerAllowThreshold) || value.approvalReviewerClassifier === void 0) || value.approvalReviewerManaged !== void 0 && (value.approvalReviewerManaged !== true || value.approvalReviewerClassifier === void 0) || value.approvalReviewerClassifier !== void 0 && (value.approvalReviewer !== void 0 || !parseClassifierCredentials(value.approvalReviewerClassifier)) || value.rolePrompt !== void 0 && !isNonEmptyString(value.rolePrompt) || value.systemPrompt !== void 0 && !isNonEmptyString(value.systemPrompt) || value.systemPromptAppend !== void 0 && !isNonEmptyString(value.systemPromptAppend) || value.systemPromptBoost !== void 0 && !isNonEmptyString(value.systemPromptBoost) || value.refusalRetryPrompt !== void 0 && !isNonEmptyString(value.refusalRetryPrompt) || value.botMode !== void 0 && typeof value.botMode !== "boolean" || value.botGroupTasks !== void 0 && typeof value.botGroupTasks !== "boolean" || value.botDiscussMode !== void 0 && typeof value.botDiscussMode !== "boolean" || value.botDiscussMode === true && (value.botMode !== true || value.botGroupTasks !== true) || value.botRoutines !== void 0 && typeof value.botRoutines !== "boolean" || value.botDelegationTask !== void 0 && typeof value.botDelegationTask !== "boolean" || value.botWriteLock !== void 0 && (!isRecord(value.botWriteLock) || !isNonEmptyString(value.botWriteLock.label) || !Array.isArray(value.botWriteLock.ancestors) || !value.botWriteLock.ancestors.every(isNonEmptyString)) || value.protectedActions !== void 0 && typeof value.protectedActions !== "boolean" || value.instanceId !== void 0 && !isUuid(value.instanceId)) {
|
|
3285
|
+
) || value.exploreFoldEnabled !== void 0 && typeof value.exploreFoldEnabled !== "boolean" || value.editMode !== void 0 && !isEditMode(value.editMode) || value.hashlineEditEnabled !== void 0 && typeof value.hashlineEditEnabled !== "boolean" || value.compactStrategy !== void 0 && parseCompactStrategy(value.compactStrategy) === null || value.smartCompactEnabled !== void 0 && typeof value.smartCompactEnabled !== "boolean" || value.smartCompactSummaryModel !== void 0 && parseSpawnModelConfig(value.smartCompactSummaryModel) === null || value.smartCompactMode !== void 0 && parseSmartCompactMode(value.smartCompactMode) === null || value.memoryLanguage !== void 0 && typeof value.memoryLanguage !== "string" || value.remote !== void 0 && parseAgentRemoteConfig(value.remote) === null || value.subagentModels !== void 0 && (!Array.isArray(value.subagentModels) || value.subagentModels.some((entry) => parseSubagentModelOption(entry) === null)) || value.approvalReviewer !== void 0 && parseSpawnModelConfig(value.approvalReviewer) === null || value.askRelay !== void 0 && (!isRecord(value.askRelay) || !isNonEmptyString(value.askRelay.name)) || value.approvalReviewerAllowThreshold !== void 0 && (!isApprovalAllowThreshold(value.approvalReviewerAllowThreshold) || value.approvalReviewerClassifier === void 0) || value.approvalReviewerManaged !== void 0 && (value.approvalReviewerManaged !== true || value.approvalReviewerClassifier === void 0) || value.approvalReviewerClassifier !== void 0 && (value.approvalReviewer !== void 0 || !parseClassifierCredentials(value.approvalReviewerClassifier)) || value.rolePrompt !== void 0 && !isNonEmptyString(value.rolePrompt) || value.systemPrompt !== void 0 && !isNonEmptyString(value.systemPrompt) || value.systemPromptAppend !== void 0 && !isNonEmptyString(value.systemPromptAppend) || value.systemPromptBoost !== void 0 && !isNonEmptyString(value.systemPromptBoost) || value.refusalRetryPrompt !== void 0 && !isNonEmptyString(value.refusalRetryPrompt) || value.botMode !== void 0 && typeof value.botMode !== "boolean" || value.botGroupTasks !== void 0 && typeof value.botGroupTasks !== "boolean" || value.botDiscussMode !== void 0 && typeof value.botDiscussMode !== "boolean" || value.botDiscussMode === true && (value.botMode !== true || value.botGroupTasks !== true) || value.botRoutines !== void 0 && typeof value.botRoutines !== "boolean" || value.secretaryMode !== void 0 && typeof value.secretaryMode !== "boolean" || value.botDelegationTask !== void 0 && typeof value.botDelegationTask !== "boolean" || value.botWriteLock !== void 0 && (!isRecord(value.botWriteLock) || !isNonEmptyString(value.botWriteLock.label) || !Array.isArray(value.botWriteLock.ancestors) || !value.botWriteLock.ancestors.every(isNonEmptyString)) || value.protectedActions !== void 0 && typeof value.protectedActions !== "boolean" || value.instanceId !== void 0 && !isUuid(value.instanceId)) {
|
|
2798
3286
|
return null;
|
|
2799
3287
|
}
|
|
2800
3288
|
return value;
|
|
@@ -2873,6 +3361,8 @@ function parseAgentCommand(value) {
|
|
|
2873
3361
|
return hasExactKeys(value, ["type", "identity", "model"]) && parseAnySessionIdentity(value.identity) && parseSessionModelConfig(value.model) ? value : null;
|
|
2874
3362
|
case "set-thinking":
|
|
2875
3363
|
return hasExactKeys(value, ["type", "identity", "level"]) && parseAnySessionIdentity(value.identity) && THINKING_LEVELS.includes(value.level) ? value : null;
|
|
3364
|
+
case "set-system-prompt":
|
|
3365
|
+
return hasExactKeys(value, ["type", "identity", "systemPrompt"]) && parseSessionIdentity(value.identity) && isNonEmptyString(value.systemPrompt) ? value : null;
|
|
2876
3366
|
case "set-reasoning":
|
|
2877
3367
|
return hasOnlyKeys(value, ["type", "identity", "enabled", "level"]) && parseAnySessionIdentity(value.identity) && typeof value.enabled === "boolean" && (value.level === void 0 || THINKING_LEVELS.includes(value.level)) ? value : null;
|
|
2878
3368
|
case "approval-respond":
|
|
@@ -2883,6 +3373,8 @@ function parseAgentCommand(value) {
|
|
|
2883
3373
|
return hasExactKeys(value, ["type", "identity", "text", "urgent"]) && parseSessionIdentity(value.identity) && isNonEmptyString(value.text) && typeof value.urgent === "boolean" ? value : null;
|
|
2884
3374
|
case "set-approval-mode":
|
|
2885
3375
|
return hasOnlyKeys(value, ["type", "identity", "mode", "autoReject"]) && parseAnySessionIdentity(value.identity) && APPROVAL_MODES.includes(value.mode) && (value.autoReject === void 0 || typeof value.autoReject === "boolean") ? value : null;
|
|
3376
|
+
case "set-ask-relay":
|
|
3377
|
+
return hasOnlyKeys(value, ["type", "identity", "relay"]) && parseAnySessionIdentity(value.identity) && (value.relay === void 0 || isRecord(value.relay) && isNonEmptyString(value.relay.name)) ? value : null;
|
|
2886
3378
|
case "set-plan-mode":
|
|
2887
3379
|
return hasExactKeys(value, ["type", "identity", "active"]) && parseSessionIdentity(value.identity) && typeof value.active === "boolean" ? value : null;
|
|
2888
3380
|
case "plan-respond":
|
|
@@ -2912,7 +3404,7 @@ function parseAgentCommand(value) {
|
|
|
2912
3404
|
case "set-model-directory":
|
|
2913
3405
|
return hasExactKeys(value, ["type", "snapshot", "customProviders"]) ? value : null;
|
|
2914
3406
|
case "ask-respond":
|
|
2915
|
-
return
|
|
3407
|
+
return hasOnlyKeys(value, ["type", "identity", "requestId", "answer", "by", "name"]) && parseAnySessionIdentity(value.identity) && isNonEmptyString(value.requestId) && isNonEmptyString(value.answer) && (value.by === void 0 || value.by === "user" || value.by === "relay") && (value.name === void 0 || isNonEmptyString(value.name)) ? value : null;
|
|
2916
3408
|
case "browser-result":
|
|
2917
3409
|
case "memory-result":
|
|
2918
3410
|
case "delegation-result":
|
|
@@ -2924,6 +3416,13 @@ function parseAgentCommand(value) {
|
|
|
2924
3416
|
const shapeOk = value.ok ? value.error === void 0 : isNonEmptyString(value.error) && value.result === void 0;
|
|
2925
3417
|
return shapeOk ? value : null;
|
|
2926
3418
|
}
|
|
3419
|
+
case "secretary-result": {
|
|
3420
|
+
if (!hasOnlyKeys(value, ["type", "identity", "requestId", "ok", "result", "error"]) || !parseSessionIdentity(value.identity) || !isNonEmptyString(value.requestId) || typeof value.ok !== "boolean") {
|
|
3421
|
+
return null;
|
|
3422
|
+
}
|
|
3423
|
+
const shapeOk = value.ok ? value.error === void 0 : isNonEmptyString(value.error) && value.result === void 0;
|
|
3424
|
+
return shapeOk ? value : null;
|
|
3425
|
+
}
|
|
2927
3426
|
case "plugin-intercept-result": {
|
|
2928
3427
|
if (!hasOnlyKeys(value, ["type", "identity", "requestId", "ok", "result", "error"]) || !parseSessionIdentity(value.identity) || !isNonEmptyString(value.requestId) || typeof value.ok !== "boolean") {
|
|
2929
3428
|
return null;
|
|
@@ -2989,6 +3488,19 @@ function parseAgentCommand(value) {
|
|
|
2989
3488
|
return hasExactKeys(value, ["type", "requestId", "servers", "server", "tool", "args"]) && isNonEmptyString(value.requestId) && Array.isArray(value.servers) && isNonEmptyString(value.server) && isNonEmptyString(value.tool) && isRecord(value.args) ? value : null;
|
|
2990
3489
|
case "plugin-mcp-cancel":
|
|
2991
3490
|
return hasExactKeys(value, ["type", "requestId"]) && isNonEmptyString(value.requestId) ? { type: "plugin-mcp-cancel", requestId: value.requestId } : null;
|
|
3491
|
+
case "plugin-agent-run":
|
|
3492
|
+
return hasOnlyKeys(value, [
|
|
3493
|
+
"type",
|
|
3494
|
+
"requestId",
|
|
3495
|
+
"identity",
|
|
3496
|
+
"prompt",
|
|
3497
|
+
"systemPrompt",
|
|
3498
|
+
"context",
|
|
3499
|
+
"timeoutMs",
|
|
3500
|
+
"model"
|
|
3501
|
+
]) && isNonEmptyString(value.requestId) && parseSessionIdentity(value.identity) && isNonEmptyString(value.prompt) && isBoundedText(value.prompt, PLUGIN_AGENT_PROMPT_MAX_CHARS) && (value.systemPrompt === void 0 || typeof value.systemPrompt === "string" && isBoundedText(value.systemPrompt, PLUGIN_AGENT_SYSTEM_MAX_CHARS)) && (value.context === "conversation" || value.context === "fork" || value.context === "none") && Number.isInteger(value.timeoutMs) && value.timeoutMs > 0 && value.timeoutMs <= PLUGIN_AGENT_MAX_TIMEOUT_MS && (value.model === void 0 || parseSpawnModelConfig(value.model) !== null) ? value : null;
|
|
3502
|
+
case "plugin-agent-cancel":
|
|
3503
|
+
return hasExactKeys(value, ["type", "requestId"]) && isNonEmptyString(value.requestId) ? { type: "plugin-agent-cancel", requestId: value.requestId } : null;
|
|
2992
3504
|
case "set-proxy-env": {
|
|
2993
3505
|
if (!hasExactKeys(value, ["type", "env"]) || !isRecord(value.env)) return null;
|
|
2994
3506
|
for (const entry of Object.values(value.env)) {
|
|
@@ -3056,6 +3568,12 @@ function parseAgentWorkerEvent(value) {
|
|
|
3056
3568
|
return hasExactKeys(value, ["type", "requestId", "ok", "value"]) ? value : null;
|
|
3057
3569
|
return value.ok === false && hasExactKeys(value, ["type", "requestId", "ok", "error"]) && isNonEmptyString(value.error) ? value : null;
|
|
3058
3570
|
}
|
|
3571
|
+
if (value.type === "plugin-agent-event") {
|
|
3572
|
+
if (!hasExactKeys(value, ["type", "requestId", "event"]) || !isNonEmptyString(value.requestId))
|
|
3573
|
+
return null;
|
|
3574
|
+
const event = parsePluginAgentRunEvent(value.event);
|
|
3575
|
+
return event ? { type: "plugin-agent-event", requestId: value.requestId, event } : null;
|
|
3576
|
+
}
|
|
3059
3577
|
if (value.type === "session-reloaded") {
|
|
3060
3578
|
if (!hasExactKeys(value, ["type", "requestId", "result"]) || !isNonEmptyString(value.requestId) || !isRecord(value.result))
|
|
3061
3579
|
return null;
|
|
@@ -3121,6 +3639,8 @@ function parseAgentWorkerEvent(value) {
|
|
|
3121
3639
|
return hasExactKeys(value, ["type", "identity", "seq", "requestId", "op", "params"]) && isNonEmptyString(value.requestId) && MEMORY_OPS.includes(value.op) ? value : null;
|
|
3122
3640
|
case "delegation-invoke":
|
|
3123
3641
|
return hasExactKeys(value, ["type", "identity", "seq", "requestId", "op", "params"]) && parseSessionIdentity(value.identity) && isNonEmptyString(value.requestId) && (value.op === "delegate" || value.op === "check_delegation" || value.op === "retry_delegation" || value.op === "group_tasks" || value.op === "group_history" || value.op === "routine_propose" || value.op === "send_image" || value.op === "report_blocked") ? value : null;
|
|
3642
|
+
case "secretary-invoke":
|
|
3643
|
+
return hasExactKeys(value, ["type", "identity", "seq", "requestId", "op", "params"]) && parseSessionIdentity(value.identity) && isNonEmptyString(value.requestId) && (SECRETARY_OPS.includes(value.op) || SECRETARY_INTERNAL_OPS.includes(value.op)) ? value : null;
|
|
3124
3644
|
case "computer-invoke":
|
|
3125
3645
|
return hasExactKeys(value, ["type", "identity", "seq", "requestId", "op", "params"]) && isNonEmptyString(value.requestId) && COMPUTER_OPS.includes(value.op) ? value : null;
|
|
3126
3646
|
case "computer-cancel":
|
|
@@ -3155,11 +3675,11 @@ function parseAgentWorkerEvent(value) {
|
|
|
3155
3675
|
case "delivery-deferred":
|
|
3156
3676
|
return hasExactKeys(value, ["type", "identity", "seq", "deliveryId"]) && isDeliveryId(value.deliveryId) ? value : null;
|
|
3157
3677
|
case "status":
|
|
3158
|
-
return value.status === "idle" || value.status === "running" || value.status === "failed" ? value : null;
|
|
3678
|
+
return (value.status === "idle" || value.status === "running" || value.status === "failed") && (value.turnId === void 0 || isNonEmptyString(value.turnId)) ? value : null;
|
|
3159
3679
|
case "message-upsert":
|
|
3160
3680
|
return isSequence(value.index) && isRecord(value.message) && hasValidProjectedMetadata(value.message) ? value : null;
|
|
3161
3681
|
case "turn-completed":
|
|
3162
|
-
return isNonEmptyString(value.turnId) && (value.digest === void 0 || parseTurnDigest(value.digest)) && (value.aborted === void 0 || value.aborted === true) && (value.requestBudgetStop === void 0 || value.requestBudgetStop === true) && (value.requestBudgetError === void 0 || value.requestBudgetStop === true && isNonEmptyString(value.requestBudgetError)) ? value : null;
|
|
3682
|
+
return isNonEmptyString(value.turnId) && (value.digest === void 0 || parseTurnDigest(value.digest)) && (value.aborted === void 0 || value.aborted === true) && (value.silent === void 0 || value.silent === true) && (value.requestBudgetStop === void 0 || value.requestBudgetStop === true) && (value.requestBudgetError === void 0 || value.requestBudgetStop === true && isNonEmptyString(value.requestBudgetError)) ? value : null;
|
|
3163
3683
|
case "turn-failed":
|
|
3164
3684
|
return isNonEmptyString(value.turnId) && isNonEmptyString(value.error) && (value.undelivered === void 0 || value.undelivered === true) && (value.retryExhausted === void 0 || value.retryExhausted === true) ? value : null;
|
|
3165
3685
|
case "turn-retry":
|
|
@@ -3192,10 +3712,11 @@ function parseAgentWorkerEvent(value) {
|
|
|
3192
3712
|
case "approval-request":
|
|
3193
3713
|
return isRecord(value.request) && isNonEmptyString(value.request.requestId) && isNonEmptyString(value.request.tool) && (value.request.kind === "command" || value.request.kind === "file-edit" || value.request.kind === "file-write" || value.request.kind === "mcp") && typeof value.request.summary === "string" && (value.request.filePaths === void 0 || Array.isArray(value.request.filePaths) && value.request.filePaths.every(isNonEmptyString)) && (value.request.protected === void 0 || PROTECTED_ACTION_CATEGORIES.includes(value.request.protected)) && isOptionalTimestamp(value.request.expiresAt) && (value.request.reviewFallback === void 0 || APPROVAL_REVIEW_FALLBACKS.includes(value.request.reviewFallback)) && (value.request.guard === void 0 || isRecord(value.request.guard) && hasOnlyKeys(value.request.guard, ["ruleId", "reason"]) && isNonEmptyString(value.request.guard.ruleId) && isNonEmptyString(value.request.guard.reason)) ? value : null;
|
|
3194
3714
|
case "approval-resolved":
|
|
3195
|
-
case "ask-resolved":
|
|
3196
3715
|
return isNonEmptyString(value.requestId) ? value : null;
|
|
3716
|
+
case "ask-resolved":
|
|
3717
|
+
return isNonEmptyString(value.requestId) && (value.by === void 0 || ASK_ANSWER_BY.includes(value.by)) && (value.answer === void 0 || typeof value.answer === "string") && (value.name === void 0 || isNonEmptyString(value.name)) ? value : null;
|
|
3197
3718
|
case "ask-request":
|
|
3198
|
-
return isRecord(value.ask) && isNonEmptyString(value.ask.requestId) && isNonEmptyString(value.ask.question) && isOptionalTimestamp(value.ask.expiresAt) && (value.ask.recommended === void 0 || Array.isArray(value.ask.options) && value.ask.options.includes(value.ask.recommended)) ? value : null;
|
|
3719
|
+
return isRecord(value.ask) && isNonEmptyString(value.ask.requestId) && isNonEmptyString(value.ask.question) && isOptionalTimestamp(value.ask.expiresAt) && (value.ask.recommended === void 0 || Array.isArray(value.ask.options) && value.ask.options.includes(value.ask.recommended)) && (value.ask.relay === void 0 || isRecord(value.ask.relay) && isNonEmptyString(value.ask.relay.name)) ? value : null;
|
|
3199
3720
|
case "subagent-update":
|
|
3200
3721
|
return isRecord(value.agent) ? value : null;
|
|
3201
3722
|
case "coworker-update":
|
|
@@ -3226,127 +3747,175 @@ function parseAgentWorkerEvent(value) {
|
|
|
3226
3747
|
}
|
|
3227
3748
|
}
|
|
3228
3749
|
export {
|
|
3229
|
-
|
|
3750
|
+
PLUGIN_AGENT_OUTPUT_MAX_CHARS as $,
|
|
3230
3751
|
AGENT_END_TEXT_MAX as A,
|
|
3231
3752
|
BEFORE_AGENT_START_PROMPT_MAX as B,
|
|
3232
3753
|
CONTEXT_OCCUPANCY_BUCKETS as C,
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3754
|
+
SILENCE_TURN_TOOL as D,
|
|
3755
|
+
workspaceBranchChangedNote as E,
|
|
3756
|
+
DEFAULT_MAX_ACTIVE_COWORKERS as F,
|
|
3757
|
+
DEFAULT_AUTO_RETRY_LIMIT as G,
|
|
3758
|
+
isSameChildSessionIdentity as H,
|
|
3759
|
+
resolveCompactStrategy as I,
|
|
3760
|
+
DEFAULT_SSH_TIMEOUT_SECONDS as J,
|
|
3761
|
+
isSecretaryToolAllowed as K,
|
|
3762
|
+
PLAN_ENTRY_TYPE as L,
|
|
3242
3763
|
MODEL_API_KINDS as M,
|
|
3243
|
-
|
|
3244
|
-
|
|
3764
|
+
autoRetryOverrides as N,
|
|
3765
|
+
parseAgentSessionCustomEntry as O,
|
|
3245
3766
|
PLUGIN_MESSAGE_TYPE as P,
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3767
|
+
PLUGIN_AGENT_ARGS_MAX_CHARS as Q,
|
|
3768
|
+
PLUGIN_AGENT_TEXT_MAX_CHARS as R,
|
|
3769
|
+
SECRETARY_OPS as S,
|
|
3770
|
+
THINKING_LEVELS as T,
|
|
3771
|
+
toolBatchDigest as U,
|
|
3772
|
+
turnRequestedSilence as V,
|
|
3773
|
+
turnCalledSilenceTurn as W,
|
|
3774
|
+
STALE_SESSION_ERROR as X,
|
|
3775
|
+
WORKSPACE_WRITE_TOOL_ID as Y,
|
|
3776
|
+
splitPlanPrefix as Z,
|
|
3777
|
+
parsePlanMessage as _,
|
|
3257
3778
|
parseSessionIdentity as a,
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3779
|
+
isDeliveryId as a$,
|
|
3780
|
+
isClassifierOnlyProvider as a0,
|
|
3781
|
+
isOauthAccountPool as a1,
|
|
3782
|
+
resolveEditMode as a2,
|
|
3783
|
+
EMPTY_PLAN_STATE as a3,
|
|
3784
|
+
mergeMaskReports as a4,
|
|
3785
|
+
PRIVACY_MASK_ENTRY as a5,
|
|
3786
|
+
parseAgentCommand as a6,
|
|
3787
|
+
pluginToolName as a7,
|
|
3788
|
+
APPROVAL_MODES as a8,
|
|
3789
|
+
parseChildConversationMetadata as a9,
|
|
3790
|
+
OBSERVE_TIMEOUT_MS as aA,
|
|
3791
|
+
BEFORE_COMPACT_TIMEOUT_MS as aB,
|
|
3792
|
+
PLUGIN_PROGRESS_MAX_CHARS as aC,
|
|
3793
|
+
MCP_TRANSPORTS as aD,
|
|
3794
|
+
persistedSettingsState as aE,
|
|
3795
|
+
parsePrivacyMaskRecord as aF,
|
|
3796
|
+
hasProviderCredentials as aG,
|
|
3797
|
+
parseAgentWorkerEvent as aH,
|
|
3798
|
+
SECRETARY_FORCED_DISABLED_TOOLS as aI,
|
|
3799
|
+
parseWindowsLocalShell as aJ,
|
|
3800
|
+
parseSmartCompactMode as aK,
|
|
3801
|
+
SECRETARY_ALWAYS_ENABLED_TOOLS as aL,
|
|
3802
|
+
resolveImageGenerationConfig as aM,
|
|
3803
|
+
normalizeMaxActiveCoworkers as aN,
|
|
3804
|
+
normalizeAutoRetryLimit as aO,
|
|
3805
|
+
parsePrivacyMaskSettings as aP,
|
|
3806
|
+
parseDisabledWorkflowPresets as aQ,
|
|
3807
|
+
DEFAULT_APPROVAL_ALLOW_THRESHOLD as aR,
|
|
3808
|
+
visibleMemberAgentTypes as aS,
|
|
3809
|
+
buildAgentTypeRegistrySnapshot as aT,
|
|
3810
|
+
resolveShellLimits as aU,
|
|
3811
|
+
parseWebSearchChain as aV,
|
|
3812
|
+
DEFAULT_PRESET_ID as aW,
|
|
3813
|
+
childProfileToolIds as aX,
|
|
3814
|
+
AGENT_WAIT_DEFAULT_MS as aY,
|
|
3815
|
+
AGENT_WAIT_MAX_MS as aZ,
|
|
3816
|
+
effectiveDisabledBuiltinTools as a_,
|
|
3817
|
+
eligibleOauthPoolAccountKeys as aa,
|
|
3818
|
+
normalizeSshTimeoutSeconds as ab,
|
|
3819
|
+
isEditMode as ac,
|
|
3820
|
+
resolveDisabledBuiltinTools as ad,
|
|
3821
|
+
projectDisabledBuiltinTools as ae,
|
|
3822
|
+
CLAUDE_HOOK_EVENTS as af,
|
|
3823
|
+
isReservedAgentTypeName as ag,
|
|
3824
|
+
BUILTIN_AGENT_TYPES as ah,
|
|
3825
|
+
isPluginEntry as ai,
|
|
3826
|
+
PLUGIN_HOST_APIS as aj,
|
|
3827
|
+
PLUGIN_INJECT_MAX_CHARS as ak,
|
|
3828
|
+
PLUGIN_AGENT_RUN_ID as al,
|
|
3829
|
+
PLUGIN_AGENT_PROMPT_MAX_CHARS as am,
|
|
3830
|
+
PLUGIN_AGENT_SYSTEM_MAX_CHARS as an,
|
|
3831
|
+
PLUGIN_AGENT_DEFAULT_TIMEOUT_MS as ao,
|
|
3832
|
+
PLUGIN_AGENT_MAX_TIMEOUT_MS as ap,
|
|
3833
|
+
parsePluginInjectImages as aq,
|
|
3834
|
+
isHostPluginEvent as ar,
|
|
3835
|
+
parsePluginToolName as as,
|
|
3836
|
+
initialInterceptState as at,
|
|
3837
|
+
CHILD_INTERCEPT_TOTAL_TIMEOUT_MS as au,
|
|
3838
|
+
INTERCEPT_TOTAL_TIMEOUT_MS as av,
|
|
3839
|
+
CHILD_INTERCEPT_TIMEOUT_MS as aw,
|
|
3840
|
+
INTERCEPT_TIMEOUT_MS as ax,
|
|
3841
|
+
applyInterceptResult as ay,
|
|
3842
|
+
failClosedResult as az,
|
|
3322
3843
|
parseApprovalAllowThreshold as b,
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3844
|
+
activePlanNote as b$,
|
|
3845
|
+
parseSecretarySkillDraft as b0,
|
|
3846
|
+
parseSecretaryToolDraft as b1,
|
|
3847
|
+
secretaryToolDescriptor as b2,
|
|
3848
|
+
isSecretarySlug as b3,
|
|
3849
|
+
secretaryToolScriptFile as b4,
|
|
3850
|
+
parseSecretaryToolFile as b5,
|
|
3851
|
+
renderSecretaryToolFile as b6,
|
|
3852
|
+
TOOL_TIMEOUT_DEFAULT as b7,
|
|
3853
|
+
TOOL_OUTPUT_MAX as b8,
|
|
3854
|
+
isSecretarySkillName as b9,
|
|
3855
|
+
parseCreateProjectAuthorityRequest as bA,
|
|
3856
|
+
parseSelectProjectAuthorityRequest as bB,
|
|
3857
|
+
parseRemoveProjectAuthorityRequest as bC,
|
|
3858
|
+
withVersionSegment as bD,
|
|
3859
|
+
DEFAULT_BASE_URLS as bE,
|
|
3860
|
+
shouldSilenceTurn as bF,
|
|
3861
|
+
sessionIdsInUpdates as bG,
|
|
3862
|
+
messageText as bH,
|
|
3863
|
+
isPureSessionUpdate as bI,
|
|
3864
|
+
PROJECTED_FILE_TEXT_LIMIT as bJ,
|
|
3865
|
+
imageGenerationPreviewPaths as bK,
|
|
3866
|
+
parseGeneratedImagePaths as bL,
|
|
3867
|
+
parseMaskReport as bM,
|
|
3868
|
+
parsePluginMessageSource as bN,
|
|
3869
|
+
parseRtkToolStats as bO,
|
|
3870
|
+
isBackgroundTaskId as bP,
|
|
3871
|
+
parseShellFailure as bQ,
|
|
3872
|
+
pluginArtifactsFromToolDetails as bR,
|
|
3873
|
+
parseApprovalReviewRecord as bS,
|
|
3874
|
+
PROJECTED_FILE_CHANGE_LIMIT as bT,
|
|
3875
|
+
PROJECTED_APPLY_PATCH_PATH_TEXT_LIMIT as bU,
|
|
3876
|
+
PROJECTED_APPLY_PATCH_PATH_COUNT_LIMIT as bV,
|
|
3877
|
+
foldPlanState as bW,
|
|
3878
|
+
PLAN_MODE_ON_NOTE as bX,
|
|
3879
|
+
PLAN_MODE_OFF_NOTE as bY,
|
|
3880
|
+
planFeedbackText as bZ,
|
|
3881
|
+
planKickoffText as b_,
|
|
3882
|
+
parseSecretarySkillFile as ba,
|
|
3883
|
+
renderSecretarySkillFile as bb,
|
|
3884
|
+
LOCAL_IMAGE_SCHEME as bc,
|
|
3885
|
+
REMOTE_FETCH_HOST as bd,
|
|
3886
|
+
BOT_AVATAR_HOST as be,
|
|
3887
|
+
SECRETARY_AVATAR_HOST as bf,
|
|
3888
|
+
PLUGIN_ASSET_HOST as bg,
|
|
3889
|
+
mediaExtension as bh,
|
|
3890
|
+
localImageUrlToPath as bi,
|
|
3891
|
+
isMediaPath as bj,
|
|
3892
|
+
isVideoPath as bk,
|
|
3893
|
+
IMAGE_EXTENSIONS as bl,
|
|
3894
|
+
effectiveSubagentAllowedModes as bm,
|
|
3895
|
+
parseCreateConversationAuthorityRequest as bn,
|
|
3896
|
+
parseConversationAuthorityRequest as bo,
|
|
3897
|
+
parseUpdateConversationSelectionRequest as bp,
|
|
3898
|
+
parseTitleSummaryInput as bq,
|
|
3899
|
+
parseParentSourceBindingRequest as br,
|
|
3900
|
+
parseParentModelSelectionRequest as bs,
|
|
3901
|
+
parseAgentDispatchRequest as bt,
|
|
3902
|
+
isApprovalDecision as bu,
|
|
3903
|
+
cleanToolBatchLabel as bv,
|
|
3904
|
+
toolBatchLabelPrompt as bw,
|
|
3905
|
+
TOOL_BATCH_LABEL_SYSTEM_PROMPT as bx,
|
|
3906
|
+
SHELL_LIMITS as by,
|
|
3907
|
+
TITLE_SUMMARY_MAX_CANDIDATES as bz,
|
|
3349
3908
|
isProbability as c,
|
|
3909
|
+
PLAN_TITLE_MAX as c0,
|
|
3910
|
+
PLAN_TEXT_MAX as c1,
|
|
3911
|
+
planPhase as c2,
|
|
3912
|
+
parsePlanEntry as c3,
|
|
3913
|
+
parseAgentControlToolRequest as c4,
|
|
3914
|
+
nativeSearchKindFor as c5,
|
|
3915
|
+
isWorkflowPresetId as c6,
|
|
3916
|
+
PLUGIN_EVENTS as c7,
|
|
3917
|
+
isInterceptEvent as c8,
|
|
3918
|
+
APPEND_ONLY_INTERCEPT_EVENTS as c9,
|
|
3350
3919
|
CONTEXT_PART_ITEMS as d,
|
|
3351
3920
|
parseProviderHeaders as e,
|
|
3352
3921
|
escapePiConfigValue as f,
|
|
@@ -3362,13 +3931,13 @@ export {
|
|
|
3362
3931
|
parseChildSessionIdentity as p,
|
|
3363
3932
|
MaskReportBuilder as q,
|
|
3364
3933
|
resolvePiProviderBaseUrl as r,
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3934
|
+
childProfileShell as s,
|
|
3935
|
+
SECRETARY_ID_MAX as t,
|
|
3936
|
+
SECRETARY_CONTACT_CAPTION_MAX as u,
|
|
3937
|
+
SECRETARY_ATTACHMENT_PATH_MAX as v,
|
|
3938
|
+
SECRETARY_ATTACHMENT_MAX as w,
|
|
3939
|
+
SECRETARY_SEND_MODES as x,
|
|
3940
|
+
SECRETARY_SESSION_MESSAGE_MAX as y,
|
|
3941
|
+
TOOL_RUN_TIMEOUT_MS as z
|
|
3373
3942
|
};
|
|
3374
|
-
//# sourceMappingURL=agent-
|
|
3943
|
+
//# sourceMappingURL=agent-BbLTL3oo.js.map
|