@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,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* What an inbound frame does BEFORE it is routed.
|
|
8
|
+
*
|
|
9
|
+
* Three jobs, all of them about the moment a frame arrives rather than what it
|
|
10
|
+
* means:
|
|
11
|
+
*
|
|
12
|
+
* - **Admission.** A frame that arrives while the handshake is open cannot be
|
|
13
|
+
* addressed (the session id is not known yet), so it is held and replayed in
|
|
14
|
+
* arrival order instead of dropped.
|
|
15
|
+
* - **Addressing.** Which sessions this client serves: itself, and the children
|
|
16
|
+
* it announced. A child's `fs/*` call is confined to the child's own cwd.
|
|
17
|
+
* - **Child cards.** The subagents RFD lets a parent announce a child whose
|
|
18
|
+
* work outlives the parent turn, so its card is emitted from here rather than
|
|
19
|
+
* from the turn machine — which resets every turn.
|
|
20
|
+
*
|
|
21
|
+
* Split out of `session.ts` for the per-file ceiling, and because these rules
|
|
22
|
+
* are about the transport boundary, not about the chat.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { subagentCardStatus, type AcpSubagentRecord, type AcpSubagents, type SubagentCardStatus } from '@/server/lib/harness/acp/subagents';
|
|
26
|
+
import { subagentFrames } from '@/server/lib/harness/acp/subagent-frames';
|
|
27
|
+
import type { AgentEvent } from '@/server/lib/omp/rpc/constants';
|
|
28
|
+
|
|
29
|
+
/** How many setup-time frames may be held. A burst larger than this is a
|
|
30
|
+
* misbehaving adapter, and the notice says the tail was dropped. */
|
|
31
|
+
export const MAX_STAGED_FRAMES = 2_000;
|
|
32
|
+
|
|
33
|
+
/** One held frame, exactly as the process delivered it. */
|
|
34
|
+
export interface StagedFrame {
|
|
35
|
+
method: string;
|
|
36
|
+
params: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface AcpInboundOptions {
|
|
40
|
+
readonly subagents: AcpSubagents;
|
|
41
|
+
emit(event: AgentEvent): void;
|
|
42
|
+
/** A restore owns its own frames: staging them would leave its buffer empty. */
|
|
43
|
+
replaying(): boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export class AcpInbound {
|
|
47
|
+
private staged: StagedFrame[] | null = null;
|
|
48
|
+
private truncated = false;
|
|
49
|
+
private statuses: Map<string, SubagentCardStatus | null> | null = null;
|
|
50
|
+
|
|
51
|
+
constructor(private readonly options: AcpInboundOptions) {}
|
|
52
|
+
|
|
53
|
+
/** Open the hold. Called before the handshake, closed by `flush`. */
|
|
54
|
+
begin(): void {
|
|
55
|
+
this.staged = [];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Run the setup with the hold open, then route what it held. The restore's
|
|
59
|
+
* replay is excluded inside `shouldStage`, so its frames still reach the
|
|
60
|
+
* mapper while the handshake is open. */
|
|
61
|
+
async run<T>(handshake: () => Promise<T>, route: (method: string, params: Record<string, unknown>) => void): Promise<T> {
|
|
62
|
+
this.begin();
|
|
63
|
+
try {
|
|
64
|
+
return await handshake();
|
|
65
|
+
} finally {
|
|
66
|
+
this.flushInto(route);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** Route an arriving frame, holding it while the handshake is open. */
|
|
71
|
+
admit(method: string, params: Record<string, unknown>, route: (method: string, params: Record<string, unknown>) => void): void {
|
|
72
|
+
if (this.shouldStage()) {
|
|
73
|
+
this.stage({ method, params });
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
route(method, params);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Whether a frame must be held instead of routed. */
|
|
80
|
+
shouldStage(): boolean {
|
|
81
|
+
return this.staged !== null && !this.options.replaying();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
stage(frame: StagedFrame): void {
|
|
85
|
+
if (!this.staged) return;
|
|
86
|
+
if (this.staged.length >= MAX_STAGED_FRAMES) {
|
|
87
|
+
this.truncated = true;
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.staged.push(frame);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Hand every held frame back, in arrival order, and say if the tail was cut. */
|
|
94
|
+
flushInto(route: (method: string, params: Record<string, unknown>) => void): void {
|
|
95
|
+
const frames = this.staged ?? [];
|
|
96
|
+
this.staged = null;
|
|
97
|
+
for (const frame of frames) route(frame.method, frame.params);
|
|
98
|
+
if (!this.truncated) return;
|
|
99
|
+
this.truncated = false;
|
|
100
|
+
this.options.emit({
|
|
101
|
+
type: 'notice',
|
|
102
|
+
level: 'warning',
|
|
103
|
+
message: `The agent sent more than ${MAX_STAGED_FRAMES} frames before its setup answer; the rest were dropped.`,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Emit the card frames for one child record. A finished card is terminal:
|
|
108
|
+
* late traffic for a dead child must not reopen it. */
|
|
109
|
+
emitSubagent(record: AcpSubagentRecord): void {
|
|
110
|
+
const statuses = this.statuses ??= new Map();
|
|
111
|
+
const previous = statuses.get(record.sessionId) ?? null;
|
|
112
|
+
const status = subagentCardStatus(record);
|
|
113
|
+
// A finished card is terminal for late traffic — but a child that the agent
|
|
114
|
+
// RESUMES (`running` after `idle`) is real work and reopens it. Comparing
|
|
115
|
+
// the status, not the frame, keeps a late chunk from waking a dead card.
|
|
116
|
+
if (previous !== null && previous !== 'running' && status !== 'running') return;
|
|
117
|
+
statuses.set(record.sessionId, status);
|
|
118
|
+
for (const event of subagentFrames(record, previous)) this.options.emit(event);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Close every child card when the parent goes away. */
|
|
122
|
+
closeSubagents(): void {
|
|
123
|
+
for (const record of this.options.subagents.finishAll()) this.emitSubagent(record);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
}
|
|
@@ -61,6 +61,14 @@ describe('startAcpPrompt', () => {
|
|
|
61
61
|
expect(h.events).toEqual(['background-stop', 'usage-begin', 'turn', 'user_turn']);
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
+
test('a quiet prompt opens a turn but draws no user row', () => {
|
|
65
|
+
const h = host();
|
|
66
|
+
expect(startAcpPrompt(h, 'continue', undefined, { quiet: true })).toEqual({ agentInvoked: true });
|
|
67
|
+
expect(h.turns).toBe(1);
|
|
68
|
+
expect(h.promptCount).toBe(1);
|
|
69
|
+
expect(h.events).toEqual(['background-stop', 'usage-begin', 'turn']);
|
|
70
|
+
});
|
|
71
|
+
|
|
64
72
|
test('an image the agent never advertised is refused before any turn opens', () => {
|
|
65
73
|
const h = host();
|
|
66
74
|
expect(() => startAcpPrompt(h, 'look', [{ data: 'x', mimeType: 'image/png' }])).toThrow(
|
|
@@ -21,6 +21,8 @@ export interface AcpPromptHost {
|
|
|
21
21
|
readonly cwd: string;
|
|
22
22
|
readonly harness: string;
|
|
23
23
|
readonly acceptsImages: boolean;
|
|
24
|
+
/** `promptCapabilities.embeddedContext`; false is an explicit refusal. */
|
|
25
|
+
readonly acceptsEmbeddedContext?: boolean;
|
|
24
26
|
promptCount: number;
|
|
25
27
|
background: { stop(): void };
|
|
26
28
|
usage: { beginTurn(): void };
|
|
@@ -34,12 +36,26 @@ export interface AcpPromptHost {
|
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
/** The blocks one prompt sends, so a steer carries the same file links. */
|
|
37
|
-
export function promptContent(
|
|
38
|
-
|
|
39
|
+
export function promptContent(
|
|
40
|
+
host: { cwd: string; acceptsEmbeddedContext?: boolean },
|
|
41
|
+
message: string,
|
|
42
|
+
images: unknown,
|
|
43
|
+
): Promise<unknown[]> {
|
|
44
|
+
return promptFileLinks(host.cwd, message).then((files) =>
|
|
45
|
+
promptBlocks(message, images, files, { embeddedContext: host.acceptsEmbeddedContext }));
|
|
39
46
|
}
|
|
40
47
|
|
|
41
|
-
/** Run one turn. Refuses images the agent never advertised.
|
|
42
|
-
|
|
48
|
+
/** Run one turn. Refuses images the agent never advertised.
|
|
49
|
+
*
|
|
50
|
+
* `quiet` is for a prompt Kabmo sends itself (the background pull): it must
|
|
51
|
+
* open a turn and start the agent, but it is not a user turn, so it draws no
|
|
52
|
+
* user row and is not recorded as one. */
|
|
53
|
+
export function startAcpPrompt(
|
|
54
|
+
host: AcpPromptHost,
|
|
55
|
+
message: string,
|
|
56
|
+
images: unknown,
|
|
57
|
+
options: { quiet?: boolean } = {},
|
|
58
|
+
): unknown {
|
|
43
59
|
// ACP's prompt capabilities are a MUST: an agent that did not advertise
|
|
44
60
|
// `image` has to be told, not sent blocks its dispatcher rejects.
|
|
45
61
|
if (!host.acceptsImages && Array.isArray(images) && images.length > 0) {
|
|
@@ -52,7 +68,7 @@ export function startAcpPrompt(host: AcpPromptHost, message: string, images: unk
|
|
|
52
68
|
host.usage.beginTurn();
|
|
53
69
|
const ack = host.beginTurn(message, images);
|
|
54
70
|
// Only a delivered turn is recorded: a refusal must not leave a user row.
|
|
55
|
-
host.emit({ type: 'user_turn', message, images });
|
|
71
|
+
if (options.quiet !== true) host.emit({ type: 'user_turn', message, images });
|
|
56
72
|
return ack;
|
|
57
73
|
}
|
|
58
74
|
|
|
@@ -22,17 +22,37 @@ export interface AcpLifecycleHost {
|
|
|
22
22
|
readonly idle: { stop(): void };
|
|
23
23
|
readonly background: { stop(): void };
|
|
24
24
|
readonly permissions: { clear(): void; size(): number };
|
|
25
|
+
/** Close every child card; a dead parent has no later frame to report. */
|
|
26
|
+
finishSubagents(): void;
|
|
27
|
+
/** `session/close`, when the agent advertises it. */
|
|
28
|
+
closeAgentSession?(): Promise<void>;
|
|
25
29
|
runDestroyHook(): void;
|
|
26
30
|
disposeProcess(): Promise<void>;
|
|
27
31
|
reportExit(info: AcpExitInfo): Promise<void>;
|
|
28
32
|
}
|
|
29
33
|
|
|
34
|
+
/** `session/close`, when the agent advertised `sessionCapabilities.close`.
|
|
35
|
+
* v2 frees the agent's own state and cancels its remote work; a v1 agent has
|
|
36
|
+
* no such verb and the process disposal is the whole teardown. */
|
|
37
|
+
export async function closeAcpSession(host: AcpCloseHost): Promise<void> {
|
|
38
|
+
if (!host.sessionId || !host.capabilities.closeSession) return;
|
|
39
|
+
await host.process.closeSession(host.sessionId, 5_000);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** What the polite close reads; `AcpSession` satisfies it. */
|
|
43
|
+
export interface AcpCloseHost {
|
|
44
|
+
readonly sessionId: string;
|
|
45
|
+
readonly capabilities: { closeSession: boolean };
|
|
46
|
+
readonly process: { closeSession(sessionId: string, timeoutMs?: number): Promise<unknown> };
|
|
47
|
+
}
|
|
48
|
+
|
|
30
49
|
/** The agent process is gone. A teardown Kabmo started reports nothing. */
|
|
31
50
|
export function acpExited(host: AcpLifecycleHost, info: AcpExitInfo): Promise<void> {
|
|
32
51
|
const closing = host.closing;
|
|
33
52
|
host.destroyed = true;
|
|
34
53
|
host.background.stop();
|
|
35
54
|
host.idle.stop();
|
|
55
|
+
host.finishSubagents();
|
|
36
56
|
host.runDestroyHook();
|
|
37
57
|
return closing ? Promise.resolve() : host.reportExit(info);
|
|
38
58
|
}
|
|
@@ -44,7 +64,12 @@ export async function destroyAcp(host: AcpLifecycleHost): Promise<void> {
|
|
|
44
64
|
host.closing = true;
|
|
45
65
|
host.background.stop();
|
|
46
66
|
host.idle.stop();
|
|
67
|
+
host.finishSubagents();
|
|
47
68
|
host.permissions.clear();
|
|
48
69
|
host.runDestroyHook();
|
|
70
|
+
// The polite verb first: v2 `session/close` frees the agent's own state and
|
|
71
|
+
// cancels its remote work. A refusal is not a failure — the process is
|
|
72
|
+
// disposed either way, which is what v1-only agents always relied on.
|
|
73
|
+
await host.closeAgentSession?.().catch(() => {});
|
|
49
74
|
await host.disposeProcess().catch(() => {});
|
|
50
75
|
}
|
|
@@ -30,9 +30,19 @@ import type { AcpConfigOption, AcpProtocolVersion, AcpSessionModeState } from '@
|
|
|
30
30
|
import type { HarnessId } from '@/shared/lib/harness/catalog';
|
|
31
31
|
import { saveAcpPlanState } from '@/server/lib/harness/acp/acp-goal-state.server';
|
|
32
32
|
import { normalizeConfigOptions, planEntries } from '@/server/lib/harness/acp/v2';
|
|
33
|
+
import type { AcpSubagentRecord, AcpSubagents } from '@/server/lib/harness/acp/subagents';
|
|
33
34
|
|
|
34
35
|
export interface AcpNotificationHost extends AcpConfigNotice {
|
|
36
|
+
/** The ACP session this stream belongs to; a frame naming another one is a
|
|
37
|
+
* child's and must not fold into this transcript. */
|
|
38
|
+
readonly sessionId: string;
|
|
35
39
|
readonly harness: HarnessId;
|
|
40
|
+
/** The child sessions the parent has announced. */
|
|
41
|
+
readonly subagents: AcpSubagents;
|
|
42
|
+
/** Emit the card frames one child record changed. */
|
|
43
|
+
subagentFrame(record: AcpSubagentRecord): void;
|
|
44
|
+
/** The restore's own end marker (v2 `replay_complete`). */
|
|
45
|
+
onReplayComplete(): void;
|
|
36
46
|
/** The negotiated major; v2 renamed a few update payloads. */
|
|
37
47
|
readonly protocol: AcpProtocolVersion;
|
|
38
48
|
agentCommands: AgentCommand[];
|
|
@@ -61,6 +71,32 @@ export function handleSessionNotification(
|
|
|
61
71
|
if (!update || typeof update !== 'object') return;
|
|
62
72
|
const record = update as Record<string, unknown>;
|
|
63
73
|
const kind = typeof record.sessionUpdate === 'string' ? record.sessionUpdate : '';
|
|
74
|
+
const frameSession = typeof params.sessionId === 'string' ? params.sessionId : '';
|
|
75
|
+
|
|
76
|
+
// A child announces itself ON THE PARENT'S STREAM, and its own `sessionId` is
|
|
77
|
+
// the CHILD — so this branch runs before the address gate.
|
|
78
|
+
if (kind === 'subagent_update') {
|
|
79
|
+
const announced = host.subagents.apply(record);
|
|
80
|
+
if (announced) host.subagentFrame(announced);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Every other update is ADDRESSED. A frame for another session is a child's
|
|
85
|
+
// (or one this client never announced): fold it into its own card, or drop
|
|
86
|
+
// it. Before this gate a multiplexing agent's child traffic merged into the
|
|
87
|
+
// parent transcript and its permissions parked under the parent's id.
|
|
88
|
+
if (frameSession && frameSession !== host.sessionId) {
|
|
89
|
+
const child = host.subagents.absorb(frameSession, record);
|
|
90
|
+
if (child) host.subagentFrame(child);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// v2's explicit end-of-replay marker. The fixed fallback in `AcpReplay` is
|
|
95
|
+
// only for a peer that never sends one.
|
|
96
|
+
if (kind === 'replay_complete') {
|
|
97
|
+
host.onReplayComplete();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
64
100
|
|
|
65
101
|
// Session METADATA arrives between turns — omp publishes its command list and
|
|
66
102
|
// a usage update right after `session/new`, when no turn is open. The turn
|
|
@@ -21,6 +21,8 @@ export interface AcpSessionOptions {
|
|
|
21
21
|
harness: HarnessId;
|
|
22
22
|
command: string[];
|
|
23
23
|
env?: Record<string, string>;
|
|
24
|
+
/** Ambient names removed before `env` is merged; see `AgentStdioOptions`. */
|
|
25
|
+
envDrop?: readonly string[];
|
|
24
26
|
/**
|
|
25
27
|
* A process that has already been spawned and `initialize`d — a prewarmed
|
|
26
28
|
* agent. The session adopts it, so the handshake it runs costs only
|
|
@@ -21,6 +21,8 @@ import type { ApprovalMode } from '@/shared/lib/omp/config/access-mode';
|
|
|
21
21
|
import { allowOption, autoApproval, type PermissionOption } from '@/server/lib/harness/acp/permissions';
|
|
22
22
|
import { permissionGrantKey } from '@/server/lib/harness/acp/grants';
|
|
23
23
|
import { noteAwaitingInput } from '@/server/lib/notifications/feed.server';
|
|
24
|
+
import { isRecord } from '@/shared/lib/util/guards';
|
|
25
|
+
import type { AcpSubagents } from '@/server/lib/harness/acp/subagents';
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
28
|
* The option id to select when the tier (or a standing grant) already allows
|
|
@@ -87,6 +89,8 @@ export interface PermissionRequestHost {
|
|
|
87
89
|
readonly sessionId: string;
|
|
88
90
|
accessMode: ApprovalMode;
|
|
89
91
|
readonly permissions: PendingPermissions;
|
|
92
|
+
/** The announced children, so a child's request says whose it is. */
|
|
93
|
+
readonly subagents?: AcpSubagents;
|
|
90
94
|
emit(event: AgentEvent): void;
|
|
91
95
|
}
|
|
92
96
|
|
|
@@ -108,10 +112,27 @@ export function answerPermissionRequest(
|
|
|
108
112
|
if (optionId) {
|
|
109
113
|
return Promise.resolve({ answered: true, result: { outcome: { outcome: 'selected', optionId } } });
|
|
110
114
|
}
|
|
111
|
-
|
|
115
|
+
// The ADDRESSED session, not this one by default: a child's permission
|
|
116
|
+
// arrives with the child's id, and recording the parent's id there put the
|
|
117
|
+
// grant on the wrong session. An empty id is kept empty (the queue still
|
|
118
|
+
// parks the dialog — the JSON-RPC id is what the answer names) instead of
|
|
119
|
+
// being papered over with a session that was never asked.
|
|
120
|
+
const requested = typeof params.sessionId === 'string' ? params.sessionId : '';
|
|
121
|
+
// A child's approval must NAME the child: two subagents asking for the same
|
|
122
|
+
// command would otherwise draw two identical dialogs with no way to tell
|
|
123
|
+
// which work each one unblocks.
|
|
124
|
+
const child = requested ? host.subagents?.get(requested) : undefined;
|
|
125
|
+
const toolCall = isRecord(params.toolCall) ? params.toolCall : {};
|
|
126
|
+
const title = typeof toolCall.title === 'string' && toolCall.title ? toolCall.title : 'approval';
|
|
127
|
+
const addressed = child
|
|
128
|
+
? { ...params, toolCall: { ...toolCall, title: `${child.title ?? child.description ?? 'Subagent'} — ${title}` } }
|
|
129
|
+
: params;
|
|
130
|
+
const dialog = host.permissions.add(id, requested, addressed);
|
|
112
131
|
host.emit(dialog as unknown as AgentEvent);
|
|
113
132
|
// The agent is now blocked on the operator. Announced from the SERVER so the
|
|
114
133
|
// banner arrives even when no page is open to see the dialog.
|
|
134
|
+
// Announced against the PARENT chat: that is the page a reader has open, and
|
|
135
|
+
// a child id is not a chat the notification feed can address.
|
|
115
136
|
void noteAwaitingInput(host.sessionId);
|
|
116
137
|
// Answered LATER; the transport must not send a refusal now or the agent
|
|
117
138
|
// sees two answers to one request.
|
|
@@ -17,6 +17,7 @@ import { ACP_ERROR } from '@/server/lib/harness/acp/protocol';
|
|
|
17
17
|
import { normalizePermissionParams } from '@/server/lib/harness/acp/v2';
|
|
18
18
|
import type { AcpId, AcpProtocolVersion } from '@/server/lib/harness/acp/protocol';
|
|
19
19
|
import type { PendingPermissions } from '@/server/lib/harness/acp/permissions';
|
|
20
|
+
import type { AcpSubagents } from '@/server/lib/harness/acp/subagents';
|
|
20
21
|
import type { AgentEvent } from '@/server/lib/omp/rpc/constants';
|
|
21
22
|
import type { ApprovalMode } from '@/shared/lib/omp/config/access-mode';
|
|
22
23
|
|
|
@@ -26,6 +27,9 @@ export interface AcpClientRequestHost {
|
|
|
26
27
|
readonly protocol: AcpProtocolVersion;
|
|
27
28
|
accessMode: ApprovalMode;
|
|
28
29
|
permissions: PendingPermissions;
|
|
30
|
+
/** The announced children: a child's request must name the child, and its
|
|
31
|
+
* `fs/*` calls are confined to the child's own working directory. */
|
|
32
|
+
readonly subagents?: AcpSubagents;
|
|
29
33
|
emit: (event: AgentEvent) => void;
|
|
30
34
|
}
|
|
31
35
|
|
|
@@ -48,12 +52,26 @@ export function handleAcpClientRequest(
|
|
|
48
52
|
sessionId: host.sessionId,
|
|
49
53
|
accessMode: host.accessMode,
|
|
50
54
|
permissions: host.permissions,
|
|
55
|
+
...(host.subagents ? { subagents: host.subagents } : {}),
|
|
51
56
|
emit: (event) => host.emit(event),
|
|
52
57
|
}, id, normalized);
|
|
53
58
|
}
|
|
54
59
|
// The file surface the client advertised at `initialize`. Routed before the
|
|
55
60
|
// refusal so an agent that took the advertisement at its word gets an answer.
|
|
56
|
-
if (isAcpFsMethod(method))
|
|
61
|
+
if (isAcpFsMethod(method)) {
|
|
62
|
+
const subagents = host.subagents;
|
|
63
|
+
return handleAcpFsRequest({
|
|
64
|
+
cwd: host.cwd,
|
|
65
|
+
sessionId: host.sessionId,
|
|
66
|
+
...(subagents
|
|
67
|
+
? {
|
|
68
|
+
cwdFor: (sessionId: string | undefined) => (sessionId ? subagents.get(sessionId)?.cwd : undefined) ?? host.cwd,
|
|
69
|
+
owns: (sessionId: string) => sessionId === host.sessionId || subagents.has(sessionId),
|
|
70
|
+
}
|
|
71
|
+
: {}),
|
|
72
|
+
emit: (event) => host.emit(event),
|
|
73
|
+
}, method, params);
|
|
74
|
+
}
|
|
57
75
|
// Cursor asks the CLIENT to run a nested task (`cursor/task`, measured on
|
|
58
76
|
// cursor-agent 2026.08.11). Answering `-32601` made its adapter fall back with
|
|
59
77
|
// an error in the middle of a delegation the tool card had already drawn; an
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Stopping an ACP session's work, and what a closed turn moves.
|
|
8
|
+
*
|
|
9
|
+
* Split out of `session.ts` for the per-file ceiling, and because these three
|
|
10
|
+
* actions share one rule: what the client settles LOCALLY and what it leaves to
|
|
11
|
+
* the agent. The permission difference is the measured one — v1 blocks on the
|
|
12
|
+
* client's answer, v2's agent knows which request belongs to the cancelled
|
|
13
|
+
* foreground work (Zed models it as
|
|
14
|
+
* `answers_permission_requests_on_cancel() === false`).
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { cancelAllAcpPermissions } from '@/server/lib/harness/acp/session-permissions';
|
|
18
|
+
import { endAcpTurn } from '@/server/lib/harness/acp/session-turns';
|
|
19
|
+
import { LOST_SESSION_NOTICE } from '@/server/lib/harness/acp/session-lost';
|
|
20
|
+
import type { AcpSession } from '@/server/lib/harness/acp/session';
|
|
21
|
+
import type { AcpTurnEndInfo } from '@/server/lib/harness/acp/turn';
|
|
22
|
+
|
|
23
|
+
/** Stop the turn and settle what it parked. */
|
|
24
|
+
export function cancelAcpTurn(session: AcpSession): void {
|
|
25
|
+
session.background.stop();
|
|
26
|
+
session.turns.cancel();
|
|
27
|
+
session.process.cancelControlRequests?.(session.sessionId);
|
|
28
|
+
// v1: the agent blocks until the approval is answered, so answer `cancelled`.
|
|
29
|
+
// v2: only the agent knows which request belongs to the cancelled foreground
|
|
30
|
+
// work; requests for background work must stay open.
|
|
31
|
+
if (session.protocol === 1) cancelAllAcpPermissions(session.permissions, session.process);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Turn-end bookkeeping, then dispatch the input held behind it. */
|
|
35
|
+
export function endAcpSessionTurn(session: AcpSession, info: AcpTurnEndInfo): Promise<void> {
|
|
36
|
+
const reported = endAcpTurn(session, info);
|
|
37
|
+
const next = session.turns.takeQueued();
|
|
38
|
+
if (next) {
|
|
39
|
+
try {
|
|
40
|
+
session.startTurn(next.message, next.images);
|
|
41
|
+
} catch {
|
|
42
|
+
// A turn that reopened first (a background interval) wins; the input is
|
|
43
|
+
// dropped rather than re-queued behind an indefinite run.
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return reported;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Drop the session so the next command respawns and resumes the agent's own
|
|
50
|
+
* history. Called when the agent reports the session is gone. */
|
|
51
|
+
export function dropAcpSession(session: AcpSession): void {
|
|
52
|
+
session.emit({ type: 'notice', level: 'warning', message: LOST_SESSION_NOTICE });
|
|
53
|
+
void session.destroyAndWait();
|
|
54
|
+
}
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
import {
|
|
18
18
|
AcpBackgroundProbe,
|
|
19
19
|
BACKGROUND_LOAD_TIMEOUT_MS,
|
|
20
|
+
backgroundPullPrompt,
|
|
21
|
+
} from '@/server/lib/harness/acp/background-probe';
|
|
22
|
+
import {
|
|
20
23
|
deliverBackgroundNotice,
|
|
21
24
|
type BackgroundNoticeHost,
|
|
22
25
|
} from '@/server/lib/harness/acp/background-work';
|
|
@@ -40,6 +43,9 @@ export interface AcpWiringHost extends BackgroundNoticeHost {
|
|
|
40
43
|
runModel: { provider: string; modelId: string } | null;
|
|
41
44
|
emit(event: AgentEvent): void;
|
|
42
45
|
onTurnEnded(info: AcpTurnEndInfo): void;
|
|
46
|
+
/** The session's own command surface, for the probe's continuation prompt. */
|
|
47
|
+
send(command: Record<string, unknown>): Promise<unknown>;
|
|
48
|
+
isAlive(): boolean;
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
/** The wiring a session builds for itself.
|
|
@@ -59,6 +65,8 @@ export function acpWiringFor(session: {
|
|
|
59
65
|
assistantCount: number;
|
|
60
66
|
emit(event: AgentEvent): void;
|
|
61
67
|
onTurnEnded(info: AcpTurnEndInfo): Promise<void>;
|
|
68
|
+
send(command: Record<string, unknown>): Promise<unknown>;
|
|
69
|
+
isAlive(): boolean;
|
|
62
70
|
}, parts: { proc: AcpProcess; mapper: AcpFrameMapper; idle: IdleReaper }): AcpWiringHost {
|
|
63
71
|
return {
|
|
64
72
|
cwd: session.cwd,
|
|
@@ -73,6 +81,8 @@ export function acpWiringFor(session: {
|
|
|
73
81
|
set assistantCount(count: number) { session.assistantCount = count; },
|
|
74
82
|
emit: (event) => session.emit(event),
|
|
75
83
|
onTurnEnded: (info) => void session.onTurnEnded(info),
|
|
84
|
+
send: (command) => session.send(command),
|
|
85
|
+
isAlive: () => session.isAlive(),
|
|
76
86
|
};
|
|
77
87
|
}
|
|
78
88
|
|
|
@@ -83,6 +93,18 @@ export function acpBackgroundProbe(host: AcpWiringHost): AcpBackgroundProbe {
|
|
|
83
93
|
load: () => host.proc.loadSession(host.sessionId, host.cwd, BACKGROUND_LOAD_TIMEOUT_MS),
|
|
84
94
|
resetIdle: () => host.idle.reset(),
|
|
85
95
|
emit: (text) => deliverBackgroundNotice(host, text),
|
|
96
|
+
// `session/load` no longer carries the held completion on antigravity
|
|
97
|
+
// 1.5.3, so the probe asks the agent to resume. The prompt is synthetic:
|
|
98
|
+
// it must not rename the chat, and it is ONE turn per background call.
|
|
99
|
+
pull: async () => {
|
|
100
|
+
if (!host.isAlive()) return;
|
|
101
|
+
await host.send({ type: 'prompt', message: backgroundPullPrompt(), synthetic: true, quiet: true });
|
|
102
|
+
host.emit({
|
|
103
|
+
type: 'notice',
|
|
104
|
+
level: 'info',
|
|
105
|
+
message: 'The background subagent did not report back; continuing automatically.',
|
|
106
|
+
});
|
|
107
|
+
},
|
|
86
108
|
});
|
|
87
109
|
}
|
|
88
110
|
|
|
@@ -101,6 +123,7 @@ export function acpTurns(host: AcpWiringHost): AcpTurns {
|
|
|
101
123
|
abandonPrompt: () => host.proc.abandonPrompt(host.sessionId),
|
|
102
124
|
resetMapper: () => host.mapper.reset(),
|
|
103
125
|
closeMessage: () => host.mapper.closeMessage().map((event) => stampMessageModel(event, host.runModel)),
|
|
126
|
+
turnMessage: () => host.mapper.turnMessage(),
|
|
104
127
|
openCalls: () => host.mapper.openCalls(),
|
|
105
128
|
// Armed from the turn's END, exactly as the omp wrapper arms it from its own
|
|
106
129
|
// terminal settle: without this a queued follow-up never left the table.
|
|
@@ -26,6 +26,7 @@ import { AcpTurns } from '@/server/lib/harness/acp/turn';
|
|
|
26
26
|
import { SessionListeners } from '@/server/lib/harness/acp/session-listeners';
|
|
27
27
|
import { RawNotificationSink } from '@/server/lib/harness/acp/raw-listeners';
|
|
28
28
|
import { PendingPermissions } from '@/server/lib/harness/acp/permissions';
|
|
29
|
+
import { AcpSubagents } from '@/server/lib/harness/acp/subagents';
|
|
29
30
|
import { acpConfigView } from '@/server/lib/harness/acp/session-config-view';
|
|
30
31
|
import { stampMessageModel } from '@/server/lib/harness/acp/session-config';
|
|
31
32
|
import type { AgentEvent } from '@/server/lib/omp/rpc/constants';
|
|
@@ -142,6 +143,7 @@ export function mountSession(options: { busyWaitMs?: number } = {}): MountedSess
|
|
|
142
143
|
abandonPrompt: () => proc.abandonPrompt(),
|
|
143
144
|
resetMapper: () => mapper.reset(),
|
|
144
145
|
closeMessage: () => mapper.closeMessage().map((event) => stampMessageModel(event, session.runModel)),
|
|
146
|
+
turnMessage: () => mapper.turnMessage(),
|
|
145
147
|
openCalls: () => mapper.openCalls(),
|
|
146
148
|
onTurnEnd: (info) => {
|
|
147
149
|
(session as unknown as { onTurnEnded: (info: { stopReason?: string; closedMessage: boolean }) => void })
|
|
@@ -171,6 +173,7 @@ export function mountSession(options: { busyWaitMs?: number } = {}): MountedSess
|
|
|
171
173
|
turns,
|
|
172
174
|
mapper,
|
|
173
175
|
permissions: new PendingPermissions(),
|
|
176
|
+
subagents: new AcpSubagents(),
|
|
174
177
|
// The config view is a constructor field; a prototype mount has none, and
|
|
175
178
|
// `set_model` writes through it.
|
|
176
179
|
config: acpConfigView(
|
|
@@ -226,11 +229,13 @@ export function mountSession(options: { busyWaitMs?: number } = {}): MountedSess
|
|
|
226
229
|
};
|
|
227
230
|
}
|
|
228
231
|
|
|
229
|
-
/** Push one `session/update` at the session, as the process would.
|
|
230
|
-
|
|
232
|
+
/** Push one `session/update` at the session, as the process would. `sessionId`
|
|
233
|
+
* is the ADDRESS the frame carried; omitting it models an adapter that does not
|
|
234
|
+
* tag its frames. */
|
|
235
|
+
export function notify(session: AcpSession, update: Record<string, unknown>, sessionId?: string): void {
|
|
231
236
|
(session as unknown as { onNotification: (method: string, params: unknown) => void }).onNotification.call(
|
|
232
237
|
session,
|
|
233
238
|
'session/update',
|
|
234
|
-
{ update },
|
|
239
|
+
sessionId ? { sessionId, update } : { update },
|
|
235
240
|
);
|
|
236
241
|
}
|