@kabmo-labs/kabmo 0.48.0 → 0.50.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 +608 -550
- package/dist/client/static/js/{Body-3tspyjtk.js → Body-pd3nt4xa.js} +3 -3
- package/dist/client/static/js/{CsvGrid-3pwsfmxp.js → CsvGrid-eksmqv8f.js} +2 -2
- package/dist/client/static/js/{DocxView-xcg9jktb.js → DocxView-xfx1kt8x.js} +22 -22
- package/dist/client/static/js/{DrawioView-2q19tgkx.js → DrawioView-2xyqg9bv.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-92cadvbr.js → HtmlPreview-ps3f0aa5.js} +1 -1
- package/dist/client/static/js/ImageView-7vse3k6x.js +1 -0
- package/dist/client/static/js/LayoutWrapper-qdp83fps.js +2 -0
- package/dist/client/static/js/MergeDiffView-hzsccppq.js +1 -0
- package/dist/client/static/js/Modal-zw9x5b6f.js +60 -0
- package/dist/client/static/js/PdfView-8fp08jym.js +1 -0
- package/dist/client/static/js/SessionsView-qmgg03fv.js +1 -0
- package/dist/client/static/js/{SheetView-w5w2m2de.js → SheetView-g7mstjdp.js} +46 -46
- package/dist/client/static/js/{SvgPreview-mtk6de6h.js → SvgPreview-wsv4h6c6.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-tha4j2fn.js → abnfDiagram-O67JEVCF-1kgm1049.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-g7b64973.js +1 -0
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-mtm210rw.js +36 -0
- package/dist/client/static/js/{astro-r4dp34pw.js → astro-dszrfwwn.js} +1 -1
- package/dist/client/static/js/bash-z5pe89pt.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-6mzgfqh8.js → blockDiagram-BEXU5L5S-s474vn2w.js} +9 -9
- package/dist/client/static/js/c-fy0fysfw.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-sfkcw7g9.js → c4Diagram-YGBWAQC7-s68v6tc8.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-v530ny5e.js → classDiagram-v2-NBCMYWYE-291va3yk.js} +9 -9
- package/dist/client/static/js/cose-bilkent-JH36ORCC-0zg7crdw.js +1 -0
- package/dist/client/static/js/cpp-wam8dze6.js +1 -0
- package/dist/client/static/js/css-ke51m4kc.js +1 -0
- package/dist/client/static/js/css-yryw442h.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-8bscrcct.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-k8f3z0mm.js → cynefinDiagram-VND7K2PF-4gnmn3yc.js} +2 -2
- package/dist/client/static/js/dagre-6A5THRUB-nxmj6bkg.js +4 -0
- package/dist/client/static/js/{diagram-22UHCM2B-2zh2957c.js → diagram-22UHCM2B-3171dabw.js} +25 -25
- package/dist/client/static/js/diagram-3UASUU5V-9h1pd6h8.js +24 -0
- package/dist/client/static/js/{diagram-ATOU4E4O-16adx4g0.js → diagram-ATOU4E4O-ywfrbd6m.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-1ja98ens.js → diagram-CDSNMT55-t87b4wbk.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-f9nnyjbq.js → diagram-MLGK6HIB-bzv52p97.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-3qgadfjz.js → diagram-MPIPVDR6-8f66rp0a.js} +2 -2
- package/dist/client/static/js/{dockerfile-04tc68pq.js → dockerfile-z3v0km9v.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-022cz603.js → ebnfDiagram-ZINNZB2B-3y4w2j6t.js} +1 -1
- package/dist/client/static/js/{elixir-61gbjv6c.js → elixir-c701n0qg.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-2anf1c36.js → elk-276RUBZZ-d9d23jch.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-ndd27fz1.js → erDiagram-OPXOYQCR-w4z3501c.js} +15 -15
- package/dist/client/static/js/{erlang-bh5cbm8m.js → erlang-cpw5s1f9.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-pj22bng1.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-9h6g160j.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-9gm6hkgn.js → ganttDiagram-FUAMR5RP-7wcxk4bm.js} +5 -5
- package/dist/client/static/js/gitGraph-4MIJSDKK-hgw4jcvk.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-78bxa67c.js → gitGraphDiagram-X574FWY7-sdh1hsb1.js} +9 -9
- package/dist/client/static/js/graphql-0yv8dc1v.js +1 -0
- package/dist/client/static/js/html-zk3m0az9.js +1 -0
- package/dist/client/static/js/{index-dxnkwf39.js → index-09ap9ncj.js} +54 -54
- package/dist/client/static/js/index-0ff2x5g9.js +1 -0
- package/dist/client/static/js/{index-3en15m75.js → index-0q39ajgh.js} +2 -2
- package/dist/client/static/js/{index-t4s10406.js → index-144aknp3.js} +2 -2
- package/dist/client/static/js/index-17jy16v3.js +314 -0
- package/dist/client/static/js/{index-jnkc9p53.js → index-1adfks1n.js} +2 -2
- package/dist/client/static/js/{index-ya9yqj5w.js → index-1d8v3bvm.js} +2 -2
- package/dist/client/static/js/index-1dx4dqzy.js +4 -0
- package/dist/client/static/js/{index-kaxvwh07.js → index-1ec33b1j.js} +2 -2
- package/dist/client/static/js/{index-qe0vfv6s.js → index-1jx4nt2f.js} +1 -1
- package/dist/client/static/js/{index-gpmcth0x.js → index-1kjgdyfk.js} +2 -2
- package/dist/client/static/js/{index-x7rajphe.js → index-1vfej0gk.js} +2 -2
- package/dist/client/static/js/{index-45p59fxq.js → index-2g1ey1c9.js} +2 -2
- package/dist/client/static/js/{index-hwzxdwwg.js → index-3rhk4apq.js} +1 -1
- package/dist/client/static/js/{index-g3rg6vsd.js → index-4vaxdt8a.js} +2 -2
- package/dist/client/static/js/{index-ac2q5903.js → index-4z3qtazf.js} +2 -2
- package/dist/client/static/js/{index-30a8py59.js → index-56319bht.js} +2 -2
- package/dist/client/static/js/{index-a58rkn3f.js → index-5qwgexg6.js} +4 -4
- package/dist/client/static/js/index-779rptb2.js +1 -0
- package/dist/client/static/js/{index-7whstwc7.js → index-7jdz4jr4.js} +2 -2
- package/dist/client/static/js/{index-hq28918s.js → index-7xn7gxgw.js} +2 -2
- package/dist/client/static/js/{index-tzz5gp8a.js → index-8fk7h2me.js} +5 -5
- package/dist/client/static/js/index-971stdh4.js +2 -0
- package/dist/client/static/js/{index-c250nzm1.js → index-9jrej3ht.js} +3 -3
- package/dist/client/static/js/index-9ydvkxz1.css +1 -0
- package/dist/client/static/js/{index-0e51wknc.js → index-ajdzvegm.js} +10 -10
- package/dist/client/static/js/{index-8tvrzce0.js → index-ajqmcds5.js} +2 -2
- package/dist/client/static/js/{index-k39be93q.js → index-ap6hv7s7.js} +1 -1
- package/dist/client/static/js/{index-he4k2j91.js → index-aqqj4xxy.js} +2 -2
- package/dist/client/static/js/index-bczhbk01.js +2 -0
- package/dist/client/static/js/{index-ebf50mrs.js → index-bggz63br.js} +7 -7
- package/dist/client/static/js/{index-seekt5k3.js → index-c2mqr5fh.js} +2 -2
- package/dist/client/static/js/{index-xny7vsfz.js → index-cm8pa783.js} +2 -2
- package/dist/client/static/js/{index-zcgqacvx.js → index-dgkpbrdr.js} +2 -2
- package/dist/client/static/js/index-e471eprg.js +1 -0
- package/dist/client/static/js/{index-4n7t26ap.js → index-evvmkk2f.js} +1 -1
- package/dist/client/static/js/index-frhxbqhg.js +1 -0
- package/dist/client/static/js/{index-mqzgf7rw.js → index-gcgsjd3c.js} +2 -2
- package/dist/client/static/js/{index-sng4prpr.js → index-grkacfv3.js} +2 -2
- package/dist/client/static/js/{index-417fbrqk.js → index-gws4prmg.js} +2 -2
- package/dist/client/static/js/index-hqhz4eam.js +1 -0
- package/dist/client/static/js/index-jr6q69r3.js +465 -0
- package/dist/client/static/js/{index-hkz2mz34.js → index-jxxewcat.js} +2 -2
- package/dist/client/static/js/{index-13g17wa3.js → index-k3vvk28c.js} +1 -1
- package/dist/client/static/js/{index-55pqvh82.js → index-k66w6d9b.js} +2 -2
- package/dist/client/static/js/{index-34aq5bz5.js → index-kce86cnw.js} +2 -2
- package/dist/client/static/js/{index-5mpv57fn.js → index-n54jd3aw.js} +12 -12
- package/dist/client/static/js/{index-abrrqhne.js → index-nnqyew8n.js} +2 -2
- package/dist/client/static/js/index-qaxjp73x.js +2 -0
- package/dist/client/static/js/{index-pzsp1src.js → index-qxzyvye9.js} +2 -2
- package/dist/client/static/js/{index-2bsnywea.js → index-r2z0a118.js} +2 -2
- package/dist/client/static/js/{index-m0fatq7c.js → index-r6bm9sth.js} +11 -11
- package/dist/client/static/js/{index-ep6bqcmg.js → index-ratbr10x.js} +2 -2
- package/dist/client/static/js/index-rgneq3zt.js +2 -0
- package/dist/client/static/js/{index-7pz6n3pg.js → index-svx6rnfs.js} +2 -2
- package/dist/client/static/js/{index-aabp7nt6.js → index-tew3rd6t.js} +1 -1
- package/dist/client/static/js/index-tfwsch7a.js +4 -0
- package/dist/client/static/js/{index-g8rpydkr.js → index-vgwjn4de.js} +2 -2
- package/dist/client/static/js/{index-e6ny4gd9.js → index-vn495w82.js} +6 -6
- package/dist/client/static/js/{index-hcmhdpp4.js → index-wbma8kqw.js} +23 -23
- package/dist/client/static/js/{index-qxzj780x.js → index-xgbcn89g.js} +2 -2
- package/dist/client/static/js/{index-fb2s080r.js → index-xrn2reb5.js} +2 -2
- package/dist/client/static/js/{index-2n1fgpjv.js → index-zhnfq8br.js} +2 -2
- package/dist/client/static/js/index-zsx5vs3j.js +2 -0
- package/dist/client/static/js/info-A6RAGUB7-k0kv05ny.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-bxk0g0pe.js → infoDiagram-VRGFBTTK-gtdp0z6p.js} +2 -2
- package/dist/client/static/js/ini-apj95p59.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-d1kdkhth.js → ishikawaDiagram-OU5B5YK6-c05m0sqq.js} +6 -6
- package/dist/client/static/js/java-khk2v3g4.js +1 -0
- package/dist/client/static/js/javascript-gez6yppm.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-cahg3zjq.js → journeyDiagram-ZHPQQLJL-kgk5ygm2.js} +6 -6
- package/dist/client/static/js/json-r78y6e80.js +1 -0
- package/dist/client/static/js/jsx-h7hfj8cz.js +1 -0
- package/dist/client/static/js/{julia-2n5k898q.js → julia-w13bz4s1.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-nq7t83en.js → kanban-definition-PNTS6WVX-q1w9w68s.js} +12 -12
- package/dist/client/static/js/lua-pat2bzg3.js +1 -0
- package/dist/client/static/js/markdown-545zn05v.js +1 -0
- package/dist/client/static/js/{mermaid.core-6nw0853j.js → mermaid.core-1rz62j9g.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-cm7ykxf2.js → mindmap-definition-NLK3R4M7-3m3w6bnb.js} +9 -9
- package/dist/client/static/js/one-dark-pro-7c942tnw.js +1 -0
- package/dist/client/static/js/one-light-tp8y6c5g.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-ne66q5h9.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-xwxz8nsq.js → pegDiagram-GJSIUBJH-svd3ex4e.js} +1 -1
- package/dist/client/static/js/{perl-66vb5pz7.js → perl-hcg3hacf.js} +1 -1
- package/dist/client/static/js/{php-4e9we8am.js → php-q6hhp84p.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-ej9aysvz.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-n910k9th.js → pieDiagram-5QR66LMP-2nrkw034.js} +3 -3
- package/dist/client/static/js/properties-9f76xngb.js +1 -0
- package/dist/client/static/js/python-nwerpkfq.js +1 -0
- package/dist/client/static/js/quadrantDiagram-O4NWA36T-4895d1aq.js +7 -0
- package/dist/client/static/js/r-39k5dr2p.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-375pe46t.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-hdgdfsc1.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2p5ynn4a.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2p1fxxen.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-g131pt42.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-xb1smt7r.js → railroadDiagram-XR7U4H2S-zj3g9yne.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-6kb21b9f.js → requirementDiagram-PLB6GJNP-727yjvs8.js} +8 -8
- package/dist/client/static/js/{ruby-v7nmcvyr.js → ruby-wzqz8vw6.js} +1 -1
- package/dist/client/static/js/{rust-5ersd7be.js → rust-r94pgqvf.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-74z0fskw.js → sankeyDiagram-IPEJSGJF-17c7p2pe.js} +5 -5
- package/dist/client/static/js/{sass-h3nvy4c8.js → sass-xb3van7h.js} +1 -1
- package/dist/client/static/js/{scss-kvev49ga.js → scss-ddg6t3x4.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-apn6kezn.js → sequenceDiagram-PO4LG4MO-wcmbpckr.js} +18 -18
- package/dist/client/static/js/{sizeCapture-INFHLROL-2drzcjb8.js → sizeCapture-INFHLROL-nkr57cd6.js} +1 -1
- package/dist/client/static/js/sql-4dcrp3sw.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-ma09vhby.js → stateDiagram-v2-GCMORJYK-vd7r8s78.js} +6 -6
- package/dist/client/static/js/{svelte-dhspkgss.js → svelte-wzaxz546.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-f6y9xqnx.js → swimlanes-2SLR337P-zhxm05ak.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-myzk2rg0.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-zmcmvq00.js → timeline-definition-EJHVYXUP-n7gbzhzd.js} +11 -11
- package/dist/client/static/js/treeView-Q6P3EWNA-gfztfha9.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-kwtrwq1f.js +1 -0
- package/dist/client/static/js/tsx-dk8rpgtw.js +1 -0
- package/dist/client/static/js/typescript-q0493nmw.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-wfaa019a.js → usecaseDiagram-POWQR4AR-davsnwkf.js} +82 -82
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-46wf2pgd.js → vennDiagram-UO4OBE2U-gb54bh5k.js} +8 -8
- package/dist/client/static/js/{vue-ffngx2b3.js → vue-6zhfw7zx.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-30dnzvww.js +1 -0
- package/dist/client/static/js/wardleyDiagram-VNRHLVJA-sf98cg9t.js +78 -0
- package/dist/client/static/js/xml-91sb3gt9.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-2ba825z9.js → xychartDiagram-PMCCYNJV-9nn09k40.js} +5 -5
- package/dist/client/static/js/yaml-ghx4mjw1.js +1 -0
- package/package.json +1 -1
- package/src/client/components/common/MarkdownRenderer.tsx +29 -28
- package/src/client/components/common/header-button/index.tsx +10 -2
- package/src/client/components/common/header-controls/index.test.tsx +1 -0
- package/src/client/components/common/header-controls/phone-row.test.tsx +1 -0
- package/src/client/components/common/header-controls/plugin-entry.test.tsx +1 -0
- package/src/client/components/common/header-controls/shell-chrome.test.tsx +1 -0
- package/src/client/components/layout/ActivityBar.tsx +2 -1
- package/src/client/components/layout/LeftActivityBar.test.ts +1 -0
- package/src/client/components/settings/Modal.tsx +1 -1
- package/src/client/components/settings/Sidebar.tsx +2 -1
- package/src/client/components/settings/apply-side-effects.test.ts +16 -0
- package/src/client/components/settings/apply-side-effects.ts +16 -0
- package/src/client/components/settings/categories/AppearanceSettings.test.tsx +1 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
- package/src/client/components/settings/categories/DictationSettings.test.tsx +152 -0
- package/src/client/components/settings/categories/DictationSettings.tsx +76 -0
- package/src/client/components/settings/categories/HarnessSettings.tsx +8 -0
- package/src/client/components/settings/categories/TokenUsageSettings.tsx +26 -3
- package/src/client/components/settings/categories/VoiceSettings.tsx +77 -0
- package/src/client/components/settings/categories/appearance-settings/RightSideSection.test.tsx +97 -0
- package/src/client/components/settings/categories/appearance-settings/RightSideSection.tsx +94 -0
- package/src/client/components/settings/categories/appearance-settings/groups.ts +4 -3
- package/src/client/components/settings/categories/dictation-settings/CaptureSection.tsx +153 -0
- package/src/client/components/settings/categories/dictation-settings/EngineSection.tsx +123 -0
- package/src/client/components/settings/categories/dictation-settings/ExternalSection.tsx +221 -0
- package/src/client/components/settings/categories/dictation-settings/LanguageSection.tsx +73 -0
- package/src/client/components/settings/categories/harness-settings/AccountLoginPanel.tsx +224 -0
- package/src/client/components/settings/categories/harness-settings/AccountsPanel.test.tsx +139 -0
- package/src/client/components/settings/categories/harness-settings/AccountsPanel.tsx +349 -0
- package/src/client/components/settings/categories/harness-settings/AddAccountForm.tsx +58 -0
- package/src/client/components/settings/categories/harness-settings/HarnessCard.tsx +33 -0
- package/src/client/components/settings/categories/panel-plugins/InstallForm.tsx +24 -17
- package/src/client/components/settings/categories/panel-plugins/Registries.test.tsx +164 -0
- package/src/client/components/settings/categories/panel-plugins/Registries.tsx +180 -0
- package/src/client/components/settings/categories/panel-plugins/Section.tsx +15 -6
- package/src/client/components/settings/categories/token-usage-settings/HarnessFilter.tsx +59 -0
- package/src/client/components/settings/categories/token-usage-settings/panel.test.tsx +37 -0
- package/src/client/components/settings/categories/usage-settings/limit-groups.test.ts +10 -0
- package/src/client/components/settings/categories/usage-settings/limit-groups.ts +4 -1
- package/src/client/components/settings/categories/usage-settings/providers.ts +28 -0
- package/src/client/components/settings/categories/usage-settings/usage-visibility.test.ts +60 -0
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +152 -0
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.tsx +84 -0
- package/src/client/components/settings/categories/voice-settings/groups.test.ts +23 -0
- package/src/client/components/settings/categories/voice-settings/groups.ts +48 -0
- package/src/client/components/settings/categories/voice-settings/speech/AutoplaySection.tsx +49 -0
- package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +167 -0
- package/src/client/components/settings/categories/voice-settings/speech/EngineSection.tsx +108 -0
- package/src/client/components/settings/categories/voice-settings/speech/TestSection.tsx +56 -0
- package/src/client/components/settings/categories/voice-settings/speech/VoiceSection.tsx +188 -0
- package/src/client/components/settings/categories/voice-settings/speech/styles.ts +15 -0
- package/src/client/components/settings/category-content.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.speech.test.tsx +140 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +41 -97
- package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +143 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +5 -1
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/RunFooter.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/SpeechButton.tsx +110 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +26 -10
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +13 -8
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +9 -2
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +6 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +18 -7
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +4 -2
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +4 -4
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +19 -11
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +8 -6
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +38 -30
- package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +185 -0
- package/src/client/components/workspace/chat-timeline/chat-input/paste-attach.test.tsx +194 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +4 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +5 -11
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.test.ts +10 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Edit.tsx +2 -7
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/task-rows.ts +6 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.test.ts +38 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.ts +10 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-input.ts +5 -5
- package/src/client/components/workspace/usage-panel/index.test.tsx +92 -12
- package/src/client/components/workspace/usage-panel/index.tsx +48 -12
- package/src/client/data/mock/token-usage.ts +53 -10
- package/src/client/hooks/chat/composer/attachments.ts +18 -2
- package/src/client/hooks/chat/composer/capture.test.ts +282 -0
- package/src/client/hooks/chat/composer/capture.ts +166 -0
- package/src/client/hooks/chat/composer/dictation-settings.ts +53 -0
- package/src/client/hooks/chat/composer/narrow.test.ts +130 -0
- package/src/client/hooks/chat/composer/narrow.ts +82 -0
- package/src/client/hooks/chat/composer/paste-attachments.test.ts +215 -0
- package/src/client/hooks/chat/composer/paste-attachments.ts +173 -0
- package/src/client/hooks/chat/composer/pipeline.ts +16 -3
- package/src/client/hooks/chat/composer/speech-to-text.test.tsx +314 -0
- package/src/client/hooks/chat/composer/speech-to-text.ts +158 -134
- package/src/client/hooks/chat/composer/voice-input.ts +24 -9
- package/src/client/hooks/chat/timeline/reader-input.ts +53 -1
- package/src/client/hooks/chat/timeline/scroll-activity.test.ts +103 -0
- package/src/client/hooks/chat/timeline/scroll-geometry.ts +9 -4
- package/src/client/hooks/chat/timeline/scroll.test.ts +44 -3
- package/src/client/hooks/chat/timeline/scroll.ts +50 -16
- package/src/client/hooks/chat/timeline/send-helpers.ts +3 -0
- package/src/client/hooks/chat/timeline/send.ts +5 -1
- package/src/client/hooks/models/harness-accounts.ts +143 -0
- package/src/client/hooks/models/harness-catalog.ts +9 -2
- package/src/client/hooks/models/use-harnesses-controller.ts +12 -0
- package/src/client/hooks/models/use-harnesses.ts +14 -0
- package/src/client/hooks/settings/dictation.ts +153 -0
- package/src/client/hooks/settings/hide-empty-providers.test.ts +132 -0
- package/src/client/hooks/settings/hide-empty-providers.ts +49 -0
- package/src/client/hooks/settings/speech.ts +170 -0
- package/src/client/hooks/settings/useTokenUsage.ts +7 -2
- package/src/client/hooks/tts/provider.tsx +50 -0
- package/src/client/hooks/tts/tts-context.ts +39 -0
- package/src/client/hooks/tts/use-speech-autoplay.test.tsx +122 -0
- package/src/client/hooks/tts/use-speech-autoplay.ts +106 -0
- package/src/client/hooks/tts/use-tts-player.ts +33 -0
- package/src/client/hooks/ui/markdown-hydration.test.tsx +83 -0
- package/src/client/hooks/ui/markdown-hydration.ts +31 -0
- package/src/client/hooks/ui/markdown-render.ts +119 -0
- package/src/client/hooks/workspace/journal-diff.ts +8 -1
- package/src/client/hooks/workspace/panel-actions.ts +184 -0
- package/src/client/hooks/workspace/panel-registry.ts +6 -139
- package/src/client/hooks/workspace/panel-tabs.ts +1 -1
- package/src/client/hooks/workspace/panel-visibility-menu.ts +2 -1
- package/src/client/hooks/workspace/right-side.test.ts +75 -1
- package/src/client/hooks/workspace/right-side.ts +71 -10
- package/src/client/lib/plugins/bootstrap.test.ts +1 -0
- package/src/client/lib/tts/player.test.ts +103 -0
- package/src/client/lib/tts/player.ts +213 -0
- package/src/client/tailwind.css +11 -0
- package/src/server/lib/antigravity/home.server.ts +27 -0
- package/src/server/lib/changes/capture-bash.server.ts +6 -3
- package/src/server/lib/changes/capture-fs.server.ts +2 -2
- package/src/server/lib/changes/capture-races.test.ts +33 -1
- package/src/server/lib/changes/capture-scan.test.ts +1 -1
- package/src/server/lib/changes/capture-test-util.ts +1 -1
- package/src/server/lib/changes/capture-types.ts +1 -1
- package/src/server/lib/changes/capture.server.ts +1 -1
- package/src/server/lib/changes/journal-read.server.ts +21 -0
- package/src/server/lib/changes/reader.server.ts +92 -14
- package/src/server/lib/changes/reader.test.ts +99 -0
- package/src/server/lib/changes/records.ts +2 -0
- package/src/server/lib/db/schema.ts +5 -1
- package/src/server/lib/dictation/capability.server.test.ts +113 -0
- package/src/server/lib/dictation/capability.server.ts +57 -0
- package/src/server/lib/dictation/engines/adapter.ts +147 -0
- package/src/server/lib/dictation/engines/adapters.test.ts +215 -0
- package/src/server/lib/dictation/engines/deepgram.ts +77 -0
- package/src/server/lib/dictation/engines/elevenlabs.ts +44 -0
- package/src/server/lib/dictation/engines/index.ts +55 -0
- package/src/server/lib/dictation/engines/openai.ts +51 -0
- package/src/server/lib/dictation/language.server.test.ts +21 -22
- package/src/server/lib/dictation/language.server.ts +16 -19
- package/src/server/lib/dictation/omp-stt-worker.test.ts +183 -0
- package/src/server/lib/dictation/omp-stt-worker.ts +130 -78
- package/src/server/lib/dictation/settings.server.ts +74 -0
- package/src/server/lib/dictation/speech-frames.test.ts +125 -0
- package/src/server/lib/dictation/speech-frames.ts +146 -0
- package/src/server/lib/dictation/worker-process.ts +122 -0
- package/src/server/lib/harness/account-identity.server.ts +163 -0
- package/src/server/lib/harness/account-login.server.test.ts +151 -0
- package/src/server/lib/harness/account-login.server.ts +232 -0
- package/src/server/lib/harness/accounts.server.ts +339 -0
- package/src/server/lib/harness/accounts.test.ts +147 -0
- package/src/server/lib/harness/acp/background-probe.test.ts +314 -0
- package/src/server/lib/harness/acp/background-probe.ts +288 -0
- package/src/server/lib/harness/acp/background-replay.test.ts +1 -1
- package/src/server/lib/harness/acp/background-work.test.ts +4 -194
- package/src/server/lib/harness/acp/background-work.ts +4 -207
- package/src/server/lib/harness/acp/calls.ts +20 -0
- package/src/server/lib/harness/acp/client-capabilities.ts +8 -1
- package/src/server/lib/harness/acp/client-fs.ts +17 -5
- package/src/server/lib/harness/acp/client-initialize.test.ts +32 -1
- package/src/server/lib/harness/acp/client-initialize.ts +51 -6
- package/src/server/lib/harness/acp/client-requests.ts +49 -0
- package/src/server/lib/harness/acp/client.ts +36 -36
- package/src/server/lib/harness/acp/commands.ts +2 -2
- package/src/server/lib/harness/acp/frames-rows.test.ts +144 -0
- package/src/server/lib/harness/acp/frames-tool-shapes.test.ts +238 -0
- package/src/server/lib/harness/acp/frames-v2.test.ts +21 -0
- package/src/server/lib/harness/acp/frames.test.ts +3 -15
- package/src/server/lib/harness/acp/frames.ts +43 -67
- package/src/server/lib/harness/acp/grants.ts +20 -5
- package/src/server/lib/harness/acp/mapper.test.ts +40 -1
- package/src/server/lib/harness/acp/mapper.ts +69 -9
- package/src/server/lib/harness/acp/message-rows.ts +219 -0
- package/src/server/lib/harness/acp/one-shot.server.ts +4 -2
- package/src/server/lib/harness/acp/prewarm.server.ts +21 -16
- package/src/server/lib/harness/acp/prompt.ts +20 -2
- package/src/server/lib/harness/acp/protocol.ts +24 -0
- package/src/server/lib/harness/acp/replay-window.test.ts +66 -0
- package/src/server/lib/harness/acp/replay.ts +33 -8
- package/src/server/lib/harness/acp/session-addressing.test.ts +99 -0
- package/src/server/lib/harness/acp/session-approvals.ts +4 -0
- package/src/server/lib/harness/acp/session-background.test.ts +2 -1
- package/src/server/lib/harness/acp/session-cancel-policy.test.ts +86 -0
- package/src/server/lib/harness/acp/session-close.test.ts +89 -0
- package/src/server/lib/harness/acp/session-config.ts +8 -3
- package/src/server/lib/harness/acp/session-handshake.ts +6 -0
- package/src/server/lib/harness/acp/session-inbound.ts +126 -0
- package/src/server/lib/harness/acp/session-intake.test.ts +8 -0
- package/src/server/lib/harness/acp/session-intake.ts +21 -5
- package/src/server/lib/harness/acp/session-lifecycle.ts +25 -0
- package/src/server/lib/harness/acp/session-notifications.ts +36 -0
- package/src/server/lib/harness/acp/session-options.ts +2 -0
- package/src/server/lib/harness/acp/session-permissions.ts +22 -1
- package/src/server/lib/harness/acp/session-process.ts +1 -0
- package/src/server/lib/harness/acp/session-requests.ts +19 -1
- package/src/server/lib/harness/acp/session-stop.ts +54 -0
- package/src/server/lib/harness/acp/session-wiring.test.ts +2 -0
- package/src/server/lib/harness/acp/session-wiring.ts +23 -0
- package/src/server/lib/harness/acp/session.test-util.ts +8 -3
- package/src/server/lib/harness/acp/session.ts +78 -78
- package/src/server/lib/harness/acp/stdio.test.ts +52 -0
- package/src/server/lib/harness/acp/stdio.ts +15 -2
- package/src/server/lib/harness/acp/subagent-frames.test.ts +82 -0
- package/src/server/lib/harness/acp/subagent-frames.ts +124 -0
- package/src/server/lib/harness/acp/subagents.test.ts +124 -0
- package/src/server/lib/harness/acp/subagents.ts +182 -0
- package/src/server/lib/harness/acp/tool-calls.ts +115 -45
- package/src/server/lib/harness/acp/tool-identity.test.ts +8 -0
- package/src/server/lib/harness/acp/tool-identity.ts +13 -1
- package/src/server/lib/harness/acp/tool-shape.ts +99 -0
- package/src/server/lib/harness/acp/turn.test.ts +1 -0
- package/src/server/lib/harness/acp/turn.ts +4 -1
- package/src/server/lib/harness/acp/v2.test.ts +21 -1
- package/src/server/lib/harness/acp/v2.ts +6 -1
- package/src/server/lib/harness/auto-probe.server.ts +2 -2
- package/src/server/lib/harness/launch-table.ts +6 -1
- package/src/server/lib/harness/launch.ts +1 -0
- package/src/server/lib/harness/schema.server.ts +37 -0
- package/src/server/lib/harness/session-delete.server.ts +4 -2
- package/src/server/lib/harness/session-import.server.ts +21 -7
- package/src/server/lib/harness/session-store.server.test.ts +12 -0
- package/src/server/lib/harness/session-store.server.ts +21 -6
- package/src/server/lib/harness/session-transcript.server.ts +2 -1
- package/src/server/lib/harness/spawn.server.ts +27 -6
- package/src/server/lib/lifecycle/paths.ts +22 -0
- package/src/server/lib/models/provider-icon-fetch.test.ts +57 -3
- package/src/server/lib/models/provider-icon-fetch.ts +9 -1
- package/src/server/lib/models/provider-icon-store.server.ts +61 -0
- package/src/server/lib/models/provider-icon-store.test.ts +55 -0
- package/src/server/lib/models/provider-icon-svg.ts +57 -0
- package/src/server/lib/omp/session/changes-patch.test.ts +120 -0
- package/src/server/lib/omp/session/changes-patch.ts +190 -0
- package/src/server/lib/omp/session/changes.test.ts +55 -61
- package/src/server/lib/omp/session/changes.ts +79 -127
- package/src/server/lib/omp/session/merge-stored.ts +2 -0
- package/src/server/lib/panels/catalog-offers.server.ts +1 -1
- package/src/server/lib/panels/catalog.server.test.ts +71 -2
- package/src/server/lib/panels/catalog.server.ts +80 -0
- package/src/server/lib/panels/install.server.test.ts +15 -0
- package/src/server/lib/panels/install.server.ts +7 -0
- package/src/server/lib/panels/manifest.test.ts +1 -76
- package/src/server/lib/panels/manifest.ts +3 -60
- package/src/server/lib/panels/marketplace-catalog.server.test.ts +154 -0
- package/src/server/lib/panels/marketplace-catalog.server.ts +131 -0
- package/src/server/lib/panels/offers.server.test.ts +5 -5
- package/src/server/lib/panels/offers.server.ts +20 -2
- package/src/server/lib/panels/registries.server.test.ts +216 -0
- package/src/server/lib/panels/registries.server.ts +118 -0
- package/src/server/lib/panels/registry-cache.server.ts +104 -0
- package/src/server/lib/panels/registry-refresh.server.ts +195 -0
- package/src/server/lib/panels/registry.server.test.ts +2 -2
- package/src/server/lib/panels/registry.server.ts +19 -1
- package/src/server/lib/panels/seed.server.ts +4 -1
- package/src/server/lib/schedule/runtime.server.ts +4 -1
- package/src/server/lib/sessions/dispatch.server.ts +4 -1
- package/src/server/lib/sessions/fork.server.ts +2 -0
- package/src/server/lib/sessions/resolve.server.ts +4 -0
- package/src/server/lib/sessions/spawn.server.ts +4 -2
- package/src/server/lib/tts/engines/adapter.ts +133 -0
- package/src/server/lib/tts/engines/adapters.test.ts +162 -0
- package/src/server/lib/tts/engines/deepgram.ts +43 -0
- package/src/server/lib/tts/engines/elevenlabs.ts +59 -0
- package/src/server/lib/tts/engines/gemini.ts +116 -0
- package/src/server/lib/tts/engines/index.ts +78 -0
- package/src/server/lib/tts/engines/openai.ts +69 -0
- package/src/server/lib/tts/engines/xai.ts +44 -0
- package/src/server/lib/tts/local.server.ts +160 -0
- package/src/server/lib/tts/settings.server.ts +103 -0
- package/src/server/lib/usage/antigravity-quota.test.ts +249 -0
- package/src/server/lib/usage/antigravity-quota.ts +197 -0
- package/src/server/lib/usage/antigravity.test.ts +20 -0
- package/src/server/lib/usage/antigravity.ts +267 -0
- package/src/server/lib/usage/index-harness.test.ts +162 -0
- package/src/server/lib/usage/index-parse.test.ts +1 -0
- package/src/server/lib/usage/index-parse.ts +12 -4
- package/src/server/lib/usage/index-query.server.ts +64 -2
- package/src/server/lib/usage/index-scan.server.ts +68 -152
- package/src/server/lib/usage/index-schema.server.ts +24 -8
- package/src/server/lib/usage/index-schema.test.ts +54 -0
- package/src/server/lib/usage/index-sources.server.ts +54 -0
- package/src/server/lib/usage/providers.server.test.ts +67 -1
- package/src/server/lib/usage/providers.server.ts +82 -3
- package/src/server/lib/usage/sources/claude.server.ts +187 -0
- package/src/server/lib/usage/sources/claude.test.ts +86 -0
- package/src/server/lib/usage/sources/codex.server.ts +155 -0
- package/src/server/lib/usage/sources/codex.test.ts +53 -0
- package/src/server/lib/usage/sources/dsh.server.ts +120 -0
- package/src/server/lib/usage/sources/dsh.test.ts +49 -0
- package/src/server/lib/usage/sources/helpers.ts +191 -0
- package/src/server/lib/usage/sources/jsonl.server.ts +78 -0
- package/src/server/lib/usage/sources/jsonl.test.ts +72 -0
- package/src/server/lib/usage/sources/omp.server.ts +124 -0
- package/src/server/lib/usage/sources/opencode.server.ts +203 -0
- package/src/server/lib/usage/sources/opencode.test.ts +104 -0
- package/src/server/lib/usage/sources/qwen.server.ts +122 -0
- package/src/server/lib/usage/sources/qwen.test.ts +62 -0
- package/src/server/lib/usage/sources/types.ts +53 -0
- package/src/server/lib/usage/sources/zcode.server.ts +131 -0
- package/src/server/lib/usage/sources/zcode.test.ts +87 -0
- package/src/server/routes/agent/harness-command.ts +2 -0
- package/src/server/routes/agent/prewarm.ts +7 -2
- package/src/server/routes/dictation/ws.ts +99 -27
- package/src/server/routes/harness/accounts.test.ts +99 -0
- package/src/server/routes/harness/accounts.ts +106 -0
- package/src/server/routes/harness/root.ts +13 -1
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/panels/install-route.test.ts +110 -0
- package/src/server/routes/panels/install.ts +82 -3
- package/src/server/routes/sessions/index.ts +5 -0
- package/src/server/routes/sessions/local-image.test.ts +94 -0
- package/src/server/routes/sessions/local-image.ts +141 -0
- package/src/server/routes/settings/dictation.test.ts +139 -0
- package/src/server/routes/settings/dictation.ts +86 -0
- package/src/server/routes/settings/index.ts +4 -0
- package/src/server/routes/settings/speech.test.ts +156 -0
- package/src/server/routes/settings/speech.ts +98 -0
- package/src/server/routes/telemetry/tokens.test.ts +20 -0
- package/src/server/routes/telemetry/tokens.ts +12 -3
- package/src/server/routes/tts/index.ts +11 -0
- package/src/server/routes/tts/speak.test.ts +200 -0
- package/src/server/routes/tts/speak.ts +87 -0
- package/src/shared/lib/chat/attachments.ts +17 -3
- package/src/shared/lib/chat/composer/attachment-labels.test.ts +154 -0
- package/src/shared/lib/chat/composer/attachment-labels.ts +166 -0
- package/src/shared/lib/chat/omp/subagent-card-fold.test.ts +75 -0
- package/src/shared/lib/chat/timeline/changed-files.test.ts +13 -0
- package/src/shared/lib/chat/timeline/changed-files.ts +4 -2
- package/src/shared/lib/chat/timeline/local-image.test.ts +88 -0
- package/src/shared/lib/chat/timeline/local-image.ts +110 -0
- package/src/shared/lib/chat/timeline/omp-callbacks.ts +3 -2
- package/src/shared/lib/chat/timeline/run-signals.ts +2 -2
- package/src/shared/lib/chat/timeline/stream-callbacks.ts +8 -6
- package/src/shared/lib/chat/timeline/stream-coalescer.ts +7 -0
- package/src/shared/lib/chat/timeline/stream.test.ts +3 -1
- package/src/shared/lib/chat/timeline/tool-verbs.test.ts +5 -0
- package/src/shared/lib/chat/timeline/tool-verbs.ts +3 -1
- package/src/shared/lib/chat/todo/parser.test.ts +54 -0
- package/src/shared/lib/chat/todo/parser.ts +56 -0
- package/src/shared/lib/chat/tool/tool-aliases.test.ts +37 -0
- package/src/shared/lib/chat/tool/tool-aliases.ts +75 -0
- package/src/shared/lib/chat/tool/tool-input-path.test.ts +44 -0
- package/src/shared/lib/chat/tool/tool-input-path.ts +47 -0
- package/src/shared/lib/dictation/capability.ts +32 -0
- package/src/shared/lib/dictation/constraints.test.ts +41 -0
- package/src/shared/lib/dictation/constraints.ts +48 -0
- package/src/shared/lib/dictation/engines.test.ts +117 -0
- package/src/shared/lib/dictation/engines.ts +190 -0
- package/src/shared/lib/dictation/gate.test.ts +118 -0
- package/src/shared/lib/dictation/gate.ts +85 -0
- package/src/shared/lib/dictation/languages.test.ts +88 -0
- package/src/shared/lib/dictation/languages.ts +90 -0
- package/src/shared/lib/dictation/models.ts +9 -5
- package/src/shared/lib/dictation/protocol.ts +74 -34
- package/src/shared/lib/dictation/settings.test.ts +94 -0
- package/src/shared/lib/dictation/settings.ts +111 -0
- package/src/shared/lib/dictation/wav.test.ts +66 -0
- package/src/shared/lib/dictation/wav.ts +48 -0
- package/src/shared/lib/fs/journal-unavailable.test.ts +30 -0
- package/src/shared/lib/fs/journal-unavailable.ts +35 -0
- package/src/shared/lib/harness/accounts.test.ts +41 -0
- package/src/shared/lib/harness/accounts.ts +175 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +36 -35
- package/src/shared/lib/markdown/ascii-art.test.ts +154 -0
- package/src/shared/lib/markdown/ascii-art.ts +158 -0
- package/src/shared/lib/markdown/marked.ts +24 -2
- package/src/shared/lib/models/provider/identity.test.ts +34 -0
- package/src/shared/lib/models/provider/identity.ts +28 -0
- package/src/shared/lib/net/base-url.test.ts +25 -0
- package/src/shared/lib/net/base-url.ts +29 -0
- package/src/shared/lib/omp/config/schema-extras.ts +9 -8
- package/src/shared/lib/omp/session/parse-message-blocks.ts +2 -2
- package/src/shared/lib/panels/plugin-repo.test.ts +113 -0
- package/src/shared/lib/panels/plugin-repo.ts +149 -0
- package/src/shared/lib/settings/defaults.ts +6 -0
- package/src/shared/lib/tts/capability.ts +16 -0
- package/src/shared/lib/tts/engines.test.ts +91 -0
- package/src/shared/lib/tts/engines.ts +314 -0
- package/src/shared/lib/tts/settings.test.ts +56 -0
- package/src/shared/lib/tts/settings.ts +108 -0
- package/src/shared/lib/tts/speakable.test.ts +76 -0
- package/src/shared/lib/tts/speakable.ts +179 -0
- package/src/shared/lib/tts/voices.ts +98 -0
- package/src/shared/lib/workspace/right-side-hidden.ts +57 -0
- package/src/shared/lib/workspace/session-state/store.ts +7 -5
- package/src/shared/types/chat.ts +8 -1
- package/src/shared/types/harness.ts +5 -0
- package/src/shared/types/panels-registry.ts +32 -0
- package/src/shared/types/panels.ts +23 -0
- package/src/shared/types/session-changes.ts +15 -1
- package/src/shared/types/settings/state.ts +37 -0
- package/src/shared/types/tokenUsage.ts +21 -0
- package/src/test-support/preload.ts +9 -0
- package/src/test-support/pristine-globals.ts +5 -0
- package/dist/client/static/js/ImageView-pr4h38hb.js +0 -1
- package/dist/client/static/js/LayoutWrapper-n4tzhjes.js +0 -2
- package/dist/client/static/js/MergeDiffView-0t15nh9f.js +0 -1
- package/dist/client/static/js/Modal-77hgx4dw.js +0 -59
- package/dist/client/static/js/PdfView-gzxhvxe8.js +0 -1
- package/dist/client/static/js/SessionsView-2tdqrvk0.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-zs15nydj.js +0 -1
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-heep78p6.js +0 -36
- package/dist/client/static/js/bash-8d3wrx5c.js +0 -1
- package/dist/client/static/js/c-rn3z0csz.js +0 -1
- package/dist/client/static/js/cose-bilkent-JH36ORCC-ybv1ttbx.js +0 -1
- package/dist/client/static/js/cpp-99ws9nak.js +0 -1
- package/dist/client/static/js/css-drfs4n12.js +0 -1
- package/dist/client/static/js/css-narcr42w.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-p3y1b4ap.js +0 -1
- package/dist/client/static/js/dagre-6A5THRUB-gk0gp124.js +0 -4
- package/dist/client/static/js/diagram-3UASUU5V-bzstt5e2.js +0 -24
- package/dist/client/static/js/eventmodeling-NTZA5JFV-sx2cwkz3.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-dsc17mty.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-yqhbscsd.js +0 -1
- package/dist/client/static/js/graphql-tr0jcndy.js +0 -1
- package/dist/client/static/js/html-n8fdvrdk.js +0 -1
- package/dist/client/static/js/index-1hb8fvw9.js +0 -1
- package/dist/client/static/js/index-869vdnz8.js +0 -2
- package/dist/client/static/js/index-9a78xmkk.js +0 -462
- package/dist/client/static/js/index-aa3hmn6j.js +0 -314
- package/dist/client/static/js/index-axtm1aq8.js +0 -2
- package/dist/client/static/js/index-b2cs4c51.js +0 -4
- package/dist/client/static/js/index-fryp0kgf.js +0 -2
- package/dist/client/static/js/index-gkmn4y1v.js +0 -1
- package/dist/client/static/js/index-kjr68pcj.js +0 -2
- package/dist/client/static/js/index-m39gbcxn.js +0 -1
- package/dist/client/static/js/index-qek9mt5w.js +0 -1
- package/dist/client/static/js/index-rgxg0azs.css +0 -1
- package/dist/client/static/js/index-rq4dk4tp.js +0 -4
- package/dist/client/static/js/index-vnv9z0a1.js +0 -1
- package/dist/client/static/js/index-xr4hjv01.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-0sd3zzgg.js +0 -1
- package/dist/client/static/js/ini-tnaw7zjy.js +0 -1
- package/dist/client/static/js/java-m4dpc2vw.js +0 -1
- package/dist/client/static/js/javascript-8y26t991.js +0 -1
- package/dist/client/static/js/json-azm7bdqd.js +0 -1
- package/dist/client/static/js/jsx-p9j1k773.js +0 -1
- package/dist/client/static/js/lua-hbm9rhz9.js +0 -1
- package/dist/client/static/js/markdown-tk3cd3vs.js +0 -1
- package/dist/client/static/js/one-dark-pro-2cdc2nk7.js +0 -1
- package/dist/client/static/js/one-light-bt6z4jf0.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-13w2v5bb.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-swtnysgn.js +0 -1
- package/dist/client/static/js/properties-6911ckw7.js +0 -1
- package/dist/client/static/js/python-44cvj250.js +0 -1
- package/dist/client/static/js/quadrantDiagram-O4NWA36T-dxkwxbqb.js +0 -7
- package/dist/client/static/js/r-t3sepzm4.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-vtvxkx55.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-5sp2d63r.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-kg706fan.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-4ra1gzx5.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-hms3zpjm.js +0 -1
- package/dist/client/static/js/sql-zdkawqx3.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-3dwas56m.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-7t5k6rs2.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-w56ry3bg.js +0 -1
- package/dist/client/static/js/tsx-b7eabr17.js +0 -1
- package/dist/client/static/js/typescript-nnkvhwfy.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-rtjb9kgv.js +0 -1
- package/dist/client/static/js/wardleyDiagram-VNRHLVJA-10ph3bzq.js +0 -78
- package/dist/client/static/js/xml-xy1tw6b2.js +0 -1
- package/dist/client/static/js/yaml-0fexqg2d.js +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Answering a call the AGENT made on this client.
|
|
8
|
+
*
|
|
9
|
+
* Split out of `client.ts` for the per-file ceiling, and because the rule is
|
|
10
|
+
* its own subject: an unanswered agent→client call parks the turn, so every
|
|
11
|
+
* branch here either answers, defers (the approval dialog answers later through
|
|
12
|
+
* `respond`), or refuses WITH a code the agent can act on. Dropping a call is
|
|
13
|
+
* the one outcome this module must never produce.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import type { AcpId } from '@/server/lib/harness/acp/protocol';
|
|
17
|
+
import type { AcpClientRequestHandler } from '@/server/lib/harness/acp/client';
|
|
18
|
+
|
|
19
|
+
/** The transport seams one answer needs. */
|
|
20
|
+
export interface AgentRequestResponder {
|
|
21
|
+
respond(id: AcpId, result: unknown): void;
|
|
22
|
+
respondError(id: AcpId, message: string, code?: number): void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export async function answerAgentRequest(
|
|
26
|
+
responder: AgentRequestResponder,
|
|
27
|
+
ask: AcpClientRequestHandler | undefined,
|
|
28
|
+
id: AcpId,
|
|
29
|
+
method: string,
|
|
30
|
+
params: unknown,
|
|
31
|
+
): Promise<void> {
|
|
32
|
+
const bag = (params ?? {}) as Record<string, unknown>;
|
|
33
|
+
try {
|
|
34
|
+
const handled = await ask?.(id, method, bag);
|
|
35
|
+
if (handled?.answered) {
|
|
36
|
+
responder.respond(id, handled.result);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
// A deferred call is answered LATER through `respond(id, …)` — the approval
|
|
40
|
+
// dialog works this way, and sending a refusal here would answer the same
|
|
41
|
+
// request twice.
|
|
42
|
+
if (handled && 'deferred' in handled) return;
|
|
43
|
+
// A refusal is REQUIRED, and the code travels with it so the agent can fall
|
|
44
|
+
// back (`-32601` is "this client lacks the method", not "it broke").
|
|
45
|
+
responder.respondError(id, handled?.message ?? `Kabmo does not implement ${method}`, handled?.code);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
responder.respondError(id, error instanceof Error ? error.message : String(error));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
* `_auth/status_update` ~3.4 s after `initialize` with nobody asking. Unknown
|
|
21
21
|
* notifications are forwarded, never treated as errors.
|
|
22
22
|
* - **agent→client requests.** `fs/read_text_file`, `terminal/*`, and
|
|
23
|
-
* `session/request_permission` are calls the AGENT makes on the CLIENT
|
|
24
|
-
*
|
|
25
|
-
* explicitly refused — never dropped.
|
|
23
|
+
* `session/request_permission` are calls the AGENT makes on the CLIENT; the
|
|
24
|
+
* answering rule lives in `client-requests.ts`.
|
|
26
25
|
*/
|
|
27
26
|
|
|
28
27
|
import { PendingCalls } from '@/server/lib/harness/acp/calls';
|
|
29
28
|
import { AgentStdio } from '@/server/lib/harness/acp/stdio';
|
|
30
29
|
import * as verbs from '@/server/lib/harness/acp/verbs';
|
|
31
30
|
import { initializeAcpAgent } from '@/server/lib/harness/acp/client-initialize';
|
|
31
|
+
import { answerAgentRequest } from '@/server/lib/harness/acp/client-requests';
|
|
32
32
|
import { ACP_ERROR } from '@/server/lib/harness/acp/protocol';
|
|
33
33
|
import type {
|
|
34
34
|
AcpId,
|
|
@@ -57,6 +57,8 @@ export interface AcpClientOptions {
|
|
|
57
57
|
command: string[];
|
|
58
58
|
cwd: string;
|
|
59
59
|
env?: Record<string, string>;
|
|
60
|
+
/** Ambient names removed before `env` is merged. */
|
|
61
|
+
envDrop?: readonly string[];
|
|
60
62
|
/** Frame sink: `session/update` notifications and unknown notifications. */
|
|
61
63
|
onNotification: (method: string, params: Record<string, unknown>) => void;
|
|
62
64
|
/** Agent→client request hook, before the built-in refusals. */
|
|
@@ -105,11 +107,26 @@ export class AcpProcess {
|
|
|
105
107
|
command: options.command,
|
|
106
108
|
cwd: options.cwd,
|
|
107
109
|
...(options.env ? { env: options.env } : {}),
|
|
110
|
+
...(options.envDrop ? { envDrop: options.envDrop } : {}),
|
|
108
111
|
},
|
|
109
112
|
{
|
|
110
113
|
onLine: (line) => this.handleLine(line),
|
|
111
114
|
onStderr: (line) => this.sinks.onStderr?.(line),
|
|
115
|
+
onStdoutClosed: () => {
|
|
116
|
+
// The transport is one-way now: answering is impossible, so every
|
|
117
|
+
// parked call is refused instead of waiting out its budget, and the
|
|
118
|
+
// child is reported as gone even while its PID is still alive —
|
|
119
|
+
// otherwise `isAlive` would keep a chat that can never answer.
|
|
120
|
+
if (this.exited) return;
|
|
121
|
+
this.exited = true;
|
|
122
|
+
this.rejectAll(new Error('ACP agent closed its output stream'));
|
|
123
|
+
this.sinks.onExit?.({ code: null, signal: null, stderrTail: this.stdio.stderrTail });
|
|
124
|
+
void this.stdio.dispose(1_000);
|
|
125
|
+
},
|
|
112
126
|
onExit: ({ code, stderrTail }) => {
|
|
127
|
+
// EOF can report the exit first; the real `exited` callback must not
|
|
128
|
+
// report the same death twice.
|
|
129
|
+
if (this.exited) return;
|
|
113
130
|
this.exited = true;
|
|
114
131
|
// The agent's own last words, when it left any: `exited (code 0)` is
|
|
115
132
|
// what a shadowed/deprecated binary prints while it explains itself on
|
|
@@ -123,21 +140,13 @@ export class AcpProcess {
|
|
|
123
140
|
);
|
|
124
141
|
}
|
|
125
142
|
|
|
126
|
-
get isAlive(): boolean {
|
|
127
|
-
|
|
128
|
-
}
|
|
143
|
+
get isAlive(): boolean { return !this.exited; }
|
|
144
|
+
get pid(): number | undefined { return this.stdio.pid; }
|
|
129
145
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* `initialize`; the client advertises exactly what it can serve.
|
|
136
|
-
*
|
|
137
|
-
* Idempotent: a prewarmed process has already answered, and the session that
|
|
138
|
-
* adopts it must not pay a second round trip (or, worse, send a second
|
|
139
|
-
* `initialize` the agent may refuse).
|
|
140
|
-
*/
|
|
146
|
+
/** `initialize`; the client advertises exactly what it can serve.
|
|
147
|
+
* Idempotent: a prewarmed process has already answered, and the session that
|
|
148
|
+
* adopts it must not pay a second round trip (or send a second `initialize`
|
|
149
|
+
* the agent may refuse). */
|
|
141
150
|
initialize(capabilities?: Record<string, unknown>, timeoutMs = 60_000): Promise<AcpInitializeResult> {
|
|
142
151
|
this.init ??= initializeAcpAgent(this.call, capabilities, timeoutMs).then((result) => {
|
|
143
152
|
this.protocolVersion = result.protocolVersion === 2 ? 2 : 1;
|
|
@@ -208,6 +217,14 @@ export class AcpProcess {
|
|
|
208
217
|
this.pending.abandonPrompt(sessionId);
|
|
209
218
|
}
|
|
210
219
|
|
|
220
|
+
/** Withdraw this session's open control calls and tell the agent. Prompts are
|
|
221
|
+
* left to `session/cancel` + the turn machine's grace window. */
|
|
222
|
+
cancelControlRequests(sessionId: string): void {
|
|
223
|
+
for (const id of this.pending.cancelRequestsOf(sessionId)) {
|
|
224
|
+
this.notify('$/cancel_request', { requestId: id });
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
211
228
|
setConfigOption(sessionId: string, configId: string, value: string | boolean, timeoutMs?: number) {
|
|
212
229
|
return verbs.setConfigOption(this.call, sessionId, configId, value, timeoutMs, this.protocolVersion);
|
|
213
230
|
}
|
|
@@ -325,24 +342,7 @@ export class AcpProcess {
|
|
|
325
342
|
}
|
|
326
343
|
|
|
327
344
|
/** Answer (or refuse) a call the AGENT made on this client. */
|
|
328
|
-
private
|
|
329
|
-
|
|
330
|
-
try {
|
|
331
|
-
const handled = await this.sinks.onClientRequest?.(id, method, bag);
|
|
332
|
-
if (handled?.answered) {
|
|
333
|
-
this.respond(id, handled.result);
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
// A deferred call is answered LATER through `respond(id, …)` — the
|
|
337
|
-
// approval dialog works this way, and sending a refusal here would answer
|
|
338
|
-
// the same request twice.
|
|
339
|
-
if (handled && 'deferred' in handled) return;
|
|
340
|
-
// A refusal is REQUIRED: an unanswered agent→client call parks the turn.
|
|
341
|
-
// The code travels with it so the agent can fall back accordingly.
|
|
342
|
-
this.respondError(id, handled?.message ?? `Kabmo does not implement ${method}`, handled?.code);
|
|
343
|
-
} catch (error) {
|
|
344
|
-
this.respondError(id, error instanceof Error ? error.message : String(error));
|
|
345
|
-
}
|
|
345
|
+
private handleAgentRequest(id: AcpId, method: string, params: unknown): Promise<void> {
|
|
346
|
+
return answerAgentRequest(this, this.sinks.onClientRequest, id, method, params);
|
|
346
347
|
}
|
|
347
|
-
|
|
348
348
|
}
|
|
@@ -42,7 +42,7 @@ export interface AcpCommandHost {
|
|
|
42
42
|
/** Dispatch one turn. Returns the ACK (`{agentInvoked:true}`), never the
|
|
43
43
|
* turn: the route's answer means "accepted", and the turn's end arrives as
|
|
44
44
|
* the session's `agent_end` frame. */
|
|
45
|
-
startTurn(message: string, images: unknown): Promise<unknown> | unknown;
|
|
45
|
+
startTurn(message: string, images: unknown, options?: { quiet?: boolean }): Promise<unknown> | unknown;
|
|
46
46
|
isAlive(): boolean;
|
|
47
47
|
destroyAndWait(): Promise<void>;
|
|
48
48
|
steer(blocks: unknown[], queue: 'steering' | 'followUp'): Promise<unknown>;
|
|
@@ -85,7 +85,7 @@ const defaultBlocks = async (message: string, images: unknown): Promise<unknown[
|
|
|
85
85
|
// Kabmo's goal kickoff/continuation is synthetic: naming the chat after
|
|
86
86
|
// that boilerplate is worse than leaving the objective's own title.
|
|
87
87
|
if (command.synthetic !== true) await notePromptTitle(host.sessionId, message);
|
|
88
|
-
return host.startTurn(message, command.images);
|
|
88
|
+
return host.startTurn(message, command.images, { quiet: command.quiet === true });
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
case 'set_access_mode': {
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Where a row ENDS. The timeline draws a row's blocks in a fixed order —
|
|
8
|
+
* thinking, then the answer text, then the tool cards — so a row that holds a
|
|
9
|
+
* card and the prose written after it draws the ANSWER first. Measured on
|
|
10
|
+
* session 9ea5a178 (antigravity): frames arrived `tool_call run_command` →
|
|
11
|
+
* `tool_execution_end` → thought → `agent_message_chunk` "Ini gambarnya!…", the
|
|
12
|
+
* merged row rendered `"Ini gambarnya!Run Command… Done"`, and the same
|
|
13
|
+
* transcript split rendered `"Run Command… DoneIni gambarnya!"` — arrival order.
|
|
14
|
+
*
|
|
15
|
+
* Split from `frames.test.ts` to stay under the file ceiling.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { describe, expect, test } from 'bun:test';
|
|
19
|
+
import { AcpFrameMapper } from '@/server/lib/harness/acp/frames';
|
|
20
|
+
|
|
21
|
+
const anonymousChunk = (text: string) => ({
|
|
22
|
+
sessionUpdate: 'agent_message_chunk',
|
|
23
|
+
content: { type: 'text', text },
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const messageIdOf = (frame: unknown): string | undefined => {
|
|
27
|
+
if (!frame || typeof frame !== 'object' || !('message' in frame)) return undefined;
|
|
28
|
+
const message = frame.message;
|
|
29
|
+
if (!message || typeof message !== 'object' || !('id' in message)) return undefined;
|
|
30
|
+
return typeof message.id === 'string' ? message.id : undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const contentOf = (frame: unknown): { type: string; text?: string; thinking?: string }[] => {
|
|
34
|
+
if (!frame || typeof frame !== 'object' || !('message' in frame)) return [];
|
|
35
|
+
const message = frame.message;
|
|
36
|
+
if (!message || typeof message !== 'object' || !('content' in message)) return [];
|
|
37
|
+
const content = message.content;
|
|
38
|
+
return Array.isArray(content) ? (content as { type: string; text?: string; thinking?: string }[]) : [];
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
describe('acp frame mapper — row boundaries', () => {
|
|
42
|
+
test('a tool call and the prose after it are TWO rows, in arrival order', () => {
|
|
43
|
+
const mapper = new AcpFrameMapper();
|
|
44
|
+
const opened = mapper.mapUpdate({
|
|
45
|
+
sessionUpdate: 'tool_call',
|
|
46
|
+
toolCallId: 't1',
|
|
47
|
+
title: 'Read',
|
|
48
|
+
status: 'in_progress',
|
|
49
|
+
});
|
|
50
|
+
const frames = mapper.mapUpdate(anonymousChunk('done'));
|
|
51
|
+
expect(frames.map((frame) => frame.type)).toEqual(['message_end', 'message_update']);
|
|
52
|
+
expect(messageIdOf(frames[1])).not.toBe(messageIdOf(opened[0]));
|
|
53
|
+
// The closed row is the CARD's row, not a copy of the answer.
|
|
54
|
+
expect(contentOf(frames[0]).map((block) => block.type)).toEqual(['toolCall']);
|
|
55
|
+
expect(messageIdOf(mapper.closeMessage()[0])).toBe(messageIdOf(frames[1]));
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
test('prose before a card stays in its own row', () => {
|
|
59
|
+
const mapper = new AcpFrameMapper();
|
|
60
|
+
mapper.mapUpdate(anonymousChunk('checking'));
|
|
61
|
+
const frames = mapper.mapUpdate({
|
|
62
|
+
sessionUpdate: 'tool_call',
|
|
63
|
+
toolCallId: 't2',
|
|
64
|
+
title: 'Read',
|
|
65
|
+
status: 'in_progress',
|
|
66
|
+
});
|
|
67
|
+
expect(frames.map((frame) => frame.type)).toEqual([
|
|
68
|
+
'message_end',
|
|
69
|
+
'message_update',
|
|
70
|
+
'tool_execution_start',
|
|
71
|
+
]);
|
|
72
|
+
expect(contentOf(frames[0])).toEqual([{ type: 'text', text: 'checking' }]);
|
|
73
|
+
// The card row is fresh, not the closed prose row's identity.
|
|
74
|
+
expect(messageIdOf(frames[1])).not.toBe(messageIdOf(frames[0]));
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test('thinking written after a card is its own row too', () => {
|
|
78
|
+
const mapper = new AcpFrameMapper();
|
|
79
|
+
mapper.mapUpdate({
|
|
80
|
+
sessionUpdate: 'tool_call',
|
|
81
|
+
toolCallId: 't3',
|
|
82
|
+
title: 'Read',
|
|
83
|
+
status: 'in_progress',
|
|
84
|
+
});
|
|
85
|
+
const frames = mapper.mapUpdate({
|
|
86
|
+
sessionUpdate: 'agent_thought_chunk',
|
|
87
|
+
content: { type: 'text', text: 'hmm' },
|
|
88
|
+
});
|
|
89
|
+
expect(frames.map((frame) => frame.type)).toEqual(['message_end', 'message_update']);
|
|
90
|
+
expect(contentOf(frames[1])).toEqual([{ type: 'thinking', thinking: 'hmm' }]);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
test('consecutive cards share ONE row', () => {
|
|
94
|
+
const mapper = new AcpFrameMapper();
|
|
95
|
+
const first = mapper.mapUpdate({
|
|
96
|
+
sessionUpdate: 'tool_call',
|
|
97
|
+
toolCallId: 'a1',
|
|
98
|
+
title: 'Read',
|
|
99
|
+
status: 'in_progress',
|
|
100
|
+
});
|
|
101
|
+
const second = mapper.mapUpdate({
|
|
102
|
+
sessionUpdate: 'tool_call',
|
|
103
|
+
toolCallId: 'b1',
|
|
104
|
+
title: 'Read',
|
|
105
|
+
status: 'in_progress',
|
|
106
|
+
});
|
|
107
|
+
expect(second.map((frame) => frame.type)).toEqual(['message_update', 'tool_execution_start']);
|
|
108
|
+
expect(messageIdOf(second[0])).toBe(messageIdOf(first[0]));
|
|
109
|
+
expect(contentOf(second[0]).map((block) => block.type)).toEqual(['toolCall', 'toolCall']);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test('the turn-level message keeps every row, for the background probe', () => {
|
|
113
|
+
// Rows are split for the timeline, but `endAcpTurn` asks the closed turn
|
|
114
|
+
// whether it handed work to a background worker and what its answer was.
|
|
115
|
+
// The last row alone answered "no tool call" for a turn that spawned one.
|
|
116
|
+
const mapper = new AcpFrameMapper();
|
|
117
|
+
mapper.reset();
|
|
118
|
+
mapper.mapUpdate({
|
|
119
|
+
sessionUpdate: 'tool_call',
|
|
120
|
+
toolCallId: 'c1',
|
|
121
|
+
name: 'invoke_subagent',
|
|
122
|
+
status: 'in_progress',
|
|
123
|
+
});
|
|
124
|
+
mapper.mapUpdate(anonymousChunk('done'));
|
|
125
|
+
mapper.closeMessage();
|
|
126
|
+
const content = mapper.turnMessage()?.content as { type: string }[];
|
|
127
|
+
expect(content.map((block) => block.type)).toEqual(['toolCall', 'text']);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
test('a new turn starts an empty aggregate', () => {
|
|
131
|
+
const mapper = new AcpFrameMapper();
|
|
132
|
+
mapper.mapUpdate(anonymousChunk('one'));
|
|
133
|
+
mapper.closeMessage();
|
|
134
|
+
mapper.reset();
|
|
135
|
+
expect(mapper.turnMessage()).toBeNull();
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
test('closing an already-closed row emits nothing', () => {
|
|
139
|
+
const mapper = new AcpFrameMapper();
|
|
140
|
+
mapper.mapUpdate(anonymousChunk('one'));
|
|
141
|
+
expect(mapper.closeMessage()).toHaveLength(1);
|
|
142
|
+
expect(mapper.closeMessage()).toEqual([]);
|
|
143
|
+
});
|
|
144
|
+
});
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Vendor tool shapes through the ACP accumulator.
|
|
8
|
+
*
|
|
9
|
+
* `frames.test.ts` covers the lifecycle (create, patch, close); this file covers
|
|
10
|
+
* what a REAL adapter puts in those frames, measured against opencode 2.2.5:
|
|
11
|
+
*
|
|
12
|
+
* - the tool is named `shell` and its result lives under `rawOutput.metadata`
|
|
13
|
+
* (`exit`, `truncated`) rather than omp's `details`;
|
|
14
|
+
* - an edit reports its patch as `metadata.files[].patch`, not as an ACP
|
|
15
|
+
* `diff` content block;
|
|
16
|
+
* - `kind:"think"` is a reasoning call, not a file read.
|
|
17
|
+
*
|
|
18
|
+
* Split from `frames.test.ts` when the cases pushed that file past the ceiling.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { describe, expect, test } from 'bun:test';
|
|
22
|
+
import { AcpFrameMapper } from '@/server/lib/harness/acp/frames';
|
|
23
|
+
import { parseMessageBlocks, toToolCallData } from '@/shared/lib/omp/session/parse-message-blocks';
|
|
24
|
+
import { toolPanelKind } from '@/client/components/workspace/chat-timeline/tool-renderers/registry';
|
|
25
|
+
|
|
26
|
+
/** The message blocks a frame carries, narrowed without an unchecked cast. */
|
|
27
|
+
function contentOf(frame: unknown): Record<string, unknown>[] {
|
|
28
|
+
if (!frame || typeof frame !== 'object' || !('message' in frame)) return [];
|
|
29
|
+
const message = frame.message;
|
|
30
|
+
if (!message || typeof message !== 'object' || !('content' in message)) return [];
|
|
31
|
+
const content = message.content;
|
|
32
|
+
return Array.isArray(content)
|
|
33
|
+
? content.filter((block): block is Record<string, unknown> => Boolean(block) && typeof block === 'object')
|
|
34
|
+
: [];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
describe('acp frame mapper — vendor tool shapes', () => {
|
|
38
|
+
test('an opencode shell call becomes the bash card with its exit status', () => {
|
|
39
|
+
// Before the name fold the panel lookup read `shell`, found no panel, and
|
|
40
|
+
// drew the generic Input/Output body.
|
|
41
|
+
const mapper = new AcpFrameMapper();
|
|
42
|
+
const frames = mapper.mapUpdate({
|
|
43
|
+
sessionUpdate: 'tool_call',
|
|
44
|
+
toolCallId: 'sh1',
|
|
45
|
+
name: 'shell',
|
|
46
|
+
title: 'ls -la',
|
|
47
|
+
kind: 'execute',
|
|
48
|
+
status: 'pending',
|
|
49
|
+
rawInput: { command: 'ls -la', description: 'List files', cwd: '/tmp/x' },
|
|
50
|
+
locations: [{ path: '/tmp/x' }],
|
|
51
|
+
});
|
|
52
|
+
const block = contentOf(frames[0]);
|
|
53
|
+
expect(block[0]).toMatchObject({ name: 'bash', toolType: 'bash' });
|
|
54
|
+
expect(frames[1]).toMatchObject({ toolName: 'bash', toolType: 'bash' });
|
|
55
|
+
|
|
56
|
+
const end = mapper.mapUpdate({
|
|
57
|
+
sessionUpdate: 'tool_call_update',
|
|
58
|
+
toolCallId: 'sh1',
|
|
59
|
+
status: 'completed',
|
|
60
|
+
content: [{ type: 'content', content: { type: 'text', text: 'total 0' } }],
|
|
61
|
+
rawOutput: { metadata: { exit: 1, truncated: false, status: 'completed' } },
|
|
62
|
+
});
|
|
63
|
+
expect(end[0]).toMatchObject({
|
|
64
|
+
type: 'tool_execution_end',
|
|
65
|
+
output: 'total 0',
|
|
66
|
+
details: { exitCode: 1, truncated: false },
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
test('the command opencode sends one patch later reaches the card', () => {
|
|
71
|
+
// opencode opens the call from `session.tool.input.started` with an EMPTY
|
|
72
|
+
// input and sends `{command}` on `session.tool.called`. A patch that kept
|
|
73
|
+
// only the fields it knew left the Bash card with no command at all.
|
|
74
|
+
const mapper = new AcpFrameMapper();
|
|
75
|
+
mapper.mapUpdate({
|
|
76
|
+
sessionUpdate: 'tool_call',
|
|
77
|
+
toolCallId: 'sh2',
|
|
78
|
+
name: 'shell',
|
|
79
|
+
title: 'shell',
|
|
80
|
+
kind: 'execute',
|
|
81
|
+
status: 'pending',
|
|
82
|
+
rawInput: { cwd: '/tmp/x' },
|
|
83
|
+
locations: [{ path: '/tmp/x' }],
|
|
84
|
+
});
|
|
85
|
+
const frames = mapper.mapUpdate({
|
|
86
|
+
sessionUpdate: 'tool_call_update',
|
|
87
|
+
toolCallId: 'sh2',
|
|
88
|
+
kind: 'execute',
|
|
89
|
+
status: 'in_progress',
|
|
90
|
+
title: 'ls -la',
|
|
91
|
+
rawInput: { command: 'ls -la', cwd: '/tmp/x' },
|
|
92
|
+
});
|
|
93
|
+
expect(frames[0].type).toBe('message_update');
|
|
94
|
+
const blocks = contentOf(frames[0]);
|
|
95
|
+
expect(blocks[0]).toMatchObject({ type: 'toolCall', name: 'bash', arguments: { command: 'ls -la' } });
|
|
96
|
+
expect(frames.at(-1)).toMatchObject({ type: 'tool_execution_update' });
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
test('a patch with no rawInput does not re-emit the card', () => {
|
|
100
|
+
const mapper = new AcpFrameMapper();
|
|
101
|
+
mapper.mapUpdate({
|
|
102
|
+
sessionUpdate: 'tool_call',
|
|
103
|
+
toolCallId: 'sh3',
|
|
104
|
+
name: 'shell',
|
|
105
|
+
kind: 'execute',
|
|
106
|
+
status: 'pending',
|
|
107
|
+
rawInput: { command: 'ls' },
|
|
108
|
+
});
|
|
109
|
+
const frames = mapper.mapUpdate({
|
|
110
|
+
sessionUpdate: 'tool_call_update',
|
|
111
|
+
toolCallId: 'sh3',
|
|
112
|
+
status: 'completed',
|
|
113
|
+
content: [{ type: 'text', text: 'done' }],
|
|
114
|
+
});
|
|
115
|
+
expect(frames.map((frame) => frame.type)).toEqual(['tool_execution_end']);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
test('an opencode edit turns metadata.files into the diff the panel draws', () => {
|
|
119
|
+
const mapper = new AcpFrameMapper();
|
|
120
|
+
mapper.mapUpdate({
|
|
121
|
+
sessionUpdate: 'tool_call',
|
|
122
|
+
toolCallId: 'ed1',
|
|
123
|
+
name: 'edit',
|
|
124
|
+
title: 'src/a.ts',
|
|
125
|
+
kind: 'edit',
|
|
126
|
+
status: 'pending',
|
|
127
|
+
rawInput: { path: 'src/a.ts', oldString: 'a', newString: 'b' },
|
|
128
|
+
});
|
|
129
|
+
const end = mapper.mapUpdate({
|
|
130
|
+
sessionUpdate: 'tool_call_update',
|
|
131
|
+
toolCallId: 'ed1',
|
|
132
|
+
status: 'completed',
|
|
133
|
+
rawOutput: {
|
|
134
|
+
metadata: { files: [{ file: 'src/a.ts', patch: '--- a/src/a.ts\n+++ b/src/a.ts\n-a\n+b' }] },
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
const details = end[0].details as { diff?: string; path?: string };
|
|
138
|
+
expect(details.path).toBe('src/a.ts');
|
|
139
|
+
expect(details.diff).toContain('+b');
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
test('a pi-acp shell result arrives only through _meta terminal channels', () => {
|
|
143
|
+
// pi-acp 0.x sends `content: [{type:"terminal"}]` on the call and the whole
|
|
144
|
+
// result in `_meta.terminal_output.data` / `_meta.terminal_exit.exit_code`,
|
|
145
|
+
// because it expects the client to own a terminal. Kabmo advertises none,
|
|
146
|
+
// so without folding `_meta` the card had a title and an empty body.
|
|
147
|
+
const mapper = new AcpFrameMapper();
|
|
148
|
+
mapper.mapUpdate({
|
|
149
|
+
sessionUpdate: 'tool_call',
|
|
150
|
+
toolCallId: 'pi1',
|
|
151
|
+
title: 'bun test',
|
|
152
|
+
kind: 'execute',
|
|
153
|
+
status: 'completed',
|
|
154
|
+
content: [{ type: 'terminal', terminalId: 'pi1' }],
|
|
155
|
+
_meta: { terminal_info: { terminal_id: 'pi1', cwd: '/tmp/x' } },
|
|
156
|
+
});
|
|
157
|
+
const end = mapper.mapUpdate({
|
|
158
|
+
sessionUpdate: 'tool_call_update',
|
|
159
|
+
toolCallId: 'pi1',
|
|
160
|
+
status: 'completed',
|
|
161
|
+
content: null,
|
|
162
|
+
_meta: {
|
|
163
|
+
terminal_output: { terminal_id: 'pi1', data: '12 pass' },
|
|
164
|
+
terminal_exit: { terminal_id: 'pi1', exit_code: 1, signal: null },
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
expect(end[0]).toMatchObject({
|
|
168
|
+
type: 'tool_execution_end',
|
|
169
|
+
output: '12 pass',
|
|
170
|
+
details: { exitCode: 1 },
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
test('a pi-acp shell call takes its command from the title', () => {
|
|
175
|
+
// pi sends `rawInput: null` for every tool; a shell call's only statement
|
|
176
|
+
// of what ran is its title.
|
|
177
|
+
const mapper = new AcpFrameMapper();
|
|
178
|
+
const frames = mapper.mapUpdate({
|
|
179
|
+
sessionUpdate: 'tool_call',
|
|
180
|
+
toolCallId: 'pi2',
|
|
181
|
+
title: 'bun test src/a.test.ts',
|
|
182
|
+
kind: 'execute',
|
|
183
|
+
status: 'in_progress',
|
|
184
|
+
});
|
|
185
|
+
expect(frames.find((frame) => frame.type === 'tool_execution_start')).toMatchObject({
|
|
186
|
+
toolName: 'bash',
|
|
187
|
+
args: { command: 'bun test src/a.test.ts' },
|
|
188
|
+
});
|
|
189
|
+
expect(contentOf(frames[0])[0]).toMatchObject({
|
|
190
|
+
name: 'bash',
|
|
191
|
+
arguments: { command: 'bun test src/a.test.ts' },
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
test('a nameless call is named by its kind, so the panel still opens', () => {
|
|
196
|
+
// Measured codex-acp: a file change arrives with `title: "Editing files"`,
|
|
197
|
+
// `kind: "edit"` and NO name. The card had no identity, so the renderer
|
|
198
|
+
// fell back to the generic Input/Output body over a call that carried a
|
|
199
|
+
// full diff.
|
|
200
|
+
const mapper = new AcpFrameMapper();
|
|
201
|
+
const frames = mapper.mapUpdate({
|
|
202
|
+
sessionUpdate: 'tool_call',
|
|
203
|
+
toolCallId: 'cx1',
|
|
204
|
+
title: 'Editing files',
|
|
205
|
+
kind: 'edit',
|
|
206
|
+
status: 'pending',
|
|
207
|
+
locations: [{ path: 'src/a.ts' }],
|
|
208
|
+
content: [{ type: 'diff', path: 'src/a.ts', oldText: 'a\nb', newText: 'a\nc' }],
|
|
209
|
+
});
|
|
210
|
+
expect(frames.find((frame) => frame.type === 'tool_execution_start')).toMatchObject({
|
|
211
|
+
toolName: 'edit',
|
|
212
|
+
toolType: 'edit',
|
|
213
|
+
});
|
|
214
|
+
const call = toToolCallData(
|
|
215
|
+
parseMessageBlocks(contentOf(frames[0])).toolCalls[0],
|
|
216
|
+
{ streaming: true },
|
|
217
|
+
);
|
|
218
|
+
expect(toolPanelKind(call)).toBe('edit');
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
test('kind `think` is a reasoning type, and its own name decides the panel', () => {
|
|
222
|
+
const mapper = new AcpFrameMapper();
|
|
223
|
+
const frames = mapper.mapUpdate({
|
|
224
|
+
sessionUpdate: 'tool_call',
|
|
225
|
+
toolCallId: 'th1',
|
|
226
|
+
name: 'reasoning',
|
|
227
|
+
title: 'reasoning',
|
|
228
|
+
kind: 'think',
|
|
229
|
+
status: 'pending',
|
|
230
|
+
rawInput: { thought: 'hmm' },
|
|
231
|
+
});
|
|
232
|
+
expect(frames.find((frame) => frame.type === 'tool_execution_start')).toMatchObject({
|
|
233
|
+
toolName: 'reasoning',
|
|
234
|
+
toolType: 'think',
|
|
235
|
+
});
|
|
236
|
+
expect(contentOf(frames[0])[0]).toMatchObject({ name: 'reasoning', toolType: 'think' });
|
|
237
|
+
});
|
|
238
|
+
});
|
|
@@ -75,6 +75,27 @@ describe('acp v2 updates', () => {
|
|
|
75
75
|
expect(cancelled[0]).toMatchObject({ type: 'tool_execution_end', isError: true });
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
+
test('a whole message after a card draws only the text not drawn yet', () => {
|
|
79
|
+
// v2 upserts send the message's WHOLE content; a split moved the earlier
|
|
80
|
+
// text into a closed row, so the rest must not be repeated.
|
|
81
|
+
const mapper = new AcpFrameMapper();
|
|
82
|
+
mapper.mapUpdate({ sessionUpdate: 'agent_message', messageId: 'm1', content: [{ type: 'text', text: 'one' }] });
|
|
83
|
+
mapper.mapUpdate({
|
|
84
|
+
sessionUpdate: 'tool_call',
|
|
85
|
+
toolCallId: 't1',
|
|
86
|
+
name: 'bash',
|
|
87
|
+
status: 'in_progress',
|
|
88
|
+
messageId: 'm1',
|
|
89
|
+
});
|
|
90
|
+
const frames = mapper.mapUpdate({
|
|
91
|
+
sessionUpdate: 'agent_message',
|
|
92
|
+
messageId: 'm1',
|
|
93
|
+
content: [{ type: 'text', text: 'onetwo' }],
|
|
94
|
+
});
|
|
95
|
+
expect(frames.map((frame) => frame.type)).toEqual(['message_end', 'message_update']);
|
|
96
|
+
expect(frames[1]).toMatchObject({ message: { content: [{ type: 'text', text: 'two' }] } });
|
|
97
|
+
});
|
|
98
|
+
|
|
78
99
|
test('plan_update feeds the entries the Todos panel reads', () => {
|
|
79
100
|
const frames = new AcpFrameMapper().mapUpdate({
|
|
80
101
|
sessionUpdate: 'plan_update',
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* only `status` must not blank the card it completes;
|
|
13
13
|
* - `messageId` is the ONLY message delimiter (ACP has no `message_end`), so a
|
|
14
14
|
* changed id must close the previous row instead of appending into it; an
|
|
15
|
-
* ABSENT id (antigravity 1.5.3) must still yield one stable row per
|
|
15
|
+
* ABSENT id (antigravity 1.5.3) must still yield one stable row per run of
|
|
16
|
+
* content — and a NEW row where a card and prose meet, because the timeline
|
|
17
|
+
* draws a row's text above its cards;
|
|
16
18
|
* - `kind` must reach `ToolCallData.type`, because omp's `ToolType` is what the
|
|
17
19
|
* renderers switch on;
|
|
18
20
|
* - `usage_update` exists on some agents only, so its absence must emit
|
|
@@ -70,20 +72,6 @@ describe('acp frame mapper — assistant text', () => {
|
|
|
70
72
|
expect(messageIdOf(ended[0])).toBe(firstId);
|
|
71
73
|
});
|
|
72
74
|
|
|
73
|
-
test('a tool call before the first chunk keeps that identity too', () => {
|
|
74
|
-
const mapper = new AcpFrameMapper();
|
|
75
|
-
const opened = mapper.mapUpdate({
|
|
76
|
-
sessionUpdate: 'tool_call',
|
|
77
|
-
toolCallId: 't1',
|
|
78
|
-
title: 'Read',
|
|
79
|
-
status: 'in_progress',
|
|
80
|
-
});
|
|
81
|
-
const chunk = mapper.mapUpdate(anonymousChunk('done'));
|
|
82
|
-
const openedId = messageIdOf(opened[0]);
|
|
83
|
-
expect(typeof openedId).toBe('string');
|
|
84
|
-
expect(messageIdOf(chunk[0])).toBe(openedId);
|
|
85
|
-
});
|
|
86
|
-
|
|
87
75
|
test('a new turn gets a fresh identity when the agent sends no id', () => {
|
|
88
76
|
const mapper = new AcpFrameMapper();
|
|
89
77
|
const first = mapper.mapUpdate(anonymousChunk('one'));
|