@kabmo-labs/kabmo 0.42.2 → 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-g6rek8y9.js → CsvGrid-3fr85032.js} +2 -2
- package/dist/client/static/js/{DocxView-41t9ryws.js → DocxView-pqbp2fpd.js} +4 -4
- package/dist/client/static/js/{DrawioView-mfxhfz1h.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-bek8k888.js → PdfView-wmg0vk2p.js} +1 -1
- package/dist/client/static/js/SessionsView-90z2t4qe.js +1 -0
- package/dist/client/static/js/{SheetView-vezssf6b.js → SheetView-rg5gkcd7.js} +13 -13
- package/dist/client/static/js/{SvgPreview-f1qaw73k.js → SvgPreview-wpb7b0ez.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-4qn94h52.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-tbewzdya.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-njgnwckz.js → blockDiagram-BEXU5L5S-hbj5v7n7.js} +7 -7
- package/dist/client/static/js/c-8jf64j6h.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-f58pcvbk.js → c4Diagram-YGBWAQC7-epfzh8dw.js} +6 -6
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-52g73vyw.js → classDiagram-v2-NBCMYWYE-kbks4qgz.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-ptdnshzh.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-qabfdkzr.js → cynefinDiagram-VND7K2PF-r084stj5.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-kyf5jetf.js → dagre-6A5THRUB-64qc51n1.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-bxrsjtv9.js → diagram-22UHCM2B-70qtb1rm.js} +16 -16
- package/dist/client/static/js/{diagram-3UASUU5V-0f41s00j.js → diagram-3UASUU5V-dgkvnsme.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-0z1zx9h1.js → diagram-ATOU4E4O-rnpsp26v.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-znrmr6bk.js → diagram-CDSNMT55-26hthh60.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-jfe2jhk0.js → diagram-MLGK6HIB-nc1s85r5.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-2kaawmwa.js → diagram-MPIPVDR6-e4dckqhv.js} +3 -3
- package/dist/client/static/js/{dockerfile-12exatm9.js → dockerfile-rxtyyhr1.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-s5n37rfp.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-433rd9fp.js → elk-276RUBZZ-httpkyb1.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-key6ah0b.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-4efkhmca.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-ac376y2k.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-s4gv0rpk.js → index-1dwdgp27.js} +1 -1
- package/dist/client/static/js/{index-0e9nkc0g.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-zs7sjv6x.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-yjmm73jm.js → index-7z9tz4ze.js} +2 -2
- package/dist/client/static/js/{index-zs73zwjz.js → index-7zc1z9z9.js} +4 -4
- package/dist/client/static/js/{index-z78bzryw.js → index-8y51kgan.js} +3 -3
- package/dist/client/static/js/{index-gp57dx2v.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-yzda8j2d.js → index-d8r84zjd.js} +12 -12
- package/dist/client/static/js/{index-02543wk3.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-8k7vjp8b.js → index-egd0vfey.js} +1 -1
- package/dist/client/static/js/{index-dzmar8jr.js → index-enb6chty.js} +1 -1
- package/dist/client/static/js/{index-v3f7we4n.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-raca8tsh.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-50mdqev0.js → index-g3a9j9hf.js} +1 -1
- package/dist/client/static/js/{index-1t5ybx9v.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-f33c4paw.js → index-gwqb7m8g.js} +1 -1
- package/dist/client/static/js/{index-ykfd2fyj.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-82vk27q1.js → index-k9ws464d.js} +2 -2
- package/dist/client/static/js/{index-0pabfaac.js → index-kc3c2gzb.js} +1 -1
- package/dist/client/static/js/{index-5jnvz9hw.js → index-kccp6tgd.js} +2 -2
- package/dist/client/static/js/{index-1y3rzw6b.js → index-kmzd0adv.js} +1 -1
- package/dist/client/static/js/{index-77t0nvt1.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-7a2efrbj.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-cz50ha6x.js → index-r11bbnek.js} +78 -78
- package/dist/client/static/js/{index-zndbhb9w.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-dtj73vs1.js → index-tzbzehqd.js} +1 -1
- package/dist/client/static/js/index-vcrh95gf.css +1 -0
- package/dist/client/static/js/{index-8kbp24xg.js → index-vmgzhp41.js} +1 -1
- package/dist/client/static/js/{index-r9db1gsf.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-4e7ej63f.js → infoDiagram-VRGFBTTK-qv7438m3.js} +1 -1
- package/dist/client/static/js/ini-1x0ad976.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-k3yet1ec.js → ishikawaDiagram-OU5B5YK6-p1w6zg5y.js} +4 -4
- package/dist/client/static/js/java-3944nq02.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-qe352kyd.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-58hag75n.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-6e89h6vm.js → mermaid.core-5s24b4hh.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-ncsam2fm.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-b5ckc39d.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-s4d47ve8.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-zm0ekvjz.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-52vdqf53.js → railroadDiagram-XR7U4H2S-dwy3k2jx.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-7kf8bmk9.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-q98kssv3.js → rust-bmb4ee5w.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-bcb9f54a.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-76ywvj7g.js → sequenceDiagram-PO4LG4MO-0fcmzgdy.js} +19 -19
- package/dist/client/static/js/{sizeCapture-INFHLROL-p9bsf5dc.js → sizeCapture-INFHLROL-t8fcm7rq.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-1ecfb3fs.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-2pyjr946.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-4csxwmn2.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-0p1jnbsn.js → usecaseDiagram-POWQR4AR-sxzrv8ht.js} +43 -43
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-y1hgdet4.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-p578yrgm.js → wardleyDiagram-VNRHLVJA-rvwxn458.js} +4 -4
- package/dist/client/static/js/xml-6ct32gys.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-b08b4ah0.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/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/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/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/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-bxqw3t4k.js +0 -1
- package/dist/client/static/js/LayoutWrapper-zt14rv9m.js +0 -2
- package/dist/client/static/js/Modal-cm35g20x.js +0 -38
- package/dist/client/static/js/SessionsView-gn53zyn7.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-nznq0n36.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-0gbj4270.js +0 -2
- package/dist/client/static/js/index-38xv8h4t.js +0 -1
- package/dist/client/static/js/index-f4vr1c6e.css +0 -1
- package/dist/client/static/js/index-fb6pw9xb.js +0 -2
- package/dist/client/static/js/index-pzvr1699.js +0 -478
- package/dist/client/static/js/index-rf29f3fq.js +0 -9
- package/dist/client/static/js/index-zw621xez.js +0 -4
- 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-qmyne0tn.js +0 -1
- package/dist/client/static/js/one-light-dj0ecjcj.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-qr5hdxm4.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,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, expect, test } from 'bun:test';
|
|
7
|
+
import {
|
|
8
|
+
DEFAULT_COMMIT_MESSAGE_PROMPT,
|
|
9
|
+
renderCommitPrompt,
|
|
10
|
+
validateCommitPrompt,
|
|
11
|
+
} from '@/shared/lib/git/commit-prompt';
|
|
12
|
+
|
|
13
|
+
const VALUES = {
|
|
14
|
+
scope: 'the staged change set',
|
|
15
|
+
branch: 'main',
|
|
16
|
+
recent_commits: '- base',
|
|
17
|
+
files: '- a.ts',
|
|
18
|
+
diff: '+a',
|
|
19
|
+
truncated: '',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
describe('renderCommitPrompt', () => {
|
|
23
|
+
test('fills every known placeholder', () => {
|
|
24
|
+
const rendered = renderCommitPrompt('{{branch}} {{diff}} {{files}}', VALUES);
|
|
25
|
+
expect(rendered).toBe('main +a - a.ts');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test('leaves an unknown placeholder visible', () => {
|
|
29
|
+
expect(renderCommitPrompt('{{branch}} {{nope}}', VALUES)).toBe('main {{nope}}');
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('a diff containing $ is inserted verbatim', () => {
|
|
33
|
+
expect(renderCommitPrompt('{{diff}}', { ...VALUES, diff: '+cost = $5' })).toBe('+cost = $5');
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
describe('validateCommitPrompt', () => {
|
|
38
|
+
test('the built-in prompt is valid', () => {
|
|
39
|
+
expect(validateCommitPrompt(DEFAULT_COMMIT_MESSAGE_PROMPT).ok).toBe(true);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('a prompt without the diff is refused', () => {
|
|
43
|
+
const result = validateCommitPrompt('Write a message from {{files}}.');
|
|
44
|
+
expect(result.ok).toBe(false);
|
|
45
|
+
if (!result.ok) expect(result.error).toContain('{{diff}}');
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The commit-message prompt as DATA: the built-in template, the placeholders it
|
|
8
|
+
* fills, and the one rule a custom template must keep.
|
|
9
|
+
*
|
|
10
|
+
* Shared because the settings page shows the same text the server sends. A
|
|
11
|
+
* second copy in the client is how the editor would offer a prompt the server
|
|
12
|
+
* does not use, or a reset button would restore text that is not the default.
|
|
13
|
+
*
|
|
14
|
+
* `{{diff}}` is REQUIRED. Orca's #20112 is the failure this prevents: a saved
|
|
15
|
+
* template that referenced none of the staged context silently generated the
|
|
16
|
+
* same message in every repository, because the model was asked to describe the
|
|
17
|
+
* template's own example. A prompt without the diff is refused, not run.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export const COMMIT_PROMPT_PLACEHOLDERS = [
|
|
21
|
+
{ key: 'scope', description: '“the staged change set”, or “the commit being amended”.' },
|
|
22
|
+
{ key: 'branch', description: 'The current branch name.' },
|
|
23
|
+
{ key: 'recent_commits', description: 'The last ten subjects, newest first.' },
|
|
24
|
+
{ key: 'files', description: 'The files in this commit.' },
|
|
25
|
+
{ key: 'diff', description: 'The staged patch. Required.' },
|
|
26
|
+
{ key: 'truncated', description: 'A note when the diff was cut to fit the model.' },
|
|
27
|
+
] as const;
|
|
28
|
+
|
|
29
|
+
export type CommitPromptKey = (typeof COMMIT_PROMPT_PLACEHOLDERS)[number]['key'];
|
|
30
|
+
|
|
31
|
+
export type CommitPromptValues = Record<CommitPromptKey, string>;
|
|
32
|
+
|
|
33
|
+
export const DEFAULT_COMMIT_MESSAGE_PROMPT = `You write git commit messages. Return only the commit message, no prose, no code fences.
|
|
34
|
+
|
|
35
|
+
The diff below is {{scope}} — exactly what this commit will contain. Do not describe unstaged or untracked changes; they are not part of this commit.
|
|
36
|
+
|
|
37
|
+
Follow the repository's existing style from the recent commits: language, capitalization, type prefix/scope, and typical length. If the recent commits are inconsistent, use Conventional Commits: <type>: <summary> with feat|fix|refactor|perf|docs|test|build|ci|chore|style|revert.
|
|
38
|
+
|
|
39
|
+
Subject: imperative, <= 72 characters, no trailing period. Body: only when it adds useful information, wrapped at 72 characters, separated from the subject by a blank line.
|
|
40
|
+
|
|
41
|
+
Branch: {{branch}}
|
|
42
|
+
|
|
43
|
+
Recent commits (newest first):
|
|
44
|
+
{{recent_commits}}
|
|
45
|
+
|
|
46
|
+
Files in this commit:
|
|
47
|
+
{{files}}
|
|
48
|
+
|
|
49
|
+
Diff:
|
|
50
|
+
{{diff}}
|
|
51
|
+
|
|
52
|
+
{{truncated}}
|
|
53
|
+
|
|
54
|
+
Return only the commit message.`;
|
|
55
|
+
|
|
56
|
+
/** Fill a template's placeholders. An unknown `{{name}}` is left verbatim, so
|
|
57
|
+
* a typo is visible in the prompt rather than silently becoming empty. */
|
|
58
|
+
export function renderCommitPrompt(template: string, values: CommitPromptValues): string {
|
|
59
|
+
return template.replace(/\{\{\s*([a-z_]+)\s*\}\}/g, (match, key: string) => (
|
|
60
|
+
key in values ? values[key as CommitPromptKey] : match
|
|
61
|
+
));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function validateCommitPrompt(template: string): { ok: true } | { ok: false; error: string } {
|
|
65
|
+
if (!/\{\{\s*diff\s*\}\}/.test(template)) {
|
|
66
|
+
return {
|
|
67
|
+
ok: false,
|
|
68
|
+
error: 'The prompt must include {{diff}} so the model sees the staged changes.',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return { ok: true };
|
|
72
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, expect, test } from 'bun:test';
|
|
7
|
+
import {
|
|
8
|
+
isGitIdentity,
|
|
9
|
+
normalizeGitIdentities,
|
|
10
|
+
type GitIdentity,
|
|
11
|
+
} from '@/shared/lib/git/identity';
|
|
12
|
+
|
|
13
|
+
const WORK: GitIdentity = { id: 'work', name: 'Work User', email: 'work@example.invalid' };
|
|
14
|
+
|
|
15
|
+
describe('isGitIdentity', () => {
|
|
16
|
+
test('accepts a name and an email', () => {
|
|
17
|
+
expect(isGitIdentity(WORK)).toBe(true);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test('refuses a missing name, a missing email, and a malformed id', () => {
|
|
21
|
+
expect(isGitIdentity({ ...WORK, name: ' ' })).toBe(false);
|
|
22
|
+
expect(isGitIdentity({ ...WORK, email: 'not-an-email' })).toBe(false);
|
|
23
|
+
expect(isGitIdentity({ ...WORK, id: 'has space' })).toBe(false);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('refuses angle brackets, which would change the author address', () => {
|
|
27
|
+
expect(isGitIdentity({ ...WORK, name: 'Work <Admin>' })).toBe(false);
|
|
28
|
+
expect(isGitIdentity({ ...WORK, email: 'work@example.invalid>' })).toBe(false);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
describe('normalizeGitIdentities', () => {
|
|
33
|
+
test('drops malformed rows and duplicate ids', () => {
|
|
34
|
+
expect(normalizeGitIdentities([
|
|
35
|
+
WORK,
|
|
36
|
+
{ ...WORK, name: 'Duplicate' },
|
|
37
|
+
{ id: 'bad', name: '', email: 'x@y' },
|
|
38
|
+
{ id: 'other', name: 'Other', email: 'other@example.invalid' },
|
|
39
|
+
])).toEqual([WORK, { id: 'other', name: 'Other', email: 'other@example.invalid' }]);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('a non-array is an empty list', () => {
|
|
43
|
+
expect(normalizeGitIdentities(null)).toEqual([]);
|
|
44
|
+
expect(normalizeGitIdentities({})).toEqual([]);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The commit identity: the name and email a commit carries.
|
|
8
|
+
*
|
|
9
|
+
* Kabmo keeps a library of identities, but the REPOSITORY's local git config is
|
|
10
|
+
* the source of truth for what a commit uses. Applying an identity writes
|
|
11
|
+
* `user.name` / `user.email` to that repository's local config, so the commit,
|
|
12
|
+
* a terminal and an agent in the same checkout all agree — the same model
|
|
13
|
+
* OpenChamber uses. "Repository config" removes what Kabmo wrote and lets the
|
|
14
|
+
* repository's own (or the global) identity answer again.
|
|
15
|
+
*
|
|
16
|
+
* The validation is shared because the settings form and the server must agree
|
|
17
|
+
* on what a usable identity is. `<`, `>` and newlines are refused: a name
|
|
18
|
+
* containing `>` would make git read a different address than the one the user
|
|
19
|
+
* typed.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export interface GitIdentity {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
email: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface GitIdentityValue {
|
|
29
|
+
name: string;
|
|
30
|
+
email: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface GitIdentityRead {
|
|
34
|
+
/** The user's global git config, when both fields are set. */
|
|
35
|
+
global: GitIdentityValue | null;
|
|
36
|
+
/** The saved identity Kabmo last applied, if any. */
|
|
37
|
+
appliedId: string | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const ID_PATTERN = /^[A-Za-z0-9_-]{1,64}$/;
|
|
41
|
+
const FORBIDDEN = /[<>\n\r]/;
|
|
42
|
+
|
|
43
|
+
export function isGitIdentity(value: unknown): value is GitIdentity {
|
|
44
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) return false;
|
|
45
|
+
const record = value as Record<string, unknown>;
|
|
46
|
+
return typeof record.id === 'string'
|
|
47
|
+
&& ID_PATTERN.test(record.id)
|
|
48
|
+
&& typeof record.name === 'string'
|
|
49
|
+
&& record.name.trim().length > 0
|
|
50
|
+
&& record.name.length <= 128
|
|
51
|
+
&& !FORBIDDEN.test(record.name)
|
|
52
|
+
&& typeof record.email === 'string'
|
|
53
|
+
&& record.email.trim().length > 0
|
|
54
|
+
&& record.email.length <= 254
|
|
55
|
+
&& record.email.includes('@')
|
|
56
|
+
&& !FORBIDDEN.test(record.email);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** The stored list, with malformed rows and duplicate ids dropped. */
|
|
60
|
+
export function normalizeGitIdentities(value: unknown): GitIdentity[] {
|
|
61
|
+
if (!Array.isArray(value)) return [];
|
|
62
|
+
const seen = new Set<string>();
|
|
63
|
+
const out: GitIdentity[] = [];
|
|
64
|
+
for (const entry of value) {
|
|
65
|
+
if (!isGitIdentity(entry) || seen.has(entry.id)) continue;
|
|
66
|
+
seen.add(entry.id);
|
|
67
|
+
out.push({ id: entry.id, name: entry.name.trim(), email: entry.email.trim() });
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
@@ -53,6 +53,9 @@ const HARNESS_BASES: Readonly<Record<string, string>> = {
|
|
|
53
53
|
// Hermes' mark is the vendor's black "nous girl" portrait, so it paints in the
|
|
54
54
|
// theme's ink like the other monochrome marks.
|
|
55
55
|
hermes: '#000000',
|
|
56
|
+
// OmO's mark is the vendor's black face on a light plate; the face is the
|
|
57
|
+
// mark, so it paints in the theme's ink like the other monochrome marks.
|
|
58
|
+
omo: '#000000',
|
|
56
59
|
};
|
|
57
60
|
|
|
58
61
|
/**
|
|
@@ -102,6 +102,20 @@ describe('harness catalog after the Gemini retirement', () => {
|
|
|
102
102
|
expect(HARNESS_LAUNCH.hermes?.install).toContain("pm.sync_venv(['acp']");
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
+
test('omo is listed and bridges `omo --mode rpc` through pi-acp', () => {
|
|
106
|
+
// OmO Native ships no ACP server of its own (measured against 5.1.x: no
|
|
107
|
+
// `acp` subcommand). It is a senpi (pi fork) engine, so the pi-acp adapter
|
|
108
|
+
// drives it over `omo --mode rpc`; `PI_ACP_PI_COMMAND` is the adapter's own
|
|
109
|
+
// override for the binary it spawns.
|
|
110
|
+
const descriptor = harnessDescriptor('omo');
|
|
111
|
+
expect(descriptor?.transport).toBe('acp');
|
|
112
|
+
expect(descriptor?.glyph).toBe('omo');
|
|
113
|
+
expect(HARNESS_LAUNCH.omo?.command).toEqual(['npx', '-y', 'pi-acp@0.0.34']);
|
|
114
|
+
expect(HARNESS_LAUNCH.omo?.env).toEqual({ PI_ACP_PI_COMMAND: 'omo' });
|
|
115
|
+
expect(HARNESS_LAUNCH.omo?.requires?.binary).toBe('omo');
|
|
116
|
+
expect(HARNESS_LAUNCH.omo?.install).toContain('get.omo.dev/install.sh');
|
|
117
|
+
});
|
|
118
|
+
|
|
105
119
|
test('every catalog entry has a launch line or is the built-in transport', () => {
|
|
106
120
|
// The built-in transport has no agent to launch by definition; everything
|
|
107
121
|
// else without a line would probe to "no launch command is configured",
|
|
@@ -55,7 +55,12 @@ export type BuiltinHarnessId =
|
|
|
55
55
|
/** Nous Research's Hermes Agent, over the ACP adapter it ships in-tree
|
|
56
56
|
* (`hermes acp`). The stock install exposes only the messages gateway and
|
|
57
57
|
* the TUI; the ACP surface arrives with its `acp` extra. */
|
|
58
|
-
| 'hermes'
|
|
58
|
+
| 'hermes'
|
|
59
|
+
/** Oh My OpenAgent's standalone `omo` command, over the `pi-acp` bridge.
|
|
60
|
+
* OmO Native is a senpi (pi fork) engine, so the adapter's `--mode rpc`
|
|
61
|
+
* surface applies; the CLI ships no ACP server of its own (measured against
|
|
62
|
+
* 5.1.x: no `acp` subcommand). */
|
|
63
|
+
| 'omo';
|
|
59
64
|
|
|
60
65
|
/**
|
|
61
66
|
* A harness id: one this build ships, or one the user added.
|
|
@@ -87,6 +92,7 @@ export const HARNESS_IDS: readonly BuiltinHarnessId[] = [
|
|
|
87
92
|
'jcode',
|
|
88
93
|
'grok',
|
|
89
94
|
'hermes',
|
|
95
|
+
'omo',
|
|
90
96
|
];
|
|
91
97
|
|
|
92
98
|
export interface HarnessDescriptor {
|
|
@@ -142,6 +148,7 @@ export type HarnessGlyph =
|
|
|
142
148
|
| 'jcode'
|
|
143
149
|
| 'grok'
|
|
144
150
|
| 'hermes'
|
|
151
|
+
| 'omo'
|
|
145
152
|
/** A user-added ACP harness: no vendor mark, drawn as its initial. */
|
|
146
153
|
| 'custom';
|
|
147
154
|
|
|
@@ -169,6 +176,7 @@ export const HARNESS_CATALOG: Readonly<Record<BuiltinHarnessId, HarnessDescripto
|
|
|
169
176
|
jcode: { id: 'jcode', label: 'jcode', initial: 'J', transport: 'acp', glyph: 'jcode' },
|
|
170
177
|
grok: { id: 'grok', label: 'grok', initial: 'G', transport: 'acp', glyph: 'grok' },
|
|
171
178
|
hermes: { id: 'hermes', label: 'hermes', initial: 'H', transport: 'acp', glyph: 'hermes' },
|
|
179
|
+
omo: { id: 'omo', label: 'omo', initial: 'O', transport: 'acp', glyph: 'omo' },
|
|
172
180
|
};
|
|
173
181
|
|
|
174
182
|
/**
|
|
@@ -58,6 +58,10 @@ export const HARNESS_MCP_FACTS: Record<BuiltinHarnessId, HarnessMcpFacts> = {
|
|
|
58
58
|
// Hermes' ACP adapter takes the editor's `mcpServers` on session/new and adds
|
|
59
59
|
// them to the servers its own `config.yaml` already enables.
|
|
60
60
|
hermes: { delivery: 'acp', note: 'Injected on session/new, on top of the servers ~/.hermes/config.yaml enables; the editor list is always added.' },
|
|
61
|
+
// OmO's ACP surface is the pi-acp bridge, which takes the editor's
|
|
62
|
+
// `mcpServers` on session/new; OmO's own servers in ~/.omo/agent/mcp.json are
|
|
63
|
+
// added on top.
|
|
64
|
+
omo: { delivery: 'acp', note: 'Injected on session/new through pi-acp, on top of the servers ~/.omo/agent/mcp.json enables.' },
|
|
61
65
|
};
|
|
62
66
|
|
|
63
67
|
/**
|
|
@@ -46,6 +46,7 @@ const WRITABLE: Record<string, string> = {
|
|
|
46
46
|
opencode: 'json-provider',
|
|
47
47
|
codex: 'toml-model-providers',
|
|
48
48
|
pi: 'json-providers',
|
|
49
|
+
omo: 'json-providers',
|
|
49
50
|
kimi: 'toml-providers',
|
|
50
51
|
qwen: 'json-model-providers',
|
|
51
52
|
zcode: 'zcode-provider-rules',
|
|
@@ -71,6 +72,16 @@ describe('the measured registry table', () => {
|
|
|
71
72
|
expect(providerFacts('omp-rpc').registry.kind).toBe('yaml-providers');
|
|
72
73
|
});
|
|
73
74
|
|
|
75
|
+
test('omo keeps its own models.json, not pi’s', () => {
|
|
76
|
+
// OmO Native is a senpi (pi fork) engine, so the SHAPE is pi's; the file is
|
|
77
|
+
// under OmO's own agent dir, and writing pi's file would leave OmO unchanged.
|
|
78
|
+
expect(providerFacts('omo').registry.kind).toBe('json-providers');
|
|
79
|
+
expect(providerFacts('omo').registry.file).toBe('.omo/agent/models.json');
|
|
80
|
+
expect(providerFacts('omo').registry.file).not.toBe(providerFacts('pi').registry.file);
|
|
81
|
+
expect(registryLabel('omo')).toBe('models.json (omo)');
|
|
82
|
+
expect(registryLabel('pi')).toBe('models.json (pi)');
|
|
83
|
+
});
|
|
84
|
+
|
|
74
85
|
test('the writable harnesses are exactly the ones with a format writer', () => {
|
|
75
86
|
for (const [id, kind] of Object.entries(WRITABLE)) {
|
|
76
87
|
expect(providerFacts(id).registry.kind).toBe(kind as never);
|
|
@@ -103,6 +103,20 @@ export const HARNESS_PROVIDER_FACTS: Readonly<Partial<Record<HarnessId, HarnessP
|
|
|
103
103
|
importFrom: ['omp-rpc', 'opencode', 'codex'],
|
|
104
104
|
summary: 'pi reads providers from models.json; each needs a baseUrl and an api.',
|
|
105
105
|
},
|
|
106
|
+
omo: {
|
|
107
|
+
registry: {
|
|
108
|
+
// OmO Native is a senpi (pi fork) engine and keeps the same models.json
|
|
109
|
+
// shape under its own agent dir (`~/.omo/agent`, or OMO_CODING_AGENT_DIR /
|
|
110
|
+
// SENPI_CODING_AGENT_DIR). Measured on 5.1.9: `providers.<id>` with
|
|
111
|
+
// `name`, `api`, `baseUrl`, `apiKey` and `models`.
|
|
112
|
+
kind: 'json-providers', file: '.omo/agent/models.json', pointer: 'providers',
|
|
113
|
+
writable: true, baseUrlField: 'baseUrl', apiKeyField: 'apiKey',
|
|
114
|
+
dialectField: 'api', modelsField: 'models',
|
|
115
|
+
},
|
|
116
|
+
createsChoice: true,
|
|
117
|
+
importFrom: ['omp-rpc', 'opencode', 'codex', 'pi'],
|
|
118
|
+
summary: 'OmO reads providers from ~/.omo/agent/models.json; each needs a baseUrl and an api.',
|
|
119
|
+
},
|
|
106
120
|
kimi: {
|
|
107
121
|
registry: {
|
|
108
122
|
// MEASURED: the binary this build updates is `@moonshot-ai/kimi-code`,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* two tables would keep disagreeing about the same file.
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
import type
|
|
23
|
+
import { harnessDescriptor, type HarnessId } from '@/shared/lib/harness/catalog';
|
|
24
24
|
import type { ProviderRegistryKind } from '@/shared/lib/harness/provider-contracts';
|
|
25
25
|
import { providerFacts } from '@/shared/lib/harness/provider-lookup';
|
|
26
26
|
|
|
@@ -34,7 +34,7 @@ export function registryLabel(id: string | null | undefined): string {
|
|
|
34
34
|
case 'yaml-providers': return 'models.yml (omp)';
|
|
35
35
|
case 'json-provider': return 'opencode.json';
|
|
36
36
|
case 'toml-model-providers': return 'config.toml (codex)';
|
|
37
|
-
case 'json-providers': return
|
|
37
|
+
case 'json-providers': return `models.json (${harnessDescriptor(id)?.label ?? 'pi'})`;
|
|
38
38
|
case 'toml-providers': return 'config.toml (kimi)';
|
|
39
39
|
case 'json-model-providers': return 'settings.json (qwen)';
|
|
40
40
|
case 'zcode-provider-rules': return 'provider_config.json (zcode)';
|
|
@@ -95,9 +95,17 @@ describe('update facts per harness', () => {
|
|
|
95
95
|
expect(harnessUpdateFacts('claude')?.agentBin).toBe('claude-agent-acp');
|
|
96
96
|
expect(harnessUpdateFacts('codex')?.agentBin).toBe('codex-acp');
|
|
97
97
|
expect(harnessUpdateFacts('pi')?.agentBin).toBe('pi-acp');
|
|
98
|
+
expect(harnessUpdateFacts('omo')?.agentBin).toBe('pi-acp');
|
|
98
99
|
expect(harnessUpdateFacts('zcode')?.agentBin).toBe('zcode-acp-server');
|
|
99
100
|
});
|
|
100
101
|
|
|
102
|
+
test('omo reports the adapter and names the CLI it drives', () => {
|
|
103
|
+
// The probe reports `pi-acp`; the binary underneath is OmO Native, which
|
|
104
|
+
// updates through its own installer rather than an npm package.
|
|
105
|
+
expect(latestSourceFor('omo')).toBe('pi-acp');
|
|
106
|
+
expect(harnessUpdateFacts('omo')?.cli).toEqual({ bin: 'omo', name: 'OmO' });
|
|
107
|
+
});
|
|
108
|
+
|
|
101
109
|
test('an unknown harness has no facts at all', () => {
|
|
102
110
|
expect(harnessUpdateFacts('some-future-agent')).toBeNull();
|
|
103
111
|
expect(latestSourceFor('some-future-agent')).toBeNull();
|
|
@@ -120,6 +120,15 @@ export const HARNESS_UPDATE_FACTS: Readonly<Partial<Record<HarnessId, HarnessUpd
|
|
|
120
120
|
// The ADAPTER is on npm; the agent it drives is not, so the note names both.
|
|
121
121
|
note: 'The row reports the ADAPTER; the `pi` binary it drives versions separately.',
|
|
122
122
|
},
|
|
123
|
+
omo: {
|
|
124
|
+
// Same adapter as pi: the probe reports `pi-acp`, while the CLI underneath
|
|
125
|
+
// is OmO Native (`omo --version`), which updates through its own installer.
|
|
126
|
+
kind: 'npm',
|
|
127
|
+
pkg: 'pi-acp',
|
|
128
|
+
agentBin: 'pi-acp',
|
|
129
|
+
cli: { bin: 'omo', name: 'OmO' },
|
|
130
|
+
note: 'The row reports the ADAPTER; the `omo` binary updates with its own installer (`omo update`).',
|
|
131
|
+
},
|
|
123
132
|
qwen: { kind: 'npm', pkg: '@qwen-code/qwen-code' },
|
|
124
133
|
kimi: { kind: 'npm', pkg: '@moonshot-ai/kimi-code' },
|
|
125
134
|
minimax: { kind: 'npm', pkg: '@minimax-ai/code' },
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The daemon/service snapshot behind a `proc://` result and a `bash` service
|
|
8
|
+
* launch, read from either generation omp has written.
|
|
9
|
+
*
|
|
10
|
+
* omp 19.0.0 replaced the launch broker's `DaemonSnapshot` — `{name, pid,
|
|
11
|
+
* persist, detached}` — with a daemon unit's `UnitSnapshot` — `{key, label,
|
|
12
|
+
* pids, policy.hold}`. A session recorded before the pin still carries the old
|
|
13
|
+
* fields, so one reader maps both into {@link ProcDaemon}.
|
|
14
|
+
*
|
|
15
|
+
* Split out of `proc.ts` at the repo's per-file ceiling; the job/agent readers
|
|
16
|
+
* and the URL grammar stay there.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { isRecord } from '@/shared/lib/util/guards';
|
|
20
|
+
|
|
21
|
+
export interface ProcDaemon {
|
|
22
|
+
/** The service name: `key` on a 19.0.0 unit, `name` on the broker snapshot older sessions carry. */
|
|
23
|
+
name?: string;
|
|
24
|
+
/** Human label for the board (19.0.0 units only). */
|
|
25
|
+
label?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
state?: string;
|
|
28
|
+
/** Main process: `pids[0]` on a 19.0.0 unit, `pid` on the broker snapshot. */
|
|
29
|
+
pid?: number;
|
|
30
|
+
createdAt?: number;
|
|
31
|
+
startedAt?: number;
|
|
32
|
+
readyAt?: number;
|
|
33
|
+
exitedAt?: number;
|
|
34
|
+
exitCode?: number;
|
|
35
|
+
restartCount?: number;
|
|
36
|
+
outputBytes?: number;
|
|
37
|
+
readyMatch?: string;
|
|
38
|
+
/** 19.0.0 unit policy: what keeps it alive. */
|
|
39
|
+
hold?: 'leases' | 'persist' | 'detached';
|
|
40
|
+
/** Broker snapshot (pre-19.0.0) lifetime flags. */
|
|
41
|
+
persist?: boolean;
|
|
42
|
+
detached?: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function asString(value: unknown): string | undefined {
|
|
46
|
+
return typeof value === 'string' && value.trim() ? value : undefined;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function asNumber(value: unknown): number | undefined {
|
|
50
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function asBoolean(value: unknown): boolean | undefined {
|
|
54
|
+
return typeof value === 'boolean' ? value : undefined;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Normalize a daemon snapshot of either generation. */
|
|
58
|
+
export function daemonOf(value: unknown): ProcDaemon | undefined {
|
|
59
|
+
if (!isRecord(value)) return undefined;
|
|
60
|
+
const pids = Array.isArray(value.pids)
|
|
61
|
+
? value.pids.filter((pid): pid is number => typeof pid === 'number' && Number.isFinite(pid))
|
|
62
|
+
: [];
|
|
63
|
+
const policy = isRecord(value.policy) ? value.policy : undefined;
|
|
64
|
+
const hold = asString(policy?.hold);
|
|
65
|
+
return {
|
|
66
|
+
name: asString(value.key) ?? asString(value.name),
|
|
67
|
+
label: asString(value.label),
|
|
68
|
+
id: asString(value.id),
|
|
69
|
+
state: asString(value.state),
|
|
70
|
+
pid: asNumber(value.pid) ?? pids[0],
|
|
71
|
+
createdAt: asNumber(value.createdAt),
|
|
72
|
+
startedAt: asNumber(value.startedAt),
|
|
73
|
+
readyAt: asNumber(value.readyAt),
|
|
74
|
+
exitedAt: asNumber(value.exitedAt),
|
|
75
|
+
exitCode: asNumber(value.exitCode),
|
|
76
|
+
restartCount: asNumber(value.restartCount),
|
|
77
|
+
outputBytes: asNumber(value.outputBytes),
|
|
78
|
+
readyMatch: asString(value.readyMatch),
|
|
79
|
+
hold: hold === 'leases' || hold === 'persist' || hold === 'detached' ? hold : undefined,
|
|
80
|
+
persist: asBoolean(value.persist) ?? (hold === 'persist' ? true : undefined),
|
|
81
|
+
detached: asBoolean(value.detached) ?? (hold === 'detached' ? true : undefined),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Tone for a daemon state — omp's own union, mapped to the ink palette. */
|
|
86
|
+
export function daemonTone(state: string | undefined): 'ok' | 'warn' | 'error' | 'muted' {
|
|
87
|
+
switch (state) {
|
|
88
|
+
case 'ready':
|
|
89
|
+
case 'running':
|
|
90
|
+
return 'ok';
|
|
91
|
+
case 'failed':
|
|
92
|
+
return 'error';
|
|
93
|
+
case 'starting':
|
|
94
|
+
case 'restarting':
|
|
95
|
+
case 'stopping':
|
|
96
|
+
return 'warn';
|
|
97
|
+
default:
|
|
98
|
+
return 'muted';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** `1h 4m` / `12m 3s` / `840ms` — the scale a service lives on. */
|
|
103
|
+
export function formatProcDuration(ms: number): string {
|
|
104
|
+
if (!Number.isFinite(ms) || ms < 0) return '';
|
|
105
|
+
if (ms < 1000) return `${Math.round(ms)}ms`;
|
|
106
|
+
const totalSeconds = Math.floor(ms / 1000);
|
|
107
|
+
if (totalSeconds < 60) return `${totalSeconds}s`;
|
|
108
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
109
|
+
if (minutes < 60) return `${minutes}m ${totalSeconds % 60}s`;
|
|
110
|
+
const hours = Math.floor(minutes / 60);
|
|
111
|
+
return `${hours}h ${minutes % 60}m`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* How long a daemon has been up, or how long it ran before it exited. An
|
|
116
|
+
* exited service's span is `exitedAt - startedAt`, never `now - startedAt` —
|
|
117
|
+
* a service that died an hour ago has not been running for an hour.
|
|
118
|
+
*/
|
|
119
|
+
export function procUptime(daemon: ProcDaemon, now = Date.now()): { label: string; ms: number } | undefined {
|
|
120
|
+
if (typeof daemon.startedAt !== 'number') return undefined;
|
|
121
|
+
const end = typeof daemon.exitedAt === 'number' ? daemon.exitedAt : now;
|
|
122
|
+
const ms = Math.max(0, end - daemon.startedAt);
|
|
123
|
+
return { label: formatProcDuration(ms), ms };
|
|
124
|
+
}
|
|
@@ -16,15 +16,13 @@
|
|
|
16
16
|
import { describe, expect, test } from 'bun:test';
|
|
17
17
|
import {
|
|
18
18
|
bashServiceOf,
|
|
19
|
-
daemonTone,
|
|
20
|
-
formatProcDuration,
|
|
21
19
|
jobTone,
|
|
22
20
|
parseProcUrl,
|
|
23
21
|
procOpLabel,
|
|
24
22
|
procPathOf,
|
|
25
|
-
procUptime,
|
|
26
23
|
procViewOf,
|
|
27
24
|
} from '@/shared/lib/omp/session/proc';
|
|
25
|
+
import { daemonTone, formatProcDuration, procUptime } from '@/shared/lib/omp/session/proc-daemon';
|
|
28
26
|
|
|
29
27
|
describe('parseProcUrl', () => {
|
|
30
28
|
test('reads the bare listing', () => {
|
|
@@ -131,6 +129,35 @@ describe('procViewOf — read', () => {
|
|
|
131
129
|
expect(view?.terminalRows).toEqual(['$ bun run dev', 'boom']);
|
|
132
130
|
});
|
|
133
131
|
|
|
132
|
+
test('reads a 19.0.0 unit snapshot, whose name is `key` and pid is `pids[0]`', () => {
|
|
133
|
+
const view = procViewOf({
|
|
134
|
+
target: 'proc://ompdev',
|
|
135
|
+
details: {
|
|
136
|
+
proc: {
|
|
137
|
+
daemon: {
|
|
138
|
+
id: 'u_7bf84d40',
|
|
139
|
+
kind: 'proc',
|
|
140
|
+
key: 'ompdev',
|
|
141
|
+
label: 'omp dev server',
|
|
142
|
+
state: 'ready',
|
|
143
|
+
pids: [22985, 22986],
|
|
144
|
+
startedAt: 1,
|
|
145
|
+
policy: { hold: 'persist', idleMs: 0, onIdle: 'stop', restart: 'no', survive: 'exec' },
|
|
146
|
+
},
|
|
147
|
+
log: '$ bun run dev',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
expect(view?.daemon).toMatchObject({
|
|
152
|
+
name: 'ompdev',
|
|
153
|
+
label: 'omp dev server',
|
|
154
|
+
pid: 22985,
|
|
155
|
+
state: 'ready',
|
|
156
|
+
hold: 'persist',
|
|
157
|
+
persist: true,
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
134
161
|
test('reads the listing', () => {
|
|
135
162
|
const view = procViewOf({
|
|
136
163
|
target: 'proc://',
|