@ensocode/server 0.3.13 → 0.3.15-beta.234
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/README.md +11 -1
- package/out/phone/assets/{EditDiff-B3HxLrbF.js → EditDiff-DlIQ0NvB.js} +1 -1
- package/out/phone/assets/{ReadFileView-BFpGH-kK.js → ReadFileView-hlSV-q1S.js} +1 -1
- package/out/phone/assets/{abnfDiagram-VCTEODGH-BNvyPGoF.js → abnfDiagram-VCTEODGH-cWLl_02_.js} +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-WvHUAPXe.js +1 -0
- package/out/phone/assets/{architectureDiagram-5GKGNRK7-1bhpTEFA.js → architectureDiagram-5GKGNRK7-QEXMUvv5.js} +1 -1
- package/out/phone/assets/{blockDiagram-I7D4REHJ-Bo9UMudu.js → blockDiagram-I7D4REHJ-FzQ3vEDv.js} +1 -1
- package/out/phone/assets/{c4Diagram-7LVT6UL2-YS11cig2.js → c4Diagram-7LVT6UL2-6iRtBvvT.js} +1 -1
- package/out/phone/assets/channel-t2MFK_dg.js +1 -0
- package/out/phone/assets/{chunk-4HAMMTFA-gA-CzNGD.js → chunk-4HAMMTFA-4eZjiClJ.js} +1 -1
- package/out/phone/assets/{chunk-75Z2AOVW-BL_5b1Dw.js → chunk-75Z2AOVW-BTVSMC3k.js} +1 -1
- package/out/phone/assets/{chunk-DU6HZSFF-BpNlAs9R.js → chunk-DU6HZSFF-Ca9U1rWL.js} +1 -1
- package/out/phone/assets/{chunk-F27PBJKO-lsKx96Nt.js → chunk-F27PBJKO-iUczI4_Q.js} +1 -1
- package/out/phone/assets/{chunk-GMAD6QVW-CxbljbtE.js → chunk-GMAD6QVW-DlbCwmvq.js} +1 -1
- package/out/phone/assets/{chunk-GVQU2GXP-CTO3kTOF.js → chunk-GVQU2GXP-DlijzCAw.js} +1 -1
- package/out/phone/assets/{chunk-IMKFNOWR-Cq8XlkcB.js → chunk-IMKFNOWR-B1BOj8O6.js} +1 -1
- package/out/phone/assets/{chunk-L3NEJ4N5-CvIm0JX7.js → chunk-L3NEJ4N5-Fr_w5bRg.js} +1 -1
- package/out/phone/assets/{chunk-OSK3NFVY-Cj3ilTL-.js → chunk-OSK3NFVY-CccDEhXi.js} +1 -1
- package/out/phone/assets/{chunk-P2QGCYS3-B-twI_Fz.js → chunk-P2QGCYS3-Dn46j2El.js} +1 -1
- package/out/phone/assets/{chunk-POPQ4Y6H-lPQttJ5s.js → chunk-POPQ4Y6H-BQchiHrQ.js} +1 -1
- package/out/phone/assets/{chunk-PWAF6VOD-DjwqZuIR.js → chunk-PWAF6VOD-BENw9N2v.js} +1 -1
- package/out/phone/assets/{chunk-SHT3W25Y-BWRVin1H.js → chunk-SHT3W25Y-C93BlEB0.js} +1 -1
- package/out/phone/assets/{chunk-SVP7TREG-CGLhvnsS.js → chunk-SVP7TREG-wfL37BUq.js} +1 -1
- package/out/phone/assets/{chunk-TICWLB2K-DkFUa03q.js → chunk-TICWLB2K-C9-wZ6kk.js} +1 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CM29lfur.js +1 -0
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CM29lfur.js +1 -0
- package/out/phone/assets/{codeHighlighter-jQti-W31.js → codeHighlighter-DQ-g-VWX.js} +1 -1
- package/out/phone/assets/{cynefin-OW5HDTMX-L8oWVu5S.js → cynefin-OW5HDTMX-DamvwfM9.js} +1 -1
- package/out/phone/assets/{cynefinDiagram-5FMLGOSQ-DH8-4p4N.js → cynefinDiagram-5FMLGOSQ-Coz1le1N.js} +1 -1
- package/out/phone/assets/{dagre-GXQ25YYZ-HhLDmcu9.js → dagre-GXQ25YYZ-ByJC9Z6k.js} +1 -1
- package/out/phone/assets/desk-XkzvZXuU.js +70 -0
- package/out/phone/assets/{diagram-S7CK7UJ4-CeIbR3Ir.js → diagram-S7CK7UJ4-BabBefXt.js} +1 -1
- package/out/phone/assets/{diagram-UQ7AKVKN-BQ84Qnq6.js → diagram-UQ7AKVKN-DEX56Otl.js} +1 -1
- package/out/phone/assets/{diagram-VSXAHHWV-aF_J57fD.js → diagram-VSXAHHWV-GeNN1ZwW.js} +1 -1
- package/out/phone/assets/{diagram-VX7I27RA-Bg1ZqM4Y.js → diagram-VX7I27RA-DkclPqXj.js} +1 -1
- package/out/phone/assets/{diagram-Z3DM3KII-DjTkPAqa.js → diagram-Z3DM3KII-CDKrxb7_.js} +1 -1
- package/out/phone/assets/{ebnfDiagram-PWID7BFC-DPsH5Eky.js → ebnfDiagram-PWID7BFC-B-lRq0nU.js} +1 -1
- package/out/phone/assets/{erDiagram-RLTQ6QDP-ExvY7e6T.js → erDiagram-RLTQ6QDP-2PdYpZdI.js} +1 -1
- package/out/phone/assets/eventmodeling-NTZA5JFV-DBO84WXk.js +1 -0
- package/out/phone/assets/flowDiagram-HODETNUW-89Bcp6BV.js +1 -0
- package/out/phone/assets/{ganttDiagram-EL5Y4UJY-hCe06ucl.js → ganttDiagram-EL5Y4UJY-XG84VKNq.js} +1 -1
- package/out/phone/assets/{gitGraph-4MIJSDKK-BuZ6lDat.js → gitGraph-4MIJSDKK-BqrA_WVv.js} +1 -1
- package/out/phone/assets/{gitGraphDiagram-WWUBYQGX-D-8aVxvj.js → gitGraphDiagram-WWUBYQGX-BAIxr-mN.js} +1 -1
- package/out/phone/assets/{info-A6RAGUB7-CrZtdoYs.js → info-A6RAGUB7-DE-jKSbG.js} +1 -1
- package/out/phone/assets/{infoDiagram-27XIBGKW-BLRFHxtO.js → infoDiagram-27XIBGKW-BSTxH5Al.js} +1 -1
- package/out/phone/assets/{ishikawaDiagram-5VMMS53U-D7SYWKoj.js → ishikawaDiagram-5VMMS53U-zOO97Npq.js} +1 -1
- package/out/phone/assets/{journeyDiagram-3NMN7TZE-BPsg7CQD.js → journeyDiagram-3NMN7TZE-dSMVlg_5.js} +1 -1
- package/out/phone/assets/{kanban-definition-UXKFOSKX-CbPuNr-E.js → kanban-definition-UXKFOSKX-DHok-qdM.js} +1 -1
- package/out/phone/assets/{line-CkpKMiqK.js → line-C5TJMvf6.js} +1 -1
- package/out/phone/assets/main-Bk2Gcz5l.css +2 -0
- package/out/phone/assets/main-DNK2uR8l.js +277 -0
- package/out/phone/assets/{mermaid-parser.core-RTq_mEm1.js → mermaid-parser.core-CrJ82mWd.js} +3 -3
- package/out/phone/assets/{mermaid.core-D9LtIKua.js → mermaid.core-CkfKqc8K.js} +4 -4
- package/out/phone/assets/{mindmap-definition-YA3MSWOX-8cGgRiRD.js → mindmap-definition-YA3MSWOX-DD-W0NPL.js} +1 -1
- package/out/phone/assets/{packet-AYTQ26CC-D9-eSn0v.js → packet-AYTQ26CC-DEZk6B2e.js} +1 -1
- package/out/phone/assets/{pegDiagram-XKGWAZYB-DztU_rIE.js → pegDiagram-XKGWAZYB-KND-JwT0.js} +1 -1
- package/out/phone/assets/{pie-WAS4IAKB-Bk2Tqaq_.js → pie-WAS4IAKB-DS5oCOdm.js} +1 -1
- package/out/phone/assets/{pieDiagram-E7YTZNPT-Dm_3mJ9_.js → pieDiagram-E7YTZNPT-CfWh8T4Z.js} +1 -1
- package/out/phone/assets/{quadrantDiagram-AXDQQJYC-lKskzjzu.js → quadrantDiagram-AXDQQJYC-CbquaKYM.js} +1 -1
- package/out/phone/assets/{radar-RG4KPBEZ-B2z8Txd8.js → radar-RG4KPBEZ-C0kqKhsd.js} +1 -1
- package/out/phone/assets/{railroad-74A4TZTK-11VmdALq.js → railroad-74A4TZTK-C5WV19mk.js} +1 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-BqkB5NuR.js +1 -0
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-DF9ncZF9.js +1 -0
- package/out/phone/assets/railroad-peg-WCYAUIDC-CrvTMEVw.js +1 -0
- package/out/phone/assets/{railroadDiagram-O6MQD6OU-Dr0NTIA6.js → railroadDiagram-O6MQD6OU-CmkCOdfu.js} +1 -1
- package/out/phone/assets/{requirementDiagram-BXWQKSXE-C0W6h_5I.js → requirementDiagram-BXWQKSXE-CrQKPUwx.js} +1 -1
- package/out/phone/assets/{sankeyDiagram-P5KCCOFB-CVJDathY.js → sankeyDiagram-P5KCCOFB-CBCG-Eyn.js} +1 -1
- package/out/phone/assets/{sequenceDiagram-WJ2MYXX4-BxHQTG6x.js → sequenceDiagram-WJ2MYXX4-D9oVD380.js} +1 -1
- package/out/phone/assets/shellUpdate-2rxcUhg5.js +5 -0
- package/out/phone/assets/{stateDiagram-D77RDMKH-BO5MAjhs.js → stateDiagram-D77RDMKH-VNnCDAvS.js} +1 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-Qadztnwb.js +1 -0
- package/out/phone/assets/{swimlanes-42K2YHIH-DnhDPyy6.js → swimlanes-42K2YHIH-DFtKlQwi.js} +1 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-BG4PsK7t.js +8 -0
- package/out/phone/assets/{timeline-definition-24CTP7MA-bLEjS7re.js → timeline-definition-24CTP7MA-BwrAy7Qu.js} +1 -1
- package/out/phone/assets/{treeView-Q6P3EWNA-Ci-sA9wK.js → treeView-Q6P3EWNA-BLyQtiYC.js} +1 -1
- package/out/phone/assets/{treemap-WGGIJYW6-BXCjzK65.js → treemap-WGGIJYW6-gub1bjDX.js} +1 -1
- package/out/phone/assets/{vennDiagram-4TSXK5OY-DHsj5dRx.js → vennDiagram-4TSXK5OY-DayfmvoI.js} +1 -1
- package/out/phone/assets/{wardley-WFR3VGLG-d8TdCu-H.js → wardley-WFR3VGLG-B5_pluIE.js} +1 -1
- package/out/phone/assets/{wardleyDiagram-VM6X3IG4-DQFVP9qu.js → wardleyDiagram-VM6X3IG4-CHS5ryk0.js} +1 -1
- package/out/phone/assets/{xychartDiagram-S5SC5T6Z-Dni2Y0ov.js → xychartDiagram-S5SC5T6Z-C21zSdz1.js} +1 -1
- package/out/phone/desk.html +3 -3
- package/out/phone/index.html +4 -4
- package/out/phone/sw.js +2 -2
- package/out/renderer/assets/EditDiff-DJaW24DH.js +1 -0
- package/out/renderer/assets/ReadFileView-B1RfgY1_.js +4 -0
- package/out/renderer/assets/SidePanel-CXOSOIj_.js +48 -0
- package/out/renderer/assets/{SidePanel-D0m4IYxS.css → SidePanel-DN2RL6QD.css} +1 -1
- package/out/renderer/assets/abnfDiagram-VCTEODGH-DteC7eOG.js +1 -0
- package/out/renderer/assets/{arc-B8im8n0O.js → arc-BafilblL.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-5GKGNRK7-BRSi5FBk.js → architectureDiagram-5GKGNRK7-BXxAIsNI.js} +2 -2
- package/out/renderer/assets/{blockDiagram-I7D4REHJ-CQ1wirIl.js → blockDiagram-I7D4REHJ-Bt4I5z76.js} +1 -1
- package/out/renderer/assets/{c4Diagram-7LVT6UL2-9HyLIioe.js → c4Diagram-7LVT6UL2-Dg1rhQSn.js} +1 -1
- package/out/renderer/assets/channel-CpN2DlDo.js +1 -0
- package/out/renderer/assets/{chunk-2Q5K7J3B-BwC9g3bx.js → chunk-2Q5K7J3B-Bea4O-pP.js} +1 -1
- package/out/renderer/assets/{chunk-5VM5RSS4-DMtgxPBL.js → chunk-5VM5RSS4-9g4O6TgX.js} +1 -1
- package/out/renderer/assets/{chunk-F27PBJKO-DSi_XV5v.js → chunk-F27PBJKO-CQFAhmZp.js} +1 -1
- package/out/renderer/assets/{chunk-IMKFNOWR-Dctc6Apj.js → chunk-IMKFNOWR-DZKvnXil.js} +1 -1
- package/out/renderer/assets/{chunk-JWPE2WC7-I2BD5qM7.js → chunk-JWPE2WC7-UkNkhirX.js} +1 -1
- package/out/renderer/assets/{chunk-POPQ4Y6H-k60pc4eT.js → chunk-POPQ4Y6H-D3CSUp94.js} +1 -1
- package/out/renderer/assets/{chunk-SVP7TREG-zCGemfqm.js → chunk-SVP7TREG-F3dgPzel.js} +1 -1
- package/out/renderer/assets/{chunk-TICWLB2K-CdDiHIq-.js → chunk-TICWLB2K-URu59zvj.js} +1 -1
- package/out/renderer/assets/{chunk-XXDRQBXY-GYVDxVfN.js → chunk-XXDRQBXY-DRFxCPER.js} +1 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-D-KG_eK-.js +1 -0
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-D-KG_eK-.js +1 -0
- package/out/renderer/assets/cose-bilkent-JH36ORCC-Bx5VqEhK.js +1 -0
- package/out/renderer/assets/{cynefin-OW5HDTMX-DnQaS9VN.js → cynefin-OW5HDTMX-YKYl0dFh.js} +1 -1
- package/out/renderer/assets/cynefinDiagram-5FMLGOSQ-DaHqCls4.js +62 -0
- package/out/renderer/assets/{dagre-GXQ25YYZ-fG1vMsyn.js → dagre-GXQ25YYZ-CRqSls6Q.js} +1 -1
- package/out/renderer/assets/{diagram-S7CK7UJ4-BcfAFVc2.js → diagram-S7CK7UJ4-_oJhPbvH.js} +1 -1
- package/out/renderer/assets/diagram-UQ7AKVKN-B7P-4UYL.js +41 -0
- package/out/renderer/assets/{diagram-VSXAHHWV-B-U9CIWt.js → diagram-VSXAHHWV--0uBugR7.js} +1 -1
- package/out/renderer/assets/diagram-VX7I27RA-IaMWXRBT.js +24 -0
- package/out/renderer/assets/diagram-Z3DM3KII-BLCY3C4h.js +24 -0
- package/out/renderer/assets/ebnfDiagram-PWID7BFC-CUYHhexz.js +1 -0
- package/out/renderer/assets/{erDiagram-RLTQ6QDP-CfMNvEoW.js → erDiagram-RLTQ6QDP-BIOsECZV.js} +1 -1
- package/out/renderer/assets/{flowDiagram-HODETNUW-C8XM3p4T.js → flowDiagram-HODETNUW-DjggEdce.js} +1 -1
- package/out/renderer/assets/ganttDiagram-EL5Y4UJY-Dik61bQB.js +292 -0
- package/out/renderer/assets/gitGraphDiagram-WWUBYQGX-BrPFNa7W.js +106 -0
- package/out/renderer/assets/index-CtOLwaEJ.css +1 -0
- package/out/renderer/assets/index-mVE4g58q.js +3003 -0
- package/out/renderer/assets/infoDiagram-27XIBGKW-ZfCvFQE5.js +2 -0
- package/out/renderer/assets/{ishikawaDiagram-5VMMS53U-mUoXchkB.js → ishikawaDiagram-5VMMS53U-BhteuTmM.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-3NMN7TZE-zzLL0HFW.js → journeyDiagram-3NMN7TZE-BJyr-G3R.js} +1 -1
- package/out/renderer/assets/{kanban-definition-UXKFOSKX-BJ_9aIhB.js → kanban-definition-UXKFOSKX-CJyl9IUl.js} +1 -1
- package/out/renderer/assets/{layout-3SRMHY7n.js → layout-oTkojEy1.js} +1 -1
- package/out/renderer/assets/{linear-CWpclK_R.js → linear-qICDecPr.js} +1 -1
- package/out/renderer/assets/{mermaid.core-DORpmVi3.js → mermaid.core-F0flUThf.js} +5 -5
- package/out/renderer/assets/{mindmap-definition-YA3MSWOX-CYBlCqIB.js → mindmap-definition-YA3MSWOX-pG7PXlKk.js} +1 -1
- package/out/renderer/assets/pegDiagram-XKGWAZYB-CwO9p66t.js +1 -0
- package/out/renderer/assets/{pieDiagram-E7YTZNPT-Bzpc57-A.js → pieDiagram-E7YTZNPT-BpqTKO7A.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-AXDQQJYC-spKXEbds.js → quadrantDiagram-AXDQQJYC-Ci1QOcG6.js} +1 -1
- package/out/renderer/assets/railroadDiagram-O6MQD6OU-Be-ymk25.js +1 -0
- package/out/renderer/assets/{requirementDiagram-BXWQKSXE-CX-Dqij_.js → requirementDiagram-BXWQKSXE-Dotur23i.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-P5KCCOFB-Bgx1W6B9.js → sankeyDiagram-P5KCCOFB-BlTTRpKU.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-WJ2MYXX4-CKQv6pcU.js → sequenceDiagram-WJ2MYXX4-C_llXVvH.js} +1 -1
- package/out/renderer/assets/{sessionChanges-BLzNhRuv.js → sessionChanges-BpPkx6v0.js} +5 -5
- package/out/renderer/assets/sizeCapture-INFHLROL-xhuCXQI9.js +1 -0
- package/out/renderer/assets/stateDiagram-D77RDMKH-BfESnkCR.js +1 -0
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-C7QWw0La.js +1 -0
- package/out/renderer/assets/swimlanes-42K2YHIH-DX8_KJTt.js +1 -0
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-B7JGQCYf.js +8 -0
- package/out/renderer/assets/{timeline-definition-24CTP7MA-CsZAMmMZ.js → timeline-definition-24CTP7MA-DIoNEHAB.js} +1 -1
- package/out/renderer/assets/{vennDiagram-4TSXK5OY-COQ7L1f7.js → vennDiagram-4TSXK5OY-KrS4uyWo.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-VM6X3IG4-dqMWLTCs.js → wardleyDiagram-VM6X3IG4-D4i6zXyf.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-S5SC5T6Z-DX4clIYP.js → xychartDiagram-S5SC5T6Z-DpCpSTPN.js} +1 -1
- package/out/renderer/index.html +2 -3
- package/out/renderer/web-preload.js +1 -51
- package/out/server/agent.js +1413 -307
- package/out/server/chunks/agentConstants-D4t7d6iS.js +9 -0
- package/out/server/chunks/builtinOccupancy-zo5-z-s5.js +93 -0
- package/out/server/chunks/dispatchModel-D7papgSj.js +76 -0
- package/out/server/chunks/{gpuBackendInstall-jAzoFq7U.js → gpuBackendInstall-xFEdr70P.js} +2 -2
- package/out/server/chunks/killTree-T-p6Lr3w.js +787 -0
- package/out/server/chunks/{loadProvider-NdOVbsHi.js → loadProvider-ChfeR5km.js} +2 -2
- package/out/server/chunks/{manifest-BPXFscqI.js → manifest-CmnE8RBt.js} +4 -2
- package/out/server/chunks/menuSkills-DC4qs2MC.js +54 -0
- package/out/server/chunks/projectCode-BAgpkYYS.js +112 -0
- package/out/server/chunks/{registry-BhoHPSKn.js → registry-G4AKEQtl.js} +98 -116
- package/out/server/chunks/sendImage-BmenO8Vx.js +646 -0
- package/out/server/chunks/{sendImage-BCNW9JRV.js → toolParams-0GakTs9V.js} +25 -234
- package/out/server/chunks/web-9MujZLkq.js +7787 -0
- package/out/server/chunks/{workflowPresets-C2T1BzA2.js → workflowPresets-CTv2r-Sh.js} +13659 -15598
- package/out/server/index.js +10281 -3781
- package/out/server/memory-service.js +205 -148
- package/out/server/plugin-host.js +44 -18
- package/package.json +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-Duql1LsL.js +0 -1
- package/out/phone/assets/channel-BPoIHov1.js +0 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CIR76lHP.js +0 -1
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CIR76lHP.js +0 -1
- package/out/phone/assets/desk-CixRGdTk.js +0 -52
- package/out/phone/assets/eventmodeling-NTZA5JFV-DYp-zWcL.js +0 -1
- package/out/phone/assets/flowDiagram-HODETNUW-CIU32By5.js +0 -1
- package/out/phone/assets/main-BCnf7dVM.js +0 -264
- package/out/phone/assets/main-nqB-uD3v.css +0 -2
- package/out/phone/assets/railroad-abnf-HS5TGJTU-BkSycwye.js +0 -1
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-BsPIU3iV.js +0 -1
- package/out/phone/assets/railroad-peg-WCYAUIDC-Cy8G7u5C.js +0 -1
- package/out/phone/assets/shellUpdate-DPSfgHG3.js +0 -36
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-B8IHc2bm.js +0 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-dmSDAN2F.js +0 -8
- package/out/renderer/assets/EditDiff-DxxLuCEI.js +0 -1
- package/out/renderer/assets/File-Tz3MUtN6.js +0 -1
- package/out/renderer/assets/ReadFileView-DFoLPU04.js +0 -4
- package/out/renderer/assets/SidePanel-CL40W2RY.js +0 -47
- package/out/renderer/assets/Virtualizer-B0uwx_XV.js +0 -1345
- package/out/renderer/assets/abnfDiagram-VCTEODGH-CJ9nn9eH.js +0 -1
- package/out/renderer/assets/channel-DjB0ww6b.js +0 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-6SiAw1np.js +0 -1
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-6SiAw1np.js +0 -1
- package/out/renderer/assets/cose-bilkent-JH36ORCC-BnSAtUh-.js +0 -1
- package/out/renderer/assets/cynefinDiagram-5FMLGOSQ-BNQdw0PV.js +0 -62
- package/out/renderer/assets/cytoscape-fcose-CzkrRInm.js +0 -1
- package/out/renderer/assets/cytoscape.esm-DzSz-X2X.js +0 -321
- package/out/renderer/assets/diagram-UQ7AKVKN-D8f3Tsx9.js +0 -41
- package/out/renderer/assets/diagram-VX7I27RA-CX6ifTkJ.js +0 -24
- package/out/renderer/assets/diagram-Z3DM3KII-49dS9s3L.js +0 -24
- package/out/renderer/assets/ebnfDiagram-PWID7BFC-CraGJRI7.js +0 -1
- package/out/renderer/assets/ganttDiagram-EL5Y4UJY-DlJBMKFX.js +0 -292
- package/out/renderer/assets/gitGraphDiagram-WWUBYQGX-DvEzDsKF.js +0 -106
- package/out/renderer/assets/globals-BFf1P-Y5.js +0 -715
- package/out/renderer/assets/globals-DUBhAVpU.css +0 -1
- package/out/renderer/assets/index-L4TTIP10.js +0 -89
- package/out/renderer/assets/infoDiagram-27XIBGKW-CckfBO-R.js +0 -2
- package/out/renderer/assets/manifest-DOzTaB8J.js +0 -525
- package/out/renderer/assets/pegDiagram-XKGWAZYB-DhWwLs4v.js +0 -1
- package/out/renderer/assets/railroadDiagram-O6MQD6OU-Br553px3.js +0 -1
- package/out/renderer/assets/settings-Bsrw4ERp.js +0 -25
- package/out/renderer/assets/sizeCapture-INFHLROL-DtRedfRe.js +0 -1
- package/out/renderer/assets/stateDiagram-D77RDMKH-CMP5owem.js +0 -1
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-6-731AqJ.js +0 -1
- package/out/renderer/assets/swimlanes-42K2YHIH-D30AvvmW.js +0 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-B8KijqIT.js +0 -8
- package/out/renderer/settings.html +0 -23
- package/out/server/chunks/agent-BbNq8i9j.js +0 -4241
- package/out/server/chunks/dispatchModel-CsfmL396.js +0 -20
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
import { Agent, ProxyAgent, fetch } from "undici";
|
|
2
|
+
const DEFAULT_MASK = "[REDACTED]";
|
|
3
|
+
const NON_SECRET_LITERALS = /* @__PURE__ */ new Set(["true", "false", "null", "undefined"]);
|
|
4
|
+
const SECRET_NAME = "(?<![\\w-])[\\w-]*(?:key|token|secret|password|passwd|pwd|passphrase|authorization|auth|cookie|credentials?|signature)";
|
|
5
|
+
const PEM_PRIVATE_KEY = /-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?(?:-----END [A-Z ]*PRIVATE KEY-----|$)/g;
|
|
6
|
+
const URL_USER_PASS = /\b([a-z][a-z0-9+.-]*:\/\/[^\s/:@]+:)[^\s/@]+@/gi;
|
|
7
|
+
const URL_ANY_CRED = /\b([a-z][a-z0-9+.-]*:\/\/)[^\s/@]+@/gi;
|
|
8
|
+
const COOKIE_HEADER = /(\b(?:Set-)?Cookie\s*:\s*)[^\r\n]+/gi;
|
|
9
|
+
const AUTH_SCHEME = /\b(Bearer|Basic|Token)\s+[A-Za-z0-9._~+/=-]{8,}/gi;
|
|
10
|
+
const PREFIX_PATTERNS = [
|
|
11
|
+
/\bsk-[A-Za-z0-9_-]{8,}/g,
|
|
12
|
+
/\b[sr]k_(?:live|test)_[A-Za-z0-9]{10,}/g,
|
|
13
|
+
/\bgh[opusr]_[A-Za-z0-9]{20,}/g,
|
|
14
|
+
/\bgithub_pat_[A-Za-z0-9_]{20,}/g,
|
|
15
|
+
/\bglpat-[A-Za-z0-9_-]{16,}/g,
|
|
16
|
+
/\bhf_[A-Za-z0-9]{20,}/g,
|
|
17
|
+
/\bxox[abprs]-[A-Za-z0-9-]{10,}/g,
|
|
18
|
+
/\bxai-[A-Za-z0-9_-]{16,}/g,
|
|
19
|
+
/\bgsk_[A-Za-z0-9_-]{16,}/g,
|
|
20
|
+
/\bpplx-[A-Za-z0-9_-]{16,}/g,
|
|
21
|
+
/\bnpm_[A-Za-z0-9]{20,}/g,
|
|
22
|
+
/\bpypi-[A-Za-z0-9_-]{20,}/g,
|
|
23
|
+
/\bSG\.[A-Za-z0-9_-]{16,}\.[A-Za-z0-9_-]{16,}/g,
|
|
24
|
+
/\bAIza[0-9A-Za-z_-]{30,}/g,
|
|
25
|
+
/\bya29\.[0-9A-Za-z._-]{16,}/g,
|
|
26
|
+
/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,
|
|
27
|
+
/\beyJ[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}/g,
|
|
28
|
+
/(?<!\d)\d{6,12}:[A-Za-z0-9_-]{30,}/g
|
|
29
|
+
];
|
|
30
|
+
const ESCAPED_JSON_KV = new RegExp(
|
|
31
|
+
`(${SECRET_NAME}\\\\"\\s*:\\s*\\\\")(?:[^"\\\\]|\\\\(?!"))*(\\\\")`,
|
|
32
|
+
"gi"
|
|
33
|
+
);
|
|
34
|
+
const QUOTED_KV = new RegExp(
|
|
35
|
+
`(${SECRET_NAME}["']?\\s*[:=]\\s*)(["'])(?:\\\\[\\s\\S]|(?!\\2)[^\\\\])*\\2`,
|
|
36
|
+
"gi"
|
|
37
|
+
);
|
|
38
|
+
const BARE_KV = new RegExp(`(${SECRET_NAME}["']?\\s*[:=]\\s*)([^\\s"'&,;}{\\]]+)`, "gi");
|
|
39
|
+
const POSIX_USER_DIR = /(^|[^\w])(\/(?:Users|home)\/)[^/\s"'`<>|]+(?=\/|\\|$|[\s"'`<>|])/g;
|
|
40
|
+
const WIN_USER_DIR_ESCAPED = /(^|[^\w])([A-Za-z]:\\\\Users\\\\)[^\\\s"'`<>|]+(?=\\\\|$|[\s"'`<>|])/gi;
|
|
41
|
+
const WIN_USER_DIR = /(^|[^\w])([A-Za-z]:\\Users\\)[^\\\s"'`<>|]+(?=\\|$|[\s"'`<>|])/gi;
|
|
42
|
+
const EMAIL_PATTERN = /(?<![\w/:-])[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
43
|
+
const CN_PHONE_PATTERN = /(?<![A-Za-z0-9_.-])(?:\+?86[\s-]?)?1[3-9]\d(?:[-\s]?\d{4}){2}(?![A-Za-z0-9_])/g;
|
|
44
|
+
function redactSecrets(text, options = {}) {
|
|
45
|
+
const mask = options.mask ?? DEFAULT_MASK;
|
|
46
|
+
const preserveUrlUser = options.preserveUrlUser ?? true;
|
|
47
|
+
let out = text;
|
|
48
|
+
out = out.replace(PEM_PRIVATE_KEY, mask === DEFAULT_MASK ? mask : `${mask}PRIVATE KEY${mask}`);
|
|
49
|
+
out = out.replace(preserveUrlUser ? URL_USER_PASS : URL_ANY_CRED, `$1${mask}@`);
|
|
50
|
+
out = out.replace(COOKIE_HEADER, `$1${mask}`);
|
|
51
|
+
out = out.replace(AUTH_SCHEME, `$1 ${mask}`);
|
|
52
|
+
for (const pattern of PREFIX_PATTERNS) {
|
|
53
|
+
out = out.replace(pattern, mask);
|
|
54
|
+
}
|
|
55
|
+
out = out.replace(ESCAPED_JSON_KV, `$1${mask}$2`);
|
|
56
|
+
out = out.replace(QUOTED_KV, `$1$2${mask}$2`);
|
|
57
|
+
out = out.replace(BARE_KV, (full, prefix, value, offset, src) => {
|
|
58
|
+
if (value === mask || src.startsWith(mask, offset + prefix.length) || NON_SECRET_LITERALS.has(value.toLowerCase())) {
|
|
59
|
+
return full;
|
|
60
|
+
}
|
|
61
|
+
return `${prefix}${mask}`;
|
|
62
|
+
});
|
|
63
|
+
if (options.redactPii) {
|
|
64
|
+
out = out.replace(POSIX_USER_DIR, "$1$2<user>");
|
|
65
|
+
out = out.replace(WIN_USER_DIR_ESCAPED, "$1$2<user>");
|
|
66
|
+
out = out.replace(WIN_USER_DIR, "$1$2<user>");
|
|
67
|
+
out = out.replace(EMAIL_PATTERN, `${mask}@${mask}`);
|
|
68
|
+
out = out.replace(CN_PHONE_PATTERN, mask);
|
|
69
|
+
}
|
|
70
|
+
return out;
|
|
71
|
+
}
|
|
72
|
+
const DEFAULT_NO_PROXY = "localhost, 127.0.0.1, ::1, 192.168.*.*, 10.*.*.*, *.local, host.docker.internal";
|
|
73
|
+
const PROXY_ENV_KEYS = [
|
|
74
|
+
"http_proxy",
|
|
75
|
+
"https_proxy",
|
|
76
|
+
"HTTP_PROXY",
|
|
77
|
+
"HTTPS_PROXY",
|
|
78
|
+
"GRPC_PROXY",
|
|
79
|
+
"grpc_proxy",
|
|
80
|
+
"no_proxy",
|
|
81
|
+
"NO_PROXY"
|
|
82
|
+
];
|
|
83
|
+
function normalizeProxyMode(value) {
|
|
84
|
+
return value === "none" || value === "custom" || value === "system" ? value : "system";
|
|
85
|
+
}
|
|
86
|
+
function mergeNoProxy(defaultNoProxy, inheritedNoProxy) {
|
|
87
|
+
if (!inheritedNoProxy.trim()) return defaultNoProxy;
|
|
88
|
+
const seen = /* @__PURE__ */ new Set();
|
|
89
|
+
const items = [];
|
|
90
|
+
for (const raw of `${defaultNoProxy},${inheritedNoProxy}`.split(",")) {
|
|
91
|
+
const item = raw.trim();
|
|
92
|
+
if (!item || seen.has(item)) continue;
|
|
93
|
+
seen.add(item);
|
|
94
|
+
items.push(item);
|
|
95
|
+
}
|
|
96
|
+
return items.join(", ");
|
|
97
|
+
}
|
|
98
|
+
function parseResolveProxy(proxyString) {
|
|
99
|
+
const first = proxyString.split(";")[0]?.trim() ?? "";
|
|
100
|
+
if (!first) return null;
|
|
101
|
+
const [protocol, address] = first.split(/\s+/);
|
|
102
|
+
const host = address?.trim();
|
|
103
|
+
if (!host) return null;
|
|
104
|
+
if (protocol === "PROXY") return `http://${host}`;
|
|
105
|
+
if (protocol === "HTTPS") return `https://${host}`;
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
function isValidProxyUrl(url) {
|
|
109
|
+
const trimmed = url.trim();
|
|
110
|
+
if (!trimmed) return false;
|
|
111
|
+
try {
|
|
112
|
+
const parsed = new URL(trimmed);
|
|
113
|
+
return (parsed.protocol === "http:" || parsed.protocol === "https:") && Boolean(parsed.hostname);
|
|
114
|
+
} catch {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function proxyEnvPatchFromEnv(env) {
|
|
119
|
+
return Object.fromEntries(PROXY_ENV_KEYS.map((key) => [key, env[key] ?? null]));
|
|
120
|
+
}
|
|
121
|
+
function proxyEnvPatch(proxyUrl, noProxy) {
|
|
122
|
+
if (!proxyUrl) {
|
|
123
|
+
return Object.fromEntries(PROXY_ENV_KEYS.map((key) => [key, null]));
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
http_proxy: proxyUrl,
|
|
127
|
+
https_proxy: proxyUrl,
|
|
128
|
+
HTTP_PROXY: proxyUrl,
|
|
129
|
+
HTTPS_PROXY: proxyUrl,
|
|
130
|
+
GRPC_PROXY: proxyUrl,
|
|
131
|
+
grpc_proxy: proxyUrl,
|
|
132
|
+
no_proxy: noProxy,
|
|
133
|
+
NO_PROXY: noProxy
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function isRecord(value) {
|
|
137
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
138
|
+
}
|
|
139
|
+
function parseProviderProxy(value) {
|
|
140
|
+
if (value === void 0) return void 0;
|
|
141
|
+
if (!isRecord(value)) return null;
|
|
142
|
+
const keys = Object.keys(value);
|
|
143
|
+
if (value.mode === "none") return keys.length === 1 ? { mode: "none" } : null;
|
|
144
|
+
if (value.mode === "custom" && keys.length === 2 && typeof value.url === "string" && isValidProxyUrl(value.url)) {
|
|
145
|
+
return { mode: "custom", url: value.url.trim() };
|
|
146
|
+
}
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
function normalizeProviderProxy(value) {
|
|
150
|
+
return parseProviderProxy(value) ?? void 0;
|
|
151
|
+
}
|
|
152
|
+
function sameProviderProxy(left, right) {
|
|
153
|
+
const a = normalizeProviderProxy(left);
|
|
154
|
+
const b = normalizeProviderProxy(right);
|
|
155
|
+
if (!a || !b) return a === b;
|
|
156
|
+
return a.mode === b.mode && (a.mode === "none" || a.url === b.url);
|
|
157
|
+
}
|
|
158
|
+
const URL_CREDENTIALS = /\b([a-z][a-z0-9+.-]*:\/\/)[^\s/?#]+@/gi;
|
|
159
|
+
function redactProxyUrlCredentials(text) {
|
|
160
|
+
return text.replace(URL_CREDENTIALS, "$1***@");
|
|
161
|
+
}
|
|
162
|
+
function proxyUrlHasCredentials(url) {
|
|
163
|
+
try {
|
|
164
|
+
const parsed = new URL(url);
|
|
165
|
+
return Boolean(parsed.username || parsed.password);
|
|
166
|
+
} catch {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
const WEB_SEARCH_CHAIN_MAX = 8;
|
|
171
|
+
function isXaiResponsesHost(baseUrl) {
|
|
172
|
+
try {
|
|
173
|
+
return new URL(baseUrl).hostname === "api.x.ai";
|
|
174
|
+
} catch {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
function nativeSearchKindFor(api, baseUrl) {
|
|
179
|
+
switch (api) {
|
|
180
|
+
case "anthropic-messages":
|
|
181
|
+
return "anthropic";
|
|
182
|
+
case "openai-responses":
|
|
183
|
+
return "responses";
|
|
184
|
+
case "openai-codex-responses":
|
|
185
|
+
return "codex";
|
|
186
|
+
case "google-generative-ai":
|
|
187
|
+
return "gemini";
|
|
188
|
+
case "google-antigravity":
|
|
189
|
+
// antigravity.ts 的 ANTIGRAVITY_API_ID:provider 注册进 pi runtime 后,
|
|
190
|
+
// composeModelProvider 会用 config.api 给每个模型盖戳,registry 里 Antigravity
|
|
191
|
+
// 模型实际携带的是带 -cca 后缀的 id。漏认会被「no native web search support」
|
|
192
|
+
// 静默跳过——请求都发不出去。
|
|
193
|
+
case "google-antigravity-cca":
|
|
194
|
+
return "antigravity";
|
|
195
|
+
case "openai-completions":
|
|
196
|
+
return isXaiResponsesHost(baseUrl) ? "responses" : void 0;
|
|
197
|
+
default:
|
|
198
|
+
return void 0;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function isWebSearchChainEntry(value) {
|
|
202
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
203
|
+
const entry = value;
|
|
204
|
+
return typeof entry.providerId === "string" && entry.providerId.trim() !== "" && typeof entry.modelId === "string" && entry.modelId.trim() !== "";
|
|
205
|
+
}
|
|
206
|
+
function parseWebSearchChain(value) {
|
|
207
|
+
if (!Array.isArray(value)) return [];
|
|
208
|
+
const out = [];
|
|
209
|
+
const seen = /* @__PURE__ */ new Set();
|
|
210
|
+
for (const item of value) {
|
|
211
|
+
if (!isWebSearchChainEntry(item)) continue;
|
|
212
|
+
const providerId = item.providerId.trim();
|
|
213
|
+
const modelId = item.modelId.trim();
|
|
214
|
+
const key = `${providerId}
|
|
215
|
+
${modelId}`;
|
|
216
|
+
if (seen.has(key)) continue;
|
|
217
|
+
seen.add(key);
|
|
218
|
+
out.push({ providerId, modelId });
|
|
219
|
+
if (out.length >= WEB_SEARCH_CHAIN_MAX) break;
|
|
220
|
+
}
|
|
221
|
+
return out;
|
|
222
|
+
}
|
|
223
|
+
const BUILTIN_TOOLS = [
|
|
224
|
+
{
|
|
225
|
+
id: "image_generation",
|
|
226
|
+
name: "ImageGen",
|
|
227
|
+
description: "Generate images with the configured image model and save them to the session scratch directory"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
id: "subagent",
|
|
231
|
+
name: "Subagent",
|
|
232
|
+
description: "Unified agents: delegate one-shot tasks or keep persistent coworkers under Main control"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: "workflow",
|
|
236
|
+
name: "Workflow",
|
|
237
|
+
description: "Run a JavaScript workflow that fans work out across subagents. Live status appears in the side panel."
|
|
238
|
+
},
|
|
239
|
+
{ id: "todo", name: "Todo", description: "Task list: track progress on multi-step work" },
|
|
240
|
+
{
|
|
241
|
+
id: "plan",
|
|
242
|
+
name: "Plan mode",
|
|
243
|
+
description: "Plan mode: research read-only, submit a plan for approval, then carry it out after approval"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
id: "ask_user",
|
|
247
|
+
name: "Ask user",
|
|
248
|
+
description: "Ask the user a question and wait for an answer (options / timeout)"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
id: "browser",
|
|
252
|
+
name: "Browser",
|
|
253
|
+
description: "Built-in browser: open pages in Enso's own Chromium, read snapshots, click and type by ref"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: "web",
|
|
257
|
+
name: "Web search",
|
|
258
|
+
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"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
id: "background_tasks",
|
|
262
|
+
name: "Background tasks",
|
|
263
|
+
description: "Background shell task: run long commands in the background and notify on completion"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
id: "memory",
|
|
267
|
+
name: "Memory",
|
|
268
|
+
description: "Long-term memory: the agent can search, capture and consolidate durable decisions, preferences and lessons across sessions"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
id: "turn_discard",
|
|
272
|
+
name: "Turn discard",
|
|
273
|
+
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"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
id: "isolated_sandbox",
|
|
277
|
+
name: "Isolated sandbox",
|
|
278
|
+
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."
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
id: "computer",
|
|
282
|
+
name: "Computer",
|
|
283
|
+
description: "Host desktop: list windows, screenshot, accessibility tree, and input. Default off. Not the built-in browser."
|
|
284
|
+
}
|
|
285
|
+
];
|
|
286
|
+
const DEFAULT_DISABLED_BUILTIN_TOOLS = ["memory", "computer"];
|
|
287
|
+
const COMPUTER_DEFAULT_OFF_SETTINGS_VERSION = 14;
|
|
288
|
+
function withComputerDisabled(entry) {
|
|
289
|
+
if (!Array.isArray(entry.disabledBuiltinTools)) return entry;
|
|
290
|
+
const list = entry.disabledBuiltinTools.filter((id) => typeof id === "string");
|
|
291
|
+
return list.includes("computer") ? entry : { ...entry, disabledBuiltinTools: [...list, "computer"] };
|
|
292
|
+
}
|
|
293
|
+
function addComputerDefaultOff(state) {
|
|
294
|
+
const migrated = withComputerDisabled(state);
|
|
295
|
+
if (!Array.isArray(migrated.projects)) return migrated;
|
|
296
|
+
return {
|
|
297
|
+
...migrated,
|
|
298
|
+
projects: migrated.projects.map(
|
|
299
|
+
(project) => project && typeof project === "object" && !Array.isArray(project) ? withComputerDisabled(project) : project
|
|
300
|
+
)
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
function persistedSettingsState(persisted) {
|
|
304
|
+
if (!persisted || typeof persisted !== "object" || Array.isArray(persisted)) return void 0;
|
|
305
|
+
const { state, version } = persisted;
|
|
306
|
+
if (!state || typeof state !== "object" || Array.isArray(state)) return void 0;
|
|
307
|
+
const current = typeof version === "number" ? version : 0;
|
|
308
|
+
const record = state;
|
|
309
|
+
const base = current < COMPUTER_DEFAULT_OFF_SETTINGS_VERSION ? addComputerDefaultOff(record) : record;
|
|
310
|
+
if (base.webSearchChain === void 0) return base;
|
|
311
|
+
return { ...base, webSearchChain: parseWebSearchChain(base.webSearchChain) };
|
|
312
|
+
}
|
|
313
|
+
function effectiveSubagentAllowedModes(configured, disabledBuiltinTools) {
|
|
314
|
+
if (Array.isArray(configured)) {
|
|
315
|
+
const selected = new Set(
|
|
316
|
+
configured.filter(
|
|
317
|
+
(mode) => mode === "task" || mode === "coworker"
|
|
318
|
+
)
|
|
319
|
+
);
|
|
320
|
+
return ["task", "coworker"].filter((mode) => selected.has(mode));
|
|
321
|
+
}
|
|
322
|
+
const disabled = new Set(
|
|
323
|
+
Array.isArray(disabledBuiltinTools) ? disabledBuiltinTools.filter((id) => typeof id === "string") : []
|
|
324
|
+
);
|
|
325
|
+
return ["task", "coworker"].filter(
|
|
326
|
+
(mode) => !disabled.has(mode === "task" ? "subagent" : "coworker")
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
function effectiveDisabledBuiltinTools(disabled) {
|
|
330
|
+
return Array.isArray(disabled) ? disabled.filter((id) => typeof id === "string") : [...DEFAULT_DISABLED_BUILTIN_TOOLS];
|
|
331
|
+
}
|
|
332
|
+
function resolveDisabledBuiltinTools(globalDisabled, project) {
|
|
333
|
+
return Array.isArray(project?.disabledBuiltinTools) ? effectiveDisabledBuiltinTools(project.disabledBuiltinTools) : effectiveDisabledBuiltinTools(globalDisabled);
|
|
334
|
+
}
|
|
335
|
+
function projectDisabledBuiltinTools(projects, projectId) {
|
|
336
|
+
if (!projectId || !Array.isArray(projects)) return void 0;
|
|
337
|
+
for (const entry of projects) {
|
|
338
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) continue;
|
|
339
|
+
const record = entry;
|
|
340
|
+
if (record.id === projectId) return record.disabledBuiltinTools;
|
|
341
|
+
}
|
|
342
|
+
return void 0;
|
|
343
|
+
}
|
|
344
|
+
const TIMEOUTS = { headersTimeout: 0, bodyTimeout: 0 };
|
|
345
|
+
const MAX_CUSTOM_DISPATCHERS = 16;
|
|
346
|
+
let direct;
|
|
347
|
+
const custom = /* @__PURE__ */ new Map();
|
|
348
|
+
function providerProxyDispatcher(proxy) {
|
|
349
|
+
if (proxy.mode === "none") {
|
|
350
|
+
direct ??= new Agent(TIMEOUTS);
|
|
351
|
+
return direct;
|
|
352
|
+
}
|
|
353
|
+
const cached = custom.get(proxy.url);
|
|
354
|
+
if (cached) {
|
|
355
|
+
custom.delete(proxy.url);
|
|
356
|
+
custom.set(proxy.url, cached);
|
|
357
|
+
return cached;
|
|
358
|
+
}
|
|
359
|
+
const agent = new ProxyAgent({ uri: proxy.url, ...TIMEOUTS });
|
|
360
|
+
custom.set(proxy.url, agent);
|
|
361
|
+
if (custom.size > MAX_CUSTOM_DISPATCHERS) {
|
|
362
|
+
const [oldest, stale] = custom.entries().next().value;
|
|
363
|
+
custom.delete(oldest);
|
|
364
|
+
void stale.close().catch(() => {
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
return agent;
|
|
368
|
+
}
|
|
369
|
+
function providerProxyFetch(proxy) {
|
|
370
|
+
if (!proxy) return void 0;
|
|
371
|
+
return ((input, init) => fetch(input, {
|
|
372
|
+
...init,
|
|
373
|
+
dispatcher: providerProxyDispatcher(proxy)
|
|
374
|
+
}));
|
|
375
|
+
}
|
|
376
|
+
const UNIT_TYPES = [
|
|
377
|
+
"fact",
|
|
378
|
+
"preference",
|
|
379
|
+
"decision",
|
|
380
|
+
"plan",
|
|
381
|
+
"procedure",
|
|
382
|
+
"learning",
|
|
383
|
+
"context",
|
|
384
|
+
"event"
|
|
385
|
+
];
|
|
386
|
+
function isUnitType(value) {
|
|
387
|
+
return UNIT_TYPES.includes(value);
|
|
388
|
+
}
|
|
389
|
+
const DEFAULT_UNIT_TYPE = "fact";
|
|
390
|
+
const DEFAULT_IMPORTANCE = 0.5;
|
|
391
|
+
const AGENT_CREATE_IMPORTANCE = 0.6;
|
|
392
|
+
const HALF_LIFE_DAYS = 30;
|
|
393
|
+
const RECENCY_W = 0.7;
|
|
394
|
+
const FREQUENCY_W = 0.3;
|
|
395
|
+
const FREQUENCY_MAX_COUNT = 100;
|
|
396
|
+
const MIN_FLOOR = 0.3;
|
|
397
|
+
const IMP_MULT = 0.2;
|
|
398
|
+
const DECAY_WEIGHT = 0.15;
|
|
399
|
+
const FORGETTING_DEFAULT_STALE_DAYS = 90;
|
|
400
|
+
const FORGETTING_DEFAULT_MAX_IMPORTANCE = 0.5;
|
|
401
|
+
const FORGETTING_DEFAULT_INTERVAL_DAYS = 7;
|
|
402
|
+
const FORGETTING_STALE_DAYS_MIN = 7;
|
|
403
|
+
const FORGETTING_STALE_DAYS_MAX = 3650;
|
|
404
|
+
const FORGETTING_MAX_IMPORTANCE_MIN = 0.1;
|
|
405
|
+
const FORGETTING_MAX_IMPORTANCE_MAX = 0.9;
|
|
406
|
+
const FORGETTING_INTERVAL_DAYS_MIN = 1;
|
|
407
|
+
const FORGETTING_INTERVAL_DAYS_MAX = 90;
|
|
408
|
+
const TEMPORAL_YEAR_BOOST = 0.1;
|
|
409
|
+
const RRF_K = 60;
|
|
410
|
+
const MMR_LAMBDA = 0.7;
|
|
411
|
+
const DEDUP_VECTOR = 0.8;
|
|
412
|
+
const DEDUP_MAX = 3;
|
|
413
|
+
const DEDUP_MIN_CHARS = 100;
|
|
414
|
+
const EVOLVES_MIN_CONF = 0.7;
|
|
415
|
+
const EVOLVES_RELATIONS = ["replaces", "enriches", "confirms", "challenges"];
|
|
416
|
+
function isEvolvesRelation(value) {
|
|
417
|
+
return EVOLVES_RELATIONS.includes(value);
|
|
418
|
+
}
|
|
419
|
+
const CRYSTAL_MIN_SOURCES = 3;
|
|
420
|
+
const CRYSTAL_BOOST = 1.25;
|
|
421
|
+
const DISTILL_MAX_CHUNK_CHARS = 4e3;
|
|
422
|
+
const DISTILL_SINGLE_EXTRACT_MAX_TOKENS = 1536;
|
|
423
|
+
const DISTILL_EXTRACT_MAX_TOKENS = 1536;
|
|
424
|
+
const DISTILL_CONSOLIDATE_MAX_TOKENS = 1536;
|
|
425
|
+
const DISTILL_MAX_OUTPUT_TOKENS = 3072;
|
|
426
|
+
const DISTILL_MIN_IMPORTANCE = 0.5;
|
|
427
|
+
const DISTILL_MAX_ATTEMPTS = 3;
|
|
428
|
+
const DISTILL_BATCH_MAX_CHARS = DISTILL_MAX_CHUNK_CHARS * 3;
|
|
429
|
+
const KG_MAX_ENTITIES = 10;
|
|
430
|
+
const KG_MAX_RELATIONS = 20;
|
|
431
|
+
const KG_MAX_ENTITY_NAME_CHARS = 100;
|
|
432
|
+
const KG_MAX_DESCRIPTION_CHARS = 300;
|
|
433
|
+
const KG_MAX_LABEL_CHARS = 40;
|
|
434
|
+
const KG_MAX_ATTEMPTS = 3;
|
|
435
|
+
const KG_EXTRACT_MAX_TOKENS = 4096;
|
|
436
|
+
const KG_DEFAULT_ENTITY_TYPE = "CONCEPT";
|
|
437
|
+
const KG_DEFAULT_RELATION_TYPE = "RELATED_TO";
|
|
438
|
+
const READABLE_MESSAGE_MAX_CHARS = 2e3;
|
|
439
|
+
const MESSAGE_CHUNK_MAX = 3e4;
|
|
440
|
+
const END_TAG = "</untrusted-content";
|
|
441
|
+
const OPEN_TAG = "<untrusted-content";
|
|
442
|
+
function wrapUntrusted(source, text) {
|
|
443
|
+
const escaped = text.split(END_TAG).join("<\\/untrusted-content").split(OPEN_TAG).join("<\\untrusted-content");
|
|
444
|
+
return `<untrusted-content source="${source}">${escaped}</untrusted-content>`;
|
|
445
|
+
}
|
|
446
|
+
function unescapeUntrusted(text) {
|
|
447
|
+
return text.split("<\\/untrusted-content").join(END_TAG).split("<\\untrusted-content").join(OPEN_TAG);
|
|
448
|
+
}
|
|
449
|
+
function attrValue(value) {
|
|
450
|
+
return value.replace(/["<>\r\n]/g, "");
|
|
451
|
+
}
|
|
452
|
+
function senderOpenTag(source, sender, role) {
|
|
453
|
+
const attrs = [
|
|
454
|
+
`source="${source}"`,
|
|
455
|
+
`channel="${attrValue(sender.channel)}"`,
|
|
456
|
+
sender.userId ? `sender-id="${attrValue(sender.userId)}"` : "",
|
|
457
|
+
sender.chatId ? `chat-id="${attrValue(sender.chatId)}"` : "",
|
|
458
|
+
sender.displayName ? `sender="${attrValue(sender.displayName)}"` : "",
|
|
459
|
+
`role="${role}"`
|
|
460
|
+
].filter(Boolean);
|
|
461
|
+
return `<untrusted-content ${attrs.join(" ")}>`;
|
|
462
|
+
}
|
|
463
|
+
function wrapPluginDelivery(pluginId, text, meta) {
|
|
464
|
+
const source = `plugin:${pluginId}`;
|
|
465
|
+
const head = `<untrusted-content source="${source}">`;
|
|
466
|
+
const tail = "</untrusted-content>";
|
|
467
|
+
const role = meta?.role;
|
|
468
|
+
const open = meta?.sender ? senderOpenTag(source, meta.sender, role ?? "external") : `<untrusted-content source="${source}" role="${role}">`;
|
|
469
|
+
const own = [head, open].find((tag) => text.startsWith(tag) && text.endsWith(tail));
|
|
470
|
+
const inner = own ? text.slice(own.length, text.length - tail.length) : null;
|
|
471
|
+
const body = inner !== null && !inner.includes(END_TAG) ? inner : text;
|
|
472
|
+
if (open === head) return wrapUntrusted(source, body);
|
|
473
|
+
const escaped = body.split(END_TAG).join("<\\/untrusted-content").split(OPEN_TAG).join("<\\untrusted-content");
|
|
474
|
+
return `${open}${escaped}</untrusted-content>`;
|
|
475
|
+
}
|
|
476
|
+
function readableText(message) {
|
|
477
|
+
return message.content.flatMap((part) => part.type === "text" ? [part.text] : []).join("\n").trim();
|
|
478
|
+
}
|
|
479
|
+
function chunkMessageText(text, offset = 0) {
|
|
480
|
+
const totalChars = text.length;
|
|
481
|
+
const start = Number.isFinite(offset) ? Math.min(Math.max(0, Math.floor(offset)), totalChars) : 0;
|
|
482
|
+
const end = Math.min(start + MESSAGE_CHUNK_MAX, totalChars);
|
|
483
|
+
return {
|
|
484
|
+
text: text.slice(start, end),
|
|
485
|
+
offset: start,
|
|
486
|
+
totalChars,
|
|
487
|
+
...end < totalChars ? { nextOffset: end } : {}
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
function projectReadableMessages(messages, options) {
|
|
491
|
+
const baseIndex = options.baseIndex ?? 0;
|
|
492
|
+
const maxChars = options.maxChars ?? READABLE_MESSAGE_MAX_CHARS;
|
|
493
|
+
const readable = [];
|
|
494
|
+
messages.forEach((message, offset) => {
|
|
495
|
+
if (message.role !== "user" && message.role !== "assistant") return;
|
|
496
|
+
const text = readableText(message);
|
|
497
|
+
if (!text) return;
|
|
498
|
+
const truncated = text.length > maxChars;
|
|
499
|
+
const entryId = message.messageId ?? message.entryId;
|
|
500
|
+
readable.push({
|
|
501
|
+
index: baseIndex + offset,
|
|
502
|
+
...entryId ? { entryId } : {},
|
|
503
|
+
role: message.role,
|
|
504
|
+
text: truncated ? `${text.slice(0, maxChars)}…` : text,
|
|
505
|
+
...truncated ? { truncated: true } : {}
|
|
506
|
+
});
|
|
507
|
+
});
|
|
508
|
+
const kept = readable.slice(-Math.max(0, options.limit));
|
|
509
|
+
const firstIndex = kept[0]?.index ?? baseIndex;
|
|
510
|
+
return { messages: kept, hasMore: firstIndex > 0 };
|
|
511
|
+
}
|
|
512
|
+
const SEND_IMAGE_PER_REPLY = 4;
|
|
513
|
+
const SEND_IMAGE_CAPTION_MAX = 200;
|
|
514
|
+
const MEDIA_ID_RE = /^[a-f0-9]{64}\.(?:png|jpg|gif|webp)$/;
|
|
515
|
+
const SOURCES = ["file", "web", "desktop"];
|
|
516
|
+
const ERRORS = ["too-large", "quota"];
|
|
517
|
+
const isMediaId = (value) => typeof value === "string" && MEDIA_ID_RE.test(value);
|
|
518
|
+
const optionalText = (value, max) => typeof value === "string" && value.trim() ? value.trim().slice(0, max) : void 0;
|
|
519
|
+
function parseSendImageResult(text) {
|
|
520
|
+
let value;
|
|
521
|
+
try {
|
|
522
|
+
value = JSON.parse(text.split("\n", 1)[0]);
|
|
523
|
+
} catch {
|
|
524
|
+
return null;
|
|
525
|
+
}
|
|
526
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
527
|
+
const raw = value;
|
|
528
|
+
if (typeof raw.source !== "string" || !SOURCES.includes(raw.source)) return null;
|
|
529
|
+
const source = raw.source;
|
|
530
|
+
const name = optionalText(raw.name, 1024);
|
|
531
|
+
const caption = optionalText(raw.caption, SEND_IMAGE_CAPTION_MAX);
|
|
532
|
+
const extra = { ...name ? { name } : {}, ...caption ? { caption } : {} };
|
|
533
|
+
if (raw.ok === true && isMediaId(raw.mediaId))
|
|
534
|
+
return { ok: true, mediaId: raw.mediaId, source, ...extra };
|
|
535
|
+
if (raw.ok === false && typeof raw.error === "string" && ERRORS.includes(raw.error))
|
|
536
|
+
return { ok: false, error: raw.error, source, ...extra };
|
|
537
|
+
return null;
|
|
538
|
+
}
|
|
539
|
+
function resultText(message) {
|
|
540
|
+
if (!Array.isArray(message.content)) return "";
|
|
541
|
+
return message.content.map(
|
|
542
|
+
(part) => part?.type === "text" && typeof part.text === "string" ? part.text : ""
|
|
543
|
+
).join("");
|
|
544
|
+
}
|
|
545
|
+
function sendImageItems(messages) {
|
|
546
|
+
const out = [];
|
|
547
|
+
const seen = /* @__PURE__ */ new Set();
|
|
548
|
+
for (const message of messages) {
|
|
549
|
+
if (out.length >= SEND_IMAGE_PER_REPLY) break;
|
|
550
|
+
if (message.role !== "toolResult" || message.toolName !== "send_image") continue;
|
|
551
|
+
const item = parseSendImageResult(resultText(message));
|
|
552
|
+
if (!item) continue;
|
|
553
|
+
if (item.ok) {
|
|
554
|
+
if (seen.has(item.mediaId)) continue;
|
|
555
|
+
seen.add(item.mediaId);
|
|
556
|
+
}
|
|
557
|
+
out.push(item);
|
|
558
|
+
}
|
|
559
|
+
return out;
|
|
560
|
+
}
|
|
561
|
+
export {
|
|
562
|
+
sameProviderProxy as $,
|
|
563
|
+
DISTILL_BATCH_MAX_CHARS as A,
|
|
564
|
+
effectiveDisabledBuiltinTools as B,
|
|
565
|
+
CRYSTAL_MIN_SOURCES as C,
|
|
566
|
+
DECAY_WEIGHT as D,
|
|
567
|
+
EVOLVES_MIN_CONF as E,
|
|
568
|
+
FORGETTING_DEFAULT_INTERVAL_DAYS as F,
|
|
569
|
+
providerProxyFetch as G,
|
|
570
|
+
HALF_LIFE_DAYS as H,
|
|
571
|
+
IMP_MULT as I,
|
|
572
|
+
isValidProxyUrl as J,
|
|
573
|
+
KG_MAX_LABEL_CHARS as K,
|
|
574
|
+
resolveDisabledBuiltinTools as L,
|
|
575
|
+
MIN_FLOOR as M,
|
|
576
|
+
projectDisabledBuiltinTools as N,
|
|
577
|
+
wrapPluginDelivery as O,
|
|
578
|
+
persistedSettingsState as P,
|
|
579
|
+
proxyEnvPatchFromEnv as Q,
|
|
580
|
+
RECENCY_W as R,
|
|
581
|
+
SEND_IMAGE_CAPTION_MAX as S,
|
|
582
|
+
TEMPORAL_YEAR_BOOST as T,
|
|
583
|
+
parseWebSearchChain as U,
|
|
584
|
+
isMediaId as V,
|
|
585
|
+
readableText as W,
|
|
586
|
+
chunkMessageText as X,
|
|
587
|
+
projectReadableMessages as Y,
|
|
588
|
+
effectiveSubagentAllowedModes as Z,
|
|
589
|
+
isUnitType as _,
|
|
590
|
+
parseProviderProxy as a,
|
|
591
|
+
proxyUrlHasCredentials as a0,
|
|
592
|
+
redactProxyUrlCredentials as a1,
|
|
593
|
+
normalizeProxyMode as a2,
|
|
594
|
+
parseResolveProxy as a3,
|
|
595
|
+
mergeNoProxy as a4,
|
|
596
|
+
DEFAULT_NO_PROXY as a5,
|
|
597
|
+
proxyEnvPatch as a6,
|
|
598
|
+
redactSecrets as a7,
|
|
599
|
+
unescapeUntrusted as a8,
|
|
600
|
+
BUILTIN_TOOLS as a9,
|
|
601
|
+
WEB_SEARCH_CHAIN_MAX as aa,
|
|
602
|
+
isWebSearchChainEntry as ab,
|
|
603
|
+
UNIT_TYPES as ac,
|
|
604
|
+
DEDUP_MIN_CHARS as ad,
|
|
605
|
+
DEFAULT_IMPORTANCE as ae,
|
|
606
|
+
DEFAULT_UNIT_TYPE as af,
|
|
607
|
+
isEvolvesRelation as ag,
|
|
608
|
+
DEDUP_MAX as ah,
|
|
609
|
+
DEDUP_VECTOR as ai,
|
|
610
|
+
DISTILL_MAX_OUTPUT_TOKENS as aj,
|
|
611
|
+
DISTILL_MIN_IMPORTANCE as ak,
|
|
612
|
+
DISTILL_MAX_CHUNK_CHARS as al,
|
|
613
|
+
DISTILL_SINGLE_EXTRACT_MAX_TOKENS as am,
|
|
614
|
+
DISTILL_EXTRACT_MAX_TOKENS as an,
|
|
615
|
+
DISTILL_CONSOLIDATE_MAX_TOKENS as ao,
|
|
616
|
+
DISTILL_MAX_ATTEMPTS as ap,
|
|
617
|
+
EVOLVES_RELATIONS as aq,
|
|
618
|
+
nativeSearchKindFor as ar,
|
|
619
|
+
AGENT_CREATE_IMPORTANCE as as,
|
|
620
|
+
SEND_IMAGE_PER_REPLY as b,
|
|
621
|
+
FORGETTING_DEFAULT_MAX_IMPORTANCE as c,
|
|
622
|
+
FORGETTING_DEFAULT_STALE_DAYS as d,
|
|
623
|
+
FORGETTING_INTERVAL_DAYS_MAX as e,
|
|
624
|
+
FORGETTING_INTERVAL_DAYS_MIN as f,
|
|
625
|
+
FORGETTING_MAX_IMPORTANCE_MAX as g,
|
|
626
|
+
FORGETTING_MAX_IMPORTANCE_MIN as h,
|
|
627
|
+
FORGETTING_STALE_DAYS_MAX as i,
|
|
628
|
+
FORGETTING_STALE_DAYS_MIN as j,
|
|
629
|
+
KG_MAX_ENTITY_NAME_CHARS as k,
|
|
630
|
+
KG_MAX_DESCRIPTION_CHARS as l,
|
|
631
|
+
KG_MAX_ENTITIES as m,
|
|
632
|
+
KG_MAX_RELATIONS as n,
|
|
633
|
+
KG_EXTRACT_MAX_TOKENS as o,
|
|
634
|
+
providerProxyDispatcher as p,
|
|
635
|
+
KG_DEFAULT_RELATION_TYPE as q,
|
|
636
|
+
KG_DEFAULT_ENTITY_TYPE as r,
|
|
637
|
+
sendImageItems as s,
|
|
638
|
+
KG_MAX_ATTEMPTS as t,
|
|
639
|
+
FREQUENCY_W as u,
|
|
640
|
+
FREQUENCY_MAX_COUNT as v,
|
|
641
|
+
wrapUntrusted as w,
|
|
642
|
+
RRF_K as x,
|
|
643
|
+
CRYSTAL_BOOST as y,
|
|
644
|
+
MMR_LAMBDA as z
|
|
645
|
+
};
|
|
646
|
+
//# sourceMappingURL=sendImage-BmenO8Vx.js.map
|