@kabmo-labs/kabmo 0.50.0 → 0.51.0
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/dist/client/index.html +1 -1
- package/dist/client/index.js +503 -501
- package/dist/client/static/js/{Body-pd3nt4xa.js → Body-s3nh6vet.js} +3 -3
- package/dist/client/static/js/{CsvGrid-eksmqv8f.js → CsvGrid-j4h6cpnn.js} +2 -2
- package/dist/client/static/js/{DocxView-xfx1kt8x.js → DocxView-197x16zq.js} +3 -3
- package/dist/client/static/js/{DrawioView-2xyqg9bv.js → DrawioView-v6ps0cm5.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-ps3f0aa5.js → HtmlPreview-a2t5zngp.js} +1 -1
- package/dist/client/static/js/ImageView-ar7hz7jx.js +1 -0
- package/dist/client/static/js/LayoutWrapper-epef152a.js +2 -0
- package/dist/client/static/js/MergeDiffView-7rwjvzk5.js +1 -0
- package/dist/client/static/js/Modal-9nxt67fm.js +60 -0
- package/dist/client/static/js/{PdfView-8fp08jym.js → PdfView-gzhcym20.js} +1 -1
- package/dist/client/static/js/SessionsView-3h872gpe.js +1 -0
- package/dist/client/static/js/{SheetView-g7mstjdp.js → SheetView-baaynkb4.js} +8 -8
- package/dist/client/static/js/{SvgPreview-wsv4h6c6.js → SvgPreview-jzcqwwcc.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-1kgm1049.js → abnfDiagram-O67JEVCF-grb1sfhr.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-3hkq8grc.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-mtm210rw.js → architectureDiagram-NJMV4G6O-9084jzwr.js} +5 -5
- package/dist/client/static/js/{astro-dszrfwwn.js → astro-m3fcq2sa.js} +1 -1
- package/dist/client/static/js/bash-n7wcmq3s.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-s474vn2w.js → blockDiagram-BEXU5L5S-qqcjrg1b.js} +6 -6
- package/dist/client/static/js/c-ypdp030b.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-s68v6tc8.js → c4Diagram-YGBWAQC7-gc8fqbpc.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-291va3yk.js → classDiagram-v2-NBCMYWYE-pp6060kq.js} +7 -7
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-0zg7crdw.js → cose-bilkent-JH36ORCC-744ekavk.js} +1 -1
- package/dist/client/static/js/cpp-cxwev3gs.js +1 -0
- package/dist/client/static/js/css-6mxcqf8c.js +1 -0
- package/dist/client/static/js/css-9gak6bze.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-9m18e6m5.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-4gnmn3yc.js → cynefinDiagram-VND7K2PF-57dja6g9.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-nxmj6bkg.js → dagre-6A5THRUB-de4xrbrw.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-3171dabw.js → diagram-22UHCM2B-ky3ncyv8.js} +18 -18
- package/dist/client/static/js/{diagram-3UASUU5V-9h1pd6h8.js → diagram-3UASUU5V-zgg82bz9.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-ywfrbd6m.js → diagram-ATOU4E4O-r4s13e4n.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-t87b4wbk.js → diagram-CDSNMT55-my21t0kq.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-bzv52p97.js → diagram-MLGK6HIB-pvt20jtj.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-8f66rp0a.js → diagram-MPIPVDR6-as9dk4f3.js} +2 -2
- package/dist/client/static/js/{dockerfile-z3v0km9v.js → dockerfile-3b5caedj.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-3y4w2j6t.js → ebnfDiagram-ZINNZB2B-tj3hkcj4.js} +1 -1
- package/dist/client/static/js/{elixir-c701n0qg.js → elixir-7q2k61zb.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-d9d23jch.js → elk-276RUBZZ-5e7wczf3.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-w4z3501c.js → erDiagram-OPXOYQCR-5jje7qrh.js} +3 -3
- package/dist/client/static/js/{erlang-cpw5s1f9.js → erlang-tjsd7n4d.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-d4egnv9v.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-pdeqndnd.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-7wcxk4bm.js → ganttDiagram-FUAMR5RP-7hresycc.js} +4 -4
- package/dist/client/static/js/gitGraph-4MIJSDKK-grqv890n.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-sdh1hsb1.js → gitGraphDiagram-X574FWY7-8m202jb7.js} +17 -17
- package/dist/client/static/js/graphql-6rwdfcnf.js +1 -0
- package/dist/client/static/js/html-p76eszt9.js +1 -0
- package/dist/client/static/js/{index-zhnfq8br.js → index-0prwdwyb.js} +2 -2
- package/dist/client/static/js/{index-tew3rd6t.js → index-0y6tstk8.js} +1 -1
- package/dist/client/static/js/{index-1dx4dqzy.js → index-20hj80g4.js} +4 -4
- package/dist/client/static/js/index-21421tq7.js +2 -0
- package/dist/client/static/js/{index-0q39ajgh.js → index-254387vg.js} +2 -2
- package/dist/client/static/js/index-2y4gk5q5.js +2 -0
- package/dist/client/static/js/index-3fk8grhz.js +2 -0
- package/dist/client/static/js/index-3rrdmk9m.js +2 -0
- package/dist/client/static/js/{index-frhxbqhg.js → index-3sz9cztk.js} +1 -1
- package/dist/client/static/js/{index-9ydvkxz1.css → index-4m2d73m3.css} +1 -1
- package/dist/client/static/js/{index-7xn7gxgw.js → index-4nvcwtvr.js} +2 -2
- package/dist/client/static/js/index-4ppap7vb.js +9 -0
- package/dist/client/static/js/{index-vgwjn4de.js → index-4tbdws4r.js} +2 -2
- package/dist/client/static/js/{index-hqhz4eam.js → index-56hy2hcy.js} +1 -1
- package/dist/client/static/js/{index-dgkpbrdr.js → index-60g0e74a.js} +2 -2
- package/dist/client/static/js/{index-n54jd3aw.js → index-7ag37ghj.js} +11 -11
- package/dist/client/static/js/{index-bggz63br.js → index-7ehcjb3r.js} +7 -7
- package/dist/client/static/js/index-899yw6fh.js +2 -0
- package/dist/client/static/js/{index-4vaxdt8a.js → index-8pqx5n2p.js} +2 -2
- package/dist/client/static/js/{index-971stdh4.js → index-91jm3ywm.js} +2 -2
- package/dist/client/static/js/{index-5qwgexg6.js → index-9qf2h9jb.js} +4 -4
- package/dist/client/static/js/{index-wbma8kqw.js → index-9rp7h1nv.js} +23 -23
- package/dist/client/static/js/index-9rr23e0e.js +2 -0
- package/dist/client/static/js/index-9wj4ma9g.js +3 -0
- package/dist/client/static/js/{index-e471eprg.js → index-awtk0djy.js} +1 -1
- package/dist/client/static/js/{index-1d8v3bvm.js → index-awz6pyd0.js} +2 -2
- package/dist/client/static/js/index-cvx1vkrx.js +1 -0
- package/dist/client/static/js/{index-09ap9ncj.js → index-cwwg7k5f.js} +46 -46
- package/dist/client/static/js/{index-8fk7h2me.js → index-dzatbdws.js} +5 -5
- package/dist/client/static/js/{index-1adfks1n.js → index-e6ew77ph.js} +2 -2
- package/dist/client/static/js/{index-144aknp3.js → index-ej1va073.js} +2 -2
- package/dist/client/static/js/{index-cm8pa783.js → index-er7pj5k6.js} +2 -2
- package/dist/client/static/js/index-fm0t4pct.js +4 -0
- package/dist/client/static/js/{index-aqqj4xxy.js → index-g5wp6ksw.js} +2 -2
- package/dist/client/static/js/{index-ajqmcds5.js → index-gy4mtr2e.js} +2 -2
- package/dist/client/static/js/{index-kce86cnw.js → index-j9y4tjk0.js} +2 -2
- package/dist/client/static/js/{index-gws4prmg.js → index-kt7c42n7.js} +2 -2
- package/dist/client/static/js/index-ktmb341a.js +468 -0
- package/dist/client/static/js/{index-56319bht.js → index-m6zncj00.js} +2 -2
- package/dist/client/static/js/{index-jxxewcat.js → index-mpyd7qxj.js} +2 -2
- package/dist/client/static/js/{index-gcgsjd3c.js → index-ms80nne4.js} +2 -2
- package/dist/client/static/js/{index-k66w6d9b.js → index-my856e49.js} +2 -2
- package/dist/client/static/js/{index-c2mqr5fh.js → index-nt17ejrm.js} +2 -2
- package/dist/client/static/js/{index-zsx5vs3j.js → index-pvv340b4.js} +2 -2
- package/dist/client/static/js/{index-svx6rnfs.js → index-pxr36neg.js} +2 -2
- package/dist/client/static/js/{index-r2z0a118.js → index-q0k1am0g.js} +2 -2
- package/dist/client/static/js/{index-xrn2reb5.js → index-qrpx4sk1.js} +2 -2
- package/dist/client/static/js/{index-ajdzvegm.js → index-r2zsw7nw.js} +8 -8
- package/dist/client/static/js/{index-xgbcn89g.js → index-rbkvw2xs.js} +2 -2
- package/dist/client/static/js/{index-2g1ey1c9.js → index-scmtzcv1.js} +2 -2
- package/dist/client/static/js/{index-3rhk4apq.js → index-syvkpnc8.js} +1 -1
- package/dist/client/static/js/index-tfqqsj2g.js +1 -0
- package/dist/client/static/js/{index-7jdz4jr4.js → index-tj7xr4ta.js} +2 -2
- package/dist/client/static/js/{index-1vfej0gk.js → index-wvw70pgd.js} +2 -2
- package/dist/client/static/js/{index-qxzyvye9.js → index-wxs0x3g1.js} +2 -2
- package/dist/client/static/js/index-x507ndnc.js +314 -0
- package/dist/client/static/js/{index-1jx4nt2f.js → index-x87scjpa.js} +1 -1
- package/dist/client/static/js/{index-grkacfv3.js → index-xtrsvm0d.js} +2 -2
- package/dist/client/static/js/{index-ratbr10x.js → index-y1j18rha.js} +2 -2
- package/dist/client/static/js/{index-r6bm9sth.js → index-yv2ervdj.js} +7 -7
- package/dist/client/static/js/{index-k3vvk28c.js → index-z2pmt1bc.js} +1 -1
- package/dist/client/static/js/{index-ap6hv7s7.js → index-z446edg9.js} +1 -1
- package/dist/client/static/js/{index-1ec33b1j.js → index-zkgqa0c2.js} +2 -2
- package/dist/client/static/js/index-zwbw177x.js +2 -0
- package/dist/client/static/js/info-A6RAGUB7-rzpg7qk1.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-gtdp0z6p.js → infoDiagram-VRGFBTTK-5mb5w005.js} +2 -2
- package/dist/client/static/js/ini-kjcpgebh.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-c05m0sqq.js → ishikawaDiagram-OU5B5YK6-zk7fa0fm.js} +3 -3
- package/dist/client/static/js/java-0bcyv1jt.js +1 -0
- package/dist/client/static/js/javascript-0mqgcvps.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kgk5ygm2.js → journeyDiagram-ZHPQQLJL-8jd7b2aw.js} +5 -5
- package/dist/client/static/js/json-mb8k0b1n.js +1 -0
- package/dist/client/static/js/jsx-8p6dqgpq.js +1 -0
- package/dist/client/static/js/{julia-w13bz4s1.js → julia-nwh5w343.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-q1w9w68s.js → kanban-definition-PNTS6WVX-yp9rks4k.js} +7 -7
- package/dist/client/static/js/lua-nxnqww9z.js +1 -0
- package/dist/client/static/js/markdown-8gbyxxjd.js +1 -0
- package/dist/client/static/js/{mermaid.core-1rz62j9g.js → mermaid.core-kxsxr8ec.js} +9 -9
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-3m3w6bnb.js → mindmap-definition-NLK3R4M7-anx2kj3b.js} +5 -5
- package/dist/client/static/js/one-dark-pro-wyegjr0d.js +1 -0
- package/dist/client/static/js/one-light-kp6c3eqh.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-eac14hsq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-svd3ex4e.js → pegDiagram-GJSIUBJH-9egqyzkc.js} +1 -1
- package/dist/client/static/js/{perl-hcg3hacf.js → perl-wb4wtc9x.js} +1 -1
- package/dist/client/static/js/{php-q6hhp84p.js → php-9g594k9f.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-a9xqvysf.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-2nrkw034.js → pieDiagram-5QR66LMP-f3dvprbm.js} +3 -3
- package/dist/client/static/js/properties-d5bwhgwz.js +1 -0
- package/dist/client/static/js/python-fdwwjjhh.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-4895d1aq.js → quadrantDiagram-O4NWA36T-qsghd295.js} +6 -6
- package/dist/client/static/js/r-4d2ygtfj.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-jv2pm0fe.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-j74sc0b6.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-eaf19baz.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d4j5nq31.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-ba862a9p.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-zj3g9yne.js → railroadDiagram-XR7U4H2S-6vmazht2.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-727yjvs8.js → requirementDiagram-PLB6GJNP-phs0wn1v.js} +5 -5
- package/dist/client/static/js/{ruby-wzqz8vw6.js → ruby-c4hxsegh.js} +1 -1
- package/dist/client/static/js/{rust-r94pgqvf.js → rust-e4whdswc.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-17c7p2pe.js → sankeyDiagram-IPEJSGJF-vkktegjk.js} +4 -4
- package/dist/client/static/js/{sass-xb3van7h.js → sass-6yxywx7t.js} +1 -1
- package/dist/client/static/js/{scss-ddg6t3x4.js → scss-9wz47c6t.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-wcmbpckr.js → sequenceDiagram-PO4LG4MO-37e6se72.js} +16 -16
- package/dist/client/static/js/{sizeCapture-INFHLROL-nkr57cd6.js → sizeCapture-INFHLROL-3b4nsa4s.js} +1 -1
- package/dist/client/static/js/sql-sd00wgem.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-vd7r8s78.js → stateDiagram-v2-GCMORJYK-2nnyqs9x.js} +3 -3
- package/dist/client/static/js/{svelte-wzaxz546.js → svelte-mm3jfpje.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-zhxm05ak.js → swimlanes-2SLR337P-eezd46ps.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-h78096xp.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-n7gbzhzd.js → timeline-definition-EJHVYXUP-pz0f2b4h.js} +6 -6
- package/dist/client/static/js/treeView-Q6P3EWNA-e8yb44pd.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-zvdv84vp.js +1 -0
- package/dist/client/static/js/typescript-5txwpd9t.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-davsnwkf.js → usecaseDiagram-POWQR4AR-hvg7a87b.js} +29 -29
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-gb54bh5k.js → vennDiagram-UO4OBE2U-03zh9phs.js} +8 -8
- package/dist/client/static/js/{vue-6zhfw7zx.js → vue-rcdqpz7q.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hbv0cg4s.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-sf98cg9t.js → wardleyDiagram-VNRHLVJA-xy77th92.js} +5 -5
- package/dist/client/static/js/xml-vtrdnrn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9nn09k40.js → xychartDiagram-PMCCYNJV-h48448cm.js} +4 -4
- package/dist/client/static/js/yaml-6k1tmwtm.js +1 -0
- package/package.json +2 -1
- package/src/client/components/common/MarkdownRenderer.tsx +31 -34
- package/src/client/components/common/ViewportSelector.tsx +4 -0
- package/src/client/components/common/command-palette/index.tsx +5 -2
- package/src/client/components/common/markdown-inline-file.test.tsx +131 -0
- package/src/client/components/common/search-select/OptionList.tsx +164 -0
- package/src/client/components/common/search-select/index.tsx +159 -136
- package/src/client/components/common/search-select/option.ts +16 -0
- package/src/client/components/common/search-select/search-select.test.tsx +61 -2
- package/src/client/components/common/sort-menu/index.tsx +9 -4
- package/src/client/components/layout/session-sidebar/HarnessFilter.tsx +26 -6
- package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +45 -49
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +31 -25
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +40 -101
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/dictation-settings/CaptureSection.tsx +13 -18
- package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +8 -9
- package/src/client/components/settings/categories/keyboard-settings/ComposerKeys.tsx +10 -10
- package/src/client/components/settings/categories/mcp-settings/AdvancedSection.tsx +21 -18
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +12 -7
- package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +11 -11
- package/src/client/components/settings/categories/omp-settings/RoleEditor.test.ts +14 -11
- package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +17 -16
- package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +11 -9
- package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +10 -9
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +10 -8
- package/src/client/components/settings/categories/provider-settings/DialectFields.tsx +40 -24
- package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +13 -9
- package/src/client/components/settings/categories/provider-settings/EntryModal.tsx +22 -17
- package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +79 -50
- package/src/client/components/settings/categories/provider-settings/model-dialogs.test.tsx +14 -7
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +117 -15
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.tsx +27 -3
- package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +3 -1
- package/src/client/components/settings/categories/voice-settings/speech/EngineSection.tsx +32 -2
- package/src/client/components/settings/categories/voice-settings/speech/ModelsSection.tsx +277 -0
- package/src/client/components/settings/categories/voice-settings/speech/TestSection.tsx +2 -1
- package/src/client/components/settings/categories/voice-settings/speech/VoiceSection.tsx +83 -41
- package/src/client/components/workspace/btw-panel/TopicMenu.tsx +20 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.speech.test.tsx +35 -6
- package/src/client/components/workspace/chat-timeline/SpeechButton.tsx +111 -36
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +21 -6
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +7 -4
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +22 -6
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +17 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +8 -65
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.test.ts +12 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.test.ts +35 -218
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.ts +40 -177
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.test.ts +13 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.test.tsx +79 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.tsx +86 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +25 -16
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.test.ts +4 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view.ts +11 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.plugin.test.ts +3 -1
- package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +15 -15
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +30 -5
- package/src/client/data/mock/chat.ts +17 -0
- package/src/client/data/samples/tools-session.ts +8 -5
- package/src/client/hooks/editor/font.test.ts +21 -0
- package/src/client/hooks/editor/font.ts +12 -9
- package/src/client/hooks/settings/local-tts-models.ts +164 -0
- package/src/client/hooks/tts/tts-context.ts +6 -0
- package/src/client/hooks/tts/use-tts-player.ts +10 -0
- package/src/client/hooks/ui/markdown-render.ts +9 -1
- package/src/client/hooks/ui/markdown-scoped-links.ts +77 -0
- package/src/client/hooks/ui/open-inline-file.test.ts +144 -0
- package/src/client/hooks/ui/open-inline-file.ts +71 -0
- package/src/client/lib/commands/overlays.ts +16 -2
- package/src/client/lib/tts/player.test.ts +61 -0
- package/src/client/lib/tts/player.ts +120 -41
- package/src/client/tailwind.css +16 -0
- package/src/server/lib/chat/normalize-tools.server.test.ts +79 -0
- package/src/server/lib/chat/normalize-tools.server.ts +87 -0
- package/src/server/lib/harness/acp/background-replay.test.ts +36 -0
- package/src/server/lib/harness/acp/background-replay.ts +8 -3
- package/src/server/lib/harness/acp/frames-tool-shapes.test.ts +41 -13
- package/src/server/lib/harness/acp/frames-vendor-names.test.ts +209 -0
- package/src/server/lib/harness/acp/frames.test.ts +11 -20
- package/src/server/lib/harness/acp/frames.ts +5 -3
- package/src/server/lib/harness/acp/mapper.ts +5 -41
- package/src/server/lib/harness/acp/replay-transcript.ts +6 -1
- package/src/server/lib/harness/acp/subagent-frames.test.ts +1 -1
- package/src/server/lib/harness/acp/subagent-frames.ts +0 -2
- package/src/server/lib/harness/acp/tool-calls.ts +5 -16
- package/src/server/lib/harness/acp/tool-identity.test.ts +69 -8
- package/src/server/lib/harness/acp/tool-identity.ts +58 -10
- package/src/server/lib/harness/acp/tool-shape.ts +5 -3
- package/src/server/lib/harness/codex/transcript.server.test.ts +3 -1
- package/src/server/lib/harness/codex/transcript.server.ts +8 -15
- package/src/server/lib/lifecycle/paths.ts +12 -0
- package/src/server/lib/omp/session/messages.ts +5 -1
- package/src/server/lib/realtime/topics/peer-relay.server.ts +9 -1
- package/src/server/lib/realtime/topics/session.server.ts +5 -1
- package/src/server/lib/tts/engines/adapters.test.ts +17 -8
- package/src/server/lib/tts/engines/deepgram.ts +30 -9
- package/src/server/lib/tts/engines/index.ts +11 -0
- package/src/server/lib/tts/engines/local.ts +53 -0
- package/src/server/lib/tts/engines/sherpa-onnx-node.d.ts +38 -0
- package/src/server/lib/tts/engines/sherpa.test.ts +53 -0
- package/src/server/lib/tts/engines/sherpa.ts +287 -0
- package/src/server/lib/tts/local-models.server.ts +257 -0
- package/src/server/lib/tts/local-request.test.ts +66 -0
- package/src/server/lib/tts/local-request.ts +59 -0
- package/src/server/lib/tts/model-manifest.server.test.ts +71 -0
- package/src/server/lib/tts/model-manifest.server.ts +154 -0
- package/src/server/lib/tts/settings.server.ts +7 -4
- package/src/server/lib/tts/wav.test.ts +37 -0
- package/src/server/lib/tts/wav.ts +43 -0
- package/src/server/routes/chat/session-legacy-tools.test.ts +132 -0
- package/src/server/routes/chat/session.ts +10 -4
- package/src/server/routes/tts/index.ts +2 -0
- package/src/server/routes/tts/models.test.ts +148 -0
- package/src/server/routes/tts/models.ts +89 -0
- package/src/shared/lib/chat/tool/normalize.ts +67 -0
- package/src/shared/lib/chat/tool/render-key.test.ts +167 -0
- package/src/shared/lib/chat/tool/render-key.ts +247 -0
- package/src/shared/lib/chat/tool/tool-aliases.test.ts +42 -0
- package/src/shared/lib/chat/tool/tool-aliases.ts +59 -12
- package/src/shared/lib/fs/open-reference.test.ts +64 -0
- package/src/shared/lib/fs/open-reference.ts +74 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +20 -20
- package/src/shared/lib/markdown/inline-file.test.ts +100 -0
- package/src/shared/lib/markdown/inline-file.ts +213 -0
- package/src/shared/lib/omp/session/messages-map.test.ts +2 -1
- package/src/shared/lib/omp/session/messages-parse.ts +3 -2
- package/src/shared/lib/omp/session/parse-message-blocks.ts +14 -0
- package/src/shared/lib/omp/subagent/transcript-client.ts +5 -1
- package/src/shared/lib/tts/engines.test.ts +28 -3
- package/src/shared/lib/tts/engines.ts +31 -6
- package/src/shared/lib/tts/local-models.test.ts +69 -0
- package/src/shared/lib/tts/local-models.ts +200 -0
- package/src/shared/lib/tts/speakable.test.ts +21 -1
- package/src/shared/lib/tts/speakable.ts +66 -33
- package/src/shared/lib/tts/voices.ts +125 -19
- package/src/shared/types/chat.ts +3 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/tool-render.ts +37 -0
- package/dist/client/static/js/ImageView-7vse3k6x.js +0 -1
- package/dist/client/static/js/LayoutWrapper-qdp83fps.js +0 -2
- package/dist/client/static/js/MergeDiffView-hzsccppq.js +0 -1
- package/dist/client/static/js/Modal-zw9x5b6f.js +0 -60
- package/dist/client/static/js/SessionsView-qmgg03fv.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-g7b64973.js +0 -1
- package/dist/client/static/js/bash-z5pe89pt.js +0 -1
- package/dist/client/static/js/c-fy0fysfw.js +0 -1
- package/dist/client/static/js/cpp-wam8dze6.js +0 -1
- package/dist/client/static/js/css-ke51m4kc.js +0 -1
- package/dist/client/static/js/css-yryw442h.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-8bscrcct.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-pj22bng1.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-9h6g160j.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-hgw4jcvk.js +0 -1
- package/dist/client/static/js/graphql-0yv8dc1v.js +0 -1
- package/dist/client/static/js/html-zk3m0az9.js +0 -1
- package/dist/client/static/js/index-0ff2x5g9.js +0 -1
- package/dist/client/static/js/index-17jy16v3.js +0 -314
- package/dist/client/static/js/index-1kjgdyfk.js +0 -2
- package/dist/client/static/js/index-4z3qtazf.js +0 -2
- package/dist/client/static/js/index-779rptb2.js +0 -1
- package/dist/client/static/js/index-9jrej3ht.js +0 -3
- package/dist/client/static/js/index-bczhbk01.js +0 -2
- package/dist/client/static/js/index-evvmkk2f.js +0 -2
- package/dist/client/static/js/index-jr6q69r3.js +0 -465
- package/dist/client/static/js/index-qaxjp73x.js +0 -2
- package/dist/client/static/js/index-rgneq3zt.js +0 -2
- package/dist/client/static/js/index-tfwsch7a.js +0 -4
- package/dist/client/static/js/index-vn495w82.js +0 -9
- package/dist/client/static/js/info-A6RAGUB7-k0kv05ny.js +0 -1
- package/dist/client/static/js/ini-apj95p59.js +0 -1
- package/dist/client/static/js/java-khk2v3g4.js +0 -1
- package/dist/client/static/js/javascript-gez6yppm.js +0 -1
- package/dist/client/static/js/json-r78y6e80.js +0 -1
- package/dist/client/static/js/jsx-h7hfj8cz.js +0 -1
- package/dist/client/static/js/lua-pat2bzg3.js +0 -1
- package/dist/client/static/js/markdown-545zn05v.js +0 -1
- package/dist/client/static/js/one-dark-pro-7c942tnw.js +0 -1
- package/dist/client/static/js/one-light-tp8y6c5g.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-ne66q5h9.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-ej9aysvz.js +0 -1
- package/dist/client/static/js/properties-9f76xngb.js +0 -1
- package/dist/client/static/js/python-nwerpkfq.js +0 -1
- package/dist/client/static/js/r-39k5dr2p.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-375pe46t.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-hdgdfsc1.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2p5ynn4a.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2p1fxxen.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-g131pt42.js +0 -1
- package/dist/client/static/js/sql-4dcrp3sw.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-myzk2rg0.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-gfztfha9.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-kwtrwq1f.js +0 -1
- package/dist/client/static/js/typescript-q0493nmw.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-30dnzvww.js +0 -1
- package/dist/client/static/js/xml-91sb3gt9.js +0 -1
- package/dist/client/static/js/yaml-ghx4mjw1.js +0 -1
|
@@ -16,6 +16,19 @@
|
|
|
16
16
|
* - **cursor** sends the real tool in `rawInput._toolName` (`"task"`), with
|
|
17
17
|
* `kind:"other"` and a title of "Task: Subagent task". `kind` alone therefore
|
|
18
18
|
* made a subagent look like a file read.
|
|
19
|
+
* - **zcode** names the call only in `_meta.claudeCode.toolName`, and **qwen**
|
|
20
|
+
* only in a flat `_meta.toolName`; both were left to `kind`, so `Agent`
|
|
21
|
+
* (`kind:"other"`) drew no card at all.
|
|
22
|
+
* - **kimi** sends NEITHER `name` nor `kind`: the tool is the prefix of
|
|
23
|
+
* `title` (`"StrReplaceFile: src/a.ts"`), and the only other field is the
|
|
24
|
+
* streamed arguments in `content`.
|
|
25
|
+
*
|
|
26
|
+
* ACP only says an agent SHOULD report `name`, so the identity has to be
|
|
27
|
+
* recovered from every place a measured adapter puts it. The order is
|
|
28
|
+
* deliberate: the spec field first, then the vendor `_meta` keys (grok, zcode,
|
|
29
|
+
* qwen), then the wrapped name cursor hides, and finally the title prefix —
|
|
30
|
+
* which is read ONLY when both `name` and `kind` are absent, because a title is
|
|
31
|
+
* display copy that may merely look like a tool name.
|
|
19
32
|
*
|
|
20
33
|
* `kind` is the spec's ten-value enum, but adapters invent more (`delegate`,
|
|
21
34
|
* `subagent`). An unknown value becomes `other` with the original kept as
|
|
@@ -52,17 +65,48 @@ function record(value: unknown): Record<string, unknown> | undefined {
|
|
|
52
65
|
: undefined;
|
|
53
66
|
}
|
|
54
67
|
|
|
55
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* The `{name, kind}` a vendor `_meta` carries, when it carries one.
|
|
70
|
+
*
|
|
71
|
+
* Three measured spellings, in the order they win:
|
|
72
|
+
* - `_meta["x.ai/tool"] = {name, kind}` — grok, which sends NO top-level name;
|
|
73
|
+
* - `_meta.claudeCode.toolName` — zcode's bridge (and claude, which also sends
|
|
74
|
+
* the name at the top level, so this only fills in for the bridge);
|
|
75
|
+
* - a flat `_meta.toolName` — qwen, whose whole identity is that key.
|
|
76
|
+
*
|
|
77
|
+
* `kind` is only read from the grok envelope: the other two carry a name only,
|
|
78
|
+
* and inventing a kind from it would duplicate the alias table.
|
|
79
|
+
*/
|
|
56
80
|
function metaIdentity(update: Record<string, unknown>): AcpToolIdentity {
|
|
57
81
|
const meta = record(update._meta);
|
|
58
|
-
|
|
59
|
-
|
|
82
|
+
if (!meta) return {};
|
|
83
|
+
const vendor = record(meta['x.ai/tool']);
|
|
84
|
+
const claudeCode = record(meta.claudeCode);
|
|
85
|
+
const flat = typeof meta.toolName === 'string' && meta.toolName ? meta.toolName : undefined;
|
|
86
|
+
const name = typeof vendor?.name === 'string' && vendor.name
|
|
87
|
+
? vendor.name
|
|
88
|
+
: typeof claudeCode?.toolName === 'string' && claudeCode.toolName
|
|
89
|
+
? claudeCode.toolName
|
|
90
|
+
: flat;
|
|
60
91
|
return {
|
|
61
|
-
...(
|
|
62
|
-
...(typeof vendor
|
|
92
|
+
...(name ? { name } : {}),
|
|
93
|
+
...(typeof vendor?.kind === 'string' ? { rawKind: vendor.kind } : {}),
|
|
63
94
|
};
|
|
64
95
|
}
|
|
65
96
|
|
|
97
|
+
/**
|
|
98
|
+
* The tool a title names as `<tool>: <subject>`, or undefined.
|
|
99
|
+
*
|
|
100
|
+
* kimi's adapter reports `title = "ToolName: argumen"` and nothing else. The
|
|
101
|
+
* pattern demands a space after the colon, so a title that merely CONTAINS a
|
|
102
|
+
* colon — a URL (`https://…`), a Windows path (`C:\…`), prose — yields nothing.
|
|
103
|
+
*/
|
|
104
|
+
function titleIdentity(title: unknown): string | undefined {
|
|
105
|
+
if (typeof title !== 'string') return undefined;
|
|
106
|
+
const match = /^([A-Za-z_][\w.-]*):\s/.exec(title);
|
|
107
|
+
return match?.[1];
|
|
108
|
+
}
|
|
109
|
+
|
|
66
110
|
/** A spec `kind`, or `other` with the adapter's own value kept. */
|
|
67
111
|
export function normalizeKind(kind: string | undefined): { kind?: AcpToolKind; rawKind?: string } {
|
|
68
112
|
if (!kind) return {};
|
|
@@ -79,15 +123,19 @@ export function resolveToolIdentity(update: Record<string, unknown>): AcpToolIde
|
|
|
79
123
|
const meta = metaIdentity(update);
|
|
80
124
|
const rawInput = record(update.rawInput);
|
|
81
125
|
const wrapped = typeof rawInput?._toolName === 'string' ? rawInput._toolName : undefined;
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
126
|
+
const declared = typeof update.kind === 'string' ? update.kind : meta.rawKind;
|
|
127
|
+
// The title is display copy, so its `<tool>:` prefix is the LAST resort and
|
|
128
|
+
// only when nothing else names the call — an adapter that sends a name never
|
|
129
|
+
// has its name overridden by the wording of a title.
|
|
130
|
+
const named = (typeof update.name === 'string' && update.name)
|
|
131
|
+
|| meta.name
|
|
132
|
+
|| wrapped
|
|
133
|
+
|| (declared ? undefined : titleIdentity(update.title));
|
|
85
134
|
// An adapter names its tools in its own vocabulary (`shell`, `todowrite`,
|
|
86
135
|
// `webfetch`). Every panel lookup reads the NAME first, so the canonical key
|
|
87
136
|
// is what makes the card a bash/todo/web_search card instead of a generic
|
|
88
137
|
// body — see `AGENT_TOOL_ALIASES` for the measured names.
|
|
89
|
-
const canonical = canonicalAgentToolName(
|
|
90
|
-
const declared = typeof update.kind === 'string' ? update.kind : meta.rawKind;
|
|
138
|
+
const canonical = canonicalAgentToolName(named);
|
|
91
139
|
return {
|
|
92
140
|
...(canonical ? { name: canonical } : {}),
|
|
93
141
|
...normalizeKind(declared),
|
|
@@ -28,9 +28,11 @@ export interface ToolCallBlock {
|
|
|
28
28
|
type: 'toolCall';
|
|
29
29
|
id: string;
|
|
30
30
|
name: string;
|
|
31
|
+
/** The adapter's own label. It is a classification INPUT: an adapter that
|
|
32
|
+
* sends `title:"Run Command"` and no name has no other identity. */
|
|
33
|
+
title?: string;
|
|
31
34
|
arguments?: Record<string, unknown>;
|
|
32
35
|
toolKind?: AcpToolKind;
|
|
33
|
-
toolType?: string;
|
|
34
36
|
/** The adapter's own kind, when it is not one of the spec's ten. */
|
|
35
37
|
rawKind?: string;
|
|
36
38
|
}
|
|
@@ -82,18 +84,18 @@ export function terminalMeta(meta: unknown): { output?: string; exitCode?: numbe
|
|
|
82
84
|
export function blockOf(call: {
|
|
83
85
|
id: string;
|
|
84
86
|
name: string;
|
|
87
|
+
title?: string;
|
|
85
88
|
kind?: AcpToolKind;
|
|
86
89
|
args?: Record<string, unknown>;
|
|
87
|
-
toolType?: string;
|
|
88
90
|
rawKind?: string;
|
|
89
91
|
}): ToolCallBlock {
|
|
90
92
|
return {
|
|
91
93
|
type: 'toolCall',
|
|
92
94
|
id: call.id,
|
|
93
95
|
name: call.name,
|
|
96
|
+
...(call.title ? { title: call.title } : {}),
|
|
94
97
|
...(call.args ? { arguments: call.args } : {}),
|
|
95
98
|
...(call.kind ? { toolKind: call.kind } : {}),
|
|
96
99
|
...(call.rawKind ? { rawKind: call.rawKind } : {}),
|
|
97
|
-
...(call.toolType ? { toolType: call.toolType } : {}),
|
|
98
100
|
};
|
|
99
101
|
}
|
|
@@ -42,7 +42,9 @@ describe('codexMessagesFromRollout', () => {
|
|
|
42
42
|
const call = rows[1].toolCalls?.[0];
|
|
43
43
|
expect(call).toMatchObject({
|
|
44
44
|
id: 'c1',
|
|
45
|
-
type
|
|
45
|
+
// `type` is the transport's own word; the PANEL is `render.key`.
|
|
46
|
+
type: 'shell',
|
|
47
|
+
render: { key: 'bash', normalized: true },
|
|
46
48
|
command: 'ls -la',
|
|
47
49
|
output: 'total 0',
|
|
48
50
|
status: 'success',
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
import { homedir } from 'node:os';
|
|
25
25
|
import { join } from 'node:path';
|
|
26
26
|
import { loadHarnessConfig } from '@/server/lib/harness/config.server';
|
|
27
|
-
import type { ChatMessageData, ToolCallData
|
|
27
|
+
import type { ChatMessageData, ToolCallData } from '@/shared/types/chat';
|
|
28
|
+
import { normalizeToolCall } from '@/shared/lib/chat/tool/normalize';
|
|
28
29
|
|
|
29
30
|
/** The Codex data root, from the harness config's `CODEX_HOME` or `~/.codex`. */
|
|
30
31
|
export async function codexHome(): Promise<string> {
|
|
@@ -75,17 +76,6 @@ function isScaffolding(text: string): boolean {
|
|
|
75
76
|
|| trimmed.startsWith('<permissions instructions>');
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
/** The closest Kabmo tool type for a Codex tool name. */
|
|
79
|
-
function toolTypeFor(name: string): ToolType {
|
|
80
|
-
const lower = name.toLowerCase();
|
|
81
|
-
if (/shell|exec|command|terminal/.test(lower)) return 'bash';
|
|
82
|
-
if (/patch|edit|write/.test(lower)) return 'edit';
|
|
83
|
-
if (/read|view|open/.test(lower)) return 'read';
|
|
84
|
-
if (/grep|search/.test(lower)) return 'grep';
|
|
85
|
-
if (/web|fetch|browse/.test(lower)) return 'web_search';
|
|
86
|
-
return 'custom';
|
|
87
|
-
}
|
|
88
|
-
|
|
89
79
|
/** A plain string for a `function_call_output`-style payload. */
|
|
90
80
|
function outputText(payload: Record<string, unknown>): string {
|
|
91
81
|
const output = payload.output;
|
|
@@ -172,16 +162,19 @@ export function codexMessagesFromRollout(body: string): ChatMessageData[] {
|
|
|
172
162
|
? payload.call_id
|
|
173
163
|
: `codex-call-${calls.size + 1}`;
|
|
174
164
|
const command = commandOf(payload);
|
|
175
|
-
|
|
165
|
+
// `type`/`render` come from the ONE server resolver: a Codex name is an
|
|
166
|
+
// agent vocabulary, not a Kabmo panel, and a second regex table here is
|
|
167
|
+
// how the same call classified two ways.
|
|
168
|
+
const call: ToolCallData = normalizeToolCall({
|
|
176
169
|
id: callId,
|
|
177
|
-
type:
|
|
170
|
+
type: name,
|
|
178
171
|
title: name,
|
|
179
172
|
name,
|
|
180
173
|
...(command ? { command } : {}),
|
|
181
174
|
...(typeof payload.arguments === 'string' ? { input: payload.arguments } : {}),
|
|
182
175
|
status: 'aborted',
|
|
183
176
|
...(timestamp ? { startedAt: Date.parse(timestamp) || undefined } : {}),
|
|
184
|
-
};
|
|
177
|
+
});
|
|
185
178
|
calls.set(callId, call);
|
|
186
179
|
if (!currentAssistant) {
|
|
187
180
|
currentAssistant = {
|
|
@@ -128,6 +128,18 @@ export function getTtsSecretPath(): string {
|
|
|
128
128
|
return path.join(getDataDir(), 'tts.json');
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* `<data>/tts-models/<id>/` — one directory per local speech model.
|
|
133
|
+
*
|
|
134
|
+
* Next to the keys rather than inside them: a model is 100–150 MB of ONNX
|
|
135
|
+
* weights, not a credential, and a user deleting `tts.json` must not lose the
|
|
136
|
+
* download. Each directory carries its own `model.json`, so the install is
|
|
137
|
+
* self-describing and survives a lost registry.
|
|
138
|
+
*/
|
|
139
|
+
export function getTtsModelsDir(): string {
|
|
140
|
+
return path.join(getDataDir(), 'tts-models');
|
|
141
|
+
}
|
|
142
|
+
|
|
131
143
|
/** `<data>/run/<port>.lock` — held only while a port handover is in progress. */
|
|
132
144
|
export function getLockPath(port: number | string): string {
|
|
133
145
|
return path.join(getRunDir(), `${port}.lock`);
|
|
@@ -27,6 +27,7 @@ import { collectToolOutputs, noticeFromCustomMessage, toChatMessage, type Sequen
|
|
|
27
27
|
import type { OmpMessageEntry } from '@/shared/lib/omp/session/messages-parse';
|
|
28
28
|
import { operatorTitleFromEntry } from '@/shared/lib/omp/session/operator-title';
|
|
29
29
|
import { isRecord } from '@/shared/lib/util/guards';
|
|
30
|
+
import { normalizeMessageTools } from '@/shared/lib/chat/tool/normalize';
|
|
30
31
|
import { readBlobRef } from '@/server/lib/omp/session/blobs.server';
|
|
31
32
|
import { readJsonlTail } from '@/server/lib/omp/session/jsonl-tail';
|
|
32
33
|
|
|
@@ -153,7 +154,10 @@ export async function loadSessionMessages(
|
|
|
153
154
|
};
|
|
154
155
|
});
|
|
155
156
|
}
|
|
156
|
-
|
|
157
|
+
// A stored transcript carries no `render` (the wire block that had one is
|
|
158
|
+
// gone), so the SAME server resolver runs here — after `details` and the
|
|
159
|
+
// paired output are attached, because the classification reads both.
|
|
160
|
+
state.messages.push(normalizeMessageTools(mapped));
|
|
157
161
|
}
|
|
158
162
|
await resolveImageBlobs(state.messages);
|
|
159
163
|
return state.messages;
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
import { sessionTopic } from '@/shared/lib/realtime/protocol';
|
|
26
26
|
import { getRealtimeHub } from '@/server/lib/realtime/hub.server';
|
|
27
27
|
import { peerRealtimeSocketUrl } from '@/server/lib/omp/rpc/peer-proxy.server';
|
|
28
|
+
import { normalizeAgentEvent } from '@/server/lib/chat/normalize-tools.server';
|
|
29
|
+
import type { AgentEvent } from '@/server/lib/omp/rpc/constants';
|
|
30
|
+
import { isRecord } from '@/shared/lib/util/guards';
|
|
28
31
|
|
|
29
32
|
/** One frame off the owner's socket, narrowed to the fields a relay reads. */
|
|
30
33
|
interface RelayedFrame {
|
|
@@ -69,7 +72,12 @@ export function attachPeerSession(sessionId: string, origin: string): () => void
|
|
|
69
72
|
// The owner's snapshot IS this topic's baseline: the local resolver cannot
|
|
70
73
|
// produce one, because the child is not here.
|
|
71
74
|
if (frame.t === 'snapshot') hub.publishSnapshot(topic, frame.payload);
|
|
72
|
-
|
|
75
|
+
// A relayed frame is normalized here too: the owning instance may run an
|
|
76
|
+
// older build whose frames carry no `render`, and a client must never have
|
|
77
|
+
// to fall back to guessing a panel per harness.
|
|
78
|
+
else if (frame.t === 'delta' && isRecord(frame.payload)) {
|
|
79
|
+
hub.publish(topic, normalizeAgentEvent(frame.payload as AgentEvent));
|
|
80
|
+
}
|
|
73
81
|
};
|
|
74
82
|
upstream.onerror = () => {};
|
|
75
83
|
upstream.onclose = () => {};
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
import { sessionTopic } from '@/shared/lib/realtime/protocol';
|
|
27
27
|
import { getRealtimeHub, type TopicDescriptor } from '@/server/lib/realtime/hub.server';
|
|
28
|
+
import { normalizeAgentEvent } from '@/server/lib/chat/normalize-tools.server';
|
|
28
29
|
import { buildAgentSnapshot, type AgentSnapshot } from '@/server/routes/agent/command';
|
|
29
30
|
import {
|
|
30
31
|
fetchPeerSessionSnapshot,
|
|
@@ -105,7 +106,10 @@ export function sessionDescriptor(sessionId: string): TopicDescriptor {
|
|
|
105
106
|
const session = getLiveSession(sessionId);
|
|
106
107
|
if (session?.isAlive()) {
|
|
107
108
|
return session.onEvent((event) => {
|
|
108
|
-
|
|
109
|
+
// The ONE place a live tool call gets its renderer family. Every
|
|
110
|
+
// adapter (omp RPC, ACP) emits `AgentEvent`s through this fanout, so
|
|
111
|
+
// the client receives `render` and never derives a panel itself.
|
|
112
|
+
getRealtimeHub().publish(sessionTopic(sessionId), normalizeAgentEvent(event));
|
|
109
113
|
});
|
|
110
114
|
}
|
|
111
115
|
// Not owned HERE: the session may be running on another instance, in which
|
|
@@ -69,14 +69,23 @@ describe('request builders', () => {
|
|
|
69
69
|
.not.toHaveProperty('language_code');
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
test('Deepgram
|
|
73
|
-
const
|
|
74
|
-
expect(
|
|
75
|
-
expect(
|
|
76
|
-
expect(
|
|
77
|
-
expect(
|
|
78
|
-
expect(
|
|
79
|
-
|
|
72
|
+
test('Deepgram routes Aura to /v1 and Flux to /v2, and names no container', () => {
|
|
73
|
+
const aura = new URL(deepgramUrl('https://api.deepgram.com', 'aura-2-thalia-en', 1));
|
|
74
|
+
expect(aura.pathname).toBe('/v1/speak');
|
|
75
|
+
expect(aura.searchParams.get('model')).toBe('aura-2-thalia-en');
|
|
76
|
+
expect(aura.searchParams.get('encoding')).toBe('mp3');
|
|
77
|
+
expect(aura.searchParams.has('container')).toBe(false);
|
|
78
|
+
expect(aura.searchParams.has('speed')).toBe(false);
|
|
79
|
+
// Aura takes any decimal inside its range.
|
|
80
|
+
expect(new URL(deepgramUrl('https://api.deepgram.com', 'aura-2-thalia-en', 1.33)).searchParams.get('speed'))
|
|
81
|
+
.toBe('1.33');
|
|
82
|
+
|
|
83
|
+
const flux = new URL(deepgramUrl('https://api.deepgram.com/', 'flux-dewi-id', 1.33));
|
|
84
|
+
expect(flux.pathname).toBe('/v2/speak');
|
|
85
|
+
expect(flux.searchParams.get('encoding')).toBe('mp3');
|
|
86
|
+
expect(flux.searchParams.has('container')).toBe(false);
|
|
87
|
+
// Flux refuses a speed that is not a 0.05 step.
|
|
88
|
+
expect(flux.searchParams.get('speed')).toBe('1.35');
|
|
80
89
|
});
|
|
81
90
|
|
|
82
91
|
test('xAI always carries a language, defaulting to auto', () => {
|
|
@@ -4,13 +4,20 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Deepgram
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Deepgram's pre-recorded speech, TWO endpoints selected by the model id:
|
|
8
|
+
* Aura on `POST /v1/speak`, Flux on `POST /v2/speak`. An Aura id sent to v2 (or
|
|
9
|
+
* a Flux id to v1) is refused, so the path is derived from the prefix, never
|
|
10
|
+
* tried.
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* Shared shape: the audio is the RAW response body, options travel in the query
|
|
13
|
+
* string, and the model id IS the voice. Flux's id also carries the language —
|
|
14
|
+
* its last segment (`flux-dewi-id` speaks Indonesian) — which is why the engine
|
|
15
|
+
* has no `language` field.
|
|
16
|
+
*
|
|
17
|
+
* `encoding=mp3` is named and `container` is NEVER named: the API's defaults
|
|
18
|
+
* pair `container=wav` with `encoding=mp3`, which is not a playable file, and
|
|
19
|
+
* `container` is a 400 the moment `encoding=mp3` is set (measured on both
|
|
20
|
+
* endpoints).
|
|
14
21
|
*/
|
|
15
22
|
|
|
16
23
|
import {
|
|
@@ -23,10 +30,24 @@ import {
|
|
|
23
30
|
|
|
24
31
|
const LABEL = 'Deepgram';
|
|
25
32
|
|
|
33
|
+
export function deepgramPath(model: string): '/v1/speak' | '/v2/speak' {
|
|
34
|
+
return model.startsWith('flux-') ? '/v2/speak' : '/v1/speak';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Flux answers `speed` only in 0.05 increments ("must be provided in
|
|
39
|
+
* increments of 0.05", measured); Aura accepts any decimal inside its range.
|
|
40
|
+
*/
|
|
41
|
+
function deepgramSpeed(model: string, speed: number): string {
|
|
42
|
+
return deepgramPath(model) === '/v2/speak'
|
|
43
|
+
? String(Math.round(speed * 20) / 20)
|
|
44
|
+
: String(speed);
|
|
45
|
+
}
|
|
46
|
+
|
|
26
47
|
export function deepgramUrl(baseUrl: string, model: string, speed: number): string {
|
|
27
|
-
const params = new URLSearchParams({ model, encoding: 'mp3'
|
|
28
|
-
if (speed !== 1) params.set('speed',
|
|
29
|
-
return `${baseUrl.replace(/\/+$/, '')}
|
|
48
|
+
const params = new URLSearchParams({ model, encoding: 'mp3' });
|
|
49
|
+
if (speed !== 1) params.set('speed', deepgramSpeed(model, speed));
|
|
50
|
+
return `${baseUrl.replace(/\/+$/, '')}${deepgramPath(model)}?${params.toString()}`;
|
|
30
51
|
}
|
|
31
52
|
|
|
32
53
|
export async function synthesizeWithDeepgram(input: TtsSynthInput): Promise<TtsAudio> {
|
|
@@ -25,6 +25,7 @@ import { synthesizeWithDeepgram } from '@/server/lib/tts/engines/deepgram';
|
|
|
25
25
|
import { synthesizeWithXai } from '@/server/lib/tts/engines/xai';
|
|
26
26
|
import { synthesizeWithGemini } from '@/server/lib/tts/engines/gemini';
|
|
27
27
|
import { synthesizeWithOmp } from '@/server/lib/tts/local.server';
|
|
28
|
+
import { synthesizeLocally } from '@/server/lib/tts/engines/local';
|
|
28
29
|
|
|
29
30
|
export interface SynthesizeOptions {
|
|
30
31
|
engine: TtsEngine;
|
|
@@ -52,6 +53,16 @@ export async function synthesizeSpeech(options: SynthesizeOptions): Promise<TtsA
|
|
|
52
53
|
return synthesizeWithOmp({ text, voice: options.voice, speed: options.speed });
|
|
53
54
|
}
|
|
54
55
|
|
|
56
|
+
if (options.engine === 'local') {
|
|
57
|
+
return synthesizeLocally({
|
|
58
|
+
modelId: options.model,
|
|
59
|
+
text,
|
|
60
|
+
voice: options.voice,
|
|
61
|
+
language: options.language,
|
|
62
|
+
speed: options.speed,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
55
66
|
const apiKey = (await readTtsApiKey(options.engine)) ?? undefined;
|
|
56
67
|
const input = {
|
|
57
68
|
text,
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The `local` engine's dispatch: pick the installed model, then hand it to the
|
|
8
|
+
* ONNX adapter.
|
|
9
|
+
*
|
|
10
|
+
* The model id travels in the settings blob, but the directory is a server fact
|
|
11
|
+
* that can disappear (a removed model, a wiped data directory). So this resolves
|
|
12
|
+
* it every request and refuses with the list of what IS installed — never by
|
|
13
|
+
* quietly falling back to another model, which would read the answer in a voice
|
|
14
|
+
* the user did not choose.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { listInstalledModels, readInstalledModel } from '@/server/lib/tts/model-manifest.server';
|
|
18
|
+
import { synthesizeWithLocal } from '@/server/lib/tts/engines/sherpa';
|
|
19
|
+
import { TtsEngineError, type TtsAudio } from '@/server/lib/tts/engines/adapter';
|
|
20
|
+
|
|
21
|
+
export async function synthesizeLocally(input: {
|
|
22
|
+
modelId: string;
|
|
23
|
+
text: string;
|
|
24
|
+
voice: string;
|
|
25
|
+
language: string;
|
|
26
|
+
speed: number;
|
|
27
|
+
}): Promise<TtsAudio> {
|
|
28
|
+
const wanted = input.modelId.trim();
|
|
29
|
+
const model = wanted ? await readInstalledModel(wanted) : (await listInstalledModels())[0] ?? null;
|
|
30
|
+
|
|
31
|
+
if (!model) {
|
|
32
|
+
const installed = await listInstalledModels();
|
|
33
|
+
if (installed.length === 0) {
|
|
34
|
+
throw new TtsEngineError(
|
|
35
|
+
'No local speech model is installed yet. Settings → Voice → Speech → Local models, then download one.',
|
|
36
|
+
false,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
throw new TtsEngineError(
|
|
40
|
+
`"${wanted}" is not installed. Installed: ${installed.map((entry) => entry.id).join(', ')}.`,
|
|
41
|
+
false,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return synthesizeWithLocal({
|
|
46
|
+
model,
|
|
47
|
+
dir: model.dir,
|
|
48
|
+
text: input.text,
|
|
49
|
+
voice: input.voice,
|
|
50
|
+
language: input.language,
|
|
51
|
+
speed: input.speed,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The Node addon's surface, as much of it as Kabmo uses.
|
|
8
|
+
*
|
|
9
|
+
* Hand-written because the package ships JSDoc typedefs and no `.d.ts`
|
|
10
|
+
* (`"types": null` in its manifest). Only the members this server calls are
|
|
11
|
+
* declared; anything else would be a guess that ages into a lie.
|
|
12
|
+
*/
|
|
13
|
+
declare module 'sherpa-onnx-node' {
|
|
14
|
+
export interface GeneratedAudio {
|
|
15
|
+
samples: Float32Array;
|
|
16
|
+
sampleRate: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface TtsGenerateRequest {
|
|
20
|
+
text: string;
|
|
21
|
+
sid?: number;
|
|
22
|
+
lang?: string;
|
|
23
|
+
speed?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class OfflineTts {
|
|
27
|
+
constructor(config: unknown);
|
|
28
|
+
readonly numSpeakers: number;
|
|
29
|
+
readonly sampleRate: number;
|
|
30
|
+
readonly lang: string;
|
|
31
|
+
generate(request: TtsGenerateRequest): GeneratedAudio;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The module namespace itself, for a lazily-imported handle. */
|
|
35
|
+
export interface SherpaRuntime {
|
|
36
|
+
OfflineTts: typeof OfflineTts;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, expect, test } from 'bun:test';
|
|
7
|
+
import { join } from 'node:path';
|
|
8
|
+
|
|
9
|
+
import { buildLocalConfig } from '@/server/lib/tts/engines/sherpa';
|
|
10
|
+
|
|
11
|
+
const SUPERTONIC_FILES = [
|
|
12
|
+
'duration_predictor.int8.onnx',
|
|
13
|
+
'text_encoder.int8.onnx',
|
|
14
|
+
'vector_estimator.int8.onnx',
|
|
15
|
+
'vocoder.int8.onnx',
|
|
16
|
+
'tts.json',
|
|
17
|
+
'unicode_indexer.bin',
|
|
18
|
+
'voice.bin',
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
describe('buildLocalConfig', () => {
|
|
22
|
+
test('a Supertonic directory resolves to its file paths', () => {
|
|
23
|
+
const built = buildLocalConfig('/m', 'supertonic', SUPERTONIC_FILES);
|
|
24
|
+
expect(built.missing).toEqual([]);
|
|
25
|
+
const config = built.config as { model: { supertonic: Record<string, string> } };
|
|
26
|
+
expect(config.model.supertonic.durationPredictor).toBe(join('/m', 'duration_predictor.int8.onnx'));
|
|
27
|
+
expect(config.model.supertonic.voiceStyle).toBe(join('/m', 'voice.bin'));
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('a missing file is named instead of handing the addon a broken path', () => {
|
|
31
|
+
const built = buildLocalConfig('/m', 'supertonic', ['tts.json']);
|
|
32
|
+
expect(built.config).toBeNull();
|
|
33
|
+
expect(built.missing).toContain('voice.bin');
|
|
34
|
+
expect(built.missing).toContain('vocoder.onnx');
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test('a Kokoro directory keeps its lexicons in one comma-joined field', () => {
|
|
38
|
+
const built = buildLocalConfig('/k', 'kokoro', [
|
|
39
|
+
'model.int8.onnx',
|
|
40
|
+
'voices.bin',
|
|
41
|
+
'tokens.txt',
|
|
42
|
+
'lexicon-us-en.txt',
|
|
43
|
+
'lexicon-zh.txt',
|
|
44
|
+
'espeak-ng-data',
|
|
45
|
+
]);
|
|
46
|
+
const config = built.config as { model: { kokoro: Record<string, string> } };
|
|
47
|
+
expect(config.model.kokoro.lexicon).toBe(
|
|
48
|
+
`${join('/k', 'lexicon-us-en.txt')},${join('/k', 'lexicon-zh.txt')}`,
|
|
49
|
+
);
|
|
50
|
+
// `dataDir` is ignored from sherpa-onnx 2.0, so it must not be sent at all.
|
|
51
|
+
expect(config.model.kokoro).not.toHaveProperty('dataDir');
|
|
52
|
+
});
|
|
53
|
+
});
|