@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,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The SHAPES one ACP tool call is reported in, split from the accumulator that
|
|
8
|
+
* sequences them.
|
|
9
|
+
*
|
|
10
|
+
* `tool-calls.ts` owns the lifecycle (create on first sight, patch afterwards,
|
|
11
|
+
* close on a final status). What is here is the per-frame translation, because
|
|
12
|
+
* each function exists for a measured adapter quirk rather than for the
|
|
13
|
+
* lifecycle:
|
|
14
|
+
*
|
|
15
|
+
* - `toolArgs` — `rawInput` is a bare object, but the field is `unknown`;
|
|
16
|
+
* - `blockOf` — the card the timeline renders, built from accumulated fields
|
|
17
|
+
* so a patch can replace it in place;
|
|
18
|
+
* - `terminalMeta` — pi-acp reports a shell result ONLY as
|
|
19
|
+
* `_meta.terminal_output.data` + `_meta.terminal_exit.exit_code`;
|
|
20
|
+
* - `KIND_TOOL_NAME` — codex-acp's file change arrives with no name at all.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { isRecord } from '@/shared/lib/util/guards';
|
|
24
|
+
import type { AcpToolKind } from '@/server/lib/harness/acp/protocol';
|
|
25
|
+
|
|
26
|
+
/** The message block a tool card renders from. */
|
|
27
|
+
export interface ToolCallBlock {
|
|
28
|
+
type: 'toolCall';
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
arguments?: Record<string, unknown>;
|
|
32
|
+
toolKind?: AcpToolKind;
|
|
33
|
+
toolType?: string;
|
|
34
|
+
/** The adapter's own kind, when it is not one of the spec's ten. */
|
|
35
|
+
rawKind?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** The tool name a call takes when the adapter sent none but DID send a kind.
|
|
39
|
+
* `other`/`switch_mode` are absent on purpose: they name no operation, and a
|
|
40
|
+
* plan-mode toggle must not be drawn as a todo list. */
|
|
41
|
+
export const KIND_TOOL_NAME: Partial<Record<AcpToolKind, string>> = {
|
|
42
|
+
read: 'read',
|
|
43
|
+
edit: 'edit',
|
|
44
|
+
delete: 'edit',
|
|
45
|
+
move: 'edit',
|
|
46
|
+
search: 'grep',
|
|
47
|
+
execute: 'bash',
|
|
48
|
+
fetch: 'web_search',
|
|
49
|
+
think: 'think',
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** The object form of `rawInput`, or undefined for an absent/non-object one. */
|
|
53
|
+
export function toolArgs(rawInput: unknown): Record<string, unknown> | undefined {
|
|
54
|
+
return isRecord(rawInput) ? Object.fromEntries(Object.entries(rawInput)) : undefined;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The command facts an adapter sends in `_meta` instead of the result.
|
|
59
|
+
*
|
|
60
|
+
* `pi-acp` reports a shell result ONLY this way: its `tool_call` carries
|
|
61
|
+
* `_meta.terminal_info` and a `{type:"terminal"}` content block, and its
|
|
62
|
+
* `tool_call_update` carries `_meta.terminal_output.data` plus
|
|
63
|
+
* `_meta.terminal_exit.exit_code` — no text content at all, because it expects
|
|
64
|
+
* the client to own a terminal. Kabmo advertises no terminal, so without this
|
|
65
|
+
* the card had a title and an empty body.
|
|
66
|
+
*/
|
|
67
|
+
export function terminalMeta(meta: unknown): { output?: string; exitCode?: number } {
|
|
68
|
+
if (!isRecord(meta)) return {};
|
|
69
|
+
const output = isRecord(meta.terminal_output) && typeof meta.terminal_output.data === 'string'
|
|
70
|
+
? meta.terminal_output.data
|
|
71
|
+
: undefined;
|
|
72
|
+
const exit = isRecord(meta.terminal_exit) && typeof meta.terminal_exit.exit_code === 'number'
|
|
73
|
+
? meta.terminal_exit.exit_code
|
|
74
|
+
: undefined;
|
|
75
|
+
return {
|
|
76
|
+
...(output ? { output } : {}),
|
|
77
|
+
...(exit !== undefined ? { exitCode: exit } : {}),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** The message block a card draws from the call's accumulated fields. */
|
|
82
|
+
export function blockOf(call: {
|
|
83
|
+
id: string;
|
|
84
|
+
name: string;
|
|
85
|
+
kind?: AcpToolKind;
|
|
86
|
+
args?: Record<string, unknown>;
|
|
87
|
+
toolType?: string;
|
|
88
|
+
rawKind?: string;
|
|
89
|
+
}): ToolCallBlock {
|
|
90
|
+
return {
|
|
91
|
+
type: 'toolCall',
|
|
92
|
+
id: call.id,
|
|
93
|
+
name: call.name,
|
|
94
|
+
...(call.args ? { arguments: call.args } : {}),
|
|
95
|
+
...(call.kind ? { toolKind: call.kind } : {}),
|
|
96
|
+
...(call.rawKind ? { rawKind: call.rawKind } : {}),
|
|
97
|
+
...(call.toolType ? { toolType: call.toolType } : {}),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
@@ -52,6 +52,8 @@ export interface AcpTurnSeams {
|
|
|
52
52
|
resetMapper: () => void;
|
|
53
53
|
/** Flush the message the turn left open. */
|
|
54
54
|
closeMessage: () => AgentEvent[];
|
|
55
|
+
/** The turn's blocks as ONE message, after `closeMessage` (rows are split). */
|
|
56
|
+
turnMessage: () => Record<string, unknown> | null;
|
|
55
57
|
/** Tool calls the turn abandoned, by id. */
|
|
56
58
|
openCalls: () => string[];
|
|
57
59
|
/**
|
|
@@ -310,7 +312,8 @@ export class AcpTurns {
|
|
|
310
312
|
this.#silence.stop();
|
|
311
313
|
const flushed = this.seams.closeMessage();
|
|
312
314
|
for (const event of flushed) this.seams.emit(event);
|
|
313
|
-
|
|
315
|
+
// The whole turn: rows are split, and the probe reads its tool calls.
|
|
316
|
+
const closed = this.seams.turnMessage() ?? flushed.find((event) => event.type === 'message_end')?.message;
|
|
314
317
|
const abandoned = this.seams.openCalls();
|
|
315
318
|
for (const toolCallId of abandoned) {
|
|
316
319
|
this.seams.emit({ type: 'tool_execution_end', toolCallId, isError: true, result: { output: 'Cancelled' } });
|
|
@@ -45,7 +45,10 @@ describe('normalizeInitializeResult', () => {
|
|
|
45
45
|
expect(init.agentInfo).toEqual({ name: 'agent', title: 'Agent', version: '2.0.0' });
|
|
46
46
|
expect(init.agentCapabilities).toMatchObject({
|
|
47
47
|
loadSession: false,
|
|
48
|
-
|
|
48
|
+
// `embeddedContext` is present only when the agent said something about
|
|
49
|
+
// it: an absent v2 field is not a refusal, and the prompt builder
|
|
50
|
+
// downgrades `resource_link` blocks only on an explicit `false`.
|
|
51
|
+
promptCapabilities: { image: true, audio: false },
|
|
49
52
|
mcpCapabilities: { http: true, sse: false },
|
|
50
53
|
sessionCapabilities: {
|
|
51
54
|
list: {},
|
|
@@ -59,6 +62,23 @@ describe('normalizeInitializeResult', () => {
|
|
|
59
62
|
expect(init._meta).toMatchObject({ steering: { supported: true } });
|
|
60
63
|
});
|
|
61
64
|
|
|
65
|
+
test('a v2 prompt capability is a support marker, and absence is unknown', () => {
|
|
66
|
+
const supported = normalizeInitializeResult({
|
|
67
|
+
protocolVersion: 2,
|
|
68
|
+
info: { name: 'x', version: '1' },
|
|
69
|
+
capabilities: { session: { prompt: { embeddedContext: {} } } },
|
|
70
|
+
});
|
|
71
|
+
expect(supported.agentCapabilities?.promptCapabilities?.embeddedContext).toBe(true);
|
|
72
|
+
const silent = normalizeInitializeResult({
|
|
73
|
+
protocolVersion: 2,
|
|
74
|
+
info: { name: 'x', version: '1' },
|
|
75
|
+
capabilities: { session: { prompt: {} } },
|
|
76
|
+
});
|
|
77
|
+
// Not `false`: v2 has no way to say "refused", and reading absence as a
|
|
78
|
+
// refusal would strip `resource_link` blocks from agents that accept them.
|
|
79
|
+
expect(silent.agentCapabilities?.promptCapabilities?.embeddedContext).toBeUndefined();
|
|
80
|
+
});
|
|
81
|
+
|
|
62
82
|
test('an agent without capabilities.session claims no session methods', () => {
|
|
63
83
|
const init = normalizeInitializeResult({ protocolVersion: 2, info: { name: 'x', version: '1' }, capabilities: {} });
|
|
64
84
|
expect(init.agentCapabilities?.sessionCapabilities).toEqual({});
|
|
@@ -96,10 +96,15 @@ export function normalizeInitializeResult(raw: Record<string, unknown>): AcpInit
|
|
|
96
96
|
: {}),
|
|
97
97
|
agentCapabilities: {
|
|
98
98
|
loadSession: false,
|
|
99
|
+
// Only a PRESENT v2 field is a verdict. Writing `false` for an absent
|
|
100
|
+
// one would make "the agent never mentioned embedded context" look like
|
|
101
|
+
// an explicit refusal, and the prompt builder downgrades on a refusal.
|
|
99
102
|
promptCapabilities: {
|
|
100
103
|
image: advertised(prompt?.image),
|
|
101
104
|
audio: advertised(prompt?.audio),
|
|
102
|
-
embeddedContext
|
|
105
|
+
...(prompt && 'embeddedContext' in prompt
|
|
106
|
+
? { embeddedContext: advertised(prompt.embeddedContext) }
|
|
107
|
+
: {}),
|
|
103
108
|
},
|
|
104
109
|
mcpCapabilities: { http: advertised(mcp?.http), sse: false },
|
|
105
110
|
sessionCapabilities,
|
|
@@ -37,8 +37,8 @@ import type { HarnessProbe } from '@/server/lib/harness/capabilities';
|
|
|
37
37
|
import {
|
|
38
38
|
launchFromConfig,
|
|
39
39
|
loadHarnessConfig,
|
|
40
|
-
resolveLaunch,
|
|
41
40
|
} from '@/server/lib/harness/config.server';
|
|
41
|
+
import { resolveAccountLaunch } from '@/server/lib/harness/accounts.server';
|
|
42
42
|
import type { HarnessConfig } from '@/shared/lib/harness/config';
|
|
43
43
|
import { loadDisabledHarnesses } from '@/server/lib/harness/enabled.server';
|
|
44
44
|
import { blockedProbe, probeHarness } from '@/server/lib/harness/launch';
|
|
@@ -97,7 +97,7 @@ export function commandAvailable(id: HarnessId, config?: HarnessConfig): boolean
|
|
|
97
97
|
export async function probeWithConfig(id: HarnessId, cwd: string): Promise<HarnessProbe> {
|
|
98
98
|
try {
|
|
99
99
|
const configured = await loadHarnessConfig(id);
|
|
100
|
-
return await probeHarness(id, cwd,
|
|
100
|
+
return await probeHarness(id, cwd, await resolveAccountLaunch(id, configured));
|
|
101
101
|
} catch (cause) {
|
|
102
102
|
return blockedProbe(id, cause instanceof Error ? cause.message : String(cause));
|
|
103
103
|
}
|
|
@@ -21,8 +21,13 @@ import type { HarnessId } from '@/shared/lib/harness/catalog';
|
|
|
21
21
|
export interface HarnessLaunch {
|
|
22
22
|
id: HarnessId;
|
|
23
23
|
command: string[];
|
|
24
|
-
/** Extra env the adapter needs (a wrapper path, a log dir,
|
|
24
|
+
/** Extra env the adapter needs (a wrapper path, a log dir, ...). */
|
|
25
25
|
env?: Record<string, string>;
|
|
26
|
+
/**
|
|
27
|
+
* Ambient variables removed before `env` is applied. Saved accounts use this
|
|
28
|
+
* so a host `ANTHROPIC_API_KEY` cannot authenticate the wrong login.
|
|
29
|
+
*/
|
|
30
|
+
stripEnv?: readonly string[];
|
|
26
31
|
/**
|
|
27
32
|
* A binary the launch line SPAWNS but does not exec itself. The `zcode`
|
|
28
33
|
* bridge starts `zcode app-server --stdio`, so `npx` being present says
|
|
@@ -165,6 +165,7 @@ export async function probeHarness(
|
|
|
165
165
|
command: launch.command,
|
|
166
166
|
cwd,
|
|
167
167
|
...(env ? { env } : {}),
|
|
168
|
+
...(launch.stripEnv ? { envDrop: launch.stripEnv } : {}),
|
|
168
169
|
onStderr: (line) => {
|
|
169
170
|
stderrTail = `${stderrTail}${line}\n`.slice(-2_000);
|
|
170
171
|
},
|
|
@@ -32,6 +32,9 @@ const HARNESS_SESSIONS_SQL = `
|
|
|
32
32
|
-- Kabmo's own (omp generates it and both sides use it).
|
|
33
33
|
agent_session_id TEXT NOT NULL DEFAULT '',
|
|
34
34
|
cwd TEXT NOT NULL DEFAULT '',
|
|
35
|
+
-- The saved account whose home spawned this chat. Empty means the host
|
|
36
|
+
-- login, which is what every row written before accounts existed means.
|
|
37
|
+
account_id TEXT NOT NULL DEFAULT '',
|
|
35
38
|
-- What the chat is CALLED. An ACP agent writes no session file, so omp's
|
|
36
39
|
-- JSONL discovery — the thing that names every omp row — has nothing to
|
|
37
40
|
-- read, and every recorded chat drew "Untitled" forever while the user's own
|
|
@@ -60,8 +63,40 @@ const HARNESS_SESSIONS_SQL = `
|
|
|
60
63
|
const HARNESS_SESSIONS_MIGRATIONS = [
|
|
61
64
|
`ALTER TABLE harness_sessions ADD COLUMN title TEXT NOT NULL DEFAULT '';`,
|
|
62
65
|
`ALTER TABLE harness_sessions ADD COLUMN origin TEXT NOT NULL DEFAULT '';`,
|
|
66
|
+
`ALTER TABLE harness_sessions ADD COLUMN account_id TEXT NOT NULL DEFAULT '';`,
|
|
63
67
|
];
|
|
64
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Saved CLI homes for Codex, Claude and Antigravity.
|
|
71
|
+
*
|
|
72
|
+
* A row is a pointer, never a credential: the token stays in the CLI's own file
|
|
73
|
+
* under `home_path`. `identity` is the display copy read from that token, and
|
|
74
|
+
* `verified_at` says when Kabmo last confirmed it, not when it will stay valid.
|
|
75
|
+
*/
|
|
76
|
+
const HARNESS_ACCOUNTS_SQL = `
|
|
77
|
+
CREATE TABLE IF NOT EXISTS harness_accounts (
|
|
78
|
+
id TEXT PRIMARY KEY,
|
|
79
|
+
harness TEXT NOT NULL,
|
|
80
|
+
label TEXT NOT NULL,
|
|
81
|
+
home_path TEXT NOT NULL,
|
|
82
|
+
identity TEXT NOT NULL DEFAULT '{}',
|
|
83
|
+
auth_kind TEXT NOT NULL DEFAULT 'unknown',
|
|
84
|
+
created_at INTEGER NOT NULL,
|
|
85
|
+
updated_at INTEGER NOT NULL,
|
|
86
|
+
verified_at INTEGER NOT NULL DEFAULT 0
|
|
87
|
+
);
|
|
88
|
+
CREATE INDEX IF NOT EXISTS idx_harness_accounts_harness
|
|
89
|
+
ON harness_accounts (harness);
|
|
90
|
+
`;
|
|
91
|
+
|
|
92
|
+
/** One active account per harness. An absent row means the host login. */
|
|
93
|
+
const HARNESS_ACCOUNT_SELECTION_SQL = `
|
|
94
|
+
CREATE TABLE IF NOT EXISTS harness_account_selection (
|
|
95
|
+
harness TEXT PRIMARY KEY,
|
|
96
|
+
account_id TEXT NOT NULL
|
|
97
|
+
);
|
|
98
|
+
`;
|
|
99
|
+
|
|
65
100
|
/**
|
|
66
101
|
* What each agent reported, persisted.
|
|
67
102
|
*
|
|
@@ -183,6 +218,8 @@ const ACP_FRAMES_SQL = `
|
|
|
183
218
|
/** Idempotent: created on every database open, like every other feature table. */
|
|
184
219
|
export async function ensureHarnessSchema(db: DbClient): Promise<void> {
|
|
185
220
|
await db.exec(HARNESS_SESSIONS_SQL);
|
|
221
|
+
await db.exec(HARNESS_ACCOUNTS_SQL);
|
|
222
|
+
await db.exec(HARNESS_ACCOUNT_SELECTION_SQL);
|
|
186
223
|
await db.exec(CUSTOM_HARNESSES_SQL);
|
|
187
224
|
await db.exec(HARNESS_PROBES_SQL);
|
|
188
225
|
await db.exec(HARNESS_GOAL_STATE_SQL);
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
import fs from 'node:fs';
|
|
35
35
|
import { AcpProcess } from '@/server/lib/harness/acp/client';
|
|
36
36
|
import { withGatewayCompatibility } from '@/server/lib/harness/acp/gateway-env';
|
|
37
|
-
import { loadHarnessConfig
|
|
37
|
+
import { loadHarnessConfig } from '@/server/lib/harness/config.server';
|
|
38
|
+
import { resolveAccountLaunch } from '@/server/lib/harness/accounts.server';
|
|
38
39
|
import { customHarness, ensureCustomHarnesses } from '@/server/lib/harness/custom.server';
|
|
39
40
|
import { isSinglePathSegment } from '@/server/lib/fs/path-segment';
|
|
40
41
|
import { dshStoreDirs } from '@/server/lib/harness/session-transcript.server';
|
|
@@ -81,7 +82,7 @@ async function localStoreDirs(harness: HarnessId, agentSessionId: string): Promi
|
|
|
81
82
|
|
|
82
83
|
async function defaultLaunch(harness: HarnessId): Promise<HarnessLaunch> {
|
|
83
84
|
await ensureCustomHarnesses();
|
|
84
|
-
return
|
|
85
|
+
return resolveAccountLaunch(harness, await loadHarnessConfig(harness));
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
interface Connection {
|
|
@@ -112,6 +113,7 @@ export function createAgentSessionRemover(deps: AgentSessionRemoverDeps = {}): A
|
|
|
112
113
|
onNotification: () => {},
|
|
113
114
|
onStderr: () => {},
|
|
114
115
|
...(env ? { env } : {}),
|
|
116
|
+
...(launch.stripEnv ? { envDrop: launch.stripEnv } : {}),
|
|
115
117
|
});
|
|
116
118
|
try {
|
|
117
119
|
const init = await proc.initialize(undefined, 60_000);
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
import { AcpProcess } from '@/server/lib/harness/acp/client';
|
|
31
31
|
import { listAllSessions } from '@/server/lib/harness/acp/verbs';
|
|
32
32
|
import { withGatewayCompatibility } from '@/server/lib/harness/acp/gateway-env';
|
|
33
|
-
import { loadHarnessConfig
|
|
33
|
+
import { loadHarnessConfig } from '@/server/lib/harness/config.server';
|
|
34
|
+
import { resolveAccountLaunch } from '@/server/lib/harness/accounts.server';
|
|
34
35
|
import { ensureCustomHarnesses } from '@/server/lib/harness/custom.server';
|
|
35
36
|
import { harnessSessionKnown, importHarnessSession } from '@/server/lib/harness/session-store.server';
|
|
36
37
|
import { sessionsWithoutTranscript } from '@/server/lib/harness/session-transcript.server';
|
|
@@ -44,7 +45,11 @@ import type { AcpSessionInfo } from '@/server/lib/harness/acp/protocol';
|
|
|
44
45
|
import type { HarnessSessionImport } from '@/shared/types/harness';
|
|
45
46
|
|
|
46
47
|
/** One fresh process' worth of listing, disposed whatever happens. */
|
|
47
|
-
async function listOnce(
|
|
48
|
+
async function listOnce(
|
|
49
|
+
command: string[],
|
|
50
|
+
env?: Record<string, string>,
|
|
51
|
+
envDrop?: readonly string[],
|
|
52
|
+
): Promise<AcpSessionInfo[]> {
|
|
48
53
|
let tail = '';
|
|
49
54
|
const proc = new AcpProcess({
|
|
50
55
|
command,
|
|
@@ -54,6 +59,7 @@ async function listOnce(command: string[], env?: Record<string, string>): Promis
|
|
|
54
59
|
// which names nothing a reader can act on.
|
|
55
60
|
onStderr: (line) => { tail = `${tail}${line}\n`.slice(-2_000); },
|
|
56
61
|
...(env ? { env } : {}),
|
|
62
|
+
...(envDrop ? { envDrop } : {}),
|
|
57
63
|
});
|
|
58
64
|
try {
|
|
59
65
|
await proc.initialize(undefined, 60_000);
|
|
@@ -69,14 +75,18 @@ async function listOnce(command: string[], env?: Record<string, string>): Promis
|
|
|
69
75
|
|
|
70
76
|
/** The agent's own session list, with the one retry the transport's shutdown
|
|
71
77
|
* race needs. A real refusal (auth, launch) is never retried. */
|
|
72
|
-
async function listSessions(
|
|
78
|
+
async function listSessions(
|
|
79
|
+
command: string[],
|
|
80
|
+
env?: Record<string, string>,
|
|
81
|
+
envDrop?: readonly string[],
|
|
82
|
+
): Promise<AcpSessionInfo[]> {
|
|
73
83
|
try {
|
|
74
|
-
return await listOnce(command, env);
|
|
84
|
+
return await listOnce(command, env, envDrop);
|
|
75
85
|
} catch (cause) {
|
|
76
86
|
const message = cause instanceof Error ? cause.message : String(cause);
|
|
77
87
|
if (!/exited \(code 0\)|has exited/i.test(message)) throw cause;
|
|
78
88
|
await new Promise((resolve) => setTimeout(resolve, 250));
|
|
79
|
-
return await listOnce(command, env);
|
|
89
|
+
return await listOnce(command, env, envDrop);
|
|
80
90
|
}
|
|
81
91
|
}
|
|
82
92
|
|
|
@@ -110,11 +120,15 @@ export async function importHarnessSessions(id: HarnessId): Promise<HarnessSessi
|
|
|
110
120
|
const configured = await loadHarnessConfig(id);
|
|
111
121
|
let launch;
|
|
112
122
|
try {
|
|
113
|
-
launch =
|
|
123
|
+
launch = await resolveAccountLaunch(id, configured);
|
|
114
124
|
} catch (cause) {
|
|
115
125
|
throw new Error(cause instanceof Error ? cause.message : String(cause));
|
|
116
126
|
}
|
|
117
|
-
const sessions = await listSessions(
|
|
127
|
+
const sessions = await listSessions(
|
|
128
|
+
launch.command,
|
|
129
|
+
withGatewayCompatibility(id, launch.env),
|
|
130
|
+
launch.stripEnv,
|
|
131
|
+
);
|
|
118
132
|
const roots = await workspaceRoots();
|
|
119
133
|
// A session the agent created and never used has no transcript in its own
|
|
120
134
|
// store. Importing it would draw a sidebar row that opens an empty chat, so
|
|
@@ -63,6 +63,17 @@ describe('harness session store', () => {
|
|
|
63
63
|
expect(one?.cwd).toBe('/tmp/project');
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
+
test('a saved account is stored with the session it spawned', async () => {
|
|
67
|
+
await saveHarnessSession({
|
|
68
|
+
sessionId: 'sess-account',
|
|
69
|
+
harness: 'codex',
|
|
70
|
+
agentSessionId: 'agent-9',
|
|
71
|
+
cwd: '/tmp/project',
|
|
72
|
+
accountId: 'account-1',
|
|
73
|
+
});
|
|
74
|
+
expect((await loadHarnessSession('sess-account'))?.accountId).toBe('account-1');
|
|
75
|
+
});
|
|
76
|
+
|
|
66
77
|
test('a re-spawn UPDATES the row instead of failing on the primary key', async () => {
|
|
67
78
|
await saveHarnessSession({ sessionId: 'sess-1', harness: 'claude', agentSessionId: '', cwd: '/a' });
|
|
68
79
|
await saveHarnessSession({ sessionId: 'sess-1', harness: 'codex', agentSessionId: 'x', cwd: '/b' });
|
|
@@ -194,6 +205,7 @@ describe('session import rows', () => {
|
|
|
194
205
|
harness: 'codex',
|
|
195
206
|
agentSessionId: '',
|
|
196
207
|
cwd: '/work/app',
|
|
208
|
+
accountId: '',
|
|
197
209
|
origin: 'imported',
|
|
198
210
|
});
|
|
199
211
|
const rows = await loadAcpSessions();
|
|
@@ -25,6 +25,8 @@ export interface HarnessSessionRecord {
|
|
|
25
25
|
/** The id the AGENT reported, when it differs from Kabmo's. */
|
|
26
26
|
agentSessionId: string;
|
|
27
27
|
cwd: string;
|
|
28
|
+
/** The saved account whose home spawned this chat; '' for the host login. */
|
|
29
|
+
accountId?: string;
|
|
28
30
|
/** '' for a chat Kabmo spawned; 'imported' for one copied from the agent's
|
|
29
31
|
* own history. Optional on INPUT (a spawn writes no marker). */
|
|
30
32
|
origin?: string;
|
|
@@ -36,14 +38,15 @@ export async function saveHarnessSession(record: HarnessSessionRecord): Promise<
|
|
|
36
38
|
const now = Date.now();
|
|
37
39
|
const db = await getDb();
|
|
38
40
|
await db.run(
|
|
39
|
-
`INSERT INTO harness_sessions (session_id, harness, agent_session_id, cwd, created_at, updated_at)
|
|
40
|
-
VALUES (?, ?, ?, ?, ?, ?)
|
|
41
|
+
`INSERT INTO harness_sessions (session_id, harness, agent_session_id, cwd, account_id, created_at, updated_at)
|
|
42
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
41
43
|
ON CONFLICT(session_id) DO UPDATE SET
|
|
42
44
|
harness = excluded.harness,
|
|
43
45
|
agent_session_id = excluded.agent_session_id,
|
|
44
46
|
cwd = excluded.cwd,
|
|
47
|
+
account_id = excluded.account_id,
|
|
45
48
|
updated_at = excluded.updated_at`,
|
|
46
|
-
[record.sessionId, record.harness, record.agentSessionId, record.cwd, now, now],
|
|
49
|
+
[record.sessionId, record.harness, record.agentSessionId, record.cwd, record.accountId ?? '', now, now],
|
|
47
50
|
);
|
|
48
51
|
}
|
|
49
52
|
|
|
@@ -173,6 +176,8 @@ export interface HarnessSessionRow {
|
|
|
173
176
|
cwd: string;
|
|
174
177
|
/** See {@link HarnessSessionRecord.origin}. */
|
|
175
178
|
origin: string;
|
|
179
|
+
/** See {@link HarnessSessionRecord.accountId}. */
|
|
180
|
+
accountId: string;
|
|
176
181
|
/** What the chat is called: the agent's own title, else the first prompt.
|
|
177
182
|
* Empty when neither exists yet. */
|
|
178
183
|
title: string;
|
|
@@ -201,7 +206,7 @@ export interface HarnessSessionRow {
|
|
|
201
206
|
export async function loadAcpSessions(): Promise<HarnessSessionRow[]> {
|
|
202
207
|
const db = await getDb();
|
|
203
208
|
const rows = (await db.all(
|
|
204
|
-
`SELECT session_id, harness, agent_session_id, cwd, title, origin, created_at, updated_at
|
|
209
|
+
`SELECT session_id, harness, agent_session_id, cwd, account_id, title, origin, created_at, updated_at
|
|
205
210
|
FROM harness_sessions
|
|
206
211
|
WHERE harness <> 'omp-rpc'
|
|
207
212
|
ORDER BY updated_at DESC`,
|
|
@@ -210,6 +215,7 @@ export async function loadAcpSessions(): Promise<HarnessSessionRow[]> {
|
|
|
210
215
|
harness: string;
|
|
211
216
|
agent_session_id: string;
|
|
212
217
|
cwd: string;
|
|
218
|
+
account_id: string | null;
|
|
213
219
|
title: string | null;
|
|
214
220
|
origin: string | null;
|
|
215
221
|
created_at: number;
|
|
@@ -220,6 +226,7 @@ export async function loadAcpSessions(): Promise<HarnessSessionRow[]> {
|
|
|
220
226
|
harness: row.harness,
|
|
221
227
|
agentSessionId: row.agent_session_id,
|
|
222
228
|
cwd: row.cwd,
|
|
229
|
+
accountId: row.account_id ?? '',
|
|
223
230
|
title: row.title ?? '',
|
|
224
231
|
origin: row.origin ?? '',
|
|
225
232
|
createdAt: row.created_at,
|
|
@@ -261,15 +268,23 @@ export async function loadHarnessSessionTitle(sessionId: string): Promise<string
|
|
|
261
268
|
export async function loadHarnessSession(sessionId: string): Promise<HarnessSessionRecord | null> {
|
|
262
269
|
const db = await getDb();
|
|
263
270
|
const row = (await db.get(
|
|
264
|
-
'SELECT session_id, harness, agent_session_id, cwd, origin FROM harness_sessions WHERE session_id = ?',
|
|
271
|
+
'SELECT session_id, harness, agent_session_id, cwd, account_id, origin FROM harness_sessions WHERE session_id = ?',
|
|
265
272
|
[sessionId],
|
|
266
|
-
)) as {
|
|
273
|
+
)) as {
|
|
274
|
+
session_id: string;
|
|
275
|
+
harness: string;
|
|
276
|
+
agent_session_id: string;
|
|
277
|
+
cwd: string;
|
|
278
|
+
account_id: string | null;
|
|
279
|
+
origin: string | null;
|
|
280
|
+
} | null;
|
|
267
281
|
if (!row) return null;
|
|
268
282
|
return {
|
|
269
283
|
sessionId: row.session_id,
|
|
270
284
|
harness: row.harness,
|
|
271
285
|
agentSessionId: row.agent_session_id,
|
|
272
286
|
cwd: row.cwd,
|
|
287
|
+
accountId: row.account_id ?? '',
|
|
273
288
|
origin: row.origin ?? '',
|
|
274
289
|
};
|
|
275
290
|
}
|
|
@@ -29,6 +29,7 @@ import { Database } from 'bun:sqlite';
|
|
|
29
29
|
import fs from 'node:fs';
|
|
30
30
|
import { homedir } from 'node:os';
|
|
31
31
|
import { join } from 'node:path';
|
|
32
|
+
import { antigravityHome } from '@/server/lib/antigravity/home.server';
|
|
32
33
|
import { codexHome, findCodexRollout } from '@/server/lib/harness/codex/transcript.server';
|
|
33
34
|
import { isSinglePathSegment } from '@/server/lib/fs/path-segment';
|
|
34
35
|
|
|
@@ -231,7 +232,7 @@ async function zcodeTranscripts(ids: readonly string[]): Promise<Set<string> | n
|
|
|
231
232
|
* no `steps` row is a session that was opened and never used.
|
|
232
233
|
*/
|
|
233
234
|
async function antigravityTranscripts(ids: readonly string[]): Promise<Set<string> | null> {
|
|
234
|
-
const home =
|
|
235
|
+
const home = antigravityHome();
|
|
235
236
|
const roots = [
|
|
236
237
|
join(home, 'antigravity-cli', 'conversations'),
|
|
237
238
|
join(home, 'antigravity', 'conversations'),
|
|
@@ -25,7 +25,9 @@ import { AcpTranscriptRecorder } from '@/server/lib/harness/acp/session-transcri
|
|
|
25
25
|
import { AcpFrameRecorder } from '@/server/lib/harness/acp/acp-frames.server';
|
|
26
26
|
import { claimPrewarmedAcpSession } from '@/server/lib/harness/acp/prewarm.server';
|
|
27
27
|
import { rememberAgentToken } from '@/server/lib/sessions/agent-token.server';
|
|
28
|
-
import { loadHarnessConfig
|
|
28
|
+
import { loadHarnessConfig } from '@/server/lib/harness/config.server';
|
|
29
|
+
import { resolveAccountLaunch, selectedAccountId } from '@/server/lib/harness/accounts.server';
|
|
30
|
+
import { accountAdapter } from '@/shared/lib/harness/accounts';
|
|
29
31
|
import { sessionLaunchCommand } from '@/server/lib/harness/launch';
|
|
30
32
|
import { resolveDefaultModel, modelProvider } from '@/shared/lib/harness/config';
|
|
31
33
|
import { harnessProbeModels } from '@/server/lib/harness/probe-cache.server';
|
|
@@ -70,6 +72,11 @@ export interface AcpSpawnRequest {
|
|
|
70
72
|
replay?: boolean;
|
|
71
73
|
/** Extra environment for this child only (the agent token and server URL). */
|
|
72
74
|
env?: Record<string, string>;
|
|
75
|
+
/**
|
|
76
|
+
* Saved account to launch. Undefined selects the harness's active account;
|
|
77
|
+
* null means the host login, which is what a pre-account chat resumes on.
|
|
78
|
+
*/
|
|
79
|
+
accountId?: string | null;
|
|
73
80
|
/** A prewarmed (spawned + initialized) agent to adopt instead of spawning. */
|
|
74
81
|
process?: AcpProcess;
|
|
75
82
|
/**
|
|
@@ -114,7 +121,7 @@ async function resolvePicks(
|
|
|
114
121
|
|
|
115
122
|
export async function openAcpSession(
|
|
116
123
|
request: AcpSpawnRequest,
|
|
117
|
-
): Promise<{ session: AcpSession; realSessionId: string }> {
|
|
124
|
+
): Promise<{ session: AcpSession; realSessionId: string; accountId: string | null }> {
|
|
118
125
|
// The USER's launch line, merged over the build's table. A command override is
|
|
119
126
|
// the only way to start an agent installed outside PATH, and an env override is
|
|
120
127
|
// the only provider switch an ACP agent actually honours — Kabmo routes nothing
|
|
@@ -123,9 +130,14 @@ export async function openAcpSession(
|
|
|
123
130
|
// synchronous: load the registry before asking it for a launch line.
|
|
124
131
|
await ensureCustomHarnesses();
|
|
125
132
|
const configured = await loadHarnessConfig(request.harness);
|
|
133
|
+
const accountId = accountAdapter(request.harness)
|
|
134
|
+
? request.accountId === undefined
|
|
135
|
+
? await selectedAccountId(request.harness)
|
|
136
|
+
: request.accountId
|
|
137
|
+
: null;
|
|
126
138
|
let launch;
|
|
127
139
|
try {
|
|
128
|
-
launch =
|
|
140
|
+
launch = await resolveAccountLaunch(request.harness, configured, accountId);
|
|
129
141
|
} catch (cause) {
|
|
130
142
|
throw new HarnessNotLaunchableError(
|
|
131
143
|
request.harness,
|
|
@@ -161,6 +173,7 @@ export async function openAcpSession(
|
|
|
161
173
|
harness: request.harness,
|
|
162
174
|
command: sessionLaunchCommand(request.harness, launch.command),
|
|
163
175
|
...(Object.keys(childEnv).length > 0 ? { env: childEnv } : {}),
|
|
176
|
+
...(launch.stripEnv ? { envDrop: launch.stripEnv } : {}),
|
|
164
177
|
...(request.process ? { process: request.process } : {}),
|
|
165
178
|
model: picks.model,
|
|
166
179
|
thinkingLevel: picks.thinking,
|
|
@@ -212,7 +225,7 @@ export async function openAcpSession(
|
|
|
212
225
|
title,
|
|
213
226
|
});
|
|
214
227
|
}
|
|
215
|
-
return { session, realSessionId };
|
|
228
|
+
return { session, realSessionId, accountId };
|
|
216
229
|
}
|
|
217
230
|
|
|
218
231
|
/** The frames a restore replayed, and only from an ACP session. */
|
|
@@ -223,13 +236,20 @@ export function takeAcpReplayEvents(session: HarnessSession): AgentEvent[] {
|
|
|
223
236
|
export async function startAcpSession(
|
|
224
237
|
request: AcpSpawnRequest,
|
|
225
238
|
): Promise<{ session: HarnessSession; realSessionId: string; adopted: boolean }> {
|
|
239
|
+
const accountId = accountAdapter(request.harness)
|
|
240
|
+
? request.accountId === undefined
|
|
241
|
+
? await selectedAccountId(request.harness)
|
|
242
|
+
: request.accountId
|
|
243
|
+
: null;
|
|
226
244
|
const claimable = request.claimPrewarmed && !request.resumeAgentSessionId && !request.forkAgentSessionId;
|
|
227
245
|
// A warm agent skips the spawn AND the `initialize` handshake; `session/new`
|
|
228
246
|
// and the picks still run, in the same place a cold spawn runs them, so there
|
|
229
247
|
// is one definition of "the session a chat starts in".
|
|
230
|
-
const warm = claimable
|
|
248
|
+
const warm = claimable
|
|
249
|
+
? await claimPrewarmedAcpSession(request.harness, request.cwd, accountId ?? '')
|
|
250
|
+
: null;
|
|
231
251
|
const { session, realSessionId } = await openAcpSession(
|
|
232
|
-
warm ? { ...request, process: warm.process } : request,
|
|
252
|
+
warm ? { ...request, accountId, process: warm.process } : { ...request, accountId },
|
|
233
253
|
);
|
|
234
254
|
// The transcript this session writes for itself. A restore replays the
|
|
235
255
|
// agent's history and persists it itself, so it is the one session that must
|
|
@@ -273,6 +293,7 @@ export async function startAcpSession(
|
|
|
273
293
|
harness: request.harness,
|
|
274
294
|
agentSessionId: realSessionId === request.sessionId ? '' : realSessionId,
|
|
275
295
|
cwd: request.cwd,
|
|
296
|
+
accountId: accountId ?? '',
|
|
276
297
|
}).catch((cause: unknown) => {
|
|
277
298
|
console.error(`[harness] could not record ${request.harness} for session ${realSessionId}:`, cause);
|
|
278
299
|
});
|
|
@@ -106,6 +106,28 @@ export function getAuthPath(): string {
|
|
|
106
106
|
return path.join(getDataDir(), 'auth.json');
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* `<data>/dictation.json` — the external transcription engine's API key.
|
|
111
|
+
*
|
|
112
|
+
* A file rather than an `app_settings` row because that table is injected into
|
|
113
|
+
* the page as `__OMP_BOOTSTRAP__.appSettings`, where any script on the origin
|
|
114
|
+
* could read it. Written 0600.
|
|
115
|
+
*/
|
|
116
|
+
export function getDictationSecretPath(): string {
|
|
117
|
+
return path.join(getDataDir(), 'dictation.json');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* `<data>/tts.json` — the speech engines' API keys, one per hosted engine.
|
|
122
|
+
*
|
|
123
|
+
* Same rule as `dictation.json`: the settings blob ships to the browser, so a
|
|
124
|
+
* credential cannot live there. A map rather than one key because a user may
|
|
125
|
+
* keep keys for several engines and switch between them. Written 0600.
|
|
126
|
+
*/
|
|
127
|
+
export function getTtsSecretPath(): string {
|
|
128
|
+
return path.join(getDataDir(), 'tts.json');
|
|
129
|
+
}
|
|
130
|
+
|
|
109
131
|
/** `<data>/run/<port>.lock` — held only while a port handover is in progress. */
|
|
110
132
|
export function getLockPath(port: number | string): string {
|
|
111
133
|
return path.join(getRunDir(), `${port}.lock`);
|