@kabmo-labs/kabmo 0.42.1 → 0.43.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/README.md +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +619 -582
- package/dist/client/static/js/{CsvGrid-8gdp5b49.js → CsvGrid-3fr85032.js} +2 -2
- package/dist/client/static/js/{DocxView-j9sphgra.js → DocxView-pqbp2fpd.js} +4 -4
- package/dist/client/static/js/{DrawioView-xsgjc7d8.js → DrawioView-m0vecq1m.js} +2 -2
- package/dist/client/static/js/ImageView-rbejbjwg.js +1 -0
- package/dist/client/static/js/LayoutWrapper-mxfsqh57.js +2 -0
- package/dist/client/static/js/Modal-vnwg4xn3.js +59 -0
- package/dist/client/static/js/{PdfView-afd5cg54.js → PdfView-wmg0vk2p.js} +1 -1
- package/dist/client/static/js/SessionsView-90z2t4qe.js +1 -0
- package/dist/client/static/js/{SheetView-gfzgxb4r.js → SheetView-rg5gkcd7.js} +13 -13
- package/dist/client/static/js/{SvgPreview-225pkb99.js → SvgPreview-wpb7b0ez.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-z70sk69m.js → abnfDiagram-O67JEVCF-4pxqt66j.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-7j23x20s.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-pf1gpkje.js → architectureDiagram-NJMV4G6O-kwt1va5y.js} +11 -11
- package/dist/client/static/js/{astro-nn7xg0we.js → astro-dpfdhc5e.js} +1 -1
- package/dist/client/static/js/bash-vv2ysp0a.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-sr25kbn6.js → blockDiagram-BEXU5L5S-hbj5v7n7.js} +7 -7
- package/dist/client/static/js/c-8jf64j6h.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-znstpg86.js → c4Diagram-YGBWAQC7-epfzh8dw.js} +6 -6
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-7n0pdcd8.js → classDiagram-v2-NBCMYWYE-kbks4qgz.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-zn3qw4c4.js → cose-bilkent-JH36ORCC-dvdmckrf.js} +1 -1
- package/dist/client/static/js/cpp-vh94zee0.js +1 -0
- package/dist/client/static/js/css-p57h1fme.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-me5xnx6a.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-3z41vtzs.js → cynefinDiagram-VND7K2PF-r084stj5.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-5j3zn883.js → dagre-6A5THRUB-64qc51n1.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-ryw1w2kh.js → diagram-22UHCM2B-70qtb1rm.js} +16 -16
- package/dist/client/static/js/{diagram-3UASUU5V-p91q4gkh.js → diagram-3UASUU5V-dgkvnsme.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-22dn73g4.js → diagram-ATOU4E4O-rnpsp26v.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-589p9n53.js → diagram-CDSNMT55-26hthh60.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-ezw06wbx.js → diagram-MLGK6HIB-nc1s85r5.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-cfwrsvk1.js → diagram-MPIPVDR6-e4dckqhv.js} +3 -3
- package/dist/client/static/js/{dockerfile-r4k7q34y.js → dockerfile-rxtyyhr1.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-3rv2wvbf.js → ebnfDiagram-ZINNZB2B-3w9h8qk7.js} +1 -1
- package/dist/client/static/js/{elixir-szk51ehr.js → elixir-5ewfhvfh.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-ma40kneq.js → elk-276RUBZZ-httpkyb1.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-xwstsfqa.js → erDiagram-OPXOYQCR-3qhvf7se.js} +8 -8
- package/dist/client/static/js/{erlang-zwy7cqdk.js → erlang-jqqa3ehb.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-5zbvjj84.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-1jat076e.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-qxyx9tr9.js → ganttDiagram-FUAMR5RP-t53m50e5.js} +6 -6
- package/dist/client/static/js/gitGraph-4MIJSDKK-tjhkv71w.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-v6sg7bkh.js → gitGraphDiagram-X574FWY7-b5wn9eht.js} +14 -14
- package/dist/client/static/js/graphql-kesh8gk0.js +1 -0
- package/dist/client/static/js/html-sxpfydga.js +1 -0
- package/dist/client/static/js/{index-e1yz59fa.js → index-0c6vpk89.js} +2 -2
- package/dist/client/static/js/{index-p0ez6hqd.js → index-181p91hf.js} +1 -1
- package/dist/client/static/js/{index-kh6vp5w5.js → index-1dwdgp27.js} +1 -1
- package/dist/client/static/js/{index-df4yxfzd.js → index-2q23dwrs.js} +2 -2
- package/dist/client/static/js/{index-4cncqz8j.js → index-38v0781h.js} +2 -2
- package/dist/client/static/js/{index-mvykbyhe.js → index-4banz7gr.js} +1 -1
- package/dist/client/static/js/{index-nh29fkk9.js → index-7dp90ad1.js} +2 -2
- package/dist/client/static/js/{index-b37ewyvk.js → index-7z9tz4ze.js} +2 -2
- package/dist/client/static/js/{index-3d40c0a7.js → index-7zc1z9z9.js} +4 -4
- package/dist/client/static/js/{index-8pdz41yh.js → index-8y51kgan.js} +3 -3
- package/dist/client/static/js/{index-qh753ynv.js → index-axszsg7a.js} +1 -1
- package/dist/client/static/js/{index-pxtff3ez.js → index-bvjct7sp.js} +2 -2
- package/dist/client/static/js/{index-8b3t2y77.js → index-cqnpsw2m.js} +2 -2
- package/dist/client/static/js/{index-869bpqcs.js → index-d8r84zjd.js} +12 -12
- package/dist/client/static/js/{index-mq6s2faf.js → index-dg3b0mfk.js} +2 -2
- package/dist/client/static/js/index-dkqgmacr.js +4 -0
- package/dist/client/static/js/{index-pkes9492.js → index-e7yf273s.js} +2 -2
- package/dist/client/static/js/{index-0p43qr4k.js → index-egd0vfey.js} +1 -1
- package/dist/client/static/js/{index-x7m6dmt4.js → index-enb6chty.js} +1 -1
- package/dist/client/static/js/{index-6eq445nn.js → index-f4fqvct6.js} +22 -22
- package/dist/client/static/js/{index-pysqpc5n.js → index-fg965t62.js} +2 -2
- package/dist/client/static/js/{index-sr7sdm2t.js → index-fgyenbv8.js} +4 -4
- package/dist/client/static/js/{index-qsw5edtk.js → index-fjnkzk12.js} +5 -5
- package/dist/client/static/js/{index-0nca2nhp.js → index-g3a9j9hf.js} +1 -1
- package/dist/client/static/js/{index-x7a5jpvq.js → index-g4rsmakg.js} +3 -3
- package/dist/client/static/js/{index-qx6x4z0y.js → index-gmnmnfm0.js} +2 -2
- package/dist/client/static/js/{index-313ctswm.js → index-gwqb7m8g.js} +1 -1
- package/dist/client/static/js/{index-w5q9ymf4.js → index-j60gtvw8.js} +1 -1
- package/dist/client/static/js/index-jvs2fvqz.js +2 -0
- package/dist/client/static/js/{index-r8cc80w5.js → index-jz93j0at.js} +2 -2
- package/dist/client/static/js/{index-2w9j2nj4.js → index-k9ws464d.js} +2 -2
- package/dist/client/static/js/{index-b3d2k7ec.js → index-kc3c2gzb.js} +1 -1
- package/dist/client/static/js/{index-9hzfvjrb.js → index-kccp6tgd.js} +2 -2
- package/dist/client/static/js/{index-9ss64g4g.js → index-kmzd0adv.js} +1 -1
- package/dist/client/static/js/{index-8fvmyv7t.js → index-ksph3kpr.js} +2 -2
- package/dist/client/static/js/{index-dfqmwm7j.js → index-m9s9rg5k.js} +2 -2
- package/dist/client/static/js/{index-gsxebrq9.js → index-n9scbxy5.js} +2 -2
- package/dist/client/static/js/{index-mphhvgm9.js → index-q1gwgmxt.js} +2 -2
- package/dist/client/static/js/{index-b42t14wk.js → index-q81rxwh7.js} +35 -35
- package/dist/client/static/js/{index-ktbrmp29.js → index-qhytrsyb.js} +2 -2
- package/dist/client/static/js/index-qzw4jnnv.js +1 -0
- package/dist/client/static/js/{index-xsts4pqm.js → index-r11bbnek.js} +78 -78
- package/dist/client/static/js/{index-q3qpm7jn.js → index-rv4qs3wm.js} +2 -2
- package/dist/client/static/js/{index-hga3e13s.js → index-s78n0dtv.js} +2 -2
- package/dist/client/static/js/{index-03pyvmcz.js → index-sesghshh.js} +2 -2
- package/dist/client/static/js/index-tnv3dryk.js +9 -0
- package/dist/client/static/js/{index-v5dbrq83.js → index-tzbzehqd.js} +1 -1
- package/dist/client/static/js/index-vcrh95gf.css +1 -0
- package/dist/client/static/js/{index-4y0ayjfx.js → index-vmgzhp41.js} +1 -1
- package/dist/client/static/js/{index-6dxs0tvg.js → index-wmv3crye.js} +2 -2
- package/dist/client/static/js/{index-b0v6gwym.js → index-ycks7gyg.js} +2 -2
- package/dist/client/static/js/{index-hw14rhen.js → index-ynaxep06.js} +2 -2
- package/dist/client/static/js/{index-rab39785.js → index-ys0xpw3q.js} +2 -2
- package/dist/client/static/js/{index-feffxxss.js → index-yvgbr7ek.js} +2 -2
- package/dist/client/static/js/index-zqthmaxq.js +478 -0
- package/dist/client/static/js/info-A6RAGUB7-m6qz24p8.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-0anekyhb.js → infoDiagram-VRGFBTTK-qv7438m3.js} +1 -1
- package/dist/client/static/js/ini-1x0ad976.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-zxpmfkjb.js → ishikawaDiagram-OU5B5YK6-p1w6zg5y.js} +4 -4
- package/dist/client/static/js/java-3944nq02.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-1e86fzra.js → journeyDiagram-ZHPQQLJL-ywk6xqxr.js} +5 -5
- package/dist/client/static/js/json-g5ggnd94.js +1 -0
- package/dist/client/static/js/jsx-f6p72qpc.js +1 -0
- package/dist/client/static/js/{julia-2eekpjq8.js → julia-0h9krgsd.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-e85hhmr1.js → kanban-definition-PNTS6WVX-gtrmhggc.js} +5 -5
- package/dist/client/static/js/lua-edn2b3wn.js +1 -0
- package/dist/client/static/js/markdown-9dhg1fax.js +1 -0
- package/dist/client/static/js/{mermaid.core-jpcrnzyw.js → mermaid.core-5s24b4hh.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-xwy5928e.js → mindmap-definition-NLK3R4M7-3wx7abqn.js} +4 -4
- package/dist/client/static/js/one-dark-pro-3vya9z02.js +1 -0
- package/dist/client/static/js/one-light-1yrwn9my.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-ng6wq5xj.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-7dy6pw26.js → pegDiagram-GJSIUBJH-yvyqnjya.js} +1 -1
- package/dist/client/static/js/{perl-dtn1fccw.js → perl-rptyx23q.js} +1 -1
- package/dist/client/static/js/{php-7av78hch.js → php-sagvq3wz.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-rf6jhxf6.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-nrv2t5yn.js → pieDiagram-5QR66LMP-26x6pj38.js} +3 -3
- package/dist/client/static/js/properties-fcmj08pv.js +1 -0
- package/dist/client/static/js/python-532d8ezm.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-3nt63xr8.js → quadrantDiagram-O4NWA36T-qhe8h0j9.js} +6 -6
- package/dist/client/static/js/r-ptmdxs2a.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-ygp6hxq4.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-rxgnrb2g.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-xkv52a2p.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-bvcktbqh.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-9c3v7jsq.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-evm05hzp.js → railroadDiagram-XR7U4H2S-dwy3k2jx.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-tzrcmktj.js → requirementDiagram-PLB6GJNP-hcmgfesg.js} +4 -4
- package/dist/client/static/js/{ruby-s2bqr910.js → ruby-9qyx7knh.js} +1 -1
- package/dist/client/static/js/{rust-pcvgybk3.js → rust-bmb4ee5w.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-jvjd5rz8.js → sankeyDiagram-IPEJSGJF-s6d3k4zs.js} +6 -6
- package/dist/client/static/js/{sass-bm32bb5k.js → sass-07rteya0.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-0zvjwx29.js → sequenceDiagram-PO4LG4MO-0fcmzgdy.js} +19 -19
- package/dist/client/static/js/{sizeCapture-INFHLROL-6t6g0edv.js → sizeCapture-INFHLROL-t8fcm7rq.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-nb13b23a.js → stateDiagram-v2-GCMORJYK-jr80hfeg.js} +6 -6
- package/dist/client/static/js/{svelte-ztkaww47.js → svelte-w365cpwa.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-ef8vmg6f.js → swimlanes-2SLR337P-x1ay6w39.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xj123xrp.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-3bfph698.js → timeline-definition-EJHVYXUP-qz0g6msb.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-fb58a7z1.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-ej4qhksx.js +1 -0
- package/dist/client/static/js/typescript-683kkkaw.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-vj6yj6tc.js → usecaseDiagram-POWQR4AR-sxzrv8ht.js} +43 -43
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-9xyyabaq.js → vennDiagram-UO4OBE2U-qsqgnjcv.js} +5 -5
- package/dist/client/static/js/{vue-cbqm4bed.js → vue-d6cesny1.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-mkp0kanv.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-zpcwgv9d.js → wardleyDiagram-VNRHLVJA-rvwxn458.js} +4 -4
- package/dist/client/static/js/xml-6ct32gys.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-pdr2rms2.js → xychartDiagram-PMCCYNJV-nb4w7rcg.js} +5 -5
- package/dist/client/static/js/yaml-1d5m3bfj.js +1 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/app.test.tsx +161 -0
- package/marketplace/plugins/command-runner/src/app.tsx +37 -3
- package/marketplace/plugins/command-runner/src/panel/Glyph.tsx +22 -4
- package/marketplace/plugins/git-forge/package.json +2 -2
- package/marketplace/plugins/git-forge/src/panel/Glyph.tsx +22 -3
- package/marketplace/plugins/git-forge/src/panel/index.tsx +21 -3
- package/marketplace/plugins/git-forge/src/panel/refresh.test.tsx +192 -0
- package/marketplace/plugins/git-forge/src/panel/use-forge.ts +4 -2
- package/marketplace/plugins/git-forge/src/panel/write.test.tsx +21 -0
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/RefreshButton.tsx +9 -7
- package/marketplace/plugins/stats/src/app.tsx +15 -1
- package/marketplace/plugins/stats/src/refresh.test.tsx +166 -0
- package/package.json +1 -1
- package/src/client/components/common/anchored-menu/index.tsx +26 -8
- package/src/client/components/common/context-usage-button/McpSection.test.tsx +34 -5
- package/src/client/components/common/context-usage-button/McpSection.tsx +25 -3
- package/src/client/components/common/harness-glyph/brands.ts +3 -0
- package/src/client/components/common/harness-glyph/omo.ts +22 -0
- package/src/client/components/common/server-control/Panel.tsx +24 -86
- package/src/client/components/common/server-control/Row.tsx +98 -0
- package/src/client/components/common/server-control/index.test.tsx +69 -9
- package/src/client/components/layout/VisibilityMenu.tsx +18 -6
- package/src/client/components/layout/new-workspace-host/index.test.tsx +84 -0
- package/src/client/components/layout/new-workspace-host/index.tsx +35 -0
- package/src/client/components/mobile/header-titlebar.test.tsx +38 -3
- package/src/client/components/settings/Sidebar.tsx +2 -1
- package/src/client/components/settings/categories/GitSettings.tsx +31 -0
- package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +292 -0
- package/src/client/components/settings/categories/git-settings/IdentitySection.tsx +215 -0
- package/src/client/components/settings/category-content.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +8 -0
- package/src/client/components/workspace/chat-timeline/MessageList.test.ts +55 -2
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +13 -1
- package/src/client/components/workspace/chat-timeline/PendingChatView.tsx +56 -50
- package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +38 -2
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +13 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +50 -0
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +20 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.tsx +1 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +3 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions.tsx +45 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view.ts +14 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.tsx +2 -12
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Compact.tsx +42 -38
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Minimal.tsx +25 -21
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Trace.tsx +41 -29
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +47 -43
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/parity.test.tsx +136 -0
- package/src/client/components/workspace/git-panel/CommitBox.test.tsx +98 -0
- package/src/client/components/workspace/git-panel/CommitBox.tsx +68 -3
- package/src/client/components/workspace/git-panel/index.test.ts +12 -0
- package/src/client/components/workspace/git-panel/index.tsx +20 -1
- package/src/client/components/workspace/repo-picker/index.test.tsx +20 -0
- package/src/client/components/workspace/repo-picker/index.tsx +5 -6
- package/src/client/data/settings/omp-schema.json +134 -8
- package/src/client/hooks/chat/context/mcp.ts +19 -1
- package/src/client/hooks/chat/timeline/jump-rail.ts +1 -0
- package/src/client/hooks/chat/timeline/row-window.test.ts +38 -3
- package/src/client/hooks/chat/timeline/row-window.ts +33 -9
- package/src/client/hooks/chat/timeline/scroll-geometry.ts +19 -1
- package/src/client/hooks/chat/timeline/scroll.ts +15 -0
- package/src/client/hooks/chat/timeline/thinking-open.ts +10 -4
- package/src/client/hooks/workspace/commit-box.test.ts +62 -1
- package/src/client/hooks/workspace/commit-box.ts +94 -2
- package/src/client/hooks/workspace/git-panel-data.ts +15 -7
- package/src/client/hooks/workspace/repo-scope/index.test.ts +10 -3
- package/src/client/hooks/workspace/repo-scope/index.ts +21 -9
- package/src/client/lib/plugins/repo-scope-service.ts +7 -25
- package/src/server/lib/chat/session-store.server.ts +22 -1
- package/src/server/lib/fs/git-commit-context.test.ts +111 -0
- package/src/server/lib/fs/git-commit-context.ts +85 -0
- package/src/server/lib/fs/git-commit-message.server.ts +251 -0
- package/src/server/lib/fs/git-commit-message.test.ts +211 -0
- package/src/server/lib/fs/git-commit-prompt.test.ts +69 -0
- package/src/server/lib/fs/git-commit-prompt.ts +57 -0
- package/src/server/lib/fs/git-commit-settings.server.ts +42 -0
- package/src/server/lib/fs/git-identity.server.test.ts +129 -0
- package/src/server/lib/fs/git-identity.server.ts +130 -0
- package/src/server/lib/harness/acp/acp-audit.server.ts +13 -62
- package/src/server/lib/harness/acp/acp-frames.server.test.ts +105 -0
- package/src/server/lib/harness/acp/acp-frames.server.ts +217 -0
- package/src/server/lib/harness/acp/acp-raw-messages.server.test.ts +69 -0
- package/src/server/lib/harness/acp/acp-raw-messages.server.ts +129 -0
- package/src/server/lib/harness/acp/acp-telemetry.server.ts +19 -0
- package/src/server/lib/harness/acp/one-shot.server.ts +141 -0
- package/src/server/lib/harness/acp/raw-listeners.ts +30 -0
- package/src/server/lib/harness/acp/session-handshake.ts +11 -3
- package/src/server/lib/harness/acp/session.test-util.ts +2 -0
- package/src/server/lib/harness/acp/session.ts +8 -0
- package/src/server/lib/harness/capabilities.ts +11 -0
- package/src/server/lib/harness/launch-table.ts +19 -0
- package/src/server/lib/harness/launch.ts +4 -0
- package/src/server/lib/harness/schema.server.ts +23 -0
- package/src/server/lib/harness/spawn.server.ts +18 -2
- package/src/server/lib/mcp/agent-config.server.test.ts +111 -0
- package/src/server/lib/mcp/agent-config.server.ts +205 -0
- package/src/server/lib/mcp/probe.server.ts +7 -1
- package/src/server/lib/mcp/registry.server.ts +4 -3
- package/src/server/lib/mcp/secrets.server.test.ts +85 -0
- package/src/server/lib/mcp/secrets.server.ts +108 -0
- package/src/server/lib/omp/core/print.server.ts +100 -0
- package/src/server/lib/omp/rpc/frame-fold.ts +4 -0
- package/src/server/lib/omp/session/artifacts.server.test.ts +15 -5
- package/src/server/lib/omp/session/artifacts.server.ts +41 -26
- package/src/server/lib/omp/session/delete.server.ts +2 -0
- package/src/server/lib/omp/session/goal-auditor.server.ts +10 -48
- package/src/server/lib/omp/session/scan.ts +15 -2
- package/src/server/lib/omp/session/session-discovery.test.ts +21 -0
- package/src/server/lib/realtime/topics/session-data.server.ts +6 -14
- package/src/server/routes/fs/git-message.test.ts +101 -0
- package/src/server/routes/fs/git-message.ts +60 -0
- package/src/server/routes/fs/index.ts +2 -0
- package/src/server/routes/omp/artifact.ts +4 -3
- package/src/server/routes/sessions/mcp.test.ts +65 -1
- package/src/server/routes/sessions/mcp.ts +77 -5
- package/src/server/routes/settings/git-identity.test.ts +77 -0
- package/src/server/routes/settings/git-identity.ts +47 -0
- package/src/server/routes/settings/index.ts +2 -0
- package/src/server/routes/telemetry/acp-telemetry.test.ts +149 -0
- package/src/server/routes/telemetry/context.ts +31 -0
- package/src/server/routes/telemetry/raw-messages.ts +34 -0
- package/src/shared/lib/chat/timeline/tool-render-mode.ts +3 -3
- package/src/shared/lib/chat/tool/artifact.test.ts +4 -2
- package/src/shared/lib/chat/tool/artifact.ts +6 -1
- package/src/shared/lib/chat/tool/proc-facts.ts +2 -1
- package/src/shared/lib/fs/paths.test.ts +2 -0
- package/src/shared/lib/fs/repo-label.test.ts +22 -1
- package/src/shared/lib/fs/repo-label.ts +29 -0
- package/src/shared/lib/git/commit-prompt.test.ts +47 -0
- package/src/shared/lib/git/commit-prompt.ts +72 -0
- package/src/shared/lib/git/identity.test.ts +46 -0
- package/src/shared/lib/git/identity.ts +70 -0
- package/src/shared/lib/harness/brand-color.ts +3 -0
- package/src/shared/lib/harness/catalog.test.ts +14 -0
- package/src/shared/lib/harness/catalog.ts +9 -1
- package/src/shared/lib/harness/mcp-facts.ts +4 -0
- package/src/shared/lib/harness/provider-facts.test.ts +11 -0
- package/src/shared/lib/harness/provider-facts.ts +14 -0
- package/src/shared/lib/harness/providers.ts +2 -2
- package/src/shared/lib/harness/updates.test.ts +8 -0
- package/src/shared/lib/harness/updates.ts +9 -0
- package/src/shared/lib/omp/session/operator-title.test.ts +21 -0
- package/src/shared/lib/omp/session/operator-title.ts +28 -0
- package/src/shared/lib/omp/session/proc-daemon.ts +124 -0
- package/src/shared/lib/omp/session/proc.test.ts +30 -3
- package/src/shared/lib/omp/session/proc.ts +6 -82
- package/src/shared/lib/omp/session/wait-idle.test.ts +15 -4
- package/src/shared/lib/omp/session/wait-idle.ts +11 -4
- package/src/shared/lib/settings/defaults.ts +5 -0
- package/src/shared/lib/workspace/new-workspace.ts +20 -0
- package/src/shared/types/settings/mcp.ts +2 -2
- package/src/shared/types/settings/state.ts +16 -0
- package/src/test-support/preload.ts +1 -0
- package/dist/client/static/js/ImageView-ve9hc519.js +0 -1
- package/dist/client/static/js/LayoutWrapper-5mqffvkc.js +0 -2
- package/dist/client/static/js/Modal-50whypff.js +0 -38
- package/dist/client/static/js/SessionsView-7719nvy0.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-cagtcfhk.js +0 -1
- package/dist/client/static/js/bash-fjzhxy10.js +0 -1
- package/dist/client/static/js/c-wqtyezvw.js +0 -1
- package/dist/client/static/js/cpp-y0nzwner.js +0 -1
- package/dist/client/static/js/css-n2waj098.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-6g2ydrss.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-b774qbn2.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-evp84v09.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-b047d6vk.js +0 -1
- package/dist/client/static/js/graphql-gvb7e2eb.js +0 -1
- package/dist/client/static/js/html-tbz83eke.js +0 -1
- package/dist/client/static/js/index-001vebsp.js +0 -2
- package/dist/client/static/js/index-5599dngt.js +0 -1
- package/dist/client/static/js/index-5asf5625.js +0 -4
- package/dist/client/static/js/index-cqaz1281.js +0 -2
- package/dist/client/static/js/index-f4vr1c6e.css +0 -1
- package/dist/client/static/js/index-rt6ac0kk.js +0 -478
- package/dist/client/static/js/index-y1p3bdsw.js +0 -9
- package/dist/client/static/js/info-A6RAGUB7-n495k952.js +0 -1
- package/dist/client/static/js/ini-2gvjwh83.js +0 -1
- package/dist/client/static/js/java-1xwcq79s.js +0 -1
- package/dist/client/static/js/json-4pqjabgq.js +0 -1
- package/dist/client/static/js/jsx-wcsss15s.js +0 -1
- package/dist/client/static/js/lua-h7vjcn0h.js +0 -1
- package/dist/client/static/js/markdown-f30jjjh9.js +0 -1
- package/dist/client/static/js/one-dark-pro-r0tswz8r.js +0 -1
- package/dist/client/static/js/one-light-xzcfrptf.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-zajj62z6.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-1ve78y5f.js +0 -1
- package/dist/client/static/js/properties-ymexza6q.js +0 -1
- package/dist/client/static/js/python-31ycwa66.js +0 -1
- package/dist/client/static/js/r-t2nne4xp.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-8rqadb58.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-v6ppm8dy.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-9j6bae14.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-56cpyt0g.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-yfdmspf4.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-f4sx355z.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-vwpg3wp8.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-htfxwd32.js +0 -1
- package/dist/client/static/js/typescript-p3syh43m.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hapfjkzq.js +0 -1
- package/dist/client/static/js/xml-4enq788a.js +0 -1
- package/dist/client/static/js/yaml-pjtt3jsc.js +0 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* One disposable ACP turn: spawn the harness, ask one question, read the text.
|
|
8
|
+
*
|
|
9
|
+
* The goal auditor and the commit-message generator both need an answer from
|
|
10
|
+
* the SAME agent the user is talking to — its auth, its model, its config —
|
|
11
|
+
* without creating a chat row, a stream row, a title or a registry entry. This
|
|
12
|
+
* module owns that shape once; a second copy is how one caller would keep the
|
|
13
|
+
* permission gate while the other quietly let the agent edit the repository.
|
|
14
|
+
*
|
|
15
|
+
* `denyTools` is the default because both callers ask for TEXT. ACP has no
|
|
16
|
+
* universal `--no-tools` flag, so the gate is the permission request: every
|
|
17
|
+
* `session/request_permission` is answered `cancelled`, and the prompt tells
|
|
18
|
+
* the agent the supplied context is all it needs. The goal auditor opts out
|
|
19
|
+
* (`denyTools: false`) because its classification prompt is the only thing it
|
|
20
|
+
* ever asks and the agent may need its own tools to read the report.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { AcpSession } from '@/server/lib/harness/acp/session';
|
|
24
|
+
import { loadHarnessConfig, resolveLaunch } from '@/server/lib/harness/config.server';
|
|
25
|
+
import { sessionLaunchCommand } from '@/server/lib/harness/launch';
|
|
26
|
+
import { extractTextFromContent } from '@/shared/lib/omp/session/mapper';
|
|
27
|
+
import type { AcpSessionOptions } from '@/server/lib/harness/acp/session-options';
|
|
28
|
+
import type { HarnessId } from '@/shared/lib/harness/catalog';
|
|
29
|
+
import type { AgentEvent } from '@/server/lib/omp/rpc/constants';
|
|
30
|
+
|
|
31
|
+
export interface AcpOneShotRequest {
|
|
32
|
+
harness: HarnessId;
|
|
33
|
+
cwd: string;
|
|
34
|
+
/** The chat's own model, as the agent resolved it. Null = the agent default. */
|
|
35
|
+
model: { provider: string; modelId: string } | null;
|
|
36
|
+
prompt: string;
|
|
37
|
+
timeoutMs?: number;
|
|
38
|
+
/** Deny every tool permission request. Default true. */
|
|
39
|
+
denyTools?: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type AcpOneShotOutcome =
|
|
43
|
+
| { ok: true; text: string }
|
|
44
|
+
| { ok: false; reason: 'launch' | 'timeout' | 'no-reply' | 'error'; detail?: string };
|
|
45
|
+
|
|
46
|
+
export interface AcpOneShotDeps {
|
|
47
|
+
/** Test seam: a fake session, so the protocol shape can be asserted without
|
|
48
|
+
* spawning an agent. */
|
|
49
|
+
createSession?: (options: AcpSessionOptions, cwd: string) => AcpSession;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const DEFAULT_TIMEOUT_MS = 90_000;
|
|
53
|
+
|
|
54
|
+
export async function runAcpOneShot(
|
|
55
|
+
request: AcpOneShotRequest,
|
|
56
|
+
deps: AcpOneShotDeps = {},
|
|
57
|
+
): Promise<AcpOneShotOutcome> {
|
|
58
|
+
let launch;
|
|
59
|
+
try {
|
|
60
|
+
const configured = await loadHarnessConfig(request.harness);
|
|
61
|
+
launch = resolveLaunch(request.harness, configured);
|
|
62
|
+
} catch (error) {
|
|
63
|
+
return {
|
|
64
|
+
ok: false,
|
|
65
|
+
reason: 'launch',
|
|
66
|
+
detail: error instanceof Error ? error.message : String(error),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const create = deps.createSession ?? ((options, cwd) => new AcpSession(options, cwd));
|
|
71
|
+
const session = create(
|
|
72
|
+
{
|
|
73
|
+
harness: request.harness,
|
|
74
|
+
command: sessionLaunchCommand(request.harness, launch.command),
|
|
75
|
+
...(launch.env ? { env: launch.env } : {}),
|
|
76
|
+
model: request.model,
|
|
77
|
+
// A text answer, not a task: the cheapest level the agent offers.
|
|
78
|
+
thinkingLevel: 'off',
|
|
79
|
+
// `always-ask` parks every tool call; the listener below answers it
|
|
80
|
+
// `cancelled`. `yolo` would let the agent edit the repository.
|
|
81
|
+
accessMode: request.denyTools === false ? 'yolo' : 'always-ask',
|
|
82
|
+
},
|
|
83
|
+
request.cwd,
|
|
84
|
+
);
|
|
85
|
+
// A disposable reader: no stream row, no turn settle, no queue, no title.
|
|
86
|
+
session.markStream = () => {};
|
|
87
|
+
session.onTurnEnded = async () => {};
|
|
88
|
+
|
|
89
|
+
const events: AgentEvent[] = [];
|
|
90
|
+
const stopEvents = session.onEvent((event) => events.push(event));
|
|
91
|
+
const ended = Promise.withResolvers<void>();
|
|
92
|
+
let timedOut = false;
|
|
93
|
+
const stopEnd = session.onEvent((event) => {
|
|
94
|
+
if (event.type === 'agent_end') ended.resolve();
|
|
95
|
+
});
|
|
96
|
+
const stopPermissions = request.denyTools === false
|
|
97
|
+
? () => {}
|
|
98
|
+
: session.onEvent((event) => {
|
|
99
|
+
// `session-permissions.ts` emits the permission dialog as an
|
|
100
|
+
// `AgentEvent`; its shape is the dialog, not a union member.
|
|
101
|
+
const record = event as unknown as { type?: string; id?: unknown };
|
|
102
|
+
if (record.type !== 'extension_ui_request') return;
|
|
103
|
+
if (typeof record.id !== 'string' && typeof record.id !== 'number') return;
|
|
104
|
+
session.respond(record.id, { outcome: { outcome: 'cancelled' } });
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const timer = setTimeout(() => {
|
|
108
|
+
timedOut = true;
|
|
109
|
+
void session.destroyAndWait();
|
|
110
|
+
ended.resolve();
|
|
111
|
+
}, request.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
112
|
+
|
|
113
|
+
try {
|
|
114
|
+
await session.start();
|
|
115
|
+
// `synthetic` keeps the one-shot prompt from becoming a session title.
|
|
116
|
+
await session.send({ type: 'prompt', message: request.prompt, synthetic: true });
|
|
117
|
+
await ended.promise;
|
|
118
|
+
if (timedOut) return { ok: false, reason: 'timeout' };
|
|
119
|
+
const message = [...events].reverse().find((event) => event.type === 'message_end')?.message;
|
|
120
|
+
if (!message || typeof message !== 'object' || !('content' in message)) {
|
|
121
|
+
return { ok: false, reason: 'no-reply' };
|
|
122
|
+
}
|
|
123
|
+
const text = extractTextFromContent(message.content).trim();
|
|
124
|
+
return text ? { ok: true, text } : { ok: false, reason: 'no-reply' };
|
|
125
|
+
} catch (error) {
|
|
126
|
+
return {
|
|
127
|
+
ok: false,
|
|
128
|
+
reason: 'error',
|
|
129
|
+
detail: error instanceof Error ? error.message : String(error),
|
|
130
|
+
};
|
|
131
|
+
} finally {
|
|
132
|
+
clearTimeout(timer);
|
|
133
|
+
stopEvents();
|
|
134
|
+
stopEnd();
|
|
135
|
+
stopPermissions();
|
|
136
|
+
// Remove the disposable session from the agent's own history when it
|
|
137
|
+
// advertises `session/delete`. A refusal is not the answer's failure.
|
|
138
|
+
await session.deleteAgentSession().catch(() => false);
|
|
139
|
+
await session.destroyAndWait().catch(() => {});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The raw `session/update` sinks an ACP session fans out to.
|
|
8
|
+
*
|
|
9
|
+
* The transcript recorder reads the FOLDED events; the raw panel reads the
|
|
10
|
+
* original ACP payloads, so the session needs a second, pre-mapper sink. Kept
|
|
11
|
+
* in its own module because the session class is at the file ceiling and this
|
|
12
|
+
* is a self-contained subscription set.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export type RawNotificationListener = (method: string, params: Record<string, unknown>) => void;
|
|
16
|
+
|
|
17
|
+
export class RawNotificationSink {
|
|
18
|
+
private readonly listeners = new Set<RawNotificationListener>();
|
|
19
|
+
|
|
20
|
+
add(listener: RawNotificationListener): () => void {
|
|
21
|
+
this.listeners.add(listener);
|
|
22
|
+
return () => {
|
|
23
|
+
this.listeners.delete(listener);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
emit(method: string, params: Record<string, unknown>): void {
|
|
28
|
+
for (const listener of this.listeners) listener(method, params);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -106,15 +106,23 @@ export async function handshakeAcpSession(
|
|
|
106
106
|
): Promise<void> {
|
|
107
107
|
const init = await proc.initialize(undefined, 60_000);
|
|
108
108
|
target.onProtocol?.(init.protocolVersion === 2 ? 2 : 1);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
// stdio is the ACP baseline; `http`/`sse` are only real when the agent
|
|
110
|
+
// advertises them. Sending an unadvertised transport is at best ignored and
|
|
111
|
+
// at worst rejects the whole setup request, so the list is filtered here —
|
|
112
|
+
// the same rule the navbar's list uses.
|
|
113
|
+
const advertisedMcp = init.agentCapabilities?.mcpCapabilities;
|
|
114
|
+
const requestedMcp = (target.mcpServers ?? []).filter((server) => {
|
|
115
|
+
if (!('type' in server)) return true;
|
|
116
|
+
return server.type === 'http' ? advertisedMcp?.http === true : advertisedMcp?.sse === true;
|
|
117
|
+
});
|
|
112
118
|
// A v2 peer validates `mcpServers` strictly (tagged entries, absolute stdio
|
|
113
119
|
// command) and rejects the whole setup request otherwise. The conversion is
|
|
114
120
|
// here because this is the first point the negotiated major is known.
|
|
115
121
|
const mcpServers: AcpMcpServerWire[] = init.protocolVersion === 2
|
|
116
122
|
? toAcpV2McpServers(requestedMcp)
|
|
117
123
|
: requestedMcp;
|
|
124
|
+
/** opencode's plugin activation gate: the first `session/new`s refuse with
|
|
125
|
+
* `ServiceUnavailableError` until the agent's plugins finish booting. */
|
|
118
126
|
const newSession = (cwd: string, timeoutMs?: number) =>
|
|
119
127
|
newSessionAfterActivation(target.harness, cwd, (dir, ms) => proc.newSession(dir, ms, mcpServers), {
|
|
120
128
|
...(timeoutMs !== undefined ? { perAttemptMs: timeoutMs } : {}),
|
|
@@ -24,6 +24,7 @@ import { AcpUsageMeter } from '@/server/lib/harness/acp/session-usage';
|
|
|
24
24
|
import { AcpFrameMapper } from '@/server/lib/harness/acp/frames';
|
|
25
25
|
import { AcpTurns } from '@/server/lib/harness/acp/turn';
|
|
26
26
|
import { SessionListeners } from '@/server/lib/harness/acp/session-listeners';
|
|
27
|
+
import { RawNotificationSink } from '@/server/lib/harness/acp/raw-listeners';
|
|
27
28
|
import { PendingPermissions } from '@/server/lib/harness/acp/permissions';
|
|
28
29
|
import { stampMessageModel } from '@/server/lib/harness/acp/session-config';
|
|
29
30
|
import type { AgentEvent } from '@/server/lib/omp/rpc/constants';
|
|
@@ -168,6 +169,7 @@ export function mountSession(): MountedSession {
|
|
|
168
169
|
usage: new AcpUsageMeter(),
|
|
169
170
|
runModel: null,
|
|
170
171
|
events: eventSink,
|
|
172
|
+
rawSink: new RawNotificationSink(),
|
|
171
173
|
proc,
|
|
172
174
|
idle,
|
|
173
175
|
destroyed: false,
|
|
@@ -34,6 +34,7 @@ import { capabilitiesFrom } from '@/server/lib/harness/launch';
|
|
|
34
34
|
import { PendingPermissions } from '@/server/lib/harness/acp/permissions';
|
|
35
35
|
import { cancelAllAcpPermissions } from '@/server/lib/harness/acp/session-permissions';
|
|
36
36
|
import { handleSessionNotification } from '@/server/lib/harness/acp/session-notifications';
|
|
37
|
+
import { RawNotificationSink, type RawNotificationListener } from '@/server/lib/harness/acp/raw-listeners';
|
|
37
38
|
import { AcpUsageMeter, type AcpContextUsage } from '@/server/lib/harness/acp/session-usage';
|
|
38
39
|
import { handleAcpClientRequest, handleAcpCancelRequest, type AcpClientRequestAnswer } from '@/server/lib/harness/acp/session-requests';
|
|
39
40
|
import { reportAcpExit } from '@/server/lib/harness/acp/session-exit';
|
|
@@ -97,6 +98,8 @@ export class AcpSession implements HarnessSession, AcpCommandHost {
|
|
|
97
98
|
readonly background: AcpBackgroundProbe;
|
|
98
99
|
private readonly mapper = new AcpFrameMapper();
|
|
99
100
|
private readonly events = new SessionListeners();
|
|
101
|
+
/** Raw `session/update` sinks: the frame log the raw panel reads. */
|
|
102
|
+
private readonly rawSink = new RawNotificationSink();
|
|
100
103
|
readonly permissions = new PendingPermissions();
|
|
101
104
|
private destroyHook: (() => void) | null = null;
|
|
102
105
|
private destroyed = false;
|
|
@@ -167,6 +170,8 @@ export class AcpSession implements HarnessSession, AcpCommandHost {
|
|
|
167
170
|
isRunning(): boolean { return this.isAlive() && (this.turns.isPromptRunning || this.turns.isStreaming); }
|
|
168
171
|
isBusy(): boolean { return this.isRunning() || this.permissions.size() > 0; }
|
|
169
172
|
onEvent(listener: (event: AgentEvent) => void): () => void { return this.events.add(listener); }
|
|
173
|
+
/** Subscribe to the raw `session/update` payloads, before the mapper folds them. */
|
|
174
|
+
onRawNotification(listener: RawNotificationListener): () => void { return this.rawSink.add(listener); }
|
|
170
175
|
emit(event: AgentEvent): void { this.replay.push(event); this.events.emit(event); }
|
|
171
176
|
|
|
172
177
|
getPendingUiDialogs(): Record<string, unknown>[] {
|
|
@@ -287,6 +292,9 @@ export class AcpSession implements HarnessSession, AcpCommandHost {
|
|
|
287
292
|
if (handleAcpCancelRequest(this, method, params)) return;
|
|
288
293
|
// A `session/load` replay repeats the whole chat; leave it to the probe.
|
|
289
294
|
if (this.background.consume(method, params)) return;
|
|
295
|
+
// The raw panel reads the original ACP payloads, so the frame log is fed
|
|
296
|
+
// BEFORE the mapper folds them (and before the turn gate can drop one).
|
|
297
|
+
if (method === 'session/update') this.rawSink.emit(method, params);
|
|
290
298
|
handleSessionNotification(this, method, params);
|
|
291
299
|
}
|
|
292
300
|
|
|
@@ -32,6 +32,16 @@ export interface HarnessCapabilities {
|
|
|
32
32
|
hasPlan: boolean;
|
|
33
33
|
/** How mid-turn input works, or null when the agent has no way to take it. */
|
|
34
34
|
steerMode: 'steer' | 'follow-up' | null;
|
|
35
|
+
/**
|
|
36
|
+
* The MCP transports the agent advertised beyond the stdio baseline.
|
|
37
|
+
*
|
|
38
|
+
* ACP's `mcpCapabilities` is optional: stdio is always accepted, while
|
|
39
|
+
* `http`/`sse` are only real when the agent says so. The navbar list and the
|
|
40
|
+
* handshake both read this, so a server the agent cannot accept is neither
|
|
41
|
+
* sent nor shown as delivered. Absent on a probe recorded before this field
|
|
42
|
+
* existed, which the readers treat as "not advertised".
|
|
43
|
+
*/
|
|
44
|
+
mcpCapabilities?: { http: boolean; sse: boolean };
|
|
35
45
|
agentName?: string;
|
|
36
46
|
agentVersion?: string;
|
|
37
47
|
/** Why the harness is unusable, when it is: an auth method id, a missing
|
|
@@ -53,6 +63,7 @@ export const UNPROBED_CAPABILITIES: HarnessCapabilities = {
|
|
|
53
63
|
hasUsage: false,
|
|
54
64
|
hasPlan: false,
|
|
55
65
|
steerMode: null,
|
|
66
|
+
mcpCapabilities: { http: false, sse: false },
|
|
56
67
|
};
|
|
57
68
|
|
|
58
69
|
/** Spawn-time capability read: one ACP session, then dispose. */
|
|
@@ -222,4 +222,23 @@ export const HARNESS_LAUNCH: Readonly<Partial<Record<HarnessId, HarnessLaunch>>>
|
|
|
222
222
|
install: 'curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash # then: cd ~/.hermes/hermes-agent && python -c "import pm; pm.sync_venv([\'acp\'], explicit=True)"',
|
|
223
223
|
note: 'native ACP (`hermes acp`); the `acp` extra must be synced once or the subcommand does not exist. Configure a provider with `hermes model` (or ~/.hermes/config.yaml / .env) before a turn succeeds; models are published as `provider:model`',
|
|
224
224
|
},
|
|
225
|
+
// OmO Native ships no ACP server of its own (measured against 5.1.x: no
|
|
226
|
+
// `acp` subcommand). It is a senpi (pi fork) engine, so the `pi-acp` adapter
|
|
227
|
+
// drives it over `omo --mode rpc`; `PI_ACP_PI_COMMAND` is the adapter's own
|
|
228
|
+
// override for the binary it spawns. Measured through Kabmo's ACP client on
|
|
229
|
+
// 5.1.9: initialize + session/new answered, 69 models · 3 thought levels,
|
|
230
|
+
// list/delete advertised.
|
|
231
|
+
omo: {
|
|
232
|
+
id: 'omo',
|
|
233
|
+
command: ['npx', '-y', 'pi-acp@0.0.34'],
|
|
234
|
+
env: { PI_ACP_PI_COMMAND: 'omo' },
|
|
235
|
+
// The adapter spawns `omo`; `npx` being present says nothing about whether
|
|
236
|
+
// a chat can run.
|
|
237
|
+
requires: {
|
|
238
|
+
binary: 'omo',
|
|
239
|
+
label: 'OmO Native (`omo`)',
|
|
240
|
+
},
|
|
241
|
+
install: 'curl -fsSL https://get.omo.dev/install.sh | bash # then run `omo setup` once',
|
|
242
|
+
note: 'bridges `omo --mode rpc` through pi-acp; OmO Native is a senpi (pi fork) engine. Run `omo setup` (or `/login`) once before a turn succeeds; models are published as `provider/model`',
|
|
243
|
+
},
|
|
225
244
|
};
|
|
@@ -100,6 +100,10 @@ export function capabilitiesFrom(
|
|
|
100
100
|
hasUsage: observed.usage,
|
|
101
101
|
hasPlan: observed.plan,
|
|
102
102
|
steerMode: steeringSupported ? 'steer' : null,
|
|
103
|
+
mcpCapabilities: {
|
|
104
|
+
http: caps.mcpCapabilities?.http === true,
|
|
105
|
+
sse: caps.mcpCapabilities?.sse === true,
|
|
106
|
+
},
|
|
103
107
|
...(init.agentInfo?.name ? { agentName: init.agentInfo.name } : {}),
|
|
104
108
|
...(init.agentInfo?.version ? { agentVersion: init.agentInfo.version } : {}),
|
|
105
109
|
};
|
|
@@ -158,6 +158,28 @@ const ACP_TRANSCRIPTS_SQL = `
|
|
|
158
158
|
);
|
|
159
159
|
`;
|
|
160
160
|
|
|
161
|
+
/**
|
|
162
|
+
* The raw `session/update` notifications an ACP session received.
|
|
163
|
+
*
|
|
164
|
+
* The transcript is Kabmo's REFACTORED view (one row per message, tool calls
|
|
165
|
+
* folded in). The raw panel is the place a user checks what the agent actually
|
|
166
|
+
* sent, so it reads these frames — the original ACP payloads — not the fold.
|
|
167
|
+
* `kind`/`role` are denormalized at write time so the panel can page and filter
|
|
168
|
+
* without parsing every payload.
|
|
169
|
+
*/
|
|
170
|
+
const ACP_FRAMES_SQL = `
|
|
171
|
+
CREATE TABLE IF NOT EXISTS acp_frames (
|
|
172
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
173
|
+
session_id TEXT NOT NULL,
|
|
174
|
+
method TEXT NOT NULL,
|
|
175
|
+
kind TEXT NOT NULL,
|
|
176
|
+
role TEXT NOT NULL,
|
|
177
|
+
payload TEXT NOT NULL,
|
|
178
|
+
created_at INTEGER NOT NULL
|
|
179
|
+
);
|
|
180
|
+
CREATE INDEX IF NOT EXISTS acp_frames_session ON acp_frames(session_id, id);
|
|
181
|
+
`;
|
|
182
|
+
|
|
161
183
|
/** Idempotent: created on every database open, like every other feature table. */
|
|
162
184
|
export async function ensureHarnessSchema(db: DbClient): Promise<void> {
|
|
163
185
|
await db.exec(HARNESS_SESSIONS_SQL);
|
|
@@ -166,6 +188,7 @@ export async function ensureHarnessSchema(db: DbClient): Promise<void> {
|
|
|
166
188
|
await db.exec(HARNESS_GOAL_STATE_SQL);
|
|
167
189
|
await db.exec(HARNESS_USAGE_STATE_SQL);
|
|
168
190
|
await db.exec(ACP_TRANSCRIPTS_SQL);
|
|
191
|
+
await db.exec(ACP_FRAMES_SQL);
|
|
169
192
|
for (const migration of HARNESS_SESSIONS_MIGRATIONS) {
|
|
170
193
|
try {
|
|
171
194
|
await db.exec(migration);
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
import { AcpSession } from '@/server/lib/harness/acp/session';
|
|
24
24
|
import { AcpTranscriptRecorder } from '@/server/lib/harness/acp/session-transcript.server';
|
|
25
|
+
import { AcpFrameRecorder } from '@/server/lib/harness/acp/acp-frames.server';
|
|
25
26
|
import { claimPrewarmedAcpSession } from '@/server/lib/harness/acp/prewarm.server';
|
|
26
27
|
import { rememberAgentToken } from '@/server/lib/sessions/agent-token.server';
|
|
27
28
|
import { loadHarnessConfig, resolveLaunch } from '@/server/lib/harness/config.server';
|
|
@@ -36,6 +37,7 @@ import { emitRealtimeSignal } from '@/server/lib/realtime/signals.server';
|
|
|
36
37
|
import { harnessDescriptor, type HarnessId } from '@/shared/lib/harness/catalog';
|
|
37
38
|
import { mcpDelivery } from '@/shared/lib/harness/mcp-facts';
|
|
38
39
|
import { mcpServersFor, toAcpMcpServers } from '@/server/lib/mcp/registry.server';
|
|
40
|
+
import { resolveMcpDefinition } from '@/server/lib/mcp/secrets.server';
|
|
39
41
|
import { readSessionMcpOverrides } from '@/server/lib/mcp/session-state.server';
|
|
40
42
|
import { ensureCustomHarnesses } from '@/server/lib/harness/custom.server';
|
|
41
43
|
import type { HarnessConfig } from '@/shared/lib/harness/config';
|
|
@@ -138,9 +140,18 @@ export async function openAcpSession(
|
|
|
138
140
|
// The session's own overrides are applied here, which is what makes a toggle
|
|
139
141
|
// per-session: the list is an argument to `session/new|load`, not a file.
|
|
140
142
|
const overrides = await readSessionMcpOverrides(request.sessionId);
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
// `!command` and bare-env values are omp's own indirection; an ACP agent
|
|
144
|
+
// receives the list as JSON and would get the literal string. Resolve them
|
|
145
|
+
// here, before the wire shape, so the agent gets the header omp would have
|
|
146
|
+
// sent — and so the navbar's probe answers for the same server.
|
|
147
|
+
const definitions = mcpDelivery(request.harness) === 'acp'
|
|
148
|
+
? await Promise.all(
|
|
149
|
+
(await mcpServersFor(request.cwd, { overrides })).map((definition) =>
|
|
150
|
+
resolveMcpDefinition(definition, request.cwd),
|
|
151
|
+
),
|
|
152
|
+
)
|
|
143
153
|
: [];
|
|
154
|
+
const mcpServers = toAcpMcpServers(definitions);
|
|
144
155
|
// Built here rather than behind a factory in the session module: this is the
|
|
145
156
|
// only place a session is constructed, and the handshake it runs (load vs
|
|
146
157
|
// new) is decided by the request this function already holds.
|
|
@@ -229,6 +240,10 @@ export async function startAcpSession(
|
|
|
229
240
|
await recorder.hydrate();
|
|
230
241
|
session.onEvent((event) => recorder.record(event));
|
|
231
242
|
}
|
|
243
|
+
// The raw panel reads the original `session/update` payloads, not the fold
|
|
244
|
+
// above. A restore replays the agent's history and must not duplicate it.
|
|
245
|
+
const frameRecorder = request.replay ? null : new AcpFrameRecorder(() => realSessionId);
|
|
246
|
+
if (frameRecorder) session.onRawNotification((method, params) => frameRecorder.record(method, params));
|
|
232
247
|
if (warm) {
|
|
233
248
|
// The process's environment already carries the credential minted at
|
|
234
249
|
// prewarm; recording a different one here would authenticate its callbacks
|
|
@@ -246,6 +261,7 @@ export async function startAcpSession(
|
|
|
246
261
|
registerAcpSession(session, request.sessionId, () => {
|
|
247
262
|
if (pid) removeHarnessLease(pid);
|
|
248
263
|
recorder?.dispose();
|
|
264
|
+
frameRecorder?.dispose();
|
|
249
265
|
});
|
|
250
266
|
// Record the ownership BEFORE the first frame is forwarded: the sidebar reads
|
|
251
267
|
// this table, not the live registry, so a row written late would draw the row
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The servers an ACP agent loads from its own config.
|
|
8
|
+
*
|
|
9
|
+
* The navbar used to show only Kabmo's injected list, which is why an ACP chat
|
|
10
|
+
* looked identical to an omp-rpc one. These cases pin the three measured
|
|
11
|
+
* shapes (opencode's `mcp`, Claude's `mcpServers`, Codex's `[mcp_servers]`) and
|
|
12
|
+
* the rule that a harness with no measured file contributes nothing.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
|
|
16
|
+
import fs from 'fs';
|
|
17
|
+
import os from 'os';
|
|
18
|
+
import path from 'path';
|
|
19
|
+
import { removeDir } from '@/test-support/remove-dir';
|
|
20
|
+
import { agentMcpEntriesFor } from '@/server/lib/mcp/agent-config.server';
|
|
21
|
+
|
|
22
|
+
const ROOT = path.join(os.tmpdir(), `kabmo-agent-mcp-${process.pid}`);
|
|
23
|
+
const XDG = path.join(ROOT, 'xdg');
|
|
24
|
+
const PROJECT = path.join(ROOT, 'project');
|
|
25
|
+
const previousXdg = Bun.env.XDG_CONFIG_HOME;
|
|
26
|
+
|
|
27
|
+
beforeAll(() => {
|
|
28
|
+
removeDir(ROOT);
|
|
29
|
+
fs.mkdirSync(path.join(XDG, 'opencode'), { recursive: true });
|
|
30
|
+
fs.mkdirSync(path.join(PROJECT, '.codex'), { recursive: true });
|
|
31
|
+
Bun.env.XDG_CONFIG_HOME = XDG;
|
|
32
|
+
fs.writeFileSync(
|
|
33
|
+
path.join(XDG, 'opencode', 'opencode.json'),
|
|
34
|
+
JSON.stringify({
|
|
35
|
+
mcp: {
|
|
36
|
+
local: { type: 'local', command: ['codegraph', 'serve', '--mcp'] },
|
|
37
|
+
remote: { type: 'remote', url: 'https://example/mcp', headers: { 'X-Key': 'v' } },
|
|
38
|
+
off: { type: 'local', command: ['nope'], enabled: false },
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
42
|
+
fs.writeFileSync(
|
|
43
|
+
path.join(PROJECT, '.mcp.json'),
|
|
44
|
+
JSON.stringify({
|
|
45
|
+
mcpServers: {
|
|
46
|
+
claudeLocal: { command: 'npx', args: ['-y', 'server'] },
|
|
47
|
+
claudeRemote: { type: 'sse', url: 'https://example/sse' },
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
);
|
|
51
|
+
fs.writeFileSync(
|
|
52
|
+
path.join(PROJECT, '.codex', 'config.toml'),
|
|
53
|
+
[
|
|
54
|
+
'[mcp_servers.codexLocal]',
|
|
55
|
+
'command = "npx"',
|
|
56
|
+
'args = ["-y", "server"]',
|
|
57
|
+
'',
|
|
58
|
+
'[mcp_servers.codexRemote]',
|
|
59
|
+
'url = "https://example/mcp"',
|
|
60
|
+
'http_headers = { "X-Key" = "v" }',
|
|
61
|
+
'',
|
|
62
|
+
].join('\n'),
|
|
63
|
+
);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
afterAll(() => {
|
|
67
|
+
if (previousXdg === undefined) delete Bun.env.XDG_CONFIG_HOME;
|
|
68
|
+
else Bun.env.XDG_CONFIG_HOME = previousXdg;
|
|
69
|
+
removeDir(ROOT);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
describe('agentMcpEntriesFor', () => {
|
|
73
|
+
test('reads opencode local/remote entries and keeps a disabled one disabled', async () => {
|
|
74
|
+
const entries = await agentMcpEntriesFor('opencode', PROJECT);
|
|
75
|
+
expect(entries.map((entry) => entry.name)).toEqual(['local', 'remote', 'off']);
|
|
76
|
+
expect(entries.every((entry) => entry.source === 'agent')).toBe(true);
|
|
77
|
+
expect(entries.find((entry) => entry.name === 'local')?.transport).toBe('stdio');
|
|
78
|
+
expect(entries.find((entry) => entry.name === 'remote')?.transport).toBe('http');
|
|
79
|
+
expect(entries.find((entry) => entry.name === 'off')?.enabled).toBe(false);
|
|
80
|
+
expect(entries.find((entry) => entry.name === 'remote')?.config).toEqual({
|
|
81
|
+
type: 'http',
|
|
82
|
+
url: 'https://example/mcp',
|
|
83
|
+
headers: { 'X-Key': 'v' },
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
test('reads Claude project .mcp.json in the native shape', async () => {
|
|
88
|
+
const entries = await agentMcpEntriesFor('claude', PROJECT);
|
|
89
|
+
expect(entries.map((entry) => entry.name)).toEqual(['claudeLocal', 'claudeRemote']);
|
|
90
|
+
expect(entries.find((entry) => entry.name === 'claudeLocal')?.config).toEqual({
|
|
91
|
+
command: 'npx',
|
|
92
|
+
args: ['-y', 'server'],
|
|
93
|
+
});
|
|
94
|
+
expect(entries.find((entry) => entry.name === 'claudeRemote')?.transport).toBe('sse');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test('reads Codex [mcp_servers] from TOML', async () => {
|
|
98
|
+
const entries = await agentMcpEntriesFor('codex', PROJECT);
|
|
99
|
+
expect(entries.map((entry) => entry.name)).toEqual(['codexLocal', 'codexRemote']);
|
|
100
|
+
expect(entries.find((entry) => entry.name === 'codexLocal')?.transport).toBe('stdio');
|
|
101
|
+
expect(entries.find((entry) => entry.name === 'codexRemote')?.config).toEqual({
|
|
102
|
+
type: 'http',
|
|
103
|
+
url: 'https://example/mcp',
|
|
104
|
+
headers: { 'X-Key': 'v' },
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
test('a harness with no measured file contributes nothing', async () => {
|
|
109
|
+
expect(await agentMcpEntriesFor('dsh', PROJECT)).toEqual([]);
|
|
110
|
+
});
|
|
111
|
+
});
|