@ensocode/server 0.3.11 → 0.3.13
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/LICENSE +679 -19
- package/out/phone/assets/EditDiff-B3HxLrbF.js +28 -0
- package/out/phone/assets/ReadFileView-BFpGH-kK.js +7 -0
- package/out/phone/assets/{abnfDiagram-VCTEODGH-DeKO4j9Y.js → abnfDiagram-VCTEODGH-BNvyPGoF.js} +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-Duql1LsL.js +1 -0
- package/out/phone/assets/{architectureDiagram-5GKGNRK7-DhPgDhMQ.js → architectureDiagram-5GKGNRK7-1bhpTEFA.js} +1 -1
- package/out/phone/assets/{blockDiagram-I7D4REHJ-CHjEV4S2.js → blockDiagram-I7D4REHJ-Bo9UMudu.js} +1 -1
- package/out/phone/assets/{c4Diagram-7LVT6UL2-C_w2ZiGg.js → c4Diagram-7LVT6UL2-YS11cig2.js} +1 -1
- package/out/phone/assets/channel-BPoIHov1.js +1 -0
- package/out/phone/assets/{chunk-4HAMMTFA-DsFB5306.js → chunk-4HAMMTFA-gA-CzNGD.js} +1 -1
- package/out/phone/assets/{chunk-75Z2AOVW-D-GYq_Mf.js → chunk-75Z2AOVW-BL_5b1Dw.js} +1 -1
- package/out/phone/assets/{chunk-DU6HZSFF-CfnOn1uu.js → chunk-DU6HZSFF-BpNlAs9R.js} +1 -1
- package/out/phone/assets/{chunk-F27PBJKO-DFQr9a2N.js → chunk-F27PBJKO-lsKx96Nt.js} +1 -1
- package/out/phone/assets/{chunk-GMAD6QVW--AoHkXxN.js → chunk-GMAD6QVW-CxbljbtE.js} +1 -1
- package/out/phone/assets/{chunk-GVQU2GXP-CzbFqhoi.js → chunk-GVQU2GXP-CTO3kTOF.js} +1 -1
- package/out/phone/assets/{chunk-IMKFNOWR-DT26rqUA.js → chunk-IMKFNOWR-Cq8XlkcB.js} +1 -1
- package/out/phone/assets/{chunk-L3NEJ4N5-CvadXD9U.js → chunk-L3NEJ4N5-CvIm0JX7.js} +1 -1
- package/out/phone/assets/{chunk-OSK3NFVY-DROHZT6z.js → chunk-OSK3NFVY-Cj3ilTL-.js} +1 -1
- package/out/phone/assets/{chunk-P2QGCYS3-BcsvTFQT.js → chunk-P2QGCYS3-B-twI_Fz.js} +1 -1
- package/out/phone/assets/{chunk-POPQ4Y6H-Bib7YUpn.js → chunk-POPQ4Y6H-lPQttJ5s.js} +1 -1
- package/out/phone/assets/{chunk-PWAF6VOD-CrsdfQvi.js → chunk-PWAF6VOD-DjwqZuIR.js} +1 -1
- package/out/phone/assets/{chunk-SHT3W25Y-BSSsjkbn.js → chunk-SHT3W25Y-BWRVin1H.js} +1 -1
- package/out/phone/assets/{chunk-SVP7TREG-BorYBfcS.js → chunk-SVP7TREG-CGLhvnsS.js} +1 -1
- package/out/phone/assets/{chunk-TICWLB2K-DwWprz_z.js → chunk-TICWLB2K-DkFUa03q.js} +1 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CIR76lHP.js +1 -0
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CIR76lHP.js +1 -0
- package/out/phone/assets/codeHighlighter-jQti-W31.js +1346 -0
- package/out/phone/assets/{cynefin-OW5HDTMX-UxW1ctBn.js → cynefin-OW5HDTMX-L8oWVu5S.js} +1 -1
- package/out/phone/assets/{cynefinDiagram-5FMLGOSQ-3xyjt_Zk.js → cynefinDiagram-5FMLGOSQ-DH8-4p4N.js} +1 -1
- package/out/phone/assets/{dagre-GXQ25YYZ-BA8g5sNo.js → dagre-GXQ25YYZ-HhLDmcu9.js} +1 -1
- package/out/phone/assets/desk-CixRGdTk.js +52 -0
- package/out/phone/assets/{diagram-S7CK7UJ4-CqaAk0xY.js → diagram-S7CK7UJ4-CeIbR3Ir.js} +1 -1
- package/out/phone/assets/{diagram-UQ7AKVKN-BJs2alr_.js → diagram-UQ7AKVKN-BQ84Qnq6.js} +1 -1
- package/out/phone/assets/{diagram-VSXAHHWV-goFBlClH.js → diagram-VSXAHHWV-aF_J57fD.js} +1 -1
- package/out/phone/assets/{diagram-VX7I27RA-NC_soOMz.js → diagram-VX7I27RA-Bg1ZqM4Y.js} +1 -1
- package/out/phone/assets/{diagram-Z3DM3KII-CPBmdhd-.js → diagram-Z3DM3KII-DjTkPAqa.js} +1 -1
- package/out/phone/assets/{ebnfDiagram-PWID7BFC-e_KXtWp1.js → ebnfDiagram-PWID7BFC-DPsH5Eky.js} +1 -1
- package/out/phone/assets/{erDiagram-RLTQ6QDP-BV3oU6Yk.js → erDiagram-RLTQ6QDP-ExvY7e6T.js} +1 -1
- package/out/phone/assets/eventmodeling-NTZA5JFV-DYp-zWcL.js +1 -0
- package/out/phone/assets/flowDiagram-HODETNUW-CIU32By5.js +1 -0
- package/out/phone/assets/{ganttDiagram-EL5Y4UJY-DOtr1Ilh.js → ganttDiagram-EL5Y4UJY-hCe06ucl.js} +1 -1
- package/out/phone/assets/{gitGraph-4MIJSDKK-D0CbVtzh.js → gitGraph-4MIJSDKK-BuZ6lDat.js} +1 -1
- package/out/phone/assets/{gitGraphDiagram-WWUBYQGX-C6wXAX8a.js → gitGraphDiagram-WWUBYQGX-D-8aVxvj.js} +1 -1
- package/out/phone/assets/{info-A6RAGUB7-BLbppMXJ.js → info-A6RAGUB7-CrZtdoYs.js} +1 -1
- package/out/phone/assets/{infoDiagram-27XIBGKW-DOlhaNYG.js → infoDiagram-27XIBGKW-BLRFHxtO.js} +1 -1
- package/out/phone/assets/{ishikawaDiagram-5VMMS53U-BtaSUSnr.js → ishikawaDiagram-5VMMS53U-D7SYWKoj.js} +1 -1
- package/out/phone/assets/{journeyDiagram-3NMN7TZE-C6DElK_Y.js → journeyDiagram-3NMN7TZE-BPsg7CQD.js} +1 -1
- package/out/phone/assets/{kanban-definition-UXKFOSKX-WqCAwlkm.js → kanban-definition-UXKFOSKX-CbPuNr-E.js} +1 -1
- package/out/phone/assets/{line-CvY1fizC.js → line-CkpKMiqK.js} +1 -1
- package/out/phone/assets/main-BCnf7dVM.js +264 -0
- package/out/phone/assets/main-nqB-uD3v.css +2 -0
- package/out/phone/assets/{mermaid-parser.core-BNyl33x8.js → mermaid-parser.core-RTq_mEm1.js} +3 -3
- package/out/phone/assets/{mermaid.core-BnUF0ZCX.js → mermaid.core-D9LtIKua.js} +4 -4
- package/out/phone/assets/{mindmap-definition-YA3MSWOX-CsORTLIm.js → mindmap-definition-YA3MSWOX-8cGgRiRD.js} +1 -1
- package/out/phone/assets/{packet-AYTQ26CC-CoxwVVdp.js → packet-AYTQ26CC-D9-eSn0v.js} +1 -1
- package/out/phone/assets/{pegDiagram-XKGWAZYB-BI2W6aLH.js → pegDiagram-XKGWAZYB-DztU_rIE.js} +1 -1
- package/out/phone/assets/{pie-WAS4IAKB-CQD3JNcj.js → pie-WAS4IAKB-Bk2Tqaq_.js} +1 -1
- package/out/phone/assets/{pieDiagram-E7YTZNPT-aLnzVgco.js → pieDiagram-E7YTZNPT-Dm_3mJ9_.js} +1 -1
- package/out/phone/assets/{quadrantDiagram-AXDQQJYC-Cbl0x-Id.js → quadrantDiagram-AXDQQJYC-lKskzjzu.js} +1 -1
- package/out/phone/assets/{radar-RG4KPBEZ-Bu2EN1RM.js → radar-RG4KPBEZ-B2z8Txd8.js} +1 -1
- package/out/phone/assets/{railroad-74A4TZTK-DiiOMWSM.js → railroad-74A4TZTK-11VmdALq.js} +1 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-BkSycwye.js +1 -0
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-BsPIU3iV.js +1 -0
- package/out/phone/assets/railroad-peg-WCYAUIDC-Cy8G7u5C.js +1 -0
- package/out/phone/assets/{railroadDiagram-O6MQD6OU-r5JJp9nP.js → railroadDiagram-O6MQD6OU-Dr0NTIA6.js} +1 -1
- package/out/phone/assets/{requirementDiagram-BXWQKSXE-Bh86zb_w.js → requirementDiagram-BXWQKSXE-C0W6h_5I.js} +1 -1
- package/out/phone/assets/{sankeyDiagram-P5KCCOFB-CykRlthT.js → sankeyDiagram-P5KCCOFB-CVJDathY.js} +1 -1
- package/out/phone/assets/{sequenceDiagram-WJ2MYXX4-BPLcD6MF.js → sequenceDiagram-WJ2MYXX4-BxHQTG6x.js} +1 -1
- package/out/phone/assets/shellUpdate-DPSfgHG3.js +36 -0
- package/out/phone/assets/{stateDiagram-D77RDMKH-DWXApcUM.js → stateDiagram-D77RDMKH-BO5MAjhs.js} +1 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-B8IHc2bm.js +1 -0
- package/out/phone/assets/{swimlanes-42K2YHIH-BVi6IPTq.js → swimlanes-42K2YHIH-DnhDPyy6.js} +1 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-dmSDAN2F.js +8 -0
- package/out/phone/assets/{timeline-definition-24CTP7MA-xf--BXjO.js → timeline-definition-24CTP7MA-bLEjS7re.js} +1 -1
- package/out/phone/assets/{treeView-Q6P3EWNA-DzJs7PRI.js → treeView-Q6P3EWNA-Ci-sA9wK.js} +1 -1
- package/out/phone/assets/{treemap-WGGIJYW6-AXb7EeRP.js → treemap-WGGIJYW6-BXCjzK65.js} +1 -1
- package/out/phone/assets/{vennDiagram-4TSXK5OY-CXDX5KG5.js → vennDiagram-4TSXK5OY-DHsj5dRx.js} +1 -1
- package/out/phone/assets/{wardley-WFR3VGLG-DrSIz3RL.js → wardley-WFR3VGLG-d8TdCu-H.js} +1 -1
- package/out/phone/assets/{wardleyDiagram-VM6X3IG4-DFL8ndUf.js → wardleyDiagram-VM6X3IG4-DQFVP9qu.js} +1 -1
- package/out/phone/assets/{xychartDiagram-S5SC5T6Z-CZZX0maW.js → xychartDiagram-S5SC5T6Z-Dni2Y0ov.js} +1 -1
- package/out/phone/desk.html +81 -2
- package/out/phone/index.html +51 -3
- package/out/phone/manifest.webmanifest +1 -0
- package/out/phone/splash/1125x2436-dark.png +0 -0
- package/out/phone/splash/1125x2436-light.png +0 -0
- package/out/phone/splash/1170x2532-dark.png +0 -0
- package/out/phone/splash/1170x2532-light.png +0 -0
- package/out/phone/splash/1179x2556-dark.png +0 -0
- package/out/phone/splash/1179x2556-light.png +0 -0
- package/out/phone/splash/1206x2622-dark.png +0 -0
- package/out/phone/splash/1206x2622-light.png +0 -0
- package/out/phone/splash/1242x2208-dark.png +0 -0
- package/out/phone/splash/1242x2208-light.png +0 -0
- package/out/phone/splash/1242x2688-dark.png +0 -0
- package/out/phone/splash/1242x2688-light.png +0 -0
- package/out/phone/splash/1260x2736-dark.png +0 -0
- package/out/phone/splash/1260x2736-light.png +0 -0
- package/out/phone/splash/1284x2778-dark.png +0 -0
- package/out/phone/splash/1284x2778-light.png +0 -0
- package/out/phone/splash/1290x2796-dark.png +0 -0
- package/out/phone/splash/1290x2796-light.png +0 -0
- package/out/phone/splash/1320x2868-dark.png +0 -0
- package/out/phone/splash/1320x2868-light.png +0 -0
- package/out/phone/splash/750x1334-dark.png +0 -0
- package/out/phone/splash/750x1334-light.png +0 -0
- package/out/phone/splash/828x1792-dark.png +0 -0
- package/out/phone/splash/828x1792-light.png +0 -0
- package/out/phone/sw.js +219 -6
- package/out/renderer/assets/EditDiff-DxxLuCEI.js +1 -0
- package/out/renderer/assets/File-Tz3MUtN6.js +1 -0
- package/out/renderer/assets/ReadFileView-DFoLPU04.js +4 -0
- package/out/renderer/assets/SidePanel-CL40W2RY.js +47 -0
- package/out/renderer/assets/SidePanel-D0m4IYxS.css +1 -0
- package/out/renderer/assets/Virtualizer-B0uwx_XV.js +1345 -0
- package/out/renderer/assets/{abnfDiagram-VCTEODGH-C03tURh9.js → abnfDiagram-VCTEODGH-CJ9nn9eH.js} +1 -1
- package/out/renderer/assets/{arc-B9ePZBoh.js → arc-B8im8n0O.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-5GKGNRK7-xqG-LPqx.js → architectureDiagram-5GKGNRK7-BRSi5FBk.js} +1 -1
- package/out/renderer/assets/{blockDiagram-I7D4REHJ-BJCB1uWW.js → blockDiagram-I7D4REHJ-CQ1wirIl.js} +1 -1
- package/out/renderer/assets/{c4Diagram-7LVT6UL2-B8YiLE3O.js → c4Diagram-7LVT6UL2-9HyLIioe.js} +1 -1
- package/out/renderer/assets/channel-DjB0ww6b.js +1 -0
- package/out/renderer/assets/{chunk-2Q5K7J3B-BfCgzuF1.js → chunk-2Q5K7J3B-BwC9g3bx.js} +1 -1
- package/out/renderer/assets/{chunk-5VM5RSS4-j2RDggaS.js → chunk-5VM5RSS4-DMtgxPBL.js} +1 -1
- package/out/renderer/assets/{chunk-F27PBJKO-D1w1G98C.js → chunk-F27PBJKO-DSi_XV5v.js} +1 -1
- package/out/renderer/assets/{chunk-IMKFNOWR-HX7TqjEn.js → chunk-IMKFNOWR-Dctc6Apj.js} +1 -1
- package/out/renderer/assets/{chunk-JWPE2WC7-Ee_2ucfe.js → chunk-JWPE2WC7-I2BD5qM7.js} +1 -1
- package/out/renderer/assets/{chunk-POPQ4Y6H-DuxBT9GV.js → chunk-POPQ4Y6H-k60pc4eT.js} +1 -1
- package/out/renderer/assets/{chunk-SVP7TREG-DFjkSsO8.js → chunk-SVP7TREG-zCGemfqm.js} +1 -1
- package/out/renderer/assets/{chunk-TICWLB2K-1B31w-4D.js → chunk-TICWLB2K-CdDiHIq-.js} +1 -1
- package/out/renderer/assets/{chunk-XXDRQBXY-DZ7nGbEc.js → chunk-XXDRQBXY-GYVDxVfN.js} +1 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-6SiAw1np.js +1 -0
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-6SiAw1np.js +1 -0
- package/out/renderer/assets/{cose-bilkent-JH36ORCC-k2aKhVw_.js → cose-bilkent-JH36ORCC-BnSAtUh-.js} +1 -1
- package/out/renderer/assets/{cynefin-OW5HDTMX-xPUo1qjT.js → cynefin-OW5HDTMX-DnQaS9VN.js} +1 -1
- package/out/renderer/assets/{cynefinDiagram-5FMLGOSQ-KbWg9eRv.js → cynefinDiagram-5FMLGOSQ-BNQdw0PV.js} +1 -1
- package/out/renderer/assets/{cytoscape-fcose-CLBXU3_O.js → cytoscape-fcose-CzkrRInm.js} +1 -1
- package/out/renderer/assets/{dagre-GXQ25YYZ-ilq61to2.js → dagre-GXQ25YYZ-fG1vMsyn.js} +1 -1
- package/out/renderer/assets/{diagram-S7CK7UJ4-DsRzYvTT.js → diagram-S7CK7UJ4-BcfAFVc2.js} +1 -1
- package/out/renderer/assets/{diagram-UQ7AKVKN-nE6Ly2i6.js → diagram-UQ7AKVKN-D8f3Tsx9.js} +1 -1
- package/out/renderer/assets/{diagram-VSXAHHWV-B9Crbma_.js → diagram-VSXAHHWV-B-U9CIWt.js} +1 -1
- package/out/renderer/assets/{diagram-VX7I27RA-Bm5JhnFh.js → diagram-VX7I27RA-CX6ifTkJ.js} +1 -1
- package/out/renderer/assets/{diagram-Z3DM3KII-ZD7ANoYg.js → diagram-Z3DM3KII-49dS9s3L.js} +1 -1
- package/out/renderer/assets/{ebnfDiagram-PWID7BFC-CT3pW9tk.js → ebnfDiagram-PWID7BFC-CraGJRI7.js} +1 -1
- package/out/renderer/assets/{erDiagram-RLTQ6QDP-D0ikskdu.js → erDiagram-RLTQ6QDP-CfMNvEoW.js} +1 -1
- package/out/renderer/assets/{flowDiagram-HODETNUW-BOF_JMXY.js → flowDiagram-HODETNUW-C8XM3p4T.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-EL5Y4UJY-BCEnP39-.js → ganttDiagram-EL5Y4UJY-DlJBMKFX.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-WWUBYQGX-WpPHHkc3.js → gitGraphDiagram-WWUBYQGX-DvEzDsKF.js} +1 -1
- package/out/renderer/assets/globals-BFf1P-Y5.js +715 -0
- package/out/renderer/assets/globals-DUBhAVpU.css +1 -0
- package/out/renderer/assets/index-L4TTIP10.js +89 -0
- package/out/renderer/assets/{infoDiagram-27XIBGKW-nRW-sje9.js → infoDiagram-27XIBGKW-CckfBO-R.js} +1 -1
- package/out/renderer/assets/{ishikawaDiagram-5VMMS53U-CEfZo_k8.js → ishikawaDiagram-5VMMS53U-mUoXchkB.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-3NMN7TZE-C5hopb9Y.js → journeyDiagram-3NMN7TZE-zzLL0HFW.js} +1 -1
- package/out/renderer/assets/{kanban-definition-UXKFOSKX-D9XV2n-x.js → kanban-definition-UXKFOSKX-BJ_9aIhB.js} +1 -1
- package/out/renderer/assets/{layout-t2tiRL7x.js → layout-3SRMHY7n.js} +1 -1
- package/out/renderer/assets/{linear-DJLwPmUz.js → linear-CWpclK_R.js} +1 -1
- package/out/renderer/assets/manifest-DOzTaB8J.js +525 -0
- package/out/renderer/assets/{mermaid.core-C0XHWibr.js → mermaid.core-DORpmVi3.js} +5 -5
- package/out/renderer/assets/{mindmap-definition-YA3MSWOX-DD-erShR.js → mindmap-definition-YA3MSWOX-CYBlCqIB.js} +1 -1
- package/out/renderer/assets/{pegDiagram-XKGWAZYB-DZ0Jk0gq.js → pegDiagram-XKGWAZYB-DhWwLs4v.js} +1 -1
- package/out/renderer/assets/{pieDiagram-E7YTZNPT-E7wG7xIV.js → pieDiagram-E7YTZNPT-Bzpc57-A.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-AXDQQJYC-iyjmw417.js → quadrantDiagram-AXDQQJYC-spKXEbds.js} +1 -1
- package/out/renderer/assets/{railroadDiagram-O6MQD6OU-vCkzrMpv.js → railroadDiagram-O6MQD6OU-Br553px3.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-BXWQKSXE-DJ7nU4ps.js → requirementDiagram-BXWQKSXE-CX-Dqij_.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-P5KCCOFB-1TKFsYjQ.js → sankeyDiagram-P5KCCOFB-Bgx1W6B9.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-WJ2MYXX4-C3ajyWo7.js → sequenceDiagram-WJ2MYXX4-CKQv6pcU.js} +1 -1
- package/out/renderer/assets/sessionChanges-BLzNhRuv.js +31 -0
- package/out/renderer/assets/settings-Bsrw4ERp.js +25 -0
- package/out/renderer/assets/{sizeCapture-INFHLROL-BKripAfM.js → sizeCapture-INFHLROL-DtRedfRe.js} +1 -1
- package/out/renderer/assets/{stateDiagram-D77RDMKH-DSqc4avN.js → stateDiagram-D77RDMKH-CMP5owem.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-6-731AqJ.js +1 -0
- package/out/renderer/assets/{swimlanes-42K2YHIH-C2Jeg683.js → swimlanes-42K2YHIH-D30AvvmW.js} +1 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-B8KijqIT.js +8 -0
- package/out/renderer/assets/{timeline-definition-24CTP7MA-rvOKRLqz.js → timeline-definition-24CTP7MA-CsZAMmMZ.js} +1 -1
- package/out/renderer/assets/{vennDiagram-4TSXK5OY-Cig1eOav.js → vennDiagram-4TSXK5OY-COQ7L1f7.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-VM6X3IG4-C8spX5XL.js → wardleyDiagram-VM6X3IG4-dqMWLTCs.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-S5SC5T6Z-DHQsGiFY.js → xychartDiagram-S5SC5T6Z-DX4clIYP.js} +1 -1
- package/out/renderer/index.html +3 -4
- package/out/renderer/plugin-view.html +37 -0
- package/out/renderer/settings.html +7 -4
- package/out/renderer/web-preload.js +40 -40
- package/out/server/agent.js +915 -606
- package/out/server/chunks/{agent-BbLTL3oo.js → agent-BbNq8i9j.js} +987 -689
- package/out/server/chunks/conversationsMove-CvFPFHaa.js +587 -0
- package/out/server/chunks/dispatchModel-CsfmL396.js +20 -0
- package/out/server/chunks/gpuBackendInstall-jAzoFq7U.js +237 -0
- package/out/server/chunks/{loadProvider-ff0h4G9y.js → loadProvider-NdOVbsHi.js} +2 -2
- package/out/server/chunks/{manifest-DjsZzZuh.js → manifest-BPXFscqI.js} +9 -3
- package/out/server/chunks/registry-BhoHPSKn.js +3353 -0
- package/out/server/chunks/{resources-DmaKIeBc.js → resources-BfbTkFP0.js} +23 -12
- package/out/server/chunks/sendImage-BCNW9JRV.js +418 -0
- package/out/server/chunks/{storageScanWorker-Bebego8l.js → storageScanWorker-CR7HbOWG.js} +2 -2
- package/out/server/chunks/{storageScanWorker-BQ1LXUu7.js → storageScanWorker-DjFyHTye.js} +2 -2
- package/out/server/chunks/{workflowPresets-XbQNDJh1.js → workflowPresets-C2T1BzA2.js} +1725 -720
- package/out/server/index.js +14387 -16832
- package/out/server/memory-service.js +5008 -0
- package/out/server/plugin-host.js +2 -2
- package/package.json +2 -3
- package/out/phone/assets/EnsoNerdSymbolsMono-Regular-TdeMQojc.ttf +0 -0
- package/out/phone/assets/architecture-7GRP2DOG-C-qor9pl.js +0 -1
- package/out/phone/assets/channel-X_IbcoWa.js +0 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-BM8gYXGQ.js +0 -1
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-BM8gYXGQ.js +0 -1
- package/out/phone/assets/desk-BNoyCelL.js +0 -2
- package/out/phone/assets/eventmodeling-NTZA5JFV-BdEBApKV.js +0 -1
- package/out/phone/assets/flowDiagram-HODETNUW-OPg41_ia.js +0 -1
- package/out/phone/assets/main-BU1pbfVw.css +0 -1
- package/out/phone/assets/main-ZLMPRLjZ.js +0 -1658
- package/out/phone/assets/railroad-abnf-HS5TGJTU-BoQXwOPL.js +0 -1
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-1G126duh.js +0 -1
- package/out/phone/assets/railroad-peg-WCYAUIDC-C7pIuHge.js +0 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-BMZswIYt.js +0 -1
- package/out/phone/assets/storage-dUWOZ2xo.js +0 -36
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-RYt3eASc.js +0 -8
- package/out/renderer/assets/channel-DwCSANyp.js +0 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-BT-9dtRl.js +0 -1
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-BT-9dtRl.js +0 -1
- package/out/renderer/assets/globals-DWAN16wT.js +0 -2603
- package/out/renderer/assets/globals-DoPyZAQo.css +0 -1
- package/out/renderer/assets/index-DOUivox4.js +0 -133
- package/out/renderer/assets/index-F_0FxVZ_.css +0 -1
- package/out/renderer/assets/settings-BmMFkVO5.js +0 -27
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-JOz8ISDT.js +0 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-Km8IGI0J.js +0 -8
- package/out/server/chunks/conversationsMove-CJZfkj55.js +0 -57
- package/out/server/chunks/engine-IZbRceya.js +0 -70
- package/out/server/chunks/engineWorker-CQxNRdLD.js +0 -6
- package/out/server/chunks/engineWorker-CrUIcXCt.js +0 -73
- package/out/server/chunks/gpuBackendInstall-COO4pT2M.js +0 -158
- package/out/server/chunks/hanbao-_aDjow_f.js +0 -187
- package/out/server/chunks/speech-CqK6_tIR.js +0 -25
- package/out/server/chunks/wetype-CR0YLhHP.js +0 -677
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as s}from"./chunk-IMKFNOWR-HX7TqjEn.js";import{_ as i}from"./mermaid.core-C0XHWibr.js";import"./chunk-XXDRQBXY-DZ7nGbEc.js";import"./chunk-POPQ4Y6H-DuxBT9GV.js";import"./chunk-F27PBJKO-D1w1G98C.js";import"./globals-DWAN16wT.js";var u={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{c as r,s as e}from"./flowDiagram-HODETNUW-BOF_JMXY.js";import{_ as a}from"./mermaid.core-C0XHWibr.js";import"./chunk-5VM5RSS4-j2RDggaS.js";import"./chunk-XXDRQBXY-DZ7nGbEc.js";import"./chunk-POPQ4Y6H-DuxBT9GV.js";import"./chunk-F27PBJKO-D1w1G98C.js";import"./channel-DwCSANyp.js";import"./globals-DWAN16wT.js";var o=a(t=>`${e(t)}
|
|
2
|
-
.swimlane.cluster rect {
|
|
3
|
-
stroke: ${t.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,"getStyles"),s=o,n=r({defaultLayout:"swimlane",styles:s});export{n as diagram};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2
|
-
function parseMoveConversationInput(value) {
|
|
3
|
-
if (!isRecord(value)) return null;
|
|
4
|
-
if (Object.keys(value).length !== 2) return null;
|
|
5
|
-
const { conversationId, targetProjectId } = value;
|
|
6
|
-
if (typeof conversationId !== "string" || conversationId.length === 0) return null;
|
|
7
|
-
if (typeof targetProjectId !== "string" || targetProjectId.length === 0) return null;
|
|
8
|
-
return { conversationId, targetProjectId };
|
|
9
|
-
}
|
|
10
|
-
function conversationIdsToMove(conversations, rootId) {
|
|
11
|
-
const ids = /* @__PURE__ */ new Set([rootId]);
|
|
12
|
-
let grew = true;
|
|
13
|
-
while (grew) {
|
|
14
|
-
grew = false;
|
|
15
|
-
for (const [id, row] of Object.entries(conversations)) {
|
|
16
|
-
if (!row || ids.has(id)) continue;
|
|
17
|
-
if (typeof row.parentId === "string" && ids.has(row.parentId) || typeof row.btwParentId === "string" && ids.has(row.btwParentId)) {
|
|
18
|
-
ids.add(id);
|
|
19
|
-
grew = true;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return [...ids];
|
|
24
|
-
}
|
|
25
|
-
async function handleConversationsMove(input, ports) {
|
|
26
|
-
const parsed = parseMoveConversationInput(input);
|
|
27
|
-
if (!parsed) return { ok: false, error: "invalid" };
|
|
28
|
-
const { conversationId, targetProjectId } = parsed;
|
|
29
|
-
const source = ports.source(conversationId);
|
|
30
|
-
const result = ports.moveConversation(conversationId, targetProjectId, {
|
|
31
|
-
running: ports.isRunning(conversationId),
|
|
32
|
-
worktreeBusy: ports.worktreeBusy(conversationId)
|
|
33
|
-
});
|
|
34
|
-
if (!result.accepted) return { ok: false, error: result.error };
|
|
35
|
-
if (!source || source.projectId === result.value.projectId) {
|
|
36
|
-
return { ok: true, value: result.value };
|
|
37
|
-
}
|
|
38
|
-
try {
|
|
39
|
-
ports.unbindWorktree(conversationId);
|
|
40
|
-
} catch {
|
|
41
|
-
}
|
|
42
|
-
ports.patchProjectIds(
|
|
43
|
-
conversationIdsToMove(ports.readConversations(), conversationId),
|
|
44
|
-
targetProjectId,
|
|
45
|
-
conversationId
|
|
46
|
-
);
|
|
47
|
-
const released = await ports.releaseSessions(conversationId).catch(() => false);
|
|
48
|
-
if (released && source.scratchRoot)
|
|
49
|
-
ports.removeScratchWorkspace(source.scratchRoot, conversationId);
|
|
50
|
-
return { ok: true, value: result.value };
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
conversationIdsToMove,
|
|
54
|
-
handleConversationsMove,
|
|
55
|
-
parseMoveConversationInput
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=conversationsMove-CJZfkj55.js.map
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
async function createWorkerEngine(data) {
|
|
2
|
-
const { default: spawn } = await import("./engineWorker-CQxNRdLD.js");
|
|
3
|
-
const worker = spawn({ workerData: data });
|
|
4
|
-
const pending = /* @__PURE__ */ new Map();
|
|
5
|
-
let dead = null;
|
|
6
|
-
let nextId = 1;
|
|
7
|
-
let nextSid = 1;
|
|
8
|
-
const failAll = (error) => {
|
|
9
|
-
dead ??= error;
|
|
10
|
-
for (const waiter of pending.values()) waiter.reject(error);
|
|
11
|
-
pending.clear();
|
|
12
|
-
};
|
|
13
|
-
await new Promise((resolve, reject) => {
|
|
14
|
-
const onReady = (message) => {
|
|
15
|
-
if (message.ready === void 0) return;
|
|
16
|
-
worker.off("message", onReady);
|
|
17
|
-
if (message.ready) resolve();
|
|
18
|
-
else {
|
|
19
|
-
void worker.terminate();
|
|
20
|
-
reject(new Error(message.error ?? "speech engine failed to load"));
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
worker.on("message", onReady);
|
|
24
|
-
worker.once("error", reject);
|
|
25
|
-
worker.once("exit", (code) => reject(new Error(`speech engine exited (${code})`)));
|
|
26
|
-
});
|
|
27
|
-
worker.on("message", (reply) => {
|
|
28
|
-
const waiter = pending.get(reply.id);
|
|
29
|
-
if (!waiter) return;
|
|
30
|
-
pending.delete(reply.id);
|
|
31
|
-
if (reply.ok) waiter.resolve(reply.text);
|
|
32
|
-
else waiter.reject(new Error(reply.error));
|
|
33
|
-
});
|
|
34
|
-
worker.on(
|
|
35
|
-
"error",
|
|
36
|
-
(error) => failAll(error instanceof Error ? error : new Error(String(error)))
|
|
37
|
-
);
|
|
38
|
-
worker.on("exit", (code) => failAll(new Error(`speech engine exited (${code})`)));
|
|
39
|
-
const call = (req) => {
|
|
40
|
-
if (dead) return Promise.reject(dead);
|
|
41
|
-
const id = nextId++;
|
|
42
|
-
return new Promise((resolve, reject) => {
|
|
43
|
-
pending.set(id, { resolve, reject });
|
|
44
|
-
worker.postMessage({ ...req, id });
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
return {
|
|
48
|
-
transcribe: (samples) => call({ op: "transcribe", samples }),
|
|
49
|
-
openStream: () => {
|
|
50
|
-
const sid = nextSid++;
|
|
51
|
-
const opened = call({ op: "open", sid });
|
|
52
|
-
return {
|
|
53
|
-
accept: (samples) => opened.then(() => call({ op: "accept", sid, samples })),
|
|
54
|
-
finish: () => opened.then(() => call({ op: "finish", sid })),
|
|
55
|
-
cancel: () => {
|
|
56
|
-
void opened.then(() => call({ op: "cancel", sid })).catch(() => {
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
},
|
|
61
|
-
dispose: () => {
|
|
62
|
-
failAll(new Error("speech engine disposed"));
|
|
63
|
-
void worker.terminate();
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export {
|
|
68
|
-
createWorkerEngine
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=engine-IZbRceya.js.map
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
import { workerData, parentPort } from "node:worker_threads";
|
|
3
|
-
import { S as SPEECH_SAMPLE_RATE } from "./speech-CqK6_tIR.js";
|
|
4
|
-
const port = parentPort;
|
|
5
|
-
const init = workerData;
|
|
6
|
-
const TAIL = new Float32Array(SPEECH_SAMPLE_RATE / 2);
|
|
7
|
-
const text = (result) => typeof result.text === "string" ? result.text : "";
|
|
8
|
-
if (port) {
|
|
9
|
-
let offline = null;
|
|
10
|
-
let online = null;
|
|
11
|
-
const streams = /* @__PURE__ */ new Map();
|
|
12
|
-
try {
|
|
13
|
-
const sherpa = createRequire(import.meta.url)(init.wrapperDir);
|
|
14
|
-
if (init.kind === "offline") offline = new sherpa.OfflineRecognizer(init.config);
|
|
15
|
-
else online = new sherpa.OnlineRecognizer(init.config);
|
|
16
|
-
port.postMessage({ ready: true });
|
|
17
|
-
} catch (error) {
|
|
18
|
-
port.postMessage({ ready: false, error: String(error) });
|
|
19
|
-
}
|
|
20
|
-
const drain = (entry) => {
|
|
21
|
-
const rec = online;
|
|
22
|
-
while (rec.isReady(entry.stream)) rec.decode(entry.stream);
|
|
23
|
-
const current = text(rec.getResult(entry.stream));
|
|
24
|
-
if (!rec.isEndpoint(entry.stream)) return entry.segments.join("") + current;
|
|
25
|
-
if (current) entry.segments.push(current);
|
|
26
|
-
rec.reset(entry.stream);
|
|
27
|
-
return entry.segments.join("");
|
|
28
|
-
};
|
|
29
|
-
port.on("message", (req) => {
|
|
30
|
-
try {
|
|
31
|
-
switch (req.op) {
|
|
32
|
-
case "transcribe": {
|
|
33
|
-
const rec = offline;
|
|
34
|
-
const stream = rec.createStream();
|
|
35
|
-
stream.acceptWaveform({ samples: req.samples, sampleRate: SPEECH_SAMPLE_RATE });
|
|
36
|
-
rec.decode(stream);
|
|
37
|
-
port.postMessage({ id: req.id, ok: true, text: text(rec.getResult(stream)) });
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
case "open":
|
|
41
|
-
streams.set(req.sid, { stream: online.createStream(), segments: [] });
|
|
42
|
-
port.postMessage({ id: req.id, ok: true, text: "" });
|
|
43
|
-
return;
|
|
44
|
-
case "accept": {
|
|
45
|
-
const entry = streams.get(req.sid);
|
|
46
|
-
if (!entry) throw new Error("unknown stream");
|
|
47
|
-
entry.stream.acceptWaveform({ samples: req.samples, sampleRate: SPEECH_SAMPLE_RATE });
|
|
48
|
-
port.postMessage({ id: req.id, ok: true, text: drain(entry) });
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
case "finish": {
|
|
52
|
-
const entry = streams.get(req.sid);
|
|
53
|
-
if (!entry) throw new Error("unknown stream");
|
|
54
|
-
streams.delete(req.sid);
|
|
55
|
-
entry.stream.acceptWaveform({ samples: TAIL, sampleRate: SPEECH_SAMPLE_RATE });
|
|
56
|
-
entry.stream.inputFinished?.();
|
|
57
|
-
const rec = online;
|
|
58
|
-
while (rec.isReady(entry.stream)) rec.decode(entry.stream);
|
|
59
|
-
const last = text(rec.getResult(entry.stream));
|
|
60
|
-
port.postMessage({ id: req.id, ok: true, text: entry.segments.join("") + last });
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
case "cancel":
|
|
64
|
-
streams.delete(req.sid);
|
|
65
|
-
port.postMessage({ id: req.id, ok: true, text: "" });
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
} catch (error) {
|
|
69
|
-
port.postMessage({ id: req.id, ok: false, error: String(error) });
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=engineWorker-CrUIcXCt.js.map
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import { createRequire, registerHooks } from "node:module";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { pathToFileURL } from "node:url";
|
|
5
|
-
import { s as selectGpuBackendPackage, g as gpuBackendInstallDir, i as isGpuBackendReady, h as hasLlamaAddon, n as npmPackumentUrl, v as verifyIntegrity, e as extractNpmPackageBins } from "../index.js";
|
|
6
|
-
import "node:net";
|
|
7
|
-
import "node:child_process";
|
|
8
|
-
import "node:crypto";
|
|
9
|
-
import "node:events";
|
|
10
|
-
import "node:os";
|
|
11
|
-
import "./agent-BbLTL3oo.js";
|
|
12
|
-
import "yaml";
|
|
13
|
-
import "./workflowPresets-XbQNDJh1.js";
|
|
14
|
-
import "node:fs/promises";
|
|
15
|
-
import "node:zlib";
|
|
16
|
-
import "@earendil-works/pi-ai";
|
|
17
|
-
import "@earendil-works/pi-coding-agent";
|
|
18
|
-
import "node:string_decoder";
|
|
19
|
-
import "node:util";
|
|
20
|
-
import "node:buffer";
|
|
21
|
-
import "node:dns/promises";
|
|
22
|
-
import "@mozilla/readability";
|
|
23
|
-
import "linkedom";
|
|
24
|
-
import "turndown";
|
|
25
|
-
import "undici";
|
|
26
|
-
import "@earendil-works/pi-ai/api/transform-messages";
|
|
27
|
-
import "node:http";
|
|
28
|
-
import "tweetnacl";
|
|
29
|
-
import "./manifest-DjsZzZuh.js";
|
|
30
|
-
import "@earendil-works/pi-mcp/oauth";
|
|
31
|
-
import "node:stream/promises";
|
|
32
|
-
import "better-sqlite3";
|
|
33
|
-
import "sqlite-vec";
|
|
34
|
-
import "@huggingface/tokenizers";
|
|
35
|
-
import "./speech-CqK6_tIR.js";
|
|
36
|
-
import "web-push";
|
|
37
|
-
import "node:stream";
|
|
38
|
-
import "smol-toml";
|
|
39
|
-
import "@modelcontextprotocol/sdk/client/index.js";
|
|
40
|
-
import "@modelcontextprotocol/sdk/client/sse.js";
|
|
41
|
-
import "@modelcontextprotocol/sdk/client/stdio.js";
|
|
42
|
-
import "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
43
|
-
import "node:dns";
|
|
44
|
-
import "node:https";
|
|
45
|
-
import "node-pty";
|
|
46
|
-
import "@earendil-works/pi-ai/api/typesafe-system-one";
|
|
47
|
-
import "@earendil-works/pi-ai/providers/typesafe";
|
|
48
|
-
import "./resources-DmaKIeBc.js";
|
|
49
|
-
import "node:readline";
|
|
50
|
-
import "node:readline/promises";
|
|
51
|
-
import "fs";
|
|
52
|
-
import "util";
|
|
53
|
-
import "stream";
|
|
54
|
-
import "zlib";
|
|
55
|
-
import "assert";
|
|
56
|
-
import "buffer";
|
|
57
|
-
import "events";
|
|
58
|
-
import "https";
|
|
59
|
-
import "http";
|
|
60
|
-
import "net";
|
|
61
|
-
import "tls";
|
|
62
|
-
import "crypto";
|
|
63
|
-
import "url";
|
|
64
|
-
const require$1 = createRequire(import.meta.url);
|
|
65
|
-
let hookRegistered = false;
|
|
66
|
-
async function ensureGpuBackend(opts = {}) {
|
|
67
|
-
const platform = opts.platform ?? process.platform;
|
|
68
|
-
const arch = opts.arch ?? process.arch;
|
|
69
|
-
const detect = opts.detectGpus ?? (async () => {
|
|
70
|
-
const mod = await import("node-llama-cpp");
|
|
71
|
-
if (typeof mod.getLlamaGpuTypes !== "function") return [];
|
|
72
|
-
return mod.getLlamaGpuTypes("supported");
|
|
73
|
-
});
|
|
74
|
-
const selected = selectGpuBackendPackage({
|
|
75
|
-
platform,
|
|
76
|
-
arch,
|
|
77
|
-
supportedGpus: await detect()
|
|
78
|
-
});
|
|
79
|
-
if (!selected) return;
|
|
80
|
-
const hasAddon = opts.hasPackagedAddon ?? hasPackagedAddon;
|
|
81
|
-
if (hasAddon(selected.name)) return;
|
|
82
|
-
const root = opts.root ?? await defaultRoot();
|
|
83
|
-
const version = opts.version ?? llamaCppVersion();
|
|
84
|
-
const dest = gpuBackendInstallDir(root, selected.name, version);
|
|
85
|
-
if (!isGpuBackendReady(dest)) {
|
|
86
|
-
try {
|
|
87
|
-
await downloadGpuBackend(selected.name, version, dest, opts);
|
|
88
|
-
} catch (error) {
|
|
89
|
-
const cpu = selectGpuBackendPackage({ platform, arch, supportedGpus: [false] });
|
|
90
|
-
if (!cpu || cpu.name === selected.name) throw error;
|
|
91
|
-
console.warn("[llama] GPU backend download failed, falling back to CPU:", error);
|
|
92
|
-
const cpuDest = gpuBackendInstallDir(root, cpu.name, version);
|
|
93
|
-
if (!isGpuBackendReady(cpuDest)) {
|
|
94
|
-
await downloadGpuBackend(cpu.name, version, cpuDest, opts);
|
|
95
|
-
}
|
|
96
|
-
(opts.resolvePackage ?? registerGpuPackage)(cpu.name, cpuDest);
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
(opts.resolvePackage ?? registerGpuPackage)(selected.name, dest);
|
|
101
|
-
}
|
|
102
|
-
function llamaCppVersion() {
|
|
103
|
-
const entry = require$1.resolve("node-llama-cpp");
|
|
104
|
-
const pkgPath = path.join(path.dirname(entry), "..", "package.json");
|
|
105
|
-
const version = JSON.parse(fs.readFileSync(pkgPath, "utf8")).version;
|
|
106
|
-
if (typeof version !== "string" || !/^\d+\.\d+\.\d+/.test(version)) {
|
|
107
|
-
throw new Error(`node-llama-cpp package.json missing version: ${pkgPath}`);
|
|
108
|
-
}
|
|
109
|
-
return version;
|
|
110
|
-
}
|
|
111
|
-
function hasPackagedAddon(name) {
|
|
112
|
-
try {
|
|
113
|
-
const fromLlama = createRequire(require$1.resolve("node-llama-cpp"));
|
|
114
|
-
const entry = fromLlama.resolve(name);
|
|
115
|
-
return hasLlamaAddon(path.join(path.dirname(entry), "..", "bins"));
|
|
116
|
-
} catch {
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
async function defaultRoot() {
|
|
121
|
-
const { app } = await import("../index.js").then((n) => n.p);
|
|
122
|
-
return path.join(app.getPath("userData"), "llama-gpu-backends");
|
|
123
|
-
}
|
|
124
|
-
async function downloadGpuBackend(name, version, dest, opts) {
|
|
125
|
-
const registry = (opts.registry ?? process.env.npm_config_registry ?? "https://registry.npmjs.org").replace(/\/+$/, "");
|
|
126
|
-
const doFetch = opts.fetch ?? fetch;
|
|
127
|
-
const metaRes = await doFetch(`${npmPackumentUrl(registry, name)}/${version}`);
|
|
128
|
-
if (!metaRes.ok) throw new Error(`gpu backend packument HTTP ${metaRes.status}`);
|
|
129
|
-
const meta = await metaRes.json();
|
|
130
|
-
const tarball = meta.dist?.tarball;
|
|
131
|
-
const integrity = meta.dist?.integrity;
|
|
132
|
-
if (!tarball || !integrity) throw new Error("gpu backend packument missing dist");
|
|
133
|
-
console.warn(`[llama] downloading GPU backend ${name}@${version}`);
|
|
134
|
-
const tarRes = await doFetch(tarball);
|
|
135
|
-
if (!tarRes.ok) throw new Error(`gpu backend tarball HTTP ${tarRes.status}`);
|
|
136
|
-
const body = Buffer.from(await tarRes.arrayBuffer());
|
|
137
|
-
verifyIntegrity(body, integrity);
|
|
138
|
-
extractNpmPackageBins(body, dest);
|
|
139
|
-
}
|
|
140
|
-
function registerGpuPackage(name, dest) {
|
|
141
|
-
if (hookRegistered) return;
|
|
142
|
-
const index = path.join(dest, "dist", "index.js");
|
|
143
|
-
if (!fs.existsSync(index)) return;
|
|
144
|
-
const url = pathToFileURL(index).href;
|
|
145
|
-
registerHooks({
|
|
146
|
-
resolve(specifier, context, nextResolve) {
|
|
147
|
-
if (specifier === name) return { url, shortCircuit: true };
|
|
148
|
-
return nextResolve(specifier, context);
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
hookRegistered = true;
|
|
152
|
-
}
|
|
153
|
-
export {
|
|
154
|
-
ensureGpuBackend,
|
|
155
|
-
hasPackagedAddon,
|
|
156
|
-
llamaCppVersion
|
|
157
|
-
};
|
|
158
|
-
//# sourceMappingURL=gpuBackendInstall-COO4pT2M.js.map
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
const IDLE_MS = 3 * 6e4;
|
|
2
|
-
const TIMEOUT_MS = 3e4;
|
|
3
|
-
class ExitError extends Error {
|
|
4
|
-
}
|
|
5
|
-
function toPcm16(samples) {
|
|
6
|
-
const pcm = Buffer.alloc(samples.length * 2);
|
|
7
|
-
for (let i = 0; i < samples.length; i++) {
|
|
8
|
-
const s = Math.max(-1, Math.min(1, samples[i]));
|
|
9
|
-
pcm.writeInt16LE(Math.round(s < 0 ? s * 32768 : s * 32767), i * 2);
|
|
10
|
-
}
|
|
11
|
-
return pcm;
|
|
12
|
-
}
|
|
13
|
-
function createHanbaoEngine({
|
|
14
|
-
start,
|
|
15
|
-
idleMs = IDLE_MS,
|
|
16
|
-
timeoutMs = TIMEOUT_MS
|
|
17
|
-
}) {
|
|
18
|
-
let current = null;
|
|
19
|
-
let queue = Promise.resolve();
|
|
20
|
-
let inflight = 0;
|
|
21
|
-
let nextId = 0;
|
|
22
|
-
let idle;
|
|
23
|
-
let disposed = false;
|
|
24
|
-
const launch = () => {
|
|
25
|
-
const proc = start();
|
|
26
|
-
let pending = null;
|
|
27
|
-
let exited = false;
|
|
28
|
-
let buffer = "";
|
|
29
|
-
const detach = () => {
|
|
30
|
-
if (current === child) current = null;
|
|
31
|
-
};
|
|
32
|
-
const gone = (reason) => {
|
|
33
|
-
exited = true;
|
|
34
|
-
detach();
|
|
35
|
-
pending?.reject(new ExitError(`hanbao exited: ${reason}`));
|
|
36
|
-
pending = null;
|
|
37
|
-
};
|
|
38
|
-
proc.stdout.setEncoding("utf8");
|
|
39
|
-
proc.stdout.on("data", (chunk) => {
|
|
40
|
-
buffer += chunk;
|
|
41
|
-
for (let i = buffer.indexOf("\n"); i >= 0; i = buffer.indexOf("\n")) {
|
|
42
|
-
const line = buffer.slice(0, i);
|
|
43
|
-
buffer = buffer.slice(i + 1);
|
|
44
|
-
let reply;
|
|
45
|
-
try {
|
|
46
|
-
reply = JSON.parse(line);
|
|
47
|
-
} catch {
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
if (pending && (reply.id === pending.id || reply.id === void 0)) {
|
|
51
|
-
pending.resolve(reply);
|
|
52
|
-
pending = null;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
proc.stdin.on("error", () => {
|
|
57
|
-
});
|
|
58
|
-
proc.on("error", (error) => gone(error.message));
|
|
59
|
-
proc.on("exit", (code, signal) => gone(String(signal ?? code)));
|
|
60
|
-
const child = {
|
|
61
|
-
ask: (message) => new Promise((resolve, reject) => {
|
|
62
|
-
if (exited) return reject(new ExitError("hanbao exited"));
|
|
63
|
-
const id = ++nextId;
|
|
64
|
-
pending = { id, resolve, reject };
|
|
65
|
-
proc.stdin.write(`${JSON.stringify({ ...message, id })}
|
|
66
|
-
`);
|
|
67
|
-
}),
|
|
68
|
-
stop: () => {
|
|
69
|
-
detach();
|
|
70
|
-
proc.stdin.end(`${JSON.stringify({ op: "shutdown" })}
|
|
71
|
-
`);
|
|
72
|
-
setTimeout(() => proc.kill("SIGKILL"), 5e3).unref();
|
|
73
|
-
},
|
|
74
|
-
kill: () => {
|
|
75
|
-
detach();
|
|
76
|
-
proc.kill("SIGKILL");
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
return child;
|
|
80
|
-
};
|
|
81
|
-
const alive = () => {
|
|
82
|
-
current ??= launch();
|
|
83
|
-
return current;
|
|
84
|
-
};
|
|
85
|
-
const once = async (message, child = alive()) => {
|
|
86
|
-
let timer;
|
|
87
|
-
try {
|
|
88
|
-
return await Promise.race([
|
|
89
|
-
child.ask(message),
|
|
90
|
-
new Promise((_, reject) => {
|
|
91
|
-
timer = setTimeout(() => {
|
|
92
|
-
child.kill();
|
|
93
|
-
reject(new Error("hanbao timed out"));
|
|
94
|
-
}, timeoutMs);
|
|
95
|
-
})
|
|
96
|
-
]);
|
|
97
|
-
} finally {
|
|
98
|
-
clearTimeout(timer);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
const text = (reply) => {
|
|
102
|
-
if (reply.ok !== true || typeof reply.text !== "string") {
|
|
103
|
-
throw new Error(`hanbao failed: ${String(reply.error ?? "bad reply")}`);
|
|
104
|
-
}
|
|
105
|
-
return reply.text;
|
|
106
|
-
};
|
|
107
|
-
const run = async (samples) => {
|
|
108
|
-
const message = { op: "asr", b64: toPcm16(samples).toString("base64") };
|
|
109
|
-
try {
|
|
110
|
-
return text(await once(message));
|
|
111
|
-
} catch (error) {
|
|
112
|
-
if (!(error instanceof ExitError) || disposed) throw error;
|
|
113
|
-
return text(await once(message));
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
const hold = () => {
|
|
117
|
-
if (disposed) throw new Error("hanbao engine disposed");
|
|
118
|
-
clearTimeout(idle);
|
|
119
|
-
inflight++;
|
|
120
|
-
};
|
|
121
|
-
const release = () => {
|
|
122
|
-
if (--inflight > 0 || !current || disposed) return;
|
|
123
|
-
idle = setTimeout(() => current?.stop(), idleMs);
|
|
124
|
-
idle.unref?.();
|
|
125
|
-
};
|
|
126
|
-
const enqueue = (job) => {
|
|
127
|
-
const task = queue.then(() => {
|
|
128
|
-
if (disposed) throw new Error("hanbao engine disposed");
|
|
129
|
-
return job();
|
|
130
|
-
});
|
|
131
|
-
queue = task.catch(() => {
|
|
132
|
-
});
|
|
133
|
-
return task;
|
|
134
|
-
};
|
|
135
|
-
return {
|
|
136
|
-
transcribe: async (samples) => {
|
|
137
|
-
hold();
|
|
138
|
-
try {
|
|
139
|
-
return await enqueue(() => run(samples));
|
|
140
|
-
} finally {
|
|
141
|
-
release();
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
openStream: () => {
|
|
145
|
-
hold();
|
|
146
|
-
let owner = null;
|
|
147
|
-
let closed = false;
|
|
148
|
-
const close = () => {
|
|
149
|
-
if (closed) return;
|
|
150
|
-
closed = true;
|
|
151
|
-
release();
|
|
152
|
-
};
|
|
153
|
-
const opened = enqueue(async () => {
|
|
154
|
-
const child = alive();
|
|
155
|
-
text(await once({ op: "begin" }, child));
|
|
156
|
-
owner = child;
|
|
157
|
-
});
|
|
158
|
-
opened.catch(close);
|
|
159
|
-
const send = (message) => enqueue(async () => {
|
|
160
|
-
if (!owner || current !== owner) throw new Error("hanbao stream lost");
|
|
161
|
-
return text(await once(message, owner));
|
|
162
|
-
}).catch((error) => {
|
|
163
|
-
close();
|
|
164
|
-
throw error;
|
|
165
|
-
});
|
|
166
|
-
return {
|
|
167
|
-
accept: (samples) => send({ op: "chunk", b64: toPcm16(samples).toString("base64") }),
|
|
168
|
-
finish: () => send({ op: "end" }).finally(close),
|
|
169
|
-
cancel: () => {
|
|
170
|
-
if (closed) return;
|
|
171
|
-
void send({ op: "cancel" }).catch(() => {
|
|
172
|
-
}).finally(close);
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
},
|
|
176
|
-
dispose: () => {
|
|
177
|
-
disposed = true;
|
|
178
|
-
clearTimeout(idle);
|
|
179
|
-
current?.stop();
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
export {
|
|
184
|
-
createHanbaoEngine,
|
|
185
|
-
toPcm16
|
|
186
|
-
};
|
|
187
|
-
//# sourceMappingURL=hanbao-_aDjow_f.js.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const SPEECH_SAMPLE_RATE = 16e3;
|
|
2
|
-
const SPEECH_MAX_SECONDS = 300;
|
|
3
|
-
const SPEECH_MODEL_IDS = [
|
|
4
|
-
"x-asr-streaming",
|
|
5
|
-
"x-asr",
|
|
6
|
-
"qwen3-asr",
|
|
7
|
-
"sense-voice",
|
|
8
|
-
"hanbao",
|
|
9
|
-
"gemini-live",
|
|
10
|
-
"wetype"
|
|
11
|
-
];
|
|
12
|
-
const DEFAULT_SPEECH_MODEL_ID = "qwen3-asr";
|
|
13
|
-
function isSpeechModelId(value) {
|
|
14
|
-
return typeof value === "string" && SPEECH_MODEL_IDS.includes(value);
|
|
15
|
-
}
|
|
16
|
-
const SPEECH_SESSION_ID_MAX = 64;
|
|
17
|
-
export {
|
|
18
|
-
DEFAULT_SPEECH_MODEL_ID as D,
|
|
19
|
-
SPEECH_SAMPLE_RATE as S,
|
|
20
|
-
SPEECH_MAX_SECONDS as a,
|
|
21
|
-
SPEECH_MODEL_IDS as b,
|
|
22
|
-
SPEECH_SESSION_ID_MAX as c,
|
|
23
|
-
isSpeechModelId as i
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=speech-CqK6_tIR.js.map
|