@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,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The diff panel's read for a journal tab: the agent's own before/after
|
|
8
|
+
* snapshots for one path inside one run window.
|
|
9
|
+
*
|
|
10
|
+
* Same shape as {@link useFileDiff} so the panel can swap the source without a
|
|
11
|
+
* second renderer. The two differences are the endpoint and the status
|
|
12
|
+
* vocabulary: the journal answers `added` / `modified` / `deleted`, which the
|
|
13
|
+
* panel's badge already understands as `A` / `M` / `D`.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { useCallback, useEffect, useRef, useState } from 'preact/hooks';
|
|
17
|
+
import type { FileDiffState } from '@/client/hooks/workspace/diff-file';
|
|
18
|
+
import type { JournalDiffRef } from '@/shared/types/fs';
|
|
19
|
+
|
|
20
|
+
interface JournalDiffResponse {
|
|
21
|
+
success?: boolean;
|
|
22
|
+
oldContent?: string;
|
|
23
|
+
newContent?: string;
|
|
24
|
+
diff?: string;
|
|
25
|
+
status?: 'added' | 'modified' | 'deleted';
|
|
26
|
+
unavailable?: boolean;
|
|
27
|
+
error?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** `A` / `M` / `D` for the panel's status badge. */
|
|
31
|
+
function statusLetter(status: JournalDiffResponse['status']): string {
|
|
32
|
+
if (status === 'added') return 'A';
|
|
33
|
+
if (status === 'deleted') return 'D';
|
|
34
|
+
return 'M';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function useJournalDiff(ref: JournalDiffRef | undefined): FileDiffState {
|
|
38
|
+
const [rawDiff, setRawDiff] = useState('');
|
|
39
|
+
const [oldContent, setOldContent] = useState('');
|
|
40
|
+
const [newContent, setNewContent] = useState('');
|
|
41
|
+
const [currentStatus, setCurrentStatus] = useState('M');
|
|
42
|
+
const [isLoading, setIsLoading] = useState(Boolean(ref));
|
|
43
|
+
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
|
44
|
+
const seqRef = useRef(0);
|
|
45
|
+
|
|
46
|
+
const sessionId = ref?.sessionId;
|
|
47
|
+
const path = ref?.path;
|
|
48
|
+
const from = ref?.from;
|
|
49
|
+
const to = ref?.to;
|
|
50
|
+
|
|
51
|
+
const fetchDiff = useCallback(async () => {
|
|
52
|
+
if (!sessionId || !path || from === undefined || to === undefined) return;
|
|
53
|
+
const seq = ++seqRef.current;
|
|
54
|
+
setIsLoading(true);
|
|
55
|
+
setErrorMessage(null);
|
|
56
|
+
try {
|
|
57
|
+
const params = new URLSearchParams({ path, from: String(from), to: String(to) });
|
|
58
|
+
const res = await fetch(`/api/sessions/${encodeURIComponent(sessionId)}/changes/diff?${params.toString()}`);
|
|
59
|
+
const data = (await res.json().catch(() => null)) as JournalDiffResponse | null;
|
|
60
|
+
if (seq !== seqRef.current) return;
|
|
61
|
+
if (data?.success) {
|
|
62
|
+
setOldContent(data.oldContent ?? '');
|
|
63
|
+
setNewContent(data.newContent ?? '');
|
|
64
|
+
setRawDiff(data.diff ?? '');
|
|
65
|
+
setCurrentStatus(statusLetter(data.status));
|
|
66
|
+
if (data.unavailable) {
|
|
67
|
+
setErrorMessage('The journal did not store this file’s content (over 8 MB), so the two sides are unknown.');
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
setErrorMessage(data?.error || `Failed to load the journal diff (HTTP ${res.status})`);
|
|
71
|
+
}
|
|
72
|
+
} catch (err: unknown) {
|
|
73
|
+
if (seq !== seqRef.current) return;
|
|
74
|
+
setErrorMessage(err instanceof Error ? err.message : 'Error fetching the journal diff');
|
|
75
|
+
} finally {
|
|
76
|
+
if (seq === seqRef.current) setIsLoading(false);
|
|
77
|
+
}
|
|
78
|
+
}, [sessionId, path, from, to]);
|
|
79
|
+
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
void fetchDiff();
|
|
82
|
+
}, [fetchDiff]);
|
|
83
|
+
|
|
84
|
+
const adoptState = useCallback(() => {}, []);
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
rawDiff,
|
|
88
|
+
oldContent,
|
|
89
|
+
newContent,
|
|
90
|
+
currentStatus,
|
|
91
|
+
currentStaged: false,
|
|
92
|
+
isLoading,
|
|
93
|
+
errorMessage,
|
|
94
|
+
fetchDiff,
|
|
95
|
+
adoptState,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
import { useCallback, useState } from 'preact/hooks';
|
|
25
25
|
import { useSearchParams } from '@/client/lib/router/search-params';
|
|
26
|
+
import { clearBranchParams } from '@/client/lib/router/branch-params';
|
|
26
27
|
import { forgetSession } from '@/shared/lib/workspace/session-state/store';
|
|
27
28
|
import type { SessionItemData } from '@/shared/types';
|
|
28
29
|
|
|
@@ -74,7 +75,10 @@ export function useSessionDelete(): SessionDeleteActions {
|
|
|
74
75
|
forgetSession(sessionId);
|
|
75
76
|
if (searchParams.get('sessionId') === sessionId) {
|
|
76
77
|
setSearchParams((prev) => {
|
|
77
|
-
|
|
78
|
+
// The deleted chat is gone, and with it any pending draft's branch
|
|
79
|
+
// hints the URL still carried: a bare landing page showing a forked
|
|
80
|
+
// source's transcript would be the next thing the user sees.
|
|
81
|
+
const next = clearBranchParams(prev);
|
|
78
82
|
next.delete('sessionId');
|
|
79
83
|
// A subagent transcript belongs to the session being removed.
|
|
80
84
|
next.delete('subagent');
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The one rule that removes the double chime: a shell's banner plays the Kabmo
|
|
8
|
+
* sound itself, so the page must not play the cue on top of it.
|
|
9
|
+
*
|
|
10
|
+
* Every branch here is a sound the user either hears twice or never — neither
|
|
11
|
+
* throws, neither logs, so this is the only place the decision is visible.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { afterEach, beforeEach, describe, expect, test } from 'bun:test';
|
|
15
|
+
import { Window } from 'happy-dom';
|
|
16
|
+
|
|
17
|
+
import { nativeBannerPlaysSound } from '@/client/lib/notifications/native-banner-sound';
|
|
18
|
+
import { notificationPlatformForClient } from '@/client/lib/notifications/platform';
|
|
19
|
+
import { primeKabmoSettings } from '@/shared/lib/settings/client';
|
|
20
|
+
|
|
21
|
+
const DOM_GLOBALS = ['window', 'document', 'navigator'] as const;
|
|
22
|
+
const nativeGlobals: Partial<Record<(typeof DOM_GLOBALS)[number], unknown>> = {};
|
|
23
|
+
|
|
24
|
+
beforeEach(() => {
|
|
25
|
+
const win = new Window({ url: 'http://localhost' });
|
|
26
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
27
|
+
for (const key of DOM_GLOBALS) {
|
|
28
|
+
if (!(key in nativeGlobals)) nativeGlobals[key] = target[key];
|
|
29
|
+
target[key] = (win as unknown as Record<string, unknown>)[key];
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
afterEach(() => {
|
|
34
|
+
primeKabmoSettings({});
|
|
35
|
+
delete window.__kabmoCall;
|
|
36
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
37
|
+
for (const key of DOM_GLOBALS) {
|
|
38
|
+
if (nativeGlobals[key] === undefined) delete target[key];
|
|
39
|
+
else target[key] = nativeGlobals[key];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/** A shell that answers everything, so `hasShellBridge()` is true. */
|
|
44
|
+
function installShell(): void {
|
|
45
|
+
window.__kabmoCall = () => Promise.resolve(null);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
describe('nativeBannerPlaysSound', () => {
|
|
49
|
+
test('a browser keeps the Web Audio cue', () => {
|
|
50
|
+
primeKabmoSettings({ notifyOnFinish: true, notifyOnAsk: true });
|
|
51
|
+
expect(nativeBannerPlaysSound('finish')).toBe(false);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test('a shell with the event switch on owns the sound', () => {
|
|
55
|
+
installShell();
|
|
56
|
+
primeKabmoSettings({ notifyOnFinish: true });
|
|
57
|
+
expect(nativeBannerPlaysSound('finish')).toBe(true);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
test('the event switch ships off, so the page stays audible', () => {
|
|
61
|
+
installShell();
|
|
62
|
+
primeKabmoSettings({});
|
|
63
|
+
expect(nativeBannerPlaysSound('finish')).toBe(false);
|
|
64
|
+
expect(nativeBannerPlaysSound('ask')).toBe(false);
|
|
65
|
+
expect(nativeBannerPlaysSound('error')).toBe(false);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test('a silenced device class falls back to the page cue', () => {
|
|
69
|
+
installShell();
|
|
70
|
+
const master = notificationPlatformForClient() === 'mobile'
|
|
71
|
+
? 'notifyMobileEnabled'
|
|
72
|
+
: 'notifyDesktopEnabled';
|
|
73
|
+
primeKabmoSettings({ notifyOnFinish: true, [master]: false });
|
|
74
|
+
expect(nativeBannerPlaysSound('finish')).toBe(false);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test('the other device class does not silence this one', () => {
|
|
78
|
+
installShell();
|
|
79
|
+
const other = notificationPlatformForClient() === 'mobile'
|
|
80
|
+
? 'notifyDesktopEnabled'
|
|
81
|
+
: 'notifyMobileEnabled';
|
|
82
|
+
primeKabmoSettings({ notifyOnAsk: true, [other]: false });
|
|
83
|
+
expect(nativeBannerPlaysSound('ask')).toBe(true);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
test('each event is gated by its own switch', () => {
|
|
87
|
+
installShell();
|
|
88
|
+
primeKabmoSettings({ notifyOnAsk: true });
|
|
89
|
+
expect(nativeBannerPlaysSound('ask')).toBe(true);
|
|
90
|
+
expect(nativeBannerPlaysSound('finish')).toBe(false);
|
|
91
|
+
expect(nativeBannerPlaysSound('error')).toBe(false);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Whether the NATIVE banner owns the chime for this event.
|
|
8
|
+
*
|
|
9
|
+
* Inside a Kabmo shell the OS notification plays the Kabmo sound itself
|
|
10
|
+
* (`packages/notification-sound/`). The page must then NOT play its Web Audio
|
|
11
|
+
* cue: the two arrive for the same event within a few hundred milliseconds, and
|
|
12
|
+
* hearing the same chime twice is the bug this module exists to prevent.
|
|
13
|
+
*
|
|
14
|
+
* A browser — desktop Chrome, an installed PWA — has no sound slot on its
|
|
15
|
+
* `Notification`, so the page keeps playing the cue there. That is the whole
|
|
16
|
+
* rule: the sound follows whoever can carry it, exactly once.
|
|
17
|
+
*
|
|
18
|
+
* Three conditions, all required:
|
|
19
|
+
*
|
|
20
|
+
* - a shell bridge, because only a shell can put a sound in a notification;
|
|
21
|
+
* - the platform master ON for this device class, because a silenced shell posts
|
|
22
|
+
* no banner — and then the page's cue is the only sound there is;
|
|
23
|
+
* - the event switch ON, because the server does not even record a silenced
|
|
24
|
+
* event, so no banner (and no chime) would arrive.
|
|
25
|
+
*
|
|
26
|
+
* The event switches ship FALSE, which is why the page still plays its cue on a
|
|
27
|
+
* fresh install: nothing has been switched on, so nothing else is making sound.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
import { hasShellBridge } from '@/client/lib/shell/transport';
|
|
31
|
+
import { notificationPlatformForClient } from '@/client/lib/notifications/platform';
|
|
32
|
+
import {
|
|
33
|
+
isNotificationEnabled,
|
|
34
|
+
isNotificationPlatformEnabled,
|
|
35
|
+
type NotificationEvent,
|
|
36
|
+
} from '@/shared/lib/notifications/settings';
|
|
37
|
+
|
|
38
|
+
export function nativeBannerPlaysSound(
|
|
39
|
+
event: NotificationEvent,
|
|
40
|
+
appSettings?: Record<string, any>,
|
|
41
|
+
): boolean {
|
|
42
|
+
if (typeof window === 'undefined') return false;
|
|
43
|
+
if (!hasShellBridge()) return false;
|
|
44
|
+
if (!isNotificationPlatformEnabled(notificationPlatformForClient(), appSettings)) return false;
|
|
45
|
+
return isNotificationEnabled(event, appSettings);
|
|
46
|
+
}
|
|
@@ -37,7 +37,7 @@ describe('a browser without the Notification API', () => {
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
test('drops the banner instead of throwing', async () => {
|
|
40
|
-
await expect(showOsNotification({ title: 'Kabmo', body: 'Done.' })).resolves.toBeUndefined();
|
|
40
|
+
await expect(showOsNotification({ title: 'Kabmo', body: 'Done.', kind: 'finish' })).resolves.toBeUndefined();
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
|
|
@@ -65,6 +65,7 @@ describe('inside a Kabmo shell', () => {
|
|
|
65
65
|
await showOsNotification({
|
|
66
66
|
title: 'Fix the build',
|
|
67
67
|
body: 'Waiting for you.',
|
|
68
|
+
kind: 'ask',
|
|
68
69
|
tag: 'ask:s1',
|
|
69
70
|
sessionId: 's1',
|
|
70
71
|
});
|
|
@@ -73,7 +74,13 @@ describe('inside a Kabmo shell', () => {
|
|
|
73
74
|
{ method: 'notification_request', params: {} },
|
|
74
75
|
{
|
|
75
76
|
method: 'notification_show',
|
|
76
|
-
params: {
|
|
77
|
+
params: {
|
|
78
|
+
title: 'Fix the build',
|
|
79
|
+
body: 'Waiting for you.',
|
|
80
|
+
kind: 'ask',
|
|
81
|
+
tag: 'ask:s1',
|
|
82
|
+
sessionId: 's1',
|
|
83
|
+
},
|
|
77
84
|
},
|
|
78
85
|
]);
|
|
79
86
|
});
|
|
@@ -84,6 +91,7 @@ describe('inside a Kabmo shell', () => {
|
|
|
84
91
|
await showOsNotification({
|
|
85
92
|
title: 'Fix the build',
|
|
86
93
|
body: 'The run finished.',
|
|
94
|
+
kind: 'finish',
|
|
87
95
|
tag: 'finish:s1',
|
|
88
96
|
sessionId: 's1',
|
|
89
97
|
at: 1_763_000_000_000,
|
|
@@ -95,6 +103,7 @@ describe('inside a Kabmo shell', () => {
|
|
|
95
103
|
expect(calls[0]?.params).toEqual({
|
|
96
104
|
title: 'Fix the build',
|
|
97
105
|
body: 'The run finished.',
|
|
106
|
+
kind: 'finish',
|
|
98
107
|
tag: 'finish:s1',
|
|
99
108
|
sessionId: 's1',
|
|
100
109
|
when: '1763000000000',
|
|
@@ -104,10 +113,10 @@ describe('inside a Kabmo shell', () => {
|
|
|
104
113
|
|
|
105
114
|
test('an untagged notification does not send an empty tag', async () => {
|
|
106
115
|
const calls = installShell(() => null);
|
|
107
|
-
await showOsNotification({ title: 'Kabmo', body: 'Done.' });
|
|
116
|
+
await showOsNotification({ title: 'Kabmo', body: 'Done.', kind: 'finish' });
|
|
108
117
|
expect(calls[0]).toEqual({
|
|
109
118
|
method: 'notification_show',
|
|
110
|
-
params: { title: 'Kabmo', body: 'Done.' },
|
|
119
|
+
params: { title: 'Kabmo', body: 'Done.', kind: 'finish' },
|
|
111
120
|
});
|
|
112
121
|
});
|
|
113
122
|
|
|
@@ -115,6 +124,6 @@ describe('inside a Kabmo shell', () => {
|
|
|
115
124
|
window.__kabmoCall = () => Promise.reject(new Error('This shell does not support notification_request.'));
|
|
116
125
|
expect(await requestNotificationPermission()).toBe(false);
|
|
117
126
|
// The refusal must not escape as an unhandled rejection.
|
|
118
|
-
await expect(showOsNotification({ title: 'Kabmo', body: 'Done.' })).resolves.toBeUndefined();
|
|
127
|
+
await expect(showOsNotification({ title: 'Kabmo', body: 'Done.', kind: 'finish' })).resolves.toBeUndefined();
|
|
119
128
|
});
|
|
120
129
|
});
|
|
@@ -23,10 +23,17 @@
|
|
|
23
23
|
|
|
24
24
|
import { callShell, hasShellBridge } from '@/client/lib/shell/transport';
|
|
25
25
|
import { openSessionInUrl } from '@/client/lib/router/open-session';
|
|
26
|
+
import type { NotificationKind } from '@/shared/lib/notifications/events';
|
|
26
27
|
|
|
27
28
|
export interface OsNotification {
|
|
28
29
|
title: string;
|
|
29
30
|
body: string;
|
|
31
|
+
/**
|
|
32
|
+
* Which event this is. The shells play a different chime for `ask` (the
|
|
33
|
+
* console's "the agent is blocked on you" cue) than for `finish`/`error`; a
|
|
34
|
+
* browser's own notification has no sound slot, so it is ignored there.
|
|
35
|
+
*/
|
|
36
|
+
kind: NotificationKind;
|
|
30
37
|
/** Replaces an earlier notification for the same thing (a session, a run). */
|
|
31
38
|
tag?: string;
|
|
32
39
|
/** The session a click opens, when the event is about one. */
|
|
@@ -90,6 +97,7 @@ export async function showOsNotification(notification: OsNotification): Promise<
|
|
|
90
97
|
await callShell('notification_show', {
|
|
91
98
|
title: notification.title,
|
|
92
99
|
body: notification.body,
|
|
100
|
+
kind: notification.kind,
|
|
93
101
|
...(notification.tag ? { tag: notification.tag } : {}),
|
|
94
102
|
...(notification.sessionId ? { sessionId: notification.sessionId } : {}),
|
|
95
103
|
// The shells render what they can: Android puts `when` on the shade's
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A cancelled fork must not leak into the next chat.
|
|
8
|
+
*
|
|
9
|
+
* Reported: fork a chat, back out of it, press New Session — the new chat's
|
|
10
|
+
* view still carried the source transcript above its composer. Cause: the URL
|
|
11
|
+
* kept `?forkFrom=`/`?forkAt=` and `usePendingBranch` reads them as the CURRENT
|
|
12
|
+
* pending chat's branch whenever the store entry lacks one, which a brand-new
|
|
13
|
+
* entry always does. These assert the navigation rule that prevents it.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { describe, expect, test } from 'bun:test';
|
|
17
|
+
import { clearBranchParams, newSessionParams } from '@/client/lib/router/branch-params';
|
|
18
|
+
|
|
19
|
+
function forkedUrl(): URLSearchParams {
|
|
20
|
+
return new URLSearchParams('sessionId=new-100&folderId=3&forkFrom=abc&forkAt=entry-9');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
describe('newSessionParams', () => {
|
|
24
|
+
test('a new chat after a cancelled fork carries no branch hints', () => {
|
|
25
|
+
const next = newSessionParams(forkedUrl(), 'new-200', 3);
|
|
26
|
+
expect(next.get('sessionId')).toBe('new-200');
|
|
27
|
+
expect(next.get('forkFrom')).toBeNull();
|
|
28
|
+
expect(next.get('forkAt')).toBeNull();
|
|
29
|
+
expect(next.get('parentSessionId')).toBeNull();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('the folder the new chat runs in survives', () => {
|
|
33
|
+
expect(newSessionParams(forkedUrl(), 'new-200', 7).get('folderId')).toBe('7');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test('a chat with no folder drops the stale one instead of keeping it', () => {
|
|
37
|
+
expect(newSessionParams(forkedUrl(), 'new-200', null).get('folderId')).toBeNull();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test('a stale parent hint from a child session is cleared too', () => {
|
|
41
|
+
const next = newSessionParams(
|
|
42
|
+
new URLSearchParams('sessionId=new-1&parentSessionId=parent-1'),
|
|
43
|
+
'new-2',
|
|
44
|
+
1,
|
|
45
|
+
);
|
|
46
|
+
expect(next.get('parentSessionId')).toBeNull();
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
describe('clearBranchParams', () => {
|
|
51
|
+
test('keeps the chat the URL names and its unrelated params', () => {
|
|
52
|
+
const next = clearBranchParams(new URLSearchParams('sessionId=real-1&subagent=sub-2'));
|
|
53
|
+
expect(next.get('sessionId')).toBe('real-1');
|
|
54
|
+
expect(next.get('subagent')).toBe('sub-2');
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('does not mutate the caller’s params', () => {
|
|
58
|
+
const prev = forkedUrl();
|
|
59
|
+
clearBranchParams(prev);
|
|
60
|
+
expect(prev.get('forkFrom')).toBe('abc');
|
|
61
|
+
});
|
|
62
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The BRANCH hints a pending chat carries in the URL, and the rule that they
|
|
8
|
+
* never outlive the chat they describe.
|
|
9
|
+
*
|
|
10
|
+
* `?forkFrom=` / `?forkAt=` / `?parentSessionId=` are a reload twin of the
|
|
11
|
+
* pending store entry, not chat-navigation state: they answer "what does THIS
|
|
12
|
+
* draft branch from". Left in the URL when the URL starts naming a different
|
|
13
|
+
* chat, they are read back as that chat's own branch — measured as: press Fork,
|
|
14
|
+
* leave it, press New Session, and the new chat opened with the source
|
|
15
|
+
* transcript still filled above its composer, because `usePendingBranch` fell
|
|
16
|
+
* back to the stale `forkFrom`. That is why every navigation that is not
|
|
17
|
+
* deliberately opening a branch clears all three in one place.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/** Drop every branch hint, keeping the rest of the query intact. */
|
|
21
|
+
export function clearBranchParams(params: URLSearchParams): URLSearchParams {
|
|
22
|
+
const next = new URLSearchParams(params);
|
|
23
|
+
next.delete('parentSessionId');
|
|
24
|
+
next.delete('forkFrom');
|
|
25
|
+
next.delete('forkAt');
|
|
26
|
+
return next;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The query a chat opened in a KNOWN context is started with: a workspace's own
|
|
31
|
+
* `+`, a worktree chat, a child, a fork — the id, the folder it will run in, and
|
|
32
|
+
* no branch hints. A new chat is top-level unless the call that opened it names
|
|
33
|
+
* a branch, and that call sets its hints itself.
|
|
34
|
+
*
|
|
35
|
+
* The sidebar's primary New Session does NOT use this: it opens the landing on
|
|
36
|
+
* a clean URL, because nothing has been chosen there yet.
|
|
37
|
+
*/
|
|
38
|
+
export function newSessionParams(
|
|
39
|
+
prev: URLSearchParams,
|
|
40
|
+
pendingId: string,
|
|
41
|
+
folderId: number | string | null,
|
|
42
|
+
): URLSearchParams {
|
|
43
|
+
const next = clearBranchParams(prev);
|
|
44
|
+
next.set('sessionId', pendingId);
|
|
45
|
+
if (folderId != null) next.set('folderId', String(folderId));
|
|
46
|
+
else next.delete('folderId');
|
|
47
|
+
return next;
|
|
48
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The regression this pins: a password-protected install drew its login screen
|
|
8
|
+
* in the shipped default palette because the shell gated the STORED settings on
|
|
9
|
+
* `authenticated` — while the workspace behind the password used the chosen
|
|
10
|
+
* one. Presentation is not a secret; only the published map is.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { describe, expect, test } from 'bun:test';
|
|
14
|
+
import { splitShellSettings } from '@/server/lib/assets/shell-settings.server';
|
|
15
|
+
import { readSettingsBlob } from '@/shared/lib/settings/keys';
|
|
16
|
+
|
|
17
|
+
const STORED = {
|
|
18
|
+
kabmo_settings: { theme: 'one-dark-pro-soft', surfaceStyle: 'glass' },
|
|
19
|
+
omp_provider_registry: { secret: 'must-not-leak' },
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
describe('splitShellSettings', () => {
|
|
23
|
+
test('an unauthenticated visitor still paints the stored theme', () => {
|
|
24
|
+
const split = splitShellSettings(STORED, false);
|
|
25
|
+
expect(readSettingsBlob(split.presentation).theme).toBe('one-dark-pro-soft');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test('an unauthenticated visitor is published no settings at all', () => {
|
|
29
|
+
expect(splitShellSettings(STORED, false).published).toEqual({});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('an authenticated request publishes the whole map', () => {
|
|
33
|
+
expect(splitShellSettings(STORED, true).published).toBe(STORED);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Which stored settings the shell may PAINT, and which it may PUBLISH.
|
|
8
|
+
*
|
|
9
|
+
* The two are not the same audience. The palette, the surface material and the
|
|
10
|
+
* icon tone are presentation: the login screen is the shell too, and it has to
|
|
11
|
+
* paint the theme the install chose rather than the shipped default. The
|
|
12
|
+
* published `appSettings` map is different — it carries the provider registry
|
|
13
|
+
* and every other stored preference, which is exactly what the password
|
|
14
|
+
* protects.
|
|
15
|
+
*
|
|
16
|
+
* Gating both on `authenticated` is what shipped, and it made a password-
|
|
17
|
+
* protected install draw its login screen in the default palette while the
|
|
18
|
+
* workspace behind it used the chosen one.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
export interface ShellSettings {
|
|
22
|
+
/** Presentation facts the first frame paints, for every visitor. */
|
|
23
|
+
presentation: Record<string, unknown>;
|
|
24
|
+
/** The map handed to the client; empty until the request is authenticated. */
|
|
25
|
+
published: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function splitShellSettings(
|
|
29
|
+
settings: Record<string, unknown>,
|
|
30
|
+
authenticated: boolean,
|
|
31
|
+
): ShellSettings {
|
|
32
|
+
return { presentation: settings, published: authenticated ? settings : {} };
|
|
33
|
+
}
|
|
@@ -212,4 +212,14 @@ export const HARNESS_LAUNCH: Readonly<Partial<Record<HarnessId, HarnessLaunch>>>
|
|
|
212
212
|
install: 'curl -fsSL https://x.ai/cli/install.sh | bash',
|
|
213
213
|
note: 'native ACP (`grok agent stdio`); xAI models need `grok login` once. A custom model as a [model.<name>] table in ~/.grok/config.toml (base_url + api_key) runs WITHOUT an xAI login — measured on 1.0.77. Sessions advertise model + reasoning_effort options',
|
|
214
214
|
},
|
|
215
|
+
// Hermes Agent ships its ACP adapter in-tree (`acp_adapter/`), but the stock
|
|
216
|
+
// install does not include the `agent-client-protocol` dependency: the `acp`
|
|
217
|
+
// extra has to be synced once, and until then `hermes acp` is not a command.
|
|
218
|
+
// The adapter logs to stderr, so stdout stays reserved for JSON-RPC.
|
|
219
|
+
hermes: {
|
|
220
|
+
id: 'hermes',
|
|
221
|
+
command: ['hermes', 'acp'],
|
|
222
|
+
install: 'curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash # then: cd ~/.hermes/hermes-agent && python -c "import pm; pm.sync_venv([\'acp\'], explicit=True)"',
|
|
223
|
+
note: 'native ACP (`hermes acp`); the `acp` extra must be synced once or the subcommand does not exist. Configure a provider with `hermes model` (or ~/.hermes/config.yaml / .env) before a turn succeeds; models are published as `provider:model`',
|
|
224
|
+
},
|
|
215
225
|
};
|