@kabmo-labs/kabmo 0.32.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +537 -530
- package/dist/client/static/js/{CsvGrid-amafmq3z.js → CsvGrid-fncjbg6j.js} +2 -2
- package/dist/client/static/js/{DocxView-851ps9t0.js → DocxView-c9v2vr3r.js} +5 -5
- package/dist/client/static/js/{DrawioView-kw1vy3r2.js → DrawioView-vxjksm12.js} +2 -2
- package/dist/client/static/js/ImageView-a3g5k226.js +1 -0
- package/dist/client/static/js/LayoutWrapper-hnjfwsjh.js +2 -0
- package/dist/client/static/js/Modal-qtftcp2t.js +38 -0
- package/dist/client/static/js/{PdfView-f5jkm0rs.js → PdfView-ksaes53y.js} +1 -1
- package/dist/client/static/js/SessionsView-30vcr95v.js +1 -0
- package/dist/client/static/js/{SheetView-23zxy30b.js → SheetView-vc484scg.js} +23 -23
- package/dist/client/static/js/{SvgPreview-c341y50e.js → SvgPreview-tph89jet.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-2dc3mpk6.js → abnfDiagram-O67JEVCF-xbar278c.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-tavtgb8a.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-7jmrr5ja.js → architectureDiagram-NJMV4G6O-s171n2z6.js} +3 -3
- package/dist/client/static/js/{astro-sjtf954j.js → astro-80bs6hvg.js} +1 -1
- package/dist/client/static/js/bash-b3rwyg5p.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-jrk2m0ea.js → blockDiagram-BEXU5L5S-gzx6rv9n.js} +3 -3
- package/dist/client/static/js/c-wkgxb1t1.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-48cyncjd.js → c4Diagram-YGBWAQC7-7f00skch.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-gm7jt1cd.js → classDiagram-v2-NBCMYWYE-j79v95nc.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-g0g3z0xp.js → cose-bilkent-JH36ORCC-5fkn7ee5.js} +1 -1
- package/dist/client/static/js/cpp-y0t6mynx.js +1 -0
- package/dist/client/static/js/css-6vj0d308.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-cdh3n2z2.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-6vjde6am.js → cynefinDiagram-VND7K2PF-cfs1yvrd.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-q6k8bx1j.js → dagre-6A5THRUB-44bgc48p.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-87cmze2n.js → diagram-22UHCM2B-a4g4x83k.js} +19 -19
- package/dist/client/static/js/{diagram-3UASUU5V-1ejbr2p4.js → diagram-3UASUU5V-gm4rg5na.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-vaw1r6k2.js → diagram-ATOU4E4O-a95y41vk.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-gxm9zv7d.js → diagram-CDSNMT55-t3j93mmc.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-x010xswm.js → diagram-MLGK6HIB-c2wdez02.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-qtcq7e6c.js → diagram-MPIPVDR6-gya9jhs5.js} +2 -2
- package/dist/client/static/js/{dockerfile-k5xbramm.js → dockerfile-a7q6174s.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-nwwbasfh.js → ebnfDiagram-ZINNZB2B-jjhkza6t.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-xcp7thax.js → elk-276RUBZZ-f7re45mw.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-xj1tp716.js → erDiagram-OPXOYQCR-tpm9g5te.js} +6 -6
- package/dist/client/static/js/{erlang-rz1g9mxy.js → erlang-qt876zrq.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-as97tpyp.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-ggm06d12.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-f7q96bea.js → ganttDiagram-FUAMR5RP-fz43n12d.js} +4 -4
- package/dist/client/static/js/gitGraph-4MIJSDKK-eqz7p9ng.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-1rydkyq9.js → gitGraphDiagram-X574FWY7-f61hgbn6.js} +9 -9
- package/dist/client/static/js/graphql-n43pd5fs.js +1 -0
- package/dist/client/static/js/{index-0g25yrc0.js → index-03h3bkcf.js} +1 -1
- package/dist/client/static/js/{index-8m3q2zpb.js → index-0e40xskg.js} +1 -1
- package/dist/client/static/js/{index-w5131mtt.js → index-0n5wwe60.js} +2 -2
- package/dist/client/static/js/{index-ynqnbvn2.js → index-0tf0arsp.js} +3 -3
- package/dist/client/static/js/{index-0a1ekhqf.js → index-14vndmcr.js} +2 -2
- package/dist/client/static/js/index-1a0zkj8h.js +2 -0
- package/dist/client/static/js/{index-zca66d5d.js → index-1xqs14fr.js} +3 -3
- package/dist/client/static/js/{index-73xfkyea.js → index-1y9r4frb.js} +2 -2
- package/dist/client/static/js/{index-0n9c85ke.js → index-2svnq5gg.js} +2 -2
- package/dist/client/static/js/{index-pe9j88d4.js → index-2x5f66t6.js} +2 -2
- package/dist/client/static/js/{index-ggaqh9rt.js → index-354mqqra.js} +2 -2
- package/dist/client/static/js/{index-2t2tnc3x.js → index-3rcjx70v.js} +1 -1
- package/dist/client/static/js/{index-9nbxb421.js → index-3zc1b0dv.js} +2 -2
- package/dist/client/static/js/{index-14wppnkx.js → index-5tgq7aqx.js} +2 -2
- package/dist/client/static/js/{index-vrbcj11n.js → index-76zb4m0n.js} +2 -2
- package/dist/client/static/js/{index-x64kqgen.js → index-7y6rpsrp.js} +2 -2
- package/dist/client/static/js/{index-2n5wy1sh.js → index-8239j2v1.js} +1 -1
- package/dist/client/static/js/{index-pkyrkkbt.js → index-9fjt5anh.js} +2 -2
- package/dist/client/static/js/{index-m6wwc5h6.js → index-9t82sx0w.js} +2 -2
- package/dist/client/static/js/{index-hkq0y3pn.js → index-9y3gjdj7.js} +2 -2
- package/dist/client/static/js/{index-hyry1n8x.js → index-ahv9y42z.js} +2 -2
- package/dist/client/static/js/{index-f519m6s3.js → index-ajs3jj6j.js} +1 -1
- package/dist/client/static/js/index-apvkd37e.js +4 -0
- package/dist/client/static/js/index-at6bhjyf.js +1 -0
- package/dist/client/static/js/index-bkye8mz4.js +2 -0
- package/dist/client/static/js/{index-e7a3fkvv.js → index-d495kfm0.js} +1 -1
- package/dist/client/static/js/{index-hhm62nfj.js → index-dbe6afkf.js} +2 -2
- package/dist/client/static/js/{index-c20a46ww.js → index-djmg1d7h.js} +2 -2
- package/dist/client/static/js/{index-fc2j6bq2.js → index-e4p4cd3r.js} +2 -2
- package/dist/client/static/js/{index-f63y3mjj.js → index-eyzeya95.js} +5 -5
- package/dist/client/static/js/{index-123e8tqq.js → index-gcs49f3p.js} +1 -1
- package/dist/client/static/js/{index-c8jzx6b0.js → index-gs6f0qwa.js} +2 -2
- package/dist/client/static/js/{index-6sdctwv2.js → index-hf52f59k.js} +2 -2
- package/dist/client/static/js/{index-3anc30zh.js → index-j0r5hj0j.js} +2 -2
- package/dist/client/static/js/{index-31jrebvn.js → index-js7t1vb1.js} +18 -18
- package/dist/client/static/js/{index-xa7nrnda.js → index-km2zb6wk.js} +2 -2
- package/dist/client/static/js/{index-yvcpdk5f.js → index-m73za75e.js} +1 -1
- package/dist/client/static/js/{index-e6rar25v.js → index-pbe4yed4.js} +2 -2
- package/dist/client/static/js/{index-xpf2ra60.js → index-pxv2nw9w.js} +1 -1
- package/dist/client/static/js/{index-deex10rz.js → index-q2w6s8n7.js} +5 -5
- package/dist/client/static/js/{index-22jaxtz1.js → index-qckv9nte.js} +2 -2
- package/dist/client/static/js/{index-e26rd868.js → index-qsm2z36d.js} +2 -2
- package/dist/client/static/js/{index-5zd1jx9r.js → index-rg8jpbsw.js} +2 -2
- package/dist/client/static/js/{index-gvwqjpcr.js → index-rytaa8ca.js} +2 -2
- package/dist/client/static/js/{index-fmxn1rzs.js → index-sdtye3jy.js} +2 -2
- package/dist/client/static/js/index-sffjtm5w.js +12 -0
- package/dist/client/static/js/{index-tr8754r0.js → index-trm9x02n.js} +45 -45
- package/dist/client/static/js/{index-cwaz6geq.js → index-vtbbfwx0.js} +2 -2
- package/dist/client/static/js/{index-vmvcse63.js → index-vw4brsdx.js} +1 -1
- package/dist/client/static/js/{index-qmh0h87h.js → index-vw5k8csz.js} +55 -55
- package/dist/client/static/js/{index-52bgxh6f.js → index-w0fwb80e.js} +1 -1
- package/dist/client/static/js/{index-s9vp6p70.js → index-x07kp3jz.js} +2 -2
- package/dist/client/static/js/{index-8a3tmm1h.js → index-xj9649ac.js} +7 -7
- package/dist/client/static/js/{index-w4re5r8w.js → index-ypx3qmhq.js} +2 -2
- package/dist/client/static/js/{index-y139vc12.js → index-zt75xpq0.js} +193 -193
- package/dist/client/static/js/{index-nsrnyqcm.js → index-zvfvqvn9.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-4pkzh1qx.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-ptg07tp2.js → infoDiagram-VRGFBTTK-1qj804sn.js} +1 -1
- package/dist/client/static/js/ini-j5dyq6gm.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-bdk2dkf5.js → ishikawaDiagram-OU5B5YK6-4j4qsnzw.js} +3 -3
- package/dist/client/static/js/java-g4dgwbfd.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kez0ha4c.js → journeyDiagram-ZHPQQLJL-j0brnfft.js} +4 -4
- package/dist/client/static/js/json-j5q8nt57.js +1 -0
- package/dist/client/static/js/jsx-7t5ecz9s.js +1 -0
- package/dist/client/static/js/{julia-nmr85k8z.js → julia-4ghmfy3e.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-dhzp3qg5.js → kanban-definition-PNTS6WVX-qqc22br0.js} +3 -3
- package/dist/client/static/js/lua-1g6w30de.js +1 -0
- package/dist/client/static/js/markdown-afx21x8c.js +1 -0
- package/dist/client/static/js/{mermaid.core-h7wttbss.js → mermaid.core-vv3wbe65.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-tq5dd1em.js → mindmap-definition-NLK3R4M7-y5b2z8zp.js} +4 -4
- package/dist/client/static/js/one-dark-pro-hm3f56n1.js +1 -0
- package/dist/client/static/js/one-light-xrz49rct.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-yg71sp88.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-e5hrdfzv.js → pegDiagram-GJSIUBJH-0be07mqs.js} +1 -1
- package/dist/client/static/js/{perl-prxcva8r.js → perl-sd00t4b4.js} +1 -1
- package/dist/client/static/js/{php-m9kcctzs.js → php-2zfyqa61.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-89wd6np0.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-axvbvnz8.js → pieDiagram-5QR66LMP-544w86jk.js} +2 -2
- package/dist/client/static/js/properties-thd83wey.js +1 -0
- package/dist/client/static/js/python-264ns4xw.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-wtn28cfm.js → quadrantDiagram-O4NWA36T-p09e7z5s.js} +4 -4
- package/dist/client/static/js/r-qw82kkv9.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-avn0b8r9.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-de27xv5w.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rg4zzj7x.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d84fhj8v.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-dvf8xrmc.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-avjkq945.js → railroadDiagram-XR7U4H2S-de830ed2.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-bntx7r6q.js → requirementDiagram-PLB6GJNP-b47d74p1.js} +4 -4
- package/dist/client/static/js/{ruby-t06c0e7g.js → ruby-v9qaqhby.js} +1 -1
- package/dist/client/static/js/{rust-6gqjxyf0.js → rust-fkt0qyrs.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-ps8nkdm2.js → sankeyDiagram-IPEJSGJF-6ezc2fpj.js} +5 -5
- package/dist/client/static/js/{sass-gsbyn3wh.js → sass-9bxped7y.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3ckf1q6z.js → sequenceDiagram-PO4LG4MO-by5zqj6w.js} +18 -18
- package/dist/client/static/js/{sizeCapture-INFHLROL-akvcr1x7.js → sizeCapture-INFHLROL-q85r06j6.js} +1 -1
- package/dist/client/static/js/sql-g8wcshpc.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-c82914fz.js → stateDiagram-v2-GCMORJYK-ep5pyexs.js} +3 -3
- package/dist/client/static/js/{svelte-j54gfrvq.js → svelte-mwtx07d9.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-scgdefh4.js → swimlanes-2SLR337P-95fcqkh8.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xs2en5dv.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-z2ha1rhq.js → timeline-definition-EJHVYXUP-461e615g.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-mham0bh6.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-mxrxax86.js +1 -0
- package/dist/client/static/js/tsx-nm94hed6.js +1 -0
- package/dist/client/static/js/typescript-0s2t05jj.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-3wdmrfmk.js → usecaseDiagram-POWQR4AR-ftqfnvhg.js} +38 -38
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-7m5tatzv.js → vennDiagram-UO4OBE2U-7t96h6ez.js} +7 -7
- package/dist/client/static/js/{vue-y8bb5f3h.js → vue-j8vb9d7r.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-8vrvh9p3.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-55ps9s4z.js → wardleyDiagram-VNRHLVJA-0de8w8c6.js} +4 -4
- package/dist/client/static/js/xml-dz51p1m3.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-8bsjtm4t.js → xychartDiagram-PMCCYNJV-dez9phkf.js} +5 -5
- package/dist/client/static/js/yaml-2cfkd30t.js +1 -0
- package/package.json +1 -1
- package/src/client/components/common/context-usage-button/McpSection.test.tsx +98 -0
- package/src/client/components/common/context-usage-button/McpSection.tsx +12 -5
- package/src/client/components/common/context-usage-button/SessionStats.tsx +80 -0
- package/src/client/components/common/context-usage-button/index.test.tsx +26 -0
- package/src/client/components/common/context-usage-button/index.tsx +36 -28
- package/src/client/components/common/harness-glyph/brands.ts +8 -0
- package/src/client/components/common/session-actions-menu/index.tsx +6 -1
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +20 -33
- package/src/client/components/mobile/LayoutWrapper.tsx +28 -29
- package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
- package/src/client/components/mobile/worktree-session.ts +4 -1
- package/src/client/components/settings/apply-side-effects.test.ts +11 -0
- package/src/client/components/settings/apply-side-effects.ts +7 -0
- package/src/client/components/settings/categories/ChatSettings.test.tsx +1 -1
- package/src/client/components/settings/categories/ChatSettings.tsx +2 -0
- package/src/client/components/settings/categories/NotificationSettings.tsx +1 -1
- package/src/client/components/settings/categories/chat-settings/ChangedFilesSection.tsx +79 -0
- package/src/client/components/settings/categories/chat-settings/groups.ts +4 -3
- package/src/client/components/workspace/chat-timeline/ChangedFilesSummary.tsx +101 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +16 -15
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +33 -1
- package/src/client/components/workspace/chat-timeline/RunFooter.tsx +21 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +13 -0
- package/src/client/components/workspace/chat-timeline/fork-preview.test.tsx +11 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
- package/src/client/components/workspace/diff-panel/Toolbar.tsx +17 -51
- package/src/client/components/workspace/diff-panel/index.tsx +23 -4
- package/src/client/components/workspace/diff-panel/toolbar-git-actions.tsx +94 -0
- package/src/client/components/workspace/editor/Body.tsx +2 -0
- package/src/client/data/settings/omp-schema.json +73 -3
- package/src/client/hooks/chat/btw/mode.ts +5 -1
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +9 -3
- package/src/client/hooks/chat/timeline/changed-files-setting.test.ts +31 -0
- package/src/client/hooks/chat/timeline/changed-files-setting.ts +60 -0
- package/src/client/hooks/chat/timeline/new-chat.ts +4 -1
- package/src/client/hooks/chat/timeline/pending-dispatch.ts +6 -10
- package/src/client/hooks/chat/timeline/session-changes.ts +51 -0
- package/src/client/hooks/chat/waiting/dispatch.ts +4 -1
- package/src/client/hooks/ui/notification-events.test.ts +3 -0
- package/src/client/hooks/ui/notification-events.ts +3 -1
- package/src/client/hooks/ui/notification-sound.ts +13 -6
- package/src/client/hooks/ui/ui-sounds.test.ts +15 -0
- package/src/client/hooks/workspace/batch-delete-run.ts +5 -1
- package/src/client/hooks/workspace/diff-file.ts +11 -4
- package/src/client/hooks/workspace/file-tabs.ts +13 -4
- package/src/client/hooks/workspace/journal-diff.ts +97 -0
- package/src/client/hooks/workspace/session-delete.ts +5 -1
- package/src/client/lib/notifications/native-banner-sound.test.ts +93 -0
- package/src/client/lib/notifications/native-banner-sound.ts +46 -0
- package/src/client/lib/notifications/os.test.ts +14 -5
- package/src/client/lib/notifications/os.ts +8 -0
- package/src/client/lib/router/branch-params.test.ts +62 -0
- package/src/client/lib/router/branch-params.ts +48 -0
- package/src/server/lib/assets/shell-settings.server.test.ts +35 -0
- package/src/server/lib/assets/shell-settings.server.ts +33 -0
- package/src/server/lib/harness/launch-table.ts +10 -0
- package/src/server/lib/omp/session/changes.test.ts +138 -0
- package/src/server/lib/omp/session/changes.ts +220 -0
- package/src/server/lib/omp/session/session-discovery.test.ts +4 -4
- package/src/server/lib/omp/session/sidebar-activity.server.test.ts +6 -2
- package/src/server/lib/omp/session/subagent-presence-scan.ts +54 -0
- package/src/server/lib/omp/session/subagent-presence-store.test.ts +1 -1
- package/src/server/lib/omp/session/subagent-presence.test.ts +115 -0
- package/src/server/lib/omp/session/subagent-presence.ts +12 -3
- package/src/server/lib/omp/session/telemetry/compute.ts +68 -0
- package/src/server/lib/omp/session/telemetry.test.ts +81 -0
- package/src/server/lib/realtime/topics/peer-relay.server.test.ts +1 -11
- package/src/server/plugins/ssr.ts +20 -8
- package/src/server/routes/sessions/changes.test.ts +90 -0
- package/src/server/routes/sessions/changes.ts +55 -0
- package/src/server/routes/sessions/index.ts +6 -0
- package/src/shared/lib/chat/duration.ts +34 -0
- package/src/shared/lib/chat/timeline/changed-files.test.ts +121 -0
- package/src/shared/lib/chat/timeline/changed-files.ts +71 -0
- package/src/shared/lib/chat/timeline/fork-anchor.test.ts +3 -0
- package/src/shared/lib/format/duration.test.ts +31 -0
- package/src/shared/lib/format/duration.ts +27 -0
- package/src/shared/lib/fs/unified-diff.test.ts +53 -0
- package/src/shared/lib/fs/unified-diff.ts +127 -0
- package/src/shared/lib/harness/brand-color.ts +3 -0
- package/src/shared/lib/harness/catalog.test.ts +13 -0
- package/src/shared/lib/harness/catalog.ts +8 -1
- package/src/shared/lib/harness/fork.ts +4 -2
- package/src/shared/lib/harness/mcp-facts.ts +3 -0
- package/src/shared/lib/harness/provider-facts.ts +14 -0
- package/src/shared/lib/harness/updates.ts +5 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +27 -27
- package/src/shared/lib/omp/config/schema.test.ts +4 -2
- package/src/shared/lib/settings/defaults.ts +1 -0
- package/src/shared/lib/workspace/file-tab-id.ts +9 -0
- package/src/shared/types/context.ts +18 -0
- package/src/shared/types/fs.ts +21 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/omp/session.ts +6 -0
- package/src/shared/types/session-changes.ts +58 -0
- package/src/shared/types/settings/state.ts +8 -0
- package/src/test-support/peer-harness.ts +13 -5
- package/dist/client/static/js/ImageView-ksx9bbct.js +0 -1
- package/dist/client/static/js/LayoutWrapper-9ftz050x.js +0 -2
- package/dist/client/static/js/Modal-f8x3j3be.js +0 -38
- package/dist/client/static/js/SessionsView-wzdf1cp6.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-4wsd6vk0.js +0 -1
- package/dist/client/static/js/bash-h6pkqvth.js +0 -1
- package/dist/client/static/js/c-thbdzmwv.js +0 -1
- package/dist/client/static/js/cpp-r1za1kke.js +0 -1
- package/dist/client/static/js/css-qsv4vvke.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-eycwde8c.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-srqbnmey.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-yj98317w.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-5jcrvn94.js +0 -1
- package/dist/client/static/js/graphql-275pg7ya.js +0 -1
- package/dist/client/static/js/index-b08zd4eq.js +0 -1
- package/dist/client/static/js/index-g0pkzanm.js +0 -2
- package/dist/client/static/js/index-ga2xdef3.js +0 -2
- package/dist/client/static/js/index-r416e9dt.js +0 -12
- package/dist/client/static/js/index-xzfsaqyz.js +0 -4
- package/dist/client/static/js/info-A6RAGUB7-mbt0ryx5.js +0 -1
- package/dist/client/static/js/ini-jqdrx98c.js +0 -1
- package/dist/client/static/js/java-70zqqrkr.js +0 -1
- package/dist/client/static/js/json-kxk8gfet.js +0 -1
- package/dist/client/static/js/jsx-h1035eqk.js +0 -1
- package/dist/client/static/js/lua-j2356waf.js +0 -1
- package/dist/client/static/js/markdown-ffw6rgk6.js +0 -1
- package/dist/client/static/js/one-dark-pro-8acf6cn2.js +0 -1
- package/dist/client/static/js/one-light-ysc1knem.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-a5yw789s.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-x0y4v4r2.js +0 -1
- package/dist/client/static/js/properties-55mrarxr.js +0 -1
- package/dist/client/static/js/python-dhypc3j4.js +0 -1
- package/dist/client/static/js/r-6b8dt1wp.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-trrc3ta1.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-dxgvx21w.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rbgkd8sk.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-exgw7j47.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-28tpamzk.js +0 -1
- package/dist/client/static/js/sql-9dq913c8.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-0x2ashav.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-1a00b6kc.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-2q4f2f7m.js +0 -1
- package/dist/client/static/js/tsx-wh5xgm7f.js +0 -1
- package/dist/client/static/js/typescript-ge85req5.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-x9v91the.js +0 -1
- package/dist/client/static/js/xml-7bgz40qa.js +0 -1
- package/dist/client/static/js/yaml-4ht9416k.js +0 -1
- package/src/client/components/layout/session-sidebar/new-session-context.test.ts +0 -55
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Bucket the agent change journal into chat runs.
|
|
8
|
+
*
|
|
9
|
+
* The journal records epoch-ms write times and nothing that names a message, so
|
|
10
|
+
* a write belongs to the run whose wall-clock window contains it. A run's
|
|
11
|
+
* window is its opening row's start to its owner row's end (`runWindowMs`).
|
|
12
|
+
*
|
|
13
|
+
* One file can be written several times in a run; the list shows the NET change
|
|
14
|
+
* — the first record's `before` to the last record's `after` — because that is
|
|
15
|
+
* what the run did to the file. A file created and deleted in the same run, or
|
|
16
|
+
* written back to the same blob, is not a change and is dropped.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import type { ChangedFile, ChatMessageData, SessionChangeRecord } from '@/shared/types';
|
|
20
|
+
import type { RunFooterSlot } from '@/shared/lib/chat/timeline/run-footer';
|
|
21
|
+
import { runWindowMs } from '@/shared/lib/chat/duration';
|
|
22
|
+
|
|
23
|
+
/** One file's first and last write inside a run. */
|
|
24
|
+
interface PathSpan {
|
|
25
|
+
first: SessionChangeRecord;
|
|
26
|
+
last: SessionChangeRecord;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* `ownerIndex → files` for every run that changed something. Runs with no
|
|
31
|
+
* journal records are absent, so a caller renders nothing for them.
|
|
32
|
+
*/
|
|
33
|
+
export function bucketChangesByRun(
|
|
34
|
+
messages: ChatMessageData[],
|
|
35
|
+
footers: (RunFooterSlot | null)[],
|
|
36
|
+
records: readonly SessionChangeRecord[],
|
|
37
|
+
): Map<number, ChangedFile[]> {
|
|
38
|
+
const byOwner = new Map<number, ChangedFile[]>();
|
|
39
|
+
if (records.length === 0) return byOwner;
|
|
40
|
+
const sorted = [...records].sort((a, b) => a.at - b.at);
|
|
41
|
+
|
|
42
|
+
for (const slot of footers) {
|
|
43
|
+
if (!slot) continue;
|
|
44
|
+
const window = runWindowMs(messages, slot.runStartIndex, slot.ownerIndex);
|
|
45
|
+
if (!window) continue;
|
|
46
|
+
const inWindow = sorted.filter((record) => record.at >= window.start && record.at <= window.end);
|
|
47
|
+
if (inWindow.length === 0) continue;
|
|
48
|
+
|
|
49
|
+
const byPath = new Map<string, PathSpan>();
|
|
50
|
+
for (const record of inWindow) {
|
|
51
|
+
const span = byPath.get(record.path);
|
|
52
|
+
if (span) span.last = record;
|
|
53
|
+
else byPath.set(record.path, { first: record, last: record });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const files: ChangedFile[] = [];
|
|
57
|
+
for (const [path, { first, last }] of byPath) {
|
|
58
|
+
// Created and deleted in the same run: no net change.
|
|
59
|
+
if (first.before === null && last.after === null) continue;
|
|
60
|
+
// Written back to the same content: no net change. Only a real blob key
|
|
61
|
+
// can prove that; `undefined` means "not stored", not "unchanged".
|
|
62
|
+
if (typeof first.before === 'string' && first.before === last.after) continue;
|
|
63
|
+
const status = first.before === null ? 'added' : last.after === null ? 'deleted' : 'modified';
|
|
64
|
+
files.push({ path, displayPath: last.displayPath, status, agent: last.agent });
|
|
65
|
+
}
|
|
66
|
+
if (files.length === 0) continue;
|
|
67
|
+
files.sort((a, b) => a.displayPath.localeCompare(b.displayPath));
|
|
68
|
+
byOwner.set(slot.ownerIndex, files);
|
|
69
|
+
}
|
|
70
|
+
return byOwner;
|
|
71
|
+
}
|
|
@@ -26,6 +26,9 @@ describe('forkCapability', () => {
|
|
|
26
26
|
expect(forkCapability('opencode')).toBe('tip');
|
|
27
27
|
expect(forkCapability('minimax')).toBe('tip');
|
|
28
28
|
expect(forkCapability('zcode')).toBe('tip');
|
|
29
|
+
// Hermes advertises `SessionForkCapabilities()` and its `fork_session` takes
|
|
30
|
+
// only cwd + session id, so the fork copies the whole conversation.
|
|
31
|
+
expect(forkCapability('hermes')).toBe('tip');
|
|
29
32
|
});
|
|
30
33
|
|
|
31
34
|
test('a harness with no session/fork is none', () => {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, expect, test } from 'bun:test';
|
|
7
|
+
import { formatSpan } from '@/shared/lib/format/duration';
|
|
8
|
+
|
|
9
|
+
describe('formatSpan', () => {
|
|
10
|
+
test('prints sub-second spans to one decimal', () => {
|
|
11
|
+
expect(formatSpan(420)).toBe('0.4s');
|
|
12
|
+
expect(formatSpan(1500)).toBe('1.5s');
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
test('drops the decimal from ten seconds up', () => {
|
|
16
|
+
expect(formatSpan(9_999)).toBe('10.0s');
|
|
17
|
+
expect(formatSpan(12_000)).toBe('12s');
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test('uses the largest two units past a minute', () => {
|
|
21
|
+
expect(formatSpan(134_000)).toBe('2m 14s');
|
|
22
|
+
expect(formatSpan(3_840_000)).toBe('1h 4m');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('returns undefined for a value it cannot state', () => {
|
|
26
|
+
expect(formatSpan(undefined)).toBeUndefined();
|
|
27
|
+
expect(formatSpan(0)).toBeUndefined();
|
|
28
|
+
expect(formatSpan(-5)).toBeUndefined();
|
|
29
|
+
expect(formatSpan(Number.NaN)).toBeUndefined();
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Wall-clock span label for statistics.
|
|
8
|
+
*
|
|
9
|
+
* Sub-second is the point: a fast tool call or a short LLM request is a real
|
|
10
|
+
* measurement, while the chat footer's `formatDuration` deliberately hides
|
|
11
|
+
* anything under a second. `formatSpan` prints `0.4s`, `12s`, `2m 14s`,
|
|
12
|
+
* `1h 4m` — one convention for every timing row in the context popover.
|
|
13
|
+
*
|
|
14
|
+
* Undefined, non-finite and non-positive values return `undefined`, so the
|
|
15
|
+
* caller omits the row instead of printing a measurement the source never made.
|
|
16
|
+
*/
|
|
17
|
+
export function formatSpan(ms: number | undefined): string | undefined {
|
|
18
|
+
if (typeof ms !== 'number' || !Number.isFinite(ms) || ms <= 0) return undefined;
|
|
19
|
+
if (ms < 10_000) return `${(ms / 1000).toFixed(1)}s`;
|
|
20
|
+
const totalSeconds = Math.round(ms / 1000);
|
|
21
|
+
const hours = Math.floor(totalSeconds / 3600);
|
|
22
|
+
const minutes = Math.floor((totalSeconds % 3600) / 60);
|
|
23
|
+
const seconds = totalSeconds % 60;
|
|
24
|
+
if (hours > 0) return `${hours}h ${minutes}m`;
|
|
25
|
+
if (minutes > 0) return `${minutes}m ${seconds}s`;
|
|
26
|
+
return `${seconds}s`;
|
|
27
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The unified patch the journal diff tab copies. The panel renders the two
|
|
8
|
+
* sides itself, so this is the one place a wrong hunk header or a lost context
|
|
9
|
+
* line would reach the clipboard unnoticed.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { describe, expect, test } from 'bun:test';
|
|
13
|
+
import { unifiedDiff } from '@/shared/lib/fs/unified-diff';
|
|
14
|
+
|
|
15
|
+
describe('unifiedDiff', () => {
|
|
16
|
+
test('equal texts produce no patch', () => {
|
|
17
|
+
expect(unifiedDiff('a.ts', 'one\ntwo\n', 'one\ntwo\n')).toBe('');
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test('a changed line keeps three lines of context and a correct header', () => {
|
|
21
|
+
const before = 'a\nb\nc\nd\ne\nf\ng\n';
|
|
22
|
+
const after = 'a\nb\nc\nD\ne\nf\ng\n';
|
|
23
|
+
const patch = unifiedDiff('src/x.ts', before, after);
|
|
24
|
+
expect(patch).toContain('--- a/src/x.ts');
|
|
25
|
+
expect(patch).toContain('+++ b/src/x.ts');
|
|
26
|
+
expect(patch).toContain('@@ -1,7 +1,7 @@');
|
|
27
|
+
expect(patch).toContain('-d');
|
|
28
|
+
expect(patch).toContain('+D');
|
|
29
|
+
expect(patch).toContain(' a');
|
|
30
|
+
expect(patch).toContain(' g');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test('a created file is all additions', () => {
|
|
34
|
+
const patch = unifiedDiff('new.ts', '', 'one\ntwo\n');
|
|
35
|
+
expect(patch).toContain('@@ -0,0 +1,2 @@');
|
|
36
|
+
expect(patch).toContain('+one');
|
|
37
|
+
expect(patch).toContain('+two');
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test('a deleted file is all deletions', () => {
|
|
41
|
+
const patch = unifiedDiff('gone.ts', 'one\ntwo\n', '');
|
|
42
|
+
expect(patch).toContain('@@ -1,2 +0,0 @@');
|
|
43
|
+
expect(patch).toContain('-one');
|
|
44
|
+
expect(patch).toContain('-two');
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test('two distant changes become two hunks', () => {
|
|
48
|
+
const before = Array.from({ length: 40 }, (_, index) => `line ${index}`).join('\n');
|
|
49
|
+
const after = before.replace('line 1\n', 'LINE 1\n').replace('line 38', 'LINE 38');
|
|
50
|
+
const patch = unifiedDiff('big.ts', before, after);
|
|
51
|
+
expect(patch.match(/^@@ /gm)?.length).toBe(2);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A unified diff from two texts, for the journal diff tab's Copy action.
|
|
8
|
+
*
|
|
9
|
+
* The diff panel renders the two sides itself (`@codemirror/merge`), so this
|
|
10
|
+
* patch is not what the reader sees — it is what "Copy diff text" puts on the
|
|
11
|
+
* clipboard, and what a plugin's diff renderer receives. Keeping it here (not
|
|
12
|
+
* in the server module) means the same function can be tested without a
|
|
13
|
+
* session, and a future client-side caller gets the same answer.
|
|
14
|
+
*
|
|
15
|
+
* Line-based LCS, capped: a pair whose product exceeds {@link MAX_LCS_CELLS}
|
|
16
|
+
* falls back to "every old line removed, every new line added". That is still a
|
|
17
|
+
* valid patch, and it keeps a 20 000-line file from allocating a 400M-cell
|
|
18
|
+
* table on a request thread.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** Context lines around each change, as `git diff` emits by default. */
|
|
22
|
+
const CONTEXT = 3;
|
|
23
|
+
/** Above this many DP cells, fall back to a whole-file replacement. */
|
|
24
|
+
const MAX_LCS_CELLS = 4_000_000;
|
|
25
|
+
|
|
26
|
+
type Op = { kind: ' ' | '-' | '+'; text: string };
|
|
27
|
+
|
|
28
|
+
/** Split into lines, dropping the empty tail a trailing newline produces. */
|
|
29
|
+
function splitLines(text: string): string[] {
|
|
30
|
+
if (text === '') return [];
|
|
31
|
+
const lines = text.split('\n');
|
|
32
|
+
if (lines[lines.length - 1] === '') lines.pop();
|
|
33
|
+
return lines;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Line-level LCS edit script from `a` to `b`. */
|
|
37
|
+
function editScript(a: readonly string[], b: readonly string[]): Op[] {
|
|
38
|
+
const n = a.length;
|
|
39
|
+
const m = b.length;
|
|
40
|
+
if (n * m > MAX_LCS_CELLS) {
|
|
41
|
+
return [
|
|
42
|
+
...a.map((text): Op => ({ kind: '-', text })),
|
|
43
|
+
...b.map((text): Op => ({ kind: '+', text })),
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
// `dp[i][j]` = LCS length of a[i..] and b[j..].
|
|
47
|
+
const dp: Uint32Array[] = Array.from({ length: n + 1 }, () => new Uint32Array(m + 1));
|
|
48
|
+
for (let i = n - 1; i >= 0; i--) {
|
|
49
|
+
for (let j = m - 1; j >= 0; j--) {
|
|
50
|
+
dp[i][j] = a[i] === b[j] ? dp[i + 1][j + 1] + 1 : Math.max(dp[i + 1][j], dp[i][j + 1]);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const ops: Op[] = [];
|
|
54
|
+
let i = 0;
|
|
55
|
+
let j = 0;
|
|
56
|
+
while (i < n && j < m) {
|
|
57
|
+
if (a[i] === b[j]) {
|
|
58
|
+
ops.push({ kind: ' ', text: a[i] });
|
|
59
|
+
i++;
|
|
60
|
+
j++;
|
|
61
|
+
} else if (dp[i + 1][j] >= dp[i][j + 1]) {
|
|
62
|
+
ops.push({ kind: '-', text: a[i] });
|
|
63
|
+
i++;
|
|
64
|
+
} else {
|
|
65
|
+
ops.push({ kind: '+', text: b[j] });
|
|
66
|
+
j++;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
while (i < n) ops.push({ kind: '-', text: a[i++] });
|
|
70
|
+
while (j < m) ops.push({ kind: '+', text: b[j++] });
|
|
71
|
+
return ops;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** `start,count` of a unified hunk range; a zero-length range names the line before it. */
|
|
75
|
+
function hunkRange(start: number, count: number): string {
|
|
76
|
+
return `${count === 0 ? start : start + 1},${count}`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Unified diff turning `before` into `after` at `path`; `''` when they are
|
|
81
|
+
* equal. `path` is the display path (repo- or cwd-relative).
|
|
82
|
+
*/
|
|
83
|
+
export function unifiedDiff(path: string, before: string, after: string): string {
|
|
84
|
+
if (before === after) return '';
|
|
85
|
+
const ops = editScript(splitLines(before), splitLines(after));
|
|
86
|
+
const changed: number[] = [];
|
|
87
|
+
for (let index = 0; index < ops.length; index++) {
|
|
88
|
+
if (ops[index].kind !== ' ') changed.push(index);
|
|
89
|
+
}
|
|
90
|
+
if (changed.length === 0) return '';
|
|
91
|
+
|
|
92
|
+
// Group changed indices into hunks, merging when the gap is within twice the
|
|
93
|
+
// context (the same rule `git diff` uses).
|
|
94
|
+
const ranges: Array<[number, number]> = [];
|
|
95
|
+
let start = Math.max(0, changed[0] - CONTEXT);
|
|
96
|
+
let end = Math.min(ops.length - 1, changed[0] + CONTEXT);
|
|
97
|
+
for (let k = 1; k < changed.length; k++) {
|
|
98
|
+
const index = changed[k];
|
|
99
|
+
if (index - end <= 2 * CONTEXT) {
|
|
100
|
+
end = Math.min(ops.length - 1, index + CONTEXT);
|
|
101
|
+
} else {
|
|
102
|
+
ranges.push([start, end]);
|
|
103
|
+
start = Math.max(0, index - CONTEXT);
|
|
104
|
+
end = Math.min(ops.length - 1, index + CONTEXT);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
ranges.push([start, end]);
|
|
108
|
+
|
|
109
|
+
let out = `--- a/${path}\n+++ b/${path}\n`;
|
|
110
|
+
for (const [from, to] of ranges) {
|
|
111
|
+
let oldLine = 1;
|
|
112
|
+
let newLine = 1;
|
|
113
|
+
for (let index = 0; index < from; index++) {
|
|
114
|
+
if (ops[index].kind !== '+') oldLine++;
|
|
115
|
+
if (ops[index].kind !== '-') newLine++;
|
|
116
|
+
}
|
|
117
|
+
let oldCount = 0;
|
|
118
|
+
let newCount = 0;
|
|
119
|
+
for (let index = from; index <= to; index++) {
|
|
120
|
+
if (ops[index].kind !== '+') oldCount++;
|
|
121
|
+
if (ops[index].kind !== '-') newCount++;
|
|
122
|
+
}
|
|
123
|
+
out += `@@ -${hunkRange(oldLine - 1, oldCount)} +${hunkRange(newLine - 1, newCount)} @@\n`;
|
|
124
|
+
for (let index = from; index <= to; index++) out += `${ops[index].kind}${ops[index].text}\n`;
|
|
125
|
+
}
|
|
126
|
+
return out;
|
|
127
|
+
}
|
|
@@ -50,6 +50,9 @@ const HARNESS_BASES: Readonly<Record<string, string>> = {
|
|
|
50
50
|
jcode: '#111111',
|
|
51
51
|
// xAI publishes a one-colour mark.
|
|
52
52
|
grok: '#000000',
|
|
53
|
+
// Hermes' mark is the vendor's black "nous girl" portrait, so it paints in the
|
|
54
|
+
// theme's ink like the other monochrome marks.
|
|
55
|
+
hermes: '#000000',
|
|
53
56
|
};
|
|
54
57
|
|
|
55
58
|
/**
|
|
@@ -89,6 +89,19 @@ describe('harness catalog after the Gemini retirement', () => {
|
|
|
89
89
|
expect(HARNESS_LAUNCH.grok?.install).toContain('https://x.ai/cli/install.sh');
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
+
test('hermes is listed and launches its own `acp` subcommand', () => {
|
|
93
|
+
// Hermes ships the ACP adapter in-tree (`acp_adapter/`), so the launch line
|
|
94
|
+
// is the CLI's own verb. The `acp` extra is a separate sync step, which the
|
|
95
|
+
// install hint has to name or the subcommand does not exist on a stock
|
|
96
|
+
// install.
|
|
97
|
+
const descriptor = harnessDescriptor('hermes');
|
|
98
|
+
expect(descriptor?.transport).toBe('acp');
|
|
99
|
+
expect(descriptor?.glyph).toBe('hermes');
|
|
100
|
+
expect(HARNESS_LAUNCH.hermes?.command).toEqual(['hermes', 'acp']);
|
|
101
|
+
expect(HARNESS_LAUNCH.hermes?.install).toContain('hermes-agent.nousresearch.com/install.sh');
|
|
102
|
+
expect(HARNESS_LAUNCH.hermes?.install).toContain("pm.sync_venv(['acp']");
|
|
103
|
+
});
|
|
104
|
+
|
|
92
105
|
test('every catalog entry has a launch line or is the built-in transport', () => {
|
|
93
106
|
// The built-in transport has no agent to launch by definition; everything
|
|
94
107
|
// else without a line would probe to "no launch command is configured",
|
|
@@ -51,7 +51,11 @@ export type BuiltinHarnessId =
|
|
|
51
51
|
* by the Jcode daemon. */
|
|
52
52
|
| 'jcode'
|
|
53
53
|
/** xAI's Grok Build CLI, over its own ACP server (`grok agent stdio`). */
|
|
54
|
-
| 'grok'
|
|
54
|
+
| 'grok'
|
|
55
|
+
/** Nous Research's Hermes Agent, over the ACP adapter it ships in-tree
|
|
56
|
+
* (`hermes acp`). The stock install exposes only the messages gateway and
|
|
57
|
+
* the TUI; the ACP surface arrives with its `acp` extra. */
|
|
58
|
+
| 'hermes';
|
|
55
59
|
|
|
56
60
|
/**
|
|
57
61
|
* A harness id: one this build ships, or one the user added.
|
|
@@ -82,6 +86,7 @@ export const HARNESS_IDS: readonly BuiltinHarnessId[] = [
|
|
|
82
86
|
'zcode',
|
|
83
87
|
'jcode',
|
|
84
88
|
'grok',
|
|
89
|
+
'hermes',
|
|
85
90
|
];
|
|
86
91
|
|
|
87
92
|
export interface HarnessDescriptor {
|
|
@@ -136,6 +141,7 @@ export type HarnessGlyph =
|
|
|
136
141
|
| 'zcode'
|
|
137
142
|
| 'jcode'
|
|
138
143
|
| 'grok'
|
|
144
|
+
| 'hermes'
|
|
139
145
|
/** A user-added ACP harness: no vendor mark, drawn as its initial. */
|
|
140
146
|
| 'custom';
|
|
141
147
|
|
|
@@ -162,6 +168,7 @@ export const HARNESS_CATALOG: Readonly<Record<BuiltinHarnessId, HarnessDescripto
|
|
|
162
168
|
zcode: { id: 'zcode', label: 'zcode', initial: 'Z', transport: 'acp', glyph: 'zcode' },
|
|
163
169
|
jcode: { id: 'jcode', label: 'jcode', initial: 'J', transport: 'acp', glyph: 'jcode' },
|
|
164
170
|
grok: { id: 'grok', label: 'grok', initial: 'G', transport: 'acp', glyph: 'grok' },
|
|
171
|
+
hermes: { id: 'hermes', label: 'hermes', initial: 'H', transport: 'acp', glyph: 'hermes' },
|
|
165
172
|
};
|
|
166
173
|
|
|
167
174
|
/**
|
|
@@ -24,10 +24,12 @@ export function harnessForksAtMessage(harness: string | null | undefined): boole
|
|
|
24
24
|
* Harnesses that advertise `session/fork` but take no anchor: the fork copies
|
|
25
25
|
* the whole conversation. `zcode` is checkpoint-scoped (`latestCheckpoint`),
|
|
26
26
|
* `opencode` and `minimax` have a message-level fork in their own API that
|
|
27
|
-
* their ACP adapter does not pass through
|
|
27
|
+
* their ACP adapter does not pass through, and `hermes` advertises
|
|
28
|
+
* `SessionForkCapabilities()` with a `fork_session(cwd, session_id)` that takes
|
|
29
|
+
* no message id.
|
|
28
30
|
*/
|
|
29
31
|
export function harnessForksWholeChat(harness: string | null | undefined): boolean {
|
|
30
|
-
return harness === 'opencode' || harness === 'minimax' || harness === 'zcode';
|
|
32
|
+
return harness === 'opencode' || harness === 'minimax' || harness === 'zcode' || harness === 'hermes';
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
/** What a harness can fork: nothing, the whole chat, or at a message. */
|
|
@@ -55,6 +55,9 @@ export const HARNESS_MCP_FACTS: Record<BuiltinHarnessId, HarnessMcpFacts> = {
|
|
|
55
55
|
// Measured on 1.0.77: `mcpCapabilities` advertises stdio, http AND sse, and
|
|
56
56
|
// the agent also loads config.toml / ~/.claude.json / .mcp.json on its own.
|
|
57
57
|
grok: { delivery: 'acp', note: 'Injected on session/new and advertised for stdio, http and sse (measured 1.0.77); grok also loads MCP servers from config.toml, ~/.claude.json and the project .mcp.json.' },
|
|
58
|
+
// Hermes' ACP adapter takes the editor's `mcpServers` on session/new and adds
|
|
59
|
+
// them to the servers its own `config.yaml` already enables.
|
|
60
|
+
hermes: { delivery: 'acp', note: 'Injected on session/new, on top of the servers ~/.hermes/config.yaml enables; the editor list is always added.' },
|
|
58
61
|
};
|
|
59
62
|
|
|
60
63
|
/**
|
|
@@ -178,6 +178,20 @@ export const HARNESS_PROVIDER_FACTS: Readonly<Partial<Record<HarnessId, HarnessP
|
|
|
178
178
|
importFrom: [],
|
|
179
179
|
summary: 'Grok takes custom models as [model.<name>] tables in ~/.grok/config.toml (model, base_url, api_key or env_key, context_window). Kabmo does not write that file; xAI models still need `grok login`.',
|
|
180
180
|
},
|
|
181
|
+
hermes: {
|
|
182
|
+
registry: {
|
|
183
|
+
// Hermes keeps providers in `providers.<name>` in ~/.hermes/config.yaml
|
|
184
|
+
// (`api` for the base URL, `api_key` or `key_env`, `transport`, `models`),
|
|
185
|
+
// and its own `hermes model` / dashboard write that file. The model list
|
|
186
|
+
// may be a string array OR a map, which no Kabmo writer models, so the
|
|
187
|
+
// file is read-only here.
|
|
188
|
+
kind: 'agent-managed', file: '.hermes/config.yaml', pointer: 'providers',
|
|
189
|
+
writable: false, baseUrlField: null, apiKeyField: null, modelsField: null,
|
|
190
|
+
},
|
|
191
|
+
createsChoice: true,
|
|
192
|
+
importFrom: [],
|
|
193
|
+
summary: 'Hermes keeps providers in ~/.hermes/config.yaml (api, api_key or key_env, transport, models), written by `hermes model` and its dashboard; Kabmo shows the models it publishes but does not edit that file.',
|
|
194
|
+
},
|
|
181
195
|
claude: {
|
|
182
196
|
registry: {
|
|
183
197
|
kind: 'env', file: null, pointer: 'environment',
|
|
@@ -155,6 +155,11 @@ export const HARNESS_UPDATE_FACTS: Readonly<Partial<Record<HarnessId, HarnessUpd
|
|
|
155
155
|
command: 'grok update',
|
|
156
156
|
note: 'The CLI updates itself (`grok update`, plus `[cli] auto_update`); Kabmo runs its own subcommand.',
|
|
157
157
|
},
|
|
158
|
+
hermes: {
|
|
159
|
+
kind: 'self',
|
|
160
|
+
command: 'hermes update',
|
|
161
|
+
note: 'The CLI updates itself (`hermes update`, which also adds the `hermes-acp` launcher to older installs); Kabmo runs its own subcommand.',
|
|
162
|
+
},
|
|
158
163
|
};
|
|
159
164
|
|
|
160
165
|
/** The facts for a harness, or "Kabmo knows nothing about updating it". */
|
|
@@ -41,33 +41,33 @@ export const ICON_HUES: Readonly<Record<string, number>> = {
|
|
|
41
41
|
Command: 100, Component: 200, Copy: 320, CopyPlus: 40, CornerDownLeft: 10, Cpu: 250,
|
|
42
42
|
Database: 280, Dice5: 50, Diff: 300, DollarSign: 220, Download: 210, DownloadCloud: 180,
|
|
43
43
|
Edit2: 210, Ellipsis: 100, ExternalLink: 60, Eye: 20, EyeOff: 350, File: 310,
|
|
44
|
-
FileCode: 260, FileCog: 340, FileEdit: 270, FileImage: 40, FilePlus: 350,
|
|
45
|
-
FileSearch: 310, FileText: 80, Files: 320, Flag: 350, FlaskConical: 170,
|
|
46
|
-
FolderGit: 190, FolderGit2: 190, FolderInput: 310, FolderOpen: 330, FolderPlus: 250,
|
|
47
|
-
FolderTree: 10, Gamepad2: 300, GitBranch: 30, GitCommitVertical: 240, GitCompare: 340,
|
|
48
|
-
GitMerge: 90, GitPullRequest: 10, Globe: 340, GraduationCap: 190, GripVertical: 350,
|
|
49
|
-
Hand: 200, HardDrive: 0, Hash: 330, Heading: 250, Heart: 270,
|
|
50
|
-
Home: 20, Image: 140, Key: 240, KeyRound: 240, Keyboard: 120,
|
|
51
|
-
Layers: 30, LayoutTemplate: 170, Leaf: 50, Library: 160, Lightbulb: 0,
|
|
52
|
-
ListChecks: 320, ListFilter: 230, ListOrdered: 220, ListTodo: 210, ListTree: 330,
|
|
53
|
-
Lock: 220, LockKeyhole: 270, LockOpen: 180, LogIn: 140, LogOut: 190,
|
|
54
|
-
Maximize2: 270, Menu: 100, MessageSquare: 150, MessageSquareOff: 40, MessageSquarePlus: 350,
|
|
55
|
-
Mic: 160, MicOff: 170, Minimize: 290, Minimize2: 130, Minus: 110,
|
|
56
|
-
Moon: 80, MoreHorizontal: 160, MousePointerClick: 70, MoveVertical: 300, Music: 280,
|
|
57
|
-
PackageOpen: 230, Paintbrush: 250, Palette: 320, PanelLeft: 280, PanelLeftClose: 160,
|
|
58
|
-
PanelRightClose: 350, Paperclip: 310, Pause: 10, Pencil: 0, PencilLine: 260,
|
|
59
|
-
PinOff: 50, Pipette: 120, Play: 310, Plug: 50, Plus: 210,
|
|
60
|
-
Puzzle: 50, Quote: 110, Radio: 320, Ratio: 160, RefreshCw: 180,
|
|
61
|
-
Replace: 190, ReplaceAll: 140, Rocket: 210, RotateCcw: 330, RotateCw: 0,
|
|
62
|
-
Rows3: 250, Save: 40, SaveAll: 190, Scissors: 260, Search: 250,
|
|
63
|
-
Server: 300, ServerCog: 50, Settings: 240, Settings2: 20, Shield: 160,
|
|
64
|
-
Sliders: 290, SlidersHorizontal: 50, Smartphone: 20, Space: 290, Sparkles: 180,
|
|
65
|
-
SquareFunction: 220, SquarePen: 10, Star: 170, StickyNote: 100, Store: 340,
|
|
66
|
-
Tablet: 290, Tag: 310, Target: 200, Terminal: 210, TextSelect: 220,
|
|
67
|
-
TriangleAlert: 210, Type: 170, Undo2: 310, Upload: 0, UploadCloud: 50,
|
|
68
|
-
Variable: 330, Volume2: 270, VolumeX: 50, Wand2: 270, WandSparkles: 40,
|
|
69
|
-
WholeWord: 240, WrapText: 340, Wrench: 0, X: 230, Zap: 120,
|
|
70
|
-
ZoomOut: 340,
|
|
44
|
+
FileCode: 260, FileCog: 340, FileDiff: 280, FileEdit: 270, FileImage: 40, FilePlus: 350,
|
|
45
|
+
FilePlus2: 350, FileSearch: 310, FileText: 80, Files: 320, Flag: 350, FlaskConical: 170,
|
|
46
|
+
Folder: 290, FolderGit: 190, FolderGit2: 190, FolderInput: 310, FolderOpen: 330, FolderPlus: 250,
|
|
47
|
+
FolderSearch: 10, FolderTree: 10, Gamepad2: 300, GitBranch: 30, GitCommitVertical: 240, GitCompare: 340,
|
|
48
|
+
GitFork: 30, GitMerge: 90, GitPullRequest: 10, Globe: 340, GraduationCap: 190, GripVertical: 350,
|
|
49
|
+
Hammer: 310, Hand: 200, HardDrive: 0, Hash: 330, Heading: 250, Heart: 270,
|
|
50
|
+
History: 110, Home: 20, Image: 140, Key: 240, KeyRound: 240, Keyboard: 120,
|
|
51
|
+
Laptop: 170, Layers: 30, LayoutTemplate: 170, Leaf: 50, Library: 160, Lightbulb: 0,
|
|
52
|
+
List: 170, ListChecks: 320, ListFilter: 230, ListOrdered: 220, ListTodo: 210, ListTree: 330,
|
|
53
|
+
Loader2: 40, Lock: 220, LockKeyhole: 270, LockOpen: 180, LogIn: 140, LogOut: 190,
|
|
54
|
+
Maximize: 310, Maximize2: 270, Menu: 100, MessageSquare: 150, MessageSquareOff: 40, MessageSquarePlus: 350,
|
|
55
|
+
MessagesSquare: 220, Mic: 160, MicOff: 170, Minimize: 290, Minimize2: 130, Minus: 110,
|
|
56
|
+
Monitor: 250, Moon: 80, MoreHorizontal: 160, MousePointerClick: 70, MoveVertical: 300, Music: 280,
|
|
57
|
+
Package: 270, PackageOpen: 230, Paintbrush: 250, Palette: 320, PanelLeft: 280, PanelLeftClose: 160,
|
|
58
|
+
PanelRight: 330, PanelRightClose: 350, Paperclip: 310, Pause: 10, Pencil: 0, PencilLine: 260,
|
|
59
|
+
Pin: 0, PinOff: 50, Pipette: 120, Play: 310, Plug: 50, Plus: 210,
|
|
60
|
+
Power: 340, Puzzle: 50, Quote: 110, Radio: 320, Ratio: 160, RefreshCw: 180,
|
|
61
|
+
Regex: 280, Replace: 190, ReplaceAll: 140, Rocket: 210, RotateCcw: 330, RotateCw: 0,
|
|
62
|
+
Rows: 160, Rows3: 250, Save: 40, SaveAll: 190, Scissors: 260, Search: 250,
|
|
63
|
+
Send: 110, Server: 300, ServerCog: 50, Settings: 240, Settings2: 20, Shield: 160,
|
|
64
|
+
Shrink: 160, Sliders: 290, SlidersHorizontal: 50, Smartphone: 20, Space: 290, Sparkles: 180,
|
|
65
|
+
Square: 60, SquareFunction: 220, SquarePen: 10, Star: 170, StickyNote: 100, Store: 340,
|
|
66
|
+
Sun: 90, Tablet: 290, Tag: 310, Target: 200, Terminal: 210, TextSelect: 220,
|
|
67
|
+
Ticket: 170, TriangleAlert: 210, Type: 170, Undo2: 310, Upload: 0, UploadCloud: 50,
|
|
68
|
+
User: 140, Variable: 330, Volume2: 270, VolumeX: 50, Wand2: 270, WandSparkles: 40,
|
|
69
|
+
Waypoints: 30, WholeWord: 240, WrapText: 340, Wrench: 0, X: 230, Zap: 120,
|
|
70
|
+
ZoomIn: 250, ZoomOut: 340,
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
/**
|
|
@@ -252,15 +252,17 @@ describe('isConditionMet', () => {
|
|
|
252
252
|
});
|
|
253
253
|
|
|
254
254
|
test('the provenance conditions degrade to visible, deliberately', () => {
|
|
255
|
-
// These
|
|
255
|
+
// These hide an editor row when a PROJECT layer supplies the value,
|
|
256
256
|
// because the editor writes the GLOBAL layer and promoting a repository's
|
|
257
257
|
// list would be the bug. `omp config list --json` carries no provenance, so
|
|
258
258
|
// the client cannot answer them — visible is the decision, not an oversight.
|
|
259
|
-
// `perCallModelAllowNotProject` arrived with 18.15.0's `task.perCallModelAllow
|
|
259
|
+
// `perCallModelAllowNotProject` arrived with 18.15.0's `task.perCallModelAllow`;
|
|
260
|
+
// `unpausedProvidersNotProject` with 18.20.2's `auth.unpausedProviders`.
|
|
260
261
|
for (const condition of [
|
|
261
262
|
'contextFilesExtraNotProject',
|
|
262
263
|
'restrictedFoldersNotProject',
|
|
263
264
|
'perCallModelAllowNotProject',
|
|
265
|
+
'unpausedProvidersNotProject',
|
|
264
266
|
]) {
|
|
265
267
|
expect({ condition, met: isConditionMet(condition, {}) }).toEqual({ condition, met: true });
|
|
266
268
|
}
|
|
@@ -46,6 +46,7 @@ export const DEFAULT_SETTINGS = {
|
|
|
46
46
|
goalDefaultBudget: null,
|
|
47
47
|
chatWidthMode: DEFAULT_CHAT_WIDTH_MODE,
|
|
48
48
|
toolRenderStyle: DEFAULT_TOOL_RENDER_MODE,
|
|
49
|
+
showChangedFiles: true,
|
|
49
50
|
sidebarStyle: DEFAULT_SIDEBAR_STYLE,
|
|
50
51
|
composerStyle: DEFAULT_COMPOSER_STYLE,
|
|
51
52
|
surfaceStyle: DEFAULT_SURFACE_STYLE,
|
|
@@ -23,6 +23,15 @@ export function diffTabId(path: string, staged: boolean): string {
|
|
|
23
23
|
return `diff-${staged ? 'staged' : 'working'}-${path}`;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* The diff tab id for one journal range. The same file changed in two runs is
|
|
28
|
+
* two different diffs, so the range is part of the id — unlike a git diff,
|
|
29
|
+
* where the path and side are the whole identity.
|
|
30
|
+
*/
|
|
31
|
+
export function journalDiffTabId(path: string, from: number, to: number): string {
|
|
32
|
+
return `diff-journal-${from}-${to}-${path}`;
|
|
33
|
+
}
|
|
34
|
+
|
|
26
35
|
/** Display name for a diff tab: `main.ts` → `main.ts (Diff)`. */
|
|
27
36
|
export function diffTabName(path: string): string {
|
|
28
37
|
return `${path.split('/').pop() || path} (Diff)`;
|
|
@@ -47,6 +47,22 @@ export interface ContextCostBreakdown {
|
|
|
47
47
|
total: number;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
/** Measured run timing for a session. Absent fields mean the source never
|
|
51
|
+
* reported them: an ACP chat sends no per-call timing, and transcripts that
|
|
52
|
+
* predate `ttft` have no first-token clock. */
|
|
53
|
+
export interface SessionTimingStats {
|
|
54
|
+
/** Summed request duration of every assistant call, ms (TTFT included). */
|
|
55
|
+
llmMs: number;
|
|
56
|
+
/** Summed wall time of every tool call that has both ends in the file, ms. */
|
|
57
|
+
toolMs: number;
|
|
58
|
+
/** Mean time to first token across calls that reported one, ms. */
|
|
59
|
+
ttftAvgMs?: number;
|
|
60
|
+
/** Output tokens per second of the last completed call. */
|
|
61
|
+
lastTps?: number;
|
|
62
|
+
/** Output tokens per second over the whole session (output / LLM time). */
|
|
63
|
+
avgTps?: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
50
66
|
export interface SessionContextTelemetry {
|
|
51
67
|
sessionId: string;
|
|
52
68
|
sessionTitle: string;
|
|
@@ -61,6 +77,8 @@ export interface SessionContextTelemetry {
|
|
|
61
77
|
assistantCount: number;
|
|
62
78
|
totalCost: number;
|
|
63
79
|
costFormatted: string;
|
|
80
|
+
/** Measured turns/steps/LLM/tool timing; absent when the source has none. */
|
|
81
|
+
timing?: SessionTimingStats;
|
|
64
82
|
/** Average cache-hit rate (%) across assistant turns. */
|
|
65
83
|
cacheHitAverage?: number;
|
|
66
84
|
/** Per-category cost breakdown for the cost detail popup. */
|
package/src/shared/types/fs.ts
CHANGED
|
@@ -22,6 +22,15 @@ export interface OpenedFile {
|
|
|
22
22
|
isDiff?: boolean;
|
|
23
23
|
diffStatus?: string;
|
|
24
24
|
diffStaged?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Where a diff tab's two sides come from. `git` (the default) reads the
|
|
27
|
+
* working tree through `/api/fs/git`; `journal` reads the agent's own
|
|
28
|
+
* before/after snapshots from the session's `changes.jsonl`, so the tab shows
|
|
29
|
+
* what the agent wrote even after someone else edited the file.
|
|
30
|
+
*/
|
|
31
|
+
diffSource?: 'git' | 'journal';
|
|
32
|
+
/** The journal range a `diffSource: 'journal'` tab renders. */
|
|
33
|
+
journalDiff?: JournalDiffRef;
|
|
25
34
|
/**
|
|
26
35
|
* The live `FileSystemFileHandle` id a PWA launch opened this tab through.
|
|
27
36
|
*
|
|
@@ -39,6 +48,18 @@ export interface OpenedFile {
|
|
|
39
48
|
deviceFile?: boolean;
|
|
40
49
|
}
|
|
41
50
|
|
|
51
|
+
/**
|
|
52
|
+
* One agent write range in a session's change journal: the absolute path plus
|
|
53
|
+
* the run window (`from`/`to`, epoch ms) whose net change the diff shows.
|
|
54
|
+
*/
|
|
55
|
+
export interface JournalDiffRef {
|
|
56
|
+
sessionId: string;
|
|
57
|
+
/** Absolute path as the journal recorded it. */
|
|
58
|
+
path: string;
|
|
59
|
+
from: number;
|
|
60
|
+
to: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
42
63
|
export interface SearchResultItem {
|
|
43
64
|
file: string;
|
|
44
65
|
line: number;
|
|
@@ -21,6 +21,7 @@ export * from '@/shared/types/settings/plugin';
|
|
|
21
21
|
export * from '@/shared/types/settings/write';
|
|
22
22
|
export * from '@/shared/types/context';
|
|
23
23
|
export * from '@/shared/types/omp/session';
|
|
24
|
+
export * from '@/shared/types/session-changes';
|
|
24
25
|
export * from '@/shared/types/omp/agent';
|
|
25
26
|
export * from '@/shared/types/omp/instructions';
|
|
26
27
|
export * from '@/shared/types/omp/subagent';
|