@ensocode/server 0.3.6 → 0.3.8
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-CcwMwkZ2.js → abnfDiagram-VCTEODGH-BYULU5bQ.js} +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-2pbpN4eZ.js +1 -0
- package/out/phone/assets/{architectureDiagram-5GKGNRK7-C4vXoVVW.js → architectureDiagram-5GKGNRK7-B9-XfmwY.js} +1 -1
- package/out/phone/assets/{blockDiagram-I7D4REHJ-btZonF7x.js → blockDiagram-I7D4REHJ-BDjx5h4I.js} +1 -1
- package/out/phone/assets/{c4Diagram-7LVT6UL2-wbgQC5h_.js → c4Diagram-7LVT6UL2-BLCrWT5z.js} +1 -1
- package/out/phone/assets/channel-D6Jp0e5s.js +1 -0
- package/out/phone/assets/{chunk-4HAMMTFA-ClL6ufY7.js → chunk-4HAMMTFA-CBLX5PPK.js} +1 -1
- package/out/phone/assets/{chunk-75Z2AOVW-CsGKueom.js → chunk-75Z2AOVW-BjNsM64u.js} +1 -1
- package/out/phone/assets/{chunk-DU6HZSFF-BOrl8wD9.js → chunk-DU6HZSFF-D32XGmy5.js} +1 -1
- package/out/phone/assets/{chunk-F27PBJKO-CQYtYMPT.js → chunk-F27PBJKO-DYrJ0RKS.js} +1 -1
- package/out/phone/assets/{chunk-GMAD6QVW-D2uUUIys.js → chunk-GMAD6QVW-C8yUEx5a.js} +1 -1
- package/out/phone/assets/{chunk-GVQU2GXP-k4NEAgCW.js → chunk-GVQU2GXP-nOF6gFr6.js} +1 -1
- package/out/phone/assets/{chunk-IMKFNOWR-DGBKnQoB.js → chunk-IMKFNOWR-Bw90xROV.js} +1 -1
- package/out/phone/assets/{chunk-L3NEJ4N5-BrOC_Q4h.js → chunk-L3NEJ4N5-hIXFqCYn.js} +1 -1
- package/out/phone/assets/{chunk-OSK3NFVY-Cpg-5-0Y.js → chunk-OSK3NFVY-CDR6cbF7.js} +1 -1
- package/out/phone/assets/{chunk-P2QGCYS3-Cwbos3wS.js → chunk-P2QGCYS3-B5LBNgEn.js} +1 -1
- package/out/phone/assets/{chunk-POPQ4Y6H-CtPqYixr.js → chunk-POPQ4Y6H-Ctie8lW0.js} +1 -1
- package/out/phone/assets/{chunk-PWAF6VOD-HDvh5SEv.js → chunk-PWAF6VOD-VUQ3ZQa0.js} +1 -1
- package/out/phone/assets/{chunk-SHT3W25Y-DKgmKLLr.js → chunk-SHT3W25Y-ThT795xc.js} +1 -1
- package/out/phone/assets/{chunk-SVP7TREG-DLVIWYD0.js → chunk-SVP7TREG-DaLedBcS.js} +1 -1
- package/out/phone/assets/{chunk-TICWLB2K-DzvrdWmw.js → chunk-TICWLB2K-EZdof5x9.js} +1 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-DDYMR8uV.js +1 -0
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-DDYMR8uV.js +1 -0
- package/out/phone/assets/{cynefin-OW5HDTMX-Cx32WN9e.js → cynefin-OW5HDTMX-s8d8cA90.js} +1 -1
- package/out/phone/assets/{cynefinDiagram-5FMLGOSQ-k3jOnfBl.js → cynefinDiagram-5FMLGOSQ-BvUrZrEv.js} +1 -1
- package/out/phone/assets/{dagre-GXQ25YYZ-CTEzzJig.js → dagre-GXQ25YYZ-Y4KQyhxZ.js} +1 -1
- package/out/phone/assets/desk-BpEz3CoY.js +2 -0
- package/out/phone/assets/{diagram-S7CK7UJ4-BpfiB5rc.js → diagram-S7CK7UJ4-BOnQE44W.js} +1 -1
- package/out/phone/assets/{diagram-UQ7AKVKN-BpJj6V2i.js → diagram-UQ7AKVKN-DinAxyUq.js} +1 -1
- package/out/phone/assets/{diagram-VSXAHHWV-BXTUks5P.js → diagram-VSXAHHWV-1SZEAZcR.js} +1 -1
- package/out/phone/assets/{diagram-VX7I27RA-BGaGiVKW.js → diagram-VX7I27RA-CeqFT5PL.js} +1 -1
- package/out/phone/assets/{diagram-Z3DM3KII-DhtDyIq2.js → diagram-Z3DM3KII-CKUQZLUU.js} +1 -1
- package/out/phone/assets/{ebnfDiagram-PWID7BFC-TUM8eXrc.js → ebnfDiagram-PWID7BFC-D-vPzzm8.js} +1 -1
- package/out/phone/assets/{erDiagram-RLTQ6QDP-DqLrmkHj.js → erDiagram-RLTQ6QDP--yabuiWQ.js} +1 -1
- package/out/phone/assets/eventmodeling-NTZA5JFV-BVUcXI_2.js +1 -0
- package/out/phone/assets/flowDiagram-HODETNUW-lyDnpL9j.js +1 -0
- package/out/phone/assets/{ganttDiagram-EL5Y4UJY-Bfx_3wSL.js → ganttDiagram-EL5Y4UJY-DuceHpP7.js} +1 -1
- package/out/phone/assets/{gitGraph-4MIJSDKK-BByrtu13.js → gitGraph-4MIJSDKK-Dy69JGci.js} +1 -1
- package/out/phone/assets/{gitGraphDiagram-WWUBYQGX-DX-_HrkV.js → gitGraphDiagram-WWUBYQGX-DAsGy8VO.js} +1 -1
- package/out/phone/assets/{info-A6RAGUB7-B9AtEuqS.js → info-A6RAGUB7-Bi2rn7zz.js} +1 -1
- package/out/phone/assets/{infoDiagram-27XIBGKW-BlTJ4y54.js → infoDiagram-27XIBGKW-DLYnX9vk.js} +1 -1
- package/out/phone/assets/{ishikawaDiagram-5VMMS53U-W8zt5UiH.js → ishikawaDiagram-5VMMS53U-frgoq43k.js} +1 -1
- package/out/phone/assets/{journeyDiagram-3NMN7TZE-ClJSjx26.js → journeyDiagram-3NMN7TZE-LfNbEnHq.js} +1 -1
- package/out/phone/assets/{kanban-definition-UXKFOSKX-BPyXsdoL.js → kanban-definition-UXKFOSKX-BYOUPJHU.js} +1 -1
- package/out/phone/assets/{line-DMsvqHhd.js → line-_FhXTvX4.js} +1 -1
- package/out/phone/assets/main-CfWT8VXG.js +1656 -0
- package/out/phone/assets/main-TDCArlgf.css +1 -0
- package/out/phone/assets/{mermaid-parser.core-BteiwAAk.js → mermaid-parser.core-ByliMPZm.js} +3 -3
- package/out/phone/assets/{mermaid.core-BLIwkLpP.js → mermaid.core-Mmd8_4Nr.js} +4 -4
- package/out/phone/assets/{mindmap-definition-YA3MSWOX-CtvOuG70.js → mindmap-definition-YA3MSWOX-C96rrhDe.js} +1 -1
- package/out/phone/assets/{packet-AYTQ26CC-D9BlJkYf.js → packet-AYTQ26CC-CMANaRii.js} +1 -1
- package/out/phone/assets/{pegDiagram-XKGWAZYB-BCIWH2f6.js → pegDiagram-XKGWAZYB-CGL6jEdQ.js} +1 -1
- package/out/phone/assets/{pie-WAS4IAKB-no-EBGVU.js → pie-WAS4IAKB-Dqr8Yw0J.js} +1 -1
- package/out/phone/assets/{pieDiagram-E7YTZNPT-CSjCYWAz.js → pieDiagram-E7YTZNPT-CFhX0DbB.js} +1 -1
- package/out/phone/assets/{quadrantDiagram-AXDQQJYC-Bh1Jh1q-.js → quadrantDiagram-AXDQQJYC-CIy7q7Mf.js} +1 -1
- package/out/phone/assets/{radar-RG4KPBEZ-BVweBCte.js → radar-RG4KPBEZ-Lx6rDXGt.js} +1 -1
- package/out/phone/assets/{railroad-74A4TZTK-kUK_6AdA.js → railroad-74A4TZTK-CFfqCtSc.js} +1 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-Cc2ok2-H.js +1 -0
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-B-egGDno.js +1 -0
- package/out/phone/assets/railroad-peg-WCYAUIDC-DGbcDKYr.js +1 -0
- package/out/phone/assets/{railroadDiagram-O6MQD6OU-DDKZuEH9.js → railroadDiagram-O6MQD6OU-NmlxNdEs.js} +1 -1
- package/out/phone/assets/{requirementDiagram-BXWQKSXE-BAdrpp8Z.js → requirementDiagram-BXWQKSXE-C1PDc05u.js} +1 -1
- package/out/phone/assets/{sankeyDiagram-P5KCCOFB-Dm0dmnQJ.js → sankeyDiagram-P5KCCOFB-CfwTCG6L.js} +1 -1
- package/out/phone/assets/{sequenceDiagram-WJ2MYXX4-DtN1lgR9.js → sequenceDiagram-WJ2MYXX4-A-L3mYui.js} +1 -1
- package/out/phone/assets/{stateDiagram-D77RDMKH-m5U6QGoM.js → stateDiagram-D77RDMKH-nRUGxe4_.js} +1 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-Bk1aRZ0l.js +1 -0
- package/out/phone/assets/storage-DU47Rb1q.js +36 -0
- package/out/phone/assets/{swimlanes-42K2YHIH-jWtOgaZK.js → swimlanes-42K2YHIH-7K-yTToK.js} +1 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-C1bEcwWi.js +8 -0
- package/out/phone/assets/{timeline-definition-24CTP7MA-CncsPQSQ.js → timeline-definition-24CTP7MA-DXbVHlED.js} +1 -1
- package/out/phone/assets/{treeView-Q6P3EWNA-BNIDY5fM.js → treeView-Q6P3EWNA-M_osDfi3.js} +1 -1
- package/out/phone/assets/{treemap-WGGIJYW6-FkDWRKqS.js → treemap-WGGIJYW6-BMi5B7KJ.js} +1 -1
- package/out/phone/assets/{vennDiagram-4TSXK5OY-CeyTscuj.js → vennDiagram-4TSXK5OY-D3EpIx9s.js} +1 -1
- package/out/phone/assets/{wardley-WFR3VGLG-CEuN_S8l.js → wardley-WFR3VGLG-nB8yKilO.js} +1 -1
- package/out/phone/assets/{wardleyDiagram-VM6X3IG4-DE3tgI7J.js → wardleyDiagram-VM6X3IG4-DSghcmRr.js} +1 -1
- package/out/phone/assets/{xychartDiagram-S5SC5T6Z-Di64LYy0.js → xychartDiagram-S5SC5T6Z-BEl0ProS.js} +1 -1
- package/out/phone/desk.html +2 -2
- package/out/phone/index.html +3 -3
- package/out/renderer/assets/{abnfDiagram-VCTEODGH-B7uu_Gw1.js → abnfDiagram-VCTEODGH-BB3W0IRN.js} +1 -1
- package/out/renderer/assets/{arc-CkW2-Pr7.js → arc-r0xtJ5ab.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-5GKGNRK7-2E0AYPn5.js → architectureDiagram-5GKGNRK7-BC8Ww6fQ.js} +1 -1
- package/out/renderer/assets/{blockDiagram-I7D4REHJ-BsSmBeco.js → blockDiagram-I7D4REHJ-wup9ZluJ.js} +1 -1
- package/out/renderer/assets/{c4Diagram-7LVT6UL2-gzVW5Xek.js → c4Diagram-7LVT6UL2-BwWATTxt.js} +1 -1
- package/out/renderer/assets/channel-CPp6hdRq.js +1 -0
- package/out/renderer/assets/{chunk-2Q5K7J3B-K_IlhZEX.js → chunk-2Q5K7J3B-Dw4JQaKM.js} +1 -1
- package/out/renderer/assets/{chunk-5VM5RSS4-r65AjBn5.js → chunk-5VM5RSS4-p6eptEa6.js} +1 -1
- package/out/renderer/assets/{chunk-F27PBJKO-CZszqKBI.js → chunk-F27PBJKO-crFPFXKS.js} +1 -1
- package/out/renderer/assets/{chunk-IMKFNOWR-7mYCkNCZ.js → chunk-IMKFNOWR-Bnu9wgyD.js} +1 -1
- package/out/renderer/assets/{chunk-JWPE2WC7-B-cBpNJA.js → chunk-JWPE2WC7-B8Xhiasd.js} +1 -1
- package/out/renderer/assets/{chunk-POPQ4Y6H-CjWY4_mJ.js → chunk-POPQ4Y6H-Cgaq3GTd.js} +1 -1
- package/out/renderer/assets/{chunk-SVP7TREG-g5p-RdlH.js → chunk-SVP7TREG-Dxz3ENUO.js} +1 -1
- package/out/renderer/assets/{chunk-TICWLB2K-BMr5sD7G.js → chunk-TICWLB2K-DKsdmE8K.js} +1 -1
- package/out/renderer/assets/{chunk-XXDRQBXY-CNfQgYe3.js → chunk-XXDRQBXY-D4zS63eZ.js} +1 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-Be_lIO5F.js +1 -0
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-Be_lIO5F.js +1 -0
- package/out/renderer/assets/{cose-bilkent-JH36ORCC-ByPl0yeB.js → cose-bilkent-JH36ORCC-Cd7k91g4.js} +1 -1
- package/out/renderer/assets/{cynefin-OW5HDTMX-CMTgEepT.js → cynefin-OW5HDTMX-qIf7N9zE.js} +1 -1
- package/out/renderer/assets/{cynefinDiagram-5FMLGOSQ-DYx_JMNT.js → cynefinDiagram-5FMLGOSQ-DZq47G9W.js} +1 -1
- package/out/renderer/assets/{cytoscape-fcose-BcbfusAa.js → cytoscape-fcose-BUV0U04U.js} +1 -1
- package/out/renderer/assets/{dagre-GXQ25YYZ-p-Meu2Lo.js → dagre-GXQ25YYZ-jHWFk6Gs.js} +1 -1
- package/out/renderer/assets/{diagram-S7CK7UJ4-1m9BA3xi.js → diagram-S7CK7UJ4-BM99y_vq.js} +1 -1
- package/out/renderer/assets/{diagram-UQ7AKVKN-Cg3zgAxc.js → diagram-UQ7AKVKN-DWw2eBQS.js} +1 -1
- package/out/renderer/assets/{diagram-VSXAHHWV-B58Hl37z.js → diagram-VSXAHHWV-BpQqnXFN.js} +1 -1
- package/out/renderer/assets/{diagram-VX7I27RA-C7dhzeqr.js → diagram-VX7I27RA-DIwy3ILe.js} +1 -1
- package/out/renderer/assets/{diagram-Z3DM3KII-C-Bn7OHR.js → diagram-Z3DM3KII-CyggPXCP.js} +1 -1
- package/out/renderer/assets/{ebnfDiagram-PWID7BFC-BcrVBxSI.js → ebnfDiagram-PWID7BFC-BW1zQBfH.js} +1 -1
- package/out/renderer/assets/{erDiagram-RLTQ6QDP-CZHJHTxr.js → erDiagram-RLTQ6QDP-DeBd9wgY.js} +1 -1
- package/out/renderer/assets/{flowDiagram-HODETNUW-oCdJ784z.js → flowDiagram-HODETNUW-DuHDP4W5.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-EL5Y4UJY-C9TlTohh.js → ganttDiagram-EL5Y4UJY-BWzm5BP7.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-WWUBYQGX-RVFZsGPP.js → gitGraphDiagram-WWUBYQGX-BVW6A1c7.js} +1 -1
- package/out/renderer/assets/globals-BMp8RrrF.css +1 -0
- package/out/renderer/assets/globals-BTwoz2I6.js +2603 -0
- package/out/renderer/assets/index-DzCbQXPw.js +131 -0
- package/out/renderer/assets/{index-B49rZgqC.css → index-F_0FxVZ_.css} +1 -1
- package/out/renderer/assets/{infoDiagram-27XIBGKW-CxE810pn.js → infoDiagram-27XIBGKW-BnQ0QqrX.js} +1 -1
- package/out/renderer/assets/{ishikawaDiagram-5VMMS53U-Osr2JJcF.js → ishikawaDiagram-5VMMS53U-C8Kybb7-.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-3NMN7TZE-Bigxb8hB.js → journeyDiagram-3NMN7TZE-BFN7ls5V.js} +1 -1
- package/out/renderer/assets/{kanban-definition-UXKFOSKX-DVP3FCG8.js → kanban-definition-UXKFOSKX-DDNfT2Ap.js} +1 -1
- package/out/renderer/assets/{layout-Dn80hFs0.js → layout-DG726kRG.js} +1 -1
- package/out/renderer/assets/{linear-B4dfTk2J.js → linear-CyRBABsR.js} +1 -1
- package/out/renderer/assets/{mermaid.core-uI5XQTV1.js → mermaid.core-DPQo0NhF.js} +5 -5
- package/out/renderer/assets/{mindmap-definition-YA3MSWOX-BD7FdpQU.js → mindmap-definition-YA3MSWOX-BKjiHq0N.js} +1 -1
- package/out/renderer/assets/{pegDiagram-XKGWAZYB-DU5iHhXs.js → pegDiagram-XKGWAZYB-cGBsq_Dp.js} +1 -1
- package/out/renderer/assets/{pieDiagram-E7YTZNPT-DpEVmuWZ.js → pieDiagram-E7YTZNPT-CB8FqRel.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-AXDQQJYC-CcEfCONf.js → quadrantDiagram-AXDQQJYC-CZsQnmHv.js} +1 -1
- package/out/renderer/assets/{railroadDiagram-O6MQD6OU-BWnKKcat.js → railroadDiagram-O6MQD6OU-CtHtwIss.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-BXWQKSXE-B7sPFe0g.js → requirementDiagram-BXWQKSXE-C8IKRBmx.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-P5KCCOFB-ClwzZmCX.js → sankeyDiagram-P5KCCOFB-DxIvac4Q.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-WJ2MYXX4-Dn8StCfr.js → sequenceDiagram-WJ2MYXX4-CW0GnaxQ.js} +1 -1
- package/out/renderer/assets/settings-C-kHWSQ1.js +27 -0
- package/out/renderer/assets/{sizeCapture-INFHLROL-Csrj-WKZ.js → sizeCapture-INFHLROL-CUNNzORL.js} +1 -1
- package/out/renderer/assets/{stateDiagram-D77RDMKH-CuJq0aAV.js → stateDiagram-D77RDMKH-b6LNqPfN.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-CwGKVtdP.js +1 -0
- package/out/renderer/assets/{swimlanes-42K2YHIH-CjyTBmUr.js → swimlanes-42K2YHIH-C2Pjkv6k.js} +1 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-BqwKnfw9.js +8 -0
- package/out/renderer/assets/{timeline-definition-24CTP7MA-BSTk1WRZ.js → timeline-definition-24CTP7MA-DVo6WWfn.js} +1 -1
- package/out/renderer/assets/{vennDiagram-4TSXK5OY-oO2Udqo9.js → vennDiagram-4TSXK5OY-I_UOGgKE.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-VM6X3IG4-C27UPHbe.js → wardleyDiagram-VM6X3IG4-pgaJTE-_.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-S5SC5T6Z-_SQkHfU0.js → xychartDiagram-S5SC5T6Z-C0CTpbX7.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 +1795 -366
- package/out/server/chunks/{agent-BlAuVqNp.js → agent-2QNVhuY3.js} +749 -191
- package/out/server/chunks/{gpuBackendInstall-C-ypqydV.js → gpuBackendInstall-BsVsFpgX.js} +5 -5
- package/out/server/chunks/{loadProvider-CQUR_oho.js → loadProvider-BdIE3W6z.js} +2 -2
- package/out/server/chunks/{manifest-CojWIAHB.js → manifest-VLS5iL-K.js} +30 -4
- package/out/server/chunks/{workflowPresets-DQ3QX6Ju.js → workflowPresets-BJwuORhf.js} +764 -291
- package/out/server/index.js +51030 -36062
- package/out/server/plugin-host.js +59 -3
- package/package.json +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-K5Dyn6vg.js +0 -1
- package/out/phone/assets/channel-C0dO6zWg.js +0 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CWPX0UEe.js +0 -1
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CWPX0UEe.js +0 -1
- package/out/phone/assets/desk-9dPB4fYu.js +0 -2
- package/out/phone/assets/eventmodeling-NTZA5JFV-_H7VbKRu.js +0 -1
- package/out/phone/assets/flowDiagram-HODETNUW-HeI2O8Jm.js +0 -1
- package/out/phone/assets/main-DNRbLxEx.css +0 -1
- package/out/phone/assets/main-QdYtohlX.js +0 -1643
- package/out/phone/assets/railroad-abnf-HS5TGJTU-Df9jtRyX.js +0 -1
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-vjjsvYjl.js +0 -1
- package/out/phone/assets/railroad-peg-WCYAUIDC-DrKQG8aR.js +0 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-g06bNGjI.js +0 -1
- package/out/phone/assets/storage-p-WxHA1h.js +0 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-CwlfCnnJ.js +0 -8
- package/out/renderer/assets/channel-AuDXnH14.js +0 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-D8JIsdAI.js +0 -1
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-D8JIsdAI.js +0 -1
- package/out/renderer/assets/globals-BJ2xID1e.js +0 -2539
- package/out/renderer/assets/globals-l3kDGoYH.css +0 -1
- package/out/renderer/assets/index-CHNrHypo.js +0 -117
- package/out/renderer/assets/settings-CUBQyINw.js +0 -34
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-CXFPvfab.js +0 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-D83-vEQi.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",
|
|
@@ -1030,7 +1073,11 @@ const PLUGIN_HOST_APIS = [
|
|
|
1030
1073
|
/** 在发起会话的项目里新建会话并切过去;args { text?, presetId? },presetId 只能填本插件的预设 */
|
|
1031
1074
|
"session.create",
|
|
1032
1075
|
/** 开关本进程的回合结束订阅;args { on },权限同 session.status */
|
|
1033
|
-
"session.watchTurnEnd"
|
|
1076
|
+
"session.watchTurnEnd",
|
|
1077
|
+
/** 用发起会话的模型跑一个只读代理;args { runId, prompt, systemPrompt?, context?, timeoutMs? },进度与结果经 agent-run 推送 */
|
|
1078
|
+
"agent.run",
|
|
1079
|
+
/** 取消本插件发起的代理;args { runId } */
|
|
1080
|
+
"agent.cancel"
|
|
1034
1081
|
];
|
|
1035
1082
|
const PREFIX = "plugin_";
|
|
1036
1083
|
const SEPARATOR = "__";
|
|
@@ -1069,7 +1116,7 @@ function resolvePiProviderBaseUrl(api, baseUrl) {
|
|
|
1069
1116
|
const base = baseUrl.trim().replace(/\/+$/, "") || DEFAULT_BASE_URLS[api];
|
|
1070
1117
|
return api === "google-generative-ai" ? withVersionSegment(base, "v1beta") : base;
|
|
1071
1118
|
}
|
|
1072
|
-
function record(value) {
|
|
1119
|
+
function record$1(value) {
|
|
1073
1120
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
1074
1121
|
}
|
|
1075
1122
|
function validUrl(value) {
|
|
@@ -1081,7 +1128,7 @@ function validUrl(value) {
|
|
|
1081
1128
|
}
|
|
1082
1129
|
}
|
|
1083
1130
|
function parseImageGenerationConfig(value) {
|
|
1084
|
-
const raw = record(value);
|
|
1131
|
+
const raw = record$1(value);
|
|
1085
1132
|
if (!raw) return null;
|
|
1086
1133
|
if (Object.keys(raw).some(
|
|
1087
1134
|
(key) => !["providerId", "modelId", "protocol", "baseUrl", "apiKey"].includes(key)
|
|
@@ -1129,7 +1176,7 @@ function imageModels(provider) {
|
|
|
1129
1176
|
}
|
|
1130
1177
|
function resolveImageGenerationConfig(ref, providers) {
|
|
1131
1178
|
if (ref === null || ref === void 0) return { config: null };
|
|
1132
|
-
const raw = record(ref);
|
|
1179
|
+
const raw = record$1(ref);
|
|
1133
1180
|
if (!raw || typeof raw.providerId !== "string" || typeof raw.modelId !== "string")
|
|
1134
1181
|
return { config: null, error: "Invalid image generation model selection" };
|
|
1135
1182
|
const provider = providers.find((p) => p?.id === raw.providerId);
|
|
@@ -1141,6 +1188,7 @@ const LOCAL_IMAGE_SCHEME = "local-image";
|
|
|
1141
1188
|
const POSIX_HOST = "posix";
|
|
1142
1189
|
const REMOTE_FETCH_HOST = "remote-fetch";
|
|
1143
1190
|
const BOT_AVATAR_HOST = "bot-avatar";
|
|
1191
|
+
const SECRETARY_AVATAR_HOST = "secretary-avatar";
|
|
1144
1192
|
const PLUGIN_ASSET_HOST = "plugin-asset";
|
|
1145
1193
|
const IMAGE_EXTENSIONS = [
|
|
1146
1194
|
"png",
|
|
@@ -1169,7 +1217,7 @@ function isVideoPath(pathOrUrl) {
|
|
|
1169
1217
|
}
|
|
1170
1218
|
function localImageUrlToPath(url) {
|
|
1171
1219
|
const host = url.hostname;
|
|
1172
|
-
if (!host || host === REMOTE_FETCH_HOST || host === BOT_AVATAR_HOST || host === PLUGIN_ASSET_HOST)
|
|
1220
|
+
if (!host || host === REMOTE_FETCH_HOST || host === BOT_AVATAR_HOST || host === SECRETARY_AVATAR_HOST || host === PLUGIN_ASSET_HOST)
|
|
1173
1221
|
return null;
|
|
1174
1222
|
const segments = url.pathname.split("/").filter(Boolean).map(decodeURIComponent);
|
|
1175
1223
|
if (host === POSIX_HOST) {
|
|
@@ -1590,6 +1638,491 @@ function parseRtkToolStats(value) {
|
|
|
1590
1638
|
}
|
|
1591
1639
|
return result;
|
|
1592
1640
|
}
|
|
1641
|
+
const NAME_RE = /^[a-z0-9]+(-[a-z0-9]+)*$/u;
|
|
1642
|
+
const SKILL_NAME_MAX = 48;
|
|
1643
|
+
const SKILL_DESCRIPTION_MAX = 1024;
|
|
1644
|
+
const SKILL_BODY_MAX = 2e4;
|
|
1645
|
+
function isSecretarySlug(value) {
|
|
1646
|
+
return typeof value === "string" && value.length <= SKILL_NAME_MAX && NAME_RE.test(value);
|
|
1647
|
+
}
|
|
1648
|
+
const isSecretarySkillName = isSecretarySlug;
|
|
1649
|
+
function parseSecretarySkillDraft(value) {
|
|
1650
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
1651
|
+
return { ok: false, error: "invalid skill" };
|
|
1652
|
+
}
|
|
1653
|
+
const record2 = value;
|
|
1654
|
+
const name = typeof record2.name === "string" ? record2.name.trim() : "";
|
|
1655
|
+
if (!isSecretarySkillName(name)) return { ok: false, error: "invalid skill name" };
|
|
1656
|
+
const description = typeof record2.description === "string" ? record2.description.trim() : "";
|
|
1657
|
+
if (!description || description.length > SKILL_DESCRIPTION_MAX || /[\r\n]/u.test(description)) {
|
|
1658
|
+
return { ok: false, error: "invalid skill description" };
|
|
1659
|
+
}
|
|
1660
|
+
const body = typeof record2.body === "string" ? record2.body.trim() : "";
|
|
1661
|
+
if (!body || body.length > SKILL_BODY_MAX) return { ok: false, error: "invalid skill body" };
|
|
1662
|
+
return { ok: true, draft: { name, description, body } };
|
|
1663
|
+
}
|
|
1664
|
+
function renderSecretarySkillFile(draft) {
|
|
1665
|
+
const frontmatter = stringify({ name: draft.name, description: draft.description });
|
|
1666
|
+
return `---
|
|
1667
|
+
${frontmatter}---
|
|
1668
|
+
|
|
1669
|
+
${draft.body}
|
|
1670
|
+
`;
|
|
1671
|
+
}
|
|
1672
|
+
function parseSecretarySkillFile(raw) {
|
|
1673
|
+
const text = raw.replace(/^\uFEFF/u, "");
|
|
1674
|
+
if (!text.startsWith("---")) return null;
|
|
1675
|
+
const end = text.indexOf("\n---", 3);
|
|
1676
|
+
if (end < 0) return null;
|
|
1677
|
+
let fields;
|
|
1678
|
+
try {
|
|
1679
|
+
fields = parse(text.slice(3, end));
|
|
1680
|
+
} catch {
|
|
1681
|
+
return null;
|
|
1682
|
+
}
|
|
1683
|
+
if (!fields || typeof fields !== "object") return null;
|
|
1684
|
+
const { name, description } = fields;
|
|
1685
|
+
const parsed = parseSecretarySkillDraft({
|
|
1686
|
+
name,
|
|
1687
|
+
description,
|
|
1688
|
+
body: text.slice(end + 4)
|
|
1689
|
+
});
|
|
1690
|
+
return parsed.ok ? parsed.draft : null;
|
|
1691
|
+
}
|
|
1692
|
+
const TOOL_DESCRIPTION_MAX = 1024;
|
|
1693
|
+
const TOOL_PARAMETERS_MAX = 8 * 1024;
|
|
1694
|
+
const TOOL_CODE_MAX = 5e4;
|
|
1695
|
+
const TOOL_TIMEOUT_DEFAULT = 60;
|
|
1696
|
+
const TOOL_TIMEOUT_MAX = 300;
|
|
1697
|
+
const TOOL_DESCRIPTOR_MAX = 50;
|
|
1698
|
+
const TOOL_OUTPUT_MAX = 2e4;
|
|
1699
|
+
const TOOL_RUN_TIMEOUT_MS = (TOOL_TIMEOUT_MAX + 5) * 1e3;
|
|
1700
|
+
const TOOL_ID_RE = /^my_[a-z0-9]+(_[a-z0-9]+)*$/u;
|
|
1701
|
+
const TOOL_ID_MAX = 60;
|
|
1702
|
+
const DESCRIPTOR_KEYS = ["name", "description", "parameters", "readOnly"];
|
|
1703
|
+
function secretaryToolScriptFile(runtime) {
|
|
1704
|
+
return runtime === "python" ? "main.py" : "main.mjs";
|
|
1705
|
+
}
|
|
1706
|
+
function secretaryToolId(name) {
|
|
1707
|
+
return `my_${name.replace(/-/gu, "_")}`;
|
|
1708
|
+
}
|
|
1709
|
+
function record(value) {
|
|
1710
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
1711
|
+
}
|
|
1712
|
+
function validToolParameters(parameters) {
|
|
1713
|
+
const fields = parameters.properties === void 0 ? {} : record(parameters.properties);
|
|
1714
|
+
if (!fields) return false;
|
|
1715
|
+
if (!Object.values(fields).every((value) => record(value) !== null)) return false;
|
|
1716
|
+
const required = parameters.required;
|
|
1717
|
+
if (required === void 0) return true;
|
|
1718
|
+
return Array.isArray(required) && required.every((name) => typeof name === "string" && Object.hasOwn(fields, name));
|
|
1719
|
+
}
|
|
1720
|
+
function parseSecretaryToolDraft(value) {
|
|
1721
|
+
const fields = record(value);
|
|
1722
|
+
if (!fields) return { ok: false, error: "invalid tool" };
|
|
1723
|
+
const name = typeof fields.name === "string" ? fields.name.trim() : "";
|
|
1724
|
+
if (!isSecretarySlug(name)) return { ok: false, error: "invalid tool name" };
|
|
1725
|
+
const description = typeof fields.description === "string" ? fields.description.trim() : "";
|
|
1726
|
+
if (!description || description.length > TOOL_DESCRIPTION_MAX || /[\r\n]/u.test(description)) {
|
|
1727
|
+
return { ok: false, error: "invalid tool description" };
|
|
1728
|
+
}
|
|
1729
|
+
const runtime = fields.runtime;
|
|
1730
|
+
if (runtime !== "python" && runtime !== "node") {
|
|
1731
|
+
return { ok: false, error: "invalid tool runtime" };
|
|
1732
|
+
}
|
|
1733
|
+
const parameters = record(fields.parameters);
|
|
1734
|
+
if (parameters?.type !== "object" || !validToolParameters(parameters)) {
|
|
1735
|
+
return { ok: false, error: "invalid tool parameters" };
|
|
1736
|
+
}
|
|
1737
|
+
let serialized;
|
|
1738
|
+
try {
|
|
1739
|
+
serialized = JSON.stringify(parameters);
|
|
1740
|
+
} catch {
|
|
1741
|
+
return { ok: false, error: "invalid tool parameters" };
|
|
1742
|
+
}
|
|
1743
|
+
if (serialized.length > TOOL_PARAMETERS_MAX) {
|
|
1744
|
+
return { ok: false, error: "invalid tool parameters" };
|
|
1745
|
+
}
|
|
1746
|
+
const readOnly = fields.readOnly === void 0 ? false : fields.readOnly;
|
|
1747
|
+
if (typeof readOnly !== "boolean") return { ok: false, error: "invalid tool readOnly" };
|
|
1748
|
+
const timeout = fields.timeoutSec;
|
|
1749
|
+
if (timeout !== void 0 && timeout !== null && (typeof timeout !== "number" || !Number.isInteger(timeout) || timeout < 1 || timeout > TOOL_TIMEOUT_MAX)) {
|
|
1750
|
+
return { ok: false, error: "invalid tool timeout" };
|
|
1751
|
+
}
|
|
1752
|
+
const code = typeof fields.code === "string" ? fields.code.trim() : "";
|
|
1753
|
+
if (!code || code.length > TOOL_CODE_MAX) return { ok: false, error: "invalid tool code" };
|
|
1754
|
+
return {
|
|
1755
|
+
ok: true,
|
|
1756
|
+
draft: {
|
|
1757
|
+
name,
|
|
1758
|
+
description,
|
|
1759
|
+
runtime,
|
|
1760
|
+
parameters,
|
|
1761
|
+
readOnly,
|
|
1762
|
+
...typeof timeout === "number" ? { timeoutSec: timeout } : {},
|
|
1763
|
+
code
|
|
1764
|
+
}
|
|
1765
|
+
};
|
|
1766
|
+
}
|
|
1767
|
+
function renderSecretaryToolFile(draft) {
|
|
1768
|
+
const { code: _code, ...meta } = draft;
|
|
1769
|
+
return `${JSON.stringify(meta, null, 2)}
|
|
1770
|
+
`;
|
|
1771
|
+
}
|
|
1772
|
+
function parseSecretaryToolFile(raw, code) {
|
|
1773
|
+
let fields;
|
|
1774
|
+
try {
|
|
1775
|
+
fields = JSON.parse(raw.replace(/^\uFEFF/u, ""));
|
|
1776
|
+
} catch {
|
|
1777
|
+
return null;
|
|
1778
|
+
}
|
|
1779
|
+
const parsed = parseSecretaryToolDraft({ ...record(fields) ?? {}, code });
|
|
1780
|
+
return parsed.ok ? parsed.draft : null;
|
|
1781
|
+
}
|
|
1782
|
+
function secretaryToolDescriptor(draft) {
|
|
1783
|
+
return {
|
|
1784
|
+
name: secretaryToolId(draft.name),
|
|
1785
|
+
description: draft.description,
|
|
1786
|
+
parameters: draft.parameters,
|
|
1787
|
+
readOnly: draft.readOnly
|
|
1788
|
+
};
|
|
1789
|
+
}
|
|
1790
|
+
function parseSecretaryToolDescriptors(value) {
|
|
1791
|
+
if (!Array.isArray(value) || value.length > TOOL_DESCRIPTOR_MAX) return null;
|
|
1792
|
+
const out = [];
|
|
1793
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1794
|
+
for (const entry of value) {
|
|
1795
|
+
const fields = record(entry);
|
|
1796
|
+
if (!fields || Object.keys(fields).length !== DESCRIPTOR_KEYS.length) return null;
|
|
1797
|
+
if (!DESCRIPTOR_KEYS.every((key) => key in fields)) return null;
|
|
1798
|
+
const name = fields.name;
|
|
1799
|
+
const description = fields.description;
|
|
1800
|
+
const parameters = record(fields.parameters);
|
|
1801
|
+
const readOnly = fields.readOnly;
|
|
1802
|
+
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") {
|
|
1803
|
+
return null;
|
|
1804
|
+
}
|
|
1805
|
+
seen.add(name);
|
|
1806
|
+
out.push({ name, description, parameters, readOnly });
|
|
1807
|
+
}
|
|
1808
|
+
return out;
|
|
1809
|
+
}
|
|
1810
|
+
const WINDOWS_LOCAL_SHELLS = ["auto", "powershell", "bash"];
|
|
1811
|
+
function parseWindowsLocalShell(value) {
|
|
1812
|
+
return typeof value === "string" && WINDOWS_LOCAL_SHELLS.includes(value) ? value : "auto";
|
|
1813
|
+
}
|
|
1814
|
+
const WORKSPACE_WRITE_TOOL_ID = "workspace_write";
|
|
1815
|
+
function childProfileToolIds(tools, options = {}) {
|
|
1816
|
+
const editMode = options.editMode ?? "apply_patch";
|
|
1817
|
+
const shell = options.shell ?? "bash";
|
|
1818
|
+
const ids = ["read", "grep", "find", "ls"];
|
|
1819
|
+
if (tools === "all" && options.workspaceWrite !== false) {
|
|
1820
|
+
ids.push(shell);
|
|
1821
|
+
if (editMode === "apply_patch") ids.push("apply_patch");
|
|
1822
|
+
else ids.push("edit", "write");
|
|
1823
|
+
}
|
|
1824
|
+
ids.push("message_main_agent", "message_coworker");
|
|
1825
|
+
if (options.exploreFold) ids.push("explore_mark", "explore_fold");
|
|
1826
|
+
if (options.isolatedSandbox !== false) ids.push("codemode");
|
|
1827
|
+
return ids;
|
|
1828
|
+
}
|
|
1829
|
+
function childProfileShell(input) {
|
|
1830
|
+
if (input.remote) return "bash";
|
|
1831
|
+
if (input.platform !== "win32") return "bash";
|
|
1832
|
+
return parseWindowsLocalShell(input.preference) === "bash" ? "bash" : "powershell";
|
|
1833
|
+
}
|
|
1834
|
+
const WEB_SEARCH_CHAIN_MAX = 8;
|
|
1835
|
+
function isXaiResponsesHost(baseUrl) {
|
|
1836
|
+
try {
|
|
1837
|
+
return new URL(baseUrl).hostname === "api.x.ai";
|
|
1838
|
+
} catch {
|
|
1839
|
+
return false;
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
function nativeSearchKindFor(api, baseUrl) {
|
|
1843
|
+
switch (api) {
|
|
1844
|
+
case "anthropic-messages":
|
|
1845
|
+
return "anthropic";
|
|
1846
|
+
case "openai-responses":
|
|
1847
|
+
return "responses";
|
|
1848
|
+
case "openai-codex-responses":
|
|
1849
|
+
return "codex";
|
|
1850
|
+
case "google-generative-ai":
|
|
1851
|
+
return "gemini";
|
|
1852
|
+
case "google-antigravity":
|
|
1853
|
+
// antigravity.ts 的 ANTIGRAVITY_API_ID:provider 注册进 pi runtime 后,
|
|
1854
|
+
// composeModelProvider 会用 config.api 给每个模型盖戳,registry 里 Antigravity
|
|
1855
|
+
// 模型实际携带的是带 -cca 后缀的 id。漏认会被「no native web search support」
|
|
1856
|
+
// 静默跳过——请求都发不出去。
|
|
1857
|
+
case "google-antigravity-cca":
|
|
1858
|
+
return "antigravity";
|
|
1859
|
+
case "openai-completions":
|
|
1860
|
+
return isXaiResponsesHost(baseUrl) ? "responses" : void 0;
|
|
1861
|
+
default:
|
|
1862
|
+
return void 0;
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
function isWebSearchChainEntry(value) {
|
|
1866
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
1867
|
+
const entry = value;
|
|
1868
|
+
return typeof entry.providerId === "string" && entry.providerId.trim() !== "" && typeof entry.modelId === "string" && entry.modelId.trim() !== "";
|
|
1869
|
+
}
|
|
1870
|
+
function parseWebSearchChain(value) {
|
|
1871
|
+
if (!Array.isArray(value)) return [];
|
|
1872
|
+
const out = [];
|
|
1873
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1874
|
+
for (const item of value) {
|
|
1875
|
+
if (!isWebSearchChainEntry(item)) continue;
|
|
1876
|
+
const providerId = item.providerId.trim();
|
|
1877
|
+
const modelId = item.modelId.trim();
|
|
1878
|
+
const key = `${providerId}
|
|
1879
|
+
${modelId}`;
|
|
1880
|
+
if (seen.has(key)) continue;
|
|
1881
|
+
seen.add(key);
|
|
1882
|
+
out.push({ providerId, modelId });
|
|
1883
|
+
if (out.length >= WEB_SEARCH_CHAIN_MAX) break;
|
|
1884
|
+
}
|
|
1885
|
+
return out;
|
|
1886
|
+
}
|
|
1887
|
+
const BUILTIN_TOOLS = [
|
|
1888
|
+
{
|
|
1889
|
+
id: "image_generation",
|
|
1890
|
+
name: "ImageGen",
|
|
1891
|
+
description: "Generate images with the configured image model and save them to the session scratch directory"
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
id: "subagent",
|
|
1895
|
+
name: "Subagent",
|
|
1896
|
+
description: "Unified agents: delegate one-shot tasks or keep persistent coworkers under Main control"
|
|
1897
|
+
},
|
|
1898
|
+
{
|
|
1899
|
+
id: "workflow",
|
|
1900
|
+
name: "Workflow",
|
|
1901
|
+
description: "Run a JavaScript workflow that fans work out across subagents. Live status appears in the side panel."
|
|
1902
|
+
},
|
|
1903
|
+
{ id: "todo", name: "Todo", description: "Task list: track progress on multi-step work" },
|
|
1904
|
+
{
|
|
1905
|
+
id: "plan",
|
|
1906
|
+
name: "Plan mode",
|
|
1907
|
+
description: "Plan mode: research read-only, submit a plan for approval, then carry it out after approval"
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
id: "ask_user",
|
|
1911
|
+
name: "Ask user",
|
|
1912
|
+
description: "Ask the user a question and wait for an answer (options / timeout)"
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
id: "browser",
|
|
1916
|
+
name: "Browser",
|
|
1917
|
+
description: "Built-in browser: open pages in Enso's own Chromium, read snapshots, click and type by ref"
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
id: "web",
|
|
1921
|
+
name: "Web search",
|
|
1922
|
+
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"
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
id: "background_tasks",
|
|
1926
|
+
name: "Background tasks",
|
|
1927
|
+
description: "Background shell task: run long commands in the background and notify on completion"
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
id: "memory",
|
|
1931
|
+
name: "Memory",
|
|
1932
|
+
description: "Long-term memory: the agent can search, capture and consolidate durable decisions, preferences and lessons across sessions"
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
id: "turn_discard",
|
|
1936
|
+
name: "Turn discard",
|
|
1937
|
+
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"
|
|
1938
|
+
},
|
|
1939
|
+
{
|
|
1940
|
+
id: "isolated_sandbox",
|
|
1941
|
+
name: "Isolated sandbox",
|
|
1942
|
+
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."
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
id: "computer",
|
|
1946
|
+
name: "Computer",
|
|
1947
|
+
description: "Host desktop: list windows, screenshot, accessibility tree, and input. Default off. Not the built-in browser."
|
|
1948
|
+
}
|
|
1949
|
+
];
|
|
1950
|
+
const DEFAULT_DISABLED_BUILTIN_TOOLS = ["memory", "computer"];
|
|
1951
|
+
const COMPUTER_DEFAULT_OFF_SETTINGS_VERSION = 14;
|
|
1952
|
+
function withComputerDisabled(entry) {
|
|
1953
|
+
if (!Array.isArray(entry.disabledBuiltinTools)) return entry;
|
|
1954
|
+
const list = entry.disabledBuiltinTools.filter((id) => typeof id === "string");
|
|
1955
|
+
return list.includes("computer") ? entry : { ...entry, disabledBuiltinTools: [...list, "computer"] };
|
|
1956
|
+
}
|
|
1957
|
+
function addComputerDefaultOff(state) {
|
|
1958
|
+
const migrated = withComputerDisabled(state);
|
|
1959
|
+
if (!Array.isArray(migrated.projects)) return migrated;
|
|
1960
|
+
return {
|
|
1961
|
+
...migrated,
|
|
1962
|
+
projects: migrated.projects.map(
|
|
1963
|
+
(project) => project && typeof project === "object" && !Array.isArray(project) ? withComputerDisabled(project) : project
|
|
1964
|
+
)
|
|
1965
|
+
};
|
|
1966
|
+
}
|
|
1967
|
+
function persistedSettingsState(persisted) {
|
|
1968
|
+
if (!persisted || typeof persisted !== "object" || Array.isArray(persisted)) return void 0;
|
|
1969
|
+
const { state, version } = persisted;
|
|
1970
|
+
if (!state || typeof state !== "object" || Array.isArray(state)) return void 0;
|
|
1971
|
+
const current = typeof version === "number" ? version : 0;
|
|
1972
|
+
const record2 = state;
|
|
1973
|
+
const base = current < COMPUTER_DEFAULT_OFF_SETTINGS_VERSION ? addComputerDefaultOff(record2) : record2;
|
|
1974
|
+
if (base.webSearchChain === void 0) return base;
|
|
1975
|
+
return { ...base, webSearchChain: parseWebSearchChain(base.webSearchChain) };
|
|
1976
|
+
}
|
|
1977
|
+
function effectiveSubagentAllowedModes(configured, disabledBuiltinTools) {
|
|
1978
|
+
if (Array.isArray(configured)) {
|
|
1979
|
+
const selected = new Set(
|
|
1980
|
+
configured.filter(
|
|
1981
|
+
(mode) => mode === "task" || mode === "coworker"
|
|
1982
|
+
)
|
|
1983
|
+
);
|
|
1984
|
+
return ["task", "coworker"].filter((mode) => selected.has(mode));
|
|
1985
|
+
}
|
|
1986
|
+
const disabled = new Set(
|
|
1987
|
+
Array.isArray(disabledBuiltinTools) ? disabledBuiltinTools.filter((id) => typeof id === "string") : []
|
|
1988
|
+
);
|
|
1989
|
+
return ["task", "coworker"].filter(
|
|
1990
|
+
(mode) => !disabled.has(mode === "task" ? "subagent" : "coworker")
|
|
1991
|
+
);
|
|
1992
|
+
}
|
|
1993
|
+
function effectiveDisabledBuiltinTools(disabled) {
|
|
1994
|
+
return Array.isArray(disabled) ? disabled.filter((id) => typeof id === "string") : [...DEFAULT_DISABLED_BUILTIN_TOOLS];
|
|
1995
|
+
}
|
|
1996
|
+
function resolveDisabledBuiltinTools(globalDisabled, project) {
|
|
1997
|
+
return Array.isArray(project?.disabledBuiltinTools) ? effectiveDisabledBuiltinTools(project.disabledBuiltinTools) : effectiveDisabledBuiltinTools(globalDisabled);
|
|
1998
|
+
}
|
|
1999
|
+
function projectDisabledBuiltinTools(projects, projectId) {
|
|
2000
|
+
if (!projectId || !Array.isArray(projects)) return void 0;
|
|
2001
|
+
for (const entry of projects) {
|
|
2002
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) continue;
|
|
2003
|
+
const record2 = entry;
|
|
2004
|
+
if (record2.id === projectId) return record2.disabledBuiltinTools;
|
|
2005
|
+
}
|
|
2006
|
+
return void 0;
|
|
2007
|
+
}
|
|
2008
|
+
const SILENT_MARKER = "<secretary-silent/>";
|
|
2009
|
+
const SILENCE_TURN_TOOL = "silence_turn";
|
|
2010
|
+
function messageText(message) {
|
|
2011
|
+
const content = message.content;
|
|
2012
|
+
if (typeof content === "string") return content;
|
|
2013
|
+
if (!Array.isArray(content)) return "";
|
|
2014
|
+
return content.map((part) => {
|
|
2015
|
+
if (!part || typeof part !== "object") return "";
|
|
2016
|
+
const text = part.text;
|
|
2017
|
+
return part.type === "text" && typeof text === "string" ? text : "";
|
|
2018
|
+
}).join("");
|
|
2019
|
+
}
|
|
2020
|
+
function isPureSessionUpdate(text) {
|
|
2021
|
+
if (!/<session-updates>|<secretary-schedule>/.test(text)) return false;
|
|
2022
|
+
const stripped = text.replace(/<session-updates>[\s\S]*?<\/session-updates>/g, "").replace(/<secretary-schedule>[\s\S]*?<\/secretary-schedule>/g, "").trim();
|
|
2023
|
+
return stripped.length === 0;
|
|
2024
|
+
}
|
|
2025
|
+
function isSilentMarker(text) {
|
|
2026
|
+
return text.trim() === SILENT_MARKER;
|
|
2027
|
+
}
|
|
2028
|
+
function calledSilenceTurn(message) {
|
|
2029
|
+
if (message.toolName === SILENCE_TURN_TOOL) return true;
|
|
2030
|
+
if (message.role !== "assistant" || !Array.isArray(message.content)) return false;
|
|
2031
|
+
return message.content.some((part) => {
|
|
2032
|
+
if (!part || typeof part !== "object") return false;
|
|
2033
|
+
const record2 = part;
|
|
2034
|
+
return record2.type === "toolCall" && record2.name === SILENCE_TURN_TOOL;
|
|
2035
|
+
});
|
|
2036
|
+
}
|
|
2037
|
+
function turnCalledSilenceTurn(messages, fromIndex = 0) {
|
|
2038
|
+
return messages.slice(Math.max(0, fromIndex)).some((message) => calledSilenceTurn(message));
|
|
2039
|
+
}
|
|
2040
|
+
function shouldSilenceTurn(userText, assistantText, calledSilence = false) {
|
|
2041
|
+
return isPureSessionUpdate(userText) && (calledSilence || isSilentMarker(assistantText));
|
|
2042
|
+
}
|
|
2043
|
+
function turnRequestedSilence(messages, fromIndex = 0) {
|
|
2044
|
+
const turn = messages.slice(Math.max(0, fromIndex));
|
|
2045
|
+
let userText = "";
|
|
2046
|
+
let assistantText = "";
|
|
2047
|
+
let called = false;
|
|
2048
|
+
for (const message of turn) {
|
|
2049
|
+
if (calledSilenceTurn(message)) called = true;
|
|
2050
|
+
if (message.role === "user") {
|
|
2051
|
+
const text = messageText(message);
|
|
2052
|
+
if (text) userText = userText ? `${userText}
|
|
2053
|
+
${text}` : text;
|
|
2054
|
+
} else if (message.role === "assistant") {
|
|
2055
|
+
const text = messageText(message).trim();
|
|
2056
|
+
if (text) assistantText = text;
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
return shouldSilenceTurn(userText, assistantText, called);
|
|
2060
|
+
}
|
|
2061
|
+
function sessionIdsInUpdates(text) {
|
|
2062
|
+
return [...text.matchAll(/session:([0-9a-z-]+)/gi)].map((match) => match[1]);
|
|
2063
|
+
}
|
|
2064
|
+
const SECRETARY_OPS = [
|
|
2065
|
+
"project_list",
|
|
2066
|
+
"project_info",
|
|
2067
|
+
"repo_status",
|
|
2068
|
+
"session_list",
|
|
2069
|
+
"session_read",
|
|
2070
|
+
"session_tasks",
|
|
2071
|
+
"session_activity",
|
|
2072
|
+
"session_create",
|
|
2073
|
+
"session_send",
|
|
2074
|
+
"session_queue_list",
|
|
2075
|
+
"session_queue_cancel",
|
|
2076
|
+
"session_stop",
|
|
2077
|
+
"session_task_stop",
|
|
2078
|
+
"session_archive",
|
|
2079
|
+
"result_mark_done",
|
|
2080
|
+
"result_mark_undo",
|
|
2081
|
+
"session_answer",
|
|
2082
|
+
"session_takeover_propose",
|
|
2083
|
+
"image_view",
|
|
2084
|
+
"cleanup_list",
|
|
2085
|
+
"cleanup_apply",
|
|
2086
|
+
"todo_list",
|
|
2087
|
+
"todo_item_add",
|
|
2088
|
+
"todo_item_update",
|
|
2089
|
+
"todo_item_dispatch",
|
|
2090
|
+
"schedule_add",
|
|
2091
|
+
"schedule_list",
|
|
2092
|
+
"schedule_remove",
|
|
2093
|
+
"secretary_profile_propose",
|
|
2094
|
+
"skill_propose",
|
|
2095
|
+
"tool_propose"
|
|
2096
|
+
];
|
|
2097
|
+
const SECRETARY_SEND_MODES = ["queue", "steer"];
|
|
2098
|
+
const SECRETARY_INTERNAL_OPS = ["tool_run"];
|
|
2099
|
+
const SECRETARY_ID_MAX = 200;
|
|
2100
|
+
const SECRETARY_SESSION_MESSAGE_MAX = 8e3;
|
|
2101
|
+
const SECRETARY_ATTACHMENT_MAX = 5;
|
|
2102
|
+
const SECRETARY_ATTACHMENT_PATH_MAX = 1024;
|
|
2103
|
+
const SECRETARY_TOOL_ALLOWLIST = /* @__PURE__ */ new Set([
|
|
2104
|
+
...SECRETARY_OPS,
|
|
2105
|
+
// worker 本地只读工具:按 spawn 时实际加载的 skill 表读 SKILL.md,不碰任意路径
|
|
2106
|
+
"skill_read",
|
|
2107
|
+
"ask_user",
|
|
2108
|
+
SILENCE_TURN_TOOL,
|
|
2109
|
+
"web_search",
|
|
2110
|
+
"web_fetch",
|
|
2111
|
+
"memory_search",
|
|
2112
|
+
"memory_capture",
|
|
2113
|
+
"memory_crystallize",
|
|
2114
|
+
"memory_delete"
|
|
2115
|
+
]);
|
|
2116
|
+
function isSecretaryToolAllowed(name, extraToolNames) {
|
|
2117
|
+
return SECRETARY_TOOL_ALLOWLIST.has(name) || extraToolNames?.has(name) === true;
|
|
2118
|
+
}
|
|
2119
|
+
const ALLOWED_BUILTIN_GROUPS = /* @__PURE__ */ new Set(["ask_user", "web", "memory"]);
|
|
2120
|
+
const SECRETARY_FORCED_DISABLED_TOOLS = [
|
|
2121
|
+
...BUILTIN_TOOLS.map((tool) => tool.id).filter((id) => !ALLOWED_BUILTIN_GROUPS.has(id)),
|
|
2122
|
+
WORKSPACE_WRITE_TOOL_ID,
|
|
2123
|
+
"goal"
|
|
2124
|
+
];
|
|
2125
|
+
const SECRETARY_ALWAYS_ENABLED_TOOLS = ["memory"];
|
|
1593
2126
|
const SHELL_QUIET_MS = 15e3;
|
|
1594
2127
|
const SHELL_LIMITS = Object.freeze({
|
|
1595
2128
|
yieldDefaultMs: 45e3,
|
|
@@ -1733,63 +2266,6 @@ function cleanToolBatchLabel(text) {
|
|
|
1733
2266
|
if (!label || /^(error\b|i cannot\b|i can't\b|sorry\b)/i.test(label)) return void 0;
|
|
1734
2267
|
return clip(label, LABEL_CHARS);
|
|
1735
2268
|
}
|
|
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
2269
|
const EDIT_MODES = ["replace", "apply_patch"];
|
|
1794
2270
|
function isEditMode(value) {
|
|
1795
2271
|
return typeof value === "string" && EDIT_MODES.includes(value);
|
|
@@ -2023,6 +2499,7 @@ const BROWSER_OPS = [
|
|
|
2023
2499
|
];
|
|
2024
2500
|
const MEMORY_OPS = ["search", "capture", "crystallize", "delete"];
|
|
2025
2501
|
const COMPUTER_OPS = ["run"];
|
|
2502
|
+
const ASK_ANSWER_BY = ["user", "relay", "timeout"];
|
|
2026
2503
|
const APPROVAL_DECISIONS = ["allow", "allowSession", "deny", "revise", "review"];
|
|
2027
2504
|
function isApprovalDecision(value) {
|
|
2028
2505
|
return APPROVAL_DECISIONS.includes(value);
|
|
@@ -2757,12 +3234,14 @@ function parseAgentCommand(value) {
|
|
|
2757
3234
|
"mcpServers",
|
|
2758
3235
|
"pluginCommands",
|
|
2759
3236
|
"pluginTools",
|
|
3237
|
+
"secretaryTools",
|
|
2760
3238
|
"workflowPresetFiles",
|
|
2761
3239
|
"pluginEvents",
|
|
2762
3240
|
"pluginHooks",
|
|
2763
3241
|
"instruction",
|
|
2764
3242
|
"approvalMode",
|
|
2765
3243
|
"autoRejectApprovals",
|
|
3244
|
+
"askRelay",
|
|
2766
3245
|
"approvalReviewer",
|
|
2767
3246
|
"approvalReviewerClassifier",
|
|
2768
3247
|
"approvalReviewerManaged",
|
|
@@ -2783,6 +3262,7 @@ function parseAgentCommand(value) {
|
|
|
2783
3262
|
"botGroupTasks",
|
|
2784
3263
|
"botDiscussMode",
|
|
2785
3264
|
"botRoutines",
|
|
3265
|
+
"secretaryMode",
|
|
2786
3266
|
"botDelegationTask",
|
|
2787
3267
|
"botWriteLock",
|
|
2788
3268
|
"protectedActions",
|
|
@@ -2790,11 +3270,11 @@ function parseAgentCommand(value) {
|
|
|
2790
3270
|
"instanceId"
|
|
2791
3271
|
]) || !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
3272
|
(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(
|
|
3273
|
+
)) || 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
3274
|
(entry) => typeof entry === "string" && entry.length > 0 && entry.length <= 1024
|
|
2795
3275
|
)) || 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
3276
|
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)) {
|
|
3277
|
+
) || 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
3278
|
return null;
|
|
2799
3279
|
}
|
|
2800
3280
|
return value;
|
|
@@ -2883,6 +3363,8 @@ function parseAgentCommand(value) {
|
|
|
2883
3363
|
return hasExactKeys(value, ["type", "identity", "text", "urgent"]) && parseSessionIdentity(value.identity) && isNonEmptyString(value.text) && typeof value.urgent === "boolean" ? value : null;
|
|
2884
3364
|
case "set-approval-mode":
|
|
2885
3365
|
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;
|
|
3366
|
+
case "set-ask-relay":
|
|
3367
|
+
return hasOnlyKeys(value, ["type", "identity", "relay"]) && parseAnySessionIdentity(value.identity) && (value.relay === void 0 || isRecord(value.relay) && isNonEmptyString(value.relay.name)) ? value : null;
|
|
2886
3368
|
case "set-plan-mode":
|
|
2887
3369
|
return hasExactKeys(value, ["type", "identity", "active"]) && parseSessionIdentity(value.identity) && typeof value.active === "boolean" ? value : null;
|
|
2888
3370
|
case "plan-respond":
|
|
@@ -2912,7 +3394,7 @@ function parseAgentCommand(value) {
|
|
|
2912
3394
|
case "set-model-directory":
|
|
2913
3395
|
return hasExactKeys(value, ["type", "snapshot", "customProviders"]) ? value : null;
|
|
2914
3396
|
case "ask-respond":
|
|
2915
|
-
return
|
|
3397
|
+
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
3398
|
case "browser-result":
|
|
2917
3399
|
case "memory-result":
|
|
2918
3400
|
case "delegation-result":
|
|
@@ -2924,6 +3406,13 @@ function parseAgentCommand(value) {
|
|
|
2924
3406
|
const shapeOk = value.ok ? value.error === void 0 : isNonEmptyString(value.error) && value.result === void 0;
|
|
2925
3407
|
return shapeOk ? value : null;
|
|
2926
3408
|
}
|
|
3409
|
+
case "secretary-result": {
|
|
3410
|
+
if (!hasOnlyKeys(value, ["type", "identity", "requestId", "ok", "result", "error"]) || !parseSessionIdentity(value.identity) || !isNonEmptyString(value.requestId) || typeof value.ok !== "boolean") {
|
|
3411
|
+
return null;
|
|
3412
|
+
}
|
|
3413
|
+
const shapeOk = value.ok ? value.error === void 0 : isNonEmptyString(value.error) && value.result === void 0;
|
|
3414
|
+
return shapeOk ? value : null;
|
|
3415
|
+
}
|
|
2927
3416
|
case "plugin-intercept-result": {
|
|
2928
3417
|
if (!hasOnlyKeys(value, ["type", "identity", "requestId", "ok", "result", "error"]) || !parseSessionIdentity(value.identity) || !isNonEmptyString(value.requestId) || typeof value.ok !== "boolean") {
|
|
2929
3418
|
return null;
|
|
@@ -2989,6 +3478,19 @@ function parseAgentCommand(value) {
|
|
|
2989
3478
|
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
3479
|
case "plugin-mcp-cancel":
|
|
2991
3480
|
return hasExactKeys(value, ["type", "requestId"]) && isNonEmptyString(value.requestId) ? { type: "plugin-mcp-cancel", requestId: value.requestId } : null;
|
|
3481
|
+
case "plugin-agent-run":
|
|
3482
|
+
return hasOnlyKeys(value, [
|
|
3483
|
+
"type",
|
|
3484
|
+
"requestId",
|
|
3485
|
+
"identity",
|
|
3486
|
+
"prompt",
|
|
3487
|
+
"systemPrompt",
|
|
3488
|
+
"context",
|
|
3489
|
+
"timeoutMs",
|
|
3490
|
+
"model"
|
|
3491
|
+
]) && 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;
|
|
3492
|
+
case "plugin-agent-cancel":
|
|
3493
|
+
return hasExactKeys(value, ["type", "requestId"]) && isNonEmptyString(value.requestId) ? { type: "plugin-agent-cancel", requestId: value.requestId } : null;
|
|
2992
3494
|
case "set-proxy-env": {
|
|
2993
3495
|
if (!hasExactKeys(value, ["type", "env"]) || !isRecord(value.env)) return null;
|
|
2994
3496
|
for (const entry of Object.values(value.env)) {
|
|
@@ -3056,6 +3558,12 @@ function parseAgentWorkerEvent(value) {
|
|
|
3056
3558
|
return hasExactKeys(value, ["type", "requestId", "ok", "value"]) ? value : null;
|
|
3057
3559
|
return value.ok === false && hasExactKeys(value, ["type", "requestId", "ok", "error"]) && isNonEmptyString(value.error) ? value : null;
|
|
3058
3560
|
}
|
|
3561
|
+
if (value.type === "plugin-agent-event") {
|
|
3562
|
+
if (!hasExactKeys(value, ["type", "requestId", "event"]) || !isNonEmptyString(value.requestId))
|
|
3563
|
+
return null;
|
|
3564
|
+
const event = parsePluginAgentRunEvent(value.event);
|
|
3565
|
+
return event ? { type: "plugin-agent-event", requestId: value.requestId, event } : null;
|
|
3566
|
+
}
|
|
3059
3567
|
if (value.type === "session-reloaded") {
|
|
3060
3568
|
if (!hasExactKeys(value, ["type", "requestId", "result"]) || !isNonEmptyString(value.requestId) || !isRecord(value.result))
|
|
3061
3569
|
return null;
|
|
@@ -3121,6 +3629,8 @@ function parseAgentWorkerEvent(value) {
|
|
|
3121
3629
|
return hasExactKeys(value, ["type", "identity", "seq", "requestId", "op", "params"]) && isNonEmptyString(value.requestId) && MEMORY_OPS.includes(value.op) ? value : null;
|
|
3122
3630
|
case "delegation-invoke":
|
|
3123
3631
|
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;
|
|
3632
|
+
case "secretary-invoke":
|
|
3633
|
+
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
3634
|
case "computer-invoke":
|
|
3125
3635
|
return hasExactKeys(value, ["type", "identity", "seq", "requestId", "op", "params"]) && isNonEmptyString(value.requestId) && COMPUTER_OPS.includes(value.op) ? value : null;
|
|
3126
3636
|
case "computer-cancel":
|
|
@@ -3155,11 +3665,11 @@ function parseAgentWorkerEvent(value) {
|
|
|
3155
3665
|
case "delivery-deferred":
|
|
3156
3666
|
return hasExactKeys(value, ["type", "identity", "seq", "deliveryId"]) && isDeliveryId(value.deliveryId) ? value : null;
|
|
3157
3667
|
case "status":
|
|
3158
|
-
return value.status === "idle" || value.status === "running" || value.status === "failed" ? value : null;
|
|
3668
|
+
return (value.status === "idle" || value.status === "running" || value.status === "failed") && (value.turnId === void 0 || isNonEmptyString(value.turnId)) ? value : null;
|
|
3159
3669
|
case "message-upsert":
|
|
3160
3670
|
return isSequence(value.index) && isRecord(value.message) && hasValidProjectedMetadata(value.message) ? value : null;
|
|
3161
3671
|
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;
|
|
3672
|
+
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
3673
|
case "turn-failed":
|
|
3164
3674
|
return isNonEmptyString(value.turnId) && isNonEmptyString(value.error) && (value.undelivered === void 0 || value.undelivered === true) && (value.retryExhausted === void 0 || value.retryExhausted === true) ? value : null;
|
|
3165
3675
|
case "turn-retry":
|
|
@@ -3192,10 +3702,11 @@ function parseAgentWorkerEvent(value) {
|
|
|
3192
3702
|
case "approval-request":
|
|
3193
3703
|
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
3704
|
case "approval-resolved":
|
|
3195
|
-
case "ask-resolved":
|
|
3196
3705
|
return isNonEmptyString(value.requestId) ? value : null;
|
|
3706
|
+
case "ask-resolved":
|
|
3707
|
+
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
3708
|
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;
|
|
3709
|
+
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
3710
|
case "subagent-update":
|
|
3200
3711
|
return isRecord(value.agent) ? value : null;
|
|
3201
3712
|
case "coworker-update":
|
|
@@ -3226,127 +3737,174 @@ function parseAgentWorkerEvent(value) {
|
|
|
3226
3737
|
}
|
|
3227
3738
|
}
|
|
3228
3739
|
export {
|
|
3229
|
-
|
|
3740
|
+
isClassifierOnlyProvider as $,
|
|
3230
3741
|
AGENT_END_TEXT_MAX as A,
|
|
3231
3742
|
BEFORE_AGENT_START_PROMPT_MAX as B,
|
|
3232
3743
|
CONTEXT_OCCUPANCY_BUCKETS as C,
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3744
|
+
workspaceBranchChangedNote as D,
|
|
3745
|
+
DEFAULT_MAX_ACTIVE_COWORKERS as E,
|
|
3746
|
+
DEFAULT_AUTO_RETRY_LIMIT as F,
|
|
3747
|
+
isSameChildSessionIdentity as G,
|
|
3748
|
+
resolveCompactStrategy as H,
|
|
3749
|
+
DEFAULT_SSH_TIMEOUT_SECONDS as I,
|
|
3750
|
+
isSecretaryToolAllowed as J,
|
|
3751
|
+
PLAN_ENTRY_TYPE as K,
|
|
3752
|
+
autoRetryOverrides as L,
|
|
3242
3753
|
MODEL_API_KINDS as M,
|
|
3243
|
-
|
|
3244
|
-
|
|
3754
|
+
parseAgentSessionCustomEntry as N,
|
|
3755
|
+
PLUGIN_AGENT_ARGS_MAX_CHARS as O,
|
|
3245
3756
|
PLUGIN_MESSAGE_TYPE as P,
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3757
|
+
PLUGIN_AGENT_TEXT_MAX_CHARS as Q,
|
|
3758
|
+
toolBatchDigest as R,
|
|
3759
|
+
SECRETARY_OPS as S,
|
|
3760
|
+
THINKING_LEVELS as T,
|
|
3761
|
+
turnRequestedSilence as U,
|
|
3762
|
+
turnCalledSilenceTurn as V,
|
|
3763
|
+
STALE_SESSION_ERROR as W,
|
|
3764
|
+
WORKSPACE_WRITE_TOOL_ID as X,
|
|
3765
|
+
splitPlanPrefix as Y,
|
|
3766
|
+
parsePlanMessage as Z,
|
|
3767
|
+
PLUGIN_AGENT_OUTPUT_MAX_CHARS as _,
|
|
3257
3768
|
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
|
-
|
|
3769
|
+
parseSecretarySkillDraft as a$,
|
|
3770
|
+
isOauthAccountPool as a0,
|
|
3771
|
+
resolveEditMode as a1,
|
|
3772
|
+
EMPTY_PLAN_STATE as a2,
|
|
3773
|
+
mergeMaskReports as a3,
|
|
3774
|
+
PRIVACY_MASK_ENTRY as a4,
|
|
3775
|
+
parseAgentCommand as a5,
|
|
3776
|
+
pluginToolName as a6,
|
|
3777
|
+
APPROVAL_MODES as a7,
|
|
3778
|
+
parseChildConversationMetadata as a8,
|
|
3779
|
+
eligibleOauthPoolAccountKeys as a9,
|
|
3780
|
+
BEFORE_COMPACT_TIMEOUT_MS as aA,
|
|
3781
|
+
PLUGIN_PROGRESS_MAX_CHARS as aB,
|
|
3782
|
+
MCP_TRANSPORTS as aC,
|
|
3783
|
+
persistedSettingsState as aD,
|
|
3784
|
+
parsePrivacyMaskRecord as aE,
|
|
3785
|
+
hasProviderCredentials as aF,
|
|
3786
|
+
parseAgentWorkerEvent as aG,
|
|
3787
|
+
SECRETARY_FORCED_DISABLED_TOOLS as aH,
|
|
3788
|
+
parseWindowsLocalShell as aI,
|
|
3789
|
+
parseSmartCompactMode as aJ,
|
|
3790
|
+
SECRETARY_ALWAYS_ENABLED_TOOLS as aK,
|
|
3791
|
+
resolveImageGenerationConfig as aL,
|
|
3792
|
+
normalizeMaxActiveCoworkers as aM,
|
|
3793
|
+
normalizeAutoRetryLimit as aN,
|
|
3794
|
+
parsePrivacyMaskSettings as aO,
|
|
3795
|
+
parseDisabledWorkflowPresets as aP,
|
|
3796
|
+
DEFAULT_APPROVAL_ALLOW_THRESHOLD as aQ,
|
|
3797
|
+
visibleMemberAgentTypes as aR,
|
|
3798
|
+
buildAgentTypeRegistrySnapshot as aS,
|
|
3799
|
+
resolveShellLimits as aT,
|
|
3800
|
+
parseWebSearchChain as aU,
|
|
3801
|
+
DEFAULT_PRESET_ID as aV,
|
|
3802
|
+
childProfileToolIds as aW,
|
|
3803
|
+
AGENT_WAIT_DEFAULT_MS as aX,
|
|
3804
|
+
AGENT_WAIT_MAX_MS as aY,
|
|
3805
|
+
effectiveDisabledBuiltinTools as aZ,
|
|
3806
|
+
isDeliveryId as a_,
|
|
3807
|
+
normalizeSshTimeoutSeconds as aa,
|
|
3808
|
+
isEditMode as ab,
|
|
3809
|
+
resolveDisabledBuiltinTools as ac,
|
|
3810
|
+
projectDisabledBuiltinTools as ad,
|
|
3811
|
+
CLAUDE_HOOK_EVENTS as ae,
|
|
3812
|
+
isReservedAgentTypeName as af,
|
|
3813
|
+
BUILTIN_AGENT_TYPES as ag,
|
|
3814
|
+
isPluginEntry as ah,
|
|
3815
|
+
PLUGIN_HOST_APIS as ai,
|
|
3816
|
+
PLUGIN_AGENT_RUN_ID as aj,
|
|
3817
|
+
PLUGIN_AGENT_PROMPT_MAX_CHARS as ak,
|
|
3818
|
+
PLUGIN_AGENT_SYSTEM_MAX_CHARS as al,
|
|
3819
|
+
PLUGIN_AGENT_DEFAULT_TIMEOUT_MS as am,
|
|
3820
|
+
PLUGIN_AGENT_MAX_TIMEOUT_MS as an,
|
|
3821
|
+
PLUGIN_INJECT_MAX_CHARS as ao,
|
|
3822
|
+
parsePluginInjectImages as ap,
|
|
3823
|
+
isHostPluginEvent as aq,
|
|
3824
|
+
parsePluginToolName as ar,
|
|
3825
|
+
initialInterceptState as as,
|
|
3826
|
+
CHILD_INTERCEPT_TOTAL_TIMEOUT_MS as at,
|
|
3827
|
+
INTERCEPT_TOTAL_TIMEOUT_MS as au,
|
|
3828
|
+
CHILD_INTERCEPT_TIMEOUT_MS as av,
|
|
3829
|
+
INTERCEPT_TIMEOUT_MS as aw,
|
|
3830
|
+
applyInterceptResult as ax,
|
|
3831
|
+
failClosedResult as ay,
|
|
3832
|
+
OBSERVE_TIMEOUT_MS as az,
|
|
3322
3833
|
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
|
-
|
|
3834
|
+
PLAN_TITLE_MAX as b$,
|
|
3835
|
+
parseSecretaryToolDraft as b0,
|
|
3836
|
+
secretaryToolDescriptor as b1,
|
|
3837
|
+
isSecretarySlug as b2,
|
|
3838
|
+
secretaryToolScriptFile as b3,
|
|
3839
|
+
parseSecretaryToolFile as b4,
|
|
3840
|
+
renderSecretaryToolFile as b5,
|
|
3841
|
+
TOOL_TIMEOUT_DEFAULT as b6,
|
|
3842
|
+
TOOL_OUTPUT_MAX as b7,
|
|
3843
|
+
isSecretarySkillName as b8,
|
|
3844
|
+
parseSecretarySkillFile as b9,
|
|
3845
|
+
parseSelectProjectAuthorityRequest as bA,
|
|
3846
|
+
parseRemoveProjectAuthorityRequest as bB,
|
|
3847
|
+
withVersionSegment as bC,
|
|
3848
|
+
DEFAULT_BASE_URLS as bD,
|
|
3849
|
+
shouldSilenceTurn as bE,
|
|
3850
|
+
sessionIdsInUpdates as bF,
|
|
3851
|
+
messageText as bG,
|
|
3852
|
+
isPureSessionUpdate as bH,
|
|
3853
|
+
PROJECTED_FILE_TEXT_LIMIT as bI,
|
|
3854
|
+
imageGenerationPreviewPaths as bJ,
|
|
3855
|
+
parseGeneratedImagePaths as bK,
|
|
3856
|
+
parseMaskReport as bL,
|
|
3857
|
+
parsePluginMessageSource as bM,
|
|
3858
|
+
parseRtkToolStats as bN,
|
|
3859
|
+
isBackgroundTaskId as bO,
|
|
3860
|
+
parseShellFailure as bP,
|
|
3861
|
+
pluginArtifactsFromToolDetails as bQ,
|
|
3862
|
+
parseApprovalReviewRecord as bR,
|
|
3863
|
+
PROJECTED_FILE_CHANGE_LIMIT as bS,
|
|
3864
|
+
PROJECTED_APPLY_PATCH_PATH_TEXT_LIMIT as bT,
|
|
3865
|
+
PROJECTED_APPLY_PATCH_PATH_COUNT_LIMIT as bU,
|
|
3866
|
+
foldPlanState as bV,
|
|
3867
|
+
PLAN_MODE_ON_NOTE as bW,
|
|
3868
|
+
PLAN_MODE_OFF_NOTE as bX,
|
|
3869
|
+
planFeedbackText as bY,
|
|
3870
|
+
planKickoffText as bZ,
|
|
3871
|
+
activePlanNote as b_,
|
|
3872
|
+
renderSecretarySkillFile as ba,
|
|
3873
|
+
LOCAL_IMAGE_SCHEME as bb,
|
|
3874
|
+
REMOTE_FETCH_HOST as bc,
|
|
3875
|
+
BOT_AVATAR_HOST as bd,
|
|
3876
|
+
SECRETARY_AVATAR_HOST as be,
|
|
3877
|
+
PLUGIN_ASSET_HOST as bf,
|
|
3878
|
+
mediaExtension as bg,
|
|
3879
|
+
localImageUrlToPath as bh,
|
|
3880
|
+
isMediaPath as bi,
|
|
3881
|
+
isVideoPath as bj,
|
|
3882
|
+
IMAGE_EXTENSIONS as bk,
|
|
3883
|
+
effectiveSubagentAllowedModes as bl,
|
|
3884
|
+
parseCreateConversationAuthorityRequest as bm,
|
|
3885
|
+
parseConversationAuthorityRequest as bn,
|
|
3886
|
+
parseUpdateConversationSelectionRequest as bo,
|
|
3887
|
+
parseTitleSummaryInput as bp,
|
|
3888
|
+
parseParentSourceBindingRequest as bq,
|
|
3889
|
+
parseParentModelSelectionRequest as br,
|
|
3890
|
+
parseAgentDispatchRequest as bs,
|
|
3891
|
+
isApprovalDecision as bt,
|
|
3892
|
+
cleanToolBatchLabel as bu,
|
|
3893
|
+
toolBatchLabelPrompt as bv,
|
|
3894
|
+
TOOL_BATCH_LABEL_SYSTEM_PROMPT as bw,
|
|
3895
|
+
SHELL_LIMITS as bx,
|
|
3896
|
+
TITLE_SUMMARY_MAX_CANDIDATES as by,
|
|
3897
|
+
parseCreateProjectAuthorityRequest as bz,
|
|
3349
3898
|
isProbability as c,
|
|
3899
|
+
PLAN_TEXT_MAX as c0,
|
|
3900
|
+
planPhase as c1,
|
|
3901
|
+
parsePlanEntry as c2,
|
|
3902
|
+
parseAgentControlToolRequest as c3,
|
|
3903
|
+
nativeSearchKindFor as c4,
|
|
3904
|
+
isWorkflowPresetId as c5,
|
|
3905
|
+
PLUGIN_EVENTS as c6,
|
|
3906
|
+
isInterceptEvent as c7,
|
|
3907
|
+
APPEND_ONLY_INTERCEPT_EVENTS as c8,
|
|
3350
3908
|
CONTEXT_PART_ITEMS as d,
|
|
3351
3909
|
parseProviderHeaders as e,
|
|
3352
3910
|
escapePiConfigValue as f,
|
|
@@ -3362,13 +3920,13 @@ export {
|
|
|
3362
3920
|
parseChildSessionIdentity as p,
|
|
3363
3921
|
MaskReportBuilder as q,
|
|
3364
3922
|
resolvePiProviderBaseUrl as r,
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3923
|
+
childProfileShell as s,
|
|
3924
|
+
SECRETARY_ID_MAX as t,
|
|
3925
|
+
SECRETARY_ATTACHMENT_MAX as u,
|
|
3926
|
+
SECRETARY_ATTACHMENT_PATH_MAX as v,
|
|
3927
|
+
SECRETARY_SEND_MODES as w,
|
|
3928
|
+
SECRETARY_SESSION_MESSAGE_MAX as x,
|
|
3929
|
+
TOOL_RUN_TIMEOUT_MS as y,
|
|
3930
|
+
SILENCE_TURN_TOOL as z
|
|
3373
3931
|
};
|
|
3374
|
-
//# sourceMappingURL=agent-
|
|
3932
|
+
//# sourceMappingURL=agent-2QNVhuY3.js.map
|